@astrato-io/visualizations 0.9.0 → 0.10.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.
Files changed (144) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +7 -3
  3. package/THIRD_PARTY_NOTICES.md +163 -14
  4. package/VISUALIZATION_DEFINITIONS.md +376 -36
  5. package/chunks/{Button-5CxPEACP.js → Button-Dn3rJrYf.js} +4 -4
  6. package/chunks/{CircularProgress-DFS-LQb7.js → CircularProgress-BFeu06Yb.js} +39 -39
  7. package/chunks/FieldTypeIcon-DrMoGpHJ.js +22 -0
  8. package/chunks/{LinearProgress-CjIQfkNA.js → LinearProgress-ClO6GUjN.js} +9 -9
  9. package/chunks/{MenuOption-Cb7B7x6z.js → MenuOption-Czc34u4q.js} +143 -142
  10. package/chunks/{Title-CtFw1bVg.js → Title-BgYnaVTR.js} +22 -22
  11. package/chunks/_createAggregator-BMu9uRax.js +50 -0
  12. package/chunks/{app-filter-bar.compiler-B9775gLJ.js → app-filter-bar.compiler-CVir0wkl.js} +10 -10
  13. package/chunks/bar-layout-C_UgRlVl.js +9 -0
  14. package/chunks/{bar.compiler-B7wlH_Ro.js → bar.compiler-DYuFdi9J.js} +100 -82
  15. package/chunks/{builder-Dxo7D7c6.js → builder-C-TKA-My.js} +70 -37
  16. package/chunks/color-rules-DYJL4fIW.js +15 -0
  17. package/chunks/color-settings-DJFoFTip.js +5 -0
  18. package/chunks/{coloring-B-Wa8D5P.js → coloring-BtnPiQ_o.js} +37 -37
  19. package/chunks/createSimplePaletteValueFilter--zrZxRV9.js +2005 -0
  20. package/chunks/defaults-Dtk7fg3C.js +3 -0
  21. package/chunks/{definitions-DNpzD9tY.js → definitions-CT304NDn.js} +655 -417
  22. package/chunks/{escobar-C4Nm3eJ7.js → escobar-CvEV2ES1.js} +7441 -7127
  23. package/chunks/{extend-preset-BVKFtoe-.js → extend-preset-D9-JP92b.js} +998 -933
  24. package/chunks/{filter.compiler-BlS3zoy_.js → filter.compiler-CXeZznks.js} +7 -7
  25. package/chunks/{filtering-CGuLpg7u.js → filtering-8_bFv-jb.js} +333 -377
  26. package/chunks/handlers-C6CZ0XJA.js +15399 -0
  27. package/chunks/{icon-picker-styles-DYQgVEKG.js → icon-picker-styles-BXiJ1SZS.js} +11 -11
  28. package/chunks/isEqual-D8Ay63xR.js +16 -0
  29. package/chunks/{isFocusVisible-B1_z03UT.js → isFocusVisible-Bu8gGZu5.js} +1 -1
  30. package/chunks/label-format-type-C46pzgx7.js +17 -0
  31. package/chunks/{line.compiler-Bo9i9qag.js → line.compiler-DmHpmQCC.js} +9 -9
  32. package/chunks/{logger-3lng-wOw.js → logger-DdZpR7xZ.js} +79 -72
  33. package/chunks/map.compiler-Q_Y1Pvat.js +343 -0
  34. package/chunks/{metadata-Fmx1swpK.js → metadata-BQm_TXI1.js} +1 -1
  35. package/chunks/{number.compiler-CdLd5aGW.js → number.compiler-DQdg6zTy.js} +7 -7
  36. package/chunks/operations-DKQWuLL7.js +31315 -0
  37. package/chunks/{range-CzO4isKK.js → range-BdhzvYQ_.js} +2 -2
  38. package/chunks/{react-dom-BwZT0N3F.js → react-dom-BGP4tbXV.js} +70 -70
  39. package/chunks/{render-wrappers-CAuvgMxi.js → render-wrappers-BZpyDnJy.js} +1 -1
  40. package/chunks/{requirements-CYpVh65U.js → requirements-e8Fe96ag.js} +60 -58
  41. package/chunks/shared-C_2F90xq.js +1337 -0
  42. package/chunks/standalone-4MsKiqs0.js +355 -0
  43. package/chunks/standalone-B794g9pE.js +1012 -0
  44. package/chunks/{standalone-C6XDHYAM.js → standalone-B8ZSqauS.js} +110 -110
  45. package/chunks/{standalone-5DnapeHH.js → standalone-BA2YXyJS.js} +126 -124
  46. package/chunks/{standalone-CXniic5x.js → standalone-BDrXVxlP.js} +6 -5
  47. package/chunks/{standalone-B6s_xG2u.js → standalone-BE_ONgiG.js} +116 -116
  48. package/chunks/{standalone-CPUiiWNP.js → standalone-BTY3w_JA.js} +37 -37
  49. package/chunks/standalone-BgumbdaJ2.js +357 -0
  50. package/chunks/{standalone-DWPfdP0A.js → standalone-BkbiH-o8.js} +482 -482
  51. package/chunks/standalone-Blh4qejk.js +689 -0
  52. package/chunks/standalone-CXY4FpF7.js +773 -0
  53. package/chunks/{standalone-BvWdpUL3.js → standalone-CY_kjarf.js} +34 -31
  54. package/chunks/{standalone-DuwTOBXH.js → standalone-CaTxAydz.js} +587 -587
  55. package/chunks/{standalone-BDrQMxLi.js → standalone-Cc98Pdr6.js} +1799 -1015
  56. package/chunks/{standalone-DMCwtebn.js → standalone-Cl0TSfqC.js} +125 -125
  57. package/chunks/{standalone-CoQxJ6ov.js → standalone-CsoMmE9T.js} +778 -778
  58. package/chunks/standalone-DH0xTEes.js +2 -0
  59. package/chunks/{standalone-LFVgLhia.js → standalone-DHRalbVO.js} +311 -303
  60. package/chunks/standalone-DNh9NcMa.js +580 -0
  61. package/chunks/standalone-DcnHjNnC.js +2 -0
  62. package/chunks/{standalone-r4ObFvys.js → standalone-DflyWtuR.js} +217 -215
  63. package/chunks/standalone-DrHdGkY7.js +762 -0
  64. package/chunks/standalone-c_rROMtx.js +287 -0
  65. package/chunks/standalone-drcFLeN6.js +6 -0
  66. package/chunks/{standalone-CNkHsynO.js → standalone-wOWRCpdn.js} +54 -56
  67. package/chunks/{standalone-Cu73fzSr.js → standalone-z0o52o5t.js} +5128 -4908
  68. package/chunks/{table.compiler-C1qjqXaT.js → table.compiler-COaHE9VD.js} +18 -18
  69. package/chunks/{useFieldName-mWrD_uk_.js → useFieldName-CdnCWzhd.js} +1 -1
  70. package/chunks/{utils-DYYD4Zzf.js → utils-DganVptf.js} +4758 -4747
  71. package/chunks/{view-7fH6mGmY.js → view-Bzlros43.js} +2021 -1665
  72. package/chunks/{visualization-filters-mVnsnvLP.js → visualization-filters-D7i6oh1Z.js} +3177 -2425
  73. package/chunks/{with-html-element-B0Clt4jY.js → with-html-element-CiIhFEa5.js} +3740 -3547
  74. package/definitions.js +2 -2
  75. package/docs/operations/astrato-app-filter-bar.md +1 -1
  76. package/docs/operations/bar.md +303 -2
  77. package/docs/operations/combo.md +262 -1
  78. package/docs/operations/date-picker.md +1 -1
  79. package/docs/operations/distribution-gauge.md +1 -1
  80. package/docs/operations/dot.md +148 -1
  81. package/docs/operations/filter.md +1 -1
  82. package/docs/operations/gauge.md +1 -1
  83. package/docs/operations/heatMap.md +1 -1
  84. package/docs/operations/histogram.md +262 -1
  85. package/docs/operations/iframe.md +1 -1
  86. package/docs/operations/image.md +1 -1
  87. package/docs/operations/index.md +7 -7
  88. package/docs/operations/line.md +280 -1
  89. package/docs/operations/number.md +1 -1
  90. package/docs/operations/pie.md +1 -1
  91. package/docs/operations/radar.md +1 -1
  92. package/docs/operations/sankey.md +1 -1
  93. package/docs/operations/scatter.md +148 -1
  94. package/docs/operations/shape.md +1 -1
  95. package/docs/operations/simpleTextObject.md +1 -1
  96. package/docs/operations/slider.md +1 -1
  97. package/docs/operations/table.md +374 -157
  98. package/docs/operations/tree.md +1 -1
  99. package/docs/operations/treemap.md +1 -1
  100. package/docs/operations/waterfall.md +1 -1
  101. package/docs/operations/word-cloud.md +1 -1
  102. package/getters.js +2 -2
  103. package/index.js +482 -434
  104. package/metadata.js +2 -2
  105. package/operations.js +5 -5
  106. package/package.json +72 -67
  107. package/src/definitions/index.d.ts +7 -1
  108. package/src/definitions/model/definitions/available-fields.d.ts +2 -2
  109. package/src/definitions/model/definitions/compilers/compile.d.ts +1 -0
  110. package/src/definitions/model/definitions/data-item-resolution.d.ts +3 -3
  111. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +219 -7
  112. package/src/definitions/model/definitions/index.d.ts +2 -1
  113. package/src/definitions/model/definitions/schema-registry.d.ts +305 -0
  114. package/src/definitions/model/definitions/schemas/bar.schema.d.ts +2 -0
  115. package/src/definitions/model/definitions/schemas/common.schema.d.ts +4 -3
  116. package/src/definitions/model/definitions/schemas/index.d.ts +1 -0
  117. package/src/definitions/model/definitions/schemas/map.schema.d.ts +590 -0
  118. package/src/definitions/model/definitions/types/compilation.types.d.ts +9 -1
  119. package/src/definitions/model/definitions/types/definition.types.d.ts +2 -2
  120. package/src/definitions/model/definitions/types/index.d.ts +1 -1
  121. package/src/index.d.ts +1 -1
  122. package/src/operations/index.d.ts +1 -1
  123. package/src/types.d.ts +17 -13
  124. package/chunks/FieldTypeIcon-pSVQFemC.js +0 -22
  125. package/chunks/ToggleButton-Br9HCPCv.js +0 -150
  126. package/chunks/color-rules-CN7TcGrC.js +0 -6
  127. package/chunks/color-settings-3VRlf_Vw.js +0 -6
  128. package/chunks/handlers-CMbyj5y1.js +0 -12930
  129. package/chunks/isEqual-DBg_b35N.js +0 -12
  130. package/chunks/label-format-type-weq1XfcX.js +0 -8
  131. package/chunks/operations-HSqnCRvv.js +0 -26324
  132. package/chunks/shared-DFoJxjVN.js +0 -1218
  133. package/chunks/standalone-530a5lvf.js +0 -1003
  134. package/chunks/standalone-B4jrf4KE.js +0 -354
  135. package/chunks/standalone-BMoJXGYe.js +0 -2
  136. package/chunks/standalone-BfvGggeM2.js +0 -355
  137. package/chunks/standalone-CMJJIi9v.js +0 -2
  138. package/chunks/standalone-C_Jd4gkj.js +0 -6
  139. package/chunks/standalone-CiaaibTa.js +0 -518
  140. package/chunks/standalone-DBeXQrwH.js +0 -468
  141. package/chunks/standalone-DpSRmAWx.js +0 -287
  142. package/chunks/standalone-kzAhwH19.js +0 -689
  143. package/chunks/standalone-mb7LwEiq.js +0 -3874
  144. /package/chunks/{src-BOS6SqkZ2.js → src-BOS6SqkZ.js} +0 -0
