eurostat-map 4.10.9 → 4.10.11

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.
Files changed (120) hide show
  1. package/build/215.eurostatmap.min.js +1 -1
  2. package/build/eurostatmap.js +2757 -2689
  3. package/build/eurostatmap.min.js +2 -2
  4. package/build/eurostatmap.min.js.map +1 -1
  5. package/build/package.json +1 -1
  6. package/build/types/core/InsetConfig.d.ts +92 -71
  7. package/build/types/core/MapConfig.d.ts +103 -12
  8. package/build/types/core/MapInstance.d.ts +624 -555
  9. package/build/types/core/TooltipConfig.d.ts +33 -5
  10. package/build/types/core/decoration/PatternFillConfig.d.ts +34 -0
  11. package/build/types/core/geo/geometries.d.ts +13 -1
  12. package/build/types/core/layer/Layer.d.ts +49 -31
  13. package/build/types/core/minimaps.d.ts +11 -3
  14. package/build/types/core/stat/StatData.d.ts +2 -2
  15. package/build/types/core/utils.d.ts +44 -0
  16. package/build/types/index.d.ts +37 -6
  17. package/build/types/layers/CategoricalMap.d.ts +9 -9
  18. package/build/types/layers/choropleth/BivariateChoroplethConfig.d.ts +3 -0
  19. package/build/types/layers/choropleth/BivariateChoroplethMap.d.ts +9 -6
  20. package/build/types/layers/choropleth/ChoroplethConfig.d.ts +3 -3
  21. package/build/types/layers/choropleth/ChoroplethMap.d.ts +16 -4
  22. package/build/types/layers/choropleth/TrivariateChoroplethMap.d.ts +4 -0
  23. package/build/types/layers/choropleth/ValueByAlphaMap.d.ts +4 -3
  24. package/build/types/layers/composition/bar/BarMap.d.ts +170 -97
  25. package/build/types/layers/composition/bar/BarMapConfig.d.ts +83 -76
  26. package/build/types/layers/composition/coxcomb/CoxcombMap.d.ts +7 -6
  27. package/build/types/layers/composition/coxcomb/CoxcombMapConfig.d.ts +2 -2
  28. package/build/types/layers/composition/pie/PieMap.d.ts +8 -4
  29. package/build/types/layers/composition/pie/PieMapConfig.d.ts +0 -4
  30. package/build/types/layers/composition/stripe/StripeMap.d.ts +4 -4
  31. package/build/types/layers/composition/waffle/WaffleMap.d.ts +4 -4
  32. package/build/types/layers/flow/FlowMap.d.ts +8 -8
  33. package/build/types/layers/proportional-symbol/ProportionalSymbolConfig.d.ts +105 -52
  34. package/build/types/layers/proportional-symbol/ProportionalSymbolMap.d.ts +104 -100
  35. package/build/types/layers/proportional-symbol/mushroom/MushroomMap.d.ts +16 -12
  36. package/build/types/layers/spark/SparkMap.d.ts +14 -8
  37. package/build/types/layers/spark/SparkMapConfig.d.ts +8 -12
  38. package/build/types/legend/LegendConfig.d.ts +72 -73
  39. package/build/types/legend/MushroomLegendConfig.d.ts +15 -0
  40. package/build/types/legend/choropleth/BivariateLegendConfig.d.ts +6 -6
  41. package/build/types/legend/choropleth/TrivariateLegendConfig.d.ts +5 -5
  42. package/build/types/legend/composition/BarChartLegendConfig.d.ts +32 -0
  43. package/build/types/legend/composition/StripeCompositionLegendConfig.d.ts +34 -2
  44. package/package.json +1 -1
  45. package/build/types/core/MinimapConfig.d.ts +0 -11
  46. package/build/types/legend/CoxcombLegendConfig.d.ts +0 -85
  47. package/build/types/legend/PieChartLegendConfig.d.ts +0 -68
  48. package/build/types/legend/SparklineLegendConfig.d.ts +0 -6
  49. package/build/types/legend/StripeCompositionLegendConfig.d.ts +0 -11
  50. package/build/types/legend/WaffleLegendConfig.d.ts +0 -74
  51. package/build/types/legend/choropleth/legend-choropleth-bivariate.d.ts +0 -2
  52. package/build/types/legend/choropleth/legend-choropleth-trivariate.d.ts +0 -2
  53. package/build/types/legend/choropleth/legend-choropleth.d.ts +0 -2
  54. package/build/types/legend/composition/legend-bar-chart.d.ts +0 -2
  55. package/build/types/legend/flow/legend-flow.d.ts +0 -2
  56. package/build/types/legend/legend-categorical.d.ts +0 -2
  57. package/build/types/legend/legend-continuous.d.ts +0 -2
  58. package/build/types/legend/legend-discrete.d.ts +0 -2
  59. package/build/types/legend/legend.d.ts +0 -13
  60. package/build/types/legend/proportional-symbol/PropSymbolLegendConfig.d.ts +0 -0
  61. package/build/types/legend/proportional-symbol/legend-proportional-symbols.d.ts +0 -2
  62. package/build/types/map-types/CategoricalMap.d.ts +0 -21
  63. package/build/types/map-types/CategoricalMapConfig.d.ts +0 -11
  64. package/build/types/map-types/CateogricalMapConfig.d.ts +0 -11
  65. package/build/types/map-types/MapType.d.ts +0 -34
  66. package/build/types/map-types/choropleth/BivariateChoroplethConfig.d.ts +0 -27
  67. package/build/types/map-types/choropleth/BivariateChoroplethMap.d.ts +0 -39
  68. package/build/types/map-types/choropleth/ChoroplethConfig.d.ts +0 -39
  69. package/build/types/map-types/choropleth/ChoroplethMap.d.ts +0 -48
  70. package/build/types/map-types/choropleth/TrivariateChoroplethConfig.d.ts +0 -41
  71. package/build/types/map-types/choropleth/TrivariateChoroplethMap.d.ts +0 -18
  72. package/build/types/map-types/choropleth/ValueByAlphaConfig.d.ts +0 -8
  73. package/build/types/map-types/choropleth/ValueByAlphaMap.d.ts +0 -9
  74. package/build/types/map-types/choropleth/map-choropleth-bivariate.d.ts +0 -4
  75. package/build/types/map-types/choropleth/map-choropleth-trivariate.d.ts +0 -4
  76. package/build/types/map-types/choropleth/map-choropleth.d.ts +0 -47
  77. package/build/types/map-types/choropleth/map-value-by-alpha.d.ts +0 -4
  78. package/build/types/map-types/composition/BarMap.d.ts +0 -86
  79. package/build/types/map-types/composition/BarMapConfig.d.ts +0 -30
  80. package/build/types/map-types/composition/CompositionStatConfig.d.ts +0 -57
  81. package/build/types/map-types/composition/CoxcombMap.d.ts +0 -42
  82. package/build/types/map-types/composition/CoxcombMapConfig.d.ts +0 -18
  83. package/build/types/map-types/composition/PieMap.d.ts +0 -62
  84. package/build/types/map-types/composition/PieMapConfig.d.ts +0 -24
  85. package/build/types/map-types/composition/SparkMap.d.ts +0 -46
  86. package/build/types/map-types/composition/SparkMapConfig.d.ts +0 -25
  87. package/build/types/map-types/composition/StripeMap.d.ts +0 -43
  88. package/build/types/map-types/composition/StripeMapConfig.d.ts +0 -16
  89. package/build/types/map-types/composition/WaffleMap.d.ts +0 -71
  90. package/build/types/map-types/composition/WaffleMapConfig.d.ts +0 -25
  91. package/build/types/map-types/composition/bar/BarMap.d.ts +0 -97
  92. package/build/types/map-types/composition/bar/BarMapConfig.d.ts +0 -76
  93. package/build/types/map-types/composition/composition-map.d.ts +0 -25
  94. package/build/types/map-types/composition/coxcomb/CoxcombMap.d.ts +0 -75
  95. package/build/types/map-types/composition/coxcomb/CoxcombMapConfig.d.ts +0 -47
  96. package/build/types/map-types/composition/coxcomb/CoxcombStatConfig.d.ts +0 -13
  97. package/build/types/map-types/composition/map-bar.d.ts +0 -5
  98. package/build/types/map-types/composition/map-coxcomb.d.ts +0 -5
  99. package/build/types/map-types/composition/map-pie.d.ts +0 -10
  100. package/build/types/map-types/composition/map-spark.d.ts +0 -5
  101. package/build/types/map-types/composition/map-stripe.d.ts +0 -5
  102. package/build/types/map-types/composition/map-waffle.d.ts +0 -5
  103. package/build/types/map-types/composition/pie/PieMap.d.ts +0 -84
  104. package/build/types/map-types/composition/pie/PieMapConfig.d.ts +0 -50
  105. package/build/types/map-types/composition/stripe/StripeMap.d.ts +0 -80
  106. package/build/types/map-types/composition/stripe/StripeMapConfig.d.ts +0 -45
  107. package/build/types/map-types/composition/waffle/WaffleMap.d.ts +0 -124
  108. package/build/types/map-types/composition/waffle/WaffleMapConfig.d.ts +0 -58
  109. package/build/types/map-types/flow/FlowMap.d.ts +0 -218
  110. package/build/types/map-types/flow/FlowMapConfig.d.ts +0 -220
  111. package/build/types/map-types/flow/map-flow.d.ts +0 -5
  112. package/build/types/map-types/map-categorical.d.ts +0 -19
  113. package/build/types/map-types/proportional-symbol/ProportionalSymbolConfig.d.ts +0 -47
  114. package/build/types/map-types/proportional-symbol/ProportionalSymbolMap.d.ts +0 -94
  115. package/build/types/map-types/proportional-symbol/map-proportional-symbols.d.ts +0 -35
  116. package/build/types/map-types/proportional-symbol/mushroom/MushroomMap.d.ts +0 -67
  117. package/build/types/map-types/proportional-symbol/mushroom/MushroomMapConfig.d.ts +0 -39
  118. package/build/types/map-types/spark/SparkMap.d.ts +0 -56
  119. package/build/types/map-types/spark/SparkMapConfig.d.ts +0 -74
  120. package/build/types/map-types/spark/SparkStatConfig.d.ts +0 -32
