eurostat-map 4.8.2 → 4.8.5

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.
@@ -1,135 +1,126 @@
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 (x-axis). Supports `\\n` and `<br>` line breaks. @default 'Variable 1' */
16
- label1?: string
17
-
18
- /** Label for the second variable (y-axis). Supports `\\n` and `<br>` line breaks. @default 'Variable 2' */
19
- label2?: string
20
-
21
- /** Break labels for the first variable. Omit to hide first-axis break labels. */
22
- breaks1?: Array<number | string>
23
-
24
- /** Break labels for the second variable. Omit to hide second-axis break labels. */
25
- breaks2?: Array<number | string>
26
-
27
- /** Length of axis tick marks in pixels. @default 5 */
28
- tickLength?: number
29
-
30
- /** Offset adjustments for y-axis labels. @default { x: 0, y: 0 } */
31
- yAxisLabelsOffset?: { x: number; y: number }
32
-
33
- /** Offset adjustments for x-axis labels. @default { x: 0, y: 0 } */
34
- xAxisLabelsOffset?: { x: number; y: number }
35
-
36
- /** Offset adjustments for y-axis title. @default { x: 0, y: 0 } */
37
- yAxisTitleOffset?: { x: number; y: number }
38
-
39
- /** Offset adjustments for x-axis title. @default { x: 0, y: 0 } */
40
- xAxisTitleOffset?: { x: number; y: number }
41
-
42
- /** Extra vertical offset for the "no data" legend item in pixels. @default 30 */
43
- noDataYOffset?: number
44
-
45
- /** Whether to show arrows at the end of both axes, or for each axis independently. @default true */
46
- axisArrows?: boolean | { x?: boolean; y?: boolean }
47
-
48
- /** Height of axis arrows in pixels. @default 15 */
49
- arrowHeight?: number
50
-
51
- /** Width of axis arrows in pixels. @default 14 */
52
- arrowWidth?: number
53
-
54
- /** Padding between arrow and axis label in pixels. @default 10 */
55
- arrowPadding?: number
56
-
57
- /**
58
- * Labels displayed at low/high ends of each axis.
59
- * @default { x: { low: 'Low', high: 'High' }, y: { low: 'Low', high: 'High' } }
60
- */
61
- axisExtremes?: {
62
- x?: { low?: string; high?: string }
63
- y?: { low?: string; high?: string }
64
- }
65
-
66
- /** Whether to show low/high endpoint labels on both axes, or for each axis independently. @default true */
67
- showAxisExtremes?: boolean | { x?: boolean; y?: boolean }
68
-
69
- /**
70
- * Optional text annotations for each corner of the bivariate square.
71
- * Add text for any combination of topRight, bottomRight, bottomLeft, topLeft.
72
- * Supports line breaks using '<br>'/'<br/>' or '\\n'.
73
- */
74
- annotations?: {
75
- topRight?: string
76
- bottomRight?: string
77
- bottomLeft?: string
78
- topLeft?: string
79
- }
80
-
81
- /**
82
- * Length of corner annotation callout lines in pixels.
83
- * Can be a single number for all corners, or per-corner values.
84
- * @default 18
85
- */
86
- annotationLineLength?:
87
- | number
88
- | {
89
- topRight?: number
90
- bottomRight?: number
91
- bottomLeft?: number
92
- topLeft?: number
93
- }
94
-
95
- /**
96
- * Annotation text offsets in pixels.
97
- * Use global `{ x, y }` or per-corner values.
98
- * @default auto (based on corner direction)
99
- */
100
- annotationOffsets?:
101
- | { x?: number; y?: number }
102
- | {
103
- topRight?: { x?: number; y?: number }
104
- bottomRight?: { x?: number; y?: number }
105
- bottomLeft?: { x?: number; y?: number }
106
- topLeft?: { x?: number; y?: number }
107
- }
108
-
109
- /**
110
- * Extra offset applied to the leader-line endpoint where it meets the annotation label.
111
- * Use global `{ x, y }` or per-corner values.
112
- * @default { x: 0, y: 0 }
113
- */
114
- annotationLineEndOffset?:
115
- | { x?: number; y?: number }
116
- | {
117
- topRight?: { x?: number; y?: number }
118
- bottomRight?: { x?: number; y?: number }
119
- bottomLeft?: { x?: number; y?: number }
120
- topLeft?: { x?: number; y?: number }
121
- }
122
-
123
- /**
124
- * @deprecated Use annotationOffsets instead.
125
- * Radial padding between corner annotation callout line end and text in pixels.
126
- */
127
- annotationPadding?:
128
- | number
129
- | {
130
- topRight?: number
131
- bottomRight?: number
132
- bottomLeft?: number
133
- topLeft?: number
134
- }
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 (x-axis). Supports `\\n` and `<br>` line breaks. @default 'Variable 1' */
16
+ label1?: string
17
+
18
+ /** Label for the second variable (y-axis). Supports `\\n` and `<br>` line breaks. @default 'Variable 2' */
19
+ label2?: string
20
+
21
+ /** Break labels for the first variable. Omit to hide first-axis break labels. */
22
+ breaks1?: Array<number | string>
23
+
24
+ /** Break labels for the second variable. Omit to hide second-axis break labels. */
25
+ breaks2?: Array<number | string>
26
+
27
+ /** Length of axis tick marks in pixels. @default 5 */
28
+ tickLength?: number
29
+
30
+ /** Offset adjustments for y-axis labels. @default { x: 0, y: 0 } */
31
+ yAxisLabelsOffset?: { x: number; y: number }
32
+
33
+ /** Offset adjustments for x-axis labels. @default { x: 0, y: 0 } */
34
+ xAxisLabelsOffset?: { x: number; y: number }
35
+
36
+ /** Offset adjustments for y-axis title. @default { x: 0, y: 0 } */
37
+ yAxisTitleOffset?: { x: number; y: number }
38
+
39
+ /** Offset adjustments for x-axis title. @default { x: 0, y: 0 } */
40
+ xAxisTitleOffset?: { x: number; y: number }
41
+
42
+ /** Font size of the axis titles in pixels. Defaults to the value defined by the legend CSS. */
43
+ axisTitleFontSize?: 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 both axes, or for each axis independently. @default true */
49
+ axisArrows?: boolean | { x?: boolean; y?: 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
+
60
+ /**
61
+ * Labels displayed at low/high ends of each axis.
62
+ * @default { x: { low: 'Low', high: 'High' }, y: { low: 'Low', high: 'High' } }
63
+ */
64
+ axisExtremes?: {
65
+ x?: { low?: string; high?: string }
66
+ y?: { low?: string; high?: string }
67
+ }
68
+
69
+ /** Whether to show low/high endpoint labels on both axes, or for each axis independently. @default true */
70
+ showAxisExtremes?: boolean | { x?: boolean; y?: boolean }
71
+
72
+ /**
73
+ * Optional text annotations for each corner of the bivariate square.
74
+ * Add text for any combination of topRight, bottomRight, bottomLeft, topLeft.
75
+ * Supports line breaks using '<br>'/'<br/>' or '\\n'.
76
+ */
77
+ annotations?: {
78
+ topRight?: string
79
+ bottomRight?: string
80
+ bottomLeft?: string
81
+ topLeft?: string
82
+ }
83
+
84
+ /**
85
+ * Length of corner annotation callout lines in pixels.
86
+ * Can be a single number for all corners, or per-corner values.
87
+ * @default 18
88
+ */
89
+ annotationLineLength?:
90
+ | number
91
+ | {
92
+ topRight?: number
93
+ bottomRight?: number
94
+ bottomLeft?: number
95
+ topLeft?: number
96
+ }
97
+
98
+ /**
99
+ * Annotation text offsets in pixels.
100
+ * Use global `{ x, y }` or per-corner values.
101
+ * @default auto (based on corner direction)
102
+ */
103
+ annotationOffsets?:
104
+ | { x?: number; y?: number }
105
+ | {
106
+ topRight?: { x?: number; y?: number }
107
+ bottomRight?: { x?: number; y?: number }
108
+ bottomLeft?: { x?: number; y?: number }
109
+ topLeft?: { x?: number; y?: number }
110
+ }
111
+
112
+ /**
113
+ * Extra offset applied to the leader-line endpoint where it meets the annotation label.
114
+ * Use global `{ x, y }` or per-corner values.
115
+ * @default { x: 0, y: 0 }
116
+ */
117
+ annotationLineEndOffsets?:
118
+ | { x?: number; y?: number }
119
+ | {
120
+ topRight?: { x?: number; y?: number }
121
+ bottomRight?: { x?: number; y?: number }
122
+ bottomLeft?: { x?: number; y?: number }
123
+ topLeft?: { x?: number; y?: number }
124
+ }
125
+
135
126
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eurostat-map",
3
- "version": "4.8.2",
3
+ "version": "4.8.5",
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
  "cartography",