eurostat-map 4.4.4 → 4.5.0
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 +177 -148
- package/build/215.eurostatmap.min.js +1 -1
- package/build/eurostatmap.js +19934 -15872
- package/build/eurostatmap.min.js +2 -2
- package/build/eurostatmap.min.js.map +1 -1
- package/build/package.json +87 -87
- package/build/types/core/GridCartogramSettings.d.ts +33 -0
- package/build/types/core/MapConfig.d.ts +13 -2
- package/build/types/core/MapInstance.d.ts +80 -4
- package/build/types/core/encoding/EncodingConfig.d.ts +31 -0
- package/build/types/core/layer/Layer.d.ts +31 -0
- package/build/types/core/layer/LayerConfig.d.ts +19 -0
- package/build/types/core/layer/LayerRole.d.ts +1 -0
- package/build/types/core/locations.d.ts +44 -16
- package/build/types/core/stat/StatConfig.d.ts +7 -0
- package/build/types/index.d.ts +39 -33
- package/build/types/layers/CategoricalMap.d.ts +21 -0
- package/build/types/layers/CategoricalMapConfig.d.ts +11 -0
- package/build/types/layers/MapType.d.ts +34 -0
- package/build/types/layers/choropleth/BivariateChoroplethConfig.d.ts +27 -0
- package/build/types/layers/choropleth/BivariateChoroplethMap.d.ts +39 -0
- package/build/types/layers/choropleth/ChoroplethConfig.d.ts +39 -0
- package/build/types/layers/choropleth/ChoroplethMap.d.ts +48 -0
- package/build/types/layers/choropleth/TrivariateChoroplethConfig.d.ts +41 -0
- package/build/types/layers/choropleth/TrivariateChoroplethMap.d.ts +18 -0
- package/build/types/layers/choropleth/ValueByAlphaConfig.d.ts +8 -0
- package/build/types/layers/choropleth/ValueByAlphaMap.d.ts +9 -0
- package/build/types/layers/composition/CompositionStatConfig.d.ts +59 -0
- package/build/types/layers/composition/bar/BarMap.d.ts +97 -0
- package/build/types/layers/composition/bar/BarMapConfig.d.ts +76 -0
- package/build/types/layers/composition/coxcomb/CoxcombMap.d.ts +75 -0
- package/build/types/layers/composition/coxcomb/CoxcombMapConfig.d.ts +47 -0
- package/build/types/layers/composition/coxcomb/CoxcombStatConfig.d.ts +13 -0
- package/build/types/layers/composition/pie/PieMap.d.ts +84 -0
- package/build/types/layers/composition/pie/PieMapConfig.d.ts +50 -0
- package/build/types/layers/composition/stripe/StripeMap.d.ts +80 -0
- package/build/types/layers/composition/stripe/StripeMapConfig.d.ts +45 -0
- package/build/types/layers/composition/waffle/WaffleMap.d.ts +124 -0
- package/build/types/layers/composition/waffle/WaffleMapConfig.d.ts +58 -0
- package/build/types/layers/flow/FlowMap.d.ts +218 -0
- package/build/types/layers/flow/FlowMapConfig.d.ts +220 -0
- package/build/types/layers/proportional-symbol/ProportionalSymbolConfig.d.ts +47 -0
- package/build/types/layers/proportional-symbol/ProportionalSymbolMap.d.ts +94 -0
- package/build/types/layers/proportional-symbol/mushroom/MushroomMap.d.ts +67 -0
- package/build/types/layers/proportional-symbol/mushroom/MushroomMapConfig.d.ts +39 -0
- package/build/types/layers/spark/SparkMap.d.ts +56 -0
- package/build/types/layers/spark/SparkMapConfig.d.ts +75 -0
- package/build/types/layers/spark/SparkStatConfig.d.ts +33 -0
- package/build/types/legend/LegendConfig.d.ts +3 -0
- package/build/types/legend/choropleth/BivariateLegendConfig.d.ts +79 -0
- package/build/types/map-types/choropleth/TrivariateChoroplethConfig.d.ts +25 -16
- package/build/types/map-types/choropleth/TrivariateChoroplethMap.d.ts +5 -2
- package/build/types/map-types/composition/CompositionStatConfig.d.ts +7 -0
- package/build/types/map-types/composition/bar/BarMap.d.ts +97 -79
- package/build/types/map-types/composition/bar/BarMapConfig.d.ts +76 -54
- package/build/types/map-types/composition/coxcomb/CoxcombMap.d.ts +29 -0
- package/build/types/map-types/composition/coxcomb/CoxcombMapConfig.d.ts +15 -0
- package/build/types/map-types/composition/pie/PieMap.d.ts +5 -5
- package/build/types/map-types/composition/pie/PieMapConfig.d.ts +2 -0
- package/build/types/map-types/composition/stripe/StripeMap.d.ts +19 -2
- package/build/types/map-types/composition/stripe/StripeMapConfig.d.ts +11 -0
- package/build/types/map-types/composition/waffle/WaffleMap.d.ts +46 -0
- package/build/types/map-types/composition/waffle/WaffleMapConfig.d.ts +24 -10
- package/build/types/map-types/flow/FlowMap.d.ts +121 -0
- package/build/types/map-types/flow/FlowMapConfig.d.ts +62 -0
- package/build/types/map-types/proportional-symbol/ProportionalSymbolConfig.d.ts +30 -0
- package/build/types/map-types/proportional-symbol/ProportionalSymbolMap.d.ts +4 -0
- package/build/types/map-types/proportional-symbol/mushroom/MushroomMap.d.ts +37 -0
- package/build/types/map-types/proportional-symbol/mushroom/MushroomMapConfig.d.ts +19 -0
- package/build/types/map-types/spark/SparkMap.d.ts +4 -0
- package/build/types/map-types/spark/SparkMapConfig.d.ts +32 -0
- package/package.json +6 -3
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { MapInstance } from '../../core/MapInstance'
|
|
2
|
+
import type { SparkStatConfig } from './SparkStatConfig'
|
|
3
|
+
import type { SparklineLegendConfig } from '../../legend/composition/SparklineLegendConfig'
|
|
4
|
+
import type { SparkSettings } from './SparkMapConfig'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Spark map type.
|
|
8
|
+
*/
|
|
9
|
+
export interface SparkMap extends MapInstance {
|
|
10
|
+
sparkSettings(): SparkSettings
|
|
11
|
+
sparkSettings(v: SparkSettings): this
|
|
12
|
+
|
|
13
|
+
legend(): SparklineLegendConfig | false
|
|
14
|
+
legend(config: SparklineLegendConfig | false): this
|
|
15
|
+
|
|
16
|
+
sparkLineColor(): any
|
|
17
|
+
sparkLineColor(v: any): this
|
|
18
|
+
|
|
19
|
+
showOnlyWhenComplete(): boolean
|
|
20
|
+
showOnlyWhenComplete(v: boolean): this
|
|
21
|
+
|
|
22
|
+
sparkType(): 'line' | 'area' | 'bar'
|
|
23
|
+
sparkType(v: 'line' | 'area' | 'bar'): this
|
|
24
|
+
|
|
25
|
+
sparkLineWidth(): number
|
|
26
|
+
sparkLineWidth(v: number): this
|
|
27
|
+
|
|
28
|
+
sparkLineHeight(): number
|
|
29
|
+
sparkLineHeight(v: number): this
|
|
30
|
+
|
|
31
|
+
sparkLineStrokeWidth(): number
|
|
32
|
+
sparkLineStrokeWidth(v: number): this
|
|
33
|
+
|
|
34
|
+
sparkLineOpacity(): number
|
|
35
|
+
sparkLineOpacity(v: number): this
|
|
36
|
+
|
|
37
|
+
sparkLineCircleRadius(): number
|
|
38
|
+
sparkLineCircleRadius(v: number): this
|
|
39
|
+
|
|
40
|
+
sparkLineAreaColor(): any
|
|
41
|
+
sparkLineAreaColor(v: any): this
|
|
42
|
+
|
|
43
|
+
sparkTooltipChart(): any
|
|
44
|
+
sparkTooltipChart(v: any): this
|
|
45
|
+
|
|
46
|
+
sparkLineChartFunction(): any
|
|
47
|
+
sparkLineChartFunction(v: any): this
|
|
48
|
+
|
|
49
|
+
sparkLineOffsets(): { x: number; y: number }
|
|
50
|
+
sparkLineOffsets(v: { x: number; y: number }): this
|
|
51
|
+
|
|
52
|
+
/** Manually set sparkline data instead of fetching it from Eurostat. */
|
|
53
|
+
sparklineData(dataObject: Record<string, Record<string, number>>): this
|
|
54
|
+
/** Configure fetching data from Eurostat and generating spark lines. */
|
|
55
|
+
statSpark(config: SparkStatConfig): this
|
|
56
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { MapConfig } from '../../core/MapConfig'
|
|
2
|
+
import type { SparklineLegendConfig } from '../../legend/composition/SparklineLegendConfig'
|
|
3
|
+
|
|
4
|
+
export interface SparkSettings {
|
|
5
|
+
type?: 'line' | 'area' | 'bar'
|
|
6
|
+
lineOffsets?: { x: number; y: number }
|
|
7
|
+
lineWidth?: number
|
|
8
|
+
lineHeight?: number
|
|
9
|
+
lineStrokeWidth?: number
|
|
10
|
+
lineOpacity?: number
|
|
11
|
+
lineColor?: string | ((value: number, index: number, data: any[]) => string)
|
|
12
|
+
areaColor?: string | ((value: number, index: number, data: any[]) => string)
|
|
13
|
+
lineCircleRadius?: number
|
|
14
|
+
tooltipChart?: {
|
|
15
|
+
width: number
|
|
16
|
+
height: number
|
|
17
|
+
margin: { left: number; right: number; top: number; bottom: number }
|
|
18
|
+
circleRadius: number
|
|
19
|
+
}
|
|
20
|
+
lineChartFunction?: (node: any, data: any[], width: number, height: number, isForTooltip?: boolean) => void
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Configuration for sparkline maps.
|
|
25
|
+
*/
|
|
26
|
+
export interface SparkMapConfig extends MapConfig {
|
|
27
|
+
/** Grouped sparkline rendering settings. */
|
|
28
|
+
sparkSettings?: SparkSettings
|
|
29
|
+
|
|
30
|
+
/** Spark type. */
|
|
31
|
+
sparkType?: 'line' | 'area' | 'bar'
|
|
32
|
+
|
|
33
|
+
/** Object-form stat configuration for temporal sparkline datasets. */
|
|
34
|
+
dates?: string[]
|
|
35
|
+
labels?: string[]
|
|
36
|
+
eurostatDatasetCode?: string
|
|
37
|
+
customData?: Record<string, Record<string, number>>
|
|
38
|
+
filters?: Record<string, any>
|
|
39
|
+
unitText?: string
|
|
40
|
+
preprocess?: (regionId: string, value: any) => any
|
|
41
|
+
transform?: (value: any) => any
|
|
42
|
+
|
|
43
|
+
sparkLineColor?: string | ((value: number, index: number, data: any[]) => string)
|
|
44
|
+
sparkAreaColor?: string | ((value: number, index: number, data: any[]) => string)
|
|
45
|
+
/** Spark line width. */
|
|
46
|
+
sparkLineWidth?: number
|
|
47
|
+
/** Spark line height. */
|
|
48
|
+
sparkLineHeight?: number
|
|
49
|
+
/** Spark line stroke width. */
|
|
50
|
+
sparkLineStrokeWidth?: number
|
|
51
|
+
/** Spark line opacity. */
|
|
52
|
+
sparkLineOpacity?: number
|
|
53
|
+
/** Spark line circle radius. */
|
|
54
|
+
sparkLineCircleRadius?: number
|
|
55
|
+
/** Spark tooltip chart. */
|
|
56
|
+
sparkTooltipChart?: {
|
|
57
|
+
/** Width. */
|
|
58
|
+
width: number
|
|
59
|
+
/** Height. */
|
|
60
|
+
height: number
|
|
61
|
+
/** Margin. */
|
|
62
|
+
margin: { left: number; right: number; top: number; bottom: number }
|
|
63
|
+
/** Circle radius. */
|
|
64
|
+
circleRadius: number
|
|
65
|
+
}
|
|
66
|
+
/** Spark line offsets. */
|
|
67
|
+
sparkLineOffsets?: { x: number; y: number }
|
|
68
|
+
/** Show only when complete. */
|
|
69
|
+
showOnlyWhenComplete?: boolean
|
|
70
|
+
sparkLineChartFunction?: (node: any, data: any[], width: number, height: number, isForTooltip?: boolean) => void
|
|
71
|
+
/** Spark yscale. */
|
|
72
|
+
sparkYScale?: any
|
|
73
|
+
/** Legend. */
|
|
74
|
+
legend?: SparklineLegendConfig | false
|
|
75
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Statistical configuration for sparkline maps.
|
|
3
|
+
*
|
|
4
|
+
* Either `eurostatDatasetCode` + `dates` (Eurostat API path)
|
|
5
|
+
* or `customData` (custom data path) must be provided.
|
|
6
|
+
*/
|
|
7
|
+
export interface SparkStatConfig {
|
|
8
|
+
/**
|
|
9
|
+
* Custom data keyed by region ID then date string.
|
|
10
|
+
* Use instead of `eurostatDatasetCode` when supplying data directly.
|
|
11
|
+
* When `customData` is set, `eurostatDatasetCode` is not required;
|
|
12
|
+
* `dates` defaults to the key order of the first region's entries.
|
|
13
|
+
* @example
|
|
14
|
+
* customData: {
|
|
15
|
+
* ES: { '2020': 100, '2021': 120, '2022': 115 },
|
|
16
|
+
* DE: { '2020': 200, '2021': 190, '2022': 210 },
|
|
17
|
+
* }
|
|
18
|
+
*/
|
|
19
|
+
customData?: Record<string, Record<string, number>>
|
|
20
|
+
|
|
21
|
+
/** Eurostat dataset code. Required when not using `customData`. */
|
|
22
|
+
eurostatDatasetCode?: string
|
|
23
|
+
/** Filters. */
|
|
24
|
+
filters?: Record<string, any>
|
|
25
|
+
/** Unit text. */
|
|
26
|
+
unitText?: string
|
|
27
|
+
preprocess?: (regionId: string, value: any) => any
|
|
28
|
+
transform?: (value: number) => number
|
|
29
|
+
/** Date keys to fetch. Required when not using `customData`. */
|
|
30
|
+
dates?: string[]
|
|
31
|
+
/** Display labels for each date. */
|
|
32
|
+
labels?: string[]
|
|
33
|
+
}
|
|
@@ -6,6 +6,8 @@ export interface LegendConfig {
|
|
|
6
6
|
x?: number
|
|
7
7
|
/** Legend origin y-coordinate in pixels. */
|
|
8
8
|
y?: number
|
|
9
|
+
/** Automatically position the legend in a map corner. Manual x/y coordinates take precedence. */
|
|
10
|
+
position?: 'top right' | 'bottom right' | 'top left' | 'bottom left'
|
|
9
11
|
/** Legend width in pixels. */
|
|
10
12
|
width?: number
|
|
11
13
|
/** Legend height in pixels. */
|
|
@@ -65,4 +67,5 @@ export interface LegendConfig {
|
|
|
65
67
|
maxMin?: boolean
|
|
66
68
|
/** Text affixes for min/max labels as [minSuffix, maxSuffix]. */
|
|
67
69
|
maxMinLabels?: [string, string]
|
|
70
|
+
layer?: any
|
|
68
71
|
}
|
|
@@ -56,4 +56,83 @@ export interface BivariateLegendConfig extends LegendConfig {
|
|
|
56
56
|
|
|
57
57
|
/** Padding between arrow and axis label in pixels. @default 10 */
|
|
58
58
|
arrowPadding?: number
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Labels displayed at low/high ends of each axis.
|
|
62
|
+
* @default { x: { low: 'Low', high: 'High' }, y: { low: 'Low', high: 'High' } }
|
|
63
|
+
*/
|
|
64
|
+
axisExtremes?: {
|
|
65
|
+
x?: { low?: string; high?: string }
|
|
66
|
+
y?: { low?: string; high?: string }
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** Whether to show low/high endpoint labels on both axes. @default true */
|
|
70
|
+
showAxisExtremes?: boolean
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Optional text annotations for each corner of the bivariate square.
|
|
74
|
+
* Add text for any combination of topRight, bottomRight, bottomLeft, topLeft.
|
|
75
|
+
* Supports line breaks using '<br>'/'<br/>' or '\\n'.
|
|
76
|
+
*/
|
|
77
|
+
annotations?: {
|
|
78
|
+
topRight?: string
|
|
79
|
+
bottomRight?: string
|
|
80
|
+
bottomLeft?: string
|
|
81
|
+
topLeft?: string
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Length of corner annotation callout lines in pixels.
|
|
86
|
+
* Can be a single number for all corners, or per-corner values.
|
|
87
|
+
* @default 18
|
|
88
|
+
*/
|
|
89
|
+
annotationLineLength?:
|
|
90
|
+
| number
|
|
91
|
+
| {
|
|
92
|
+
topRight?: number
|
|
93
|
+
bottomRight?: number
|
|
94
|
+
bottomLeft?: number
|
|
95
|
+
topLeft?: number
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Annotation text offsets in pixels.
|
|
100
|
+
* Use global `{ x, y }` or per-corner values.
|
|
101
|
+
* @default auto (based on corner direction)
|
|
102
|
+
*/
|
|
103
|
+
annotationOffsets?:
|
|
104
|
+
| { x?: number; y?: number }
|
|
105
|
+
| {
|
|
106
|
+
topRight?: { x?: number; y?: number }
|
|
107
|
+
bottomRight?: { x?: number; y?: number }
|
|
108
|
+
bottomLeft?: { x?: number; y?: number }
|
|
109
|
+
topLeft?: { x?: number; y?: number }
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Extra offset applied to the leader-line endpoint where it meets the annotation label.
|
|
114
|
+
* Use global `{ x, y }` or per-corner values.
|
|
115
|
+
* @default { x: 0, y: 0 }
|
|
116
|
+
*/
|
|
117
|
+
annotationLineEndOffset?:
|
|
118
|
+
| { x?: number; y?: number }
|
|
119
|
+
| {
|
|
120
|
+
topRight?: { x?: number; y?: number }
|
|
121
|
+
bottomRight?: { x?: number; y?: number }
|
|
122
|
+
bottomLeft?: { x?: number; y?: number }
|
|
123
|
+
topLeft?: { x?: number; y?: number }
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @deprecated Use annotationOffsets instead.
|
|
128
|
+
* Radial padding between corner annotation callout line end and text in pixels.
|
|
129
|
+
*/
|
|
130
|
+
annotationPadding?:
|
|
131
|
+
| number
|
|
132
|
+
| {
|
|
133
|
+
topRight?: number
|
|
134
|
+
bottomRight?: number
|
|
135
|
+
bottomLeft?: number
|
|
136
|
+
topLeft?: number
|
|
137
|
+
}
|
|
59
138
|
}
|
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
import type { MapConfig } from '../../core/MapConfig'
|
|
2
2
|
import type { TrivariateLegendConfig } from '../../legend/choropleth/TrivariateLegendConfig'
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Ternary color settings for trivariate choropleth maps.
|
|
6
|
+
*/
|
|
7
|
+
export interface TrivariateTernarySettings {
|
|
8
|
+
/** Use sextant color mapping instead of continuous tricolore. */
|
|
9
|
+
sextant?: boolean
|
|
10
|
+
/** Array of 6 colors used when sextant mode is enabled. */
|
|
11
|
+
sextantColors?: [string, string, string, string, string, string]
|
|
12
|
+
/** Hue. */
|
|
13
|
+
hue?: number
|
|
14
|
+
/** Chroma. */
|
|
15
|
+
chroma?: number
|
|
16
|
+
/** Lightness. */
|
|
17
|
+
lightness?: number
|
|
18
|
+
/** Contrast. */
|
|
19
|
+
contrast?: number
|
|
20
|
+
/** Spread. */
|
|
21
|
+
spread?: number
|
|
22
|
+
/** Breaks. */
|
|
23
|
+
breaks?: number
|
|
24
|
+
/** Mean centering. */
|
|
25
|
+
meanCentering?: boolean
|
|
26
|
+
}
|
|
27
|
+
|
|
4
28
|
/**
|
|
5
29
|
* Configuration for trivariate choropleth maps.
|
|
6
30
|
*/
|
|
@@ -13,20 +37,5 @@ export interface TrivariateChoroplethConfig extends MapConfig {
|
|
|
13
37
|
/** No data fill style. */
|
|
14
38
|
noDataFillStyle?: string
|
|
15
39
|
/** Ternary settings. */
|
|
16
|
-
ternarySettings?:
|
|
17
|
-
/** Hue. */
|
|
18
|
-
hue?: number
|
|
19
|
-
/** Chroma. */
|
|
20
|
-
chroma?: number
|
|
21
|
-
/** Lightness. */
|
|
22
|
-
lightness?: number
|
|
23
|
-
/** Contrast. */
|
|
24
|
-
contrast?: number
|
|
25
|
-
/** Spread. */
|
|
26
|
-
spread?: number
|
|
27
|
-
/** Breaks. */
|
|
28
|
-
breaks?: number
|
|
29
|
-
/** Mean centering. */
|
|
30
|
-
meanCentering?: boolean
|
|
31
|
-
}
|
|
40
|
+
ternarySettings?: TrivariateTernarySettings
|
|
32
41
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { MapInstance } from '../../core/MapInstance'
|
|
2
|
+
import type { TrivariateChoroplethConfig, TrivariateTernarySettings } from './TrivariateChoroplethConfig'
|
|
3
|
+
|
|
4
|
+
type TernarySettings = TrivariateTernarySettings
|
|
2
5
|
|
|
3
6
|
/**
|
|
4
7
|
* Trivariate choropleth map type.
|
|
@@ -10,6 +13,6 @@ export interface TrivariateChoroplethMap extends MapInstance {
|
|
|
10
13
|
noDataFillStyle(): string
|
|
11
14
|
noDataFillStyle(v: string): this
|
|
12
15
|
|
|
13
|
-
ternarySettings():
|
|
14
|
-
ternarySettings(v:
|
|
16
|
+
ternarySettings(): TernarySettings
|
|
17
|
+
ternarySettings(v: Partial<TernarySettings>): this
|
|
15
18
|
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Statistical configuration for composition maps (pie, bar, waffle, stripe).
|
|
3
3
|
*
|
|
4
|
+
* Preferred API:
|
|
5
|
+
* - `map.stat('composition', { ... })`
|
|
6
|
+
* - `map.encoding('composition', { stat: 'composition' })`
|
|
7
|
+
*
|
|
4
8
|
* Either `eurostatDatasetCode` + `categoryParameter` (Eurostat API path)
|
|
5
9
|
* or `customData` (custom data path) must be provided.
|
|
10
|
+
*
|
|
11
|
+
* Legacy positional signatures in `statPie/statWaffle/statBar/statStripe` and
|
|
12
|
+
* `map.stat('composition', config, categoryParameter, ...)` remain supported.
|
|
6
13
|
*/
|
|
7
14
|
export interface CompositionStatConfig<TCustomData = Record<string, Record<string, number>>> {
|
|
8
15
|
/**
|
|
@@ -1,79 +1,97 @@
|
|
|
1
|
-
import type { MapInstance } from '../../../core/MapInstance'
|
|
2
|
-
import type { CompositionStatConfig } from '../CompositionStatConfig'
|
|
3
|
-
import type { BarChartLegendConfig } from '../../../legend/composition/BarChartLegendConfig'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Bar map type.
|
|
7
|
-
*/
|
|
8
|
-
export interface BarMap extends MapInstance {
|
|
9
|
-
legend(): BarChartLegendConfig | false
|
|
10
|
-
legend(config: BarChartLegendConfig | false): this
|
|
11
|
-
|
|
12
|
-
barType(): 'stacked' | 'grouped'
|
|
13
|
-
barType(v: 'stacked' | 'grouped'): this
|
|
14
|
-
|
|
15
|
-
catColors(): any
|
|
16
|
-
catColors(v: any): this
|
|
17
|
-
|
|
18
|
-
catLabels(): any
|
|
19
|
-
catLabels(v: any): this
|
|
20
|
-
|
|
21
|
-
showOnlyWhenComplete(): boolean
|
|
22
|
-
showOnlyWhenComplete(v: boolean): this
|
|
23
|
-
|
|
24
|
-
noDataFillStyle(): string
|
|
25
|
-
noDataFillStyle(v: string): this
|
|
26
|
-
|
|
27
|
-
barMaxWidth(): number
|
|
28
|
-
barMaxWidth(v: number): this
|
|
29
|
-
|
|
30
|
-
barMinWidth(): number
|
|
31
|
-
barMinWidth(v: number): this
|
|
32
|
-
|
|
33
|
-
barHeight(): number
|
|
34
|
-
barHeight(v: number): this
|
|
35
|
-
|
|
36
|
-
barGroupWidth(): number
|
|
37
|
-
barGroupWidth(v: number): this
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
1
|
+
import type { MapInstance } from '../../../core/MapInstance'
|
|
2
|
+
import type { CompositionStatConfig } from '../CompositionStatConfig'
|
|
3
|
+
import type { BarChartLegendConfig } from '../../../legend/composition/BarChartLegendConfig'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Bar map type.
|
|
7
|
+
*/
|
|
8
|
+
export interface BarMap extends MapInstance {
|
|
9
|
+
legend(): BarChartLegendConfig | false
|
|
10
|
+
legend(config: BarChartLegendConfig | false): this
|
|
11
|
+
|
|
12
|
+
barType(): 'stacked' | 'grouped'
|
|
13
|
+
barType(v: 'stacked' | 'grouped'): this
|
|
14
|
+
|
|
15
|
+
catColors(): any
|
|
16
|
+
catColors(v: any): this
|
|
17
|
+
|
|
18
|
+
catLabels(): any
|
|
19
|
+
catLabels(v: any): this
|
|
20
|
+
|
|
21
|
+
showOnlyWhenComplete(): boolean
|
|
22
|
+
showOnlyWhenComplete(v: boolean): this
|
|
23
|
+
|
|
24
|
+
noDataFillStyle(): string
|
|
25
|
+
noDataFillStyle(v: string): this
|
|
26
|
+
|
|
27
|
+
barMaxWidth(): number
|
|
28
|
+
barMaxWidth(v: number): this
|
|
29
|
+
|
|
30
|
+
barMinWidth(): number
|
|
31
|
+
barMinWidth(v: number): this
|
|
32
|
+
|
|
33
|
+
barHeight(): number
|
|
34
|
+
barHeight(v: number): this
|
|
35
|
+
|
|
36
|
+
barGroupWidth(): number
|
|
37
|
+
barGroupWidth(v: number): this
|
|
38
|
+
|
|
39
|
+
barSettings(): any
|
|
40
|
+
barSettings(v: any): this
|
|
41
|
+
|
|
42
|
+
barGroupGap(): number
|
|
43
|
+
barGroupGap(v: number): this
|
|
44
|
+
|
|
45
|
+
barGroupMinHeight(): number
|
|
46
|
+
barGroupMinHeight(v: number): this
|
|
47
|
+
|
|
48
|
+
barGroupMaxHeight(): number
|
|
49
|
+
barGroupMaxHeight(v: number): this
|
|
50
|
+
|
|
51
|
+
barStrokeFill(): string
|
|
52
|
+
barStrokeFill(v: string): this
|
|
53
|
+
|
|
54
|
+
barStrokeWidth(): number
|
|
55
|
+
barStrokeWidth(v: number): this
|
|
56
|
+
|
|
57
|
+
barCornerRadius(): number
|
|
58
|
+
barCornerRadius(v: number): this
|
|
59
|
+
|
|
60
|
+
barOtherColor(): string
|
|
61
|
+
barOtherColor(v: string): this
|
|
62
|
+
|
|
63
|
+
barOtherText(): string
|
|
64
|
+
barOtherText(v: string): this
|
|
65
|
+
|
|
66
|
+
barTooltipWidth(): number
|
|
67
|
+
barTooltipWidth(v: number): this
|
|
68
|
+
|
|
69
|
+
barTooltipHeight(): number
|
|
70
|
+
barTooltipHeight(v: number): this
|
|
71
|
+
|
|
72
|
+
dorling(): boolean
|
|
73
|
+
dorling(v: boolean): this
|
|
74
|
+
|
|
75
|
+
barTotalCode(): string | undefined
|
|
76
|
+
barTotalCode(v: string | undefined): this
|
|
77
|
+
|
|
78
|
+
statCodes(): string[] | undefined
|
|
79
|
+
statCodes(v: string[] | undefined): this
|
|
80
|
+
|
|
81
|
+
statBar(config: CompositionStatConfig): this
|
|
82
|
+
/** @deprecated Legacy positional signature. Prefer statBar({ categoryParameter, categoryCodes, ... }). */
|
|
83
|
+
statBar(
|
|
84
|
+
/** Config. */
|
|
85
|
+
config: CompositionStatConfig,
|
|
86
|
+
/** Category parameter. */
|
|
87
|
+
categoryParameter?: string,
|
|
88
|
+
/** Category codes. */
|
|
89
|
+
categoryCodes?: string[],
|
|
90
|
+
/** Category labels. */
|
|
91
|
+
categoryLabels?: string[],
|
|
92
|
+
/** Category colors. */
|
|
93
|
+
categoryColors?: string[],
|
|
94
|
+
/** Total code. */
|
|
95
|
+
totalCode?: string
|
|
96
|
+
): this
|
|
97
|
+
}
|
|
@@ -1,54 +1,76 @@
|
|
|
1
|
-
import type { MapConfig } from '../../../core/MapConfig'
|
|
2
|
-
import type { BarChartLegendConfig } from '../../../legend/composition/BarChartLegendConfig'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Configuration for bar chart composition maps.
|
|
6
|
-
*/
|
|
7
|
-
export interface BarMapConfig extends MapConfig {
|
|
8
|
-
/** Bar type. */
|
|
9
|
-
barType?: 'stacked' | 'grouped'
|
|
10
|
-
/** Cat colors. */
|
|
11
|
-
catColors?: Record<string, string>
|
|
12
|
-
/** Cat labels. */
|
|
13
|
-
catLabels?: Record<string, string>
|
|
14
|
-
/** Show only when complete. */
|
|
15
|
-
showOnlyWhenComplete?: boolean
|
|
16
|
-
/** No data fill style. */
|
|
17
|
-
noDataFillStyle?: string
|
|
18
|
-
/** Bar min width. */
|
|
19
|
-
barMinWidth?: number
|
|
20
|
-
/** Bar max width. */
|
|
21
|
-
barMaxWidth?: number
|
|
22
|
-
/** Bar height. */
|
|
23
|
-
barHeight?: number
|
|
24
|
-
/** Bar group width. */
|
|
25
|
-
barGroupWidth?: number
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
/** Bar
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
|
|
54
|
-
|
|
1
|
+
import type { MapConfig } from '../../../core/MapConfig'
|
|
2
|
+
import type { BarChartLegendConfig } from '../../../legend/composition/BarChartLegendConfig'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for bar chart composition maps.
|
|
6
|
+
*/
|
|
7
|
+
export interface BarMapConfig extends MapConfig {
|
|
8
|
+
/** Bar type. */
|
|
9
|
+
barType?: 'stacked' | 'grouped'
|
|
10
|
+
/** Cat colors. */
|
|
11
|
+
catColors?: Record<string, string>
|
|
12
|
+
/** Cat labels. */
|
|
13
|
+
catLabels?: Record<string, string>
|
|
14
|
+
/** Show only when complete. */
|
|
15
|
+
showOnlyWhenComplete?: boolean
|
|
16
|
+
/** No data fill style. */
|
|
17
|
+
noDataFillStyle?: string
|
|
18
|
+
/** Bar min width. */
|
|
19
|
+
barMinWidth?: number
|
|
20
|
+
/** Bar max width. */
|
|
21
|
+
barMaxWidth?: number
|
|
22
|
+
/** Bar height. */
|
|
23
|
+
barHeight?: number
|
|
24
|
+
/** Bar group width. */
|
|
25
|
+
barGroupWidth?: number
|
|
26
|
+
/** Grouped bar settings object. */
|
|
27
|
+
barSettings?: {
|
|
28
|
+
type?: 'stacked' | 'grouped'
|
|
29
|
+
minWidth?: number
|
|
30
|
+
maxWidth?: number
|
|
31
|
+
height?: number
|
|
32
|
+
groupWidth?: number
|
|
33
|
+
groupMinWidth?: number
|
|
34
|
+
groupMaxWidth?: number
|
|
35
|
+
groupGap?: number
|
|
36
|
+
groupMinHeight?: number
|
|
37
|
+
groupMaxHeight?: number
|
|
38
|
+
groupMaxValue?: number
|
|
39
|
+
groupMaxWidthValue?: number
|
|
40
|
+
strokeFill?: string
|
|
41
|
+
strokeWidth?: number
|
|
42
|
+
cornerRadius?: number
|
|
43
|
+
otherColor?: string
|
|
44
|
+
otherText?: string
|
|
45
|
+
tooltipWidth?: number
|
|
46
|
+
tooltipHeight?: number
|
|
47
|
+
}
|
|
48
|
+
/** Bar group gap. */
|
|
49
|
+
barGroupGap?: number
|
|
50
|
+
/** Bar group min height. */
|
|
51
|
+
barGroupMinHeight?: number
|
|
52
|
+
/** Bar group max height. */
|
|
53
|
+
barGroupMaxHeight?: number
|
|
54
|
+
/** Bar stroke fill. */
|
|
55
|
+
barStrokeFill?: string
|
|
56
|
+
/** Bar stroke width. */
|
|
57
|
+
barStrokeWidth?: number
|
|
58
|
+
/** Bar corner radius. */
|
|
59
|
+
barCornerRadius?: number
|
|
60
|
+
/** Bar other color. */
|
|
61
|
+
barOtherColor?: string
|
|
62
|
+
/** Bar other text. */
|
|
63
|
+
barOtherText?: string
|
|
64
|
+
/** Bar tooltip width. */
|
|
65
|
+
barTooltipWidth?: number
|
|
66
|
+
/** Bar tooltip height. */
|
|
67
|
+
barTooltipHeight?: number
|
|
68
|
+
/** Dorling. */
|
|
69
|
+
dorling?: boolean
|
|
70
|
+
/** Bar total code. */
|
|
71
|
+
barTotalCode?: string
|
|
72
|
+
/** Stat codes. */
|
|
73
|
+
statCodes?: string[]
|
|
74
|
+
/** Legend. */
|
|
75
|
+
legend?: BarChartLegendConfig | false
|
|
76
|
+
}
|