@@ -1,52 +1,105 @@
1
- import type { MapConfig } from '../../core/MapConfig'
2
-
3
- export interface ProportionalSymbolSettings {
4
- shape?: string
5
- customShape?: any
6
- customSVG?: any
7
- spikeWidth?: number
8
- offset?: { x: number; y: number }
9
- barWidth?: number
10
- minValue?: number | undefined
11
- maxValue?: number | undefined
12
- fill?: string
13
- fillOpacity?: number
14
- stroke?: string
15
- strokeWidth?: number
16
- strokeOpacity?: number
17
- sizeScale?: 'sqrt' | 'linear' | any
18
- minSize?: number
19
- maxSize?: number
20
- classes?: number
21
- colors?: string[] | null
22
- colorFun?: any
23
- classToFillStyle?: any
24
- thresholds?: number[]
25
- classificationMethod?: string
26
- brightenFactor?: number
27
- codeLabels?: boolean
28
- }
29
-
30
- /**
31
- * Configuration for proportional symbol maps
32
- */
33
- export interface ProportionalSymbolConfig extends MapConfig {
34
- /** Fill styles for categorical exceptions in the color dataset, keyed by raw value. */
35
- categoryFillStyle?: { [rawValue: string]: string }
36
- /** Legend and tooltip labels for categorical exceptions, keyed by raw value. */
37
- categoryText?: { [rawValue: string]: string }
38
-
39
- /** Symbol shape used for markers. */
40
- symbol?: 'circle' | 'square'
41
- /** Base symbol size factor. */
42
- size?: number
43
-
44
- /** Dorling cartogram. */
45
- dorling?: boolean
46
-
47
- /** Size function. */
48
- psCustomSize?: (value: number) => number
49
-
50
- /** Grouped proportional symbol style settings. */
51
- psSettings?: ProportionalSymbolSettings
52
- }
1
+ import type { MapConfig } from '../../core/MapConfig'
2
+
3
+ export interface ProportionalSymbolSettings {
4
+ /** Symbol shape. Accepted values: 'circle', 'bar', 'square', 'star', 'diamond', 'wye', 'cross', 'triangle', 'spike'. */
5
+ shape?: string
6
+ /** Custom d3-shape symbol type, used when shape is not one of the built-in shapes. */
7
+ customShape?: any
8
+ /** Custom SVG symbol markup/selector to use instead of a built-in shape. */
9
+ customSVG?: any
10
+ spikeWidth?: number
11
+ offset?: { x: number; y: number }
12
+ barWidth?: number
13
+ minValue?: number | undefined
14
+ maxValue?: number | undefined
15
+ fill?: string
16
+ fillOpacity?: number
17
+ stroke?: string
18
+ strokeWidth?: number
19
+ strokeOpacity?: number
20
+ sizeScale?: 'sqrt' | 'linear'
21
+ minSize?: number
22
+ maxSize?: number
23
+ classes?: number
24
+ colors?: string[] | null
25
+ /** d3-scale-chromatic interpolator used to auto-generate colors when not set explicitly. */
26
+ colorFun?: (t: number) => string
27
+ /** Function mapping a class index and the number of classes to a fill color. */
28
+ classToFillStyle?: (ecl: number, numberOfClasses: number) => string
29
+ thresholds?: number[]
30
+ classificationMethod?: 'quantile' | 'equinter' | 'threshold'
31
+ brightenFactor?: number
32
+ codeLabels?: boolean
33
+ }
34
+
35
+ /**
36
+ * Configuration for proportional symbol maps
37
+ */
38
+ export interface ProportionalSymbolConfig extends MapConfig {
39
+ /** Fill styles for categorical exceptions in the color dataset, keyed by raw value. */
40
+ categoryFillStyle?: { [rawValue: string]: string }
41
+ /** Legend and tooltip labels for categorical exceptions, keyed by raw value. */
42
+ categoryText?: { [rawValue: string]: string }
43
+
44
+ /** Dorling cartogram. */
45
+ dorling?: boolean
46
+
47
+ /** Dorling simulation settings for this layer. Defaults to the map's dorlingSettings. */
48
+ dorlingSettings?: import('../../core/DorlingSettings').DorlingSettings
49
+
50
+ /** Grouped proportional symbol style settings. Preferred over the individual `ps*` fields below. */
51
+ psSettings?: ProportionalSymbolSettings
52
+
53
+ /** Symbol shape. Accepted values: 'circle', 'bar', 'square', 'star', 'diamond', 'wye', 'cross', 'triangle', 'spike'. @default 'circle' */
54
+ psShape?: string
55
+ /** Custom d3-shape symbol type, used when psShape is not one of the built-in shapes. */
56
+ psCustomShape?: any
57
+ /** Custom SVG symbol markup/selector to use instead of a built-in shape. */
58
+ psCustomSVG?: any
59
+ /** Width in pixels of spike symbols (psShape: 'spike'). @default 7 */
60
+ psSpikeWidth?: number
61
+ /** Pixel offset {x, y} applied to each symbol, scaled with symbol size. */
62
+ psOffset?: { x: number; y: number }
63
+ /** Width in pixels of vertical bar symbols (psShape: 'bar'). @default 10 */
64
+ psBarWidth?: number
65
+ /** Max symbol size in pixels. @default 30 */
66
+ psMaxSize?: number
67
+ /** Min symbol size in pixels. @default 5 */
68
+ psMinSize?: number
69
+ /** Value mapped to psMaxSize. Auto-detected from the data when omitted. */
70
+ psMaxValue?: number
71
+ /** Value mapped to psMinSize. Auto-detected from the data when omitted. */
72
+ psMinValue?: number
73
+ /** Size scale type. @default 'sqrt' */
74
+ psSizeScale?: 'sqrt' | 'linear'
75
+ /** Fill color, used when the symbols are not colored by a classified stat. @default '#009569' */
76
+ psFill?: string
77
+ /** Fill opacity. @default 1 */
78
+ psFillOpacity?: number
79
+ /** Stroke color. @default '#ffffff' */
80
+ psStroke?: string
81
+ /** Stroke width. @default 0.2 */
82
+ psStrokeWidth?: number
83
+ /** Stroke opacity. @default 1 */
84
+ psStrokeOpacity?: number
85
+ /** Number of color classes. @default 5 */
86
+ psClasses?: number
87
+ /** Colors used for the color classes. */
88
+ psColors?: string[] | null
89
+ /** d3-scale-chromatic interpolator used to auto-generate psColors when not set explicitly. */
90
+ psColorFun?: any
91
+ /** Function mapping a class index to a fill color. Auto-derived from psColors/psColorFun when unset. */
92
+ psClassToFillStyle?: any
93
+ /** Thresholds, used when psClassificationMethod is 'threshold'. */
94
+ psThresholds?: number[]
95
+ /** Color classification method. @default 'quantile' */
96
+ psClassificationMethod?: 'quantile' | 'equinter' | 'threshold'
97
+ /** Brighten factor applied to generated color classes. @default 0.9 */
98
+ psBrightenFactor?: number
99
+ /** Show region code labels next to symbols. @default false */
100
+ psCodeLabels?: boolean
101
+ /** The classifier function used for sizing symbols. */
102
+ classifierSize?: any
103
+ /** The classifier function used for coloring symbols. */
104
+ classifierColor?: any
105
+ }
@@ -1,100 +1,104 @@
1
- import { MapInstance } from '../../core/MapInstance'
2
- import type { ProportionalSymbolSettings } from './ProportionalSymbolConfig'
3
-
4
- /**
5
- * Proportional symbol map object
6
- */
7
- export interface ProportionalSymbolMap extends MapInstance {
8
- categoryFillStyle(): { [rawValue: string]: string } | undefined
9
- categoryFillStyle(v: { [rawValue: string]: string }): this
10
-
11
- categoryText(): { [rawValue: string]: string } | undefined
12
- categoryText(v: { [rawValue: string]: string }): this
13
-
14
- psSettings(): ProportionalSymbolSettings
15
- psSettings(v: ProportionalSymbolSettings): this
16
-
17
- psMaxSize(): number
18
- psMaxSize(v: number): this
19
-
20
- psMinSize(): number
21
- psMinSize(v: number): this
22
-
23
- psMaxValue(): number | undefined
24
- psMaxValue(v: number | undefined): this
25
-
26
- psMinValue(): number | undefined
27
- psMinValue(v: number | undefined): this
28
-
29
- psFill(): string
30
- psFill(v: string): this
31
-
32
- psFillOpacity(): number
33
- psFillOpacity(v: number): this
34
-
35
- psStrokeOpacity(): number
36
- psStrokeOpacity(v: number): this
37
-
38
- psStroke(): string
39
- psStroke(v: string): this
40
-
41
- psStrokeWidth(): number
42
- psStrokeWidth(v: number): this
43
-
44
- classifierSize(): any
45
- classifierSize(v: any): this
46
-
47
- classifierColor(): any
48
- classifierColor(v: any): this
49
-
50
- psShape(): string
51
- psShape(v: string): this
52
-
53
- psCustomShape(): any
54
- psCustomShape(v: any): this
55
-
56
- psBarWidth(): number
57
- psBarWidth(v: number): this
58
-
59
- psClassToFillStyle(): any
60
- psClassToFillStyle(v: any): this
61
-
62
- psColorFun(): any
63
- psColorFun(v: any): this
64
-
65
- psSizeScale(): any
66
- psSizeScale(v: any): this
67
-
68
- noDataFillStyle(): string
69
- noDataFillStyle(v: string): this
70
-
71
- psThresholds(): number[]
72
- psThresholds(v: number[]): this
73
-
74
- psColors(): string[] | null
75
- psColors(v: string[] | null): this
76
-
77
- psCustomSVG(): any
78
- psCustomSVG(v: any): this
79
-
80
- psOffset(): { x: number; y: number }
81
- psOffset(v: { x: number; y: number }): this
82
-
83
- psClassificationMethod(): string
84
- psClassificationMethod(v: string): this
85
-
86
- psClasses(): number
87
- psClasses(v: number): this
88
-
89
- dorling(): boolean
90
- dorling(v: boolean): this
91
-
92
- psSpikeWidth(): number
93
- psSpikeWidth(v: number): this
94
-
95
- psCodeLabels(): boolean
96
- psCodeLabels(v: boolean): this
97
-
98
- psBrightenFactor(): number
99
- psBrightenFactor(v: number): this
100
- }
1
+ import { MapInstance } from '../../core/MapInstance'
2
+ import type { ProportionalSymbolSettings } from './ProportionalSymbolConfig'
3
+
4
+ /**
5
+ * Proportional symbol map object
6
+ */
7
+ export interface ProportionalSymbolMap extends MapInstance {
8
+ categoryFillStyle(): { [rawValue: string]: string } | undefined
9
+ categoryFillStyle(v: { [rawValue: string]: string }): this
10
+
11
+ categoryText(): { [rawValue: string]: string } | undefined
12
+ categoryText(v: { [rawValue: string]: string }): this
13
+
14
+ psSettings(): ProportionalSymbolSettings
15
+ psSettings(v: ProportionalSymbolSettings): this
16
+
17
+ psMaxSize(): number
18
+ psMaxSize(v: number): this
19
+
20
+ psMinSize(): number
21
+ psMinSize(v: number): this
22
+
23
+ psMaxValue(): number | undefined
24
+ psMaxValue(v: number | undefined): this
25
+
26
+ psMinValue(): number | undefined
27
+ psMinValue(v: number | undefined): this
28
+
29
+ psFill(): string
30
+ psFill(v: string): this
31
+
32
+ psFillOpacity(): number
33
+ psFillOpacity(v: number): this
34
+
35
+ psStrokeOpacity(): number
36
+ psStrokeOpacity(v: number): this
37
+
38
+ psStroke(): string
39
+ psStroke(v: string): this
40
+
41
+ psStrokeWidth(): number
42
+ psStrokeWidth(v: number): this
43
+
44
+ /** D3 scale mapping a stat value to a symbol size in pixels. */
45
+ classifierSize(): ((value: number) => number) & { domain: (d?: number[]) => any }
46
+ classifierSize(v: ((value: number) => number) & { domain?: (d?: number[]) => any }): this
47
+
48
+ /** D3 scale mapping a stat value to a color class index. */
49
+ classifierColor(): ((value: number) => number) | undefined
50
+ classifierColor(v: (value: number) => number): this
51
+
52
+ psShape(): string
53
+ psShape(v: string): this
54
+
55
+ psCustomShape(): any
56
+ psCustomShape(v: any): this
57
+
58
+ psBarWidth(): number
59
+ psBarWidth(v: number): this
60
+
61
+ /** Function mapping a class index and the number of classes to a fill color. */
62
+ psClassToFillStyle(): (ecl: number, numberOfClasses: number) => string
63
+ psClassToFillStyle(v: (ecl: number, numberOfClasses: number) => string): this
64
+
65
+ /** d3-scale-chromatic interpolator used to auto-generate psColors when not set explicitly. */
66
+ psColorFun(): (t: number) => string
67
+ psColorFun(v: (t: number) => string): this
68
+
69
+ psSizeScale(): 'sqrt' | 'linear' | undefined
70
+ psSizeScale(v: 'sqrt' | 'linear'): this
71
+
72
+ noDataFillStyle(): string
73
+ noDataFillStyle(v: string): this
74
+
75
+ psThresholds(): number[]
76
+ psThresholds(v: number[]): this
77
+
78
+ psColors(): string[] | null
79
+ psColors(v: string[] | null): this
80
+
81
+ psCustomSVG(): any
82
+ psCustomSVG(v: any): this
83
+
84
+ psOffset(): { x: number; y: number }
85
+ psOffset(v: { x: number; y: number }): this
86
+
87
+ psClassificationMethod(): string
88
+ psClassificationMethod(v: string): this
89
+
90
+ psClasses(): number
91
+ psClasses(v: number): this
92
+
93
+ dorling(): boolean
94
+ dorling(v: boolean): this
95
+
96
+ psSpikeWidth(): number
97
+ psSpikeWidth(v: number): this
98
+
99
+ psCodeLabels(): boolean
100
+ psCodeLabels(v: boolean): this
101
+
102
+ psBrightenFactor(): number
103
+ psBrightenFactor(v: number): this
104
+ }
@@ -4,15 +4,19 @@ import type { MapInstance } from '../../../core/MapInstance'
4
4
  * Mushroom map type.
