eurostat-map 4.9.2 → 4.9.3
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/package.json
CHANGED
|
@@ -1,22 +1,64 @@
|
|
|
1
|
-
import type { LegendConfig } from '../LegendConfig'
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Configuration for the ranked bar chart element on choropleth-classified maps: one horizontal
|
|
5
3
|
* bar per region, sorted by value, colored by the region's own class color, labeled with its id
|
|
6
4
|
* and value. Above an internal region-count threshold, falls back automatically to the histogram
|
|
7
5
|
* distribution view instead of drawing one bar per region.
|
|
8
6
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* legend
|
|
12
|
-
* separately from `map.legend(config)`.
|
|
7
|
+
* A standalone element, independent of the legend - not a sub-feature of it, and deliberately not
|
|
8
|
+
* an extension of LegendConfig: it has its own container/positioning and doesn't carry the
|
|
9
|
+
* legend-only concepts (no-data swatch, max/min labels, etc.) that don't apply to it. Set via
|
|
10
|
+
* `map.rankedBarChart(config)`, separately from `map.legend(config)`.
|
|
13
11
|
*/
|
|
14
|
-
export interface RankedBarChartConfig
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
12
|
+
export interface RankedBarChartConfig {
|
|
13
|
+
/** Id of the SVG element to render the chart into. Can be a completely different container/
|
|
14
|
+
* SVG to the legend's. @default an internally-generated id */
|
|
15
|
+
svgId?: string
|
|
16
|
+
/** Chart origin x-coordinate in pixels. */
|
|
17
|
+
x?: number
|
|
18
|
+
/** Chart origin y-coordinate in pixels. */
|
|
19
|
+
y?: number
|
|
20
|
+
/** Automatically position the chart in a map corner. Manual x/y coordinates take precedence. */
|
|
21
|
+
position?: 'top right' | 'bottom right' | 'top left' | 'bottom left'
|
|
22
|
+
/** Approximate box width in pixels, used only as a fallback when auto-positioning in a corner
|
|
23
|
+
* without explicit x/y. @default 150 */
|
|
24
|
+
width?: number
|
|
25
|
+
/** Maximum total height in pixels for the rendered chart (title/subtitle + bars). When the
|
|
26
|
+
* natural height of all bars would exceed this, bar height and label font size are both
|
|
27
|
+
* scaled down proportionally so the chart never grows taller than this budget. Omit to let
|
|
28
|
+
* the chart grow to fit its content - its natural height with ~35 EU/EFTA/CC regions can
|
|
29
|
+
* easily exceed a map's own height. */
|
|
30
|
+
height?: number
|
|
31
|
+
|
|
32
|
+
/** Chart title text. */
|
|
33
|
+
title?: string
|
|
34
|
+
/** Chart subtitle text. */
|
|
35
|
+
subtitle?: string
|
|
36
|
+
|
|
37
|
+
/** Inner spacing around the chart content in pixels. @default 7 */
|
|
38
|
+
boxPadding?: number
|
|
39
|
+
/** Background opacity of the chart's box. @default 0.9 */
|
|
40
|
+
boxOpacity?: number
|
|
41
|
+
/** Apply the chart box's background opacity (boxOpacity) only while the map is currently
|
|
42
|
+
* zoomed in (scale != 1). Purely a box-opacity concern - does not affect hover interactions
|
|
43
|
+
* (e.g. hover-to-highlight), which always work regardless of zoom state. */
|
|
44
|
+
onlyApplyOpacityWhileZoomed?: boolean
|
|
45
|
+
|
|
46
|
+
/** Bar height in pixels, before any height-based scaling (see height). @default 20 */
|
|
47
|
+
shapeHeight?: number
|
|
48
|
+
/** Label font size in pixels, before any height-based scaling (see height).
|
|
49
|
+
* @default read from the .em-legend-label CSS class */
|
|
50
|
+
labelFontSize?: number
|
|
51
|
+
/** Custom formatter for each region's value label. */
|
|
52
|
+
labelFormatter?: ((value: number, index?: number) => string) | null
|
|
53
|
+
/** Number of decimal places for auto-formatted value labels. Auto-detected when undefined. */
|
|
54
|
+
decimals?: number
|
|
55
|
+
|
|
56
|
+
/** Sort bars in ascending order of value when true, descending when false. @default true */
|
|
57
|
+
ascending?: boolean
|
|
58
|
+
|
|
59
|
+
/** Limit which regions appear to a political grouping: EU member states, EU + EFTA, or
|
|
17
60
|
* EU + EFTA + EU candidate countries. Applied before the region-count threshold that
|
|
18
61
|
* triggers the histogram distribution fallback. Omit (default) to show every region with
|
|
19
|
-
* a value, unfiltered.
|
|
20
|
-
*/
|
|
62
|
+
* a value, unfiltered. */
|
|
21
63
|
countryGroup?: 'eu' | 'euEfta' | 'euEftaCc'
|
|
22
64
|
}
|
package/package.json
CHANGED