@@ -39,7 +39,7 @@ A definition does not cover every setting yet. If the chart needs a setting the
39
39
 
40
40
  A definition covers a subset of the operation catalogue. For settings outside it, apply operations to the compiled vSpec with `applyOperations` from `@astrato-io/visualizations/operations`, in one batch and before creating the instance. This runs in memory: it needs no runtime and makes no engine requests.
41
41
 
42
- Use `compilation.resolvedRefs` to get the data-item identity that operation payloads expect for a definition `ref`:
42
+ Use `compilation.resolvedRefs` to get the data-item identity that operation payloads expect for a definition `ref`. A map also returns `compilation.resolvedLayerRefs`, whose entries have an `id` to pass as the operation's `layer` selector.
43
43
 
44
44
  ```ts
45
45
  import { applyOperations } from '@astrato-io/visualizations/operations';
@@ -102,44 +102,327 @@ Avoid finishing a chart by applying operations one at a time after it is mounted
102
102
 
103
103
  ## Capability Index
104
104
 
105
- | Type | Name | Data requirements | Supported features |
106
- | ------------------------ | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
107
- | `bar` | Bar chart | At least one dimension. At least one measure. | `axes`, `axis-bands`, `axis-range`, `axis-scale`, `conditional-coloring`, `data-labels`, `dimensions`, `filters`, `legend`, `measure-axis`, `measures`, `orientation`, `query-limit`, `sorting`, `top-n`, `value-formatting` |
108
- | `combo` | Combo chart | Exactly one dimension. Between one and ten measures. | `dimensions`, `filters`, `measures`, `value-formatting`, `axes`, `axis-bands`, `axis-range`, `axis-scale`, `data-labels`, `legend`, `measure-axis`, `orientation`, `query-limit`, `series-type`, `sorting` |
109
- | `distribution-gauge` | Distribution gauge | Zero or one dimension. Between one and twenty measures. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `display-mode`, `legend` |
110
- | `dot` | Dot chart | Exactly two dimensions. Exactly one measure. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `axes`, `axis-range`, `legend`, `orientation` |
111
- | `gauge` | Gauge chart | Zero or one dimension. Between one and twenty measures; with one dimension, at most two measures. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `display-mode`, `legend` |
112
- | `heatMap` | Heat map | Exactly two dimensions. One or two measures. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `axes`, `legend`, `query-limit`, `sorting` |
113
- | `histogram` | Histogram | Exactly one numeric dimension. No caller-supplied measures. | `axes`, `axis-bands`, `axis-range`, `dimensions`, `filters`, `legend`, `orientation`, `value-formatting` |
114
- | `line` | Line chart | At least one dimension. At least one measure. | `axes`, `axis-bands`, `axis-range`, `axis-scale`, `conditional-coloring`, `data-labels`, `data-points`, `dimensions`, `filters`, `legend`, `measure-axis`, `measures`, `orientation`, `query-limit`, `sorting`, `value-formatting` |
115
- | `radar` | Radar chart | Zero to two dimensions. Two to five measures without dimensions, or one with dimensions. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `legend` |
116
- | `pie` | Pie chart | Exactly one dimension. One or two measures. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `legend`, `query-limit`, `sorting` |
117
- | `tree` | Tree chart | Zero to ten dimensions. Zero to one hundred measures, or at most one with dimensions. | `dimensions`, `filters`, `measures`, `value-formatting`, `layout`, `query-limit`, `sorting` |
118
- | `treemap` | Treemap | Between one and ten dimensions. Exactly one measure. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `legend` |
119
- | `sankey` | Sankey chart | Between two and fifteen dimensions. Exactly one measure. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring` |
120
- | `scatter` | Scatter chart | One or two dimensions. Two or three measures. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `axes`, `axis-range`, `legend`, `query-limit`, `sorting` |
121
- | `table` | Table | Normal tables require at least one ordered dimension or measure column. Expandable tables require at least one dimension and one measure. Pivot tables require at least one row dimension, one column dimension, and one measure. | `dimensions`, `filters`, `layout`, `measures`, `query-limit`, `sorting`, `table-structure`, `totals`, `value-formatting` |
122
- | `waterfall` | Waterfall chart | Between one and one hundred measures. | `axes`, `axis-bands`, `axis-range`, `data-labels`, `filters`, `measures`, `orientation`, `value-formatting` |
123
- | `word-cloud` | Word cloud | Exactly one dimension. Exactly one measure. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring` |
124
- | `date-picker` | Date picker | Exactly one field. | `dimensions`, `filter-settings` |
125
- | `filter` | Filter | Exactly one field. | `dimensions`, `filter-settings` |
126
- | `iframe` | Iframe | No query data. | `content` |
127
- | `image` | Image | No query data. | `content`, `object-settings` |
128
- | `number` | Number | Exactly one measure. | `filters`, `measures`, `value-formatting` |
129
- | `shape` | Shape | No query data. | `object-settings` |
130
- | `simpleTextObject` | Text object | No query data. | `content`, `object-settings` |
131
- | `atomic-input` | Atomic input | No query data; variable-backed input. | `input-settings` |
132
- | `astrato-app-filter-bar` | Astrato App Filter Bar | No query data; uses field metadata and selections supplied by the host. | `selection-settings` |
133
- | `slider` | Slider | Exactly one field. | `dimensions`, `filter-settings` |
105
+ | Type | Name | Data requirements | Supported features |
106
+ | ------------------------ | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
107
+ | `map` | Map | Point, shape and heatmap layers require one dimension identifying locations. Connection layers require source and destination dimensions. Location measures use geo for the first location and thirdGeo for a connection destination. For latLng, these are latitude; secondGeo and fourthGeo supply longitude. Shape layers require a GeoJSON measure. Other data layers support latLng, geoPoint or geoHash. Size measures use the size role on point/connection layers. Heat intensity uses the measure role. Background map and image layers have no data bindings. | `dimensions`, `measures`, `filters`, `data-points`, `data-labels`, `object-settings` |
108
+ | `bar` | Bar chart | At least one measure. For a measure-only bar, send `dimensions: []` (the key is still required) with at least one measure. Several measures then stack into one bar unless presentation.layout is groups; a layout already set on the base vSpec is kept when presentation.layout is omitted. | `axes`, `axis-bands`, `axis-range`, `axis-scale`, `conditional-coloring`, `data-labels`, `dimensions`, `filters`, `legend`, `measure-axis`, `measures`, `orientation`, `query-limit`, `sorting`, `top-n`, `value-formatting` |
109
+ | `combo` | Combo chart | Exactly one dimension. Between one and ten measures. | `dimensions`, `filters`, `measures`, `value-formatting`, `axes`, `axis-bands`, `axis-range`, `axis-scale`, `data-labels`, `legend`, `measure-axis`, `orientation`, `query-limit`, `series-type`, `sorting` |
110
+ | `distribution-gauge` | Distribution gauge | Zero or one dimension. Between one and twenty measures. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `display-mode`, `legend` |
111
+ | `dot` | Dot chart | Exactly two dimensions. Exactly one measure. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `axes`, `axis-range`, `legend`, `orientation` |
112
+ | `gauge` | Gauge chart | Zero or one dimension. Between one and twenty measures; with one dimension, at most two measures. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `display-mode`, `legend` |
113
+ | `heatMap` | Heat map | Exactly two dimensions. One or two measures. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `axes`, `legend`, `query-limit`, `sorting` |
114
+ | `histogram` | Histogram | Exactly one numeric dimension. No caller-supplied measures. | `axes`, `axis-bands`, `axis-range`, `dimensions`, `filters`, `legend`, `orientation`, `value-formatting` |
115
+ | `line` | Line chart | At least one dimension. At least one measure. | `axes`, `axis-bands`, `axis-range`, `axis-scale`, `conditional-coloring`, `data-labels`, `data-points`, `dimensions`, `filters`, `legend`, `measure-axis`, `measures`, `orientation`, `query-limit`, `sorting`, `value-formatting` |
116
+ | `radar` | Radar chart | Zero to two dimensions. Two to five measures without dimensions, or one with dimensions. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `legend` |
117
+ | `pie` | Pie chart | Exactly one dimension. One or two measures. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `legend`, `query-limit`, `sorting` |
118
+ | `tree` | Tree chart | Zero to ten dimensions. Zero to one hundred measures, or at most one with dimensions. | `dimensions`, `filters`, `measures`, `value-formatting`, `layout`, `query-limit`, `sorting` |
119
+ | `treemap` | Treemap | Between one and ten dimensions. Exactly one measure. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `legend` |
120
+ | `sankey` | Sankey chart | Between two and fifteen dimensions. Exactly one measure. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring` |
121
+ | `scatter` | Scatter chart | One or two dimensions. Two or three measures. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `axes`, `axis-range`, `legend`, `query-limit`, `sorting` |
122
+ | `table` | Table | Normal tables require at least one ordered dimension or measure column. Expandable tables require at least one dimension and one measure. Pivot tables require at least one row dimension, one column dimension, and one measure. | `dimensions`, `filters`, `layout`, `measures`, `query-limit`, `sorting`, `table-structure`, `totals`, `value-formatting` |
123
+ | `waterfall` | Waterfall chart | No dimensions and between one and one hundred measures, or exactly one dimension and exactly two measures. | `axes`, `axis-bands`, `axis-range`, `data-labels`, `dimensions`, `filters`, `measures`, `orientation`, `value-formatting` |
124
+ | `word-cloud` | Word cloud | Exactly one dimension. Exactly one measure. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring` |
125
+ | `date-picker` | Date picker | Exactly one field. | `dimensions`, `filter-settings` |
126
+ | `filter` | Filter | Exactly one field. | `dimensions`, `filter-settings` |
127
+ | `iframe` | Iframe | No query data. | `content` |
128
+ | `image` | Image | No query data. | `content`, `object-settings` |
129
+ | `number` | Number | Exactly one measure. | `filters`, `measures`, `value-formatting` |
130
+ | `shape` | Shape | No query data. | `object-settings` |
131
+ | `simpleTextObject` | Text object | No query data. | `content`, `object-settings` |
132
+ | `atomic-input` | Atomic input | No query data; variable-backed input. | `input-settings` |
133
+ | `astrato-app-filter-bar` | Astrato App Filter Bar | No query data; uses field metadata and selections supplied by the host. | `selection-settings` |
134
+ | `slider` | Slider | Exactly one field. | `dimensions`, `filter-settings` |
135
+
136
+ ## `map`: Map
137
+
138
+ Layered geographic visualization with background maps, images, points, shapes, heatmaps and connections.
139
+
140
+ **Data requirements**
141
+
142
+ - Point, shape and heatmap layers require one dimension identifying locations. Connection layers require source and destination dimensions.
143
+ - Location measures use geo for the first location and thirdGeo for a connection destination. For latLng, these are latitude; secondGeo and fourthGeo supply longitude.
144
+ - Shape layers require a GeoJSON measure. Other data layers support latLng, geoPoint or geoHash.
145
+ - Size measures use the size role on point/connection layers. Heat intensity uses the measure role. Background map and image layers have no data bindings.
146
+
147
+ **Supported features**
148
+
149
+ `dimensions`, `measures`, `filters`, `data-points`, `data-labels`, `object-settings`
150
+
151
+ **Constraints and semantics**
152
+
153
+ - There is no fixed layer-count limit. Layers are ordered topmost first. Include a background map explicitly; the default basemap is replaced by the declared layers.
154
+ - Layer and data-item references share one namespace and must all be unique across the definition. Display names may repeat.
155
+ - resolvedRefs contains the data-item references. resolvedLayerRefs contains the layer references; pass the id of a layer entry as the layer selector in map operations.
156
+ - Raw measure fields require an available aggregation. Semantic measures and calculations supply their own aggregation.
157
+ - Assign each measure role at most once per layer. Set sizing.sizeType to byMeasurePixels/byMeasureDistance to use a size measure, or value.type to byMeasure to use heat intensity.
158
+ - Definitions cover initial data bindings, static filters, view and basic presentation. Additional styling and interactions use the existing map operations.
159
+ - Compile only against an empty or unconfigured default map vSpec. HERE backgrounds require an API key.
160
+
161
+ **Canonical example**
162
+
163
+ ```json
164
+ {
165
+ "type": "map",
166
+ "version": 1,
167
+ "layers": [
168
+ {
169
+ "type": "point",
170
+ "ref": "locations",
171
+ "locationType": "latLng",
172
+ "data": {
173
+ "dimensions": [
174
+ {
175
+ "ref": "location",
176
+ "fieldKey": "[Locations].[Name]"
177
+ }
178
+ ],
179
+ "measures": [
180
+ {
181
+ "ref": "locationLatitude",
182
+ "fieldKey": "[Locations].[Latitude]",
183
+ "aggregation": "AVG",
184
+ "role": "geo"
185
+ },
186
+ {
187
+ "ref": "locationLongitude",
188
+ "fieldKey": "[Locations].[Longitude]",
189
+ "aggregation": "AVG",
190
+ "role": "secondGeo"
191
+ }
192
+ ]
193
+ },
194
+ "presentation": {
195
+ "color": "#2563EB",
196
+ "sizing": {
197
+ "size": 12
198
+ }
199
+ }
200
+ },
201
+ {
202
+ "type": "map",
203
+ "ref": "basemap",
204
+ "presentation": {
205
+ "mapType": "openStreetMap"
206
+ }
207
+ }
208
+ ]
209
+ }
210
+ ```
211
+
212
+ **Additional scenarios**
213
+
214
+ ### Heatmap
215
+
216
+ ```json
217
+ {
218
+ "type": "map",
219
+ "version": 1,
220
+ "layers": [
221
+ {
222
+ "type": "heatMap",
223
+ "ref": "density",
224
+ "locationType": "latLng",
225
+ "data": {
226
+ "dimensions": [
227
+ {
228
+ "ref": "location",
229
+ "fieldKey": "[Locations].[Name]"
230
+ }
231
+ ],
232
+ "measures": [
233
+ {
234
+ "ref": "densityLatitude",
235
+ "fieldKey": "[Locations].[Latitude]",
236
+ "aggregation": "AVG",
237
+ "role": "geo"
238
+ },
239
+ {
240
+ "ref": "densityLongitude",
241
+ "fieldKey": "[Locations].[Longitude]",
242
+ "aggregation": "AVG",
243
+ "role": "secondGeo"
244
+ }
245
+ ]
246
+ },
247
+ "presentation": {
248
+ "heat": {
249
+ "radius": 25,
250
+ "blur": 15
251
+ },
252
+ "value": {
253
+ "type": "fixed",
254
+ "value": 1
255
+ }
256
+ }
257
+ },
258
+ {
259
+ "type": "map",
260
+ "ref": "basemap",
261
+ "presentation": {
262
+ "mapType": "openStreetMap"
263
+ }
264
+ }
265
+ ]
266
+ }
267
+ ```
268
+
269
+ ### Connections
270
+
271
+ ```json
272
+ {
273
+ "type": "map",
274
+ "version": 1,
275
+ "layers": [
276
+ {
277
+ "type": "pointConnection",
278
+ "ref": "routes",
279
+ "locationType": "latLng",
280
+ "secondLocationType": "latLng",
281
+ "data": {
282
+ "dimensions": [
283
+ {
284
+ "ref": "origin",
285
+ "fieldKey": "[Locations].[Name]"
286
+ },
287
+ {
288
+ "ref": "destination",
289
+ "fieldKey": "[Locations].[Destination]"
290
+ }
291
+ ],
292
+ "measures": [
293
+ {
294
+ "ref": "originLatitude",
295
+ "fieldKey": "[Locations].[Latitude]",
296
+ "aggregation": "AVG",
297
+ "role": "geo"
298
+ },
299
+ {
300
+ "ref": "originLongitude",
301
+ "fieldKey": "[Locations].[Longitude]",
302
+ "aggregation": "AVG",
303
+ "role": "secondGeo"
304
+ },
305
+ {
306
+ "ref": "destinationLatitude",
307
+ "fieldKey": "[Locations].[Destination Latitude]",
308
+ "aggregation": "AVG",
309
+ "role": "thirdGeo"
310
+ },
311
+ {
312
+ "ref": "destinationLongitude",
313
+ "fieldKey": "[Locations].[Destination Longitude]",
314
+ "aggregation": "AVG",
315
+ "role": "fourthGeo"
316
+ }
317
+ ]
318
+ },
319
+ "presentation": {
320
+ "useGeodesicLines": true,
321
+ "arrow": {
322
+ "show": true
323
+ }
324
+ }
325
+ },
326
+ {
327
+ "type": "map",
328
+ "ref": "basemap",
329
+ "presentation": {
330
+ "mapType": "openStreetMap"
331
+ }
332
+ }
333
+ ]
334
+ }
335
+ ```
336
+
337
+ ### GeoJSON shapes
338
+
339
+ ```json
340
+ {
341
+ "type": "map",
342
+ "version": 1,
343
+ "layers": [
344
+ {
345
+ "type": "shape",
346
+ "ref": "regions",
347
+ "data": {
348
+ "dimensions": [
349
+ {
350
+ "ref": "region",
351
+ "fieldKey": "[Locations].[Name]"
352
+ }
353
+ ],
354
+ "measures": [
355
+ {
356
+ "ref": "boundary",
357
+ "fieldKey": "[Locations].[Boundary]",
358
+ "aggregation": "ANY_VALUE",
359
+ "role": "geo"
360
+ }
361
+ ]
362
+ },
363
+ "presentation": {
364
+ "color": "#2563EB",
365
+ "opacity": 60,
366
+ "strokeEnabled": true
367
+ }
368
+ },
369
+ {
370
+ "type": "map",
371
+ "ref": "basemap",
372
+ "presentation": {
373
+ "mapType": "openStreetMap"
374
+ }
375
+ }
376
+ ]
377
+ }
378
+ ```
379
+
380
+ ### Image overlay
381
+
382
+ ```json
383
+ {
384
+ "type": "map",
385
+ "version": 1,
386
+ "layers": [
387
+ {
388
+ "type": "image",
389
+ "ref": "overlay",
390
+ "image": {
391
+ "imageUrl": "https://example.com/overlay.png"
392
+ },
393
+ "position": {
394
+ "topLeftLatitude": 52,
395
+ "topLeftLongitude": 20,
396
+ "bottomRightLatitude": 51,
397
+ "bottomRightLongitude": 21
398
+ },
399
+ "opacity": 60
400
+ },
401
+ {
402
+ "type": "map",
403
+ "ref": "basemap",
404
+ "presentation": {
405
+ "mapType": "openStreetMap"
406
+ }
407
+ }
408
+ ],
409
+ "view": {
410
+ "latitude": 51.5,
411
+ "longitude": 20.5,
412
+ "zoom": 7,
413
+ "zoomMode": "manual"
414
+ }
415
+ }
416
+ ```
134
417
 
135
418
  ## `bar`: Bar chart
136
419
 
137
- Categorical comparison chart with sorting, limiting, per-measure axes, labels, and orientation controls.
420
+ Categorical comparison chart with sorting, limiting, per-measure axes, labels, layout, and orientation controls.
138
421
 
139
422
  **Data requirements**
140
423
 
141
- - At least one dimension.
142
424
  - At least one measure.
425
+ - For a measure-only bar, send `dimensions: []` (the key is still required) with at least one measure. Several measures then stack into one bar unless presentation.layout is groups; a layout already set on the base vSpec is kept when presentation.layout is omitted.
143
426
 
144
427
  **Supported features**
145
428
 
@@ -153,6 +436,8 @@ Categorical comparison chart with sorting, limiting, per-measure axes, labels, a
153
436
  - presentation.axes.primaryMeasure.bands shades the plot between two primary measure axis values; start and end are measure values, and the bands replace any on the base vSpec.
154
437
  - Set range on a measure axis to fix its min, max, or both, for example to give several charts one shared scale. To keep an auto-fitted axis anchored at zero, leave both unset and put startsAtZero inside range, not on the axis itself: "primaryMeasure": { "range": { "startsAtZero": true } }. Set inverted on a measure axis to reverse its values, for example to put rank 1 at the top.
155
438
  - Set scale to log on a measure axis to draw it logarithmically, with gridlines at powers of ten. Zero and negative values are drawn at the floor of a log axis.
439
+ - Several measures on one dimension are drawn side by side unless presentation.layout is stacked. A second dimension is a series, stacked unless presentation.layout is groups. One dimension with one measure ignores layout.
440
+ - Data label placements are tried in order; inside labels sit at the end of the bar. Set dataLabels.textColor to fix the label color in every placement.
156
441
 
157
442
  **Canonical example**
158
443
 
@@ -1777,19 +2062,20 @@ Normal, expandable, or pivot tabular output with formatting, filtering, sorting,
1777
2062
 
1778
2063
  ## `waterfall`: Waterfall chart
1779
2064
 
1780
- Sequential contribution chart composed from one or more measures.
2065
+ Sequential contribution chart, or a comparison of two measures across one dimension.
1781
2066
 
1782
2067
  **Data requirements**
1783
2068
 
1784
- - Between one and one hundred measures.
2069
+ - No dimensions and between one and one hundred measures, or exactly one dimension and exactly two measures.
1785
2070
 
1786
2071
  **Supported features**
1787
2072
 
1788
- `axes`, `axis-bands`, `axis-range`, `data-labels`, `filters`, `measures`, `orientation`, `value-formatting`
2073
+ `axes`, `axis-bands`, `axis-range`, `data-labels`, `dimensions`, `filters`, `measures`, `orientation`, `value-formatting`
1789
2074
 
1790
2075
  **Constraints and semantics**
1791
2076
 
1792
- - Dimensions are not supported. Measure order defines the waterfall sequence.
2077
+ - Without a dimension, measure order defines the waterfall sequence. With one dimension, the first measure supplies the opening total, each dimension value contributes the second measure minus the first, and the second measure supplies the closing total.
2078
+ - Comparison totals sum the returned rows, rather than requesting a separate aggregate total. Use two numeric measures with comparable units.
1793
2079
  - Set range on the primary measure axis to fix its min, max, or both, for example to give several charts one shared scale. To keep an auto-fitted axis anchored at zero, leave both unset and put startsAtZero inside range, not on the axis itself: "primaryMeasure": { "range": { "startsAtZero": true } }. Set inverted on the primary measure axis to reverse its values.
1794
2080
  - presentation.axes.primaryMeasure.bands shades the plot between two primary measure axis values; start and end are measure values, and the bands replace any on the base vSpec.
1795
2081
 
@@ -1858,6 +2144,60 @@ Sequential contribution chart composed from one or more measures.
1858
2144
  }
1859
2145
  ```
