eurostat-map 4.3.58 → 4.4.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/build/215.eurostatmap.min.js +1 -1
- package/build/eurostatmap.js +14318 -17933
- 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/InsetConfig.d.ts +15 -0
- package/build/types/core/MapConfig.d.ts +85 -0
- package/build/types/core/MapInstance.d.ts +354 -0
- package/build/types/core/MinimapConfig.d.ts +11 -0
- package/build/types/core/TooltipConfig.d.ts +13 -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 +56 -0
- package/build/types/core/geo/kosovo.d.ts +10 -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 +107 -0
- package/build/types/core/utils.d.ts +194 -0
- package/build/types/core/zoom.d.ts +21 -0
- package/build/types/index.d.ts +237 -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 +43 -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 +68 -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/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 +15 -0
- package/build/types/map-types/choropleth/BivariateChoroplethMap.d.ts +39 -0
- package/build/types/map-types/choropleth/ChoroplethConfig.d.ts +29 -0
- package/build/types/map-types/choropleth/ChoroplethMap.d.ts +48 -0
- package/build/types/map-types/choropleth/TrivariateChoroplethConfig.d.ts +18 -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 +21 -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 +78 -0
- package/build/types/map-types/composition/bar/BarMapConfig.d.ts +30 -0
- package/build/types/map-types/composition/composition-map.d.ts +25 -0
- package/build/types/map-types/composition/coxcomb/CoxcombMap.d.ts +42 -0
- package/build/types/map-types/composition/coxcomb/CoxcombMapConfig.d.ts +18 -0
- package/build/types/map-types/composition/coxcomb/CoxcombStatConfig.d.ts +14 -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 +62 -0
- package/build/types/map-types/composition/pie/PieMapConfig.d.ts +24 -0
- package/build/types/map-types/composition/stripe/StripeMap.d.ts +43 -0
- package/build/types/map-types/composition/stripe/StripeMapConfig.d.ts +16 -0
- package/build/types/map-types/composition/waffle/WaffleMap.d.ts +71 -0
- package/build/types/map-types/composition/waffle/WaffleMapConfig.d.ts +25 -0
- package/build/types/map-types/flow/FlowMap.d.ts +97 -0
- package/build/types/map-types/flow/FlowMapConfig.d.ts +103 -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 +24 -0
- package/build/types/map-types/proportional-symbol/ProportionalSymbolMap.d.ts +99 -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 +15 -0
- package/build/types/map-types/spark/SparkMap.d.ts +48 -0
- package/build/types/map-types/spark/SparkMapConfig.d.ts +25 -0
- package/build/types/map-types/spark/SparkStatConfig.d.ts +10 -0
- package/build/types/utils/FillPatternOptions.d.ts +17 -0
- package/package.json +8 -5
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { MapConfig } from '../../core/MapConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A flow node in the flow graph.
|
|
5
|
+
*/
|
|
6
|
+
export interface FlowNode {
|
|
7
|
+
id: string
|
|
8
|
+
name?: string
|
|
9
|
+
x?: number
|
|
10
|
+
y?: number
|
|
11
|
+
value?: number
|
|
12
|
+
[key: string]: any
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A flow link between two nodes.
|
|
17
|
+
*/
|
|
18
|
+
export interface FlowLink {
|
|
19
|
+
source: string | FlowNode
|
|
20
|
+
target: string | FlowNode
|
|
21
|
+
value: number
|
|
22
|
+
originId?: string
|
|
23
|
+
destId?: string
|
|
24
|
+
[key: string]: any
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Graph input used by flow maps.
|
|
29
|
+
*/
|
|
30
|
+
export interface FlowGraph {
|
|
31
|
+
nodes: FlowNode[]
|
|
32
|
+
links: FlowLink[]
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Curvature settings used for curved/sankey flow rendering.
|
|
37
|
+
*/
|
|
38
|
+
export interface FlowCurvatureSettings {
|
|
39
|
+
gapX?: number
|
|
40
|
+
padX?: number
|
|
41
|
+
padY?: number
|
|
42
|
+
bumpY?: number
|
|
43
|
+
curvature?: number
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Width gradient settings for tapered flows.
|
|
48
|
+
*/
|
|
49
|
+
export interface FlowWidthGradientSettings {
|
|
50
|
+
startRatio?: number
|
|
51
|
+
samples?: number
|
|
52
|
+
minStartWidth?: number
|
|
53
|
+
capEnd?: boolean
|
|
54
|
+
curvatureFollow?: boolean
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Force settings for optional edge bundling.
|
|
59
|
+
*/
|
|
60
|
+
export interface FlowBundleSettings {
|
|
61
|
+
alphaDecay?: number
|
|
62
|
+
chargeStrength?: number
|
|
63
|
+
distanceMax?: number | null
|
|
64
|
+
linkStrength?: number
|
|
65
|
+
linkIterations?: number
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Configuration for flow maps.
|
|
70
|
+
*/
|
|
71
|
+
export interface FlowMapConfig extends MapConfig {
|
|
72
|
+
flowGraph?: FlowGraph
|
|
73
|
+
|
|
74
|
+
flowColor?: string
|
|
75
|
+
flowRegionColors?: string[]
|
|
76
|
+
flowRegionLabels?: string[]
|
|
77
|
+
flowArrows?: boolean
|
|
78
|
+
flowArrowScale?: number
|
|
79
|
+
flowMaxWidth?: number
|
|
80
|
+
flowMinWidth?: number
|
|
81
|
+
flowOutlines?: boolean
|
|
82
|
+
flowOutlineWidth?: number
|
|
83
|
+
flowOutlineColor?: string
|
|
84
|
+
flowColorGradient?: boolean
|
|
85
|
+
flowStack?: boolean
|
|
86
|
+
flowNodes?: boolean
|
|
87
|
+
flowNodeType?: 'circle' | 'donut'
|
|
88
|
+
flowLabelOffsets?: { x?: number; y?: number }
|
|
89
|
+
flowLineType?: 'curved' | 'straight' | 'sankey'
|
|
90
|
+
flowNodeSizeScale?: (value: number) => number
|
|
91
|
+
flowOpacity?: number
|
|
92
|
+
flowInternal?: boolean
|
|
93
|
+
flowTopLocations?: number
|
|
94
|
+
flowTopLocationsType?: 'sum' | 'origin' | 'destination'
|
|
95
|
+
flowCurvatureSettings?: FlowCurvatureSettings
|
|
96
|
+
flowOrder?: (a: any, b: any) => number
|
|
97
|
+
flowWidthGradient?: boolean
|
|
98
|
+
flowOpacityGradient?: boolean
|
|
99
|
+
flowWidthGradientSettings?: FlowWidthGradientSettings
|
|
100
|
+
flowBidirectional?: boolean
|
|
101
|
+
flowEdgeBundling?: boolean
|
|
102
|
+
flowBundleSettings?: FlowBundleSettings
|
|
103
|
+
}
|
|
@@ -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,24 @@
|
|
|
1
|
+
import type { MapConfig } from '../../core/MapConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for proportional symbol maps
|
|
5
|
+
*/
|
|
6
|
+
export interface ProportionalSymbolConfig extends MapConfig {
|
|
7
|
+
symbol?: 'circle' | 'square'
|
|
8
|
+
size?: number
|
|
9
|
+
sizeMin?: number
|
|
10
|
+
sizeMax?: number
|
|
11
|
+
symbolFillStyle?: string
|
|
12
|
+
symbolStrokeStyle?: string
|
|
13
|
+
symbolStrokeWidth?: number
|
|
14
|
+
|
|
15
|
+
// Dorling cartogram
|
|
16
|
+
dorling?: boolean
|
|
17
|
+
dorlingIterations?: number
|
|
18
|
+
|
|
19
|
+
// Size function
|
|
20
|
+
psCustomSize?: (value: number) => number
|
|
21
|
+
|
|
22
|
+
// Scaling
|
|
23
|
+
psScale?: 'sqrt' | 'linear' | 'radial'
|
|
24
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
dorlingStrength(): any
|
|
83
|
+
dorlingStrength(v: any): this
|
|
84
|
+
|
|
85
|
+
dorlingIterations(): number
|
|
86
|
+
dorlingIterations(v: number): this
|
|
87
|
+
|
|
88
|
+
animateDorling(): boolean
|
|
89
|
+
animateDorling(v: boolean): this
|
|
90
|
+
|
|
91
|
+
psSpikeWidth(): number
|
|
92
|
+
psSpikeWidth(v: number): this
|
|
93
|
+
|
|
94
|
+
psCodeLabels(): boolean
|
|
95
|
+
psCodeLabels(v: boolean): this
|
|
96
|
+
|
|
97
|
+
psBrightenFactor(): number
|
|
98
|
+
psBrightenFactor(v: number): this
|
|
99
|
+
}
|
|
@@ -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,15 @@
|
|
|
1
|
+
import type { MapConfig } from '../../../core/MapConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for mushroom maps.
|
|
5
|
+
*/
|
|
6
|
+
export interface MushroomMapConfig extends MapConfig {
|
|
7
|
+
mushroomCodes?: [string, string]
|
|
8
|
+
mushroomMinSize?: number
|
|
9
|
+
mushroomMaxSize?: number
|
|
10
|
+
mushroomColors?: [string, string]
|
|
11
|
+
mushroomOrientation?: 'horizontal' | 'vertical'
|
|
12
|
+
mushroomSizeScaleFunction?: (value: number) => number
|
|
13
|
+
mushroomSizeScaleFunctionV1?: (value: number) => number
|
|
14
|
+
mushroomSizeScaleFunctionV2?: (value: number) => number
|
|
15
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { MapInstance } from '../../core/MapInstance'
|
|
2
|
+
import type { SparkStatConfig } from './SparkStatConfig'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Spark map type.
|
|
6
|
+
*/
|
|
7
|
+
export interface SparkMap extends MapInstance {
|
|
8
|
+
sparkLineColor(): any
|
|
9
|
+
sparkLineColor(v: any): this
|
|
10
|
+
|
|
11
|
+
showOnlyWhenComplete(): boolean
|
|
12
|
+
showOnlyWhenComplete(v: boolean): this
|
|
13
|
+
|
|
14
|
+
sparkType(): 'line' | 'area' | 'bar'
|
|
15
|
+
sparkType(v: 'line' | 'area' | 'bar'): this
|
|
16
|
+
|
|
17
|
+
sparkLineWidth(): number
|
|
18
|
+
sparkLineWidth(v: number): this
|
|
19
|
+
|
|
20
|
+
sparkLineHeight(): number
|
|
21
|
+
sparkLineHeight(v: number): this
|
|
22
|
+
|
|
23
|
+
sparkLineStrokeWidth(): number
|
|
24
|
+
sparkLineStrokeWidth(v: number): this
|
|
25
|
+
|
|
26
|
+
sparkLineOpacity(): number
|
|
27
|
+
sparkLineOpacity(v: number): this
|
|
28
|
+
|
|
29
|
+
sparkLineCircleRadius(): number
|
|
30
|
+
sparkLineCircleRadius(v: number): this
|
|
31
|
+
|
|
32
|
+
sparkLineAreaColor(): any
|
|
33
|
+
sparkLineAreaColor(v: any): this
|
|
34
|
+
|
|
35
|
+
sparkTooltipChart(): any
|
|
36
|
+
sparkTooltipChart(v: any): this
|
|
37
|
+
|
|
38
|
+
sparkLineChartFunction(): any
|
|
39
|
+
sparkLineChartFunction(v: any): this
|
|
40
|
+
|
|
41
|
+
sparkLineOffsets(): { x: number; y: number }
|
|
42
|
+
sparkLineOffsets(v: { x: number; y: number }): this
|
|
43
|
+
|
|
44
|
+
//manually set the data for the sparkline, instead of fetching it from Eurostat
|
|
45
|
+
sparklineData(dataObject: Record<string, Record<string, number>>): this
|
|
46
|
+
//configuration for fetching the data from Eurostat and generating the sparkline
|
|
47
|
+
statSpark(config: SparkStatConfig): this
|
|
48
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { MapConfig } from '../../core/MapConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for sparkline maps.
|
|
5
|
+
*/
|
|
6
|
+
export interface SparkMapConfig extends MapConfig {
|
|
7
|
+
sparkType?: 'line' | 'area' | 'bar'
|
|
8
|
+
sparkLineColor?: string | ((value: number, index: number, data: any[]) => string)
|
|
9
|
+
sparkAreaColor?: string | ((value: number, index: number, data: any[]) => string)
|
|
10
|
+
sparkLineWidth?: number
|
|
11
|
+
sparkLineHeight?: number
|
|
12
|
+
sparkLineStrokeWidth?: number
|
|
13
|
+
sparkLineOpacity?: number
|
|
14
|
+
sparkLineCircleRadius?: number
|
|
15
|
+
sparkTooltipChart?: {
|
|
16
|
+
width: number
|
|
17
|
+
height: number
|
|
18
|
+
margin: { left: number; right: number; top: number; bottom: number }
|
|
19
|
+
circleRadius: number
|
|
20
|
+
}
|
|
21
|
+
sparkLineOffsets?: { x: number; y: number }
|
|
22
|
+
showOnlyWhenComplete?: boolean
|
|
23
|
+
sparkLineChartFunction?: (node: any, data: any[], width: number, height: number, isForTooltip?: boolean) => void
|
|
24
|
+
sparkYScale?: any
|
|
25
|
+
}
|
|
@@ -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.0",
|
|
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,19 @@
|
|
|
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"
|
|
40
43
|
},
|
|
41
44
|
"dependencies": {
|
|
42
45
|
"d3-array": "^3.2.4",
|
|
@@ -65,10 +68,10 @@
|
|
|
65
68
|
},
|
|
66
69
|
"devDependencies": {
|
|
67
70
|
"@babel/core": "^7.22.6",
|
|
68
|
-
"@babel/plugin-transform-runtime": "^7.22.6",
|
|
69
71
|
"@babel/preset-env": "^7.22.6",
|
|
70
72
|
"@babel/runtime": "^7.12.1",
|
|
71
73
|
"babel-loader": "^9.1.2",
|
|
74
|
+
"copyfiles": "^2.4.1",
|
|
72
75
|
"css-loader": "^7.1.2",
|
|
73
76
|
"prettier": "^3.4.1",
|
|
74
77
|
"style-loader": "^4.0.0",
|
|
@@ -77,7 +80,7 @@
|
|
|
77
80
|
"webpack": "^5.88.1",
|
|
78
81
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
79
82
|
"webpack-cli": "^5.0.0",
|
|
80
|
-
"webpack-dev-server": "^5.2.
|
|
83
|
+
"webpack-dev-server": "^5.2.3",
|
|
81
84
|
"webpack-livereload-plugin": "^3.0.2"
|
|
82
85
|
}
|
|
83
86
|
}
|