eurostat-map 4.4.0 → 4.4.1

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 +113 -49
  2. package/build/215.eurostatmap.min.js +1 -1
  3. package/build/215.eurostatmap.min.js.map +1 -1
  4. package/build/eurostatmap.js +5655 -3279
  5. package/build/eurostatmap.min.js +2 -2
  6. package/build/eurostatmap.min.js.map +1 -1
  7. package/build/types/core/DorlingSettings.d.ts +29 -0
  8. package/build/types/core/GridCartogramSettings.d.ts +30 -0
  9. package/build/types/core/InsetConfig.d.ts +9 -1
  10. package/build/types/core/MapConfig.d.ts +50 -40
  11. package/build/types/core/MapInstance.d.ts +27 -32
  12. package/build/types/core/TooltipConfig.d.ts +3 -0
  13. package/build/types/core/decoration/CoastalMarginSettings.d.ts +21 -0
  14. package/build/types/core/geo/geometries.d.ts +15 -0
  15. package/build/types/core/geo/kosovo.d.ts +2 -0
  16. package/build/types/core/stat/StatData.d.ts +6 -0
  17. package/build/types/core/utils.d.ts +4 -0
  18. package/build/types/index.d.ts +26 -10
  19. package/build/types/legend/LegendConfig.d.ts +20 -12
  20. package/build/types/legend/SparklineLegendConfig.d.ts +6 -68
  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 +8 -0
  27. package/build/types/map-types/choropleth/ChoroplethConfig.d.ts +11 -5
  28. package/build/types/map-types/choropleth/TrivariateChoroplethConfig.d.ts +10 -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 +6 -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,93 @@ 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'
6
9
 
7
10
  /**
8
11
  * 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
12
  */
10
13
  export interface MapConfig {
11
- // Container settings
14
+ /** Container settings. */
12
15
  svgId?: string
16
+ /** ID of the container element used to host the map. */
13
17
  containerId?: string
14
18
 
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
19
+ /** Geographic settings. */
20
+ /**
21
+ * NUTS2json geometries projection: '3035', '3857', '4326'.
22
+ * For custom projections, use 4326 and then set projectionFunction().
23
+ */
24
+ proj?: string
25
+ /** Function to set a custom projection. See d3-geo projections for examples. */
26
+ projectionFunction?: () => any
27
+ /** Scale of the map, for NUTSjson geometries. */
28
+ scale?: '60M' | '20M' | '10M' | '03M' | '01M'
29
+ /** NUTS level (0, 1, 2, 3). */
30
+ nutsLevel?: number
31
+ /** NUTS boundary year. */
20
32
  nutsYear?: number | string
33
+ /** Geographic center as [longitude, latitude]. */
21
34
  geoCenter?: [number, number]
22
- pixSize?: number
23
35
 
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
36
+ /** Geometry settings. */
37
+ /**
38
+ * NUTS2JSON geographic focus (e.g., 'EUR', 'WORLD', 'IC', 'GF').
39
+ * See https://github.com/eurostat/Nuts2json#overseas-territories---map-insets
40
+ */
41
+ geo?: string
26
42
 
27
- // Map dimensions
43
+ /** Map dimensions. */
28
44
  width?: number
45
+ /** Map height in pixels. */
29
46
  height?: number
30
47
 
31
- // map texts
48
+ /** Map texts. */
49
+ /** Map title. */
32
50
  title?: string
51
+ /** Map subtitle. */
33
52
  subtitle?: string
34
- bottomText?: string
35
- botTxtFontSize?: number
36
- botTxtPadding?: number
37
- botTxtTooltipMessage?: string
53
+ /** Footnote text shown below the map. */
38
54
  footnote?: string
55
+ /** Data source text. */
39
56
  source?: string
40
57
 
41
- // Statistical data configuration
58
+ /** Statistical data configuration. */
42
59
  stat?: StatConfig
43
60
 
44
- // Legend configuration
61
+ /** Legend configuration. */
45
62
  legend?: LegendConfig
46
63
 
47
- // Tooltip configuration
64
+ /** Tooltip configuration. */
48
65
  tooltip?: TooltipConfig
49
66
 
50
- // Insets (small additional maps)
67
+ /** Insets (small additional maps). */
51
68
  insets?: InsetConfig[]
52
69
 
53
- // Zoom and pan settings
70
+ /** Zoom and pan settings. */
54
71
  zoomExtent?: [number, number]
55
72
 
56
- // UI Controls
57
- showBtns?: boolean // Show zoom buttons
73
+ /** Grid cartogram layout settings. */
74
+ gridCartogramSettings?: Partial<GridCartogramSettings>
58
75
 
59
- // Coastal margin
60
- coastal?: boolean
61
- coastalMarginWidth?: number
62
- coastalMarginColor?: string
76
+ /** Dorling simulation settings. */
77
+ dorlingSettings?: Partial<DorlingSettings>
63
78
 
64
- // Graticule
65
- drawGraticule?: boolean
66
- graticuleStyle?: any
79
+ /** Show or hide the coastal margin effect. */
80
+ drawCoastalMargin?: boolean
81
+ /** Coastal margin settings to override defaults. */
82
+ coastalMarginSettings?: Partial<CoastalMarginSettings>
67
83
 
68
- // Borders
69
- borderWidth?: number
70
- borderColor?: string
84
+ /** Graticule. */
85
+ drawGraticule?: boolean
71
86
 
72
- // Labels
87
+ /** Labels. */
73
88
  labelling?: boolean
74
- labelSizeThreshold?: number
75
- labelOpacity?: number
76
-
77
- // Logo
78
- logoURL?: string
79
89
 
80
- // Callbacks
90
+ /** Fires once the map is built. */
81
91
  onBuild?: (map: EurostatMap) => void
82
92
 
83
- // Allow additional properties for extensibility
93
+ /** Allow additional properties for extensibility. */
84
94
  [key: string]: any
85
95
  }
