eurostat-map 4.3.58 → 4.4.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.
Files changed (116) hide show
  1. package/build/215.eurostatmap.min.js +1 -1
  2. package/build/eurostatmap.js +14318 -17933
  3. package/build/eurostatmap.min.js +2 -4
  4. package/build/eurostatmap.min.js.map +1 -1
  5. package/build/package.json +87 -0
  6. package/build/types/core/InsetConfig.d.ts +15 -0
  7. package/build/types/core/MapConfig.d.ts +85 -0
  8. package/build/types/core/MapInstance.d.ts +354 -0
  9. package/build/types/core/MinimapConfig.d.ts +11 -0
  10. package/build/types/core/TooltipConfig.d.ts +13 -0
  11. package/build/types/core/decoration/ScalebarConfig.d.ts +48 -0
  12. package/build/types/core/decoration/StampConfig.d.ts +71 -0
  13. package/build/types/core/geo/centroids.d.ts +33 -0
  14. package/build/types/core/geo/geometries.d.ts +56 -0
  15. package/build/types/core/geo/kosovo.d.ts +10 -0
  16. package/build/types/core/geo/proj4.d.ts +26 -0
  17. package/build/types/core/geo/projection.d.ts +29 -0
  18. package/build/types/core/insets.d.ts +16 -0
  19. package/build/types/core/layout.d.ts +23 -0
  20. package/build/types/core/locations.d.ts +55 -0
  21. package/build/types/core/minimaps.d.ts +20 -0
  22. package/build/types/core/scale.d.ts +30 -0
  23. package/build/types/core/stat/StatConfig.d.ts +27 -0
  24. package/build/types/core/stat/StatData.d.ts +107 -0
  25. package/build/types/core/utils.d.ts +194 -0
  26. package/build/types/core/zoom.d.ts +21 -0
  27. package/build/types/index.d.ts +237 -0
  28. package/build/types/legend/CategoricalLegendConfig.d.ts +13 -0
  29. package/build/types/legend/CoxcombLegendConfig.d.ts +85 -0
  30. package/build/types/legend/LegendConfig.d.ts +43 -0
  31. package/build/types/legend/MushroomLegendConfig.d.ts +56 -0
  32. package/build/types/legend/PatternFillLegendConfig.d.ts +11 -0
  33. package/build/types/legend/PieChartLegendConfig.d.ts +68 -0
  34. package/build/types/legend/SparklineLegendConfig.d.ts +68 -0
  35. package/build/types/legend/StripeCompositionLegendConfig.d.ts +11 -0
  36. package/build/types/legend/WaffleLegendConfig.d.ts +74 -0
  37. package/build/types/legend/choropleth/BivariateLegendConfig.d.ts +59 -0
  38. package/build/types/legend/choropleth/ChoroplethLegendConfig.d.ts +0 -0
  39. package/build/types/legend/choropleth/HistogramLegendConfig.d.ts +26 -0
  40. package/build/types/legend/choropleth/TrivariateLegendConfig.d.ts +32 -0
  41. package/build/types/legend/choropleth/legend-choropleth-bivariate.d.ts +2 -0
  42. package/build/types/legend/choropleth/legend-choropleth-trivariate.d.ts +2 -0
  43. package/build/types/legend/choropleth/legend-choropleth.d.ts +2 -0
  44. package/build/types/legend/composition/BarChartLegendConfig.d.ts +68 -0
  45. package/build/types/legend/composition/legend-bar-chart.d.ts +2 -0
  46. package/build/types/legend/flow/FlowLegendConfig.d.ts +0 -0
  47. package/build/types/legend/flow/FlowMapLegendConfig.d.ts +117 -0
  48. package/build/types/legend/flow/legend-flow.d.ts +2 -0
  49. package/build/types/legend/legend-categorical.d.ts +2 -0
  50. package/build/types/legend/legend-continuous.d.ts +2 -0
  51. package/build/types/legend/legend-discrete.d.ts +2 -0
  52. package/build/types/legend/legend.d.ts +13 -0
  53. package/build/types/legend/proportional-symbol/PropSymbolLegendConfig.d.ts +0 -0
  54. package/build/types/legend/proportional-symbol/ProportionalSymbolsLegendConfig.d.ts +134 -0
  55. package/build/types/legend/proportional-symbol/legend-proportional-symbols.d.ts +2 -0
  56. package/build/types/map-types/CategoricalMap.d.ts +21 -0
  57. package/build/types/map-types/CategoricalMapConfig.d.ts +11 -0
  58. package/build/types/map-types/CateogricalMapConfig.d.ts +11 -0
  59. package/build/types/map-types/MapType.d.ts +34 -0
  60. package/build/types/map-types/choropleth/BivariateChoroplethConfig.d.ts +15 -0
  61. package/build/types/map-types/choropleth/BivariateChoroplethMap.d.ts +39 -0
  62. package/build/types/map-types/choropleth/ChoroplethConfig.d.ts +29 -0
  63. package/build/types/map-types/choropleth/ChoroplethMap.d.ts +48 -0
  64. package/build/types/map-types/choropleth/TrivariateChoroplethConfig.d.ts +18 -0
  65. package/build/types/map-types/choropleth/TrivariateChoroplethMap.d.ts +15 -0
  66. package/build/types/map-types/choropleth/ValueByAlphaConfig.d.ts +8 -0
  67. package/build/types/map-types/choropleth/ValueByAlphaMap.d.ts +9 -0
  68. package/build/types/map-types/choropleth/map-choropleth-bivariate.d.ts +4 -0
  69. package/build/types/map-types/choropleth/map-choropleth-trivariate.d.ts +4 -0
  70. package/build/types/map-types/choropleth/map-choropleth.d.ts +47 -0
  71. package/build/types/map-types/choropleth/map-value-by-alpha.d.ts +4 -0
  72. package/build/types/map-types/composition/BarMap.d.ts +86 -0
  73. package/build/types/map-types/composition/BarMapConfig.d.ts +30 -0
  74. package/build/types/map-types/composition/CompositionStatConfig.d.ts +21 -0
  75. package/build/types/map-types/composition/CoxcombMap.d.ts +42 -0
  76. package/build/types/map-types/composition/CoxcombMapConfig.d.ts +18 -0
  77. package/build/types/map-types/composition/PieMap.d.ts +62 -0
  78. package/build/types/map-types/composition/PieMapConfig.d.ts +24 -0
  79. package/build/types/map-types/composition/SparkMap.d.ts +46 -0
  80. package/build/types/map-types/composition/SparkMapConfig.d.ts +25 -0
  81. package/build/types/map-types/composition/StripeMap.d.ts +43 -0
  82. package/build/types/map-types/composition/StripeMapConfig.d.ts +16 -0
  83. package/build/types/map-types/composition/WaffleMap.d.ts +71 -0
  84. package/build/types/map-types/composition/WaffleMapConfig.d.ts +25 -0
  85. package/build/types/map-types/composition/bar/BarMap.d.ts +78 -0
  86. package/build/types/map-types/composition/bar/BarMapConfig.d.ts +30 -0
  87. package/build/types/map-types/composition/composition-map.d.ts +25 -0
  88. package/build/types/map-types/composition/coxcomb/CoxcombMap.d.ts +42 -0
  89. package/build/types/map-types/composition/coxcomb/CoxcombMapConfig.d.ts +18 -0
  90. package/build/types/map-types/composition/coxcomb/CoxcombStatConfig.d.ts +14 -0
  91. package/build/types/map-types/composition/map-bar.d.ts +5 -0
  92. package/build/types/map-types/composition/map-coxcomb.d.ts +5 -0
  93. package/build/types/map-types/composition/map-pie.d.ts +10 -0
  94. package/build/types/map-types/composition/map-spark.d.ts +5 -0
  95. package/build/types/map-types/composition/map-stripe.d.ts +5 -0
  96. package/build/types/map-types/composition/map-waffle.d.ts +5 -0
  97. package/build/types/map-types/composition/pie/PieMap.d.ts +62 -0
  98. package/build/types/map-types/composition/pie/PieMapConfig.d.ts +24 -0
  99. package/build/types/map-types/composition/stripe/StripeMap.d.ts +43 -0
  100. package/build/types/map-types/composition/stripe/StripeMapConfig.d.ts +16 -0
  101. package/build/types/map-types/composition/waffle/WaffleMap.d.ts +71 -0
  102. package/build/types/map-types/composition/waffle/WaffleMapConfig.d.ts +25 -0
  103. package/build/types/map-types/flow/FlowMap.d.ts +97 -0
  104. package/build/types/map-types/flow/FlowMapConfig.d.ts +103 -0
  105. package/build/types/map-types/flow/map-flow.d.ts +5 -0
  106. package/build/types/map-types/map-categorical.d.ts +19 -0
  107. package/build/types/map-types/proportional-symbol/ProportionalSymbolConfig.d.ts +24 -0
  108. package/build/types/map-types/proportional-symbol/ProportionalSymbolMap.d.ts +99 -0
  109. package/build/types/map-types/proportional-symbol/map-proportional-symbols.d.ts +35 -0
  110. package/build/types/map-types/proportional-symbol/mushroom/MushroomMap.d.ts +30 -0
  111. package/build/types/map-types/proportional-symbol/mushroom/MushroomMapConfig.d.ts +15 -0
  112. package/build/types/map-types/spark/SparkMap.d.ts +48 -0
  113. package/build/types/map-types/spark/SparkMapConfig.d.ts +25 -0
  114. package/build/types/map-types/spark/SparkStatConfig.d.ts +10 -0
  115. package/build/types/utils/FillPatternOptions.d.ts +17 -0
  116. package/package.json +8 -5
