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,158 @@
|
|
|
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
|
+
/** Flow color. */
|
|
103
|
+
flowColor?: string
|
|
104
|
+
/** Flow region colors. */
|
|
105
|
+
flowRegionColors?: string[]
|
|
106
|
+
/** Flow region labels. */
|
|
107
|
+
flowRegionLabels?: string[]
|
|
108
|
+
/** Flow arrows. */
|
|
109
|
+
flowArrows?: boolean
|
|
110
|
+
/** Flow arrow scale. */
|
|
111
|
+
flowArrowScale?: number
|
|
112
|
+
/** Flow max width. */
|
|
113
|
+
flowMaxWidth?: number
|
|
114
|
+
/** Flow min width. */
|
|
115
|
+
flowMinWidth?: number
|
|
116
|
+
/** Flow outlines. */
|
|
117
|
+
flowOutlines?: boolean
|
|
118
|
+
/** Flow outline width. */
|
|
119
|
+
flowOutlineWidth?: number
|
|
120
|
+
/** Flow outline color. */
|
|
121
|
+
flowOutlineColor?: string
|
|
122
|
+
/** Flow color gradient. */
|
|
123
|
+
flowColorGradient?: boolean
|
|
124
|
+
/** Flow stack. */
|
|
125
|
+
flowStack?: boolean
|
|
126
|
+
/** Flow nodes. */
|
|
127
|
+
flowNodes?: boolean
|
|
128
|
+
/** Flow node type. */
|
|
129
|
+
flowNodeType?: 'circle' | 'donut'
|
|
130
|
+
/** Flow label offsets. */
|
|
131
|
+
flowLabelOffsets?: { x?: number; y?: number }
|
|
132
|
+
/** Flow line type. */
|
|
133
|
+
flowLineType?: 'curved' | 'straight' | 'sankey'
|
|
134
|
+
flowNodeSizeScale?: (value: number) => number
|
|
135
|
+
/** Flow opacity. */
|
|
136
|
+
flowOpacity?: number
|
|
137
|
+
/** Flow internal. */
|
|
138
|
+
flowInternal?: boolean
|
|
139
|
+
/** Flow top locations. */
|
|
140
|
+
flowTopLocations?: number
|
|
141
|
+
/** Flow top locations type. */
|
|
142
|
+
flowTopLocationsType?: 'sum' | 'origin' | 'destination'
|
|
143
|
+
/** Flow curvature settings. */
|
|
144
|
+
flowCurvatureSettings?: FlowCurvatureSettings
|
|
145
|
+
flowOrder?: (a: any, b: any) => number
|
|
146
|
+
/** Flow width gradient. */
|
|
147
|
+
flowWidthGradient?: boolean
|
|
148
|
+
/** Flow opacity gradient. */
|
|
149
|
+
flowOpacityGradient?: boolean
|
|
150
|
+
/** Flow width gradient settings. */
|
|
151
|
+
flowWidthGradientSettings?: FlowWidthGradientSettings
|
|
152
|
+
/** Flow bidirectional. */
|
|
153
|
+
flowBidirectional?: boolean
|
|
154
|
+
/** Flow edge bundling. */
|
|
155
|
+
flowEdgeBundling?: boolean
|
|
156
|
+
/** Flow bundle settings. */
|
|
157
|
+
flowBundleSettings?: FlowBundleSettings
|
|
158
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { MapInstance } from '../core/MapInstance'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for categorical map
|
|
5
|
+
*/
|
|
6
|
+
export interface CategoricalMapConfig {
|
|
7
|
+
/** Category-to-color mapping */
|
|
8
|
+
classToFillStyle?: Record<string, string>
|
|
9
|
+
/** Fill style for regions with no data */
|
|
10
|
+
noDataFillStyle?: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Creates a categorical (qualitative) map instance.
|
|
15
|
+
* Used for displaying qualitative data with distinct categories.
|
|
16
|
+
* @param config - Map configuration
|
|
17
|
+
* @returns Map instance with categorical-specific methods
|
|
18
|
+
*/
|
|
19
|
+
export function map(config?: CategoricalMapConfig): MapInstance
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { MapConfig } from '../../core/MapConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for proportional symbol maps
|
|
5
|
+
*/
|
|
6
|
+
export interface ProportionalSymbolConfig extends MapConfig {
|
|
7
|
+
/** Symbol shape used for markers. */
|
|
8
|
+
symbol?: 'circle' | 'square'
|
|
9
|
+
/** Base symbol size factor. */
|
|
10
|
+
size?: number
|
|
11
|
+
|
|
12
|
+
/** Dorling cartogram. */
|
|
13
|
+
dorling?: boolean
|
|
14
|
+
|
|
15
|
+
/** Size function. */
|
|
16
|
+
psCustomSize?: (value: number) => number
|
|
17
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { MapInstance } from '../../core/MapInstance'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Proportional symbol map object
|
|
5
|
+
*/
|
|
6
|
+
export interface ProportionalSymbolMap extends MapInstance {
|
|
7
|
+
psMaxSize(): number
|
|
8
|
+
psMaxSize(v: number): this
|
|
9
|
+
|
|
10
|
+
psMinSize(): number
|
|
11
|
+
psMinSize(v: number): this
|
|
12
|
+
|
|
13
|
+
psMaxValue(): number | undefined
|
|
14
|
+
psMaxValue(v: number | undefined): this
|
|
15
|
+
|
|
16
|
+
psMinValue(): number | undefined
|
|
17
|
+
psMinValue(v: number | undefined): this
|
|
18
|
+
|
|
19
|
+
psFill(): string
|
|
20
|
+
psFill(v: string): this
|
|
21
|
+
|
|
22
|
+
psFillOpacity(): number
|
|
23
|
+
psFillOpacity(v: number): this
|
|
24
|
+
|
|
25
|
+
psStrokeOpacity(): number
|
|
26
|
+
psStrokeOpacity(v: number): this
|
|
27
|
+
|
|
28
|
+
psStroke(): string
|
|
29
|
+
psStroke(v: string): this
|
|
30
|
+
|
|
31
|
+
psStrokeWidth(): number
|
|
32
|
+
psStrokeWidth(v: number): this
|
|
33
|
+
|
|
34
|
+
classifierSize(): any
|
|
35
|
+
classifierSize(v: any): this
|
|
36
|
+
|
|
37
|
+
classifierColor(): any
|
|
38
|
+
classifierColor(v: any): this
|
|
39
|
+
|
|
40
|
+
psShape(): string
|
|
41
|
+
psShape(v: string): this
|
|
42
|
+
|
|
43
|
+
psCustomShape(): any
|
|
44
|
+
psCustomShape(v: any): this
|
|
45
|
+
|
|
46
|
+
psBarWidth(): number
|
|
47
|
+
psBarWidth(v: number): this
|
|
48
|
+
|
|
49
|
+
psClassToFillStyle(): any
|
|
50
|
+
psClassToFillStyle(v: any): this
|
|
51
|
+
|
|
52
|
+
psColorFun(): any
|
|
53
|
+
psColorFun(v: any): this
|
|
54
|
+
|
|
55
|
+
psSizeScale(): any
|
|
56
|
+
psSizeScale(v: any): this
|
|
57
|
+
|
|
58
|
+
noDataFillStyle(): string
|
|
59
|
+
noDataFillStyle(v: string): this
|
|
60
|
+
|
|
61
|
+
psThresholds(): number[]
|
|
62
|
+
psThresholds(v: number[]): this
|
|
63
|
+
|
|
64
|
+
psColors(): string[] | null
|
|
65
|
+
psColors(v: string[] | null): this
|
|
66
|
+
|
|
67
|
+
psCustomSVG(): any
|
|
68
|
+
psCustomSVG(v: any): this
|
|
69
|
+
|
|
70
|
+
psOffset(): { x: number; y: number }
|
|
71
|
+
psOffset(v: { x: number; y: number }): this
|
|
72
|
+
|
|
73
|
+
psClassificationMethod(): string
|
|
74
|
+
psClassificationMethod(v: string): this
|
|
75
|
+
|
|
76
|
+
psClasses(): number
|
|
77
|
+
psClasses(v: number): this
|
|
78
|
+
|
|
79
|
+
dorling(): boolean
|
|
80
|
+
dorling(v: boolean): this
|
|
81
|
+
|
|
82
|
+
psSpikeWidth(): number
|
|
83
|
+
psSpikeWidth(v: number): this
|
|
84
|
+
|
|
85
|
+
psCodeLabels(): boolean
|
|
86
|
+
psCodeLabels(v: boolean): this
|
|
87
|
+
|
|
88
|
+
psBrightenFactor(): number
|
|
89
|
+
psBrightenFactor(v: number): this
|
|
90
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { MapInstance } from '../../core/MapInstance'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for proportional symbol map
|
|
5
|
+
*/
|
|
6
|
+
export interface ProportionalSymbolMapConfig {
|
|
7
|
+
/** Proportional symbol type: 'circle', 'square', 'spike', etc. */
|
|
8
|
+
symbolType?: string
|
|
9
|
+
/** Size attribute: 'radius', 'area', etc. */
|
|
10
|
+
sizeAttribute?: string
|
|
11
|
+
/** Maximum symbol size in pixels */
|
|
12
|
+
symbolMaxSize?: number
|
|
13
|
+
/** Minimum symbol size in pixels */
|
|
14
|
+
symbolMinSize?: number
|
|
15
|
+
/** Size dataset code */
|
|
16
|
+
sizeDatasetCode?: string
|
|
17
|
+
/** Symbol fill color */
|
|
18
|
+
symbolFillStyle?: string
|
|
19
|
+
/** Symbol fill opacity */
|
|
20
|
+
symbolFillOpacity?: number
|
|
21
|
+
/** Symbol stroke color */
|
|
22
|
+
symbolStrokeStyle?: string
|
|
23
|
+
/** Symbol stroke width */
|
|
24
|
+
symbolStrokeWidth?: number
|
|
25
|
+
/** Center symbol on region centroid */
|
|
26
|
+
centerOnCentroid?: boolean
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Creates a proportional symbol map instance.
|
|
31
|
+
* Displays symbols (circles, squares, etc.) sized by statistical values.
|
|
32
|
+
* @param config - Map configuration
|
|
33
|
+
* @returns Map instance with proportional symbol methods
|
|
34
|
+
*/
|
|
35
|
+
export function map(config?: ProportionalSymbolMapConfig): MapInstance
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { MapInstance } from '../../../core/MapInstance'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Mushroom map type.
|
|
5
|
+
*/
|
|
6
|
+
export interface MushroomMap extends MapInstance {
|
|
7
|
+
mushroomCodes(): [string, string]
|
|
8
|
+
mushroomCodes(v: [string, string]): this
|
|
9
|
+
|
|
10
|
+
mushroomMinSize(): number
|
|
11
|
+
mushroomMinSize(v: number): this
|
|
12
|
+
|
|
13
|
+
mushroomMaxSize(): number
|
|
14
|
+
mushroomMaxSize(v: number): this
|
|
15
|
+
|
|
16
|
+
mushroomColors(): [string, string]
|
|
17
|
+
mushroomColors(v: [string, string]): this
|
|
18
|
+
|
|
19
|
+
mushroomOrientation(): 'horizontal' | 'vertical'
|
|
20
|
+
mushroomOrientation(v: 'horizontal' | 'vertical'): this
|
|
21
|
+
|
|
22
|
+
mushroomSizeScaleFunction(): any
|
|
23
|
+
mushroomSizeScaleFunction(v: any): this
|
|
24
|
+
|
|
25
|
+
mushroomSizeScaleFunctionV1(): any
|
|
26
|
+
mushroomSizeScaleFunctionV1(v: any): this
|
|
27
|
+
|
|
28
|
+
mushroomSizeScaleFunctionV2(): any
|
|
29
|
+
mushroomSizeScaleFunctionV2(v: any): this
|
|
30
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { MapConfig } from '../../../core/MapConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for mushroom maps.
|
|
5
|
+
*/
|
|
6
|
+
export interface MushroomMapConfig extends MapConfig {
|
|
7
|
+
/** Mushroom codes. */
|
|
8
|
+
mushroomCodes?: [string, string]
|
|
9
|
+
/** Mushroom min size. */
|
|
10
|
+
mushroomMinSize?: number
|
|
11
|
+
/** Mushroom max size. */
|
|
12
|
+
mushroomMaxSize?: number
|
|
13
|
+
/** Mushroom colors. */
|
|
14
|
+
mushroomColors?: [string, string]
|
|
15
|
+
/** Mushroom orientation. */
|
|
16
|
+
mushroomOrientation?: 'horizontal' | 'vertical'
|
|
17
|
+
mushroomSizeScaleFunction?: (value: number) => number
|
|
18
|
+
mushroomSizeScaleFunctionV1?: (value: number) => number
|
|
19
|
+
mushroomSizeScaleFunctionV2?: (value: number) => number
|
|
20
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { MapInstance } from '../../core/MapInstance'
|
|
2
|
+
import type { SparkStatConfig } from './SparkStatConfig'
|
|
3
|
+
import type { SparklineLegendConfig } from '../../legend/composition/SparklineLegendConfig'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Spark map type.
|
|
7
|
+
*/
|
|
8
|
+
export interface SparkMap extends MapInstance {
|
|
9
|
+
legend(): SparklineLegendConfig
|
|
10
|
+
legend(config: SparklineLegendConfig | false): this
|
|
11
|
+
|
|
12
|
+
sparkLineColor(): any
|
|
13
|
+
sparkLineColor(v: any): this
|
|
14
|
+
|
|
15
|
+
showOnlyWhenComplete(): boolean
|
|
16
|
+
showOnlyWhenComplete(v: boolean): this
|
|
17
|
+
|
|
18
|
+
sparkType(): 'line' | 'area' | 'bar'
|
|
19
|
+
sparkType(v: 'line' | 'area' | 'bar'): this
|
|
20
|
+
|
|
21
|
+
sparkLineWidth(): number
|
|
22
|
+
sparkLineWidth(v: number): this
|
|
23
|
+
|
|
24
|
+
sparkLineHeight(): number
|
|
25
|
+
sparkLineHeight(v: number): this
|
|
26
|
+
|
|
27
|
+
sparkLineStrokeWidth(): number
|
|
28
|
+
sparkLineStrokeWidth(v: number): this
|
|
29
|
+
|
|
30
|
+
sparkLineOpacity(): number
|
|
31
|
+
sparkLineOpacity(v: number): this
|
|
32
|
+
|
|
33
|
+
sparkLineCircleRadius(): number
|
|
34
|
+
sparkLineCircleRadius(v: number): this
|
|
35
|
+
|
|
36
|
+
sparkLineAreaColor(): any
|
|
37
|
+
sparkLineAreaColor(v: any): this
|
|
38
|
+
|
|
39
|
+
sparkTooltipChart(): any
|
|
40
|
+
sparkTooltipChart(v: any): this
|
|
41
|
+
|
|
42
|
+
sparkLineChartFunction(): any
|
|
43
|
+
sparkLineChartFunction(v: any): this
|
|
44
|
+
|
|
45
|
+
sparkLineOffsets(): { x: number; y: number }
|
|
46
|
+
sparkLineOffsets(v: { x: number; y: number }): this
|
|
47
|
+
|
|
48
|
+
/** Manually set sparkline data instead of fetching it from Eurostat. */
|
|
49
|
+
sparklineData(dataObject: Record<string, Record<string, number>>): this
|
|
50
|
+
/** Configure fetching data from Eurostat and generating spark lines. */
|
|
51
|
+
statSpark(config: SparkStatConfig): this
|
|
52
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { MapConfig } from '../../core/MapConfig'
|
|
2
|
+
import type { SparklineLegendConfig } from '../../legend/composition/SparklineLegendConfig'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for sparkline maps.
|
|
6
|
+
*/
|
|
7
|
+
export interface SparkMapConfig extends MapConfig {
|
|
8
|
+
/** Spark type. */
|
|
9
|
+
sparkType?: 'line' | 'area' | 'bar'
|
|
10
|
+
sparkLineColor?: string | ((value: number, index: number, data: any[]) => string)
|
|
11
|
+
sparkAreaColor?: string | ((value: number, index: number, data: any[]) => string)
|
|
12
|
+
/** Spark line width. */
|
|
13
|
+
sparkLineWidth?: number
|
|
14
|
+
/** Spark line height. */
|
|
15
|
+
sparkLineHeight?: number
|
|
16
|
+
/** Spark line stroke width. */
|
|
17
|
+
sparkLineStrokeWidth?: number
|
|
18
|
+
/** Spark line opacity. */
|
|
19
|
+
sparkLineOpacity?: number
|
|
20
|
+
/** Spark line circle radius. */
|
|
21
|
+
sparkLineCircleRadius?: number
|
|
22
|
+
/** Spark tooltip chart. */
|
|
23
|
+
sparkTooltipChart?: {
|
|
24
|
+
/** Width. */
|
|
25
|
+
width: number
|
|
26
|
+
/** Height. */
|
|
27
|
+
height: number
|
|
28
|
+
/** Margin. */
|
|
29
|
+
margin: { left: number; right: number; top: number; bottom: number }
|
|
30
|
+
/** Circle radius. */
|
|
31
|
+
circleRadius: number
|
|
32
|
+
}
|
|
33
|
+
/** Spark line offsets. */
|
|
34
|
+
sparkLineOffsets?: { x: number; y: number }
|
|
35
|
+
/** Show only when complete. */
|
|
36
|
+
showOnlyWhenComplete?: boolean
|
|
37
|
+
sparkLineChartFunction?: (node: any, data: any[], width: number, height: number, isForTooltip?: boolean) => void
|
|
38
|
+
/** Spark yscale. */
|
|
39
|
+
sparkYScale?: any
|
|
40
|
+
/** Legend. */
|
|
41
|
+
legend?: SparklineLegendConfig | false
|
|
42
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Statistical configuration for sparkline maps.
|
|
3
|
+
*/
|
|
4
|
+
export interface SparkStatConfig {
|
|
5
|
+
/** Eurostat dataset code. */
|
|
6
|
+
eurostatDatasetCode: string
|
|
7
|
+
/** Filters. */
|
|
8
|
+
filters?: Record<string, any>
|
|
9
|
+
/** Unit text. */
|
|
10
|
+
unitText?: string
|
|
11
|
+
transform?: (value: number) => number
|
|
12
|
+
/** Dates. */
|
|
13
|
+
dates: string[]
|
|
14
|
+
/** Labels. */
|
|
15
|
+
labels?: string[]
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for SVG fill pattern definitions used in map legends.
|
|
3
|
+
*/
|
|
4
|
+
export interface FillPatternOptions {
|
|
5
|
+
/** Shape of the pattern symbol. @default 'circle' */
|
|
6
|
+
shape?: 'circle' | 'square'
|
|
7
|
+
/** Size of the repeating pattern tile in pixels. @default 5 */
|
|
8
|
+
patternSize?: number
|
|
9
|
+
/** Minimum symbol size in pixels (used for the lowest class). @default 1 */
|
|
10
|
+
minSize?: number
|
|
11
|
+
/** Maximum symbol size in pixels (used for the highest class). @default 5.5 */
|
|
12
|
+
maxSize?: number
|
|
13
|
+
/** Background fill colour of the pattern tile. @default 'white' */
|
|
14
|
+
bckColor?: string
|
|
15
|
+
/** Fill colour of the pattern symbol. @default 'black' */
|
|
16
|
+
symbColor?: string
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eurostat-map",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.1",
|
|
4
4
|
"description": "Reusable library to quickly create and customise web maps showing Eurostat data directly retrieved from Eurostat database.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eurostat",
|
|
@@ -27,16 +27,21 @@
|
|
|
27
27
|
"main": "build/eurostatmap.min.js",
|
|
28
28
|
"unpkg": "build/eurostatmap.min.js",
|
|
29
29
|
"module": "build/eurostatmap.js",
|
|
30
|
+
"types": "build/types/index.d.ts",
|
|
31
|
+
"typings": "build/types/index.d.ts",
|
|
30
32
|
"files": [
|
|
31
33
|
"build"
|
|
32
34
|
],
|
|
33
35
|
"scripts": {
|
|
34
36
|
"start": "webpack --config webpack/webpack.config.dev.js",
|
|
35
37
|
"server": "webpack-dev-server --open --watch",
|
|
36
|
-
"build-prod": "webpack --config webpack/webpack.config.prod.js",
|
|
38
|
+
"build-prod": "npm run copy-types && webpack --config webpack/webpack.config.prod.js",
|
|
37
39
|
"build-prod-debug": "webpack --config webpack/webpack.config.debug-size.js",
|
|
38
40
|
"format": "prettier --write .",
|
|
39
|
-
"
|
|
41
|
+
"copy-types": "copyfiles -u 2 \"src/types/**/*.d.ts\" build/types",
|
|
42
|
+
"type-check": "tsc --noEmit && tsc --noEmit test/typescript-test.ts",
|
|
43
|
+
"docs:api": "typedoc --options typedoc.json",
|
|
44
|
+
"docs": "npm run docs:api"
|
|
40
45
|
},
|
|
41
46
|
"dependencies": {
|
|
42
47
|
"d3-array": "^3.2.4",
|
|
@@ -65,19 +70,21 @@
|
|
|
65
70
|
},
|
|
66
71
|
"devDependencies": {
|
|
67
72
|
"@babel/core": "^7.22.6",
|
|
68
|
-
"@babel/plugin-transform-runtime": "^7.22.6",
|
|
69
73
|
"@babel/preset-env": "^7.22.6",
|
|
70
74
|
"@babel/runtime": "^7.12.1",
|
|
71
75
|
"babel-loader": "^9.1.2",
|
|
76
|
+
"copyfiles": "^2.4.1",
|
|
72
77
|
"css-loader": "^7.1.2",
|
|
73
78
|
"prettier": "^3.4.1",
|
|
74
79
|
"style-loader": "^4.0.0",
|
|
75
80
|
"ts-loader": "^9.5.4",
|
|
81
|
+
"typedoc": "^0.28.12",
|
|
82
|
+
"typedoc-plugin-missing-exports": "^4.0.0",
|
|
76
83
|
"typescript": "^5.9.3",
|
|
77
84
|
"webpack": "^5.88.1",
|
|
78
85
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
79
86
|
"webpack-cli": "^5.0.0",
|
|
80
|
-
"webpack-dev-server": "^5.2.
|
|
87
|
+
"webpack-dev-server": "^5.2.3",
|
|
81
88
|
"webpack-livereload-plugin": "^3.0.2"
|
|
82
89
|
}
|
|
83
90
|
}
|