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
@@ -1,68 +1,6 @@
1
- import { LegendConfig } from './LegendConfig'
2
-
3
- /**
4
- * Configuration for scale legend in sparkline maps.
5
- */
6
- export interface SparklineScaleLegendConfig {
7
- /** Title for the scale legend section. */
8
- title?: string | null
9
-
10
- /** Padding between title and chart in pixels. @default 5 */
11
- titlePadding?: number
12
-
13
- /** Whether to show an example sparkline with averaged data. @default false */
14
- showExampleChart?: boolean
15
-
16
- /** Whether to show the region with maximum value. @default true */
17
- showMaxRegion?: boolean
18
-
19
- /** Custom example data for the sparkline. If null, uses averaged data. */
20
- exampleData?: number[] | null
21
-
22
- /** Number of ticks on Y axis. @default 5 */
23
- tickCount?: number
24
-
25
- /** Custom tick format function for Y axis values. */
26
- tickFormat?: ((value: number) => string) | null
27
-
28
- /** Whether to show X axis with date labels. @default true */
29
- showXAxis?: boolean
30
-
31
- /** Rotation angle for X axis labels in degrees. @default -45 */
32
- xAxisRotation?: number
33
-
34
- /** Step for showing X axis ticks (1 = every tick, 2 = every other, etc.). @default 1 */
35
- xAxisTickStep?: number
36
-
37
- /** Margins around the sparkline cell. Defaults to match the map's sparkline chart margin. */
38
- margin?: { top: number; right: number; bottom: number; left: number }
39
-
40
- /** Opacity of the sparkline. @default 0.5 */
41
- lineOpacity?: number
42
-
43
- /** Stroke width of the sparkline. @default 1 */
44
- lineStrokeWidth?: number
45
- }
46
-
47
- /**
48
- * Configuration for no data legend in sparkline maps.
49
- */
50
- export interface SparklineNoDataLegendConfig {
51
- /** Whether to show the no data legend item. @default true */
52
- show?: boolean
53
-
54
- /** Text label for "no data" item. @default 'No data' */
55
- text?: string
56
- }
57
-
58
- /**
59
- * Configuration for sparkline map legends.
60
- * Shows the Y-axis scale and optionally an example sparkline chart.
61
- */
62
- export interface SparklineLegendConfig extends LegendConfig {
63
- /** Configuration for the scale legend showing Y-axis range. */
64
- scaleLegend?: Partial<SparklineScaleLegendConfig>
65
-
66
- /** Configuration for the no data legend. Set to false to hide. */
67
- noDataLegend?: Partial<SparklineNoDataLegendConfig> | false
68
- }
1
+ export type {
2
+ SparklineScaleLegendConfig,
3
+ SparklineColorLegendConfig,
4
+ SparklineNoDataLegendConfig,
5
+ SparklineLegendConfig,
6
+ } from './composition/SparklineLegendConfig'
@@ -0,0 +1,85 @@
1
+ import { LegendConfig } from '../LegendConfig'
2
+
3
+ /**
4
+ * Configuration for size legend in coxcomb (polar area) charts.
5
+ */
6
+ export interface CoxcombSizeLegendConfig {
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
+ /** Custom values to display in the size legend. If not specified, values are auto-generated. */
14
+ values?: number[] | null
15
+
16
+ /** Custom labels for the size legend values. */
17
+ labels?: string[] | null
18
+
19
+ /** Custom formatter function for legend labels. */
20
+ labelFormatter?: ((value: number) => string) | null
21
+ }
22
+
23
+ /**
24
+ * Configuration for color legend in coxcomb (polar area) charts.
25
+ */
26
+ export interface CoxcombColorLegendConfig {
27
+ /** Title for the color legend. */
28
+ title?: string | null
29
+
30
+ /** Padding between title and legend content in pixels. @default 15 */
31
+ titlePadding?: number
32
+
33
+ /** Top margin for the color legend in pixels. @default 23 */
34
+ marginTop?: number
35
+
36
+ /** Offset adjustments for labels. @default { x: 5, y: 5 } */
37
+ labelOffsets?: { x: number; y: number }
38
+
39
+ /** Width of color swatches in pixels. @default 25 */
40
+ shapeWidth?: number
41
+
42
+ /** Height of color swatches in pixels. @default 20 */
43
+ shapeHeight?: number
44
+
45
+ /** Padding between swatches in pixels. @default 1 */
46
+ shapePadding?: number
47
+
48
+ /** Whether to show a "no data" item. @default true */
49
+ noData?: boolean
50
+
51
+ /** Text label for "no data" item. @default 'No data' */
52
+ noDataText?: string
53
+ }
54
+
55
+ /**
56
+ * Configuration for time legend in coxcomb (polar area) charts.
57
+ */
58
+ export interface CoxcombTimeLegendConfig {
59
+ /** Title for the time legend. */
60
+ title?: string | null
61
+
62
+ /** Padding between title and legend content in pixels. @default 15 */
63
+ titlePadding?: number
64
+
65
+ /** Top margin for the time legend in pixels. @default 20 */
66
+ marginTop?: number
67
+
68
+ /** Radius of the time legend circle in pixels. @default 35 */
69
+ radius?: number
70
+ }
71
+
72
+ /**
73
+ * Configuration for coxcomb (polar area) chart legends.
74
+ * Supports separate sub-legends for size, color, and time dimensions.
75
+ */
76
+ export interface CoxcombLegendConfig extends LegendConfig {
77
+ /** Configuration for the wedge size legend. */
78
+ sizeLegend?: Partial<CoxcombSizeLegendConfig>
79
+
80
+ /** Configuration for the color/category legend. */
81
+ colorLegend?: Partial<CoxcombColorLegendConfig>
82
+
83
+ /** Configuration for the time period legend. */
84
+ timeLegend?: Partial<CoxcombTimeLegendConfig>
85
+ }
@@ -0,0 +1,68 @@
1
+ import { LegendConfig } from '../LegendConfig'
2
+
3
+ /**
4
+ * Configuration for size legend in pie chart maps.
5
+ */
6
+ export interface PieChartSizeLegendConfig {
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 not specified, values are auto-generated. */
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 pie chart maps.
28
+ */
29
+ export interface PieChartColorLegendConfig {
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 33 */
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 pie chart map legends.
60
+ * Supports separate legends for pie size and slice colors.
61
+ */
62
+ export interface PieChartLegendConfig extends LegendConfig {
63
+ /** Configuration for the pie size legend. Set to false to hide. */
64
+ sizeLegend?: Partial<PieChartSizeLegendConfig> | false
65
+
66
+ /** Configuration for the color/category legend. Set to false to hide. */
67
+ colorLegend?: Partial<PieChartColorLegendConfig> | false
68
+ }
@@ -0,0 +1,94 @@
1
+ import { LegendConfig } from '../LegendConfig'
2
+
3
+ /**
4
+ * Configuration for scale legend in sparkline maps.
5
+ */
6
+ export interface SparklineScaleLegendConfig {
7
+ /** Title for the scale legend section. */
8
+ title?: string | null
9
+
10
+ /** Padding between title and chart in pixels. @default 5 */
11
+ titlePadding?: number
12
+
13
+ /** Whether to show an example sparkline with averaged data. @default false */
14
+ showExampleChart?: boolean
15
+
16
+ /** Whether to show the region with maximum value. @default true */
17
+ showMaxRegion?: boolean
18
+
19
+ /** Custom example data for the sparkline. If null, uses averaged data. */
20
+ exampleData?: number[] | null
21
+
22
+ /** Number of ticks on Y axis. @default 5 */
23
+ tickCount?: number
24
+
25
+ /** Custom tick format function for Y axis values. */
26
+ tickFormat?: ((value: number) => string) | null
27
+
28
+ /** Whether to show X axis with date labels. @default true */
29
+ showXAxis?: boolean
30
+
31
+ /** Rotation angle for X axis labels in degrees. @default -45 */
32
+ xAxisRotation?: number
33
+
34
+ /** Step for showing X axis ticks (1 = every tick, 2 = every other, etc.). @default 1 */
35
+ xAxisTickStep?: number
36
+
37
+ /** Margins around the sparkline cell. Defaults to match the map's sparkline chart margin. */
38
+ margin?: { top: number; right: number; bottom: number; left: number }
39
+
40
+ /** Opacity of the sparkline. @default 0.5 */
41
+ lineOpacity?: number
42
+
43
+ /** Stroke width of the sparkline. @default 1 */
44
+ lineStrokeWidth?: number
45
+ }
46
+
47
+ /**
48
+ * Configuration for sparkline color legend (explains sparkLineColor/sparkAreaColor rules).
49
+ */
50
+ export interface SparklineColorLegendConfig {
51
+ /** Show. */
52
+ show?: boolean
53
+ /** Title. */
54
+ title?: string | null
55
+ /** Title padding. */
56
+ titlePadding?: number
57
+ /** Margin top. */
58
+ marginTop?: number
59
+ /** Item gap. */
60
+ itemGap?: number
61
+ /** Swatch width. */
62
+ swatchWidth?: number
63
+ /** Swatch height. */
64
+ swatchHeight?: number
65
+ /** Label offset x. */
66
+ labelOffsetX?: number
67
+ /** Items. */
68
+ items?: Array<{ color: string; label: string }>
69
+ }
70
+
71
+ /**
72
+ * Configuration for no data legend in sparkline maps.
73
+ */
74
+ export interface SparklineNoDataLegendConfig {
75
+ /** Whether to show the no data legend item. @default true */
76
+ show?: boolean
77
+
78
+ /** Text label for "no data" item. @default 'No data' */
79
+ text?: string
80
+ }
81
+
82
+ /**
83
+ * Configuration for sparkline map legends.
84
+ */
85
+ export interface SparklineLegendConfig extends LegendConfig {
86
+ /** Configuration for the scale legend showing Y-axis range. */
87
+ scaleLegend?: Partial<SparklineScaleLegendConfig>
88
+
89
+ /** Optional categorical color legend for spark colors. */
90
+ colorLegend?: Partial<SparklineColorLegendConfig> | false
91
+
92
+ /** Configuration for the no data legend. Set to false to hide. */
93
+ noDataLegend?: Partial<SparklineNoDataLegendConfig> | false
94
+ }
@@ -0,0 +1,11 @@
1
+ import { LegendConfig } from '../LegendConfig'
2
+
3
+ /**
4
+ * Configuration for stripe composition map legends.
5
+ * Used to display a legend with colored rectangles representing different categories
6
+ * in stripe composition maps (regions divided into colored stripes showing composition).
7
+ */
8
+ export interface StripeCompositionLegendConfig extends LegendConfig {
9
+ // Inherits all properties from LegendConfig
10
+ // No additional specific properties beyond the base legend configuration
11
+ }
@@ -0,0 +1,74 @@
1
+ import { LegendConfig } from '../LegendConfig'
2
+
3
+ /**
4
+ * Configuration for size legend in waffle chart maps.
5
+ */
6
+ export interface WaffleSizeLegendConfig {
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 not specified, values are auto-generated. */
14
+ values?: number[] | null
15
+
16
+ /** Custom formatter function for legend labels. */
17
+ labelFormatter?: ((value: number) => string) | undefined
18
+
19
+ /** Simplified grid size for size legend examples (e.g., 5 means 5x5 = 25 cells). @default 5 */
20
+ gridSize?: number
21
+
22
+ /** Padding between cells in size legend in pixels. @default 0.5 */
23
+ cellPadding?: number
24
+
25
+ /** Whether to show a "no data" item. @default false */
26
+ noData?: boolean
27
+
28
+ /** Text label for "no data" item. @default 'No data' */
29
+ noDataText?: string
30
+ }
31
+
32
+ /**
33
+ * Configuration for color legend in waffle chart maps.
34
+ */
35
+ export interface WaffleColorLegendConfig {
36
+ /** Title for the color legend. */
37
+ title?: string | null
38
+
39
+ /** Padding between title and legend content in pixels. @default 10 */
40
+ titlePadding?: number
41
+
42
+ /** Top margin (distance from size legend) in pixels. @default 33 */
43
+ marginTop?: number
44
+
45
+ /** Offset adjustments for labels. @default { x: 5, y: 5 } */
46
+ labelOffsets?: { x: number; y: number }
47
+
48
+ /** Width of color swatches in pixels. @default 25 */
49
+ shapeWidth?: number
50
+
51
+ /** Height of color swatches in pixels. @default 20 */
52
+ shapeHeight?: number
53
+
54
+ /** Padding between swatches in pixels. @default 1 */
55
+ shapePadding?: number
56
+
57
+ /** Whether to show a "no data" item. @default true */
58
+ noData?: boolean
59
+
60
+ /** Text label for "no data" item. @default 'No data' */
61
+ noDataText?: string
62
+ }
63
+
64
+ /**
65
+ * Configuration for waffle chart map legends.
66
+ * Waffle charts display data as grids of small squares, with colors representing categories.
67
+ */
68
+ export interface WaffleLegendConfig extends LegendConfig {
69
+ /** Configuration for the waffle size legend. */
70
+ sizeLegend?: Partial<WaffleSizeLegendConfig>
71
+
72
+ /** Configuration for the color/category legend. Set to false to hide. */
73
+ colorLegend?: Partial<WaffleColorLegendConfig> | false
74
+ }
@@ -4,12 +4,20 @@ import type { MapConfig } from '../../core/MapConfig'
4
4
  * Configuration for bivariate choropleth maps.
5
5
  */
6
6
  export interface BivariateChoroplethConfig extends MapConfig {
7
+ /** Number of classes. */
7
8
  numberOfClasses?: number
9
+ /** Breaks1. */
8
10
  breaks1?: number[]
11
+ /** Breaks2. */
9
12
  breaks2?: number[]
13
+ /** Start color. */
10
14
  startColor?: string
15
+ /** Color1. */
11
16
  color1?: string
17
+ /** Color2. */
12
18
  color2?: string
19
+ /** End color. */
13
20
  endColor?: string
21
+ /** No data fill style. */
14
22
  noDataFillStyle?: string
15
23
  }
@@ -4,26 +4,32 @@ import { MapConfig } from '../../core/MapConfig'
4
4
  * Configuration specific to choropleth maps
5
5
  */
6
6
  export interface ChoroplethConfig extends MapConfig {
7
- // Classification
7
+ /** Classification. */
8
8
  numberOfClasses?: number
9
+ /** Classification method. */
9
10
  classificationMethod?: 'quantile' | 'ckmeans' | 'jenks' | 'equinter' | 'threshold'
11
+ /** Thresholds. */
10
12
  thresholds?: number[]
13
+ /** Make classif nice. */
11
14
  makeClassifNice?: boolean
12
15
 
13
- // Colors
16
+ /** Colors. */
14
17
  colors?: string[]
15
18
  colorFunction?: (t: number) => string
19
+ /** Color scheme type. */
16
20
  colorSchemeType?: 'discrete' | 'continuous'
21
+ /** Class to fill style. */
17
22
  classToFillStyle?: { [classIndex: number]: string }
18
23
 
19
- // No data styling
24
+ /** No-data styling. */
20
25
  noDataFillStyle?: string
21
26
 
22
- // Value transformation (for continuous schemes)
27
+ /** Value transformation (for continuous schemes). */
23
28
  valueTransform?: (x: number) => number
24
29
  valueUntransform?: (x: number) => number
30
+ /** Skip normalization. */
25
31
  skipNormalization?: boolean
26
32
 
27
- // Diverging schemes
33
+ /** Diverging schemes. */
28
34
  pointOfDivergence?: number
29
35
  }
@@ -4,15 +4,25 @@ import type { MapConfig } from '../../core/MapConfig'
4
4
  * Configuration for trivariate choropleth maps.
5
5
  */
6
6
  export interface TrivariateChoroplethConfig extends MapConfig {
7
+ /** Ternary codes. */
7
8
  ternaryCodes?: [string, string, string]
9
+ /** No data fill style. */
8
10
  noDataFillStyle?: string
11
+ /** Ternary settings. */
9
12
  ternarySettings?: {
13
+ /** Hue. */
10
14
  hue?: number
15
+ /** Chroma. */
11
16
  chroma?: number
17
+ /** Lightness. */
12
18
  lightness?: number
19
+ /** Contrast. */
13
20
  contrast?: number
21
+ /** Spread. */
14
22
  spread?: number
23
+ /** Breaks. */
15
24
  breaks?: number
25
+ /** Mean centering. */
16
26
  meanCentering?: boolean
17
27
  }
18
28
  }
@@ -2,20 +2,33 @@
2
2
  * Statistical configuration for composition maps (pie, bar, waffle, stripe).
3
3
  */
4
4
  export interface CompositionStatConfig {
5
+ /** Eurostat dataset code. */
5
6
  eurostatDatasetCode?: string
7
+ /** Filters. */
6
8
  filters?: Record<string, any>
9
+ /** Unit text. */
7
10
  unitText?: string
11
+ transform?: (value: number) => number
8
12
 
13
+ /** Category parameter. */
9
14
  categoryParameter?: string
15
+ /** Category codes. */
10
16
  categoryCodes?: string[]
17
+ /** Category labels. */
11
18
  categoryLabels?: string[]
19
+ /** Category colors. */
12
20
  categoryColors?: string[]
21
+ /** Total code. */
13
22
  totalCode?: string
14
23
 
15
- // Legacy nested API supported by buildStatCompositionMethod
24
+ /** Legacy nested API supported by buildStatCompositionMethod. */
16
25
  stat?: {
26
+ /** Eurostat dataset code. */
17
27
  eurostatDatasetCode?: string
28
+ /** Filters. */
18
29
  filters?: Record<string, any>
30
+ /** Unit text. */
19
31
  unitText?: string
32
+ transform?: (value: number) => number
20
33
  }
21
34
  }
@@ -1,10 +1,14 @@
1
1
  import type { MapInstance } from '../../../core/MapInstance'
2
2
  import type { CompositionStatConfig } from '../CompositionStatConfig'
3
+ import type { BarChartLegendConfig } from '../../../legend/composition/BarChartLegendConfig'
3
4
 
4
5
  /**
5
6
  * Bar map type.
6
7
  */
7
8
  export interface BarMap extends MapInstance {
9
+ legend(): BarChartLegendConfig
10
+ legend(config: BarChartLegendConfig | false): this
11
+
8
12
  barType(): 'stacked' | 'grouped'
9
13
  barType(v: 'stacked' | 'grouped'): this
10
14
 
@@ -65,9 +69,6 @@ export interface BarMap extends MapInstance {
65
69
  dorling(): boolean
66
70
  dorling(v: boolean): this
67
71
 
68
- animateDorling(): boolean
69
- animateDorling(v: boolean): this
70
-
71
72
  barTotalCode(): string | undefined
72
73
  barTotalCode(v: string | undefined): this
73
74
 
@@ -1,30 +1,54 @@
1
1
  import type { MapConfig } from '../../../core/MapConfig'
2
+ import type { BarChartLegendConfig } from '../../../legend/composition/BarChartLegendConfig'
2
3
 
3
4
  /**
4
5
  * Configuration for bar chart composition maps.
5
6
  */
6
7
  export interface BarMapConfig extends MapConfig {
8
+ /** Bar type. */
7
9
  barType?: 'stacked' | 'grouped'
10
+ /** Cat colors. */
8
11
  catColors?: Record<string, string>
12
+ /** Cat labels. */
9
13
  catLabels?: Record<string, string>
14
+ /** Show only when complete. */
10
15
  showOnlyWhenComplete?: boolean
16
+ /** No data fill style. */
11
17
  noDataFillStyle?: string
18
+ /** Bar min width. */
12
19
  barMinWidth?: number
20
+ /** Bar max width. */
13
21
  barMaxWidth?: number
22
+ /** Bar height. */
14
23
  barHeight?: number
24
+ /** Bar group width. */
15
25
  barGroupWidth?: number
26
+ /** Bar group gap. */
16
27
  barGroupGap?: number
28
+ /** Bar group min height. */
17
29
  barGroupMinHeight?: number
30
+ /** Bar group max height. */
18
31
  barGroupMaxHeight?: number
32
+ /** Bar stroke fill. */
19
33
  barStrokeFill?: string
34
+ /** Bar stroke width. */
20
35
  barStrokeWidth?: number
36
+ /** Bar corner radius. */
21
37
  barCornerRadius?: number
38
+ /** Bar other color. */
22
39
  barOtherColor?: string
40
+ /** Bar other text. */
23
41
  barOtherText?: string
42
+ /** Bar tooltip width. */
24
43
  barTooltipWidth?: number
44
+ /** Bar tooltip height. */
25
45
  barTooltipHeight?: number
46
+ /** Dorling. */
26
47
  dorling?: boolean
27
- animateDorling?: boolean
48
+ /** Bar total code. */
28
49
  barTotalCode?: string
50
+ /** Stat codes. */
29
51
  statCodes?: string[]
52
+ /** Legend. */
53
+ legend?: BarChartLegendConfig | false
30
54
  }
@@ -1,10 +1,14 @@
1
1
  import type { MapInstance } from '../../../core/MapInstance'
2
2
  import type { CoxcombStatConfig } from './CoxcombStatConfig'
3
+ import type { CoxcombLegendConfig } from '../../../legend/composition/CoxcombLegendConfig'
3
4
 
4
5
  /**
5
6
  * Coxcomb map type.
6
7
  */
7
8
  export interface CoxcombMap extends MapInstance {
9
+ legend(): CoxcombLegendConfig
10
+ legend(config: CoxcombLegendConfig | false): this
11
+
8
12
  catColors(): any
9
13
  catColors(v: any): this
10
14
 
@@ -1,18 +1,32 @@
1
1
  import type { MapConfig } from '../../../core/MapConfig'
2
+ import type { CoxcombLegendConfig } from '../../../legend/composition/CoxcombLegendConfig'
2
3
 
3
4
  /**
4
5
  * Configuration for coxcomb (polar area) chart maps.
5
6
  */
6
7
  export interface CoxcombMapConfig extends MapConfig {
8
+ /** Coxcomb min radius. */
7
9
  coxcombMinRadius?: number
10
+ /** Coxcomb max radius. */
8
11
  coxcombMaxRadius?: number
12
+ /** Coxcomb stroke fill. */
9
13
  coxcombStrokeFill?: string
14
+ /** Coxcomb stroke width. */
10
15
  coxcombStrokeWidth?: number
16
+ /** Coxcomb rings. */
11
17
  coxcombRings?: boolean
18
+ /** Coxcomb offsets. */
12
19
  coxcombOffsets?: { x: number; y: number }
20
+ /** Hover color. */
13
21
  hoverColor?: string
22
+ /** Cat colors. */
14
23
  catColors?: Record<string, string>
24
+ /** Cat labels. */
15
25
  catLabels?: Record<string, string>
26
+ /** No data fill style. */
16
27
  noDataFillStyle?: string
28
+ /** Classifier size. */
17
29
  classifierSize?: any
30
+ /** Legend. */
31
+ legend?: CoxcombLegendConfig | false
18
32
  }
@@ -4,11 +4,13 @@ import { CompositionStatConfig } from '../CompositionStatConfig'
4
4
  * Statistical configuration for coxcomb maps.
5
5
  */
6
6
  export interface CoxcombStatConfig extends CompositionStatConfig {
7
- // Eurostat path
7
+ /** Eurostat path. */
8
8
  timeParameter?: string
9
+ /** Times. */
9
10
  times: string[]
11
+ /** Time labels. */
10
12
  timeLabels?: string[]
11
13
 
12
- // Custom data path
14
+ /** Custom data path. */
13
15
  customData?: Record<string, Record<string, Record<string, number>>>
14
16
  }