5
5
  */
6
6
  export interface MushroomMap extends MapInstance {
7
+ /** Returns the resolved [v1, v2] stat codes for the two mushroom sides, honoring any
8
+ * 'left'/'right' or 'v1'/'v2' encodings before falling back to mushroomCodes. */
9
+ getMushroomStatCodes(): [string, string]
10
+
7
11
  mushroomSettings(): {
8
12
  codes: [string, string]
9
13
  minSize: number
10
14
  maxSize: number
11
15
  colors: [string, string]
12
16
  orientation: 'horizontal' | 'vertical'
13
- sizeScaleFunction: any
14
- sizeScaleFunctionV1: any
15
- sizeScaleFunctionV2: any
17
+ sizeScaleFunction: ((value: number) => number) | null
18
+ sizeScaleFunctionV1: ((value: number) => number) | null
19
+ sizeScaleFunctionV2: ((value: number) => number) | null
16
20
  }
17
21
  mushroomSettings(v: {
18
22
  codes?: [string, string]
@@ -20,9 +24,9 @@ export interface MushroomMap extends MapInstance {
20
24
  maxSize?: number
21
25
  colors?: [string, string]
22
26
  orientation?: 'horizontal' | 'vertical'
23
- sizeScaleFunction?: any
24
- sizeScaleFunctionV1?: any
25
- sizeScaleFunctionV2?: any
27
+ sizeScaleFunction?: ((value: number) => number) | null
28
+ sizeScaleFunctionV1?: ((value: number) => number) | null
29
+ sizeScaleFunctionV2?: ((value: number) => number) | null
26
30
  }): this
27
31
 
28
32
  /** @deprecated Use mushroomSettings({ codes }) */
@@ -51,17 +55,17 @@ export interface MushroomMap extends MapInstance {
51
55
  mushroomOrientation(v: 'horizontal' | 'vertical'): this
52
56
 
53
57
  /** @deprecated Use mushroomSettings({ sizeScaleFunction }) */
54
- mushroomSizeScaleFunction(): any
58
+ mushroomSizeScaleFunction(): ((value: number) => number) | null
55
59
  /** @deprecated Use mushroomSettings({ sizeScaleFunction }) */
56
- mushroomSizeScaleFunction(v: any): this
60
+ mushroomSizeScaleFunction(v: (value: number) => number): this
57
61
 
58
62
  /** @deprecated Use mushroomSettings({ sizeScaleFunctionV1 }) */
59
- mushroomSizeScaleFunctionV1(): any
63
+ mushroomSizeScaleFunctionV1(): ((value: number) => number) | null
60
64
  /** @deprecated Use mushroomSettings({ sizeScaleFunctionV1 }) */
61
- mushroomSizeScaleFunctionV1(v: any): this
65
+ mushroomSizeScaleFunctionV1(v: (value: number) => number): this
62
66
 
63
67
  /** @deprecated Use mushroomSettings({ sizeScaleFunctionV2 }) */
64
- mushroomSizeScaleFunctionV2(): any
68
+ mushroomSizeScaleFunctionV2(): ((value: number) => number) | null
65
69
  /** @deprecated Use mushroomSettings({ sizeScaleFunctionV2 }) */
66
- mushroomSizeScaleFunctionV2(v: any): this
70
+ mushroomSizeScaleFunctionV2(v: (value: number) => number): this
67
71
  }
@@ -13,8 +13,8 @@ export interface SparkMap extends MapInstance {
13
13
  legend(): SparklineLegendConfig | false
14
14
  legend(config: SparklineLegendConfig | false): this
15
15
 
16
- sparkLineColor(): any
17
- sparkLineColor(v: any): this
16
+ sparkLineColor(): string | ((value: number, index: number, data: any[]) => string)
17
+ sparkLineColor(v: string | ((value: number, index: number, data: any[]) => string)): this
18
18
 
19
19
  showOnlyWhenComplete(): boolean
20
20
  showOnlyWhenComplete(v: boolean): this
@@ -37,14 +37,20 @@ export interface SparkMap extends MapInstance {
37
37
  sparkLineCircleRadius(): number
38
38
  sparkLineCircleRadius(v: number): this
39
39
 
40
- sparkLineAreaColor(): any
41
- sparkLineAreaColor(v: any): this
40
+ /** Alias for the areaColor setting (backward-compatible name). */
41
+ sparkLineAreaColor(): string | ((value: number, index: number, data: any[]) => string)
42
+ sparkLineAreaColor(v: string | ((value: number, index: number, data: any[]) => string)): this
42
43
 
43
- sparkTooltipChart(): any
44
- sparkTooltipChart(v: any): this
44
+ sparkTooltipChart(): { width: number; height: number; margin: { left: number; right: number; top: number; bottom: number }; circleRadius: number }
45
+ sparkTooltipChart(v: {
46
+ width: number
47
+ height: number
48
+ margin: { left: number; right: number; top: number; bottom: number }
49
+ circleRadius: number
50
+ }): this
45
51
 
46
- sparkLineChartFunction(): any
47
- sparkLineChartFunction(v: any): this
52
+ sparkLineChartFunction(): ((node: any, data: any[], width: number, height: number, isForTooltip?: boolean) => void) | undefined
53
+ sparkLineChartFunction(v: (node: any, data: any[], width: number, height: number, isForTooltip?: boolean) => void): this
48
54
 
49
55
  sparkLineOffsets(): { x: number; y: number }
50
56
  sparkLineOffsets(v: { x: number; y: number }): this
@@ -1,5 +1,6 @@
1
1
  import type { MapConfig } from '../../core/MapConfig'
2
2
  import type { SparklineLegendConfig } from '../../legend/composition/SparklineLegendConfig'
3
+ import type { SparkStatConfig } from './SparkStatConfig'
3
4
 
4
5
  export interface SparkSettings {
5
6
  type?: 'line' | 'area' | 'bar'
@@ -24,22 +25,19 @@ export interface SparkSettings {
24
25
  * Configuration for sparkline maps.
25
26
  */
26
27
  export interface SparkMapConfig extends MapConfig {
28
+ /**
29
+ * Statistical data configuration. For sparkline maps, pass a `dates`-keyed
30
+ * SparkStatConfig (equivalent to calling `.statSpark(...)`) rather than a plain
31
+ * single-value StatConfig.
32
+ */
33
+ stat?: SparkStatConfig
34
+
27
35
  /** Grouped sparkline rendering settings. */
28
36
  sparkSettings?: SparkSettings
29
37
 
30
38
  /** Spark type. */
31
39
  sparkType?: 'line' | 'area' | 'bar'
32
40
 
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
41
  sparkLineColor?: string | ((value: number, index: number, data: any[]) => string)
44
42
  sparkAreaColor?: string | ((value: number, index: number, data: any[]) => string)
45
43
  /** Spark line width. */
@@ -68,8 +66,6 @@ export interface SparkMapConfig extends MapConfig {
68
66
  /** Show only when complete. */
69
67
  showOnlyWhenComplete?: boolean
70
68
  sparkLineChartFunction?: (node: any, data: any[], width: number, height: number, isForTooltip?: boolean) => void
71
- /** Spark yscale. */
72
- sparkYScale?: any
73
69
  /** Legend. */
74
70
  legend?: SparklineLegendConfig | false
75
71
  }
@@ -1,73 +1,72 @@
1
- /**
2
- * Parent configuration for map legends. Each map type will extend this with its own specific properties, but these are the common ones that apply to all legend types.
3
- */
4
- export interface LegendConfig {
5
- /** Legend origin x-coordinate in pixels. */
6
- x?: number
7
- /** Legend origin y-coordinate in pixels. */
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'
11
- /** Legend width in pixels. */
12
- width?: number
13
- /** Legend height in pixels. */
14
- height?: number
15
-
16
- /** Legend title text. */
17
- title?: string
18
- /** Legend subtitle text. */
19
- subtitle?: string
20
- /** Legend title font size in pixels. */
21
- titleFontSize?: number
22
-
23
- /** Box styling. */
24
- /** Inner spacing around legend content. */
25
- boxPadding?: number
26
- /** Background opacity of the legend box. */
27
- boxOpacity?: number
28
- /** Apply the legend box's background opacity (boxOpacity) only while the map is currently zoomed in (scale != 1). The legend box is transparent at the initial view and returns to its configured opacity while zoomed. Purely a box-opacity concern - does not affect legend hover interactions (e.g. hover-to-highlight), which always work regardless of zoom state. */
29
- onlyApplyOpacityWhileZoomed?: boolean
30
- /** Padding between the title block and legend body. */
31
- titlePadding?: number
32
-
33
- /** Shape styling (for proportional symbol legends). */
34
- /** Symbol swatch width in pixels. */
35
- shapeWidth?: number
36
- /** Symbol swatch height in pixels. */
37
- shapeHeight?: number
38
- /** Horizontal gap between shape and label. */
39
- shapePadding?: number
40
- /** Length of separator lines in discrete legends. */
41
- sepLineLength?: number
42
-
43
- /** Label styling. */
44
- /** Label font size in pixels. */
45
- labelFontSize?: number
46
- /** Pixel offsets applied to labels. */
47
- labelOffsets?: { x: number; y: number }
48
- /** Custom formatter for legend labels. */
49
- labelFormatter?: ((value: number, index?: number) => string) | null
50
- /** Number of decimal places for auto-formatted labels. */
51
- decimals?: number
52
-
53
- /** Legend layout direction. */
54
- orientation?: 'vertical' | 'horizontal'
55
- /** Sort legend entries in ascending order when true. */
56
- ascending?: boolean
57
- /** Whether to display the no-data legend item. */
58
- noData?: boolean
59
- /** Label used for no-data legend item. */
60
- noDataText?: string
61
- /** Vertical gap before the no-data swatch in pixels. */
62
- noDataPadding?: number
63
- /** Width of the no-data swatch in pixels. */
64
- noDataShapeWidth?: number
65
- /** Height of the no-data swatch in pixels. */
66
- noDataShapeHeight?: number
67
-
68
- /** Whether to show dataset min/max labels when supported. */
69
- maxMin?: boolean
70
- /** Text affixes for min/max labels as [minSuffix, maxSuffix]. */
71
- maxMinLabels?: [string, string]
72
- layer?: any
73
- }
1
+ /**
2
+ * Parent configuration for map legends. Each map type will extend this with its own specific properties, but these are the common ones that apply to all legend types.
3
+ */
4
+ export interface LegendConfig {
5
+ /** Legend origin x-coordinate in pixels. */
6
+ x?: number
7
+ /** Legend origin y-coordinate in pixels. */
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'
11
+ /** Legend width in pixels. */
12
+ width?: number
13
+ /** Legend height in pixels. */
14
+ height?: number
15
+
16
+ /** Legend title text. */
17
+ title?: string
18
+ /** Legend subtitle text. */
19
+ subtitle?: string
20
+ /** Legend title font size in pixels. */
21
+ titleFontSize?: number
22
+
23
+ /** Box styling. */
24
+ /** Inner spacing around legend content. */
25
+ boxPadding?: number
26
+ /** Background opacity of the legend box. */
27
+ boxOpacity?: number
28
+ /** Apply the legend box's background opacity (boxOpacity) only while the map is currently zoomed in (scale != 1). The legend box is transparent at the initial view and returns to its configured opacity while zoomed. Purely a box-opacity concern - does not affect legend hover interactions (e.g. hover-to-highlight), which always work regardless of zoom state. */
29
+ onlyApplyOpacityWhileZoomed?: boolean
30
+ /** Padding between the title block and legend body. */
31
+ titlePadding?: number
32
+
33
+ /** Shape styling (for proportional symbol legends). */
34
+ /** Symbol swatch width in pixels. */
35
+ shapeWidth?: number
36
+ /** Symbol swatch height in pixels. */
37
+ shapeHeight?: number
38
+ /** Horizontal gap between shape and label. */
39
+ shapePadding?: number
40
+ /** Length of separator lines in discrete legends. */
41
+ sepLineLength?: number
42
+
43
+ /** Label styling. */
44
+ /** Label font size in pixels. */
45
+ labelFontSize?: number
46
+ /** Pixel offsets applied to labels. */
47
+ labelOffsets?: { x: number; y: number }
48
+ /** Custom formatter for legend labels. */
49
+ labelFormatter?: ((value: number, index?: number) => string) | null
50
+ /** Number of decimal places for auto-formatted labels. */
51
+ decimals?: number
52
+
53
+ /** Legend layout direction. */
54
+ orientation?: 'vertical' | 'horizontal'
55
+ /** Sort legend entries in ascending order when true. */
56
+ ascending?: boolean
57
+ /** Whether to display the no-data legend item. */
58
+ noData?: boolean
59
+ /** Label used for no-data legend item. */
60
+ noDataText?: string
61
+ /** Vertical gap before the no-data swatch in pixels. */
62
+ noDataPadding?: number
63
+ /** Width of the no-data swatch in pixels. */
64
+ noDataShapeWidth?: number
65
+ /** Height of the no-data swatch in pixels. */
66
+ noDataShapeHeight?: number
67
+
68
+ /** Whether to show dataset min/max labels when supported. */
69
+ maxMin?: boolean
70
+ /** Text affixes for min/max labels as [minSuffix, maxSuffix]. */
71
+ maxMinLabels?: [string, string]
72
+ }