eurostat-map 4.4.5 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -4
- package/build/215.eurostatmap.min.js +1 -1
- package/build/215.eurostatmap.min.js.map +1 -1
- package/build/eurostatmap.js +19801 -16163
- package/build/eurostatmap.min.js +2 -2
- package/build/eurostatmap.min.js.map +1 -1
- package/build/package.json +1 -1
- package/build/types/core/GridCartogramSettings.d.ts +33 -0
- package/build/types/core/MapConfig.d.ts +13 -2
- package/build/types/core/MapInstance.d.ts +80 -4
- package/build/types/core/encoding/EncodingConfig.d.ts +31 -0
- package/build/types/core/layer/Layer.d.ts +31 -0
- package/build/types/core/layer/LayerConfig.d.ts +19 -0
- package/build/types/core/layer/LayerRole.d.ts +1 -0
- package/build/types/core/locations.d.ts +44 -16
- package/build/types/core/stat/StatConfig.d.ts +7 -0
- package/build/types/index.d.ts +38 -33
- package/build/types/layers/CategoricalMap.d.ts +21 -0
- package/build/types/layers/CategoricalMapConfig.d.ts +11 -0
- package/build/types/layers/MapType.d.ts +34 -0
- package/build/types/layers/choropleth/BivariateChoroplethConfig.d.ts +27 -0
- package/build/types/layers/choropleth/BivariateChoroplethMap.d.ts +39 -0
- package/build/types/layers/choropleth/ChoroplethConfig.d.ts +39 -0
- package/build/types/layers/choropleth/ChoroplethMap.d.ts +48 -0
- package/build/types/layers/choropleth/TrivariateChoroplethConfig.d.ts +41 -0
- package/build/types/layers/choropleth/TrivariateChoroplethMap.d.ts +18 -0
- package/build/types/layers/choropleth/ValueByAlphaConfig.d.ts +8 -0
- package/build/types/layers/choropleth/ValueByAlphaMap.d.ts +9 -0
- package/build/types/layers/composition/CompositionStatConfig.d.ts +59 -0
- package/build/types/layers/composition/bar/BarMap.d.ts +97 -0
- package/build/types/layers/composition/bar/BarMapConfig.d.ts +76 -0
- package/build/types/layers/composition/coxcomb/CoxcombMap.d.ts +75 -0
- package/build/types/layers/composition/coxcomb/CoxcombMapConfig.d.ts +47 -0
- package/build/types/layers/composition/coxcomb/CoxcombStatConfig.d.ts +13 -0
- package/build/types/layers/composition/pie/PieMap.d.ts +84 -0
- package/build/types/layers/composition/pie/PieMapConfig.d.ts +50 -0
- package/build/types/layers/composition/stripe/StripeMap.d.ts +80 -0
- package/build/types/layers/composition/stripe/StripeMapConfig.d.ts +45 -0
- package/build/types/layers/composition/waffle/WaffleMap.d.ts +124 -0
- package/build/types/layers/composition/waffle/WaffleMapConfig.d.ts +58 -0
- package/build/types/layers/flow/FlowMap.d.ts +218 -0
- package/build/types/layers/flow/FlowMapConfig.d.ts +220 -0
- package/build/types/layers/proportional-symbol/ProportionalSymbolConfig.d.ts +47 -0
- package/build/types/layers/proportional-symbol/ProportionalSymbolMap.d.ts +94 -0
- package/build/types/layers/proportional-symbol/mushroom/MushroomMap.d.ts +67 -0
- package/build/types/layers/proportional-symbol/mushroom/MushroomMapConfig.d.ts +39 -0
- package/build/types/layers/spark/SparkMap.d.ts +56 -0
- package/build/types/layers/spark/SparkMapConfig.d.ts +75 -0
- package/build/types/layers/spark/SparkStatConfig.d.ts +33 -0
- package/build/types/legend/LegendConfig.d.ts +3 -0
- package/build/types/legend/choropleth/BivariateLegendConfig.d.ts +79 -0
- package/build/types/legend/choropleth/legend-choropleth-bivariate.d.ts +2 -2
- package/build/types/legend/choropleth/legend-choropleth-trivariate.d.ts +2 -2
- package/build/types/legend/choropleth/legend-choropleth.d.ts +2 -2
- package/build/types/legend/composition/legend-bar-chart.d.ts +2 -2
- package/build/types/legend/flow/legend-flow.d.ts +2 -2
- package/build/types/legend/legend-categorical.d.ts +2 -2
- package/build/types/legend/legend-continuous.d.ts +2 -2
- package/build/types/legend/legend-discrete.d.ts +2 -2
- package/build/types/legend/legend.d.ts +13 -13
- package/build/types/legend/proportional-symbol/legend-proportional-symbols.d.ts +2 -2
- package/build/types/map-types/CategoricalMapConfig.d.ts +11 -11
- package/build/types/map-types/choropleth/map-choropleth-bivariate.d.ts +4 -4
- package/build/types/map-types/choropleth/map-choropleth-trivariate.d.ts +4 -4
- package/build/types/map-types/choropleth/map-value-by-alpha.d.ts +4 -4
- package/build/types/map-types/composition/CompositionStatConfig.d.ts +7 -0
- package/build/types/map-types/composition/bar/BarMap.d.ts +97 -79
- package/build/types/map-types/composition/bar/BarMapConfig.d.ts +76 -54
- package/build/types/map-types/composition/coxcomb/CoxcombMap.d.ts +29 -0
- package/build/types/map-types/composition/coxcomb/CoxcombMapConfig.d.ts +15 -0
- package/build/types/map-types/composition/map-spark.d.ts +5 -5
- package/build/types/map-types/composition/map-stripe.d.ts +5 -5
- package/build/types/map-types/composition/pie/PieMap.d.ts +1 -5
- package/build/types/map-types/composition/stripe/StripeMap.d.ts +19 -2
- package/build/types/map-types/composition/stripe/StripeMapConfig.d.ts +11 -0
- package/build/types/map-types/composition/waffle/WaffleMap.d.ts +1 -0
- package/build/types/map-types/flow/FlowMap.d.ts +121 -0
- package/build/types/map-types/flow/FlowMapConfig.d.ts +62 -0
- package/build/types/map-types/flow/map-flow.d.ts +5 -5
- package/build/types/map-types/proportional-symbol/ProportionalSymbolConfig.d.ts +30 -0
- package/build/types/map-types/proportional-symbol/ProportionalSymbolMap.d.ts +4 -0
- package/build/types/map-types/proportional-symbol/mushroom/MushroomMap.d.ts +37 -0
- package/build/types/map-types/proportional-symbol/mushroom/MushroomMapConfig.d.ts +19 -0
- package/build/types/map-types/spark/SparkMap.d.ts +4 -0
- package/build/types/map-types/spark/SparkMapConfig.d.ts +32 -0
- package/package.json +3 -2
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import type { MapConfig } from '../../core/MapConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A flow node in the flow graph.
|
|
5
|
+
*/
|
|
6
|
+
export interface FlowNode {
|
|
7
|
+
/** Id. */
|
|
8
|
+
id: string
|
|
9
|
+
/** Name. */
|
|
10
|
+
name?: string
|
|
11
|
+
/** X. */
|
|
12
|
+
x?: number
|
|
13
|
+
/** Y. */
|
|
14
|
+
y?: number
|
|
15
|
+
/** Value. */
|
|
16
|
+
value?: number
|
|
17
|
+
[key: string]: any
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A flow link between two nodes.
|
|
22
|
+
*/
|
|
23
|
+
export interface FlowLink {
|
|
24
|
+
/** Source. */
|
|
25
|
+
source: string | FlowNode
|
|
26
|
+
/** Target. */
|
|
27
|
+
target: string | FlowNode
|
|
28
|
+
/** Value. */
|
|
29
|
+
value: number
|
|
30
|
+
/** Origin id. */
|
|
31
|
+
originId?: string
|
|
32
|
+
/** Dest id. */
|
|
33
|
+
destId?: string
|
|
34
|
+
[key: string]: any
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Graph input used by flow maps.
|
|
39
|
+
*/
|
|
40
|
+
export interface FlowGraph {
|
|
41
|
+
/** Nodes. */
|
|
42
|
+
nodes: FlowNode[]
|
|
43
|
+
/** Links. */
|
|
44
|
+
links: FlowLink[]
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Curvature settings used for curved/sankey flow rendering.
|
|
49
|
+
*/
|
|
50
|
+
export interface FlowCurvatureSettings {
|
|
51
|
+
/** Gap x. */
|
|
52
|
+
gapX?: number
|
|
53
|
+
/** Pad x. */
|
|
54
|
+
padX?: number
|
|
55
|
+
/** Pad y. */
|
|
56
|
+
padY?: number
|
|
57
|
+
/** Bump y. */
|
|
58
|
+
bumpY?: number
|
|
59
|
+
/** Curvature. */
|
|
60
|
+
curvature?: number
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Width gradient settings for tapered flows.
|
|
65
|
+
*/
|
|
66
|
+
export interface FlowWidthGradientSettings {
|
|
67
|
+
/** Start ratio. */
|
|
68
|
+
startRatio?: number
|
|
69
|
+
/** Samples. */
|
|
70
|
+
samples?: number
|
|
71
|
+
/** Min start width. */
|
|
72
|
+
minStartWidth?: number
|
|
73
|
+
/** Cap end. */
|
|
74
|
+
capEnd?: boolean
|
|
75
|
+
/** Curvature follow. */
|
|
76
|
+
curvatureFollow?: boolean
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Force settings for optional edge bundling.
|
|
81
|
+
*/
|
|
82
|
+
export interface FlowBundleSettings {
|
|
83
|
+
/** Alpha decay. */
|
|
84
|
+
alphaDecay?: number
|
|
85
|
+
/** Charge strength. */
|
|
86
|
+
chargeStrength?: number
|
|
87
|
+
/** Distance max. */
|
|
88
|
+
distanceMax?: number | null
|
|
89
|
+
/** Link strength. */
|
|
90
|
+
linkStrength?: number
|
|
91
|
+
/** Link iterations. */
|
|
92
|
+
linkIterations?: number
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Configuration for flow maps.
|
|
97
|
+
*/
|
|
98
|
+
export interface FlowMapConfig extends MapConfig {
|
|
99
|
+
/** Flow graph. */
|
|
100
|
+
flowGraph?: FlowGraph
|
|
101
|
+
|
|
102
|
+
/** Grouped flow settings object. */
|
|
103
|
+
flowSettings?: {
|
|
104
|
+
color?: string
|
|
105
|
+
regionColors?: string[]
|
|
106
|
+
regionLabels?: string[]
|
|
107
|
+
arrows?: boolean
|
|
108
|
+
arrowScale?: number
|
|
109
|
+
maxWidth?: number
|
|
110
|
+
minWidth?: number
|
|
111
|
+
outlines?: boolean
|
|
112
|
+
outlineWidth?: number
|
|
113
|
+
outlineColor?: string
|
|
114
|
+
colorGradient?: boolean
|
|
115
|
+
stack?: boolean
|
|
116
|
+
nodes?: boolean
|
|
117
|
+
nodeType?: 'circle' | 'donut'
|
|
118
|
+
labelOffsets?: { x?: number; y?: number }
|
|
119
|
+
lineType?: 'curved' | 'straight' | 'sankey'
|
|
120
|
+
nodeSizeScale?: (value: number) => number
|
|
121
|
+
opacity?: number
|
|
122
|
+
internal?: boolean
|
|
123
|
+
topLocations?: number
|
|
124
|
+
topLocationsType?: 'sum' | 'origin' | 'destination'
|
|
125
|
+
curvatureSettings?: FlowCurvatureSettings
|
|
126
|
+
order?: (a: any, b: any) => number
|
|
127
|
+
widthGradient?: boolean
|
|
128
|
+
opacityGradient?: boolean
|
|
129
|
+
widthGradientSettings?: FlowWidthGradientSettings
|
|
130
|
+
bidirectional?: boolean
|
|
131
|
+
edgeBundling?: boolean
|
|
132
|
+
bundleSettings?: FlowBundleSettings
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/** @deprecated Use flowSettings.color */
|
|
136
|
+
/** Flow color. */
|
|
137
|
+
flowColor?: string
|
|
138
|
+
/** @deprecated Use flowSettings.regionColors */
|
|
139
|
+
/** Flow region colors. */
|
|
140
|
+
flowRegionColors?: string[]
|
|
141
|
+
/** @deprecated Use flowSettings.regionLabels */
|
|
142
|
+
/** Flow region labels. */
|
|
143
|
+
flowRegionLabels?: string[]
|
|
144
|
+
/** @deprecated Use flowSettings.arrows */
|
|
145
|
+
/** Flow arrows. */
|
|
146
|
+
flowArrows?: boolean
|
|
147
|
+
/** @deprecated Use flowSettings.arrowScale */
|
|
148
|
+
/** Flow arrow scale. */
|
|
149
|
+
flowArrowScale?: number
|
|
150
|
+
/** @deprecated Use flowSettings.maxWidth */
|
|
151
|
+
/** Flow max width. */
|
|
152
|
+
flowMaxWidth?: number
|
|
153
|
+
/** @deprecated Use flowSettings.minWidth */
|
|
154
|
+
/** Flow min width. */
|
|
155
|
+
flowMinWidth?: number
|
|
156
|
+
/** @deprecated Use flowSettings.outlines */
|
|
157
|
+
/** Flow outlines. */
|
|
158
|
+
flowOutlines?: boolean
|
|
159
|
+
/** @deprecated Use flowSettings.outlineWidth */
|
|
160
|
+
/** Flow outline width. */
|
|
161
|
+
flowOutlineWidth?: number
|
|
162
|
+
/** @deprecated Use flowSettings.outlineColor */
|
|
163
|
+
/** Flow outline color. */
|
|
164
|
+
flowOutlineColor?: string
|
|
165
|
+
/** @deprecated Use flowSettings.colorGradient */
|
|
166
|
+
/** Flow color gradient. */
|
|
167
|
+
flowColorGradient?: boolean
|
|
168
|
+
/** @deprecated Use flowSettings.stack */
|
|
169
|
+
/** Flow stack. */
|
|
170
|
+
flowStack?: boolean
|
|
171
|
+
/** @deprecated Use flowSettings.nodes */
|
|
172
|
+
/** Flow nodes. */
|
|
173
|
+
flowNodes?: boolean
|
|
174
|
+
/** @deprecated Use flowSettings.nodeType */
|
|
175
|
+
/** Flow node type. */
|
|
176
|
+
flowNodeType?: 'circle' | 'donut'
|
|
177
|
+
/** @deprecated Use flowSettings.labelOffsets */
|
|
178
|
+
/** Flow label offsets. */
|
|
179
|
+
flowLabelOffsets?: { x?: number; y?: number }
|
|
180
|
+
/** @deprecated Use flowSettings.lineType */
|
|
181
|
+
/** Flow line type. */
|
|
182
|
+
flowLineType?: 'curved' | 'straight' | 'sankey'
|
|
183
|
+
/** @deprecated Use flowSettings.nodeSizeScale */
|
|
184
|
+
flowNodeSizeScale?: (value: number) => number
|
|
185
|
+
/** @deprecated Use flowSettings.opacity */
|
|
186
|
+
/** Flow opacity. */
|
|
187
|
+
flowOpacity?: number
|
|
188
|
+
/** @deprecated Use flowSettings.internal */
|
|
189
|
+
/** Flow internal. */
|
|
190
|
+
flowInternal?: boolean
|
|
191
|
+
/** @deprecated Use flowSettings.topLocations */
|
|
192
|
+
/** Flow top locations. */
|
|
193
|
+
flowTopLocations?: number
|
|
194
|
+
/** @deprecated Use flowSettings.topLocationsType */
|
|
195
|
+
/** Flow top locations type. */
|
|
196
|
+
flowTopLocationsType?: 'sum' | 'origin' | 'destination'
|
|
197
|
+
/** @deprecated Use flowSettings.curvatureSettings */
|
|
198
|
+
/** Flow curvature settings. */
|
|
199
|
+
flowCurvatureSettings?: FlowCurvatureSettings
|
|
200
|
+
/** @deprecated Use flowSettings.order */
|
|
201
|
+
flowOrder?: (a: any, b: any) => number
|
|
202
|
+
/** @deprecated Use flowSettings.widthGradient */
|
|
203
|
+
/** Flow width gradient. */
|
|
204
|
+
flowWidthGradient?: boolean
|
|
205
|
+
/** @deprecated Use flowSettings.opacityGradient */
|
|
206
|
+
/** Flow opacity gradient. */
|
|
207
|
+
flowOpacityGradient?: boolean
|
|
208
|
+
/** @deprecated Use flowSettings.widthGradientSettings */
|
|
209
|
+
/** Flow width gradient settings. */
|
|
210
|
+
flowWidthGradientSettings?: FlowWidthGradientSettings
|
|
211
|
+
/** @deprecated Use flowSettings.bidirectional */
|
|
212
|
+
/** Flow bidirectional. */
|
|
213
|
+
flowBidirectional?: boolean
|
|
214
|
+
/** @deprecated Use flowSettings.edgeBundling */
|
|
215
|
+
/** Flow edge bundling. */
|
|
216
|
+
flowEdgeBundling?: boolean
|
|
217
|
+
/** @deprecated Use flowSettings.bundleSettings */
|
|
218
|
+
/** Flow bundle settings. */
|
|
219
|
+
flowBundleSettings?: FlowBundleSettings
|
|
220
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { MapConfig } from '../../core/MapConfig'
|
|
2
|
+
|
|
3
|
+
export interface ProportionalSymbolSettings {
|
|
4
|
+
shape?: string
|
|
5
|
+
customShape?: any
|
|
6
|
+
customSVG?: any
|
|
7
|
+
spikeWidth?: number
|
|
8
|
+
offset?: { x: number; y: number }
|
|
9
|
+
barWidth?: number
|
|
10
|
+
minValue?: number | undefined
|
|
11
|
+
maxValue?: number | undefined
|
|
12
|
+
fill?: string
|
|
13
|
+
fillOpacity?: number
|
|
14
|
+
stroke?: string
|
|
15
|
+
strokeWidth?: number
|
|
16
|
+
strokeOpacity?: number
|
|
17
|
+
sizeScale?: 'sqrt' | 'linear' | any
|
|
18
|
+
minSize?: number
|
|
19
|
+
maxSize?: number
|
|
20
|
+
classes?: number
|
|
21
|
+
colors?: string[] | null
|
|
22
|
+
colorFun?: any
|
|
23
|
+
classToFillStyle?: any
|
|
24
|
+
thresholds?: number[]
|
|
25
|
+
classificationMethod?: string
|
|
26
|
+
brightenFactor?: number
|
|
27
|
+
codeLabels?: boolean
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Configuration for proportional symbol maps
|
|
32
|
+
*/
|
|
33
|
+
export interface ProportionalSymbolConfig extends MapConfig {
|
|
34
|
+
/** Symbol shape used for markers. */
|
|
35
|
+
symbol?: 'circle' | 'square'
|
|
36
|
+
/** Base symbol size factor. */
|
|
37
|
+
size?: number
|
|
38
|
+
|
|
39
|
+
/** Dorling cartogram. */
|
|
40
|
+
dorling?: boolean
|
|
41
|
+
|
|
42
|
+
/** Size function. */
|
|
43
|
+
psCustomSize?: (value: number) => number
|
|
44
|
+
|
|
45
|
+
/** Grouped proportional symbol style settings. */
|
|
46
|
+
psSettings?: ProportionalSymbolSettings
|
|
47
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { MapInstance } from '../../core/MapInstance'
|
|
2
|
+
import type { ProportionalSymbolSettings } from './ProportionalSymbolConfig'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Proportional symbol map object
|
|
6
|
+
*/
|
|
7
|
+
export interface ProportionalSymbolMap extends MapInstance {
|
|
8
|
+
psSettings(): ProportionalSymbolSettings
|
|
9
|
+
psSettings(v: ProportionalSymbolSettings): this
|
|
10
|
+
|
|
11
|
+
psMaxSize(): number
|
|
12
|
+
psMaxSize(v: number): this
|
|
13
|
+
|
|
14
|
+
psMinSize(): number
|
|
15
|
+
psMinSize(v: number): this
|
|
16
|
+
|
|
17
|
+
psMaxValue(): number | undefined
|
|
18
|
+
psMaxValue(v: number | undefined): this
|
|
19
|
+
|
|
20
|
+
psMinValue(): number | undefined
|
|
21
|
+
psMinValue(v: number | undefined): this
|
|
22
|
+
|
|
23
|
+
psFill(): string
|
|
24
|
+
psFill(v: string): this
|
|
25
|
+
|
|
26
|
+
psFillOpacity(): number
|
|
27
|
+
psFillOpacity(v: number): this
|
|
28
|
+
|
|
29
|
+
psStrokeOpacity(): number
|
|
30
|
+
psStrokeOpacity(v: number): this
|
|
31
|
+
|
|
32
|
+
psStroke(): string
|
|
33
|
+
psStroke(v: string): this
|
|
34
|
+
|
|
35
|
+
psStrokeWidth(): number
|
|
36
|
+
psStrokeWidth(v: number): this
|
|
37
|
+
|
|
38
|
+
classifierSize(): any
|
|
39
|
+
classifierSize(v: any): this
|
|
40
|
+
|
|
41
|
+
classifierColor(): any
|
|
42
|
+
classifierColor(v: any): this
|
|
43
|
+
|
|
44
|
+
psShape(): string
|
|
45
|
+
psShape(v: string): this
|
|
46
|
+
|
|
47
|
+
psCustomShape(): any
|
|
48
|
+
psCustomShape(v: any): this
|
|
49
|
+
|
|
50
|
+
psBarWidth(): number
|
|
51
|
+
psBarWidth(v: number): this
|
|
52
|
+
|
|
53
|
+
psClassToFillStyle(): any
|
|
54
|
+
psClassToFillStyle(v: any): this
|
|
55
|
+
|
|
56
|
+
psColorFun(): any
|
|
57
|
+
psColorFun(v: any): this
|
|
58
|
+
|
|
59
|
+
psSizeScale(): any
|
|
60
|
+
psSizeScale(v: any): this
|
|
61
|
+
|
|
62
|
+
noDataFillStyle(): string
|
|
63
|
+
noDataFillStyle(v: string): this
|
|
64
|
+
|
|
65
|
+
psThresholds(): number[]
|
|
66
|
+
psThresholds(v: number[]): this
|
|
67
|
+
|
|
68
|
+
psColors(): string[] | null
|
|
69
|
+
psColors(v: string[] | null): this
|
|
70
|
+
|
|
71
|
+
psCustomSVG(): any
|
|
72
|
+
psCustomSVG(v: any): this
|
|
73
|
+
|
|
74
|
+
psOffset(): { x: number; y: number }
|
|
75
|
+
psOffset(v: { x: number; y: number }): this
|
|
76
|
+
|
|
77
|
+
psClassificationMethod(): string
|
|
78
|
+
psClassificationMethod(v: string): this
|
|
79
|
+
|
|
80
|
+
psClasses(): number
|
|
81
|
+
psClasses(v: number): this
|
|
82
|
+
|
|
83
|
+
dorling(): boolean
|
|
84
|
+
dorling(v: boolean): this
|
|
85
|
+
|
|
86
|
+
psSpikeWidth(): number
|
|
87
|
+
psSpikeWidth(v: number): this
|
|
88
|
+
|
|
89
|
+
psCodeLabels(): boolean
|
|
90
|
+
psCodeLabels(v: boolean): this
|
|
91
|
+
|
|
92
|
+
psBrightenFactor(): number
|
|
93
|
+
psBrightenFactor(v: number): this
|
|
94
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { MapInstance } from '../../../core/MapInstance'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Mushroom map type.
|
|
5
|
+
*/
|
|
6
|
+
export interface MushroomMap extends MapInstance {
|
|
7
|
+
mushroomSettings(): {
|
|
8
|
+
codes: [string, string]
|
|
9
|
+
minSize: number
|
|
10
|
+
maxSize: number
|
|
11
|
+
colors: [string, string]
|
|
12
|
+
orientation: 'horizontal' | 'vertical'
|
|
13
|
+
sizeScaleFunction: any
|
|
14
|
+
sizeScaleFunctionV1: any
|
|
15
|
+
sizeScaleFunctionV2: any
|
|
16
|
+
}
|
|
17
|
+
mushroomSettings(v: {
|
|
18
|
+
codes?: [string, string]
|
|
19
|
+
minSize?: number
|
|
20
|
+
maxSize?: number
|
|
21
|
+
colors?: [string, string]
|
|
22
|
+
orientation?: 'horizontal' | 'vertical'
|
|
23
|
+
sizeScaleFunction?: any
|
|
24
|
+
sizeScaleFunctionV1?: any
|
|
25
|
+
sizeScaleFunctionV2?: any
|
|
26
|
+
}): this
|
|
27
|
+
|
|
28
|
+
/** @deprecated Use mushroomSettings({ codes }) */
|
|
29
|
+
mushroomCodes(): [string, string]
|
|
30
|
+
/** @deprecated Use mushroomSettings({ codes }) */
|
|
31
|
+
mushroomCodes(v: [string, string]): this
|
|
32
|
+
|
|
33
|
+
/** @deprecated Use mushroomSettings({ minSize }) */
|
|
34
|
+
mushroomMinSize(): number
|
|
35
|
+
/** @deprecated Use mushroomSettings({ minSize }) */
|
|
36
|
+
mushroomMinSize(v: number): this
|
|
37
|
+
|
|
38
|
+
/** @deprecated Use mushroomSettings({ maxSize }) */
|
|
39
|
+
mushroomMaxSize(): number
|
|
40
|
+
/** @deprecated Use mushroomSettings({ maxSize }) */
|
|
41
|
+
mushroomMaxSize(v: number): this
|
|
42
|
+
|
|
43
|
+
/** @deprecated Use mushroomSettings({ colors }) */
|
|
44
|
+
mushroomColors(): [string, string]
|
|
45
|
+
/** @deprecated Use mushroomSettings({ colors }) */
|
|
46
|
+
mushroomColors(v: [string, string]): this
|
|
47
|
+
|
|
48
|
+
/** @deprecated Use mushroomSettings({ orientation }) */
|
|
49
|
+
mushroomOrientation(): 'horizontal' | 'vertical'
|
|
50
|
+
/** @deprecated Use mushroomSettings({ orientation }) */
|
|
51
|
+
mushroomOrientation(v: 'horizontal' | 'vertical'): this
|
|
52
|
+
|
|
53
|
+
/** @deprecated Use mushroomSettings({ sizeScaleFunction }) */
|
|
54
|
+
mushroomSizeScaleFunction(): any
|
|
55
|
+
/** @deprecated Use mushroomSettings({ sizeScaleFunction }) */
|
|
56
|
+
mushroomSizeScaleFunction(v: any): this
|
|
57
|
+
|
|
58
|
+
/** @deprecated Use mushroomSettings({ sizeScaleFunctionV1 }) */
|
|
59
|
+
mushroomSizeScaleFunctionV1(): any
|
|
60
|
+
/** @deprecated Use mushroomSettings({ sizeScaleFunctionV1 }) */
|
|
61
|
+
mushroomSizeScaleFunctionV1(v: any): this
|
|
62
|
+
|
|
63
|
+
/** @deprecated Use mushroomSettings({ sizeScaleFunctionV2 }) */
|
|
64
|
+
mushroomSizeScaleFunctionV2(): any
|
|
65
|
+
/** @deprecated Use mushroomSettings({ sizeScaleFunctionV2 }) */
|
|
66
|
+
mushroomSizeScaleFunctionV2(v: any): this
|
|
67
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { MapConfig } from '../../../core/MapConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for mushroom maps.
|
|
5
|
+
*/
|
|
6
|
+
export interface MushroomMapConfig extends MapConfig {
|
|
7
|
+
/** Grouped mushroom settings. */
|
|
8
|
+
mushroomSettings?: {
|
|
9
|
+
codes?: [string, string]
|
|
10
|
+
minSize?: number
|
|
11
|
+
maxSize?: number
|
|
12
|
+
colors?: [string, string]
|
|
13
|
+
orientation?: 'horizontal' | 'vertical'
|
|
14
|
+
sizeScaleFunction?: (value: number) => number
|
|
15
|
+
sizeScaleFunctionV1?: (value: number) => number
|
|
16
|
+
sizeScaleFunctionV2?: (value: number) => number
|
|
17
|
+
}
|
|
18
|
+
/** @deprecated Use mushroomSettings.codes */
|
|
19
|
+
/** Mushroom codes. */
|
|
20
|
+
mushroomCodes?: [string, string]
|
|
21
|
+
/** @deprecated Use mushroomSettings.minSize */
|
|
22
|
+
/** Mushroom min size. */
|
|
23
|
+
mushroomMinSize?: number
|
|
24
|
+
/** @deprecated Use mushroomSettings.maxSize */
|
|
25
|
+
/** Mushroom max size. */
|
|
26
|
+
mushroomMaxSize?: number
|
|
27
|
+
/** @deprecated Use mushroomSettings.colors */
|
|
28
|
+
/** Mushroom colors. */
|
|
29
|
+
mushroomColors?: [string, string]
|
|
30
|
+
/** @deprecated Use mushroomSettings.orientation */
|
|
31
|
+
/** Mushroom orientation. */
|
|
32
|
+
mushroomOrientation?: 'horizontal' | 'vertical'
|
|
33
|
+
/** @deprecated Use mushroomSettings.sizeScaleFunction */
|
|
34
|
+
mushroomSizeScaleFunction?: (value: number) => number
|
|
35
|
+
/** @deprecated Use mushroomSettings.sizeScaleFunctionV1 */
|
|
36
|
+
mushroomSizeScaleFunctionV1?: (value: number) => number
|
|
37
|
+
/** @deprecated Use mushroomSettings.sizeScaleFunctionV2 */
|
|
38
|
+
mushroomSizeScaleFunctionV2?: (value: number) => number
|
|
39
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { MapInstance } from '../../core/MapInstance'
|
|
2
|
+
import type { SparkStatConfig } from './SparkStatConfig'
|
|
3
|
+
import type { SparklineLegendConfig } from '../../legend/composition/SparklineLegendConfig'
|
|
4
|
+
import type { SparkSettings } from './SparkMapConfig'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Spark map type.
|
|
8
|
+
*/
|
|
9
|
+
export interface SparkMap extends MapInstance {
|
|
10
|
+
sparkSettings(): SparkSettings
|
|
11
|
+
sparkSettings(v: SparkSettings): this
|
|
12
|
+
|
|
13
|
+
legend(): SparklineLegendConfig | false
|
|
14
|
+
legend(config: SparklineLegendConfig | false): this
|
|
15
|
+
|
|
16
|
+
sparkLineColor(): any
|
|
17
|
+
sparkLineColor(v: any): this
|
|
18
|
+
|
|
19
|
+
showOnlyWhenComplete(): boolean
|
|
20
|
+
showOnlyWhenComplete(v: boolean): this
|
|
21
|
+
|
|
22
|
+
sparkType(): 'line' | 'area' | 'bar'
|
|
23
|
+
sparkType(v: 'line' | 'area' | 'bar'): this
|
|
24
|
+
|
|
25
|
+
sparkLineWidth(): number
|
|
26
|
+
sparkLineWidth(v: number): this
|
|
27
|
+
|
|
28
|
+
sparkLineHeight(): number
|
|
29
|
+
sparkLineHeight(v: number): this
|
|
30
|
+
|
|
31
|
+
sparkLineStrokeWidth(): number
|
|
32
|
+
sparkLineStrokeWidth(v: number): this
|
|
33
|
+
|
|
34
|
+
sparkLineOpacity(): number
|
|
35
|
+
sparkLineOpacity(v: number): this
|
|
36
|
+
|
|
37
|
+
sparkLineCircleRadius(): number
|
|
38
|
+
sparkLineCircleRadius(v: number): this
|
|
39
|
+
|
|
40
|
+
sparkLineAreaColor(): any
|
|
41
|
+
sparkLineAreaColor(v: any): this
|
|
42
|
+
|
|
43
|
+
sparkTooltipChart(): any
|
|
44
|
+
sparkTooltipChart(v: any): this
|
|
45
|
+
|
|
46
|
+
sparkLineChartFunction(): any
|
|
47
|
+
sparkLineChartFunction(v: any): this
|
|
48
|
+
|
|
49
|
+
sparkLineOffsets(): { x: number; y: number }
|
|
50
|
+
sparkLineOffsets(v: { x: number; y: number }): this
|
|
51
|
+
|
|
52
|
+
/** Manually set sparkline data instead of fetching it from Eurostat. */
|
|
53
|
+
sparklineData(dataObject: Record<string, Record<string, number>>): this
|
|
54
|
+
/** Configure fetching data from Eurostat and generating spark lines. */
|
|
55
|
+
statSpark(config: SparkStatConfig): this
|
|
56
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { MapConfig } from '../../core/MapConfig'
|
|
2
|
+
import type { SparklineLegendConfig } from '../../legend/composition/SparklineLegendConfig'
|
|
3
|
+
|
|
4
|
+
export interface SparkSettings {
|
|
5
|
+
type?: 'line' | 'area' | 'bar'
|
|
6
|
+
lineOffsets?: { x: number; y: number }
|
|
7
|
+
lineWidth?: number
|
|
8
|
+
lineHeight?: number
|
|
9
|
+
lineStrokeWidth?: number
|
|
10
|
+
lineOpacity?: number
|
|
11
|
+
lineColor?: string | ((value: number, index: number, data: any[]) => string)
|
|
12
|
+
areaColor?: string | ((value: number, index: number, data: any[]) => string)
|
|
13
|
+
lineCircleRadius?: number
|
|
14
|
+
tooltipChart?: {
|
|
15
|
+
width: number
|
|
16
|
+
height: number
|
|
17
|
+
margin: { left: number; right: number; top: number; bottom: number }
|
|
18
|
+
circleRadius: number
|
|
19
|
+
}
|
|
20
|
+
lineChartFunction?: (node: any, data: any[], width: number, height: number, isForTooltip?: boolean) => void
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Configuration for sparkline maps.
|
|
25
|
+
*/
|
|
26
|
+
export interface SparkMapConfig extends MapConfig {
|
|
27
|
+
/** Grouped sparkline rendering settings. */
|
|
28
|
+
sparkSettings?: SparkSettings
|
|
29
|
+
|
|
30
|
+
/** Spark type. */
|
|
31
|
+
sparkType?: 'line' | 'area' | 'bar'
|
|
32
|
+
|
|
33
|
+
/** Object-form stat configuration for temporal sparkline datasets. */
|
|
34
|
+
dates?: string[]
|
|
35
|
+
labels?: string[]
|
|
36
|
+
eurostatDatasetCode?: string
|
|
37
|
+
customData?: Record<string, Record<string, number>>
|
|
38
|
+
filters?: Record<string, any>
|
|
39
|
+
unitText?: string
|
|
40
|
+
preprocess?: (regionId: string, value: any) => any
|
|
41
|
+
transform?: (value: any) => any
|
|
42
|
+
|
|
43
|
+
sparkLineColor?: string | ((value: number, index: number, data: any[]) => string)
|
|
44
|
+
sparkAreaColor?: string | ((value: number, index: number, data: any[]) => string)
|
|
45
|
+
/** Spark line width. */
|
|
46
|
+
sparkLineWidth?: number
|
|
47
|
+
/** Spark line height. */
|
|
48
|
+
sparkLineHeight?: number
|
|
49
|
+
/** Spark line stroke width. */
|
|
50
|
+
sparkLineStrokeWidth?: number
|
|
51
|
+
/** Spark line opacity. */
|
|
52
|
+
sparkLineOpacity?: number
|
|
53
|
+
/** Spark line circle radius. */
|
|
54
|
+
sparkLineCircleRadius?: number
|
|
55
|
+
/** Spark tooltip chart. */
|
|
56
|
+
sparkTooltipChart?: {
|
|
57
|
+
/** Width. */
|
|
58
|
+
width: number
|
|
59
|
+
/** Height. */
|
|
60
|
+
height: number
|
|
61
|
+
/** Margin. */
|
|
62
|
+
margin: { left: number; right: number; top: number; bottom: number }
|
|
63
|
+
/** Circle radius. */
|
|
64
|
+
circleRadius: number
|
|
65
|
+
}
|
|
66
|
+
/** Spark line offsets. */
|
|
67
|
+
sparkLineOffsets?: { x: number; y: number }
|
|
68
|
+
/** Show only when complete. */
|
|
69
|
+
showOnlyWhenComplete?: boolean
|
|
70
|
+
sparkLineChartFunction?: (node: any, data: any[], width: number, height: number, isForTooltip?: boolean) => void
|
|
71
|
+
/** Spark yscale. */
|
|
72
|
+
sparkYScale?: any
|
|
73
|
+
/** Legend. */
|
|
74
|
+
legend?: SparklineLegendConfig | false
|
|
75
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Statistical configuration for sparkline maps.
|
|
3
|
+
*
|
|
4
|
+
* Either `eurostatDatasetCode` + `dates` (Eurostat API path)
|
|
5
|
+
* or `customData` (custom data path) must be provided.
|
|
6
|
+
*/
|
|
7
|
+
export interface SparkStatConfig {
|
|
8
|
+
/**
|
|
9
|
+
* Custom data keyed by region ID then date string.
|
|
10
|
+
* Use instead of `eurostatDatasetCode` when supplying data directly.
|
|
11
|
+
* When `customData` is set, `eurostatDatasetCode` is not required;
|
|
12
|
+
* `dates` defaults to the key order of the first region's entries.
|
|
13
|
+
* @example
|
|
14
|
+
* customData: {
|
|
15
|
+
* ES: { '2020': 100, '2021': 120, '2022': 115 },
|
|
16
|
+
* DE: { '2020': 200, '2021': 190, '2022': 210 },
|
|
17
|
+
* }
|
|
18
|
+
*/
|
|
19
|
+
customData?: Record<string, Record<string, number>>
|
|
20
|
+
|
|
21
|
+
/** Eurostat dataset code. Required when not using `customData`. */
|
|
22
|
+
eurostatDatasetCode?: string
|
|
23
|
+
/** Filters. */
|
|
24
|
+
filters?: Record<string, any>
|
|
25
|
+
/** Unit text. */
|
|
26
|
+
unitText?: string
|
|
27
|
+
preprocess?: (regionId: string, value: any) => any
|
|
28
|
+
transform?: (value: number) => number
|
|
29
|
+
/** Date keys to fetch. Required when not using `customData`. */
|
|
30
|
+
dates?: string[]
|
|
31
|
+
/** Display labels for each date. */
|
|
32
|
+
labels?: string[]
|
|
33
|
+
}
|
|
@@ -6,6 +6,8 @@ export interface LegendConfig {
|
|
|
6
6
|
x?: number
|
|
7
7
|
/** Legend origin y-coordinate in pixels. */
|
|
8
8
|
y?: number
|
|
9
|
+
/** Automatically position the legend in a map corner. Manual x/y coordinates take precedence. */
|
|
10
|
+
position?: 'top right' | 'bottom right' | 'top left' | 'bottom left'
|
|
9
11
|
/** Legend width in pixels. */
|
|
10
12
|
width?: number
|
|
11
13
|
/** Legend height in pixels. */
|
|
@@ -65,4 +67,5 @@ export interface LegendConfig {
|
|
|
65
67
|
maxMin?: boolean
|
|
66
68
|
/** Text affixes for min/max labels as [minSuffix, maxSuffix]. */
|
|
67
69
|
maxMinLabels?: [string, string]
|
|
70
|
+
layer?: any
|
|
68
71
|
}
|