@@ -3,6 +3,9 @@ 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'
6
9
 
7
10
  /**
8
11
  * A eurostat-map instance. Created by eurostatmap.map() and extended
@@ -11,7 +14,7 @@ import type { InsetConfig } from './InsetConfig'
11
14
  * return the instance for chaining.
12
15
  */
13
16
  export interface MapInstance {
14
- // ==================== Container ====================
17
+ /** Container. */
15
18
 
16
19
  /** ID of the target SVG element. @default 'map' */
17
20
  svgId(): string
@@ -21,7 +24,7 @@ export interface MapInstance {
21
24
  containerId(): string
22
25
  containerId(id: string): this
23
26
 
24
- // ==================== Dimensions ====================
27
+ /** Dimensions. */
25
28
 
26
29
  /** Map width in pixels. @default min(795, window.innerWidth) */
27
30
  width(): number
@@ -31,7 +34,7 @@ export interface MapInstance {
31
34
  height(): number
32
35
  height(h: number): this
33
36
 
34
- // ==================== Geography ====================
37
+ /** Geography. */
35
38
 
36
39
  /**
37
40
  * NUTS2JSON geographic focus area.
@@ -78,7 +81,7 @@ export interface MapInstance {
78
81
  projectionFunction(): any
79
82
  projectionFunction(fn: any): this
80
83
 
81
- // ==================== Text & Labels ====================
84
+ /** Text and labels. */
82
85
 
83
86
  /** Map title. */
84
87
  title(): string
@@ -103,7 +106,7 @@ export interface MapInstance {
103
106
  footnoteWrap(): number | false
104
107
  footnoteWrap(chars: number | false): this
105
108
 
106
- // ==================== Statistical Data ====================
109
+ /** Statistical data. */
107
110
 
108
111
  /**
109
112
  * Get or set statistical data configuration.
@@ -142,7 +145,7 @@ export interface MapInstance {
142
145
  language(): string
143
146
  language(lang: string): this
144
147
 
145
- // ==================== Legend ====================
148
+ /** Legend. */
146
149
 
147
150
  /**
148
151
  * Get or set legend configuration. Pass false to remove the legend.
@@ -154,13 +157,13 @@ export interface MapInstance {
154
157
  /** Force-update the legend after data or style changes. */
155
158
  updateLegend(): this
156
159
 
157
- // ==================== Tooltip ====================
160
+ /** Tooltip. */
158
161
 
159
162
  /** Get or set tooltip configuration. */
160
163
  tooltip(): TooltipConfig
161
164
  tooltip(config: TooltipConfig): this
162
165
 
163
- // ==================== Zoom & Pan ====================
166
+ /** Zoom and pan. */
164
167
 
165
168
  /**
166
169
  * D3 zoom scale extent [min, max].
@@ -173,7 +176,11 @@ export interface MapInstance {
173
176
  zoomButtons(): boolean
174
177
  zoomButtons(show: boolean): this
175
178
 
176
- // ==================== Insets ====================
179
+ /** Grid cartogram settings (shape, margins, cell padding, layout positions). */
180
+ gridCartogramSettings(): GridCartogramSettings
181
+ gridCartogramSettings(settings: Partial<GridCartogramSettings>): this
182
+
183
+ /** Insets. */
177
184
 
178
185
  /**
179
186
  * Inset map configurations. Pass 'default' for the standard
@@ -184,7 +191,7 @@ export interface MapInstance {
184
191
  insets(): InsetConfig[] | 'default' | false
185
192
  insets(config: InsetConfig[] | 'default' | false): this
186
193
 
187
- // ==================== Decoration ====================
194
+ /** Decoration. */
188
195
 
189
196
  /** Show/hide the graticule (coordinate grid lines). */
190
197
  drawGraticule(): boolean
@@ -195,8 +202,8 @@ export interface MapInstance {
195
202
  drawCoastalMargin(show: boolean): this
196
203
 
197
204
  /** Coastal margin appearance settings. */
198
- coastalMarginSettings(): object
199
- coastalMarginSettings(settings: object): this
205
+ coastalMarginSettings(): CoastalMarginSettings
206
+ coastalMarginSettings(settings: Partial<CoastalMarginSettings>): this
200
207
 
201
208
  /** Show/hide placename labels loaded from the placenames layer. */
202
209
  placenames(): boolean
@@ -230,29 +237,17 @@ export interface MapInstance {
230
237
  showEstatRibbon(): boolean
231
238
  showEstatRibbon(show: boolean): this
232
239
 
233
- // ==================== Dorling ====================
240
+ /** Dorling. */
234
241
 
235
242
  /** Enable Dorling cartogram layout for proportional symbol maps. */
236
243
  dorling(): boolean
237
244
  dorling(enable: boolean): this
238
245
 
239
- /** Animate the Dorling simulation. @default true */
240
- animateDorling(): boolean
241
- animateDorling(animate: boolean): this
242
-
243
- /** Dorling simulation gravity strength. @default { x: 1, y: 1 } */
244
- dorlingStrength(): { x: number; y: number }
245
- dorlingStrength(strength: { x: number; y: number }): this
246
-
247
- /** Number of Dorling collision detection iterations. @default 1 */
248
- dorlingIterations(): number
249
- dorlingIterations(n: number): this
250
-
251
- /** Minimum distance between Dorling circles. Negative allows overlap. @default 0 */
252
- dorlingPadding(): number
253
- dorlingPadding(padding: number): this
246
+ /** Dorling simulation settings. */
247
+ dorlingSettings(): DorlingSettings
248
+ dorlingSettings(settings: Partial<DorlingSettings>): this
254
249
 
255
- // ==================== Events ====================
250
+ /** Events. */
256
251
 
257
252
  /** Called when the user finishes a zoom gesture. */
258
253
  onZoomEnd(): ((event: any) => void) | undefined
@@ -286,7 +281,7 @@ export interface MapInstance {
286
281
  onBuild(): ((map: MapInstance) => void) | undefined
287
282
  onBuild(callback: (map: MapInstance) => void): this
288
283
 
289
- // ==================== Build & Update ====================
284
+ /** Build and update. */
290
285
 
291
286
  /**
292
287
  * Builds the map from scratch. Call once after initial configuration.
@@ -315,7 +310,7 @@ export interface MapInstance {
315
310
  /** Recalculates header/footer layout and resizes the SVG. */
316
311
  recalculateLayout(): void
317
312
 
318
- // ==================== Export ====================
313
+ /** Export. */
319
314
 
320
315
  /**
321
316
  * Exports the map as an SVG file and triggers a browser download.
@@ -330,7 +325,7 @@ export interface MapInstance {
330
325
  */
331
326
  exportMapToPNG(width?: number, height?: number): Promise<this>
332
327
 
333
- // ==================== Misc ====================
328
+ /** Misc. */
334
329
 
335
330
  /**
336
331
  * 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
 
@@ -101,10 +101,14 @@ export const flags: Record<string, string>
101
101
  * Executes a function for all insets recursively.
102
102
  */
103
103
  export function executeForAllInsets(
104
+ /** Insets. */
104
105
  insets: any,
106
+ /** Main svg id. */
105
107
  mainSvgId: string,
106
108
  functionToExecute: (inset: MapInstance, ...args: any[]) => void,
109
+ /** Parameter. */
107
110
  parameter?: any,
111
+ /** Parameter2. */
108
112
  parameter2?: any
109
113
  ): void
110
114
 
@@ -59,17 +59,15 @@ export type { TooltipConfig } from './core/TooltipConfig'
59
59
  export type { LegendConfig } from './legend/LegendConfig'
60
60
  export type { StatConfig } from './core/stat/StatConfig'
61
61
  export type { InsetConfig } from './core/InsetConfig'
62
+ export type { CoastalMarginSettings } from './core/decoration/CoastalMarginSettings'
63
+ export type { GridCartogramSettings, GridCartogramMargins } from './core/GridCartogramSettings'
64
+ export type { DorlingSettings, DorlingStrength } from './core/DorlingSettings'
62
65
 
63
66
  // ==================== Legend Configuration Type Exports ====================
64
67
 
65
68
  // Main legend types
66
69
  export type { CategoricalLegendConfig } from './legend/CategoricalLegendConfig'
67
- export type { CoxcombLegendConfig } from './legend/CoxcombLegendConfig'
68
70
  export type { MushroomLegendConfig } from './legend/MushroomLegendConfig'
69
- export type { PieChartLegendConfig } from './legend/PieChartLegendConfig'
70
- export type { SparklineLegendConfig } from './legend/SparklineLegendConfig'
71
- export type { WaffleLegendConfig } from './legend/WaffleLegendConfig'
72
- export type { StripeCompositionLegendConfig } from './legend/StripeCompositionLegendConfig'
73
71
  export type { PatternFillLegendConfig } from './legend/PatternFillLegendConfig'
74
72
 
75
73
  // Choropleth legend types
@@ -78,6 +76,16 @@ export type { HistogramLegendConfig } from './legend/choropleth/HistogramLegendC
78
76
 
79
77
  // Composition legend types
80
78
  export type { BarChartLegendConfig } from './legend/composition/BarChartLegendConfig'
79
+ export type { CoxcombLegendConfig } from './legend/composition/CoxcombLegendConfig'
80
+ export type { PieChartLegendConfig } from './legend/composition/PieChartLegendConfig'
81
+ export type { WaffleLegendConfig } from './legend/composition/WaffleLegendConfig'
82
+ export type { StripeCompositionLegendConfig } from './legend/composition/StripeCompositionLegendConfig'
83
+ export type {
84
+ SparklineLegendConfig,
85
+ SparklineScaleLegendConfig,
86
+ SparklineColorLegendConfig,
87
+ SparklineNoDataLegendConfig,
88
+ } from './legend/composition/SparklineLegendConfig'
81
89
 
82
90
  // Flow legend types
83
91
  export type { FlowMapLegendConfig } from './legend/flow/FlowMapLegendConfig'
@@ -133,11 +141,17 @@ export type { FlowMapConfig, FlowMap }
133
141
  * Options for fill pattern definitions
134
142
  */
135
143
  export interface FillPatternOptions {
144
+ /** Shape. */
136
145
  shape?: 'circle' | 'square'
146
+ /** Pattern size. */
137
147
  patternSize?: number
148
+ /** Min size. */
138
149
  minSize?: number
150
+ /** Max size. */
139
151
  maxSize?: number
152
+ /** Bck color. */
140
153
  bckColor?: string
154
+ /** Symb color. */
141
155
  symbColor?: string
142
156
  }
143
157
 
@@ -187,11 +201,6 @@ export function map(type: MapType, config?: MapConfig): MapInstance
187
201
  */
188
202
  export function getFillPatternDefinitionFunction(opts?: FillPatternOptions): (svg: any, numberOfClasses: number) => void
189
203
 
190
- /**
191
- * @deprecated Use getFillPatternDefinitionFunction instead
192
- */
193
- export function getFillPatternDefinitionFun(opts?: FillPatternOptions): (svg: any, numberOfClasses: number) => void
194
-
195
204
  /**
196
205
  * Get default labels for the map
197
206
  */
@@ -225,12 +234,19 @@ export const version: string
225
234
  // ==================== Default Export ====================
226
235
 
227
236
  declare const eurostatmap: {
237
+ /** Map. */
228
238
  map: typeof map
239
+ /** Get fill pattern definition function. */
229
240
  getFillPatternDefinitionFunction: typeof getFillPatternDefinitionFunction
241
+ /** Get fill pattern definition fun. */
230
242
  getFillPatternDefinitionFun: typeof getFillPatternDefinitionFun
243
+ /** Get default labels. */
231
244
  getDefaultLabels: typeof getDefaultLabels
245
+ /** Project from map. */
232
246
  projectFromMap: typeof projectFromMap
247
+ /** Project to map. */
233
248
  projectToMap: typeof projectToMap
249
+ /** Version. */
234
250
  version: typeof version
235
251
  }
236
252
 
@@ -2,41 +2,49 @@
2
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
3
  */
4
4
  export interface LegendConfig {
5
+ /** Legend origin x-coordinate in pixels. */
5
6
  x?: number
7
+ /** Legend origin y-coordinate in pixels. */
6
8
  y?: number
9
+ /** Legend width in pixels. */
7
10
  width?: number
11
+ /** Legend height in pixels. */
8
12
  height?: number
9
13
 
14
+ /** Legend title text. */
10
15
  title?: string
11
- titleWidth?: number
16
+ /** Legend title font size in pixels. */
12
17
  titleFontSize?: number
13
18
 
14
- // Box styling
15
- boxWidth?: number
16
- boxHeight?: number
19
+ /** Box styling. */
20
+ /** Inner spacing around legend content. */
17
21
  boxPadding?: number
18
- boxCornerRadius?: number
19
22
 
20
- // Shape styling (for proportional symbol legends)
23
+ /** Shape styling (for proportional symbol legends). */
24
+ /** Symbol swatch width in pixels. */
21
25
  shapeWidth?: number
26
+ /** Symbol swatch height in pixels. */
22
27
  shapeHeight?: number
28
+ /** Horizontal gap between shape and label. */
23
29
  shapePadding?: number
24
30
 
25
- // Label styling
31
+ /** Label styling. */
32
+ /** Label font size in pixels. */
26
33
  labelFontSize?: number
34
+ /** Pixel offset applied to labels. */
27
35
  labelOffset?: number
28
- labelWrap?: number
29
- labelDecimalPlaces?: number
30
36
 
31
- // Orientation
37
+ /** Legend layout direction. */
32
38
  orientation?: 'vertical' | 'horizontal'
39
+ /** Sort legend entries in ascending order when true. */
33
40
  ascending?: boolean
34
41
 
35
- // Cells (for manual legend specification)
42
+ /** Manual legend cell definitions. */
36
43
  cells?: any[]
37
44
 
38
- // No data label
45
+ /** Whether to display the no-data legend item. */
39
46
  noData?: boolean
47
+ /** Label used for no-data legend item. */
40
48
  noDataText?: string
41
49
 
42
50
  [key: string]: any