eurostat-map 4.10.4 → 4.10.6
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 +1333 -1147
- 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/MapInstance.d.ts +555 -555
- package/build/types/core/decoration/LabelsConfig.d.ts +115 -96
- package/build/types/layers/proportional-symbol/ProportionalSymbolConfig.d.ts +52 -47
- package/build/types/layers/proportional-symbol/ProportionalSymbolMap.d.ts +100 -94
- package/package.json +1 -1
|
@@ -1,96 +1,115 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A single map label (country name, statistical value label, etc.)
|
|
3
|
-
*/
|
|
4
|
-
export interface Label {
|
|
5
|
-
text: string
|
|
6
|
-
x: number
|
|
7
|
-
y: number
|
|
8
|
-
class?: string
|
|
9
|
-
/** Font size in pixels. @deprecated Use CSS classes instead. */
|
|
10
|
-
size?: number
|
|
11
|
-
rotate?: number | null
|
|
12
|
-
letterSpacing?: number
|
|
13
|
-
/** Country code, when this label represents a country. */
|
|
14
|
-
cc?: string
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Configuration for map labels (country names, statistical values, etc.)
|
|
19
|
-
*/
|
|
20
|
-
export interface LabelsConfig {
|
|
21
|
-
/**
|
|
22
|
-
* Array of label objects with text and coordinates.
|
|
23
|
-
* Use eurostatmap.getDefaultLabels() to get predefined geographic labels.
|
|
24
|
-
*/
|
|
25
|
-
labels?: Label[]
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Show statistical values as labels on regions.
|
|
29
|
-
* @default false
|
|
30
|
-
*/
|
|
31
|
-
values?: boolean
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Apply halo/shadow effect around labels for better readability.
|
|
35
|
-
* @default false
|
|
36
|
-
*/
|
|
37
|
-
halos?: boolean
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Legacy alias for halos.
|
|
41
|
-
* @deprecated Use halos instead
|
|
42
|
-
*/
|
|
43
|
-
shadows?: boolean
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Apply solid background rectangles behind labels.
|
|
47
|
-
* Takes precedence over halos when both are set.
|
|
48
|
-
* @default false
|
|
49
|
-
*/
|
|
50
|
-
backgrounds?: boolean
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Fill color for label background rectangles (CSS color string).
|
|
54
|
-
* Only applies when backgrounds is true.
|
|
55
|
-
* @default '#ffffff'
|
|
56
|
-
* @example 'white'
|
|
57
|
-
* @example '#B19122'
|
|
58
|
-
* @example 'rgba(255, 255, 255, 0.9)'
|
|
59
|
-
*/
|
|
60
|
-
backgroundFill?: string
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
*
|
|
64
|
-
* @default
|
|
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
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A single map label (country name, statistical value label, etc.)
|
|
3
|
+
*/
|
|
4
|
+
export interface Label {
|
|
5
|
+
text: string
|
|
6
|
+
x: number
|
|
7
|
+
y: number
|
|
8
|
+
class?: string
|
|
9
|
+
/** Font size in pixels. @deprecated Use CSS classes instead. */
|
|
10
|
+
size?: number
|
|
11
|
+
rotate?: number | null
|
|
12
|
+
letterSpacing?: number
|
|
13
|
+
/** Country code, when this label represents a country. */
|
|
14
|
+
cc?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Configuration for map labels (country names, statistical values, etc.)
|
|
19
|
+
*/
|
|
20
|
+
export interface LabelsConfig {
|
|
21
|
+
/**
|
|
22
|
+
* Array of label objects with text and coordinates.
|
|
23
|
+
* Use eurostatmap.getDefaultLabels() to get predefined geographic labels.
|
|
24
|
+
*/
|
|
25
|
+
labels?: Label[]
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Show statistical values as labels on regions.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
values?: boolean
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Apply halo/shadow effect around labels for better readability.
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
halos?: boolean
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Legacy alias for halos.
|
|
41
|
+
* @deprecated Use halos instead
|
|
42
|
+
*/
|
|
43
|
+
shadows?: boolean
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Apply solid background rectangles behind labels.
|
|
47
|
+
* Takes precedence over halos when both are set.
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
backgrounds?: boolean
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Fill color for label background rectangles (CSS color string).
|
|
54
|
+
* Only applies when backgrounds is true.
|
|
55
|
+
* @default '#ffffff'
|
|
56
|
+
* @example 'white'
|
|
57
|
+
* @example '#B19122'
|
|
58
|
+
* @example 'rgba(255, 255, 255, 0.9)'
|
|
59
|
+
*/
|
|
60
|
+
backgroundFill?: string
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Fill/stroke color for statistical value label text.
|
|
64
|
+
* @default '#111111'
|
|
65
|
+
*/
|
|
66
|
+
statLabelTextColor?: string
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Padding between statistical label text and its background edge, in pixels.
|
|
70
|
+
* A number applies equal padding on both axes; an object controls each axis.
|
|
71
|
+
* @default { x: 5, y: 2 }
|
|
72
|
+
*/
|
|
73
|
+
backgroundPadding?: number | { x?: number; y?: number }
|
|
74
|
+
|
|
75
|
+
/** Background shape used for statistical value labels. @default 'rect' */
|
|
76
|
+
backgroundShape?: 'rect' | 'circle'
|
|
77
|
+
|
|
78
|
+
/** Corner radius in pixels when backgroundShape is 'rect'. @default 0 */
|
|
79
|
+
backgroundBorderRadius?: number
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Scale labels when zooming in/out.
|
|
83
|
+
* @default true
|
|
84
|
+
*/
|
|
85
|
+
scaleOnZoom?: boolean
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Custom formatter function for statistical value labels.
|
|
89
|
+
* @example (value) => value.toFixed(1) + '%'
|
|
90
|
+
*/
|
|
91
|
+
valuesFormatter?: (value: number) => string
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Filter function to show/hide statistical value labels for specific regions.
|
|
95
|
+
* @param region - GeoJSON feature object
|
|
96
|
+
* @param map - Map instance
|
|
97
|
+
* @returns true to show label, false to hide
|
|
98
|
+
*/
|
|
99
|
+
statLabelsFilterFunction?: (region: any, map: any) => boolean
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Override default centroid positions for statistical value labels.
|
|
103
|
+
* Keys are region IDs (e.g., 'DE', 'FR01'), values are {x, y} coordinates.
|
|
104
|
+
*/
|
|
105
|
+
statLabelsPositions?: Record<string, { x: number; y: number }>
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Function to adjust calculated centroids for value labels.
|
|
109
|
+
* @param region - GeoJSON feature object
|
|
110
|
+
* @param centroid - Calculated centroid [x, y]
|
|
111
|
+
* @returns Adjusted centroid [x, y]
|
|
112
|
+
* @example (region, centroid) => [centroid[0] + 10, centroid[1] - 10]
|
|
113
|
+
*/
|
|
114
|
+
processValueLabelCentroids?: (region: any, centroid: [number, number]) => [number, number]
|
|
115
|
+
}
|
|
@@ -1,47 +1,52 @@
|
|
|
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
|
-
/**
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
+
/** Fill styles for categorical exceptions in the color dataset, keyed by raw value. */
|
|
35
|
+
categoryFillStyle?: { [rawValue: string]: string }
|
|
36
|
+
/** Legend and tooltip labels for categorical exceptions, keyed by raw value. */
|
|
37
|
+
categoryText?: { [rawValue: string]: string }
|
|
38
|
+
|
|
39
|
+
/** Symbol shape used for markers. */
|
|
40
|
+
symbol?: 'circle' | 'square'
|
|
41
|
+
/** Base symbol size factor. */
|
|
42
|
+
size?: number
|
|
43
|
+
|
|
44
|
+
/** Dorling cartogram. */
|
|
45
|
+
dorling?: boolean
|
|
46
|
+
|
|
47
|
+
/** Size function. */
|
|
48
|
+
psCustomSize?: (value: number) => number
|
|
49
|
+
|
|
50
|
+
/** Grouped proportional symbol style settings. */
|
|
51
|
+
psSettings?: ProportionalSymbolSettings
|
|
52
|
+
}
|
|
@@ -1,94 +1,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
|
-
|
|
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
|
-
|
|
45
|
-
|
|
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
|
-
|
|
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
|
+
classifierSize(): any
|
|
45
|
+
classifierSize(v: any): this
|
|
46
|
+
|
|
47
|
+
classifierColor(): any
|
|
48
|
+
classifierColor(v: any): this
|
|
49
|
+
|
|
50
|
+
psShape(): string
|
|
51
|
+
psShape(v: string): this
|
|
52
|
+
|
|
53
|
+
psCustomShape(): any
|
|
54
|
+
psCustomShape(v: any): this
|
|
55
|
+
|
|
56
|
+
psBarWidth(): number
|
|
57
|
+
psBarWidth(v: number): this
|
|
58
|
+
|
|
59
|
+
psClassToFillStyle(): any
|
|
60
|
+
psClassToFillStyle(v: any): this
|
|
61
|
+
|
|
62
|
+
psColorFun(): any
|
|
63
|
+
psColorFun(v: any): this
|
|
64
|
+
|
|
65
|
+
psSizeScale(): any
|
|
66
|
+
psSizeScale(v: any): this
|
|
67
|
+
|
|
68
|
+
noDataFillStyle(): string
|
|
69
|
+
noDataFillStyle(v: string): this
|
|
70
|
+
|
|
71
|
+
psThresholds(): number[]
|
|
72
|
+
psThresholds(v: number[]): this
|
|
73
|
+
|
|
74
|
+
psColors(): string[] | null
|
|
75
|
+
psColors(v: string[] | null): this
|
|
76
|
+
|
|
77
|
+
psCustomSVG(): any
|
|
78
|
+
psCustomSVG(v: any): this
|
|
79
|
+
|
|
80
|
+
psOffset(): { x: number; y: number }
|
|
81
|
+
psOffset(v: { x: number; y: number }): this
|
|
82
|
+
|
|
83
|
+
psClassificationMethod(): string
|
|
84
|
+
psClassificationMethod(v: string): this
|
|
85
|
+
|
|
86
|
+
psClasses(): number
|
|
87
|
+
psClasses(v: number): this
|
|
88
|
+
|
|
89
|
+
dorling(): boolean
|
|
90
|
+
dorling(v: boolean): this
|
|
91
|
+
|
|
92
|
+
psSpikeWidth(): number
|
|
93
|
+
psSpikeWidth(v: number): this
|
|
94
|
+
|
|
95
|
+
psCodeLabels(): boolean
|
|
96
|
+
psCodeLabels(v: boolean): this
|
|
97
|
+
|
|
98
|
+
psBrightenFactor(): number
|
|
99
|
+
psBrightenFactor(v: number): this
|
|
100
|
+
}
|
package/package.json
CHANGED