@@ -0,0 +1,59 @@
1
+ import { LegendConfig } from '../LegendConfig'
2
+
3
+ /**
4
+ * Configuration for bivariate choropleth map legends.
5
+ * Displays a 2D grid showing the relationship between two variables,
6
+ * with color squares representing different class combinations.
7
+ */
8
+ export interface BivariateLegendConfig extends LegendConfig {
9
+ /** Size of the legend square grid in pixels. @default 100 */
10
+ squareSize?: number
11
+
12
+ /** Rotation angle of the legend in degrees. @default 0 */
13
+ rotation?: number
14
+
15
+ /** Label for the first variable (y-axis). @default 'Variable 1' */
16
+ label1?: string
17
+
18
+ /** Label for the second variable (x-axis). @default 'Variable 2' */
19
+ label2?: string
20
+
21
+ /** Break points for the first variable. Auto-calculated if undefined. */
22
+ breaks1?: number[]
23
+
24
+ /** Break points for the second variable. Auto-calculated if undefined. */
25
+ breaks2?: number[]
26
+
27
+ /** Whether to show break labels on the axes. @default false */
28
+ showBreaks?: boolean
29
+
30
+ /** Length of axis tick marks in pixels. @default 5 */
31
+ tickLength?: number
32
+
33
+ /** Offset adjustments for y-axis labels. @default { x: 0, y: 0 } */
34
+ yAxisLabelsOffset?: { x: number; y: number }
35
+
36
+ /** Offset adjustments for x-axis labels. @default { x: 0, y: 0 } */
37
+ xAxisLabelsOffset?: { x: number; y: number }
38
+
39
+ /** Offset adjustments for y-axis title. @default { x: 0, y: 0 } */
40
+ yAxisTitleOffset?: { x: number; y: number }
41
+
42
+ /** Offset adjustments for x-axis title. @default { x: 0, y: 0 } */
43
+ xAxisTitleOffset?: { x: number; y: number }
44
+
45
+ /** Extra vertical offset for the "no data" legend item in pixels. @default 30 */
46
+ noDataYOffset?: number
47
+
48
+ /** Whether to show arrows at the end of the axes. @default true */
49
+ axisArrows?: boolean
50
+
51
+ /** Height of axis arrows in pixels. @default 15 */
52
+ arrowHeight?: number
53
+
54
+ /** Width of axis arrows in pixels. @default 14 */
55
+ arrowWidth?: number
56
+
57
+ /** Padding between arrow and axis label in pixels. @default 10 */
58
+ arrowPadding?: number
59
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Configuration for histogram display in choropleth legends.
3
+ * Shows the distribution of data values across classification bins as bars.
4
+ */
5
+ export interface HistogramLegendConfig {
6
+ /** Orientation of the histogram bars. @default 'horizontal' */
7
+ orientation?: 'horizontal' | 'vertical'
8
+
9
+ /** Whether to show count values on the bars. @default false */
10
+ showCounts?: boolean
11
+
12
+ /** Whether to show percentage values on the bars. @default false */
13
+ showPercentages?: boolean
14
+
15
+ /** Rotation angle for axis labels in degrees. @default 0 */
16
+ labelRotation?: number
17
+
18
+ /** Margins around the histogram. @default { top: 0, right: 0, bottom: 0, left: 0 } */
19
+ margin?: { top: number; right: number; bottom: number; left: number }
20
+
21
+ /** Height of the histogram in pixels. @default 200 */
22
+ height?: number
23
+
24
+ /** Width of the histogram in pixels. @default 270 */
25
+ width?: number
26
+ }
@@ -0,0 +1,32 @@
1
+ export interface TrivariateLegendConfig {
2
+ /** Width of the legend in pixels. @default 160 */
3
+ width?: number
4
+ /** Height of the legend in pixels. @default 160 */
5
+ height?: number
6
+ /** Padding around the ternary plot. @default { top: 50, right: 50, bottom: 10, left: 50 } */
7
+ padding?: { top: number; right: number; bottom: number; left: number }
8
+ /** Plot type. @default 'continuous' */
9
+ type?: 'continuous' | 'discrete'
10
+ /** Whether to show the center point and guide lines. @default true */
11
+ showCenter?: boolean
12
+ /** Label for the center annotation. @default 'Average' */
13
+ centerLabel?: string
14
+ /** Whether to show grid lines. @default false */
15
+ showLines?: boolean
16
+ /** Number of minor grid subdivisions between major grid lines. @default 5 */
17
+ minorSubdivisions?: number
18
+ /** Axis corner labels. @default ['Variable 1', 'Variable 2', 'Variable 3'] */
19
+ labels?: [string, string, string]
20
+ /** Position of axis labels. @default 'edge' */
21
+ labelPosition?: 'corner' | 'edge'
22
+ /** Whether colour is applied to triangles or data points. @default 'points' */
23
+ colorTarget?: 'triangles' | 'points'
24
+ /** Whether to render data points. @default true */
25
+ showData?: boolean
26
+ /** Offsets for the center annotation label and curve. */
27
+ centerAnnotationOffsets?: { labelX: number; labelY: number; curveX: number; curveY: number }
28
+ /** Legend title. */
29
+ title?: string
30
+ /** Legend subtitle. */
31
+ subtitle?: string
32
+ }
@@ -0,0 +1,2 @@
1
+ /** Creates a bivariate choropleth legend */
2
+ export function legend(config?: any): any
@@ -0,0 +1,2 @@
1
+ /** Creates a trivariate choropleth legend */
2
+ export function legend(config?: any): any
@@ -0,0 +1,2 @@
1
+ /** Creates a choropleth legend */
2
+ export function legend(config?: any): any
@@ -0,0 +1,68 @@
1
+ import { LegendConfig } from '../LegendConfig'
2
+
3
+ /**
4
+ * Configuration for size legend in bar chart maps.
5
+ */
6
+ export interface BarChartSizeLegendConfig {
7
+ /** Title for the size legend. */
8
+ title?: string | null
9
+
10
+ /** Padding between title and legend content in pixels. @default 10 */
11
+ titlePadding?: number
12
+
13
+ /** Custom values to display in the size legend. If null, auto-generates [min, mid, max]. */
14
+ values?: number[] | null
15
+
16
+ /** Custom formatter function for legend labels. */
17
+ labelFormatter?: ((value: number) => string) | undefined
18
+
19
+ /** Whether to show a "no data" item. @default false */
20
+ noData?: boolean
21
+
22
+ /** Text label for "no data" item. @default 'No data' */
23
+ noDataText?: string
24
+ }
25
+
26
+ /**
27
+ * Configuration for color legend in bar chart maps.
28
+ */
29
+ export interface BarChartColorLegendConfig {
30
+ /** Title for the color legend. */
31
+ title?: string | null
32
+
33
+ /** Padding between title and legend content in pixels. @default 10 */
34
+ titlePadding?: number
35
+
36
+ /** Top margin (distance from size legend) in pixels. @default 20 */
37
+ marginTop?: number
38
+
39
+ /** Offset adjustments for labels. @default { x: 5, y: 5 } */
40
+ labelOffsets?: { x: number; y: number }
41
+
42
+ /** Width of color swatches in pixels. @default 25 */
43
+ shapeWidth?: number
44
+
45
+ /** Height of color swatches in pixels. @default 20 */
46
+ shapeHeight?: number
47
+
48
+ /** Padding between swatches in pixels. @default 1 */
49
+ shapePadding?: number
50
+
51
+ /** Whether to show a "no data" item. @default true */
52
+ noData?: boolean
53
+
54
+ /** Text label for "no data" item. @default 'No data' */
55
+ noDataText?: string
56
+ }
57
+
58
+ /**
59
+ * Configuration for bar chart map legends.
60
+ * Adapts automatically to the map's barType ('stacked' or 'grouped').
61
+ */
62
+ export interface BarChartLegendConfig extends LegendConfig {
63
+ /** Configuration for the bar size legend. Set to false to hide. */
64
+ sizeLegend?: Partial<BarChartSizeLegendConfig> | false
65
+
66
+ /** Configuration for the color/category legend. Set to false to hide. */
67
+ colorLegend?: Partial<BarChartColorLegendConfig> | false
68
+ }
@@ -0,0 +1,2 @@
1
+ /** Creates a bar chart legend */
2
+ export function legend(config?: any): any
File without changes
@@ -0,0 +1,117 @@
1
+ import { LegendConfig } from '../LegendConfig'
2
+
3
+ /**
4
+ * Configuration for flow width legend in flow maps.
5
+ */
6
+ export interface FlowWidthLegendConfig {
7
+ /** Title for the flow width legend. */
8
+ title?: string | null
9
+
10
+ /** Padding between title and legend content in pixels. @default 20 */
11
+ titlePadding?: number
12
+
13
+ /** Custom values to display in the flow width legend. If null, values are auto-generated. */
14
+ values?: number[] | null
15
+
16
+ /** Top margin for the flow width legend in pixels. @default 15 */
17
+ marginTop?: number
18
+
19
+ /** Custom formatter function for legend labels. */
20
+ labelFormatter?: ((value: number) => string) | undefined
21
+
22
+ /** Manual override for legend labels. */
23
+ labels?: string[] | null
24
+
25
+ /** Color of the flow lines in the legend. @default '#616161' */
26
+ color?: string
27
+
28
+ /** Orientation of the flow width legend. @default 'horizontal' */
29
+ orientation?: 'horizontal' | 'vertical'
30
+
31
+ /** Number of segments to display. @default 3 */
32
+ segments?: number
33
+
34
+ /** Width of the legend in pixels. @default 150 */
35
+ width?: number
36
+
37
+ /** Whether to show max/min labels. @default false */
38
+ maxMin?: boolean
39
+ }
40
+
41
+ /**
42
+ * Configuration for node size legend in flow maps.
43
+ */
44
+ export interface NodeSizeLegendConfig {
45
+ /** Title for the node size legend. */
46
+ title?: string | null
47
+
48
+ /** Padding between title and legend content in pixels. @default 25 */
49
+ titlePadding?: number
50
+
51
+ /** Custom values to display in the node size legend. If null, values are auto-generated. */
52
+ values?: number[] | null
53
+
54
+ /** Manual override for legend labels. */
55
+ labels?: string[] | null
56
+
57
+ /** Top margin for the node size legend in pixels. @default 20 */
58
+ marginTop?: number
59
+
60
+ /** Custom formatter function for legend labels. */
61
+ labelFormatter?: ((value: number) => string) | undefined
62
+ }
63
+
64
+ /**
65
+ * Configuration for flow color legend in flow maps.
66
+ */
67
+ export interface FlowColorLegendConfig {
68
+ /** Title for the flow color legend. */
69
+ title?: string | null
70
+
71
+ /** Padding between title and legend content in pixels. @default 0 */
72
+ titlePadding?: number
73
+
74
+ /** Top margin for the flow color legend in pixels. @default 50 */
75
+ marginTop?: number
76
+
77
+ /** User-defined legend items for custom flow color function. */
78
+ items?: Array<{ label: string; color: string }>
79
+
80
+ /** Whether to use labels as ticks. @default false */
81
+ ticks?: boolean
82
+ }
83
+
84
+ /**
85
+ * Configuration for region color legend in flow maps.
86
+ */
87
+ export interface RegionColorLegendConfig {
88
+ /** Title for the region color legend. */
89
+ title?: string | null
90
+
91
+ /** Padding between title and legend content in pixels. @default 15 */
92
+ titlePadding?: number
93
+
94
+ /** Top margin for the region color legend in pixels. @default 40 */
95
+ marginTop?: number
96
+
97
+ /** Labels for the region types. @default ['Exporter', 'Importer'] */
98
+ labels?: string[]
99
+ }
100
+
101
+ /**
102
+ * Configuration for flow map legends.
103
+ * Flow maps can display multiple legend types: flow width, node size, flow color, and region color.
104
+ */
105
+ export interface FlowMapLegendConfig extends LegendConfig {
106
+ /** Configuration for the flow width legend. */
107
+ flowWidthLegend?: Partial<FlowWidthLegendConfig>
108
+
109
+ /** Configuration for the node size legend. */
110
+ nodeSizeLegend?: Partial<NodeSizeLegendConfig>
111
+
112
+ /** Configuration for the flow color legend. */
113
+ flowColorLegend?: Partial<FlowColorLegendConfig>
114
+
115
+ /** Configuration for the region color legend. */
116
+ regionColorLegend?: Partial<RegionColorLegendConfig>
117
+ }
@@ -0,0 +1,2 @@
1
+ /** Creates a flow map legend */
2
+ export function legend(config?: any): any
@@ -0,0 +1,2 @@
1
+ /** Creates a categorical legend */
2
+ export function legend(config?: any): any
@@ -0,0 +1,2 @@
1
+ /** Creates a continuous legend */
2
+ export function legend(config?: any): any
@@ -0,0 +1,2 @@
1
+ /** Creates a discrete legend */
2
+ export function legend(config?: any): any
@@ -0,0 +1,13 @@
1
+ import type { MapInstance } from '../core/MapInstance'
2
+
3
+ /** Base legend configuration */
4
+ export interface LegendConfig {
5
+ title?: string
6
+ titleFontSize?: number
7
+ labelFontSize?: number
8
+ labelDelimiter?: string
9
+ noDataText?: string
10
+ }
11
+
12
+ /** Creates a legend instance */
13
+ export function legend(config?: LegendConfig): any
@@ -0,0 +1,134 @@
1
+ import { LegendConfig } from '../LegendConfig'
2
+
3
+ /**
4
+ * Configuration for size legend in proportional symbol maps.
5
+ */
6
+ export interface ProportionalSymbolSizeLegendConfig {
7
+ /** Title for the size legend. */
8
+ title?: string | null
9
+
10
+ /** Padding between title and legend content in pixels. @default 15 */
11
+ titlePadding?: number
12
+
13
+ /** Manually defined raw data values for the size legend. */
14
+ values?: number[]
15
+
16
+ /** Number of elements to display in the legend. @default 3 */
17
+ cellNb?: number
18
+
19
+ /** Vertical distance between consecutive legend shape elements in pixels. @default 15 */
20
+ shapePadding?: number
21
+
22
+ /** Offset adjustments for shapes. @default { x: 0, y: 0 } */
23
+ shapeOffsets?: { x: number; y: number }
24
+
25
+ /** Fill color for shapes in the legend. @default 'white' */
26
+ shapeFill?: string
27
+
28
+ /** Stroke color for shapes in the legend. */
29
+ shapeStroke?: string | null
30
+
31
+ /** Stroke width for shapes in the legend in pixels. */
32
+ shapeStrokeWidth?: number | null
33
+
34
+ /** Offset adjustments for labels. @default { x: 10, y: 0 } */
35
+ labelOffsets?: { x: number; y: number }
36
+
37
+ /** Number of decimal places for legend labels. @default 0 */
38
+ decimals?: number
39
+
40
+ /** Custom formatter function for legend labels. */
41
+ labelFormatter?: ((value: number) => string) | undefined
42
+
43
+ /** User-defined labels for each size. */
44
+ labels?: string[] | null
45
+
46
+ /** Whether to show a "no data" item. @default false */
47
+ noData?: boolean
48
+
49
+ /** Text label for "no data" item. @default 'No data' */
50
+ noDataText?: string
51
+ }
52
+
53
+ /**
54
+ * Configuration for color legend in proportional symbol maps.
55
+ */
56
+ export interface ProportionalSymbolColorLegendConfig {
57
+ /** Title for the color legend. */
58
+ title?: string | null
59
+
60
+ /** Padding between title and legend content in pixels. @default 10 */
61
+ titlePadding?: number
62
+
63
+ /** Top margin (distance from size legend) in pixels. @default 30 */
64
+ marginTop?: number
65
+
66
+ /** Width of color swatches in pixels. @default 25 */
67
+ shapeWidth?: number
68
+
69
+ /** Height of color swatches in pixels. @default 20 */
70
+ shapeHeight?: number
71
+
72
+ /** Padding between swatches in pixels. @default 1 */
73
+ shapePadding?: number
74
+
75
+ /** Offset adjustments for labels. @default { x: 5, y: 0 } */
76
+ labelOffsets?: { x: number; y: number }
77
+
78
+ /** Number of decimal places for legend labels. @default 0 */
79
+ decimals?: number
80
+
81
+ /** Custom formatter function for legend labels. */
82
+ labelFormatter?: ((value: number) => string) | undefined
83
+
84
+ /** Type of labels to show. @default 'thresholds' */
85
+ labelType?: 'thresholds' | 'ranges'
86
+
87
+ /** User-defined labels for each class. */
88
+ labels?: string[] | null
89
+
90
+ /** Whether to show a "no data" item. @default true */
91
+ noData?: boolean
92
+
93
+ /** Text label for "no data" item. @default 'No data' */
94
+ noDataText?: string
95
+
96
+ /** Length of separation line in pixels. @default 24 */
97
+ sepLineLength?: number
98
+
99
+ /** Color of separation line. @default 'black' */
100
+ sepLineStroke?: string
101
+
102
+ /** Width of separation line in pixels. @default 1 */
103
+ sepLineStrokeWidth?: number
104
+
105
+ /** Length of threshold ticks in pixels. @default 5 */
106
+ tickLength?: number
107
+
108
+ /** Label for the point of divergence in diverging legends. */
109
+ pointOfDivergenceLabel?: string
110
+
111
+ /** Value at the point of divergence in diverging legends. */
112
+ pointOfDivergence?: number
113
+
114
+ /** Padding around divergence point in pixels. @default 7 */
115
+ pointOfDivergencePadding?: number
116
+
117
+ /** Length of diverging line in pixels. */
118
+ divergingLineLength?: number
119
+
120
+ /** Length of diverging arrows in pixels. */
121
+ divergingArrowLength?: number
122
+ }
123
+
124
+ /**
125
+ * Configuration for proportional symbol map legends.
126
+ * Shows both symbol size and color classifications.
127
+ */
128
+ export interface ProportionalSymbolsLegendConfig extends LegendConfig {
129
+ /** Configuration for the symbol size legend. */
130
+ sizeLegend?: Partial<ProportionalSymbolSizeLegendConfig>
131
+
132
+ /** Configuration for the color classification legend. Set to false to hide. */
133
+ colorLegend?: Partial<ProportionalSymbolColorLegendConfig> | false
134
+ }
@@ -0,0 +1,2 @@
1
+ /** Creates a proportional symbols legend */
2
+ export function legend(config?: any): any
@@ -0,0 +1,21 @@
1
+ import type { MapInstance } from '../core/MapInstance'
2
+
3
+ /**
4
+ * Categorical map type.
5
+ */
6
+ export interface CategoricalMap extends MapInstance {
7
+ classToFillStyle(): any
8
+ classToFillStyle(v: any): this
9
+
10
+ classToText(): any
11
+ classToText(v: any): this
12
+
13
+ noDataFillStyle(): string
14
+ noDataFillStyle(v: string): this
15
+
16
+ tooltipText(): any
17
+ tooltipText(v: any): this
18
+
19
+ classifier(): any
20
+ classifier(v: any): this
21
+ }
@@ -0,0 +1,11 @@
1
+ import type { MapConfig } from '../core/MapConfig'
2
+
3
+ /**
4
+ * Configuration for categorical map
5
+ */
6
+ export interface CategoricalMapConfig extends MapConfig {
7
+ /** Category-to-color mapping */
8
+ classToFillStyle?: Record<string, string>
9
+ /** Fill style for regions with no data */
10
+ noDataFillStyle?: string
11
+ }
@@ -0,0 +1,11 @@
1
+ import type { MapConfig } from '../core/MapConfig'
2
+
3
+ /**
4
+ * Configuration for categorical map
5
+ */
6
+ export interface CategoricalMapConfig extends MapConfig {
7
+ /** Category-to-color mapping */
8
+ classToFillStyle?: Record<string, string>
9
+ /** Fill style for regions with no data */
10
+ noDataFillStyle?: string
11
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * All supported map types
3
+ */
4
+ export type MapType =
5
+ | 'choropleth'
6
+ | 'ch'
7
+ | 'proportionalSymbol'
8
+ | 'proportionalSymbols'
9
+ | 'ps'
10
+ | 'categorical'
11
+ | 'ct'
12
+ | 'bivariateChoropleth'
13
+ | 'chbi'
14
+ | 'trivariateChoropleth'
15
+ | 'ternary'
16
+ | 'chtri'
17
+ | 'stripeComposition'
18
+ | 'scomp'
19
+ | 'stripe'
20
+ | 'pieChart'
21
+ | 'pie'
22
+ | 'sparkline'
23
+ | 'spark'
24
+ | 'sparklines'
25
+ | 'flow'
26
+ | 'flowmap'
27
+ | 'coxcomb'
28
+ | 'polar'
29
+ | 'alpha'
30
+ | 'valueByAlpha'
31
+ | 'mushroom'
32
+ | 'waffle'
33
+ | 'bar'
34
+ | 'barComposition'
@@ -0,0 +1,15 @@
1
+ import type { MapConfig } from '../../core/MapConfig'
2
+
3
+ /**
4
+ * Configuration for bivariate choropleth maps.
5
+ */
6
+ export interface BivariateChoroplethConfig extends MapConfig {
7
+ numberOfClasses?: number
8
+ breaks1?: number[]
9
+ breaks2?: number[]
10
+ startColor?: string
11
+ color1?: string
12
+ color2?: string
13
+ endColor?: string
14
+ noDataFillStyle?: string
15
+ }
@@ -0,0 +1,39 @@
1
+ import type { MapInstance } from '../../core/MapInstance'
2
+
3
+ /**
4
+ * Bivariate choropleth map type.
5
+ */
6
+ export interface BivariateChoroplethMap extends MapInstance {
7
+ numberOfClasses(): number
8
+ numberOfClasses(v: number): this
9
+
10
+ breaks1(): number[] | undefined
11
+ breaks1(v: number[] | undefined): this
12
+
13
+ breaks2(): number[] | undefined
14
+ breaks2(v: number[] | undefined): this
15
+
16
+ startColor(): string
17
+ startColor(v: string): this
18
+
19
+ color1(): string
20
+ color1(v: string): this
21
+
22
+ color2(): string
23
+ color2(v: string): this
24
+
25
+ endColor(): string
26
+ endColor(v: string): this
27
+
28
+ classToFillStyle(): any
29
+ classToFillStyle(v: any): this
30
+
31
+ noDataFillStyle(): string
32
+ noDataFillStyle(v: string): this
33
+
34
+ classifier1(): any
35
+ classifier1(v: any): this
36
+
37
+ classifier2(): any
38
+ classifier2(v: any): this
39
+ }
@@ -0,0 +1,29 @@
1
+ import { MapConfig } from '../../core/MapConfig'
2
+
3
+ /**
4
+ * Configuration specific to choropleth maps
5
+ */
6
+ export interface ChoroplethConfig extends MapConfig {
7
+ // Classification
8
+ numberOfClasses?: number
9
+ classificationMethod?: 'quantile' | 'ckmeans' | 'jenks' | 'equinter' | 'threshold'
10
+ thresholds?: number[]
11
+ makeClassifNice?: boolean
12
+
13
+ // Colors
14
+ colors?: string[]
15
+ colorFunction?: (t: number) => string
16
+ colorSchemeType?: 'discrete' | 'continuous'
17
+ classToFillStyle?: { [classIndex: number]: string }
18
+
19
+ // No data styling
20
+ noDataFillStyle?: string
21
+
22
+ // Value transformation (for continuous schemes)
23
+ valueTransform?: (x: number) => number
24
+ valueUntransform?: (x: number) => number
25
+ skipNormalization?: boolean
26
+
27
+ // Diverging schemes
28
+ pointOfDivergence?: number
29
+ }