eurostat-map 4.8.5 → 4.9.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/README.md +5 -3
- package/build/215.eurostatmap.min.js +1 -1
- package/build/eurostatmap.js +1460 -980
- 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/MapConfig.d.ts +8 -0
- package/build/types/core/MapInstance.d.ts +15 -0
- package/build/types/index.d.ts +1 -0
- package/build/types/legend/LegendConfig.d.ts +1 -1
- package/build/types/legend/choropleth/RankedBarChartConfig.d.ts +22 -0
- package/package.json +1 -1
package/build/package.json
CHANGED
|
@@ -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. */
|
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'
|
|
@@ -25,7 +25,7 @@ export interface LegendConfig {
|
|
|
25
25
|
boxPadding?: number
|
|
26
26
|
/** Background opacity of the legend box. */
|
|
27
27
|
boxOpacity?: number
|
|
28
|
-
/** Apply legend
|
|
28
|
+
/** Apply the legend box's background opacity (boxOpacity) only while the map is currently zoomed in (scale != 1). The legend box is transparent at the initial view and returns to its configured opacity while zoomed. Purely a box-opacity concern - does not affect legend hover interactions (e.g. hover-to-highlight), which always work regardless of zoom state. */
|
|
29
29
|
onlyApplyOpacityWhileZoomed?: boolean
|
|
30
30
|
/** Padding between the title block and legend body. */
|
|
31
31
|
titlePadding?: number
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { LegendConfig } from '../LegendConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the ranked bar chart element on choropleth-classified maps: one horizontal
|
|
5
|
+
* bar per region, sorted by value, colored by the region's own class color, labeled with its id
|
|
6
|
+
* and value. Above an internal region-count threshold, falls back automatically to the histogram
|
|
7
|
+
* distribution view instead of drawing one bar per region.
|
|
8
|
+
*
|
|
9
|
+
* Independent of the legend - has its own positioning (inherited from LegendConfig's x/y/
|
|
10
|
+
* position/width fields) and can render into an entirely different container/SVG to the
|
|
11
|
+
* legend's, rather than being a sub-feature of it. Set via `map.rankedBarChart(config)`,
|
|
12
|
+
* separately from `map.legend(config)`.
|
|
13
|
+
*/
|
|
14
|
+
export interface RankedBarChartConfig extends LegendConfig {
|
|
15
|
+
/**
|
|
16
|
+
* Limit which regions appear to a political grouping: EU member states, EU + EFTA, or
|
|
17
|
+
* EU + EFTA + EU candidate countries. Applied before the region-count threshold that
|
|
18
|
+
* triggers the histogram distribution fallback. Omit (default) to show every region with
|
|
19
|
+
* a value, unfiltered.
|
|
20
|
+
*/
|
|
21
|
+
countryGroup?: 'eu' | 'euEfta' | 'euEftaCc'
|
|
22
|
+
}
|
package/package.json
CHANGED