eurostat-map 4.4.0 → 4.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -78
- package/build/215.eurostatmap.min.js +1 -1
- package/build/eurostatmap.js +2700 -353
- package/build/eurostatmap.min.js +2 -2
- package/build/eurostatmap.min.js.map +1 -1
- package/build/types/core/DorlingSettings.d.ts +29 -0
- package/build/types/core/GridCartogramSettings.d.ts +30 -0
- package/build/types/core/InsetConfig.d.ts +9 -1
- package/build/types/core/MapConfig.d.ts +124 -41
- package/build/types/core/MapInstance.d.ts +120 -32
- package/build/types/core/TooltipConfig.d.ts +3 -0
- package/build/types/core/decoration/CoastalMarginSettings.d.ts +21 -0
- package/build/types/core/geo/geometries.d.ts +15 -0
- package/build/types/core/geo/kosovo.d.ts +2 -0
- package/build/types/core/stat/StatData.d.ts +6 -0
- package/build/types/core/utils.d.ts +4 -0
- package/build/types/index.d.ts +28 -12
- package/build/types/legend/LegendConfig.d.ts +42 -17
- package/build/types/legend/SparklineLegendConfig.d.ts +6 -68
- package/build/types/legend/choropleth/ChoroplethLegendConfig.d.ts +80 -0
- package/build/types/legend/composition/CoxcombLegendConfig.d.ts +85 -0
- package/build/types/legend/composition/PieChartLegendConfig.d.ts +68 -0
- package/build/types/legend/composition/SparklineLegendConfig.d.ts +94 -0
- package/build/types/legend/composition/StripeCompositionLegendConfig.d.ts +11 -0
- package/build/types/legend/composition/WaffleLegendConfig.d.ts +74 -0
- package/build/types/map-types/choropleth/BivariateChoroplethConfig.d.ts +12 -0
- package/build/types/map-types/choropleth/ChoroplethConfig.d.ts +15 -5
- package/build/types/map-types/choropleth/TrivariateChoroplethConfig.d.ts +14 -0
- package/build/types/map-types/composition/CompositionStatConfig.d.ts +14 -1
- package/build/types/map-types/composition/bar/BarMap.d.ts +4 -3
- package/build/types/map-types/composition/bar/BarMapConfig.d.ts +25 -1
- package/build/types/map-types/composition/coxcomb/CoxcombMap.d.ts +4 -0
- package/build/types/map-types/composition/coxcomb/CoxcombMapConfig.d.ts +14 -0
- package/build/types/map-types/composition/coxcomb/CoxcombStatConfig.d.ts +4 -2
- package/build/types/map-types/composition/pie/PieMap.d.ts +10 -3
- package/build/types/map-types/composition/pie/PieMapConfig.d.ts +19 -1
- package/build/types/map-types/composition/stripe/StripeMap.d.ts +9 -0
- package/build/types/map-types/composition/stripe/StripeMapConfig.d.ts +12 -0
- package/build/types/map-types/composition/waffle/WaffleMap.d.ts +10 -3
- package/build/types/map-types/composition/waffle/WaffleMapConfig.d.ts +20 -1
- package/build/types/map-types/flow/FlowMapConfig.d.ts +55 -0
- package/build/types/map-types/proportional-symbol/ProportionalSymbolConfig.d.ts +4 -11
- package/build/types/map-types/proportional-symbol/ProportionalSymbolMap.d.ts +0 -9
- package/build/types/map-types/proportional-symbol/mushroom/MushroomMapConfig.d.ts +5 -0
- package/build/types/map-types/spark/SparkMap.d.ts +6 -2
- package/build/types/map-types/spark/SparkMapConfig.d.ts +17 -0
- package/build/types/map-types/spark/SparkStatConfig.d.ts +6 -0
- package/package.json +9 -2
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
import type { MapConfig } from '../../core/MapConfig'
|
|
2
|
+
import type { BivariateLegendConfig } from '../../legend/choropleth/BivariateLegendConfig'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Configuration for bivariate choropleth maps.
|
|
5
6
|
*/
|
|
6
7
|
export interface BivariateChoroplethConfig extends MapConfig {
|
|
8
|
+
/** Bivariate choropleth legend configuration. */
|
|
9
|
+
legend?: BivariateLegendConfig | false
|
|
10
|
+
|
|
11
|
+
/** Number of classes. */
|
|
7
12
|
numberOfClasses?: number
|
|
13
|
+
/** Breaks1. */
|
|
8
14
|
breaks1?: number[]
|
|
15
|
+
/** Breaks2. */
|
|
9
16
|
breaks2?: number[]
|
|
17
|
+
/** Start color. */
|
|
10
18
|
startColor?: string
|
|
19
|
+
/** Color1. */
|
|
11
20
|
color1?: string
|
|
21
|
+
/** Color2. */
|
|
12
22
|
color2?: string
|
|
23
|
+
/** End color. */
|
|
13
24
|
endColor?: string
|
|
25
|
+
/** No data fill style. */
|
|
14
26
|
noDataFillStyle?: string
|
|
15
27
|
}
|
|
@@ -1,29 +1,39 @@
|
|
|
1
1
|
import { MapConfig } from '../../core/MapConfig'
|
|
2
|
+
import type { ChoroplethLegendConfig } from '../../legend/choropleth/ChoroplethLegendConfig'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Configuration specific to choropleth maps
|
|
5
6
|
*/
|
|
6
7
|
export interface ChoroplethConfig extends MapConfig {
|
|
7
|
-
|
|
8
|
+
/** Choropleth legend configuration. */
|
|
9
|
+
legend?: ChoroplethLegendConfig | false
|
|
10
|
+
|
|
11
|
+
/** Classification. */
|
|
8
12
|
numberOfClasses?: number
|
|
13
|
+
/** Classification method. */
|
|
9
14
|
classificationMethod?: 'quantile' | 'ckmeans' | 'jenks' | 'equinter' | 'threshold'
|
|
15
|
+
/** Thresholds. */
|
|
10
16
|
thresholds?: number[]
|
|
17
|
+
/** Make classif nice. */
|
|
11
18
|
makeClassifNice?: boolean
|
|
12
19
|
|
|
13
|
-
|
|
20
|
+
/** Colors. */
|
|
14
21
|
colors?: string[]
|
|
15
22
|
colorFunction?: (t: number) => string
|
|
23
|
+
/** Color scheme type. */
|
|
16
24
|
colorSchemeType?: 'discrete' | 'continuous'
|
|
25
|
+
/** Class to fill style. */
|
|
17
26
|
classToFillStyle?: { [classIndex: number]: string }
|
|
18
27
|
|
|
19
|
-
|
|
28
|
+
/** No-data styling. */
|
|
20
29
|
noDataFillStyle?: string
|
|
21
30
|
|
|
22
|
-
|
|
31
|
+
/** Value transformation (for continuous schemes). */
|
|
23
32
|
valueTransform?: (x: number) => number
|
|
24
33
|
valueUntransform?: (x: number) => number
|
|
34
|
+
/** Skip normalization. */
|
|
25
35
|
skipNormalization?: boolean
|
|
26
36
|
|
|
27
|
-
|
|
37
|
+
/** Diverging schemes. */
|
|
28
38
|
pointOfDivergence?: number
|
|
29
39
|
}
|
|
@@ -1,18 +1,32 @@
|
|
|
1
1
|
import type { MapConfig } from '../../core/MapConfig'
|
|
2
|
+
import type { TrivariateLegendConfig } from '../../legend/choropleth/TrivariateLegendConfig'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Configuration for trivariate choropleth maps.
|
|
5
6
|
*/
|
|
6
7
|
export interface TrivariateChoroplethConfig extends MapConfig {
|
|
8
|
+
/** Trivariate choropleth legend configuration. */
|
|
9
|
+
legend?: TrivariateLegendConfig | false
|
|
10
|
+
|
|
11
|
+
/** Ternary codes. */
|
|
7
12
|
ternaryCodes?: [string, string, string]
|
|
13
|
+
/** No data fill style. */
|
|
8
14
|
noDataFillStyle?: string
|
|
15
|
+
/** Ternary settings. */
|
|
9
16
|
ternarySettings?: {
|
|
17
|
+
/** Hue. */
|
|
10
18
|
hue?: number
|
|
19
|
+
/** Chroma. */
|
|
11
20
|
chroma?: number
|
|
21
|
+
/** Lightness. */
|
|
12
22
|
lightness?: number
|
|
23
|
+
/** Contrast. */
|
|
13
24
|
contrast?: number
|
|
25
|
+
/** Spread. */
|
|
14
26
|
spread?: number
|
|
27
|
+
/** Breaks. */
|
|
15
28
|
breaks?: number
|
|
29
|
+
/** Mean centering. */
|
|
16
30
|
meanCentering?: boolean
|
|
17
31
|
}
|
|
18
32
|
}
|
|
@@ -2,20 +2,33 @@
|
|
|
2
2
|
* Statistical configuration for composition maps (pie, bar, waffle, stripe).
|
|
3
3
|
*/
|
|
4
4
|
export interface CompositionStatConfig {
|
|
5
|
+
/** Eurostat dataset code. */
|
|
5
6
|
eurostatDatasetCode?: string
|
|
7
|
+
/** Filters. */
|
|
6
8
|
filters?: Record<string, any>
|
|
9
|
+
/** Unit text. */
|
|
7
10
|
unitText?: string
|
|
11
|
+
transform?: (value: number) => number
|
|
8
12
|
|
|
13
|
+
/** Category parameter. */
|
|
9
14
|
categoryParameter?: string
|
|
15
|
+
/** Category codes. */
|
|
10
16
|
categoryCodes?: string[]
|
|
17
|
+
/** Category labels. */
|
|
11
18
|
categoryLabels?: string[]
|
|
19
|
+
/** Category colors. */
|
|
12
20
|
categoryColors?: string[]
|
|
21
|
+
/** Total code. */
|
|
13
22
|
totalCode?: string
|
|
14
23
|
|
|
15
|
-
|
|
24
|
+
/** Legacy nested API supported by buildStatCompositionMethod. */
|
|
16
25
|
stat?: {
|
|
26
|
+
/** Eurostat dataset code. */
|
|
17
27
|
eurostatDatasetCode?: string
|
|
28
|
+
/** Filters. */
|
|
18
29
|
filters?: Record<string, any>
|
|
30
|
+
/** Unit text. */
|
|
19
31
|
unitText?: string
|
|
32
|
+
transform?: (value: number) => number
|
|
20
33
|
}
|
|
21
34
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import type { MapInstance } from '../../../core/MapInstance'
|
|
2
2
|
import type { CompositionStatConfig } from '../CompositionStatConfig'
|
|
3
|
+
import type { BarChartLegendConfig } from '../../../legend/composition/BarChartLegendConfig'
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Bar map type.
|
|
6
7
|
*/
|
|
7
8
|
export interface BarMap extends MapInstance {
|
|
9
|
+
legend(): BarChartLegendConfig
|
|
10
|
+
legend(config: BarChartLegendConfig | false): this
|
|
11
|
+
|
|
8
12
|
barType(): 'stacked' | 'grouped'
|
|
9
13
|
barType(v: 'stacked' | 'grouped'): this
|
|
10
14
|
|
|
@@ -65,9 +69,6 @@ export interface BarMap extends MapInstance {
|
|
|
65
69
|
dorling(): boolean
|
|
66
70
|
dorling(v: boolean): this
|
|
67
71
|
|
|
68
|
-
animateDorling(): boolean
|
|
69
|
-
animateDorling(v: boolean): this
|
|
70
|
-
|
|
71
72
|
barTotalCode(): string | undefined
|
|
72
73
|
barTotalCode(v: string | undefined): this
|
|
73
74
|
|
|
@@ -1,30 +1,54 @@
|
|
|
1
1
|
import type { MapConfig } from '../../../core/MapConfig'
|
|
2
|
+
import type { BarChartLegendConfig } from '../../../legend/composition/BarChartLegendConfig'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Configuration for bar chart composition maps.
|
|
5
6
|
*/
|
|
6
7
|
export interface BarMapConfig extends MapConfig {
|
|
8
|
+
/** Bar type. */
|
|
7
9
|
barType?: 'stacked' | 'grouped'
|
|
10
|
+
/** Cat colors. */
|
|
8
11
|
catColors?: Record<string, string>
|
|
12
|
+
/** Cat labels. */
|
|
9
13
|
catLabels?: Record<string, string>
|
|
14
|
+
/** Show only when complete. */
|
|
10
15
|
showOnlyWhenComplete?: boolean
|
|
16
|
+
/** No data fill style. */
|
|
11
17
|
noDataFillStyle?: string
|
|
18
|
+
/** Bar min width. */
|
|
12
19
|
barMinWidth?: number
|
|
20
|
+
/** Bar max width. */
|
|
13
21
|
barMaxWidth?: number
|
|
22
|
+
/** Bar height. */
|
|
14
23
|
barHeight?: number
|
|
24
|
+
/** Bar group width. */
|
|
15
25
|
barGroupWidth?: number
|
|
26
|
+
/** Bar group gap. */
|
|
16
27
|
barGroupGap?: number
|
|
28
|
+
/** Bar group min height. */
|
|
17
29
|
barGroupMinHeight?: number
|
|
30
|
+
/** Bar group max height. */
|
|
18
31
|
barGroupMaxHeight?: number
|
|
32
|
+
/** Bar stroke fill. */
|
|
19
33
|
barStrokeFill?: string
|
|
34
|
+
/** Bar stroke width. */
|
|
20
35
|
barStrokeWidth?: number
|
|
36
|
+
/** Bar corner radius. */
|
|
21
37
|
barCornerRadius?: number
|
|
38
|
+
/** Bar other color. */
|
|
22
39
|
barOtherColor?: string
|
|
40
|
+
/** Bar other text. */
|
|
23
41
|
barOtherText?: string
|
|
42
|
+
/** Bar tooltip width. */
|
|
24
43
|
barTooltipWidth?: number
|
|
44
|
+
/** Bar tooltip height. */
|
|
25
45
|
barTooltipHeight?: number
|
|
46
|
+
/** Dorling. */
|
|
26
47
|
dorling?: boolean
|
|
27
|
-
|
|
48
|
+
/** Bar total code. */
|
|
28
49
|
barTotalCode?: string
|
|
50
|
+
/** Stat codes. */
|
|
29
51
|
statCodes?: string[]
|
|
52
|
+
/** Legend. */
|
|
53
|
+
legend?: BarChartLegendConfig | false
|
|
30
54
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import type { MapInstance } from '../../../core/MapInstance'
|
|
2
2
|
import type { CoxcombStatConfig } from './CoxcombStatConfig'
|
|
3
|
+
import type { CoxcombLegendConfig } from '../../../legend/composition/CoxcombLegendConfig'
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Coxcomb map type.
|
|
6
7
|
*/
|
|
7
8
|
export interface CoxcombMap extends MapInstance {
|
|
9
|
+
legend(): CoxcombLegendConfig
|
|
10
|
+
legend(config: CoxcombLegendConfig | false): this
|
|
11
|
+
|
|
8
12
|
catColors(): any
|
|
9
13
|
catColors(v: any): this
|
|
10
14
|
|
|
@@ -1,18 +1,32 @@
|
|
|
1
1
|
import type { MapConfig } from '../../../core/MapConfig'
|
|
2
|
+
import type { CoxcombLegendConfig } from '../../../legend/composition/CoxcombLegendConfig'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Configuration for coxcomb (polar area) chart maps.
|
|
5
6
|
*/
|
|
6
7
|
export interface CoxcombMapConfig extends MapConfig {
|
|
8
|
+
/** Coxcomb min radius. */
|
|
7
9
|
coxcombMinRadius?: number
|
|
10
|
+
/** Coxcomb max radius. */
|
|
8
11
|
coxcombMaxRadius?: number
|
|
12
|
+
/** Coxcomb stroke fill. */
|
|
9
13
|
coxcombStrokeFill?: string
|
|
14
|
+
/** Coxcomb stroke width. */
|
|
10
15
|
coxcombStrokeWidth?: number
|
|
16
|
+
/** Coxcomb rings. */
|
|
11
17
|
coxcombRings?: boolean
|
|
18
|
+
/** Coxcomb offsets. */
|
|
12
19
|
coxcombOffsets?: { x: number; y: number }
|
|
20
|
+
/** Hover color. */
|
|
13
21
|
hoverColor?: string
|
|
22
|
+
/** Cat colors. */
|
|
14
23
|
catColors?: Record<string, string>
|
|
24
|
+
/** Cat labels. */
|
|
15
25
|
catLabels?: Record<string, string>
|
|
26
|
+
/** No data fill style. */
|
|
16
27
|
noDataFillStyle?: string
|
|
28
|
+
/** Classifier size. */
|
|
17
29
|
classifierSize?: any
|
|
30
|
+
/** Legend. */
|
|
31
|
+
legend?: CoxcombLegendConfig | false
|
|
18
32
|
}
|
|
@@ -4,11 +4,13 @@ import { CompositionStatConfig } from '../CompositionStatConfig'
|
|
|
4
4
|
* Statistical configuration for coxcomb maps.
|
|
5
5
|
*/
|
|
6
6
|
export interface CoxcombStatConfig extends CompositionStatConfig {
|
|
7
|
-
|
|
7
|
+
/** Eurostat path. */
|
|
8
8
|
timeParameter?: string
|
|
9
|
+
/** Times. */
|
|
9
10
|
times: string[]
|
|
11
|
+
/** Time labels. */
|
|
10
12
|
timeLabels?: string[]
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
/** Custom data path. */
|
|
13
15
|
customData?: Record<string, Record<string, Record<string, number>>>
|
|
14
16
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import type { MapInstance } from '../../../core/MapInstance'
|
|
2
2
|
import type { CompositionStatConfig } from '../CompositionStatConfig'
|
|
3
|
+
import type { PieChartLegendConfig } from '../../../legend/composition/PieChartLegendConfig'
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Pie map type.
|
|
6
7
|
*/
|
|
7
8
|
export interface PieMap extends MapInstance {
|
|
9
|
+
legend(): PieChartLegendConfig
|
|
10
|
+
legend(config: PieChartLegendConfig | false): this
|
|
11
|
+
|
|
8
12
|
catColors(): any
|
|
9
13
|
catColors(v: any): this
|
|
10
14
|
|
|
@@ -41,9 +45,6 @@ export interface PieMap extends MapInstance {
|
|
|
41
45
|
dorling(): boolean
|
|
42
46
|
dorling(v: boolean): this
|
|
43
47
|
|
|
44
|
-
animateDorling(): boolean
|
|
45
|
-
animateDorling(v: boolean): this
|
|
46
|
-
|
|
47
48
|
pieTotalCode(): string | undefined
|
|
48
49
|
pieTotalCode(v: string | undefined): this
|
|
49
50
|
|
|
@@ -52,11 +53,17 @@ export interface PieMap extends MapInstance {
|
|
|
52
53
|
|
|
53
54
|
statPie(config: CompositionStatConfig): this
|
|
54
55
|
statPie(
|
|
56
|
+
/** Config. */
|
|
55
57
|
config: CompositionStatConfig,
|
|
58
|
+
/** Category parameter. */
|
|
56
59
|
categoryParameter?: string,
|
|
60
|
+
/** Category codes. */
|
|
57
61
|
categoryCodes?: string[],
|
|
62
|
+
/** Category labels. */
|
|
58
63
|
categoryLabels?: string[],
|
|
64
|
+
/** Category colors. */
|
|
59
65
|
categoryColors?: string[],
|
|
66
|
+
/** Total code. */
|
|
60
67
|
totalCode?: string
|
|
61
68
|
): this
|
|
62
69
|
}
|
|
@@ -1,24 +1,42 @@
|
|
|
1
1
|
import type { MapConfig } from '../../../core/MapConfig'
|
|
2
|
+
import type { PieChartLegendConfig } from '../../../legend/composition/PieChartLegendConfig'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Configuration for pie chart composition maps.
|
|
5
6
|
*/
|
|
6
7
|
export interface PieMapConfig extends MapConfig {
|
|
8
|
+
/** Pie min radius. */
|
|
7
9
|
pieMinRadius?: number
|
|
10
|
+
/** Pie max radius. */
|
|
8
11
|
pieMaxRadius?: number
|
|
12
|
+
/** Pie chart inner radius. */
|
|
9
13
|
pieChartInnerRadius?: number
|
|
14
|
+
/** Pie stroke fill. */
|
|
10
15
|
pieStrokeFill?: string
|
|
16
|
+
/** Pie stroke width. */
|
|
11
17
|
pieStrokeWidth?: number
|
|
18
|
+
/** Tooltip pie radius. */
|
|
12
19
|
tooltipPieRadius?: number
|
|
20
|
+
/** Tooltip pie inner radius. */
|
|
13
21
|
tooltipPieInnerRadius?: number
|
|
22
|
+
/** Cat colors. */
|
|
14
23
|
catColors?: Record<string, string>
|
|
24
|
+
/** Cat labels. */
|
|
15
25
|
catLabels?: Record<string, string>
|
|
26
|
+
/** Pie other color. */
|
|
16
27
|
pieOtherColor?: string
|
|
28
|
+
/** Pie other text. */
|
|
17
29
|
pieOtherText?: string
|
|
30
|
+
/** Show only when complete. */
|
|
18
31
|
showOnlyWhenComplete?: boolean
|
|
32
|
+
/** No data fill style. */
|
|
19
33
|
noDataFillStyle?: string
|
|
34
|
+
/** Dorling. */
|
|
20
35
|
dorling?: boolean
|
|
21
|
-
|
|
36
|
+
/** Pie total code. */
|
|
22
37
|
pieTotalCode?: string
|
|
38
|
+
/** Stat codes. */
|
|
23
39
|
statCodes?: string[]
|
|
40
|
+
/** Legend. */
|
|
41
|
+
legend?: PieChartLegendConfig | false
|
|
24
42
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import type { MapInstance } from '../../../core/MapInstance'
|
|
2
2
|
import type { CompositionStatConfig } from '../CompositionStatConfig'
|
|
3
|
+
import type { StripeCompositionLegendConfig } from '../../../legend/composition/StripeCompositionLegendConfig'
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Stripe map type.
|
|
6
7
|
*/
|
|
7
8
|
export interface StripeMap extends MapInstance {
|
|
9
|
+
legend(): StripeCompositionLegendConfig
|
|
10
|
+
legend(config: StripeCompositionLegendConfig | false): this
|
|
11
|
+
|
|
8
12
|
stripeWidth(): number
|
|
9
13
|
stripeWidth(v: number): this
|
|
10
14
|
|
|
@@ -34,10 +38,15 @@ export interface StripeMap extends MapInstance {
|
|
|
34
38
|
|
|
35
39
|
statComp(config: CompositionStatConfig): this
|
|
36
40
|
statComp(
|
|
41
|
+
/** Config. */
|
|
37
42
|
config: CompositionStatConfig,
|
|
43
|
+
/** Category parameter. */
|
|
38
44
|
categoryParameter?: string,
|
|
45
|
+
/** Category codes. */
|
|
39
46
|
categoryCodes?: string[],
|
|
47
|
+
/** Category labels. */
|
|
40
48
|
categoryLabels?: string[],
|
|
49
|
+
/** Category colors. */
|
|
41
50
|
categoryColors?: string[]
|
|
42
51
|
): this
|
|
43
52
|
}
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import type { MapConfig } from '../../../core/MapConfig'
|
|
2
|
+
import type { StripeCompositionLegendConfig } from '../../../legend/composition/StripeCompositionLegendConfig'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Configuration for stripe composition maps.
|
|
5
6
|
*/
|
|
6
7
|
export interface StripeMapConfig extends MapConfig {
|
|
8
|
+
/** Stripe width. */
|
|
7
9
|
stripeWidth?: number
|
|
10
|
+
/** Stripe orientation. */
|
|
8
11
|
stripeOrientation?: number
|
|
12
|
+
/** Cat colors. */
|
|
9
13
|
catColors?: Record<string, string>
|
|
14
|
+
/** Cat labels. */
|
|
10
15
|
catLabels?: Record<string, string>
|
|
16
|
+
/** Show only when complete. */
|
|
11
17
|
showOnlyWhenComplete?: boolean
|
|
18
|
+
/** No data fill style. */
|
|
12
19
|
noDataFillStyle?: string
|
|
20
|
+
/** Pie chart radius. */
|
|
13
21
|
pieChartRadius?: number
|
|
22
|
+
/** Pie chart inner radius. */
|
|
14
23
|
pieChartInnerRadius?: number
|
|
24
|
+
/** Stat codes. */
|
|
15
25
|
statCodes?: string[]
|
|
26
|
+
/** Legend. */
|
|
27
|
+
legend?: StripeCompositionLegendConfig | false
|
|
16
28
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import type { MapInstance } from '../../../core/MapInstance'
|
|
2
2
|
import type { CompositionStatConfig } from '../CompositionStatConfig'
|
|
3
|
+
import type { WaffleLegendConfig } from '../../../legend/composition/WaffleLegendConfig'
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Waffle map type.
|
|
6
7
|
*/
|
|
7
8
|
export interface WaffleMap extends MapInstance {
|
|
9
|
+
legend(): WaffleLegendConfig
|
|
10
|
+
legend(config: WaffleLegendConfig | false): this
|
|
11
|
+
|
|
8
12
|
catColors(): any
|
|
9
13
|
catColors(v: any): this
|
|
10
14
|
|
|
@@ -50,9 +54,6 @@ export interface WaffleMap extends MapInstance {
|
|
|
50
54
|
dorling(): boolean
|
|
51
55
|
dorling(v: boolean): this
|
|
52
56
|
|
|
53
|
-
animateDorling(): boolean
|
|
54
|
-
animateDorling(v: boolean): this
|
|
55
|
-
|
|
56
57
|
waffleTotalCode(): string | undefined
|
|
57
58
|
waffleTotalCode(v: string | undefined): this
|
|
58
59
|
|
|
@@ -61,11 +62,17 @@ export interface WaffleMap extends MapInstance {
|
|
|
61
62
|
|
|
62
63
|
statWaffle(config: CompositionStatConfig): this
|
|
63
64
|
statWaffle(
|
|
65
|
+
/** Config. */
|
|
64
66
|
config: CompositionStatConfig,
|
|
67
|
+
/** Category parameter. */
|
|
65
68
|
categoryParameter?: string,
|
|
69
|
+
/** Category codes. */
|
|
66
70
|
categoryCodes?: string[],
|
|
71
|
+
/** Category labels. */
|
|
67
72
|
categoryLabels?: string[],
|
|
73
|
+
/** Category colors. */
|
|
68
74
|
categoryColors?: string[],
|
|
75
|
+
/** Total code. */
|
|
69
76
|
totalCode?: string
|
|
70
77
|
): this
|
|
71
78
|
}
|
|
@@ -1,25 +1,44 @@
|
|
|
1
1
|
import type { MapConfig } from '../../../core/MapConfig'
|
|
2
|
+
import type { WaffleLegendConfig } from '../../../legend/composition/WaffleLegendConfig'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Configuration for waffle chart composition maps.
|
|
5
6
|
*/
|
|
6
7
|
export interface WaffleMapConfig extends MapConfig {
|
|
8
|
+
/** Waffle min size. */
|
|
7
9
|
waffleMinSize?: number
|
|
10
|
+
/** Waffle max size. */
|
|
8
11
|
waffleMaxSize?: number
|
|
12
|
+
/** Waffle grid size. */
|
|
9
13
|
waffleGridSize?: number
|
|
14
|
+
/** Waffle cell padding. */
|
|
10
15
|
waffleCellPadding?: number
|
|
16
|
+
/** Waffle stroke fill. */
|
|
11
17
|
waffleStrokeFill?: string
|
|
18
|
+
/** Waffle stroke width. */
|
|
12
19
|
waffleStrokeWidth?: number
|
|
20
|
+
/** Waffle rounded corners. */
|
|
13
21
|
waffleRoundedCorners?: number
|
|
22
|
+
/** Waffle tooltip size. */
|
|
14
23
|
waffleTooltipSize?: number
|
|
24
|
+
/** Cat colors. */
|
|
15
25
|
catColors?: Record<string, string>
|
|
26
|
+
/** Cat labels. */
|
|
16
27
|
catLabels?: Record<string, string>
|
|
28
|
+
/** Waffle other color. */
|
|
17
29
|
waffleOtherColor?: string
|
|
30
|
+
/** Waffle other text. */
|
|
18
31
|
waffleOtherText?: string
|
|
32
|
+
/** Show only when complete. */
|
|
19
33
|
showOnlyWhenComplete?: boolean
|
|
34
|
+
/** No data fill style. */
|
|
20
35
|
noDataFillStyle?: string
|
|
36
|
+
/** Dorling. */
|
|
21
37
|
dorling?: boolean
|
|
22
|
-
|
|
38
|
+
/** Waffle total code. */
|
|
23
39
|
waffleTotalCode?: string
|
|
40
|
+
/** Stat codes. */
|
|
24
41
|
statCodes?: string[]
|
|
42
|
+
/** Legend. */
|
|
43
|
+
legend?: WaffleLegendConfig | false
|
|
25
44
|
}
|
|
@@ -4,10 +4,15 @@ import type { MapConfig } from '../../core/MapConfig'
|
|
|
4
4
|
* A flow node in the flow graph.
|
|
5
5
|
*/
|
|
6
6
|
export interface FlowNode {
|
|
7
|
+
/** Id. */
|
|
7
8
|
id: string
|
|
9
|
+
/** Name. */
|
|
8
10
|
name?: string
|
|
11
|
+
/** X. */
|
|
9
12
|
x?: number
|
|
13
|
+
/** Y. */
|
|
10
14
|
y?: number
|
|
15
|
+
/** Value. */
|
|
11
16
|
value?: number
|
|
12
17
|
[key: string]: any
|
|
13
18
|
}
|
|
@@ -16,10 +21,15 @@ export interface FlowNode {
|
|
|
16
21
|
* A flow link between two nodes.
|
|
17
22
|
*/
|
|
18
23
|
export interface FlowLink {
|
|
24
|
+
/** Source. */
|
|
19
25
|
source: string | FlowNode
|
|
26
|
+
/** Target. */
|
|
20
27
|
target: string | FlowNode
|
|
28
|
+
/** Value. */
|
|
21
29
|
value: number
|
|
30
|
+
/** Origin id. */
|
|
22
31
|
originId?: string
|
|
32
|
+
/** Dest id. */
|
|
23
33
|
destId?: string
|
|
24
34
|
[key: string]: any
|
|
25
35
|
}
|
|
@@ -28,7 +38,9 @@ export interface FlowLink {
|
|
|
28
38
|
* Graph input used by flow maps.
|
|
29
39
|
*/
|
|
30
40
|
export interface FlowGraph {
|
|
41
|
+
/** Nodes. */
|
|
31
42
|
nodes: FlowNode[]
|
|
43
|
+
/** Links. */
|
|
32
44
|
links: FlowLink[]
|
|
33
45
|
}
|
|
34
46
|
|
|
@@ -36,10 +48,15 @@ export interface FlowGraph {
|
|
|
36
48
|
* Curvature settings used for curved/sankey flow rendering.
|
|
37
49
|
*/
|
|
38
50
|
export interface FlowCurvatureSettings {
|
|
51
|
+
/** Gap x. */
|
|
39
52
|
gapX?: number
|
|
53
|
+
/** Pad x. */
|
|
40
54
|
padX?: number
|
|
55
|
+
/** Pad y. */
|
|
41
56
|
padY?: number
|
|
57
|
+
/** Bump y. */
|
|
42
58
|
bumpY?: number
|
|
59
|
+
/** Curvature. */
|
|
43
60
|
curvature?: number
|
|
44
61
|
}
|
|
45
62
|
|
|
@@ -47,10 +64,15 @@ export interface FlowCurvatureSettings {
|
|
|
47
64
|
* Width gradient settings for tapered flows.
|
|
48
65
|
*/
|
|
49
66
|
export interface FlowWidthGradientSettings {
|
|
67
|
+
/** Start ratio. */
|
|
50
68
|
startRatio?: number
|
|
69
|
+
/** Samples. */
|
|
51
70
|
samples?: number
|
|
71
|
+
/** Min start width. */
|
|
52
72
|
minStartWidth?: number
|
|
73
|
+
/** Cap end. */
|
|
53
74
|
capEnd?: boolean
|
|
75
|
+
/** Curvature follow. */
|
|
54
76
|
curvatureFollow?: boolean
|
|
55
77
|
}
|
|
56
78
|
|
|
@@ -58,10 +80,15 @@ export interface FlowWidthGradientSettings {
|
|
|
58
80
|
* Force settings for optional edge bundling.
|
|
59
81
|
*/
|
|
60
82
|
export interface FlowBundleSettings {
|
|
83
|
+
/** Alpha decay. */
|
|
61
84
|
alphaDecay?: number
|
|
85
|
+
/** Charge strength. */
|
|
62
86
|
chargeStrength?: number
|
|
87
|
+
/** Distance max. */
|
|
63
88
|
distanceMax?: number | null
|
|
89
|
+
/** Link strength. */
|
|
64
90
|
linkStrength?: number
|
|
91
|
+
/** Link iterations. */
|
|
65
92
|
linkIterations?: number
|
|
66
93
|
}
|
|
67
94
|
|
|
@@ -69,35 +96,63 @@ export interface FlowBundleSettings {
|
|
|
69
96
|
* Configuration for flow maps.
|
|
70
97
|
*/
|
|
71
98
|
export interface FlowMapConfig extends MapConfig {
|
|
99
|
+
/** Flow graph. */
|
|
72
100
|
flowGraph?: FlowGraph
|
|
73
101
|
|
|
102
|
+
/** Flow color. */
|
|
74
103
|
flowColor?: string
|
|
104
|
+
/** Flow region colors. */
|
|
75
105
|
flowRegionColors?: string[]
|
|
106
|
+
/** Flow region labels. */
|
|
76
107
|
flowRegionLabels?: string[]
|
|
108
|
+
/** Flow arrows. */
|
|
77
109
|
flowArrows?: boolean
|
|
110
|
+
/** Flow arrow scale. */
|
|
78
111
|
flowArrowScale?: number
|
|
112
|
+
/** Flow max width. */
|
|
79
113
|
flowMaxWidth?: number
|
|
114
|
+
/** Flow min width. */
|
|
80
115
|
flowMinWidth?: number
|
|
116
|
+
/** Flow outlines. */
|
|
81
117
|
flowOutlines?: boolean
|
|
118
|
+
/** Flow outline width. */
|
|
82
119
|
flowOutlineWidth?: number
|
|
120
|
+
/** Flow outline color. */
|
|
83
121
|
flowOutlineColor?: string
|
|
122
|
+
/** Flow color gradient. */
|
|
84
123
|
flowColorGradient?: boolean
|
|
124
|
+
/** Flow stack. */
|
|
85
125
|
flowStack?: boolean
|
|
126
|
+
/** Flow nodes. */
|
|
86
127
|
flowNodes?: boolean
|
|
128
|
+
/** Flow node type. */
|
|
87
129
|
flowNodeType?: 'circle' | 'donut'
|
|
130
|
+
/** Flow label offsets. */
|
|
88
131
|
flowLabelOffsets?: { x?: number; y?: number }
|
|
132
|
+
/** Flow line type. */
|
|
89
133
|
flowLineType?: 'curved' | 'straight' | 'sankey'
|
|
90
134
|
flowNodeSizeScale?: (value: number) => number
|
|
135
|
+
/** Flow opacity. */
|
|
91
136
|
flowOpacity?: number
|
|
137
|
+
/** Flow internal. */
|
|
92
138
|
flowInternal?: boolean
|
|
139
|
+
/** Flow top locations. */
|
|
93
140
|
flowTopLocations?: number
|
|
141
|
+
/** Flow top locations type. */
|
|
94
142
|
flowTopLocationsType?: 'sum' | 'origin' | 'destination'
|
|
143
|
+
/** Flow curvature settings. */
|
|
95
144
|
flowCurvatureSettings?: FlowCurvatureSettings
|
|
96
145
|
flowOrder?: (a: any, b: any) => number
|
|
146
|
+
/** Flow width gradient. */
|
|
97
147
|
flowWidthGradient?: boolean
|
|
148
|
+
/** Flow opacity gradient. */
|
|
98
149
|
flowOpacityGradient?: boolean
|
|
150
|
+
/** Flow width gradient settings. */
|
|
99
151
|
flowWidthGradientSettings?: FlowWidthGradientSettings
|
|
152
|
+
/** Flow bidirectional. */
|
|
100
153
|
flowBidirectional?: boolean
|
|
154
|
+
/** Flow edge bundling. */
|
|
101
155
|
flowEdgeBundling?: boolean
|
|
156
|
+
/** Flow bundle settings. */
|
|
102
157
|
flowBundleSettings?: FlowBundleSettings
|
|
103
158
|
}
|