eurostat-map 4.8.6 → 4.9.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 +3 -1
- package/build/215.eurostatmap.min.js +1 -1
- package/build/eurostatmap.js +28645 -25693
- package/build/eurostatmap.min.js +2 -2
- package/build/eurostatmap.min.js.map +1 -1
- package/build/package.json +1 -1
- package/build/src_core_dorling_dorling-worker_js.eurostatmap.js +1 -1
- package/build/types/core/InsetConfig.d.ts +71 -71
- package/build/types/core/MapConfig.d.ts +8 -0
- package/build/types/core/MapInstance.d.ts +15 -0
- package/build/types/core/encoding/EncodingConfig.d.ts +31 -31
- package/build/types/core/layer/Layer.d.ts +31 -31
- package/build/types/core/layer/LayerConfig.d.ts +19 -19
- package/build/types/core/layer/LayerRole.d.ts +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/layers/CategoricalMapConfig.d.ts +13 -13
- package/build/types/layers/composition/bar/BarMap.d.ts +97 -97
- package/build/types/layers/composition/bar/BarMapConfig.d.ts +76 -76
- package/build/types/legend/LegendConfig.d.ts +73 -73
- package/build/types/legend/choropleth/BivariateLegendConfig.d.ts +1 -1
- package/build/types/legend/choropleth/RankedBarChartConfig.d.ts +22 -0
- package/build/types/legend/choropleth/legend-choropleth-bivariate.d.ts +2 -2
- package/build/types/legend/choropleth/legend-choropleth-trivariate.d.ts +2 -2
- package/build/types/legend/choropleth/legend-choropleth.d.ts +2 -2
- package/build/types/legend/composition/legend-bar-chart.d.ts +2 -2
- package/build/types/legend/flow/legend-flow.d.ts +2 -2
- package/build/types/legend/legend-categorical.d.ts +2 -2
- package/build/types/legend/legend-continuous.d.ts +2 -2
- package/build/types/legend/legend-discrete.d.ts +2 -2
- package/build/types/legend/legend.d.ts +13 -13
- package/build/types/legend/proportional-symbol/legend-proportional-symbols.d.ts +2 -2
- package/build/types/map-types/CategoricalMapConfig.d.ts +11 -11
- package/build/types/map-types/choropleth/map-choropleth-bivariate.d.ts +4 -4
- package/build/types/map-types/choropleth/map-choropleth-trivariate.d.ts +4 -4
- package/build/types/map-types/choropleth/map-value-by-alpha.d.ts +4 -4
- package/build/types/map-types/composition/bar/BarMap.d.ts +97 -97
- package/build/types/map-types/composition/bar/BarMapConfig.d.ts +76 -76
- package/build/types/map-types/composition/map-spark.d.ts +5 -5
- package/build/types/map-types/composition/map-stripe.d.ts +5 -5
- package/build/types/map-types/flow/map-flow.d.ts +5 -5
- package/package.json +1 -1
package/build/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
root["eurostatmap"] = factory();
|
|
10
10
|
})(self, () => {
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
|
-
|
|
12
|
+
let __webpack_exports__ = {};
|
|
13
13
|
/*!********************************************!*\
|
|
14
14
|
!*** ./src/core/dorling/dorling-worker.js ***!
|
|
15
15
|
\********************************************/
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import type { LabelsConfig } from './decoration/LabelsConfig'
|
|
2
|
-
import type { ScalebarConfig } from './decoration/ScalebarConfig'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Configuration for map insets (smaller additional maps, e.g. overseas territories)
|
|
6
|
-
*/
|
|
7
|
-
export interface InsetConfig {
|
|
8
|
-
/** Geographic code (e.g., 'MT', 'PT20', 'CARIB'). */
|
|
9
|
-
geo?: string
|
|
10
|
-
/** Title. */
|
|
11
|
-
title?: string
|
|
12
|
-
/** Position of the title, relative to the inset's top-left corner. */
|
|
13
|
-
titlePosition?: [number, number]
|
|
14
|
-
/** Subtitle. */
|
|
15
|
-
subtitle?: string
|
|
16
|
-
/** Position of the subtitle, relative to the inset's top-left corner. */
|
|
17
|
-
subtitlePosition?: [number, number]
|
|
18
|
-
/** Scale. Named nuts2json scale (e.g. '01M', '03M', '10M', '20M', '60M') or a number. */
|
|
19
|
-
scale?: string | number
|
|
20
|
-
/** Width. */
|
|
21
|
-
width?: number
|
|
22
|
-
/** Height. */
|
|
23
|
-
height?: number
|
|
24
|
-
/** X position of the inset within the inset box. */
|
|
25
|
-
x?: number
|
|
26
|
-
/** Y position of the inset within the inset box. */
|
|
27
|
-
y?: number
|
|
28
|
-
/** Proj. */
|
|
29
|
-
proj?: string
|
|
30
|
-
/** Id of the `<svg>` element the inset is drawn into. Auto-generated if omitted. */
|
|
31
|
-
svgId?: string
|
|
32
|
-
/** Manual re-centering/zoom of the inset's own projection. */
|
|
33
|
-
position?: { x?: number; y?: number; z?: number }
|
|
34
|
-
/** Label rendering settings for this inset. */
|
|
35
|
-
labels?: LabelsConfig
|
|
36
|
-
/** Whether to show zoom buttons on this inset. @default false */
|
|
37
|
-
zoomButtons?: boolean
|
|
38
|
-
/** Custom base URL for this inset's nuts2json boundary data. */
|
|
39
|
-
nuts2jsonBaseURL?: string
|
|
40
|
-
/** Custom D3 projection function for this inset. */
|
|
41
|
-
projectionFunction?: Function | boolean
|
|
42
|
-
|
|
43
|
-
/** Scalebar settings for this inset. `true` uses the default scalebar config. */
|
|
44
|
-
scalebar?: ScalebarConfig | boolean
|
|
45
|
-
|
|
46
|
-
/** @deprecated Use `scalebar: { show: true }` instead. */
|
|
47
|
-
showScalebar?: boolean
|
|
48
|
-
/** @deprecated Use `scalebar: { position: [x, y] }` instead. */
|
|
49
|
-
scalebarPosition?: [number, number]
|
|
50
|
-
/** @deprecated Use `scalebar: { tickHeight }` instead. */
|
|
51
|
-
scalebarTickHeight?: number
|
|
52
|
-
/** @deprecated Use `scalebar: { segmentHeight }` instead. */
|
|
53
|
-
scalebarSegmentHeight?: number
|
|
54
|
-
/** Scalebar label font size in pixels. */
|
|
55
|
-
scalebarFontSize?: number
|
|
56
|
-
/** @deprecated Use `scalebar: { units }` instead. */
|
|
57
|
-
scalebarUnits?: string
|
|
58
|
-
/** @deprecated Use `scalebar: { textOffset }` instead. */
|
|
59
|
-
scalebarTextOffset?: [number, number]
|
|
60
|
-
/** @deprecated Use `scalebar: { maxWidth }` instead. */
|
|
61
|
-
scalebarMaxWidth?: number
|
|
62
|
-
/** Minimum width of the scalebar in pixels. */
|
|
63
|
-
scalebarMinWidth?: number
|
|
64
|
-
|
|
65
|
-
/** Nested insets belonging to this inset (e.g. bivariate choropleth per-inset legend classification). */
|
|
66
|
-
insets?: InsetConfig[]
|
|
67
|
-
/** Position of nested insets' inset box, relative to this inset. */
|
|
68
|
-
insetBoxPosition?: [number, number]
|
|
69
|
-
|
|
70
|
-
[key: string]: any
|
|
71
|
-
}
|
|
1
|
+
import type { LabelsConfig } from './decoration/LabelsConfig'
|
|
2
|
+
import type { ScalebarConfig } from './decoration/ScalebarConfig'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for map insets (smaller additional maps, e.g. overseas territories)
|
|
6
|
+
*/
|
|
7
|
+
export interface InsetConfig {
|
|
8
|
+
/** Geographic code (e.g., 'MT', 'PT20', 'CARIB'). */
|
|
9
|
+
geo?: string
|
|
10
|
+
/** Title. */
|
|
11
|
+
title?: string
|
|
12
|
+
/** Position of the title, relative to the inset's top-left corner. */
|
|
13
|
+
titlePosition?: [number, number]
|
|
14
|
+
/** Subtitle. */
|
|
15
|
+
subtitle?: string
|
|
16
|
+
/** Position of the subtitle, relative to the inset's top-left corner. */
|
|
17
|
+
subtitlePosition?: [number, number]
|
|
18
|
+
/** Scale. Named nuts2json scale (e.g. '01M', '03M', '10M', '20M', '60M') or a number. */
|
|
19
|
+
scale?: string | number
|
|
20
|
+
/** Width. */
|
|
21
|
+
width?: number
|
|
22
|
+
/** Height. */
|
|
23
|
+
height?: number
|
|
24
|
+
/** X position of the inset within the inset box. */
|
|
25
|
+
x?: number
|
|
26
|
+
/** Y position of the inset within the inset box. */
|
|
27
|
+
y?: number
|
|
28
|
+
/** Proj. */
|
|
29
|
+
proj?: string
|
|
30
|
+
/** Id of the `<svg>` element the inset is drawn into. Auto-generated if omitted. */
|
|
31
|
+
svgId?: string
|
|
32
|
+
/** Manual re-centering/zoom of the inset's own projection. */
|
|
33
|
+
position?: { x?: number; y?: number; z?: number }
|
|
34
|
+
/** Label rendering settings for this inset. */
|
|
35
|
+
labels?: LabelsConfig
|
|
36
|
+
/** Whether to show zoom buttons on this inset. @default false */
|
|
37
|
+
zoomButtons?: boolean
|
|
38
|
+
/** Custom base URL for this inset's nuts2json boundary data. */
|
|
39
|
+
nuts2jsonBaseURL?: string
|
|
40
|
+
/** Custom D3 projection function for this inset. */
|
|
41
|
+
projectionFunction?: Function | boolean
|
|
42
|
+
|
|
43
|
+
/** Scalebar settings for this inset. `true` uses the default scalebar config. */
|
|
44
|
+
scalebar?: ScalebarConfig | boolean
|
|
45
|
+
|
|
46
|
+
/** @deprecated Use `scalebar: { show: true }` instead. */
|
|
47
|
+
showScalebar?: boolean
|
|
48
|
+
/** @deprecated Use `scalebar: { position: [x, y] }` instead. */
|
|
49
|
+
scalebarPosition?: [number, number]
|
|
50
|
+
/** @deprecated Use `scalebar: { tickHeight }` instead. */
|
|
51
|
+
scalebarTickHeight?: number
|
|
52
|
+
/** @deprecated Use `scalebar: { segmentHeight }` instead. */
|
|
53
|
+
scalebarSegmentHeight?: number
|
|
54
|
+
/** Scalebar label font size in pixels. */
|
|
55
|
+
scalebarFontSize?: number
|
|
56
|
+
/** @deprecated Use `scalebar: { units }` instead. */
|
|
57
|
+
scalebarUnits?: string
|
|
58
|
+
/** @deprecated Use `scalebar: { textOffset }` instead. */
|
|
59
|
+
scalebarTextOffset?: [number, number]
|
|
60
|
+
/** @deprecated Use `scalebar: { maxWidth }` instead. */
|
|
61
|
+
scalebarMaxWidth?: number
|
|
62
|
+
/** Minimum width of the scalebar in pixels. */
|
|
63
|
+
scalebarMinWidth?: number
|
|
64
|
+
|
|
65
|
+
/** Nested insets belonging to this inset (e.g. bivariate choropleth per-inset legend classification). */
|
|
66
|
+
insets?: InsetConfig[]
|
|
67
|
+
/** Position of nested insets' inset box, relative to this inset. */
|
|
68
|
+
insetBoxPosition?: [number, number]
|
|
69
|
+
|
|
70
|
+
[key: string]: any
|
|
71
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { StatConfig } from './stat/StatConfig'
|
|
2
2
|
import type { CompositionStatConfig } from '../layers/composition/CompositionStatConfig'
|
|
3
3
|
import type { LegendConfig } from '../legend/LegendConfig'
|
|
4
|
+
import type { RankedBarChartConfig } from '../legend/choropleth/RankedBarChartConfig'
|
|
4
5
|
import type { TooltipConfig } from './TooltipConfig'
|
|
5
6
|
import type { InsetConfig } from './InsetConfig'
|
|
6
7
|
import type { MapInstance as EurostatMap } from './MapInstance'
|
|
@@ -73,6 +74,13 @@ export interface MapConfig {
|
|
|
73
74
|
/** Legend configuration. */
|
|
74
75
|
legend?: LegendConfig | false
|
|
75
76
|
|
|
77
|
+
/**
|
|
78
|
+
* Ranked bar chart configuration (choropleth-classified map types only). Independent of the
|
|
79
|
+
* legend - has its own positioning and can render into an entirely different container/SVG
|
|
80
|
+
* to the legend's, rather than being a sub-feature of it.
|
|
81
|
+
*/
|
|
82
|
+
rankedBarChart?: RankedBarChartConfig | false
|
|
83
|
+
|
|
76
84
|
/** Tooltip configuration. */
|
|
77
85
|
tooltip?: TooltipConfig
|
|
78
86
|
|
|
@@ -4,6 +4,7 @@ import type { Layer } from './layer/Layer'
|
|
|
4
4
|
import type { LayerConfig } from './layer/LayerConfig'
|
|
5
5
|
import type { CompositionStatConfig } from '../layers/composition/CompositionStatConfig'
|
|
6
6
|
import type { LegendConfig } from '../legend/LegendConfig'
|
|
7
|
+
import type { RankedBarChartConfig } from '../legend/choropleth/RankedBarChartConfig'
|
|
7
8
|
import type { TooltipConfig } from './TooltipConfig'
|
|
8
9
|
import type { InsetConfig } from './InsetConfig'
|
|
9
10
|
import type { CoastalMarginSettings } from './decoration/CoastalMarginSettings'
|
|
@@ -204,6 +205,20 @@ export interface MapInstance {
|
|
|
204
205
|
/** Force-update the legend after data or style changes. */
|
|
205
206
|
updateLegend(): this
|
|
206
207
|
|
|
208
|
+
/** Ranked bar chart. */
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Get or set ranked bar chart configuration (choropleth-classified map types only). Pass
|
|
212
|
+
* false to remove it. Independent of the legend - has its own positioning and can render
|
|
213
|
+
* into an entirely different container/SVG to the legend's.
|
|
214
|
+
* @example map.rankedBarChart({ svgId: 'my-bar-chart-container' })
|
|
215
|
+
*/
|
|
216
|
+
rankedBarChart(): RankedBarChartConfig | false
|
|
217
|
+
rankedBarChart(config: RankedBarChartConfig | false): this
|
|
218
|
+
|
|
219
|
+
/** Force-update the ranked bar chart after data or style changes. */
|
|
220
|
+
updateRankedBarChart(): this
|
|
221
|
+
|
|
207
222
|
/** Tooltip. */
|
|
208
223
|
|
|
209
224
|
/** Get or set tooltip configuration. */
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration for mapping a named stat dataset to a visual channel.
|
|
3
|
-
*/
|
|
4
|
-
export interface EncodingConfig {
|
|
5
|
-
/** Name of a dataset registered with map.stat(name, config). */
|
|
6
|
-
stat?: string
|
|
7
|
-
/** Names of datasets for multi-stat encodings such as bivariate color. */
|
|
8
|
-
stats?: string[]
|
|
9
|
-
/** Whether the encoding is based on raw values or category codes. */
|
|
10
|
-
by?: 'value' | 'category'
|
|
11
|
-
/** Encoding type. */
|
|
12
|
-
type?: 'linear' | 'sqrt' | 'threshold' | 'quantile' | 'categorical' | 'bivariate' | 'trivariate'
|
|
13
|
-
/** Scale type. */
|
|
14
|
-
scale?: 'linear' | 'sqrt' | 'quantile' | 'threshold'
|
|
15
|
-
/** Numeric or color output range. */
|
|
16
|
-
range?: [number, number] | string[]
|
|
17
|
-
/** Explicit encoded values, for example category colors. */
|
|
18
|
-
values?: Record<string, string | number> | Array<string | number>
|
|
19
|
-
/** Labels keyed by category code or value. */
|
|
20
|
-
labels?: Record<string, string> | string[]
|
|
21
|
-
/** Category codes when using array-based values or labels. */
|
|
22
|
-
categoryCodes?: string[]
|
|
23
|
-
/** Number of classes for classified encodings. */
|
|
24
|
-
classes?: number
|
|
25
|
-
/** Threshold values for threshold encodings. */
|
|
26
|
-
thresholds?: number[]
|
|
27
|
-
/** Color scheme name or function. */
|
|
28
|
-
scheme?: string | Function
|
|
29
|
-
/** Optional unit override for this encoding. */
|
|
30
|
-
unitText?: string
|
|
31
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for mapping a named stat dataset to a visual channel.
|
|
3
|
+
*/
|
|
4
|
+
export interface EncodingConfig {
|
|
5
|
+
/** Name of a dataset registered with map.stat(name, config). */
|
|
6
|
+
stat?: string
|
|
7
|
+
/** Names of datasets for multi-stat encodings such as bivariate color. */
|
|
8
|
+
stats?: string[]
|
|
9
|
+
/** Whether the encoding is based on raw values or category codes. */
|
|
10
|
+
by?: 'value' | 'category'
|
|
11
|
+
/** Encoding type. */
|
|
12
|
+
type?: 'linear' | 'sqrt' | 'threshold' | 'quantile' | 'categorical' | 'bivariate' | 'trivariate'
|
|
13
|
+
/** Scale type. */
|
|
14
|
+
scale?: 'linear' | 'sqrt' | 'quantile' | 'threshold'
|
|
15
|
+
/** Numeric or color output range. */
|
|
16
|
+
range?: [number, number] | string[]
|
|
17
|
+
/** Explicit encoded values, for example category colors. */
|
|
18
|
+
values?: Record<string, string | number> | Array<string | number>
|
|
19
|
+
/** Labels keyed by category code or value. */
|
|
20
|
+
labels?: Record<string, string> | string[]
|
|
21
|
+
/** Category codes when using array-based values or labels. */
|
|
22
|
+
categoryCodes?: string[]
|
|
23
|
+
/** Number of classes for classified encodings. */
|
|
24
|
+
classes?: number
|
|
25
|
+
/** Threshold values for threshold encodings. */
|
|
26
|
+
thresholds?: number[]
|
|
27
|
+
/** Color scheme name or function. */
|
|
28
|
+
scheme?: string | Function
|
|
29
|
+
/** Optional unit override for this encoding. */
|
|
30
|
+
unitText?: string
|
|
31
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import type { MapInstance } from '../MapInstance'
|
|
2
|
-
import type { EncodingConfig } from '../encoding/EncodingConfig'
|
|
3
|
-
import type { StatData } from '../stat/StatData'
|
|
4
|
-
import type { LayerRole } from './LayerRole'
|
|
5
|
-
|
|
6
|
-
export interface Layer {
|
|
7
|
-
map: MapInstance
|
|
8
|
-
isLayer: true
|
|
9
|
-
id: string
|
|
10
|
-
type: string
|
|
11
|
-
role: LayerRole
|
|
12
|
-
|
|
13
|
-
encodings_: Record<string, EncodingConfig>
|
|
14
|
-
|
|
15
|
-
encoding(): Record<string, EncodingConfig>
|
|
16
|
-
encoding(channel: string): EncodingConfig | undefined
|
|
17
|
-
encoding(channel: string, config: EncodingConfig): Layer
|
|
18
|
-
encoding(map: Record<string, EncodingConfig>): Layer
|
|
19
|
-
|
|
20
|
-
getEncodingStat(channel: string, fallback?: string): string | undefined
|
|
21
|
-
getEncodingStats(channel: string, fallback?: string[]): string[] | undefined
|
|
22
|
-
getEncodingStatKey(channel: string, categoryCode?: string, fallbackStat?: string): string
|
|
23
|
-
getEncodingStatData(channel: string, categoryCode?: string, fallbackStat?: string): StatData
|
|
24
|
-
getEncodingValue(channel: string, regionId: string, categoryCode?: string, fallbackStat?: string): number | string | undefined
|
|
25
|
-
getEncodingUnitText(channel: string, categoryCode?: string, fallbackStat?: string): string
|
|
26
|
-
|
|
27
|
-
updateClassification(): Layer
|
|
28
|
-
updateStyle(): Layer
|
|
29
|
-
getLegendConstructor(): (map: MapInstance, config?: any) => any
|
|
30
|
-
group(): any // d3 selection
|
|
31
|
-
}
|
|
1
|
+
import type { MapInstance } from '../MapInstance'
|
|
2
|
+
import type { EncodingConfig } from '../encoding/EncodingConfig'
|
|
3
|
+
import type { StatData } from '../stat/StatData'
|
|
4
|
+
import type { LayerRole } from './LayerRole'
|
|
5
|
+
|
|
6
|
+
export interface Layer {
|
|
7
|
+
map: MapInstance
|
|
8
|
+
isLayer: true
|
|
9
|
+
id: string
|
|
10
|
+
type: string
|
|
11
|
+
role: LayerRole
|
|
12
|
+
|
|
13
|
+
encodings_: Record<string, EncodingConfig>
|
|
14
|
+
|
|
15
|
+
encoding(): Record<string, EncodingConfig>
|
|
16
|
+
encoding(channel: string): EncodingConfig | undefined
|
|
17
|
+
encoding(channel: string, config: EncodingConfig): Layer
|
|
18
|
+
encoding(map: Record<string, EncodingConfig>): Layer
|
|
19
|
+
|
|
20
|
+
getEncodingStat(channel: string, fallback?: string): string | undefined
|
|
21
|
+
getEncodingStats(channel: string, fallback?: string[]): string[] | undefined
|
|
22
|
+
getEncodingStatKey(channel: string, categoryCode?: string, fallbackStat?: string): string
|
|
23
|
+
getEncodingStatData(channel: string, categoryCode?: string, fallbackStat?: string): StatData
|
|
24
|
+
getEncodingValue(channel: string, regionId: string, categoryCode?: string, fallbackStat?: string): number | string | undefined
|
|
25
|
+
getEncodingUnitText(channel: string, categoryCode?: string, fallbackStat?: string): string
|
|
26
|
+
|
|
27
|
+
updateClassification(): Layer
|
|
28
|
+
updateStyle(): Layer
|
|
29
|
+
getLegendConstructor(): (map: MapInstance, config?: any) => any
|
|
30
|
+
group(): any // d3 selection
|
|
31
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import type { MapType } from '../../layers/MapType'
|
|
2
|
-
import type { EncodingConfig } from '../encoding/EncodingConfig'
|
|
3
|
-
import type { LegendConfig } from '../../legend/LegendConfig'
|
|
4
|
-
import type { LayerRole } from './LayerRole'
|
|
5
|
-
|
|
6
|
-
export interface LayerConfig {
|
|
7
|
-
/** Stable id; auto-generated if omitted. */
|
|
8
|
-
id?: string
|
|
9
|
-
/** Layer type (same identifiers as map types). */
|
|
10
|
-
type: MapType
|
|
11
|
-
/** Explicit role; defaults from the type. */
|
|
12
|
-
role?: LayerRole
|
|
13
|
-
/** Keyed visual encodings: fill, size, color, stroke, … */
|
|
14
|
-
encoding?: Record<string, EncodingConfig>
|
|
15
|
-
/** Per-layer legend config. */
|
|
16
|
-
legend?: LegendConfig
|
|
17
|
-
/** Type-specific settings are also accepted. */
|
|
18
|
-
[key: string]: any
|
|
19
|
-
}
|
|
1
|
+
import type { MapType } from '../../layers/MapType'
|
|
2
|
+
import type { EncodingConfig } from '../encoding/EncodingConfig'
|
|
3
|
+
import type { LegendConfig } from '../../legend/LegendConfig'
|
|
4
|
+
import type { LayerRole } from './LayerRole'
|
|
5
|
+
|
|
6
|
+
export interface LayerConfig {
|
|
7
|
+
/** Stable id; auto-generated if omitted. */
|
|
8
|
+
id?: string
|
|
9
|
+
/** Layer type (same identifiers as map types). */
|
|
10
|
+
type: MapType
|
|
11
|
+
/** Explicit role; defaults from the type. */
|
|
12
|
+
role?: LayerRole
|
|
13
|
+
/** Keyed visual encodings: fill, size, color, stroke, … */
|
|
14
|
+
encoding?: Record<string, EncodingConfig>
|
|
15
|
+
/** Per-layer legend config. */
|
|
16
|
+
legend?: LegendConfig
|
|
17
|
+
/** Type-specific settings are also accepted. */
|
|
18
|
+
[key: string]: any
|
|
19
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type LayerRole = 'base' | 'overlay'
|
|
1
|
+
export type LayerRole = 'base' | 'overlay'
|
package/build/types/index.d.ts
CHANGED
|
@@ -87,6 +87,7 @@ export type { ChoroplethLegendConfig } from './legend/choropleth/ChoroplethLegen
|
|
|
87
87
|
export type { BivariateLegendConfig } from './legend/choropleth/BivariateLegendConfig'
|
|
88
88
|
export type { HistogramLegendConfig } from './legend/choropleth/HistogramLegendConfig'
|
|
89
89
|
export type { TrivariateLegendConfig } from './legend/choropleth/TrivariateLegendConfig'
|
|
90
|
+
export type { RankedBarChartConfig } from './legend/choropleth/RankedBarChartConfig'
|
|
90
91
|
|
|
91
92
|
// Composition legend types
|
|
92
93
|
export type { BarChartLegendConfig } from './legend/composition/BarChartLegendConfig'
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { MapConfig } from '../core/MapConfig'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Configuration for categorical map
|
|
5
|
-
*/
|
|
6
|
-
export interface CategoricalMapConfig extends MapConfig {
|
|
7
|
-
/** Category-to-color mapping */
|
|
8
|
-
classToFillStyle?: Record<string, string>
|
|
9
|
-
/** Category-to-label mapping, used for legend text and tooltips */
|
|
10
|
-
classToText?: Record<string, string>
|
|
11
|
-
/** Fill style for regions with no data */
|
|
12
|
-
noDataFillStyle?: string
|
|
13
|
-
}
|
|
1
|
+
import type { MapConfig } from '../core/MapConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for categorical map
|
|
5
|
+
*/
|
|
6
|
+
export interface CategoricalMapConfig extends MapConfig {
|
|
7
|
+
/** Category-to-color mapping */
|
|
8
|
+
classToFillStyle?: Record<string, string>
|
|
9
|
+
/** Category-to-label mapping, used for legend text and tooltips */
|
|
10
|
+
classToText?: Record<string, string>
|
|
11
|
+
/** Fill style for regions with no data */
|
|
12
|
+
noDataFillStyle?: string
|
|
13
|
+
}
|
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
import type { MapInstance } from '../../../core/MapInstance'
|
|
2
|
-
import type { CompositionStatConfig } from '../CompositionStatConfig'
|
|
3
|
-
import type { BarChartLegendConfig } from '../../../legend/composition/BarChartLegendConfig'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Bar map type.
|
|
7
|
-
*/
|
|
8
|
-
export interface BarMap extends MapInstance {
|
|
9
|
-
legend(): BarChartLegendConfig | false
|
|
10
|
-
legend(config: BarChartLegendConfig | false): this
|
|
11
|
-
|
|
12
|
-
barType(): 'stacked' | 'grouped'
|
|
13
|
-
barType(v: 'stacked' | 'grouped'): this
|
|
14
|
-
|
|
15
|
-
catColors(): any
|
|
16
|
-
catColors(v: any): this
|
|
17
|
-
|
|
18
|
-
catLabels(): any
|
|
19
|
-
catLabels(v: any): this
|
|
20
|
-
|
|
21
|
-
showOnlyWhenComplete(): boolean
|
|
22
|
-
showOnlyWhenComplete(v: boolean): this
|
|
23
|
-
|
|
24
|
-
noDataFillStyle(): string
|
|
25
|
-
noDataFillStyle(v: string): this
|
|
26
|
-
|
|
27
|
-
barMaxWidth(): number
|
|
28
|
-
barMaxWidth(v: number): this
|
|
29
|
-
|
|
30
|
-
barMinWidth(): number
|
|
31
|
-
barMinWidth(v: number): this
|
|
32
|
-
|
|
33
|
-
barHeight(): number
|
|
34
|
-
barHeight(v: number): this
|
|
35
|
-
|
|
36
|
-
barGroupWidth(): number
|
|
37
|
-
barGroupWidth(v: number): this
|
|
38
|
-
|
|
39
|
-
barSettings(): any
|
|
40
|
-
barSettings(v: any): this
|
|
41
|
-
|
|
42
|
-
barGroupGap(): number
|
|
43
|
-
barGroupGap(v: number): this
|
|
44
|
-
|
|
45
|
-
barGroupMinHeight(): number
|
|
46
|
-
barGroupMinHeight(v: number): this
|
|
47
|
-
|
|
48
|
-
barGroupMaxHeight(): number
|
|
49
|
-
barGroupMaxHeight(v: number): this
|
|
50
|
-
|
|
51
|
-
barStrokeFill(): string
|
|
52
|
-
barStrokeFill(v: string): this
|
|
53
|
-
|
|
54
|
-
barStrokeWidth(): number
|
|
55
|
-
barStrokeWidth(v: number): this
|
|
56
|
-
|
|
57
|
-
barCornerRadius(): number
|
|
58
|
-
barCornerRadius(v: number): this
|
|
59
|
-
|
|
60
|
-
barOtherColor(): string
|
|
61
|
-
barOtherColor(v: string): this
|
|
62
|
-
|
|
63
|
-
barOtherText(): string
|
|
64
|
-
barOtherText(v: string): this
|
|
65
|
-
|
|
66
|
-
barTooltipWidth(): number
|
|
67
|
-
barTooltipWidth(v: number): this
|
|
68
|
-
|
|
69
|
-
barTooltipHeight(): number
|
|
70
|
-
barTooltipHeight(v: number): this
|
|
71
|
-
|
|
72
|
-
dorling(): boolean
|
|
73
|
-
dorling(v: boolean): this
|
|
74
|
-
|
|
75
|
-
barTotalCode(): string | undefined
|
|
76
|
-
barTotalCode(v: string | undefined): this
|
|
77
|
-
|
|
78
|
-
statCodes(): string[] | undefined
|
|
79
|
-
statCodes(v: string[] | undefined): this
|
|
80
|
-
|
|
81
|
-
statBar(config: CompositionStatConfig): this
|
|
82
|
-
/** @deprecated Legacy positional signature. Prefer statBar({ categoryParameter, categoryCodes, ... }). */
|
|
83
|
-
statBar(
|
|
84
|
-
/** Config. */
|
|
85
|
-
config: CompositionStatConfig,
|
|
86
|
-
/** Category parameter. */
|
|
87
|
-
categoryParameter?: string,
|
|
88
|
-
/** Category codes. */
|
|
89
|
-
categoryCodes?: string[],
|
|
90
|
-
/** Category labels. */
|
|
91
|
-
categoryLabels?: string[],
|
|
92
|
-
/** Category colors. */
|
|
93
|
-
categoryColors?: string[],
|
|
94
|
-
/** Total code. */
|
|
95
|
-
totalCode?: string
|
|
96
|
-
): this
|
|
97
|
-
}
|
|
1
|
+
import type { MapInstance } from '../../../core/MapInstance'
|
|
2
|
+
import type { CompositionStatConfig } from '../CompositionStatConfig'
|
|
3
|
+
import type { BarChartLegendConfig } from '../../../legend/composition/BarChartLegendConfig'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Bar map type.
|
|
7
|
+
*/
|
|
8
|
+
export interface BarMap extends MapInstance {
|
|
9
|
+
legend(): BarChartLegendConfig | false
|
|
10
|
+
legend(config: BarChartLegendConfig | false): this
|
|
11
|
+
|
|
12
|
+
barType(): 'stacked' | 'grouped'
|
|
13
|
+
barType(v: 'stacked' | 'grouped'): this
|
|
14
|
+
|
|
15
|
+
catColors(): any
|
|
16
|
+
catColors(v: any): this
|
|
17
|
+
|
|
18
|
+
catLabels(): any
|
|
19
|
+
catLabels(v: any): this
|
|
20
|
+
|
|
21
|
+
showOnlyWhenComplete(): boolean
|
|
22
|
+
showOnlyWhenComplete(v: boolean): this
|
|
23
|
+
|
|
24
|
+
noDataFillStyle(): string
|
|
25
|
+
noDataFillStyle(v: string): this
|
|
26
|
+
|
|
27
|
+
barMaxWidth(): number
|
|
28
|
+
barMaxWidth(v: number): this
|
|
29
|
+
|
|
30
|
+
barMinWidth(): number
|
|
31
|
+
barMinWidth(v: number): this
|
|
32
|
+
|
|
33
|
+
barHeight(): number
|
|
34
|
+
barHeight(v: number): this
|
|
35
|
+
|
|
36
|
+
barGroupWidth(): number
|
|
37
|
+
barGroupWidth(v: number): this
|
|
38
|
+
|
|
39
|
+
barSettings(): any
|
|
40
|
+
barSettings(v: any): this
|
|
41
|
+
|
|
42
|
+
barGroupGap(): number
|
|
43
|
+
barGroupGap(v: number): this
|
|
44
|
+
|
|
45
|
+
barGroupMinHeight(): number
|
|
46
|
+
barGroupMinHeight(v: number): this
|
|
47
|
+
|
|
48
|
+
barGroupMaxHeight(): number
|
|
49
|
+
barGroupMaxHeight(v: number): this
|
|
50
|
+
|
|
51
|
+
barStrokeFill(): string
|
|
52
|
+
barStrokeFill(v: string): this
|
|
53
|
+
|
|
54
|
+
barStrokeWidth(): number
|
|
55
|
+
barStrokeWidth(v: number): this
|
|
56
|
+
|
|
57
|
+
barCornerRadius(): number
|
|
58
|
+
barCornerRadius(v: number): this
|
|
59
|
+
|
|
60
|
+
barOtherColor(): string
|
|
61
|
+
barOtherColor(v: string): this
|
|
62
|
+
|
|
63
|
+
barOtherText(): string
|
|
64
|
+
barOtherText(v: string): this
|
|
65
|
+
|
|
66
|
+
barTooltipWidth(): number
|
|
67
|
+
barTooltipWidth(v: number): this
|
|
68
|
+
|
|
69
|
+
barTooltipHeight(): number
|
|
70
|
+
barTooltipHeight(v: number): this
|
|
71
|
+
|
|
72
|
+
dorling(): boolean
|
|
73
|
+
dorling(v: boolean): this
|
|
74
|
+
|
|
75
|
+
barTotalCode(): string | undefined
|
|
76
|
+
barTotalCode(v: string | undefined): this
|
|
77
|
+
|
|
78
|
+
statCodes(): string[] | undefined
|
|
79
|
+
statCodes(v: string[] | undefined): this
|
|
80
|
+
|
|
81
|
+
statBar(config: CompositionStatConfig): this
|
|
82
|
+
/** @deprecated Legacy positional signature. Prefer statBar({ categoryParameter, categoryCodes, ... }). */
|
|
83
|
+
statBar(
|
|
84
|
+
/** Config. */
|
|
85
|
+
config: CompositionStatConfig,
|
|
86
|
+
/** Category parameter. */
|
|
87
|
+
categoryParameter?: string,
|
|
88
|
+
/** Category codes. */
|
|
89
|
+
categoryCodes?: string[],
|
|
90
|
+
/** Category labels. */
|
|
91
|
+
categoryLabels?: string[],
|
|
92
|
+
/** Category colors. */
|
|
93
|
+
categoryColors?: string[],
|
|
94
|
+
/** Total code. */
|
|
95
|
+
totalCode?: string
|
|
96
|
+
): this
|
|
97
|
+
}
|