eurostat-map 4.3.58 → 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.
- package/README.md +113 -49
- package/build/215.eurostatmap.min.js +1 -1
- package/build/215.eurostatmap.min.js.map +1 -1
- package/build/eurostatmap.js +11757 -12996
- package/build/eurostatmap.min.js +2 -4
- package/build/eurostatmap.min.js.map +1 -1
- package/build/package.json +87 -0
- package/build/types/core/DorlingSettings.d.ts +29 -0
- package/build/types/core/GridCartogramSettings.d.ts +30 -0
- package/build/types/core/InsetConfig.d.ts +23 -0
- package/build/types/core/MapConfig.d.ts +95 -0
- package/build/types/core/MapInstance.d.ts +349 -0
- package/build/types/core/MinimapConfig.d.ts +11 -0
- package/build/types/core/TooltipConfig.d.ts +16 -0
- package/build/types/core/decoration/CoastalMarginSettings.d.ts +21 -0
- package/build/types/core/decoration/ScalebarConfig.d.ts +48 -0
- package/build/types/core/decoration/StampConfig.d.ts +71 -0
- package/build/types/core/geo/centroids.d.ts +33 -0
- package/build/types/core/geo/geometries.d.ts +71 -0
- package/build/types/core/geo/kosovo.d.ts +12 -0
- package/build/types/core/geo/proj4.d.ts +26 -0
- package/build/types/core/geo/projection.d.ts +29 -0
- package/build/types/core/insets.d.ts +16 -0
- package/build/types/core/layout.d.ts +23 -0
- package/build/types/core/locations.d.ts +55 -0
- package/build/types/core/minimaps.d.ts +20 -0
- package/build/types/core/scale.d.ts +30 -0
- package/build/types/core/stat/StatConfig.d.ts +27 -0
- package/build/types/core/stat/StatData.d.ts +113 -0
- package/build/types/core/utils.d.ts +198 -0
- package/build/types/core/zoom.d.ts +21 -0
- package/build/types/index.d.ts +253 -0
- package/build/types/legend/CategoricalLegendConfig.d.ts +13 -0
- package/build/types/legend/CoxcombLegendConfig.d.ts +85 -0
- package/build/types/legend/LegendConfig.d.ts +51 -0
- package/build/types/legend/MushroomLegendConfig.d.ts +56 -0
- package/build/types/legend/PatternFillLegendConfig.d.ts +11 -0
- package/build/types/legend/PieChartLegendConfig.d.ts +68 -0
- package/build/types/legend/SparklineLegendConfig.d.ts +6 -0
- package/build/types/legend/StripeCompositionLegendConfig.d.ts +11 -0
- package/build/types/legend/WaffleLegendConfig.d.ts +74 -0
- package/build/types/legend/choropleth/BivariateLegendConfig.d.ts +59 -0
- package/build/types/legend/choropleth/ChoroplethLegendConfig.d.ts +0 -0
- package/build/types/legend/choropleth/HistogramLegendConfig.d.ts +26 -0
- package/build/types/legend/choropleth/TrivariateLegendConfig.d.ts +32 -0
- package/build/types/legend/choropleth/legend-choropleth-bivariate.d.ts +2 -0
- package/build/types/legend/choropleth/legend-choropleth-trivariate.d.ts +2 -0
- package/build/types/legend/choropleth/legend-choropleth.d.ts +2 -0
- package/build/types/legend/composition/BarChartLegendConfig.d.ts +68 -0
- package/build/types/legend/composition/CoxcombLegendConfig.d.ts +85 -0
- package/build/types/legend/composition/PieChartLegendConfig.d.ts +68 -0
- package/build/types/legend/composition/SparklineLegendConfig.d.ts +94 -0
- package/build/types/legend/composition/StripeCompositionLegendConfig.d.ts +11 -0
- package/build/types/legend/composition/WaffleLegendConfig.d.ts +74 -0
- package/build/types/legend/composition/legend-bar-chart.d.ts +2 -0
- package/build/types/legend/flow/FlowLegendConfig.d.ts +0 -0
- package/build/types/legend/flow/FlowMapLegendConfig.d.ts +117 -0
- package/build/types/legend/flow/legend-flow.d.ts +2 -0
- package/build/types/legend/legend-categorical.d.ts +2 -0
- package/build/types/legend/legend-continuous.d.ts +2 -0
- package/build/types/legend/legend-discrete.d.ts +2 -0
- package/build/types/legend/legend.d.ts +13 -0
- package/build/types/legend/proportional-symbol/PropSymbolLegendConfig.d.ts +0 -0
- package/build/types/legend/proportional-symbol/ProportionalSymbolsLegendConfig.d.ts +134 -0
- package/build/types/legend/proportional-symbol/legend-proportional-symbols.d.ts +2 -0
- package/build/types/map-types/CategoricalMap.d.ts +21 -0
- package/build/types/map-types/CategoricalMapConfig.d.ts +11 -0
- package/build/types/map-types/CateogricalMapConfig.d.ts +11 -0
- package/build/types/map-types/MapType.d.ts +34 -0
- package/build/types/map-types/choropleth/BivariateChoroplethConfig.d.ts +23 -0
- package/build/types/map-types/choropleth/BivariateChoroplethMap.d.ts +39 -0
- package/build/types/map-types/choropleth/ChoroplethConfig.d.ts +35 -0
- package/build/types/map-types/choropleth/ChoroplethMap.d.ts +48 -0
- package/build/types/map-types/choropleth/TrivariateChoroplethConfig.d.ts +28 -0
- package/build/types/map-types/choropleth/TrivariateChoroplethMap.d.ts +15 -0
- package/build/types/map-types/choropleth/ValueByAlphaConfig.d.ts +8 -0
- package/build/types/map-types/choropleth/ValueByAlphaMap.d.ts +9 -0
- package/build/types/map-types/choropleth/map-choropleth-bivariate.d.ts +4 -0
- package/build/types/map-types/choropleth/map-choropleth-trivariate.d.ts +4 -0
- package/build/types/map-types/choropleth/map-choropleth.d.ts +47 -0
- package/build/types/map-types/choropleth/map-value-by-alpha.d.ts +4 -0
- package/build/types/map-types/composition/BarMap.d.ts +86 -0
- package/build/types/map-types/composition/BarMapConfig.d.ts +30 -0
- package/build/types/map-types/composition/CompositionStatConfig.d.ts +34 -0
- package/build/types/map-types/composition/CoxcombMap.d.ts +42 -0
- package/build/types/map-types/composition/CoxcombMapConfig.d.ts +18 -0
- package/build/types/map-types/composition/PieMap.d.ts +62 -0
- package/build/types/map-types/composition/PieMapConfig.d.ts +24 -0
- package/build/types/map-types/composition/SparkMap.d.ts +46 -0
- package/build/types/map-types/composition/SparkMapConfig.d.ts +25 -0
- package/build/types/map-types/composition/StripeMap.d.ts +43 -0
- package/build/types/map-types/composition/StripeMapConfig.d.ts +16 -0
- package/build/types/map-types/composition/WaffleMap.d.ts +71 -0
- package/build/types/map-types/composition/WaffleMapConfig.d.ts +25 -0
- package/build/types/map-types/composition/bar/BarMap.d.ts +79 -0
- package/build/types/map-types/composition/bar/BarMapConfig.d.ts +54 -0
- package/build/types/map-types/composition/composition-map.d.ts +25 -0
- package/build/types/map-types/composition/coxcomb/CoxcombMap.d.ts +46 -0
- package/build/types/map-types/composition/coxcomb/CoxcombMapConfig.d.ts +32 -0
- package/build/types/map-types/composition/coxcomb/CoxcombStatConfig.d.ts +16 -0
- package/build/types/map-types/composition/map-bar.d.ts +5 -0
- package/build/types/map-types/composition/map-coxcomb.d.ts +5 -0
- package/build/types/map-types/composition/map-pie.d.ts +10 -0
- package/build/types/map-types/composition/map-spark.d.ts +5 -0
- package/build/types/map-types/composition/map-stripe.d.ts +5 -0
- package/build/types/map-types/composition/map-waffle.d.ts +5 -0
- package/build/types/map-types/composition/pie/PieMap.d.ts +69 -0
- package/build/types/map-types/composition/pie/PieMapConfig.d.ts +42 -0
- package/build/types/map-types/composition/stripe/StripeMap.d.ts +52 -0
- package/build/types/map-types/composition/stripe/StripeMapConfig.d.ts +28 -0
- package/build/types/map-types/composition/waffle/WaffleMap.d.ts +78 -0
- package/build/types/map-types/composition/waffle/WaffleMapConfig.d.ts +44 -0
- package/build/types/map-types/flow/FlowMap.d.ts +97 -0
- package/build/types/map-types/flow/FlowMapConfig.d.ts +158 -0
- package/build/types/map-types/flow/map-flow.d.ts +5 -0
- package/build/types/map-types/map-categorical.d.ts +19 -0
- package/build/types/map-types/proportional-symbol/ProportionalSymbolConfig.d.ts +17 -0
- package/build/types/map-types/proportional-symbol/ProportionalSymbolMap.d.ts +90 -0
- package/build/types/map-types/proportional-symbol/map-proportional-symbols.d.ts +35 -0
- package/build/types/map-types/proportional-symbol/mushroom/MushroomMap.d.ts +30 -0
- package/build/types/map-types/proportional-symbol/mushroom/MushroomMapConfig.d.ts +20 -0
- package/build/types/map-types/spark/SparkMap.d.ts +52 -0
- package/build/types/map-types/spark/SparkMapConfig.d.ts +42 -0
- package/build/types/map-types/spark/SparkStatConfig.d.ts +16 -0
- package/build/types/utils/FillPatternOptions.d.ts +17 -0
- package/package.json +12 -5
|
@@ -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
|
+
}
|
|
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,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
|
|
File without changes
|
|
@@ -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,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,23 @@
|
|
|
1
|
+
import type { MapConfig } from '../../core/MapConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for bivariate choropleth maps.
|
|
5
|
+
*/
|
|
6
|
+
export interface BivariateChoroplethConfig extends MapConfig {
|
|
7
|
+
/** Number of classes. */
|
|
8
|
+
numberOfClasses?: number
|
|
9
|
+
/** Breaks1. */
|
|
10
|
+
breaks1?: number[]
|
|
11
|
+
/** Breaks2. */
|
|
12
|
+
breaks2?: number[]
|
|
13
|
+
/** Start color. */
|
|
14
|
+
startColor?: string
|
|
15
|
+
/** Color1. */
|
|
16
|
+
color1?: string
|
|
17
|
+
/** Color2. */
|
|
18
|
+
color2?: string
|
|
19
|
+
/** End color. */
|
|
20
|
+
endColor?: string
|
|
21
|
+
/** No data fill style. */
|
|
22
|
+
noDataFillStyle?: string
|
|
23
|
+
}
|
|
@@ -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,35 @@
|
|
|
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
|
+
/** Classification method. */
|
|
10
|
+
classificationMethod?: 'quantile' | 'ckmeans' | 'jenks' | 'equinter' | 'threshold'
|
|
11
|
+
/** Thresholds. */
|
|
12
|
+
thresholds?: number[]
|
|
13
|
+
/** Make classif nice. */
|
|
14
|
+
makeClassifNice?: boolean
|
|
15
|
+
|
|
16
|
+
/** Colors. */
|
|
17
|
+
colors?: string[]
|
|
18
|
+
colorFunction?: (t: number) => string
|
|
19
|
+
/** Color scheme type. */
|
|
20
|
+
colorSchemeType?: 'discrete' | 'continuous'
|
|
21
|
+
/** Class to fill style. */
|
|
22
|
+
classToFillStyle?: { [classIndex: number]: string }
|
|
23
|
+
|
|
24
|
+
/** No-data styling. */
|
|
25
|
+
noDataFillStyle?: string
|
|
26
|
+
|
|
27
|
+
/** Value transformation (for continuous schemes). */
|
|
28
|
+
valueTransform?: (x: number) => number
|
|
29
|
+
valueUntransform?: (x: number) => number
|
|
30
|
+
/** Skip normalization. */
|
|
31
|
+
skipNormalization?: boolean
|
|
32
|
+
|
|
33
|
+
/** Diverging schemes. */
|
|
34
|
+
pointOfDivergence?: number
|
|
35
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { MapInstance } from '../../core/MapInstance'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Choropleth map object
|
|
5
|
+
*/
|
|
6
|
+
export interface ChoroplethMap extends MapInstance {
|
|
7
|
+
numberOfClasses(): number
|
|
8
|
+
numberOfClasses(n: number): this
|
|
9
|
+
|
|
10
|
+
classificationMethod(): string
|
|
11
|
+
classificationMethod(method: 'quantile' | 'ckmeans' | 'jenks' | 'equinter' | 'threshold'): this
|
|
12
|
+
|
|
13
|
+
thresholds(): number[]
|
|
14
|
+
thresholds(t: number[]): this
|
|
15
|
+
|
|
16
|
+
colors(): string[]
|
|
17
|
+
colors(c: string[]): this
|
|
18
|
+
|
|
19
|
+
colorFunction(): (t: number) => string
|
|
20
|
+
colorFunction(fn: (t: number) => string): this
|
|
21
|
+
|
|
22
|
+
makeClassifNice(): boolean
|
|
23
|
+
makeClassifNice(v: boolean): this
|
|
24
|
+
|
|
25
|
+
classToFillStyle(): any
|
|
26
|
+
classToFillStyle(v: any): this
|
|
27
|
+
|
|
28
|
+
classifier(): any
|
|
29
|
+
classifier(v: any): this
|
|
30
|
+
|
|
31
|
+
colorSchemeType(): string
|
|
32
|
+
colorSchemeType(type: 'discrete' | 'continuous'): this
|
|
33
|
+
|
|
34
|
+
valueTransform(): (x: number) => number
|
|
35
|
+
valueTransform(v: (x: number) => number): this
|
|
36
|
+
|
|
37
|
+
valueUntransform(): (x: number) => number
|
|
38
|
+
valueUntransform(v: (x: number) => number): this
|
|
39
|
+
|
|
40
|
+
pointOfDivergence(): number | null
|
|
41
|
+
pointOfDivergence(v: number | null): this
|
|
42
|
+
|
|
43
|
+
skipNormalization(): boolean
|
|
44
|
+
skipNormalization(v: boolean): this
|
|
45
|
+
|
|
46
|
+
noDataFillStyle(): string
|
|
47
|
+
noDataFillStyle(style: string): this
|
|
48
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { MapConfig } from '../../core/MapConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for trivariate choropleth maps.
|
|
5
|
+
*/
|
|
6
|
+
export interface TrivariateChoroplethConfig extends MapConfig {
|
|
7
|
+
/** Ternary codes. */
|
|
8
|
+
ternaryCodes?: [string, string, string]
|
|
9
|
+
/** No data fill style. */
|
|
10
|
+
noDataFillStyle?: string
|
|
11
|
+
/** Ternary settings. */
|
|
12
|
+
ternarySettings?: {
|
|
13
|
+
/** Hue. */
|
|
14
|
+
hue?: number
|
|
15
|
+
/** Chroma. */
|
|
16
|
+
chroma?: number
|
|
17
|
+
/** Lightness. */
|
|
18
|
+
lightness?: number
|
|
19
|
+
/** Contrast. */
|
|
20
|
+
contrast?: number
|
|
21
|
+
/** Spread. */
|
|
22
|
+
spread?: number
|
|
23
|
+
/** Breaks. */
|
|
24
|
+
breaks?: number
|
|
25
|
+
/** Mean centering. */
|
|
26
|
+
meanCentering?: boolean
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MapInstance } from '../../core/MapInstance'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Trivariate choropleth map type.
|
|
5
|
+
*/
|
|
6
|
+
export interface TrivariateChoroplethMap extends MapInstance {
|
|
7
|
+
ternaryCodes(): string[]
|
|
8
|
+
ternaryCodes(v: string[]): this
|
|
9
|
+
|
|
10
|
+
noDataFillStyle(): string
|
|
11
|
+
noDataFillStyle(v: string): this
|
|
12
|
+
|
|
13
|
+
ternarySettings(): any
|
|
14
|
+
ternarySettings(v: any): this
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MapInstance } from '../../core/MapInstance'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Value-by-alpha choropleth map type.
|
|
5
|
+
*/
|
|
6
|
+
export interface ValueByAlphaMap extends MapInstance {
|
|
7
|
+
opacityScale(): ((value: number) => number) | null
|
|
8
|
+
opacityScale(v: ((value: number) => number) | null): this
|
|
9
|
+
}
|