1860
2146
 
2147
+ **Additional scenarios**
2148
+
2149
+ ### Compare total and average sales by manufacturer
2150
+
2151
+ ```json
2152
+ {
2153
+ "data": {
2154
+ "dimensions": [
2155
+ {
2156
+ "fieldKey": "[Cars].[Manufacturer]",
2157
+ "ref": "manufacturer"
2158
+ }
2159
+ ],
2160
+ "measures": [
2161
+ {
2162
+ "aggregation": "SUM",
2163
+ "fieldKey": "[Cars].[Sales In Thousands]",
2164
+ "format": {
2165
+ "formatType": "number2Decimal",
2166
+ "negativeType": "parenthesis"
2167
+ },
2168
+ "ref": "totalSales"
2169
+ },
2170
+ {
2171
+ "aggregation": "AVG",
2172
+ "fieldKey": "[Cars].[Sales In Thousands]",
2173
+ "format": {
2174
+ "formatType": "number2Decimal",
2175
+ "negativeType": "parenthesis"
2176
+ },
2177
+ "ref": "averageSales"
2178
+ }
2179
+ ]
2180
+ },
2181
+ "presentation": {
2182
+ "axes": {
2183
+ "dimension": {
2184
+ "title": "Manufacturer",
2185
+ "titleVisible": true
2186
+ },
2187
+ "primaryMeasure": {
2188
+ "title": "Sales in thousands",
2189
+ "titleVisible": true
2190
+ }
2191
+ },
2192
+ "dataLabels": {
2193
+ "visible": true
2194
+ }
2195
+ },
2196
+ "type": "waterfall",
2197
+ "version": 1
2198
+ }
2199
+ ```
2200
+
1861
2201
  ## `word-cloud`: Word cloud
1862
2202
 
1863
2203
  Weighted word display using one label dimension and one measure.
@@ -1,14 +1,14 @@
1
1
  import { o as e } from "./rolldown-runtime-DleVn1XH.js";
2
- import { Hi as t } from "./visualization-filters-mVnsnvLP.js";
3
- import { $r as n, W as r, ei as i, in as a, jr as o } from "./utils-DYYD4Zzf.js";
2
+ import { Oa as t } from "./visualization-filters-D7i6oh1Z.js";
3
+ import { W as n, ci as r, si as i, sn as a, zr as o } from "./utils-DganVptf.js";
4
4
  import { i as s, u as c } from "./responsive.styles-FItb913l.js";
5
- var l = /* @__PURE__ */ e(i()), u = o(), d = r({
5
+ var l = /* @__PURE__ */ e(r()), u = o(), d = n({
6
6
  container: {
7
7
  display: "flex",
8
8
  fontSize: "14px"
9
9
  },
10
10
  button: ({ responsive: e, withoutWrapper: t }) => ({
11
- ...n.normal14,
11
+ ...i.normal14,
12
12
  display: "flex",
13
13
  flexDirection: "row",
14
14
  justifyContent: "center",