@astrato-io/visualizations 0.9.0 → 0.10.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.
Files changed (145) hide show
  1. package/README.md +8 -4
  2. package/THIRD_PARTY_NOTICES.md +163 -14
  3. package/VISUALIZATION_DEFINITIONS.md +319 -32
  4. package/chunks/{Button-5CxPEACP.js → Button-CCF851ea.js} +4 -4
  5. package/chunks/{CircularProgress-DFS-LQb7.js → CircularProgress-yupH6YWs.js} +39 -39
  6. package/chunks/FieldTypeIcon-D_MzsdfY.js +22 -0
  7. package/chunks/{LinearProgress-CjIQfkNA.js → LinearProgress-CyFjN4px.js} +9 -9
  8. package/chunks/{MenuOption-Cb7B7x6z.js → MenuOption-CQpT79AP.js} +143 -142
  9. package/chunks/{Title-CtFw1bVg.js → Title-C-p4ZarD.js} +22 -22
  10. package/chunks/_createAggregator-BF4qG9XK.js +50 -0
  11. package/chunks/{app-filter-bar.compiler-B9775gLJ.js → app-filter-bar.compiler-8fxCo2q7.js} +10 -10
  12. package/chunks/bar-layout-DStC-GNV.js +9 -0
  13. package/chunks/{bar.compiler-B7wlH_Ro.js → bar.compiler-CQAu8KL8.js} +102 -84
  14. package/chunks/{builder-Dxo7D7c6.js → builder-CScg1TOS.js} +71 -38
  15. package/chunks/color-rules-DYJL4fIW.js +15 -0
  16. package/chunks/color-settings-DJFoFTip.js +5 -0
  17. package/chunks/{coloring-B-Wa8D5P.js → coloring-9jU3s_-p.js} +41 -41
  18. package/chunks/createSimplePaletteValueFilter-C4hZpCdn.js +2005 -0
  19. package/chunks/defaults-cyNhn37t.js +3 -0
  20. package/chunks/{definitions-DNpzD9tY.js → definitions-C4grxhye.js} +613 -401
  21. package/chunks/{escobar-C4Nm3eJ7.js → escobar-CjirINHP.js} +5326 -5079
  22. package/chunks/{extend-preset-BVKFtoe-.js → extend-preset-D-l9u_we.js} +974 -909
  23. package/chunks/{filter.compiler-BlS3zoy_.js → filter.compiler-lji2Acgn.js} +10 -10
  24. package/chunks/{filtering-CGuLpg7u.js → filtering-C1zakrrX.js} +385 -429
  25. package/chunks/handlers-ZviIUC-j.js +15387 -0
  26. package/chunks/{icon-picker-styles-DYQgVEKG.js → icon-picker-styles-Bj80ZUBK.js} +11 -11
  27. package/chunks/isEqual-Ch9OEye3.js +16 -0
  28. package/chunks/{isFocusVisible-B1_z03UT.js → isFocusVisible-CgMP0qkR.js} +1 -1
  29. package/chunks/label-format-type-C46pzgx7.js +17 -0
  30. package/chunks/{line.compiler-Bo9i9qag.js → line.compiler-De5fiKuR.js} +9 -9
  31. package/chunks/{logger-3lng-wOw.js → logger-CKRjhSHQ.js} +71 -64
  32. package/chunks/map.compiler-CKzorLgK.js +345 -0
  33. package/chunks/{metadata-Fmx1swpK.js → metadata-Bb9pTXrq.js} +1 -1
  34. package/chunks/{number.compiler-CdLd5aGW.js → number.compiler-CaTmJkmi.js} +7 -7
  35. package/chunks/operations-DZoY50VX.js +31297 -0
  36. package/chunks/{range-CzO4isKK.js → range-D1BTmFMp.js} +2 -2
  37. package/chunks/{react-dom-BwZT0N3F.js → react-dom-Dgv2azN2.js} +70 -70
  38. package/chunks/{render-wrappers-CAuvgMxi.js → render-wrappers-_P3xwu5A.js} +1 -1
  39. package/chunks/{requirements-CYpVh65U.js → requirements-NHNrR8Ie.js} +59 -57
  40. package/chunks/shared-UitWpq1J.js +1331 -0
  41. package/chunks/{standalone-CoQxJ6ov.js → standalone-B0U6c3su.js} +804 -804
  42. package/chunks/{standalone-C6XDHYAM.js → standalone-BBu90BhK.js} +109 -109
  43. package/chunks/standalone-BEekPuA12.js +357 -0
  44. package/chunks/{standalone-CPUiiWNP.js → standalone-BOzHA_d4.js} +41 -41
  45. package/chunks/standalone-BR2JuRIC.js +422 -0
  46. package/chunks/{standalone-DuwTOBXH.js → standalone-BapqaniK.js} +592 -592
  47. package/chunks/{standalone-DWPfdP0A.js → standalone-Bnnr87pc.js} +523 -523
  48. package/chunks/standalone-BwJqDj2Z.js +396 -0
  49. package/chunks/{standalone-LFVgLhia.js → standalone-ByKKqT5L.js} +266 -258
  50. package/chunks/{standalone-BDrQMxLi.js → standalone-CRdDZYeM.js} +1788 -1004
  51. package/chunks/standalone-CRfDOO1x.js +287 -0
  52. package/chunks/{standalone-BvWdpUL3.js → standalone-CVknVdUC.js} +21 -18
  53. package/chunks/standalone-CbPk8bKn.js +580 -0
  54. package/chunks/{standalone-r4ObFvys.js → standalone-Ck63MZzj.js} +218 -216
  55. package/chunks/{standalone-Cu73fzSr.js → standalone-DCFY1MAV.js} +6040 -5820
  56. package/chunks/{standalone-CiaaibTa.js → standalone-DZDGX3aa.js} +174 -174
  57. package/chunks/standalone-DhfgeJIk.js +1012 -0
  58. package/chunks/standalone-DibjA73M.js +6 -0
  59. package/chunks/{standalone-CXniic5x.js → standalone-DtBk_iUz.js} +6 -5
  60. package/chunks/standalone-DxBAyqAu.js +772 -0
  61. package/chunks/standalone-KMQPsNsq.js +2 -0
  62. package/chunks/standalone-MBLSvsrY.js +2 -0
  63. package/chunks/standalone-U0WJwFlG.js +354 -0
  64. package/chunks/{standalone-CNkHsynO.js → standalone-swGs70tD.js} +54 -56
  65. package/chunks/standalone-wgFAVnnm.js +355 -0
  66. package/chunks/standalone-xGV0dqPV.js +689 -0
  67. package/chunks/{table.compiler-C1qjqXaT.js → table.compiler-OWSx5MOq.js} +4 -4
  68. package/chunks/{useFieldName-mWrD_uk_.js → useFieldName-B8iCYyw1.js} +1 -1
  69. package/chunks/{utils-DYYD4Zzf.js → utils-3Igg6xmO.js} +4740 -4737
  70. package/chunks/{view-7fH6mGmY.js → view-DdMLZySj.js} +1988 -1632
  71. package/chunks/{visualization-filters-mVnsnvLP.js → visualization-filters-CzvFHE6M.js} +3158 -2417
  72. package/chunks/{with-html-element-B0Clt4jY.js → with-html-element-DOfkR3C1.js} +3353 -3160
  73. package/definitions.js +2 -2
  74. package/docs/operations/astrato-app-filter-bar.md +1 -1
  75. package/docs/operations/bar.md +303 -2
  76. package/docs/operations/combo.md +262 -1
  77. package/docs/operations/date-picker.md +1 -1
  78. package/docs/operations/distribution-gauge.md +1 -1
  79. package/docs/operations/dot.md +148 -1
  80. package/docs/operations/filter.md +1 -1
  81. package/docs/operations/gauge.md +1 -1
  82. package/docs/operations/heatMap.md +1 -1
  83. package/docs/operations/histogram.md +262 -1
  84. package/docs/operations/iframe.md +1 -1
  85. package/docs/operations/image.md +1 -1
  86. package/docs/operations/index.md +7 -7
  87. package/docs/operations/line.md +262 -1
  88. package/docs/operations/number.md +1 -1
  89. package/docs/operations/pie.md +1 -1
  90. package/docs/operations/radar.md +1 -1
  91. package/docs/operations/sankey.md +1 -1
  92. package/docs/operations/scatter.md +148 -1
  93. package/docs/operations/shape.md +1 -1
  94. package/docs/operations/simpleTextObject.md +1 -1
  95. package/docs/operations/slider.md +1 -1
  96. package/docs/operations/table.md +374 -157
  97. package/docs/operations/tree.md +1 -1
  98. package/docs/operations/treemap.md +1 -1
  99. package/docs/operations/waterfall.md +1 -1
  100. package/docs/operations/word-cloud.md +1 -1
  101. package/getters.js +2 -2
  102. package/index.js +507 -459
  103. package/metadata.js +2 -2
  104. package/operations.js +5 -5
  105. package/package.json +72 -67
  106. package/src/definitions/index.d.ts +1 -1
  107. package/src/definitions/model/definitions/available-fields.d.ts +2 -2
  108. package/src/definitions/model/definitions/compilers/compile.d.ts +1 -0
  109. package/src/definitions/model/definitions/data-item-resolution.d.ts +3 -3
  110. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +188 -2
  111. package/src/definitions/model/definitions/index.d.ts +2 -1
  112. package/src/definitions/model/definitions/schema-registry.d.ts +305 -0
  113. package/src/definitions/model/definitions/schemas/bar.schema.d.ts +2 -0
  114. package/src/definitions/model/definitions/schemas/common.schema.d.ts +4 -3
  115. package/src/definitions/model/definitions/schemas/index.d.ts +1 -0
  116. package/src/definitions/model/definitions/schemas/map.schema.d.ts +590 -0
  117. package/src/definitions/model/definitions/types/compilation.types.d.ts +7 -2
  118. package/src/definitions/model/definitions/types/definition.types.d.ts +2 -2
  119. package/src/definitions/model/definitions/types/index.d.ts +1 -1
  120. package/src/index.d.ts +1 -1
  121. package/src/operations/index.d.ts +1 -1
  122. package/src/types.d.ts +45 -41
  123. package/chunks/FieldTypeIcon-pSVQFemC.js +0 -22
  124. package/chunks/ToggleButton-Br9HCPCv.js +0 -150
  125. package/chunks/color-rules-CN7TcGrC.js +0 -6
  126. package/chunks/color-settings-3VRlf_Vw.js +0 -6
  127. package/chunks/handlers-CMbyj5y1.js +0 -12930
  128. package/chunks/isEqual-DBg_b35N.js +0 -12
  129. package/chunks/label-format-type-weq1XfcX.js +0 -8
  130. package/chunks/operations-HSqnCRvv.js +0 -26324
  131. package/chunks/shared-DFoJxjVN.js +0 -1218
  132. package/chunks/standalone-530a5lvf.js +0 -1003
  133. package/chunks/standalone-5DnapeHH.js +0 -420
  134. package/chunks/standalone-B4jrf4KE.js +0 -354
  135. package/chunks/standalone-B6s_xG2u.js +0 -354
  136. package/chunks/standalone-BMoJXGYe.js +0 -2
  137. package/chunks/standalone-BfvGggeM2.js +0 -355
  138. package/chunks/standalone-CMJJIi9v.js +0 -2
  139. package/chunks/standalone-C_Jd4gkj.js +0 -6
  140. package/chunks/standalone-DBeXQrwH.js +0 -468
  141. package/chunks/standalone-DMCwtebn.js +0 -396
  142. package/chunks/standalone-DpSRmAWx.js +0 -287
  143. package/chunks/standalone-kzAhwH19.js +0 -689
  144. package/chunks/standalone-mb7LwEiq.js +0 -3874
  145. /package/chunks/{src-BOS6SqkZ2.js → src-BOS6SqkZ.js} +0 -0
