eurostat-map 4.10.9 → 4.10.11
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/build/215.eurostatmap.min.js +1 -1
- package/build/eurostatmap.js +2757 -2689
- 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/InsetConfig.d.ts +92 -71
- package/build/types/core/MapConfig.d.ts +103 -12
- package/build/types/core/MapInstance.d.ts +624 -555
- package/build/types/core/TooltipConfig.d.ts +33 -5
- package/build/types/core/decoration/PatternFillConfig.d.ts +34 -0
- package/build/types/core/geo/geometries.d.ts +13 -1
- package/build/types/core/layer/Layer.d.ts +49 -31
- package/build/types/core/minimaps.d.ts +11 -3
- package/build/types/core/stat/StatData.d.ts +2 -2
- package/build/types/core/utils.d.ts +44 -0
- package/build/types/index.d.ts +37 -6
- package/build/types/layers/CategoricalMap.d.ts +9 -9
- package/build/types/layers/choropleth/BivariateChoroplethConfig.d.ts +3 -0
- package/build/types/layers/choropleth/BivariateChoroplethMap.d.ts +9 -6
- package/build/types/layers/choropleth/ChoroplethConfig.d.ts +3 -3
- package/build/types/layers/choropleth/ChoroplethMap.d.ts +16 -4
- package/build/types/layers/choropleth/TrivariateChoroplethMap.d.ts +4 -0
- package/build/types/layers/choropleth/ValueByAlphaMap.d.ts +4 -3
- package/build/types/layers/composition/bar/BarMap.d.ts +170 -97
- package/build/types/layers/composition/bar/BarMapConfig.d.ts +83 -76
- package/build/types/layers/composition/coxcomb/CoxcombMap.d.ts +7 -6
- package/build/types/layers/composition/coxcomb/CoxcombMapConfig.d.ts +2 -2
- package/build/types/layers/composition/pie/PieMap.d.ts +8 -4
- package/build/types/layers/composition/pie/PieMapConfig.d.ts +0 -4
- package/build/types/layers/composition/stripe/StripeMap.d.ts +4 -4
- package/build/types/layers/composition/waffle/WaffleMap.d.ts +4 -4
- package/build/types/layers/flow/FlowMap.d.ts +8 -8
- package/build/types/layers/proportional-symbol/ProportionalSymbolConfig.d.ts +105 -52
- package/build/types/layers/proportional-symbol/ProportionalSymbolMap.d.ts +104 -100
- package/build/types/layers/proportional-symbol/mushroom/MushroomMap.d.ts +16 -12
- package/build/types/layers/spark/SparkMap.d.ts +14 -8
- package/build/types/layers/spark/SparkMapConfig.d.ts +8 -12
- package/build/types/legend/LegendConfig.d.ts +72 -73
- package/build/types/legend/MushroomLegendConfig.d.ts +15 -0
- package/build/types/legend/choropleth/BivariateLegendConfig.d.ts +6 -6
- package/build/types/legend/choropleth/TrivariateLegendConfig.d.ts +5 -5
- package/build/types/legend/composition/BarChartLegendConfig.d.ts +32 -0
- package/build/types/legend/composition/StripeCompositionLegendConfig.d.ts +34 -2
- package/package.json +1 -1
- package/build/types/core/MinimapConfig.d.ts +0 -11
- package/build/types/legend/CoxcombLegendConfig.d.ts +0 -85
- package/build/types/legend/PieChartLegendConfig.d.ts +0 -68
- package/build/types/legend/SparklineLegendConfig.d.ts +0 -6
- package/build/types/legend/StripeCompositionLegendConfig.d.ts +0 -11
- package/build/types/legend/WaffleLegendConfig.d.ts +0 -74
- package/build/types/legend/choropleth/legend-choropleth-bivariate.d.ts +0 -2
- package/build/types/legend/choropleth/legend-choropleth-trivariate.d.ts +0 -2
- package/build/types/legend/choropleth/legend-choropleth.d.ts +0 -2
- package/build/types/legend/composition/legend-bar-chart.d.ts +0 -2
- package/build/types/legend/flow/legend-flow.d.ts +0 -2
- package/build/types/legend/legend-categorical.d.ts +0 -2
- package/build/types/legend/legend-continuous.d.ts +0 -2
- package/build/types/legend/legend-discrete.d.ts +0 -2
- package/build/types/legend/legend.d.ts +0 -13
- package/build/types/legend/proportional-symbol/PropSymbolLegendConfig.d.ts +0 -0
- package/build/types/legend/proportional-symbol/legend-proportional-symbols.d.ts +0 -2
- package/build/types/map-types/CategoricalMap.d.ts +0 -21
- package/build/types/map-types/CategoricalMapConfig.d.ts +0 -11
- package/build/types/map-types/CateogricalMapConfig.d.ts +0 -11
- package/build/types/map-types/MapType.d.ts +0 -34
- package/build/types/map-types/choropleth/BivariateChoroplethConfig.d.ts +0 -27
- package/build/types/map-types/choropleth/BivariateChoroplethMap.d.ts +0 -39
- package/build/types/map-types/choropleth/ChoroplethConfig.d.ts +0 -39
- package/build/types/map-types/choropleth/ChoroplethMap.d.ts +0 -48
- package/build/types/map-types/choropleth/TrivariateChoroplethConfig.d.ts +0 -41
- package/build/types/map-types/choropleth/TrivariateChoroplethMap.d.ts +0 -18
- package/build/types/map-types/choropleth/ValueByAlphaConfig.d.ts +0 -8
- package/build/types/map-types/choropleth/ValueByAlphaMap.d.ts +0 -9
- package/build/types/map-types/choropleth/map-choropleth-bivariate.d.ts +0 -4
- package/build/types/map-types/choropleth/map-choropleth-trivariate.d.ts +0 -4
- package/build/types/map-types/choropleth/map-choropleth.d.ts +0 -47
- package/build/types/map-types/choropleth/map-value-by-alpha.d.ts +0 -4
- package/build/types/map-types/composition/BarMap.d.ts +0 -86
- package/build/types/map-types/composition/BarMapConfig.d.ts +0 -30
- package/build/types/map-types/composition/CompositionStatConfig.d.ts +0 -57
- package/build/types/map-types/composition/CoxcombMap.d.ts +0 -42
- package/build/types/map-types/composition/CoxcombMapConfig.d.ts +0 -18
- package/build/types/map-types/composition/PieMap.d.ts +0 -62
- package/build/types/map-types/composition/PieMapConfig.d.ts +0 -24
- package/build/types/map-types/composition/SparkMap.d.ts +0 -46
- package/build/types/map-types/composition/SparkMapConfig.d.ts +0 -25
- package/build/types/map-types/composition/StripeMap.d.ts +0 -43
- package/build/types/map-types/composition/StripeMapConfig.d.ts +0 -16
- package/build/types/map-types/composition/WaffleMap.d.ts +0 -71
- package/build/types/map-types/composition/WaffleMapConfig.d.ts +0 -25
- package/build/types/map-types/composition/bar/BarMap.d.ts +0 -97
- package/build/types/map-types/composition/bar/BarMapConfig.d.ts +0 -76
- package/build/types/map-types/composition/composition-map.d.ts +0 -25
- package/build/types/map-types/composition/coxcomb/CoxcombMap.d.ts +0 -75
- package/build/types/map-types/composition/coxcomb/CoxcombMapConfig.d.ts +0 -47
- package/build/types/map-types/composition/coxcomb/CoxcombStatConfig.d.ts +0 -13
- package/build/types/map-types/composition/map-bar.d.ts +0 -5
- package/build/types/map-types/composition/map-coxcomb.d.ts +0 -5
- package/build/types/map-types/composition/map-pie.d.ts +0 -10
- package/build/types/map-types/composition/map-spark.d.ts +0 -5
- package/build/types/map-types/composition/map-stripe.d.ts +0 -5
- package/build/types/map-types/composition/map-waffle.d.ts +0 -5
- package/build/types/map-types/composition/pie/PieMap.d.ts +0 -84
- package/build/types/map-types/composition/pie/PieMapConfig.d.ts +0 -50
- package/build/types/map-types/composition/stripe/StripeMap.d.ts +0 -80
- package/build/types/map-types/composition/stripe/StripeMapConfig.d.ts +0 -45
- package/build/types/map-types/composition/waffle/WaffleMap.d.ts +0 -124
- package/build/types/map-types/composition/waffle/WaffleMapConfig.d.ts +0 -58
- package/build/types/map-types/flow/FlowMap.d.ts +0 -218
- package/build/types/map-types/flow/FlowMapConfig.d.ts +0 -220
- package/build/types/map-types/flow/map-flow.d.ts +0 -5
- package/build/types/map-types/map-categorical.d.ts +0 -19
- package/build/types/map-types/proportional-symbol/ProportionalSymbolConfig.d.ts +0 -47
- package/build/types/map-types/proportional-symbol/ProportionalSymbolMap.d.ts +0 -94
- package/build/types/map-types/proportional-symbol/map-proportional-symbols.d.ts +0 -35
- package/build/types/map-types/proportional-symbol/mushroom/MushroomMap.d.ts +0 -67
- package/build/types/map-types/proportional-symbol/mushroom/MushroomMapConfig.d.ts +0 -39
- package/build/types/map-types/spark/SparkMap.d.ts +0 -56
- package/build/types/map-types/spark/SparkMapConfig.d.ts +0 -74
- package/build/types/map-types/spark/SparkStatConfig.d.ts +0 -32
|
@@ -1,52 +1,105 @@
|
|
|
1
|
-
import type { MapConfig } from '../../core/MapConfig'
|
|
2
|
-
|
|
3
|
-
export interface ProportionalSymbolSettings {
|
|
4
|
-
shape
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/** Dorling cartogram. */
|
|
45
|
-
dorling?: boolean
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/** Grouped proportional symbol style settings. */
|
|
51
|
-
psSettings?: ProportionalSymbolSettings
|
|
52
|
-
|
|
1
|
+
import type { MapConfig } from '../../core/MapConfig'
|
|
2
|
+
|
|
3
|
+
export interface ProportionalSymbolSettings {
|
|
4
|
+
/** Symbol shape. Accepted values: 'circle', 'bar', 'square', 'star', 'diamond', 'wye', 'cross', 'triangle', 'spike'. */
|
|
5
|
+
shape?: string
|
|
6
|
+
/** Custom d3-shape symbol type, used when shape is not one of the built-in shapes. */
|
|
7
|
+
customShape?: any
|
|
8
|
+
/** Custom SVG symbol markup/selector to use instead of a built-in shape. */
|
|
9
|
+
customSVG?: any
|
|
10
|
+
spikeWidth?: number
|
|
11
|
+
offset?: { x: number; y: number }
|
|
12
|
+
barWidth?: number
|
|
13
|
+
minValue?: number | undefined
|
|
14
|
+
maxValue?: number | undefined
|
|
15
|
+
fill?: string
|
|
16
|
+
fillOpacity?: number
|
|
17
|
+
stroke?: string
|
|
18
|
+
strokeWidth?: number
|
|
19
|
+
strokeOpacity?: number
|
|
20
|
+
sizeScale?: 'sqrt' | 'linear'
|
|
21
|
+
minSize?: number
|
|
22
|
+
maxSize?: number
|
|
23
|
+
classes?: number
|
|
24
|
+
colors?: string[] | null
|
|
25
|
+
/** d3-scale-chromatic interpolator used to auto-generate colors when not set explicitly. */
|
|
26
|
+
colorFun?: (t: number) => string
|
|
27
|
+
/** Function mapping a class index and the number of classes to a fill color. */
|
|
28
|
+
classToFillStyle?: (ecl: number, numberOfClasses: number) => string
|
|
29
|
+
thresholds?: number[]
|
|
30
|
+
classificationMethod?: 'quantile' | 'equinter' | 'threshold'
|
|
31
|
+
brightenFactor?: number
|
|
32
|
+
codeLabels?: boolean
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Configuration for proportional symbol maps
|
|
37
|
+
*/
|
|
38
|
+
export interface ProportionalSymbolConfig extends MapConfig {
|
|
39
|
+
/** Fill styles for categorical exceptions in the color dataset, keyed by raw value. */
|
|
40
|
+
categoryFillStyle?: { [rawValue: string]: string }
|
|
41
|
+
/** Legend and tooltip labels for categorical exceptions, keyed by raw value. */
|
|
42
|
+
categoryText?: { [rawValue: string]: string }
|
|
43
|
+
|
|
44
|
+
/** Dorling cartogram. */
|
|
45
|
+
dorling?: boolean
|
|
46
|
+
|
|
47
|
+
/** Dorling simulation settings for this layer. Defaults to the map's dorlingSettings. */
|
|
48
|
+
dorlingSettings?: import('../../core/DorlingSettings').DorlingSettings
|
|
49
|
+
|
|
50
|
+
/** Grouped proportional symbol style settings. Preferred over the individual `ps*` fields below. */
|
|
51
|
+
psSettings?: ProportionalSymbolSettings
|
|
52
|
+
|
|
53
|
+
/** Symbol shape. Accepted values: 'circle', 'bar', 'square', 'star', 'diamond', 'wye', 'cross', 'triangle', 'spike'. @default 'circle' */
|
|
54
|
+
psShape?: string
|
|
55
|
+
/** Custom d3-shape symbol type, used when psShape is not one of the built-in shapes. */
|
|
56
|
+
psCustomShape?: any
|
|
57
|
+
/** Custom SVG symbol markup/selector to use instead of a built-in shape. */
|
|
58
|
+
psCustomSVG?: any
|
|
59
|
+
/** Width in pixels of spike symbols (psShape: 'spike'). @default 7 */
|
|
60
|
+
psSpikeWidth?: number
|
|
61
|
+
/** Pixel offset {x, y} applied to each symbol, scaled with symbol size. */
|
|
62
|
+
psOffset?: { x: number; y: number }
|
|
63
|
+
/** Width in pixels of vertical bar symbols (psShape: 'bar'). @default 10 */
|
|
64
|
+
psBarWidth?: number
|
|
65
|
+
/** Max symbol size in pixels. @default 30 */
|
|
66
|
+
psMaxSize?: number
|
|
67
|
+
/** Min symbol size in pixels. @default 5 */
|
|
68
|
+
psMinSize?: number
|
|
69
|
+
/** Value mapped to psMaxSize. Auto-detected from the data when omitted. */
|
|
70
|
+
psMaxValue?: number
|
|
71
|
+
/** Value mapped to psMinSize. Auto-detected from the data when omitted. */
|
|
72
|
+
psMinValue?: number
|
|
73
|
+
/** Size scale type. @default 'sqrt' */
|
|
74
|
+
psSizeScale?: 'sqrt' | 'linear'
|
|
75
|
+
/** Fill color, used when the symbols are not colored by a classified stat. @default '#009569' */
|
|
76
|
+
psFill?: string
|
|
77
|
+
/** Fill opacity. @default 1 */
|
|
78
|
+
psFillOpacity?: number
|
|
79
|
+
/** Stroke color. @default '#ffffff' */
|
|
80
|
+
psStroke?: string
|
|
81
|
+
/** Stroke width. @default 0.2 */
|
|
82
|
+
psStrokeWidth?: number
|
|
83
|
+
/** Stroke opacity. @default 1 */
|
|
84
|
+
psStrokeOpacity?: number
|
|
85
|
+
/** Number of color classes. @default 5 */
|
|
86
|
+
psClasses?: number
|
|
87
|
+
/** Colors used for the color classes. */
|
|
88
|
+
psColors?: string[] | null
|
|
89
|
+
/** d3-scale-chromatic interpolator used to auto-generate psColors when not set explicitly. */
|
|
90
|
+
psColorFun?: any
|
|
91
|
+
/** Function mapping a class index to a fill color. Auto-derived from psColors/psColorFun when unset. */
|
|
92
|
+
psClassToFillStyle?: any
|
|
93
|
+
/** Thresholds, used when psClassificationMethod is 'threshold'. */
|
|
94
|
+
psThresholds?: number[]
|
|
95
|
+
/** Color classification method. @default 'quantile' */
|
|
96
|
+
psClassificationMethod?: 'quantile' | 'equinter' | 'threshold'
|
|
97
|
+
/** Brighten factor applied to generated color classes. @default 0.9 */
|
|
98
|
+
psBrightenFactor?: number
|
|
99
|
+
/** Show region code labels next to symbols. @default false */
|
|
100
|
+
psCodeLabels?: boolean
|
|
101
|
+
/** The classifier function used for sizing symbols. */
|
|
102
|
+
classifierSize?: any
|
|
103
|
+
/** The classifier function used for coloring symbols. */
|
|
104
|
+
classifierColor?: any
|
|
105
|
+
}
|
|
@@ -1,100 +1,104 @@
|
|
|
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
|
-
categoryFillStyle(): { [rawValue: string]: string } | undefined
|
|
9
|
-
categoryFillStyle(v: { [rawValue: string]: string }): this
|
|
10
|
-
|
|
11
|
-
categoryText(): { [rawValue: string]: string } | undefined
|
|
12
|
-
categoryText(v: { [rawValue: string]: string }): this
|
|
13
|
-
|
|
14
|
-
psSettings(): ProportionalSymbolSettings
|
|
15
|
-
psSettings(v: ProportionalSymbolSettings): this
|
|
16
|
-
|
|
17
|
-
psMaxSize(): number
|
|
18
|
-
psMaxSize(v: number): this
|
|
19
|
-
|
|
20
|
-
psMinSize(): number
|
|
21
|
-
psMinSize(v: number): this
|
|
22
|
-
|
|
23
|
-
psMaxValue(): number | undefined
|
|
24
|
-
psMaxValue(v: number | undefined): this
|
|
25
|
-
|
|
26
|
-
psMinValue(): number | undefined
|
|
27
|
-
psMinValue(v: number | undefined): this
|
|
28
|
-
|
|
29
|
-
psFill(): string
|
|
30
|
-
psFill(v: string): this
|
|
31
|
-
|
|
32
|
-
psFillOpacity(): number
|
|
33
|
-
psFillOpacity(v: number): this
|
|
34
|
-
|
|
35
|
-
psStrokeOpacity(): number
|
|
36
|
-
psStrokeOpacity(v: number): this
|
|
37
|
-
|
|
38
|
-
psStroke(): string
|
|
39
|
-
psStroke(v: string): this
|
|
40
|
-
|
|
41
|
-
psStrokeWidth(): number
|
|
42
|
-
psStrokeWidth(v: number): this
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
classifierSize(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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
|
+
categoryFillStyle(): { [rawValue: string]: string } | undefined
|
|
9
|
+
categoryFillStyle(v: { [rawValue: string]: string }): this
|
|
10
|
+
|
|
11
|
+
categoryText(): { [rawValue: string]: string } | undefined
|
|
12
|
+
categoryText(v: { [rawValue: string]: string }): this
|
|
13
|
+
|
|
14
|
+
psSettings(): ProportionalSymbolSettings
|
|
15
|
+
psSettings(v: ProportionalSymbolSettings): this
|
|
16
|
+
|
|
17
|
+
psMaxSize(): number
|
|
18
|
+
psMaxSize(v: number): this
|
|
19
|
+
|
|
20
|
+
psMinSize(): number
|
|
21
|
+
psMinSize(v: number): this
|
|
22
|
+
|
|
23
|
+
psMaxValue(): number | undefined
|
|
24
|
+
psMaxValue(v: number | undefined): this
|
|
25
|
+
|
|
26
|
+
psMinValue(): number | undefined
|
|
27
|
+
psMinValue(v: number | undefined): this
|
|
28
|
+
|
|
29
|
+
psFill(): string
|
|
30
|
+
psFill(v: string): this
|
|
31
|
+
|
|
32
|
+
psFillOpacity(): number
|
|
33
|
+
psFillOpacity(v: number): this
|
|
34
|
+
|
|
35
|
+
psStrokeOpacity(): number
|
|
36
|
+
psStrokeOpacity(v: number): this
|
|
37
|
+
|
|
38
|
+
psStroke(): string
|
|
39
|
+
psStroke(v: string): this
|
|
40
|
+
|
|
41
|
+
psStrokeWidth(): number
|
|
42
|
+
psStrokeWidth(v: number): this
|
|
43
|
+
|
|
44
|
+
/** D3 scale mapping a stat value to a symbol size in pixels. */
|
|
45
|
+
classifierSize(): ((value: number) => number) & { domain: (d?: number[]) => any }
|
|
46
|
+
classifierSize(v: ((value: number) => number) & { domain?: (d?: number[]) => any }): this
|
|
47
|
+
|
|
48
|
+
/** D3 scale mapping a stat value to a color class index. */
|
|
49
|
+
classifierColor(): ((value: number) => number) | undefined
|
|
50
|
+
classifierColor(v: (value: number) => number): this
|
|
51
|
+
|
|
52
|
+
psShape(): string
|
|
53
|
+
psShape(v: string): this
|
|
54
|
+
|
|
55
|
+
psCustomShape(): any
|
|
56
|
+
psCustomShape(v: any): this
|
|
57
|
+
|
|
58
|
+
psBarWidth(): number
|
|
59
|
+
psBarWidth(v: number): this
|
|
60
|
+
|
|
61
|
+
/** Function mapping a class index and the number of classes to a fill color. */
|
|
62
|
+
psClassToFillStyle(): (ecl: number, numberOfClasses: number) => string
|
|
63
|
+
psClassToFillStyle(v: (ecl: number, numberOfClasses: number) => string): this
|
|
64
|
+
|
|
65
|
+
/** d3-scale-chromatic interpolator used to auto-generate psColors when not set explicitly. */
|
|
66
|
+
psColorFun(): (t: number) => string
|
|
67
|
+
psColorFun(v: (t: number) => string): this
|
|
68
|
+
|
|
69
|
+
psSizeScale(): 'sqrt' | 'linear' | undefined
|
|
70
|
+
psSizeScale(v: 'sqrt' | 'linear'): this
|
|
71
|
+
|
|
72
|
+
noDataFillStyle(): string
|
|
73
|
+
noDataFillStyle(v: string): this
|
|
74
|
+
|
|
75
|
+
psThresholds(): number[]
|
|
76
|
+
psThresholds(v: number[]): this
|
|
77
|
+
|
|
78
|
+
psColors(): string[] | null
|
|
79
|
+
psColors(v: string[] | null): this
|
|
80
|
+
|
|
81
|
+
psCustomSVG(): any
|
|
82
|
+
psCustomSVG(v: any): this
|
|
83
|
+
|
|
84
|
+
psOffset(): { x: number; y: number }
|
|
85
|
+
psOffset(v: { x: number; y: number }): this
|
|
86
|
+
|
|
87
|
+
psClassificationMethod(): string
|
|
88
|
+
psClassificationMethod(v: string): this
|
|
89
|
+
|
|
90
|
+
psClasses(): number
|
|
91
|
+
psClasses(v: number): this
|
|
92
|
+
|
|
93
|
+
dorling(): boolean
|
|
94
|
+
dorling(v: boolean): this
|
|
95
|
+
|
|
96
|
+
psSpikeWidth(): number
|
|
97
|
+
psSpikeWidth(v: number): this
|
|
98
|
+
|
|
99
|
+
psCodeLabels(): boolean
|
|
100
|
+
psCodeLabels(v: boolean): this
|
|
101
|
+
|
|
102
|
+
psBrightenFactor(): number
|
|
103
|
+
psBrightenFactor(v: number): this
|
|
104
|
+
}
|
|
@@ -4,15 +4,19 @@ import type { MapInstance } from '../../../core/MapInstance'
|
|
|
4
4
|
* Mushroom map type.
|
|
5
5
|
*/
|
|
6
6
|
export interface MushroomMap extends MapInstance {
|
|
7
|
+
/** Returns the resolved [v1, v2] stat codes for the two mushroom sides, honoring any
|
|
8
|
+
* 'left'/'right' or 'v1'/'v2' encodings before falling back to mushroomCodes. */
|
|
9
|
+
getMushroomStatCodes(): [string, string]
|
|
10
|
+
|
|
7
11
|
mushroomSettings(): {
|
|
8
12
|
codes: [string, string]
|
|
9
13
|
minSize: number
|
|
10
14
|
maxSize: number
|
|
11
15
|
colors: [string, string]
|
|
12
16
|
orientation: 'horizontal' | 'vertical'
|
|
13
|
-
sizeScaleFunction:
|
|
14
|
-
sizeScaleFunctionV1:
|
|
15
|
-
sizeScaleFunctionV2:
|
|
17
|
+
sizeScaleFunction: ((value: number) => number) | null
|
|
18
|
+
sizeScaleFunctionV1: ((value: number) => number) | null
|
|
19
|
+
sizeScaleFunctionV2: ((value: number) => number) | null
|
|
16
20
|
}
|
|
17
21
|
mushroomSettings(v: {
|
|
18
22
|
codes?: [string, string]
|
|
@@ -20,9 +24,9 @@ export interface MushroomMap extends MapInstance {
|
|
|
20
24
|
maxSize?: number
|
|
21
25
|
colors?: [string, string]
|
|
22
26
|
orientation?: 'horizontal' | 'vertical'
|
|
23
|
-
sizeScaleFunction?:
|
|
24
|
-
sizeScaleFunctionV1?:
|
|
25
|
-
sizeScaleFunctionV2?:
|
|
27
|
+
sizeScaleFunction?: ((value: number) => number) | null
|
|
28
|
+
sizeScaleFunctionV1?: ((value: number) => number) | null
|
|
29
|
+
sizeScaleFunctionV2?: ((value: number) => number) | null
|
|
26
30
|
}): this
|
|
27
31
|
|
|
28
32
|
/** @deprecated Use mushroomSettings({ codes }) */
|
|
@@ -51,17 +55,17 @@ export interface MushroomMap extends MapInstance {
|
|
|
51
55
|
mushroomOrientation(v: 'horizontal' | 'vertical'): this
|
|
52
56
|
|
|
53
57
|
/** @deprecated Use mushroomSettings({ sizeScaleFunction }) */
|
|
54
|
-
mushroomSizeScaleFunction():
|
|
58
|
+
mushroomSizeScaleFunction(): ((value: number) => number) | null
|
|
55
59
|
/** @deprecated Use mushroomSettings({ sizeScaleFunction }) */
|
|
56
|
-
mushroomSizeScaleFunction(v:
|
|
60
|
+
mushroomSizeScaleFunction(v: (value: number) => number): this
|
|
57
61
|
|
|
58
62
|
/** @deprecated Use mushroomSettings({ sizeScaleFunctionV1 }) */
|
|
59
|
-
mushroomSizeScaleFunctionV1():
|
|
63
|
+
mushroomSizeScaleFunctionV1(): ((value: number) => number) | null
|
|
60
64
|
/** @deprecated Use mushroomSettings({ sizeScaleFunctionV1 }) */
|
|
61
|
-
mushroomSizeScaleFunctionV1(v:
|
|
65
|
+
mushroomSizeScaleFunctionV1(v: (value: number) => number): this
|
|
62
66
|
|
|
63
67
|
/** @deprecated Use mushroomSettings({ sizeScaleFunctionV2 }) */
|
|
64
|
-
mushroomSizeScaleFunctionV2():
|
|
68
|
+
mushroomSizeScaleFunctionV2(): ((value: number) => number) | null
|
|
65
69
|
/** @deprecated Use mushroomSettings({ sizeScaleFunctionV2 }) */
|
|
66
|
-
mushroomSizeScaleFunctionV2(v:
|
|
70
|
+
mushroomSizeScaleFunctionV2(v: (value: number) => number): this
|
|
67
71
|
}
|
|
@@ -13,8 +13,8 @@ export interface SparkMap extends MapInstance {
|
|
|
13
13
|
legend(): SparklineLegendConfig | false
|
|
14
14
|
legend(config: SparklineLegendConfig | false): this
|
|
15
15
|
|
|
16
|
-
sparkLineColor(): any
|
|
17
|
-
sparkLineColor(v: any): this
|
|
16
|
+
sparkLineColor(): string | ((value: number, index: number, data: any[]) => string)
|
|
17
|
+
sparkLineColor(v: string | ((value: number, index: number, data: any[]) => string)): this
|
|
18
18
|
|
|
19
19
|
showOnlyWhenComplete(): boolean
|
|
20
20
|
showOnlyWhenComplete(v: boolean): this
|
|
@@ -37,14 +37,20 @@ export interface SparkMap extends MapInstance {
|
|
|
37
37
|
sparkLineCircleRadius(): number
|
|
38
38
|
sparkLineCircleRadius(v: number): this
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
sparkLineAreaColor(
|
|
40
|
+
/** Alias for the areaColor setting (backward-compatible name). */
|
|
41
|
+
sparkLineAreaColor(): string | ((value: number, index: number, data: any[]) => string)
|
|
42
|
+
sparkLineAreaColor(v: string | ((value: number, index: number, data: any[]) => string)): this
|
|
42
43
|
|
|
43
|
-
sparkTooltipChart():
|
|
44
|
-
sparkTooltipChart(v:
|
|
44
|
+
sparkTooltipChart(): { width: number; height: number; margin: { left: number; right: number; top: number; bottom: number }; circleRadius: number }
|
|
45
|
+
sparkTooltipChart(v: {
|
|
46
|
+
width: number
|
|
47
|
+
height: number
|
|
48
|
+
margin: { left: number; right: number; top: number; bottom: number }
|
|
49
|
+
circleRadius: number
|
|
50
|
+
}): this
|
|
45
51
|
|
|
46
|
-
sparkLineChartFunction(): any
|
|
47
|
-
sparkLineChartFunction(v: any): this
|
|
52
|
+
sparkLineChartFunction(): ((node: any, data: any[], width: number, height: number, isForTooltip?: boolean) => void) | undefined
|
|
53
|
+
sparkLineChartFunction(v: (node: any, data: any[], width: number, height: number, isForTooltip?: boolean) => void): this
|
|
48
54
|
|
|
49
55
|
sparkLineOffsets(): { x: number; y: number }
|
|
50
56
|
sparkLineOffsets(v: { x: number; y: number }): this
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { MapConfig } from '../../core/MapConfig'
|
|
2
2
|
import type { SparklineLegendConfig } from '../../legend/composition/SparklineLegendConfig'
|
|
3
|
+
import type { SparkStatConfig } from './SparkStatConfig'
|
|
3
4
|
|
|
4
5
|
export interface SparkSettings {
|
|
5
6
|
type?: 'line' | 'area' | 'bar'
|
|
@@ -24,22 +25,19 @@ export interface SparkSettings {
|
|
|
24
25
|
* Configuration for sparkline maps.
|
|
25
26
|
*/
|
|
26
27
|
export interface SparkMapConfig extends MapConfig {
|
|
28
|
+
/**
|
|
29
|
+
* Statistical data configuration. For sparkline maps, pass a `dates`-keyed
|
|
30
|
+
* SparkStatConfig (equivalent to calling `.statSpark(...)`) rather than a plain
|
|
31
|
+
* single-value StatConfig.
|
|
32
|
+
*/
|
|
33
|
+
stat?: SparkStatConfig
|
|
34
|
+
|
|
27
35
|
/** Grouped sparkline rendering settings. */
|
|
28
36
|
sparkSettings?: SparkSettings
|
|
29
37
|
|
|
30
38
|
/** Spark type. */
|
|
31
39
|
sparkType?: 'line' | 'area' | 'bar'
|
|
32
40
|
|
|
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
41
|
sparkLineColor?: string | ((value: number, index: number, data: any[]) => string)
|
|
44
42
|
sparkAreaColor?: string | ((value: number, index: number, data: any[]) => string)
|
|
45
43
|
/** Spark line width. */
|
|
@@ -68,8 +66,6 @@ export interface SparkMapConfig extends MapConfig {
|
|
|
68
66
|
/** Show only when complete. */
|
|
69
67
|
showOnlyWhenComplete?: boolean
|
|
70
68
|
sparkLineChartFunction?: (node: any, data: any[], width: number, height: number, isForTooltip?: boolean) => void
|
|
71
|
-
/** Spark yscale. */
|
|
72
|
-
sparkYScale?: any
|
|
73
69
|
/** Legend. */
|
|
74
70
|
legend?: SparklineLegendConfig | false
|
|
75
71
|
}
|
|
@@ -1,73 +1,72 @@
|
|
|
1
|
-
/**
|
|
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
|
-
*/
|
|
4
|
-
export interface LegendConfig {
|
|
5
|
-
/** Legend origin x-coordinate in pixels. */
|
|
6
|
-
x?: number
|
|
7
|
-
/** Legend origin y-coordinate in pixels. */
|
|
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'
|
|
11
|
-
/** Legend width in pixels. */
|
|
12
|
-
width?: number
|
|
13
|
-
/** Legend height in pixels. */
|
|
14
|
-
height?: number
|
|
15
|
-
|
|
16
|
-
/** Legend title text. */
|
|
17
|
-
title?: string
|
|
18
|
-
/** Legend subtitle text. */
|
|
19
|
-
subtitle?: string
|
|
20
|
-
/** Legend title font size in pixels. */
|
|
21
|
-
titleFontSize?: number
|
|
22
|
-
|
|
23
|
-
/** Box styling. */
|
|
24
|
-
/** Inner spacing around legend content. */
|
|
25
|
-
boxPadding?: number
|
|
26
|
-
/** Background opacity of the legend box. */
|
|
27
|
-
boxOpacity?: number
|
|
28
|
-
/** Apply the legend box's background opacity (boxOpacity) only while the map is currently zoomed in (scale != 1). The legend box is transparent at the initial view and returns to its configured opacity while zoomed. Purely a box-opacity concern - does not affect legend hover interactions (e.g. hover-to-highlight), which always work regardless of zoom state. */
|
|
29
|
-
onlyApplyOpacityWhileZoomed?: boolean
|
|
30
|
-
/** Padding between the title block and legend body. */
|
|
31
|
-
titlePadding?: number
|
|
32
|
-
|
|
33
|
-
/** Shape styling (for proportional symbol legends). */
|
|
34
|
-
/** Symbol swatch width in pixels. */
|
|
35
|
-
shapeWidth?: number
|
|
36
|
-
/** Symbol swatch height in pixels. */
|
|
37
|
-
shapeHeight?: number
|
|
38
|
-
/** Horizontal gap between shape and label. */
|
|
39
|
-
shapePadding?: number
|
|
40
|
-
/** Length of separator lines in discrete legends. */
|
|
41
|
-
sepLineLength?: number
|
|
42
|
-
|
|
43
|
-
/** Label styling. */
|
|
44
|
-
/** Label font size in pixels. */
|
|
45
|
-
labelFontSize?: number
|
|
46
|
-
/** Pixel offsets applied to labels. */
|
|
47
|
-
labelOffsets?: { x: number; y: number }
|
|
48
|
-
/** Custom formatter for legend labels. */
|
|
49
|
-
labelFormatter?: ((value: number, index?: number) => string) | null
|
|
50
|
-
/** Number of decimal places for auto-formatted labels. */
|
|
51
|
-
decimals?: number
|
|
52
|
-
|
|
53
|
-
/** Legend layout direction. */
|
|
54
|
-
orientation?: 'vertical' | 'horizontal'
|
|
55
|
-
/** Sort legend entries in ascending order when true. */
|
|
56
|
-
ascending?: boolean
|
|
57
|
-
/** Whether to display the no-data legend item. */
|
|
58
|
-
noData?: boolean
|
|
59
|
-
/** Label used for no-data legend item. */
|
|
60
|
-
noDataText?: string
|
|
61
|
-
/** Vertical gap before the no-data swatch in pixels. */
|
|
62
|
-
noDataPadding?: number
|
|
63
|
-
/** Width of the no-data swatch in pixels. */
|
|
64
|
-
noDataShapeWidth?: number
|
|
65
|
-
/** Height of the no-data swatch in pixels. */
|
|
66
|
-
noDataShapeHeight?: number
|
|
67
|
-
|
|
68
|
-
/** Whether to show dataset min/max labels when supported. */
|
|
69
|
-
maxMin?: boolean
|
|
70
|
-
/** Text affixes for min/max labels as [minSuffix, maxSuffix]. */
|
|
71
|
-
maxMinLabels?: [string, string]
|
|
72
|
-
|
|
73
|
-
}
|
|
1
|
+
/**
|
|
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
|
+
*/
|
|
4
|
+
export interface LegendConfig {
|
|
5
|
+
/** Legend origin x-coordinate in pixels. */
|
|
6
|
+
x?: number
|
|
7
|
+
/** Legend origin y-coordinate in pixels. */
|
|
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'
|
|
11
|
+
/** Legend width in pixels. */
|
|
12
|
+
width?: number
|
|
13
|
+
/** Legend height in pixels. */
|
|
14
|
+
height?: number
|
|
15
|
+
|
|
16
|
+
/** Legend title text. */
|
|
17
|
+
title?: string
|
|
18
|
+
/** Legend subtitle text. */
|
|
19
|
+
subtitle?: string
|
|
20
|
+
/** Legend title font size in pixels. */
|
|
21
|
+
titleFontSize?: number
|
|
22
|
+
|
|
23
|
+
/** Box styling. */
|
|
24
|
+
/** Inner spacing around legend content. */
|
|
25
|
+
boxPadding?: number
|
|
26
|
+
/** Background opacity of the legend box. */
|
|
27
|
+
boxOpacity?: number
|
|
28
|
+
/** Apply the legend box's background opacity (boxOpacity) only while the map is currently zoomed in (scale != 1). The legend box is transparent at the initial view and returns to its configured opacity while zoomed. Purely a box-opacity concern - does not affect legend hover interactions (e.g. hover-to-highlight), which always work regardless of zoom state. */
|
|
29
|
+
onlyApplyOpacityWhileZoomed?: boolean
|
|
30
|
+
/** Padding between the title block and legend body. */
|
|
31
|
+
titlePadding?: number
|
|
32
|
+
|
|
33
|
+
/** Shape styling (for proportional symbol legends). */
|
|
34
|
+
/** Symbol swatch width in pixels. */
|
|
35
|
+
shapeWidth?: number
|
|
36
|
+
/** Symbol swatch height in pixels. */
|
|
37
|
+
shapeHeight?: number
|
|
38
|
+
/** Horizontal gap between shape and label. */
|
|
39
|
+
shapePadding?: number
|
|
40
|
+
/** Length of separator lines in discrete legends. */
|
|
41
|
+
sepLineLength?: number
|
|
42
|
+
|
|
43
|
+
/** Label styling. */
|
|
44
|
+
/** Label font size in pixels. */
|
|
45
|
+
labelFontSize?: number
|
|
46
|
+
/** Pixel offsets applied to labels. */
|
|
47
|
+
labelOffsets?: { x: number; y: number }
|
|
48
|
+
/** Custom formatter for legend labels. */
|
|
49
|
+
labelFormatter?: ((value: number, index?: number) => string) | null
|
|
50
|
+
/** Number of decimal places for auto-formatted labels. */
|
|
51
|
+
decimals?: number
|
|
52
|
+
|
|
53
|
+
/** Legend layout direction. */
|
|
54
|
+
orientation?: 'vertical' | 'horizontal'
|
|
55
|
+
/** Sort legend entries in ascending order when true. */
|
|
56
|
+
ascending?: boolean
|
|
57
|
+
/** Whether to display the no-data legend item. */
|
|
58
|
+
noData?: boolean
|
|
59
|
+
/** Label used for no-data legend item. */
|
|
60
|
+
noDataText?: string
|
|
61
|
+
/** Vertical gap before the no-data swatch in pixels. */
|
|
62
|
+
noDataPadding?: number
|
|
63
|
+
/** Width of the no-data swatch in pixels. */
|
|
64
|
+
noDataShapeWidth?: number
|
|
65
|
+
/** Height of the no-data swatch in pixels. */
|
|
66
|
+
noDataShapeHeight?: number
|
|
67
|
+
|
|
68
|
+
/** Whether to show dataset min/max labels when supported. */
|
|
69
|
+
maxMin?: boolean
|
|
70
|
+
/** Text affixes for min/max labels as [minSuffix, maxSuffix]. */
|
|
71
|
+
maxMinLabels?: [string, string]
|
|
72
|
+
}
|