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.
Files changed (48) hide show
  1. package/README.md +54 -78
  2. package/build/215.eurostatmap.min.js +1 -1
  3. package/build/eurostatmap.js +2700 -353
  4. package/build/eurostatmap.min.js +2 -2
  5. package/build/eurostatmap.min.js.map +1 -1
  6. package/build/types/core/DorlingSettings.d.ts +29 -0
  7. package/build/types/core/GridCartogramSettings.d.ts +30 -0
  8. package/build/types/core/InsetConfig.d.ts +9 -1
  9. package/build/types/core/MapConfig.d.ts +124 -41
  10. package/build/types/core/MapInstance.d.ts +120 -32
  11. package/build/types/core/TooltipConfig.d.ts +3 -0
  12. package/build/types/core/decoration/CoastalMarginSettings.d.ts +21 -0
  13. package/build/types/core/geo/geometries.d.ts +15 -0
  14. package/build/types/core/geo/kosovo.d.ts +2 -0
  15. package/build/types/core/stat/StatData.d.ts +6 -0
  16. package/build/types/core/utils.d.ts +4 -0
  17. package/build/types/index.d.ts +28 -12
  18. package/build/types/legend/LegendConfig.d.ts +42 -17
  19. package/build/types/legend/SparklineLegendConfig.d.ts +6 -68
  20. package/build/types/legend/choropleth/ChoroplethLegendConfig.d.ts +80 -0
  21. package/build/types/legend/composition/CoxcombLegendConfig.d.ts +85 -0
  22. package/build/types/legend/composition/PieChartLegendConfig.d.ts +68 -0
  23. package/build/types/legend/composition/SparklineLegendConfig.d.ts +94 -0
  24. package/build/types/legend/composition/StripeCompositionLegendConfig.d.ts +11 -0
  25. package/build/types/legend/composition/WaffleLegendConfig.d.ts +74 -0
  26. package/build/types/map-types/choropleth/BivariateChoroplethConfig.d.ts +12 -0
  27. package/build/types/map-types/choropleth/ChoroplethConfig.d.ts +15 -5
  28. package/build/types/map-types/choropleth/TrivariateChoroplethConfig.d.ts +14 -0
  29. package/build/types/map-types/composition/CompositionStatConfig.d.ts +14 -1
  30. package/build/types/map-types/composition/bar/BarMap.d.ts +4 -3
  31. package/build/types/map-types/composition/bar/BarMapConfig.d.ts +25 -1
  32. package/build/types/map-types/composition/coxcomb/CoxcombMap.d.ts +4 -0
  33. package/build/types/map-types/composition/coxcomb/CoxcombMapConfig.d.ts +14 -0
  34. package/build/types/map-types/composition/coxcomb/CoxcombStatConfig.d.ts +4 -2
  35. package/build/types/map-types/composition/pie/PieMap.d.ts +10 -3
  36. package/build/types/map-types/composition/pie/PieMapConfig.d.ts +19 -1
  37. package/build/types/map-types/composition/stripe/StripeMap.d.ts +9 -0
  38. package/build/types/map-types/composition/stripe/StripeMapConfig.d.ts +12 -0
  39. package/build/types/map-types/composition/waffle/WaffleMap.d.ts +10 -3
  40. package/build/types/map-types/composition/waffle/WaffleMapConfig.d.ts +20 -1
  41. package/build/types/map-types/flow/FlowMapConfig.d.ts +55 -0
  42. package/build/types/map-types/proportional-symbol/ProportionalSymbolConfig.d.ts +4 -11
  43. package/build/types/map-types/proportional-symbol/ProportionalSymbolMap.d.ts +0 -9
  44. package/build/types/map-types/proportional-symbol/mushroom/MushroomMapConfig.d.ts +5 -0
  45. package/build/types/map-types/spark/SparkMap.d.ts +6 -2
  46. package/build/types/map-types/spark/SparkMapConfig.d.ts +17 -0
  47. package/build/types/map-types/spark/SparkStatConfig.d.ts +6 -0
  48. package/package.json +9 -2
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Strength settings for Dorling force simulation.
3
+ */
4
+ export interface DorlingStrength {
5
+ /** X-axis attraction strength. */
6
+ x: number
7
+ /** Y-axis attraction strength. */
8
+ y: number
9
+ }
10
+
11
+ /**
12
+ * Settings for Dorling cartogram simulation behavior.
13
+ */
14
+ export interface DorlingSettings {
15
+ /** Animate simulation ticks in real time. */
16
+ animate: boolean
17
+ /** Gravity strength toward original centroids. */
18
+ strength: DorlingStrength
19
+ /** Collision force iterations per tick. */
20
+ iterations: number
21
+ /** Extra collision padding between symbols. */
22
+ padding: number
23
+ /** Progress callback used by worker-based simulation. */
24
+ onProgress?: (progress: number, map: any) => void
25
+ /** Run non-animated simulation in a Web Worker. */
26
+ worker: boolean
27
+ /** URL of the D3 bundle used by Dorling worker mode. */
28
+ workerD3URL?: string
29
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Margins used to place and center grid cartograms.
3
+ */
4
+ export interface GridCartogramMargins {
5
+ /** Top margin in pixels. */
6
+ top: number
7
+ /** Right margin in pixels. */
8
+ right: number
9
+ /** Bottom margin in pixels. */
10
+ bottom: number
11
+ /** Left margin in pixels. */
12
+ left: number
13
+ }
14
+
15
+ /**
16
+ * Settings for grid cartogram layout and geometry.
17
+ */
18
+ export interface GridCartogramSettings {
19
+ /** Grid cell shape. */
20
+ shape: 'square' | 'hexagon'
21
+ /** Margins around the grid drawing area. */
22
+ margins: GridCartogramMargins
23
+ /** Extra spacing between grid cells in pixels. */
24
+ cellPadding: number
25
+ /**
26
+ * Custom grid layout CSV string.
27
+ * If undefined, the built-in layout for the selected shape is used.
28
+ */
29
+ positions?: string
30
+ }
@@ -2,13 +2,21 @@
2
2
  * Configuration for map insets (smaller additional maps)
3
3
  */
4
4
  export interface InsetConfig {
5
- geo?: string // Geographic code (e.g., 'MT', 'PT20', 'CARIB')
5
+ /** Geographic code (e.g., 'MT', 'PT20', 'CARIB'). */
6
+ geo?: string
7
+ /** Title. */
6
8
  title?: string
9
+ /** Scale. */
7
10
  scale?: string | number
11
+ /** Width. */
8
12
  width?: number
13
+ /** Height. */
9
14
  height?: number
15
+ /** X. */
10
16
  x?: number
17
+ /** Y. */
11
18
  y?: number
19
+ /** Proj. */
12
20
  proj?: string
13
21
 
14
22
  [key: string]: any
@@ -3,83 +3,166 @@ import type { LegendConfig } from '../legend/LegendConfig'
3
3
  import type { TooltipConfig } from './TooltipConfig'
4
4
  import type { InsetConfig } from './InsetConfig'
5
5
  import type { MapInstance as EurostatMap } from './MapInstance'
6
+ import type { CoastalMarginSettings } from './decoration/CoastalMarginSettings'
7
+ import type { GridCartogramSettings } from './GridCartogramSettings'
8
+ import type { DorlingSettings } from './DorlingSettings'
9
+ import type { ScalebarConfig } from './decoration/ScalebarConfig'
6
10
 
7
11
  /**
8
12
  * Base configuration for all map types. Each specific map type will extend this with its own properties, but these are the common ones that apply to all maps.
9
13
  */
10
14
  export interface MapConfig {
11
- // Container settings
15
+ /** Container settings. */
12
16
  svgId?: string
17
+ /** ID of the container element used to host the map. */
13
18
  containerId?: string
14
19
 
15
- // Geographic settings
16
- proj?: string // NUTS2json geometries projection: '3035', '3857', '4326'. For custom projections use 4326, then set the desired projection with projectionFunction()
17
- projectionFunction?: () => any // Function to set a custom projection. See d3-geo projections for examples.
18
- scale?: '60M' | '20M' | '10M' | '03M' | '01M' // Scale of the map, for NUTSjson geometries
19
- nutsLevel?: number // 0, 1, 2, 3
20
+ /** Geographic settings. */
21
+ /**
22
+ * NUTS2json geometries projection: '3035', '3857', '4326'.
23
+ * For custom projections, use 4326 and then set projectionFunction().
24
+ */
25
+ proj?: string
26
+ /** Function to set a custom projection. See d3-geo projections for examples. */
27
+ projectionFunction?: () => any
28
+ /** Scale of the map, for NUTSjson geometries. */
29
+ scale?: '60M' | '20M' | '10M' | '03M' | '01M'
30
+ /** NUTS level (0, 1, 2, 3). */
31
+ nutsLevel?: number
32
+ /** NUTS boundary year. */
20
33
  nutsYear?: number | string
34
+ /** Geographic center as [longitude, latitude]. */
21
35
  geoCenter?: [number, number]
22
- pixSize?: number
23
36
 
24
- // Geometry settings
25
- geo?: string // NUTS2JSON Geographic focus (e.g., 'EUR', 'WORLD', 'IC', 'GF') see https://github.com/eurostat/Nuts2json#overseas-territories---map-insets
37
+ /** Geometry settings. */
38
+ /**
39
+ * NUTS2JSON geographic focus (e.g., 'EUR', 'WORLD', 'IC', 'GF').
40
+ * See https://github.com/eurostat/Nuts2json#overseas-territories---map-insets
41
+ */
42
+ geo?: string
26
43
 
27
- // Map dimensions
44
+ /** Map dimensions. */
28
45
  width?: number
46
+ /** Map height in pixels. */
29
47
  height?: number
30
48
 
31
- // map texts
49
+ /** Map texts. */
50
+ /** Map title. */
32
51
  title?: string
52
+ /** Map subtitle. */
33
53
  subtitle?: string
34
- bottomText?: string
35
- botTxtFontSize?: number
36
- botTxtPadding?: number
37
- botTxtTooltipMessage?: string
54
+ /** Footnote text shown below the map. */
38
55
  footnote?: string
56
+ /** Data source text. */
39
57
  source?: string
40
58
 
41
- // Statistical data configuration
59
+ /** Statistical data configuration. */
42
60
  stat?: StatConfig
43
61
 
44
- // Legend configuration
45
- legend?: LegendConfig
62
+ /** Legend configuration. */
63
+ legend?: LegendConfig | false
46
64
 
47
- // Tooltip configuration
65
+ /** Tooltip configuration. */
48
66
  tooltip?: TooltipConfig
49
67
 
50
- // Insets (small additional maps)
68
+ /** Insets (small additional maps). */
51
69
  insets?: InsetConfig[]
52
70
 
53
- // Zoom and pan settings
71
+ /** Zoom and pan settings. */
54
72
  zoomExtent?: [number, number]
55
73
 
56
- // UI Controls
57
- showBtns?: boolean // Show zoom buttons
74
+ /** Grid cartogram layout settings. */
75
+ gridCartogramSettings?: Partial<GridCartogramSettings>
58
76
 
59
- // Coastal margin
60
- coastal?: boolean
61
- coastalMarginWidth?: number
62
- coastalMarginColor?: string
77
+ /** Dorling simulation settings. */
78
+ dorlingSettings?: Partial<DorlingSettings>
63
79
 
64
- // Graticule
65
- drawGraticule?: boolean
66
- graticuleStyle?: any
80
+ /** Show or hide the coastal margin effect. */
81
+ drawCoastalMargin?: boolean
82
+ /** Coastal margin settings to override defaults. */
83
+ coastalMarginSettings?: Partial<CoastalMarginSettings>
67
84
 
68
- // Borders
69
- borderWidth?: number
70
- borderColor?: string
85
+ /** Graticule. */
86
+ drawGraticule?: boolean
71
87
 
72
- // Labels
88
+ /** Labels. */
73
89
  labelling?: boolean
74
- labelSizeThreshold?: number
75
- labelOpacity?: number
76
90
 
77
- // Logo
78
- logoURL?: string
79
-
80
- // Callbacks
91
+ /** Fires once the map is built. */
81
92
  onBuild?: (map: EurostatMap) => void
82
93
 
83
- // Allow additional properties for extensibility
94
+ /** Scalebar configuration. Can be boolean or configuration object. */
95
+ scalebar?: ScalebarConfig | boolean
96
+
97
+ /** Grid cartogram enabled or disabled. */
98
+ gridCartogram?: boolean
99
+
100
+ /** Custom geometry filtering function. */
101
+ filterGeometriesFunction?: (geometry: any) => boolean
102
+
103
+ /** Toggle background map rendering (sea, country boundaries, etc.). */
104
+ backgroundMap?: boolean
105
+
106
+ /** Minimap configuration. */
107
+ minimap?: any
108
+
109
+ /** Show/hide zoom +/- buttons. */
110
+ zoomButtons?: boolean
111
+
112
+ /** Show/hide inset map toggle button. */
113
+ insetsButton?: boolean
114
+
115
+ /** Show/hide placename labels. */
116
+ placenames?: boolean
117
+
118
+ /** Filter function for placename labels. */
119
+ placenamesFilter?: (name: any) => boolean
120
+
121
+ /** Use a separate header section for titles. */
122
+ header?: boolean
123
+
124
+ /** Use a separate footer section for footnotes. */
125
+ footer?: boolean
126
+
127
+ /** Padding between the map and footer in pixels. */
128
+ footerPadding?: number
129
+
130
+ /** Padding between the header and map in pixels. */
131
+ headerPadding?: number
132
+
133
+ /** Position adjustment for map title: [x, y] */
134
+ titlePosition?: [number, number]
135
+
136
+ /** Position adjustment for map subtitle: [x, y] */
137
+ subtitlePosition?: [number, number]
138
+
139
+ /** Position adjustment for footnote text: [x, y] */
140
+ footnotePosition?: [number, number]
141
+
142
+ /** Position adjustment for Eurostat logo: [x, y] */
143
+ logoPosition?: [number, number]
144
+
145
+ /** Position adjustment for ribbon banner: [x, y] */
146
+ ribbonPosition?: [number, number]
147
+
148
+ /** Position adjustment for zoom buttons: [x, y] */
149
+ zoomButtonsPosition?: [number, number]
150
+
151
+ /** Position adjustment for insets button: [x, y] */
152
+ insetsButtonPosition?: [number, number]
153
+
154
+ /** Pointer hover color for NUTS regions. */
155
+ hoverColor?: string
156
+
157
+ /** Base fill color for regions with no statistical data. */
158
+ noDataFillStyle?: string
159
+
160
+ /** Show the link to the remote Eurostat statistical dataset. */
161
+ showSourceLink?: boolean
162
+
163
+ /** Pattern fill configurations. */
164
+ patternFill?: any
165
+
166
+ /** Allow additional properties for extensibility. */
84
167
  [key: string]: any
85
168
  }
@@ -3,6 +3,10 @@ import type { StatData } from './stat/StatData'
3
3
  import type { LegendConfig } from '../legend/LegendConfig'
4
4
  import type { TooltipConfig } from './TooltipConfig'
5
5
  import type { InsetConfig } from './InsetConfig'
6
+ import type { CoastalMarginSettings } from './decoration/CoastalMarginSettings'
7
+ import type { GridCartogramSettings } from './GridCartogramSettings'
8
+ import type { DorlingSettings } from './DorlingSettings'
9
+ import type { ScalebarConfig } from './decoration/ScalebarConfig'
6
10
 
7
11
  /**
8
12
  * A eurostat-map instance. Created by eurostatmap.map() and extended
@@ -11,7 +15,7 @@ import type { InsetConfig } from './InsetConfig'
11
15
  * return the instance for chaining.
12
16
  */
13
17
  export interface MapInstance {
14
- // ==================== Container ====================
18
+ /** Container. */
15
19
 
16
20
  /** ID of the target SVG element. @default 'map' */
17
21
  svgId(): string
@@ -21,7 +25,7 @@ export interface MapInstance {
21
25
  containerId(): string
22
26
  containerId(id: string): this
23
27
 
24
- // ==================== Dimensions ====================
28
+ /** Dimensions. */
25
29
 
26
30
  /** Map width in pixels. @default min(795, window.innerWidth) */
27
31
  width(): number
@@ -31,7 +35,7 @@ export interface MapInstance {
31
35
  height(): number
32
36
  height(h: number): this
33
37
 
34
- // ==================== Geography ====================
38
+ /** Geography. */
35
39
 
36
40
  /**
37
41
  * NUTS2JSON geographic focus area.
@@ -78,7 +82,7 @@ export interface MapInstance {
78
82
  projectionFunction(): any
79
83
  projectionFunction(fn: any): this
80
84
 
81
- // ==================== Text & Labels ====================
85
+ /** Text and labels. */
82
86
 
83
87
  /** Map title. */
84
88
  title(): string
@@ -103,7 +107,7 @@ export interface MapInstance {
103
107
  footnoteWrap(): number | false
104
108
  footnoteWrap(chars: number | false): this
105
109
 
106
- // ==================== Statistical Data ====================
110
+ /** Statistical data. */
107
111
 
108
112
  /**
109
113
  * Get or set statistical data configuration.
@@ -142,7 +146,7 @@ export interface MapInstance {
142
146
  language(): string
143
147
  language(lang: string): this
144
148
 
145
- // ==================== Legend ====================
149
+ /** Legend. */
146
150
 
147
151
  /**
148
152
  * Get or set legend configuration. Pass false to remove the legend.
@@ -154,13 +158,13 @@ export interface MapInstance {
154
158
  /** Force-update the legend after data or style changes. */
155
159
  updateLegend(): this
156
160
 
157
- // ==================== Tooltip ====================
161
+ /** Tooltip. */
158
162
 
159
163
  /** Get or set tooltip configuration. */
160
164
  tooltip(): TooltipConfig
161
165
  tooltip(config: TooltipConfig): this
162
166
 
163
- // ==================== Zoom & Pan ====================
167
+ /** Zoom and pan. */
164
168
 
165
169
  /**
166
170
  * D3 zoom scale extent [min, max].
@@ -173,7 +177,11 @@ export interface MapInstance {
173
177
  zoomButtons(): boolean
174
178
  zoomButtons(show: boolean): this
175
179
 
176
- // ==================== Insets ====================
180
+ /** Grid cartogram settings (shape, margins, cell padding, layout positions). */
181
+ gridCartogramSettings(): GridCartogramSettings
182
+ gridCartogramSettings(settings: Partial<GridCartogramSettings>): this
183
+
184
+ /** Insets. */
177
185
 
178
186
  /**
179
187
  * Inset map configurations. Pass 'default' for the standard
@@ -184,7 +192,7 @@ export interface MapInstance {
184
192
  insets(): InsetConfig[] | 'default' | false
185
193
  insets(config: InsetConfig[] | 'default' | false): this
186
194
 
187
- // ==================== Decoration ====================
195
+ /** Decoration. */
188
196
 
189
197
  /** Show/hide the graticule (coordinate grid lines). */
190
198
  drawGraticule(): boolean
@@ -195,8 +203,8 @@ export interface MapInstance {
195
203
  drawCoastalMargin(show: boolean): this
196
204
 
197
205
  /** Coastal margin appearance settings. */
198
- coastalMarginSettings(): object
199
- coastalMarginSettings(settings: object): this
206
+ coastalMarginSettings(): CoastalMarginSettings
207
+ coastalMarginSettings(settings: Partial<CoastalMarginSettings>): this
200
208
 
201
209
  /** Show/hide placename labels loaded from the placenames layer. */
202
210
  placenames(): boolean
@@ -214,6 +222,10 @@ export interface MapInstance {
214
222
  stamp(): object | undefined
215
223
  stamp(config: { x: number; y: number; text: string; size?: number }): this
216
224
 
225
+ /** Scalebar configuration. */
226
+ scalebar(): ScalebarConfig | null
227
+ scalebar(config: ScalebarConfig | boolean): this
228
+
217
229
  /** Scalebar visibility. */
218
230
  showScalebar(): boolean
219
231
  showScalebar(show: boolean): this
@@ -230,29 +242,105 @@ export interface MapInstance {
230
242
  showEstatRibbon(): boolean
231
243
  showEstatRibbon(show: boolean): this
232
244
 
233
- // ==================== Dorling ====================
245
+ /** Returns the D3 selection of the SVG element. */
246
+ svg(): any
247
+ svg(s: any): this
234
248
 
235
- /** Enable Dorling cartogram layout for proportional symbol maps. */
236
- dorling(): boolean
237
- dorling(enable: boolean): this
249
+ /** Custom geometry filtering function. */
250
+ filterGeometriesFunction(): ((geometry: any) => boolean) | undefined
251
+ filterGeometriesFunction(fn: (geometry: any) => boolean): this
252
+
253
+ /** Grid cartogram enabled or disabled. */
254
+ gridCartogram(): boolean
255
+ gridCartogram(enable: boolean): this
256
+
257
+ /** Toggle background map rendering (sea, country boundaries, etc.). */
258
+ backgroundMap(): boolean
259
+ backgroundMap(show: boolean): this
260
+
261
+ /** Minimap configuration. */
262
+ minimap(): any
263
+ minimap(config: any): this
264
+
265
+ /** Show/hide inset map toggle button. */
266
+ insetsButton(): boolean
267
+ insetsButton(show: boolean): this
268
+
269
+ /** Filter function for placename labels. */
270
+ placenamesFilter(): ((name: any) => boolean) | undefined
271
+ placenamesFilter(fn: (name: any) => boolean): this
272
+
273
+ /** Use a separate header section for titles. */
274
+ header(): boolean
275
+ header(show: boolean): this
276
+
277
+ /** Use a separate footer section for footnotes. */
278
+ footer(): boolean
279
+ footer(show: boolean): this
280
+
281
+ /** Padding between the map and footer in pixels. */
282
+ footerPadding(): number | undefined
283
+ footerPadding(padding: number): this
284
+
285
+ /** Padding between the header and map in pixels. */
286
+ headerPadding(): number | undefined
287
+ headerPadding(padding: number): this
238
288
 
239
- /** Animate the Dorling simulation. @default true */
240
- animateDorling(): boolean
241
- animateDorling(animate: boolean): this
289
+ /** Position adjustment for map title: [x, y] */
290
+ titlePosition(): [number, number] | undefined
291
+ titlePosition(pos: [number, number]): this
242
292
 
243
- /** Dorling simulation gravity strength. @default { x: 1, y: 1 } */
244
- dorlingStrength(): { x: number; y: number }
245
- dorlingStrength(strength: { x: number; y: number }): this
293
+ /** Position adjustment for map subtitle: [x, y] */
294
+ subtitlePosition(): [number, number] | undefined
295
+ subtitlePosition(pos: [number, number]): this
246
296
 
247
- /** Number of Dorling collision detection iterations. @default 1 */
248
- dorlingIterations(): number
249
- dorlingIterations(n: number): this
297
+ /** Position adjustment for footnote text: [x, y] */
298
+ footnotePosition(): [number, number] | undefined
299
+ footnotePosition(pos: [number, number]): this
300
+
301
+ /** Position adjustment for Eurostat logo: [x, y] */
302
+ logoPosition(): [number, number] | undefined
303
+ logoPosition(pos: [number, number]): this
304
+
305
+ /** Position adjustment for ribbon banner: [x, y] */
306
+ ribbonPosition(): [number, number] | undefined
307
+ ribbonPosition(pos: [number, number]): this
308
+
309
+ /** Position adjustment for zoom buttons: [x, y] */
310
+ zoomButtonsPosition(): [number, number] | undefined
311
+ zoomButtonsPosition(pos: [number, number]): this
312
+
313
+ /** Position adjustment for insets button: [x, y] */
314
+ insetsButtonPosition(): [number, number] | undefined
315
+ insetsButtonPosition(pos: [number, number]): this
316
+
317
+ /** Pointer hover color for NUTS regions. */
318
+ hoverColor(): string
319
+ hoverColor(color: string): this
320
+
321
+ /** Base fill color for regions with no statistical data. */
322
+ noDataFillStyle(): string
323
+ noDataFillStyle(style: string): this
324
+
325
+ /** Show the link to the remote Eurostat statistical dataset. */
326
+ showSourceLink(): boolean
327
+ showSourceLink(show: boolean): this
328
+
329
+ /** Pattern fill configurations. */
330
+ patternFill(): any
331
+ patternFill(config: any): this
332
+
333
+ /** Dorling. */
334
+
335
+ /** Enable Dorling cartogram layout for proportional symbol maps. */
336
+ dorling(): boolean
337
+ dorling(enable: boolean): this
250
338
 
251
- /** Minimum distance between Dorling circles. Negative allows overlap. @default 0 */
252
- dorlingPadding(): number
253
- dorlingPadding(padding: number): this
339
+ /** Dorling simulation settings. */
340
+ dorlingSettings(): DorlingSettings
341
+ dorlingSettings(settings: Partial<DorlingSettings>): this
254
342
 
255
- // ==================== Events ====================
343
+ /** Events. */
256
344
 
257
345
  /** Called when the user finishes a zoom gesture. */
258
346
  onZoomEnd(): ((event: any) => void) | undefined
@@ -286,7 +374,7 @@ export interface MapInstance {
286
374
  onBuild(): ((map: MapInstance) => void) | undefined
287
375
  onBuild(callback: (map: MapInstance) => void): this
288
376
 
289
- // ==================== Build & Update ====================
377
+ /** Build and update. */
290
378
 
291
379
  /**
292
380
  * Builds the map from scratch. Call once after initial configuration.
@@ -315,7 +403,7 @@ export interface MapInstance {
315
403
  /** Recalculates header/footer layout and resizes the SVG. */
316
404
  recalculateLayout(): void
317
405
 
318
- // ==================== Export ====================
406
+ /** Export. */
319
407
 
320
408
  /**
321
409
  * Exports the map as an SVG file and triggers a browser download.
@@ -330,7 +418,7 @@ export interface MapInstance {
330
418
  */
331
419
  exportMapToPNG(width?: number, height?: number): Promise<this>
332
420
 
333
- // ==================== Misc ====================
421
+ /** Misc. */
334
422
 
335
423
  /**
336
424
  * Sets map attributes from URL parameters.
@@ -5,8 +5,11 @@ import type { MapInstance as EurostatMap } from './MapInstance'
5
5
  */
6
6
  export interface TooltipConfig {
7
7
  textFunction?: (region: any, map: EurostatMap) => string
8
+ /** Omit regions. */
8
9
  omitRegions?: string[]
10
+ /** Max width. */
9
11
  maxWidth?: number
12
+ /** Font size. */
10
13
  fontSize?: number
11
14
 
12
15
  [key: string]: any
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Visual settings for the coastal margin effect.
3
+ */
4
+ export interface CoastalMarginSettings {
5
+ /** Gaussian blur standard deviation. */
6
+ standardDeviation: number
7
+ /** Filter x bound (SVG filter coordinate space). */
8
+ x: string
9
+ /** Filter y bound (SVG filter coordinate space). */
10
+ y: string
11
+ /** Filter width (SVG filter coordinate space). */
12
+ width: string
13
+ /** Filter height (SVG filter coordinate space). */
14
+ height: string
15
+ /** Coastal stroke width. */
16
+ strokeWidth: number
17
+ /** Coastal stroke color. */
18
+ color: string
19
+ /** Coastal stroke opacity. */
20
+ opacity: number
21
+ }
@@ -13,12 +13,19 @@ export interface GeometriesClass {
13
13
  centroidsData: any
14
14
  /** Processed GeoJSON features organized by type */
15
15
  geoJSONs: {
16
+ /** Nutsrg. */
16
17
  nutsrg?: any[]
18
+ /** Nutsbn. */
17
19
  nutsbn?: any[]
20
+ /** Cntrg. */
18
21
  cntrg?: any[]
22
+ /** Cntbn. */
19
23
  cntbn?: any[]
24
+ /** Worldrg. */
20
25
  worldrg?: any[]
26
+ /** Graticule. */
21
27
  graticule?: any[]
28
+ /** Mixed. */
22
29
  mixed?: any
23
30
  }
24
31
  /** User-provided custom geometries */
@@ -34,13 +41,21 @@ export interface GeometriesClass {
34
41
  setUserGeometries(geometries: any[]): void
35
42
  /** Adds default NUTS geometries to the map */
36
43
  addDefaultGeometriesToMap(
44
+ /** Zoom group. */
37
45
  zoomGroup: any,
46
+ /** Draw graticule. */
38
47
  drawGraticule: boolean,
48
+ /** Path function. */
39
49
  pathFunction: any,
50
+ /** Nuts level. */
40
51
  nutsLevel: number | string,
52
+ /** Nuts year. */
41
53
  nutsYear: number,
54
+ /** Geo. */
42
55
  geo: string,
56
+ /** Proj. */
43
57
  proj: string,
58
+ /** Scale. */
44
59
  scale: string
45
60
  ): void
46
61
  /** Adds user-defined geometries to the map */
@@ -4,7 +4,9 @@
4
4
  */
5
5
  export const kosovoBnFeatures: {
6
6
  [year: number]: {
7
+ /** Type. */
7
8
  type: 'FeatureCollection'
9
+ /** Features. */
8
10
  features: any[]
9
11
  }
10
12
  }
@@ -83,11 +83,17 @@ export interface StatData {
83
83
 
84
84
  /** Metadata from the Eurostat API response or CSV source. */
85
85
  metadata?: {
86
+ /** Label. */
86
87
  label?: string
88
+ /** Href. */
87
89
  href?: string
90
+ /** Source. */
88
91
  source?: string
92
+ /** Updated. */
89
93
  updated?: string
94
+ /** Time. */
90
95
  time?: string
96
+ /** Extension. */
91
97
  extension?: any
92
98
  }
93
99