@@ -39,15 +39,17 @@ 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 resolve a definition `ref`. Dimension and measure references provide `dataItemInternalKey` and `dataItemUniqueSignature`; map layer references provide `kind: 'layer'` and `id` for the operation's `layer` selector. Bar charts return only data-item references, so this known bar definition can use a data-item type assertion. Code handling arbitrary visualization types should narrow references by `kind`.
43
43
 
44
44
  ```ts
45
45
  import { applyOperations } from '@astrato-io/visualizations/operations';
46
+ import type { VisualizationResolvedDataItemReference } from '@astrato-io/visualizations/definitions';
46
47
 
47
48
  const compilation = await compileVisualizationDefinition({ definition, availableFields, baseVSpec });
48
49
  if (!compilation.success) throw new Error(JSON.stringify(compilation.issues));
49
50
 
50
- const { dataItemInternalKey, dataItemUniqueSignature } = compilation.resolvedRefs.sales;
51
+ const { dataItemInternalKey, dataItemUniqueSignature } = compilation.resolvedRefs
52
+ .sales as VisualizationResolvedDataItemReference;
51
53
  const finished = await applyOperations({
52
54
  instance: { id: 'sales-by-manufacturer', type: 'bar', vSpec: compilation.vSpec },
53
55
  operationRequests: [
@@ -102,39 +104,322 @@ Avoid finishing a chart by applying operations one at a time after it is mounted
102
104
 
103
105
  ## Capability Index
104
106
 
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` |
107
+ | Type | Name | Data requirements | Supported features |
108
+ | ------------------------ | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
109
+ | `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` |
110
+ | `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` |
111
+ | `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` |
112
+ | `distribution-gauge` | Distribution gauge | Zero or one dimension. Between one and twenty measures. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `display-mode`, `legend` |
113
+ | `dot` | Dot chart | Exactly two dimensions. Exactly one measure. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `axes`, `axis-range`, `legend`, `orientation` |
114
+ | `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` |
115
+ | `heatMap` | Heat map | Exactly two dimensions. One or two measures. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `axes`, `legend`, `query-limit`, `sorting` |
116
+ | `histogram` | Histogram | Exactly one numeric dimension. No caller-supplied measures. | `axes`, `axis-bands`, `axis-range`, `dimensions`, `filters`, `legend`, `orientation`, `value-formatting` |
117
+ | `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` |
118
+ | `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` |
119
+ | `pie` | Pie chart | Exactly one dimension. One or two measures. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `legend`, `query-limit`, `sorting` |
120
+ | `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` |
121
+ | `treemap` | Treemap | Between one and ten dimensions. Exactly one measure. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring`, `legend` |
122
+ | `sankey` | Sankey chart | Between two and fifteen dimensions. Exactly one measure. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring` |
123
+ | `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` |
124
+ | `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` |
125
+ | `waterfall` | Waterfall chart | Between one and one hundred measures. | `axes`, `axis-bands`, `axis-range`, `data-labels`, `filters`, `measures`, `orientation`, `value-formatting` |
126
+ | `word-cloud` | Word cloud | Exactly one dimension. Exactly one measure. | `dimensions`, `filters`, `measures`, `value-formatting`, `conditional-coloring` |
127
+ | `date-picker` | Date picker | Exactly one field. | `dimensions`, `filter-settings` |
128
+ | `filter` | Filter | Exactly one field. | `dimensions`, `filter-settings` |
129
+ | `iframe` | Iframe | No query data. | `content` |
130
+ | `image` | Image | No query data. | `content`, `object-settings` |
131
+ | `number` | Number | Exactly one measure. | `filters`, `measures`, `value-formatting` |
132
+ | `shape` | Shape | No query data. | `object-settings` |
133
+ | `simpleTextObject` | Text object | No query data. | `content`, `object-settings` |
134
+ | `atomic-input` | Atomic input | No query data; variable-backed input. | `input-settings` |
135
+ | `astrato-app-filter-bar` | Astrato App Filter Bar | No query data; uses field metadata and selections supplied by the host. | `selection-settings` |
136
+ | `slider` | Slider | Exactly one field. | `dimensions`, `filter-settings` |
137
+
138
+ ## `map`: Map
139
+
140
+ Layered geographic visualization with background maps, images, points, shapes, heatmaps and connections.
141
+
142
+ **Data requirements**
143
+
144
+ - Point, shape and heatmap layers require one dimension identifying locations. Connection layers require source and destination dimensions.
145
+ - Location measures use geo for the first location and thirdGeo for a connection destination. For latLng, these are latitude; secondGeo and fourthGeo supply longitude.
146
+ - Shape layers require a GeoJSON measure. Other data layers support latLng, geoPoint or geoHash.
147
+ - 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.
148
+
149
+ **Supported features**
150
+
151
+ `dimensions`, `measures`, `filters`, `data-points`, `data-labels`, `object-settings`
152
+
153
+ **Constraints and semantics**
154
+
155
+ - 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.
156
+ - Layer and data-item references share one namespace and must all be unique across the definition. Display names may repeat.
157
+ - resolvedRefs contains both layer and data-item references. A layer entry has kind "layer" and id; pass that id as the layer selector in map operations. Dimension and measure entries retain their data-item keys. Check kind before accessing an entry.
158
+ - Raw measure fields require an available aggregation. Semantic measures and calculations supply their own aggregation.
159
+ - 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.
160
+ - Definitions cover initial data bindings, static filters, view and basic presentation. Additional styling and interactions use the existing map operations.
161
+ - Compile only against an empty or unconfigured default map vSpec. HERE backgrounds require an API key.
162
+
163
+ **Canonical example**
164
+
165
+ ```json
166
+ {
167
+ "type": "map",
168
+ "version": 1,
169
+ "layers": [
170
+ {
171
+ "type": "point",
172
+ "ref": "locations",
173
+ "locationType": "latLng",
174
+ "data": {
175
+ "dimensions": [
176
+ {
177
+ "ref": "location",
178
+ "fieldKey": "[Locations].[Name]"
179
+ }
180
+ ],
181
+ "measures": [
182
+ {
183
+ "ref": "locationLatitude",
184
+ "fieldKey": "[Locations].[Latitude]",
185
+ "aggregation": "AVG",
186
+ "role": "geo"
187
+ },
188
+ {
189
+ "ref": "locationLongitude",
190
+ "fieldKey": "[Locations].[Longitude]",
191
+ "aggregation": "AVG",
192
+ "role": "secondGeo"
193
+ }
194
+ ]
195
+ },
196
+ "presentation": {
197
+ "color": "#2563EB",
198
+ "sizing": {
199
+ "size": 12
200
+ }
201
+ }
202
+ },
203
+ {
204
+ "type": "map",
205
+ "ref": "basemap",
206
+ "presentation": {
207
+ "mapType": "openStreetMap"
208
+ }
209
+ }
210
+ ]
211
+ }
212
+ ```
213
+
214
+ **Additional scenarios**
215
+
216
+ ### Heatmap
217
+
218
+ ```json
219
+ {
220
+ "type": "map",
221
+ "version": 1,
222
+ "layers": [
223
+ {
224
+ "type": "heatMap",
225
+ "ref": "density",
226
+ "locationType": "latLng",
227
+ "data": {
228
+ "dimensions": [
229
+ {
230
+ "ref": "location",
231
+ "fieldKey": "[Locations].[Name]"
232
+ }
233
+ ],
234
+ "measures": [
235
+ {
236
+ "ref": "densityLatitude",
237
+ "fieldKey": "[Locations].[Latitude]",
238
+ "aggregation": "AVG",
239
+ "role": "geo"
240
+ },
241
+ {
242
+ "ref": "densityLongitude",
243
+ "fieldKey": "[Locations].[Longitude]",
244
+ "aggregation": "AVG",
245
+ "role": "secondGeo"
246
+ }
247
+ ]
248
+ },
249
+ "presentation": {
250
+ "heat": {
251
+ "radius": 25,
252
+ "blur": 15
253
+ },
254
+ "value": {
255
+ "type": "fixed",
256
+ "value": 1
257
+ }
258
+ }
259
+ },
260
+ {
261
+ "type": "map",
262
+ "ref": "basemap",
263
+ "presentation": {
264
+ "mapType": "openStreetMap"
265
+ }
266
+ }
267
+ ]
268
+ }
269
+ ```
270
+
271
+ ### Connections
272
+
273
+ ```json
274
+ {
275
+ "type": "map",
276
+ "version": 1,
277
+ "layers": [
278
+ {
279
+ "type": "pointConnection",
280
+ "ref": "routes",
281
+ "locationType": "latLng",
282
+ "secondLocationType": "latLng",
283
+ "data": {
284
+ "dimensions": [
285
+ {
286
+ "ref": "origin",
287
+ "fieldKey": "[Locations].[Name]"
288
+ },
289
+ {
290
+ "ref": "destination",
291
+ "fieldKey": "[Locations].[Destination]"
292
+ }
293
+ ],
294
+ "measures": [
295
+ {
296
+ "ref": "originLatitude",
297
+ "fieldKey": "[Locations].[Latitude]",
298
+ "aggregation": "AVG",
299
+ "role": "geo"
300
+ },
301
+ {
302
+ "ref": "originLongitude",
303
+ "fieldKey": "[Locations].[Longitude]",
304
+ "aggregation": "AVG",
305
+ "role": "secondGeo"
306
+ },
307
+ {
308
+ "ref": "destinationLatitude",
309
+ "fieldKey": "[Locations].[Destination Latitude]",
310
+ "aggregation": "AVG",
311
+ "role": "thirdGeo"
312
+ },
313
+ {
314
+ "ref": "destinationLongitude",
315
+ "fieldKey": "[Locations].[Destination Longitude]",
316
+ "aggregation": "AVG",
317
+ "role": "fourthGeo"
318
+ }
319
+ ]
320
+ },
321
+ "presentation": {
322
+ "useGeodesicLines": true,
323
+ "arrow": {
324
+ "show": true
325
+ }
326
+ }
327
+ },
328
+ {
329
+ "type": "map",
330
+ "ref": "basemap",
331
+ "presentation": {
332
+ "mapType": "openStreetMap"
333
+ }
334
+ }
335
+ ]
336
+ }
337
+ ```
338
+
339
+ ### GeoJSON shapes
340
+
341
+ ```json
342
+ {
343
+ "type": "map",
344
+ "version": 1,
345
+ "layers": [
346
+ {
347
+ "type": "shape",
348
+ "ref": "regions",
349
+ "data": {
350
+ "dimensions": [
351
+ {
352
+ "ref": "region",
353
+ "fieldKey": "[Locations].[Name]"
354
+ }
355
+ ],
356
+ "measures": [
357
+ {
358
+ "ref": "boundary",
359
+ "fieldKey": "[Locations].[Boundary]",
360
+ "aggregation": "ANY_VALUE",
361
+ "role": "geo"
362
+ }
363
+ ]
364
+ },
365
+ "presentation": {
366
+ "color": "#2563EB",
367
+ "opacity": 60,
368
+ "strokeEnabled": true
369
+ }
370
+ },
371
+ {
372
+ "type": "map",
373
+ "ref": "basemap",
374
+ "presentation": {
375
+ "mapType": "openStreetMap"
376
+ }
377
+ }
378
+ ]
379
+ }
380
+ ```
381
+
382
+ ### Image overlay
383
+
384
+ ```json
385
+ {
386
+ "type": "map",
387
+ "version": 1,
388
+ "layers": [
389
+ {
390
+ "type": "image",
391
+ "ref": "overlay",
392
+ "image": {
393
+ "imageUrl": "https://example.com/overlay.png"
394
+ },
395
+ "position": {
396
+ "topLeftLatitude": 52,
397
+ "topLeftLongitude": 20,
398
+ "bottomRightLatitude": 51,
399
+ "bottomRightLongitude": 21
400
+ },
401
+ "opacity": 60
402
+ },
403
+ {
404
+ "type": "map",
405
+ "ref": "basemap",
406
+ "presentation": {
407
+ "mapType": "openStreetMap"
408
+ }
409
+ }
410
+ ],
411
+ "view": {
412
+ "latitude": 51.5,
413
+ "longitude": 20.5,
414
+ "zoom": 7,
415
+ "zoomMode": "manual"
416
+ }
417
+ }
418
+ ```
134
419
 
135
420
  ## `bar`: Bar chart
136
421
 
137
- Categorical comparison chart with sorting, limiting, per-measure axes, labels, and orientation controls.
422
+ Categorical comparison chart with sorting, limiting, per-measure axes, labels, layout, and orientation controls.
138
423
 
139
424
  **Data requirements**
140
425
 
@@ -153,6 +438,8 @@ Categorical comparison chart with sorting, limiting, per-measure axes, labels, a
153
438
  - 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
439
  - 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
440
  - 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.
441
+ - 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.
442
+ - 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
443
 
157
444
  **Canonical example**
158
445
 
@@ -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 { Da as t } from "./visualization-filters-CzvFHE6M.js";
3
+ import { W as n, ci as r, si as i, sn as a, zr as o } from "./utils-3Igg6xmO.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",