eurostat-map 4.10.11 → 4.11.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eurostat-map",
3
- "version": "4.10.11",
3
+ "version": "4.11.0",
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
  "eurostat",
@@ -154,7 +154,7 @@ export interface MapConfig {
154
154
  * Get or set label configuration for country names, statistical values, etc.
155
155
  * @example map.labels({ values: true, backgrounds: true, backgroundFill: '#B19122' })
156
156
  */
157
- labels?: LabelsConfig
157
+ labels?: LabelsConfig | false
158
158
 
159
159
  /** Fires once the map is built. */
160
160
  onBuild?: (map: EurostatMap) => void
@@ -184,7 +184,7 @@ export interface MapConfig {
184
184
  minimap?: MinimapConfig
185
185
 
186
186
  /** Stamp/watermark annotation. @example { x: 10, y: 10, text: 'DRAFT', size: 40 } */
187
- stamp?: StampConfig
187
+ stamp?: StampConfig | false
188
188
 
189
189
  /** Show/hide zoom +/- buttons. */
190
190
  zoomButtons?: boolean
@@ -314,7 +314,7 @@ export interface MapInstance {
314
314
  * @example map.labels({ values: true, backgrounds: true, backgroundFill: '#B19122', statLabelTextColor: '#fff', backgroundPadding: { x: 6, y: 3 }, backgroundBorderRadius: 4 })
315
315
  */
316
316
  labels(): LabelsConfig | undefined
317
- labels(config: LabelsConfig): this
317
+ labels(config: LabelsConfig | false): this
318
318
 
319
319
  /**
320
320
  * Annotation configuration, rendered via the d3-svg-annotation library.
@@ -324,11 +324,11 @@ export interface MapInstance {
324
324
  * function internally.
325
325
  */
326
326
  annotations(): { annotations: any[]; editMode?: boolean } | undefined
327
- annotations(config: { annotations: any[]; editMode?: boolean }): this
327
+ annotations(config: { annotations: any[]; editMode?: boolean } | false): this
328
328
 
329
329
  /** Stamp/watermark annotation. @example { x: 10, y: 10, text: 'DRAFT', size: 40 } */
330
330
  stamp(): StampConfig | undefined
331
- stamp(config: StampConfig): this
331
+ stamp(config: StampConfig | false): this
332
332
 
333
333
  /** Scalebar configuration. */
334
334
  scalebar(): ScalebarConfig | null
@@ -84,6 +84,14 @@ export interface LabelsConfig {
84
84
  */
85
85
  scaleOnZoom?: boolean
86
86
 
87
+ /**
88
+ * Nudge geographic labels (country names/codes/seas) apart using a force-collision
89
+ * simulation so neighbouring labels don't overlap. Does not affect statistical value
90
+ * labels, which are positioned at region centroids.
91
+ * @default false
92
+ */
93
+ preventOverlap?: boolean
94
+
87
95
  /**
88
96
  * Custom formatter function for statistical value labels.
89
97
  * @example (value) => value.toFixed(1) + '%'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eurostat-map",
3
- "version": "4.10.11",
3
+ "version": "4.11.0",
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",