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,68 @@
|
|
|
1
|
+
import { LegendConfig } from './LegendConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for size legend in pie chart maps.
|
|
5
|
+
*/
|
|
6
|
+
export interface PieChartSizeLegendConfig {
|
|
7
|
+
/** Title for the size legend. */
|
|
8
|
+
title?: string | null
|
|
9
|
+
|
|
10
|
+
/** Padding between title and legend content in pixels. @default 10 */
|
|
11
|
+
titlePadding?: number
|
|
12
|
+
|
|
13
|
+
/** Custom values to display in the size legend. If not specified, values are auto-generated. */
|
|
14
|
+
values?: number[] | null
|
|
15
|
+
|
|
16
|
+
/** Custom formatter function for legend labels. */
|
|
17
|
+
labelFormatter?: ((value: number) => string) | undefined
|
|
18
|
+
|
|
19
|
+
/** Whether to show a "no data" item. @default false */
|
|
20
|
+
noData?: boolean
|
|
21
|
+
|
|
22
|
+
/** Text label for "no data" item. @default 'No data' */
|
|
23
|
+
noDataText?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Configuration for color legend in pie chart maps.
|
|
28
|
+
*/
|
|
29
|
+
export interface PieChartColorLegendConfig {
|
|
30
|
+
/** Title for the color legend. */
|
|
31
|
+
title?: string | null
|
|
32
|
+
|
|
33
|
+
/** Padding between title and legend content in pixels. @default 10 */
|
|
34
|
+
titlePadding?: number
|
|
35
|
+
|
|
36
|
+
/** Top margin (distance from size legend) in pixels. @default 33 */
|
|
37
|
+
marginTop?: number
|
|
38
|
+
|
|
39
|
+
/** Offset adjustments for labels. @default { x: 5, y: 5 } */
|
|
40
|
+
labelOffsets?: { x: number; y: number }
|
|
41
|
+
|
|
42
|
+
/** Width of color swatches in pixels. @default 25 */
|
|
43
|
+
shapeWidth?: number
|
|
44
|
+
|
|
45
|
+
/** Height of color swatches in pixels. @default 20 */
|
|
46
|
+
shapeHeight?: number
|
|
47
|
+
|
|
48
|
+
/** Padding between swatches in pixels. @default 1 */
|
|
49
|
+
shapePadding?: number
|
|
50
|
+
|
|
51
|
+
/** Whether to show a "no data" item. @default true */
|
|
52
|
+
noData?: boolean
|
|
53
|
+
|
|
54
|
+
/** Text label for "no data" item. @default 'No data' */
|
|
55
|
+
noDataText?: string
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Configuration for pie chart map legends.
|
|
60
|
+
* Supports separate legends for pie size and slice colors.
|
|
61
|
+
*/
|
|
62
|
+
export interface PieChartLegendConfig extends LegendConfig {
|
|
63
|
+
/** Configuration for the pie size legend. Set to false to hide. */
|
|
64
|
+
sizeLegend?: Partial<PieChartSizeLegendConfig> | false
|
|
65
|
+
|
|
66
|
+
/** Configuration for the color/category legend. Set to false to hide. */
|
|
67
|
+
colorLegend?: Partial<PieChartColorLegendConfig> | false
|
|
68
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LegendConfig } from './LegendConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for stripe composition map legends.
|
|
5
|
+
* Used to display a legend with colored rectangles representing different categories
|
|
6
|
+
* in stripe composition maps (regions divided into colored stripes showing composition).
|
|
7
|
+
*/
|
|
8
|
+
export interface StripeCompositionLegendConfig extends LegendConfig {
|
|
9
|
+
// Inherits all properties from LegendConfig
|
|
10
|
+
// No additional specific properties beyond the base legend configuration
|
|
11
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { LegendConfig } from './LegendConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for size legend in waffle chart maps.
|
|
5
|
+
*/
|
|
6
|
+
export interface WaffleSizeLegendConfig {
|
|
7
|
+
/** Title for the size legend. */
|
|
8
|
+
title?: string | null
|
|
9
|
+
|
|
10
|
+
/** Padding between title and legend content in pixels. @default 10 */
|
|
11
|
+
titlePadding?: number
|
|
12
|
+
|
|
13
|
+
/** Custom values to display in the size legend. If not specified, values are auto-generated. */
|
|
14
|
+
values?: number[] | null
|
|
15
|
+
|
|
16
|
+
/** Custom formatter function for legend labels. */
|
|
17
|
+
labelFormatter?: ((value: number) => string) | undefined
|
|
18
|
+
|
|
19
|
+
/** Simplified grid size for size legend examples (e.g., 5 means 5x5 = 25 cells). @default 5 */
|
|
20
|
+
gridSize?: number
|
|
21
|
+
|
|
22
|
+
/** Padding between cells in size legend in pixels. @default 0.5 */
|
|
23
|
+
cellPadding?: number
|
|
24
|
+
|
|
25
|
+
/** Whether to show a "no data" item. @default false */
|
|
26
|
+
noData?: boolean
|
|
27
|
+
|
|
28
|
+
/** Text label for "no data" item. @default 'No data' */
|
|
29
|
+
noDataText?: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Configuration for color legend in waffle chart maps.
|
|
34
|
+
*/
|
|
35
|
+
export interface WaffleColorLegendConfig {
|
|
36
|
+
/** Title for the color legend. */
|
|
37
|
+
title?: string | null
|
|
38
|
+
|
|
39
|
+
/** Padding between title and legend content in pixels. @default 10 */
|
|
40
|
+
titlePadding?: number
|
|
41
|
+
|
|
42
|
+
/** Top margin (distance from size legend) in pixels. @default 33 */
|
|
43
|
+
marginTop?: number
|
|
44
|
+
|
|
45
|
+
/** Offset adjustments for labels. @default { x: 5, y: 5 } */
|
|
46
|
+
labelOffsets?: { x: number; y: number }
|
|
47
|
+
|
|
48
|
+
/** Width of color swatches in pixels. @default 25 */
|
|
49
|
+
shapeWidth?: number
|
|
50
|
+
|
|
51
|
+
/** Height of color swatches in pixels. @default 20 */
|
|
52
|
+
shapeHeight?: number
|
|
53
|
+
|
|
54
|
+
/** Padding between swatches in pixels. @default 1 */
|
|
55
|
+
shapePadding?: number
|
|
56
|
+
|
|
57
|
+
/** Whether to show a "no data" item. @default true */
|
|
58
|
+
noData?: boolean
|
|
59
|
+
|
|
60
|
+
/** Text label for "no data" item. @default 'No data' */
|
|
61
|
+
noDataText?: string
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Configuration for waffle chart map legends.
|
|
66
|
+
* Waffle charts display data as grids of small squares, with colors representing categories.
|
|
67
|
+
*/
|
|
68
|
+
export interface WaffleLegendConfig extends LegendConfig {
|
|
69
|
+
/** Configuration for the waffle size legend. */
|
|
70
|
+
sizeLegend?: Partial<WaffleSizeLegendConfig>
|
|
71
|
+
|
|
72
|
+
/** Configuration for the color/category legend. Set to false to hide. */
|
|
73
|
+
colorLegend?: Partial<WaffleColorLegendConfig> | false
|
|
74
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { LegendConfig } from '../LegendConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for bivariate choropleth map legends.
|
|
5
|
+
* Displays a 2D grid showing the relationship between two variables,
|
|
6
|
+
* with color squares representing different class combinations.
|
|
7
|
+
*/
|
|
8
|
+
export interface BivariateLegendConfig extends LegendConfig {
|
|
9
|
+
/** Size of the legend square grid in pixels. @default 100 */
|
|
10
|
+
squareSize?: number
|
|
11
|
+
|
|
12
|
+
/** Rotation angle of the legend in degrees. @default 0 */
|
|
13
|
+
rotation?: number
|
|
14
|
+
|
|
15
|
+
/** Label for the first variable (y-axis). @default 'Variable 1' */
|
|
16
|
+
label1?: string
|
|
17
|
+
|
|
18
|
+
/** Label for the second variable (x-axis). @default 'Variable 2' */
|
|
19
|
+
label2?: string
|
|
20
|
+
|
|
21
|
+
/** Break points for the first variable. Auto-calculated if undefined. */
|
|
22
|
+
breaks1?: number[]
|
|
23
|
+
|
|
24
|
+
/** Break points for the second variable. Auto-calculated if undefined. */
|
|
25
|
+
breaks2?: number[]
|
|
26
|
+
|
|
27
|
+
/** Whether to show break labels on the axes. @default false */
|
|
28
|
+
showBreaks?: boolean
|
|
29
|
+
|
|
30
|
+
/** Length of axis tick marks in pixels. @default 5 */
|
|
31
|
+
tickLength?: number
|
|
32
|
+
|
|
33
|
+
/** Offset adjustments for y-axis labels. @default { x: 0, y: 0 } */
|
|
34
|
+
yAxisLabelsOffset?: { x: number; y: number }
|
|
35
|
+
|
|
36
|
+
/** Offset adjustments for x-axis labels. @default { x: 0, y: 0 } */
|
|
37
|
+
xAxisLabelsOffset?: { x: number; y: number }
|
|
38
|
+
|
|
39
|
+
/** Offset adjustments for y-axis title. @default { x: 0, y: 0 } */
|
|
40
|
+
yAxisTitleOffset?: { x: number; y: number }
|
|
41
|
+
|
|
42
|
+
/** Offset adjustments for x-axis title. @default { x: 0, y: 0 } */
|
|
43
|
+
xAxisTitleOffset?: { x: number; y: number }
|
|
44
|
+
|
|
45
|
+
/** Extra vertical offset for the "no data" legend item in pixels. @default 30 */
|
|
46
|
+
noDataYOffset?: number
|
|
47
|
+
|
|
48
|
+
/** Whether to show arrows at the end of the axes. @default true */
|
|
49
|
+
axisArrows?: boolean
|
|
50
|
+
|
|
51
|
+
/** Height of axis arrows in pixels. @default 15 */
|
|
52
|
+
arrowHeight?: number
|
|
53
|
+
|
|
54
|
+
/** Width of axis arrows in pixels. @default 14 */
|
|
55
|
+
arrowWidth?: number
|
|
56
|
+
|
|
57
|
+
/** Padding between arrow and axis label in pixels. @default 10 */
|
|
58
|
+
arrowPadding?: number
|
|
59
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for histogram display in choropleth legends.
|
|
3
|
+
* Shows the distribution of data values across classification bins as bars.
|
|
4
|
+
*/
|
|
5
|
+
export interface HistogramLegendConfig {
|
|
6
|
+
/** Orientation of the histogram bars. @default 'horizontal' */
|
|
7
|
+
orientation?: 'horizontal' | 'vertical'
|
|
8
|
+
|
|
9
|
+
/** Whether to show count values on the bars. @default false */
|
|
10
|
+
showCounts?: boolean
|
|
11
|
+
|
|
12
|
+
/** Whether to show percentage values on the bars. @default false */
|
|
13
|
+
showPercentages?: boolean
|
|
14
|
+
|
|
15
|
+
/** Rotation angle for axis labels in degrees. @default 0 */
|
|
16
|
+
labelRotation?: number
|
|
17
|
+
|
|
18
|
+
/** Margins around the histogram. @default { top: 0, right: 0, bottom: 0, left: 0 } */
|
|
19
|
+
margin?: { top: number; right: number; bottom: number; left: number }
|
|
20
|
+
|
|
21
|
+
/** Height of the histogram in pixels. @default 200 */
|
|
22
|
+
height?: number
|
|
23
|
+
|
|
24
|
+
/** Width of the histogram in pixels. @default 270 */
|
|
25
|
+
width?: number
|
|
26
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface TrivariateLegendConfig {
|
|
2
|
+
/** Width of the legend in pixels. @default 160 */
|
|
3
|
+
width?: number
|
|
4
|
+
/** Height of the legend in pixels. @default 160 */
|
|
5
|
+
height?: number
|
|
6
|
+
/** Padding around the ternary plot. @default { top: 50, right: 50, bottom: 10, left: 50 } */
|
|
7
|
+
padding?: { top: number; right: number; bottom: number; left: number }
|
|
8
|
+
/** Plot type. @default 'continuous' */
|
|
9
|
+
type?: 'continuous' | 'discrete'
|
|
10
|
+
/** Whether to show the center point and guide lines. @default true */
|
|
11
|
+
showCenter?: boolean
|
|
12
|
+
/** Label for the center annotation. @default 'Average' */
|
|
13
|
+
centerLabel?: string
|
|
14
|
+
/** Whether to show grid lines. @default false */
|
|
15
|
+
showLines?: boolean
|
|
16
|
+
/** Number of minor grid subdivisions between major grid lines. @default 5 */
|
|
17
|
+
minorSubdivisions?: number
|
|
18
|
+
/** Axis corner labels. @default ['Variable 1', 'Variable 2', 'Variable 3'] */
|
|
19
|
+
labels?: [string, string, string]
|
|
20
|
+
/** Position of axis labels. @default 'edge' */
|
|
21
|
+
labelPosition?: 'corner' | 'edge'
|
|
22
|
+
/** Whether colour is applied to triangles or data points. @default 'points' */
|
|
23
|
+
colorTarget?: 'triangles' | 'points'
|
|
24
|
+
/** Whether to render data points. @default true */
|
|
25
|
+
showData?: boolean
|
|
26
|
+
/** Offsets for the center annotation label and curve. */
|
|
27
|
+
centerAnnotationOffsets?: { labelX: number; labelY: number; curveX: number; curveY: number }
|
|
28
|
+
/** Legend title. */
|
|
29
|
+
title?: string
|
|
30
|
+
/** Legend subtitle. */
|
|
31
|
+
subtitle?: string
|
|
32
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { LegendConfig } from '../LegendConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for size legend in bar chart maps.
|
|
5
|
+
*/
|
|
6
|
+
export interface BarChartSizeLegendConfig {
|
|
7
|
+
/** Title for the size legend. */
|
|
8
|
+
title?: string | null
|
|
9
|
+
|
|
10
|
+
/** Padding between title and legend content in pixels. @default 10 */
|
|
11
|
+
titlePadding?: number
|
|
12
|
+
|
|
13
|
+
/** Custom values to display in the size legend. If null, auto-generates [min, mid, max]. */
|
|
14
|
+
values?: number[] | null
|
|
15
|
+
|
|
16
|
+
/** Custom formatter function for legend labels. */
|
|
17
|
+
labelFormatter?: ((value: number) => string) | undefined
|
|
18
|
+
|
|
19
|
+
/** Whether to show a "no data" item. @default false */
|
|
20
|
+
noData?: boolean
|
|
21
|
+
|
|
22
|
+
/** Text label for "no data" item. @default 'No data' */
|
|
23
|
+
noDataText?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Configuration for color legend in bar chart maps.
|
|
28
|
+
*/
|
|
29
|
+
export interface BarChartColorLegendConfig {
|
|
30
|
+
/** Title for the color legend. */
|
|
31
|
+
title?: string | null
|
|
32
|
+
|
|
33
|
+
/** Padding between title and legend content in pixels. @default 10 */
|
|
34
|
+
titlePadding?: number
|
|
35
|
+
|
|
36
|
+
/** Top margin (distance from size legend) in pixels. @default 20 */
|
|
37
|
+
marginTop?: number
|
|
38
|
+
|
|
39
|
+
/** Offset adjustments for labels. @default { x: 5, y: 5 } */
|
|
40
|
+
labelOffsets?: { x: number; y: number }
|
|
41
|
+
|
|
42
|
+
/** Width of color swatches in pixels. @default 25 */
|
|
43
|
+
shapeWidth?: number
|
|
44
|
+
|
|
45
|
+
/** Height of color swatches in pixels. @default 20 */
|
|
46
|
+
shapeHeight?: number
|
|
47
|
+
|
|
48
|
+
/** Padding between swatches in pixels. @default 1 */
|
|
49
|
+
shapePadding?: number
|
|
50
|
+
|
|
51
|
+
/** Whether to show a "no data" item. @default true */
|
|
52
|
+
noData?: boolean
|
|
53
|
+
|
|
54
|
+
/** Text label for "no data" item. @default 'No data' */
|
|
55
|
+
noDataText?: string
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Configuration for bar chart map legends.
|
|
60
|
+
* Adapts automatically to the map's barType ('stacked' or 'grouped').
|
|
61
|
+
*/
|
|
62
|
+
export interface BarChartLegendConfig extends LegendConfig {
|
|
63
|
+
/** Configuration for the bar size legend. Set to false to hide. */
|
|
64
|
+
sizeLegend?: Partial<BarChartSizeLegendConfig> | false
|
|
65
|
+
|
|
66
|
+
/** Configuration for the color/category legend. Set to false to hide. */
|
|
67
|
+
colorLegend?: Partial<BarChartColorLegendConfig> | false
|
|
68
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { LegendConfig } from '../LegendConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for size legend in coxcomb (polar area) charts.
|
|
5
|
+
*/
|
|
6
|
+
export interface CoxcombSizeLegendConfig {
|
|
7
|
+
/** Title for the size legend. */
|
|
8
|
+
title?: string | null
|
|
9
|
+
|
|
10
|
+
/** Padding between title and legend content in pixels. @default 15 */
|
|
11
|
+
titlePadding?: number
|
|
12
|
+
|
|
13
|
+
/** Custom values to display in the size legend. If not specified, values are auto-generated. */
|
|
14
|
+
values?: number[] | null
|
|
15
|
+
|
|
16
|
+
/** Custom labels for the size legend values. */
|
|
17
|
+
labels?: string[] | null
|
|
18
|
+
|
|
19
|
+
/** Custom formatter function for legend labels. */
|
|
20
|
+
labelFormatter?: ((value: number) => string) | null
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Configuration for color legend in coxcomb (polar area) charts.
|
|
25
|
+
*/
|
|
26
|
+
export interface CoxcombColorLegendConfig {
|
|
27
|
+
/** Title for the color legend. */
|
|
28
|
+
title?: string | null
|
|
29
|
+
|
|
30
|
+
/** Padding between title and legend content in pixels. @default 15 */
|
|
31
|
+
titlePadding?: number
|
|
32
|
+
|
|
33
|
+
/** Top margin for the color legend in pixels. @default 23 */
|
|
34
|
+
marginTop?: number
|
|
35
|
+
|
|
36
|
+
/** Offset adjustments for labels. @default { x: 5, y: 5 } */
|
|
37
|
+
labelOffsets?: { x: number; y: number }
|
|
38
|
+
|
|
39
|
+
/** Width of color swatches in pixels. @default 25 */
|
|
40
|
+
shapeWidth?: number
|
|
41
|
+
|
|
42
|
+
/** Height of color swatches in pixels. @default 20 */
|
|
43
|
+
shapeHeight?: number
|
|
44
|
+
|
|
45
|
+
/** Padding between swatches in pixels. @default 1 */
|
|
46
|
+
shapePadding?: number
|
|
47
|
+
|
|
48
|
+
/** Whether to show a "no data" item. @default true */
|
|
49
|
+
noData?: boolean
|
|
50
|
+
|
|
51
|
+
/** Text label for "no data" item. @default 'No data' */
|
|
52
|
+
noDataText?: string
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Configuration for time legend in coxcomb (polar area) charts.
|
|
57
|
+
*/
|
|
58
|
+
export interface CoxcombTimeLegendConfig {
|
|
59
|
+
/** Title for the time legend. */
|
|
60
|
+
title?: string | null
|
|
61
|
+
|
|
62
|
+
/** Padding between title and legend content in pixels. @default 15 */
|
|
63
|
+
titlePadding?: number
|
|
64
|
+
|
|
65
|
+
/** Top margin for the time legend in pixels. @default 20 */
|
|
66
|
+
marginTop?: number
|
|
67
|
+
|
|
68
|
+
/** Radius of the time legend circle in pixels. @default 35 */
|
|
69
|
+
radius?: number
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Configuration for coxcomb (polar area) chart legends.
|
|
74
|
+
* Supports separate sub-legends for size, color, and time dimensions.
|
|
75
|
+
*/
|
|
76
|
+
export interface CoxcombLegendConfig extends LegendConfig {
|
|
77
|
+
/** Configuration for the wedge size legend. */
|
|
78
|
+
sizeLegend?: Partial<CoxcombSizeLegendConfig>
|
|
79
|
+
|
|
80
|
+
/** Configuration for the color/category legend. */
|
|
81
|
+
colorLegend?: Partial<CoxcombColorLegendConfig>
|
|
82
|
+
|
|
83
|
+
/** Configuration for the time period legend. */
|
|
84
|
+
timeLegend?: Partial<CoxcombTimeLegendConfig>
|
|
85
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { LegendConfig } from '../LegendConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for size legend in pie chart maps.
|
|
5
|
+
*/
|
|
6
|
+
export interface PieChartSizeLegendConfig {
|
|
7
|
+
/** Title for the size legend. */
|
|
8
|
+
title?: string | null
|
|
9
|
+
|
|
10
|
+
/** Padding between title and legend content in pixels. @default 10 */
|
|
11
|
+
titlePadding?: number
|
|
12
|
+
|
|
13
|
+
/** Custom values to display in the size legend. If not specified, values are auto-generated. */
|
|
14
|
+
values?: number[] | null
|
|
15
|
+
|
|
16
|
+
/** Custom formatter function for legend labels. */
|
|
17
|
+
labelFormatter?: ((value: number) => string) | undefined
|
|
18
|
+
|
|
19
|
+
/** Whether to show a "no data" item. @default false */
|
|
20
|
+
noData?: boolean
|
|
21
|
+
|
|
22
|
+
/** Text label for "no data" item. @default 'No data' */
|
|
23
|
+
noDataText?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Configuration for color legend in pie chart maps.
|
|
28
|
+
*/
|
|
29
|
+
export interface PieChartColorLegendConfig {
|
|
30
|
+
/** Title for the color legend. */
|
|
31
|
+
title?: string | null
|
|
32
|
+
|
|
33
|
+
/** Padding between title and legend content in pixels. @default 10 */
|
|
34
|
+
titlePadding?: number
|
|
35
|
+
|
|
36
|
+
/** Top margin (distance from size legend) in pixels. @default 33 */
|
|
37
|
+
marginTop?: number
|
|
38
|
+
|
|
39
|
+
/** Offset adjustments for labels. @default { x: 5, y: 5 } */
|
|
40
|
+
labelOffsets?: { x: number; y: number }
|
|
41
|
+
|
|
42
|
+
/** Width of color swatches in pixels. @default 25 */
|
|
43
|
+
shapeWidth?: number
|
|
44
|
+
|
|
45
|
+
/** Height of color swatches in pixels. @default 20 */
|
|
46
|
+
shapeHeight?: number
|
|
47
|
+
|
|
48
|
+
/** Padding between swatches in pixels. @default 1 */
|
|
49
|
+
shapePadding?: number
|
|
50
|
+
|
|
51
|
+
/** Whether to show a "no data" item. @default true */
|
|
52
|
+
noData?: boolean
|
|
53
|
+
|
|
54
|
+
/** Text label for "no data" item. @default 'No data' */
|
|
55
|
+
noDataText?: string
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Configuration for pie chart map legends.
|
|
60
|
+
* Supports separate legends for pie size and slice colors.
|
|
61
|
+
*/
|
|
62
|
+
export interface PieChartLegendConfig extends LegendConfig {
|
|
63
|
+
/** Configuration for the pie size legend. Set to false to hide. */
|
|
64
|
+
sizeLegend?: Partial<PieChartSizeLegendConfig> | false
|
|
65
|
+
|
|
66
|
+
/** Configuration for the color/category legend. Set to false to hide. */
|
|
67
|
+
colorLegend?: Partial<PieChartColorLegendConfig> | false
|
|
68
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { LegendConfig } from '../LegendConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for scale legend in sparkline maps.
|
|
5
|
+
*/
|
|
6
|
+
export interface SparklineScaleLegendConfig {
|
|
7
|
+
/** Title for the scale legend section. */
|
|
8
|
+
title?: string | null
|
|
9
|
+
|
|
10
|
+
/** Padding between title and chart in pixels. @default 5 */
|
|
11
|
+
titlePadding?: number
|
|
12
|
+
|
|
13
|
+
/** Whether to show an example sparkline with averaged data. @default false */
|
|
14
|
+
showExampleChart?: boolean
|
|
15
|
+
|
|
16
|
+
/** Whether to show the region with maximum value. @default true */
|
|
17
|
+
showMaxRegion?: boolean
|
|
18
|
+
|
|
19
|
+
/** Custom example data for the sparkline. If null, uses averaged data. */
|
|
20
|
+
exampleData?: number[] | null
|
|
21
|
+
|
|
22
|
+
/** Number of ticks on Y axis. @default 5 */
|
|
23
|
+
tickCount?: number
|
|
24
|
+
|
|
25
|
+
/** Custom tick format function for Y axis values. */
|
|
26
|
+
tickFormat?: ((value: number) => string) | null
|
|
27
|
+
|
|
28
|
+
/** Whether to show X axis with date labels. @default true */
|
|
29
|
+
showXAxis?: boolean
|
|
30
|
+
|
|
31
|
+
/** Rotation angle for X axis labels in degrees. @default -45 */
|
|
32
|
+
xAxisRotation?: number
|
|
33
|
+
|
|
34
|
+
/** Step for showing X axis ticks (1 = every tick, 2 = every other, etc.). @default 1 */
|
|
35
|
+
xAxisTickStep?: number
|
|
36
|
+
|
|
37
|
+
/** Margins around the sparkline cell. Defaults to match the map's sparkline chart margin. */
|
|
38
|
+
margin?: { top: number; right: number; bottom: number; left: number }
|
|
39
|
+
|
|
40
|
+
/** Opacity of the sparkline. @default 0.5 */
|
|
41
|
+
lineOpacity?: number
|
|
42
|
+
|
|
43
|
+
/** Stroke width of the sparkline. @default 1 */
|
|
44
|
+
lineStrokeWidth?: number
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Configuration for sparkline color legend (explains sparkLineColor/sparkAreaColor rules).
|
|
49
|
+
*/
|
|
50
|
+
export interface SparklineColorLegendConfig {
|
|
51
|
+
/** Show. */
|
|
52
|
+
show?: boolean
|
|
53
|
+
/** Title. */
|
|
54
|
+
title?: string | null
|
|
55
|
+
/** Title padding. */
|
|
56
|
+
titlePadding?: number
|
|
57
|
+
/** Margin top. */
|
|
58
|
+
marginTop?: number
|
|
59
|
+
/** Item gap. */
|
|
60
|
+
itemGap?: number
|
|
61
|
+
/** Swatch width. */
|
|
62
|
+
swatchWidth?: number
|
|
63
|
+
/** Swatch height. */
|
|
64
|
+
swatchHeight?: number
|
|
65
|
+
/** Label offset x. */
|
|
66
|
+
labelOffsetX?: number
|
|
67
|
+
/** Items. */
|
|
68
|
+
items?: Array<{ color: string; label: string }>
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Configuration for no data legend in sparkline maps.
|
|
73
|
+
*/
|
|
74
|
+
export interface SparklineNoDataLegendConfig {
|
|
75
|
+
/** Whether to show the no data legend item. @default true */
|
|
76
|
+
show?: boolean
|
|
77
|
+
|
|
78
|
+
/** Text label for "no data" item. @default 'No data' */
|
|
79
|
+
text?: string
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Configuration for sparkline map legends.
|
|
84
|
+
*/
|
|
85
|
+
export interface SparklineLegendConfig extends LegendConfig {
|
|
86
|
+
/** Configuration for the scale legend showing Y-axis range. */
|
|
87
|
+
scaleLegend?: Partial<SparklineScaleLegendConfig>
|
|
88
|
+
|
|
89
|
+
/** Optional categorical color legend for spark colors. */
|
|
90
|
+
colorLegend?: Partial<SparklineColorLegendConfig> | false
|
|
91
|
+
|
|
92
|
+
/** Configuration for the no data legend. Set to false to hide. */
|
|
93
|
+
noDataLegend?: Partial<SparklineNoDataLegendConfig> | false
|
|
94
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LegendConfig } from '../LegendConfig'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for stripe composition map legends.
|
|
5
|
+
* Used to display a legend with colored rectangles representing different categories
|
|
6
|
+
* in stripe composition maps (regions divided into colored stripes showing composition).
|
|
7
|
+
*/
|
|
8
|
+
export interface StripeCompositionLegendConfig extends LegendConfig {
|
|
9
|
+
// Inherits all properties from LegendConfig
|
|
10
|
+
// No additional specific properties beyond the base legend configuration
|
|
11
|
+
}
|