@sqlrooms/mosaic 0.29.0-rc.7 → 0.29.0-rc.8

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 (344) hide show
  1. package/LICENSE.md +2 -1
  2. package/README.md +134 -0
  3. package/dist/MosaicSlice.d.ts +1 -0
  4. package/dist/MosaicSlice.d.ts.map +1 -1
  5. package/dist/MosaicSlice.js.map +1 -1
  6. package/dist/VgPlotChart.d.ts.map +1 -1
  7. package/dist/VgPlotChart.js +9 -3
  8. package/dist/VgPlotChart.js.map +1 -1
  9. package/dist/ai/ai.d.ts +9 -4
  10. package/dist/ai/ai.d.ts.map +1 -1
  11. package/dist/ai/ai.js +91 -49
  12. package/dist/ai/ai.js.map +1 -1
  13. package/dist/ai.d.ts.map +1 -1
  14. package/dist/ai.js.map +1 -1
  15. package/dist/charts/MosaicChart.d.ts +3 -1
  16. package/dist/charts/MosaicChart.d.ts.map +1 -1
  17. package/dist/charts/MosaicChart.js +2 -2
  18. package/dist/charts/MosaicChart.js.map +1 -1
  19. package/dist/charts/MosaicChartError.d.ts +8 -2
  20. package/dist/charts/MosaicChartError.d.ts.map +1 -1
  21. package/dist/charts/MosaicChartError.js +29 -3
  22. package/dist/charts/MosaicChartError.js.map +1 -1
  23. package/dist/charts/MosaicChartSettingsButton.d.ts +15 -0
  24. package/dist/charts/MosaicChartSettingsButton.d.ts.map +1 -0
  25. package/dist/charts/MosaicChartSettingsButton.js +7 -0
  26. package/dist/charts/MosaicChartSettingsButton.js.map +1 -0
  27. package/dist/charts/MosaicChartView.d.ts +2 -0
  28. package/dist/charts/MosaicChartView.d.ts.map +1 -1
  29. package/dist/charts/MosaicChartView.js +20 -7
  30. package/dist/charts/MosaicChartView.js.map +1 -1
  31. package/dist/charts/chart-settings/MosaicChartSettings.d.ts.map +1 -1
  32. package/dist/charts/chart-settings/MosaicChartSettings.js +3 -3
  33. package/dist/charts/chart-settings/MosaicChartSettings.js.map +1 -1
  34. package/dist/charts/chart-settings/MosaicChartSettingsPanel.js +1 -1
  35. package/dist/charts/chart-settings/MosaicChartSettingsPanel.js.map +1 -1
  36. package/dist/charts/chart-settings/MosaicChartTypeSelector.d.ts.map +1 -1
  37. package/dist/charts/chart-settings/MosaicChartTypeSelector.js +11 -4
  38. package/dist/charts/chart-settings/MosaicChartTypeSelector.js.map +1 -1
  39. package/dist/charts/chart-types/base-types.d.ts +17 -6
  40. package/dist/charts/chart-types/base-types.d.ts.map +1 -1
  41. package/dist/charts/chart-types/base-types.js +3 -0
  42. package/dist/charts/chart-types/base-types.js.map +1 -1
  43. package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.d.ts.map +1 -1
  44. package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.js +3 -8
  45. package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.js.map +1 -1
  46. package/dist/charts/chart-types/chart-config.d.ts +3 -1
  47. package/dist/charts/chart-types/chart-config.d.ts.map +1 -1
  48. package/dist/charts/chart-types/chart-config.js +2 -2
  49. package/dist/charts/chart-types/chart-config.js.map +1 -1
  50. package/dist/charts/chart-types/count-plot/spec.d.ts +2 -1
  51. package/dist/charts/chart-types/count-plot/spec.d.ts.map +1 -1
  52. package/dist/charts/chart-types/count-plot/spec.js +65 -34
  53. package/dist/charts/chart-types/count-plot/spec.js.map +1 -1
  54. package/dist/charts/chart-types/count-plot/tool.js +1 -1
  55. package/dist/charts/chart-types/count-plot/tool.js.map +1 -1
  56. package/dist/charts/chart-types/createDefaultChartTypes.js +2 -2
  57. package/dist/charts/chart-types/createDefaultChartTypes.js.map +1 -1
  58. package/dist/charts/chart-types/custom-spec/spec.d.ts +2 -1
  59. package/dist/charts/chart-types/custom-spec/spec.d.ts.map +1 -1
  60. package/dist/charts/chart-types/custom-spec/spec.js +16 -12
  61. package/dist/charts/chart-types/custom-spec/spec.js.map +1 -1
  62. package/dist/charts/chart-types/errors.d.ts +25 -0
  63. package/dist/charts/chart-types/errors.d.ts.map +1 -1
  64. package/dist/charts/chart-types/errors.js +38 -0
  65. package/dist/charts/chart-types/errors.js.map +1 -1
  66. package/dist/charts/chart-types/heatmap/spec.d.ts +2 -1
  67. package/dist/charts/chart-types/heatmap/spec.d.ts.map +1 -1
  68. package/dist/charts/chart-types/heatmap/spec.js +53 -21
  69. package/dist/charts/chart-types/heatmap/spec.js.map +1 -1
  70. package/dist/charts/chart-types/heatmap/tool.js +2 -2
  71. package/dist/charts/chart-types/heatmap/tool.js.map +1 -1
  72. package/dist/charts/chart-types/histogram/HistogramSettings.d.ts.map +1 -1
  73. package/dist/charts/chart-types/histogram/HistogramSettings.js +3 -1
  74. package/dist/charts/chart-types/histogram/HistogramSettings.js.map +1 -1
  75. package/dist/charts/chart-types/histogram/schema.d.ts +2 -0
  76. package/dist/charts/chart-types/histogram/schema.d.ts.map +1 -1
  77. package/dist/charts/chart-types/histogram/schema.js +1 -0
  78. package/dist/charts/chart-types/histogram/schema.js.map +1 -1
  79. package/dist/charts/chart-types/histogram/spec.d.ts +2 -1
  80. package/dist/charts/chart-types/histogram/spec.d.ts.map +1 -1
  81. package/dist/charts/chart-types/histogram/spec.js +50 -27
  82. package/dist/charts/chart-types/histogram/spec.js.map +1 -1
  83. package/dist/charts/chart-types/histogram/tool.d.ts +2 -0
  84. package/dist/charts/chart-types/histogram/tool.d.ts.map +1 -1
  85. package/dist/charts/chart-types/histogram/tool.js +1 -1
  86. package/dist/charts/chart-types/histogram/tool.js.map +1 -1
  87. package/dist/charts/chart-types/index.d.ts +4 -4
  88. package/dist/charts/chart-types/index.js +4 -4
  89. package/dist/charts/chart-types/index.js.map +1 -1
  90. package/dist/charts/chart-types/line-chart/LineChartSettings.d.ts.map +1 -1
  91. package/dist/charts/chart-types/line-chart/LineChartSettings.js +4 -13
  92. package/dist/charts/chart-types/line-chart/LineChartSettings.js.map +1 -1
  93. package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.d.ts +7 -0
  94. package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.d.ts.map +1 -0
  95. package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.js +22 -0
  96. package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.js.map +1 -0
  97. package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.d.ts +7 -0
  98. package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.d.ts.map +1 -0
  99. package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.js +42 -0
  100. package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.js.map +1 -0
  101. package/dist/charts/chart-types/line-chart/schema.d.ts +2 -0
  102. package/dist/charts/chart-types/line-chart/schema.d.ts.map +1 -1
  103. package/dist/charts/chart-types/line-chart/schema.js +5 -0
  104. package/dist/charts/chart-types/line-chart/schema.js.map +1 -1
  105. package/dist/charts/chart-types/line-chart/spec.d.ts +2 -1
  106. package/dist/charts/chart-types/line-chart/spec.d.ts.map +1 -1
  107. package/dist/charts/chart-types/line-chart/spec.js +97 -65
  108. package/dist/charts/chart-types/line-chart/spec.js.map +1 -1
  109. package/dist/charts/chart-types/line-chart/tool.d.ts +2 -0
  110. package/dist/charts/chart-types/line-chart/tool.d.ts.map +1 -1
  111. package/dist/charts/chart-types/line-chart/tool.js +1 -1
  112. package/dist/charts/chart-types/line-chart/tool.js.map +1 -1
  113. package/dist/charts/chart-types/line-chart/utils.d.ts +7 -0
  114. package/dist/charts/chart-types/line-chart/utils.d.ts.map +1 -0
  115. package/dist/charts/chart-types/line-chart/utils.js +17 -0
  116. package/dist/charts/chart-types/line-chart/utils.js.map +1 -0
  117. package/dist/charts/chart-types/mosaicChartTypes.d.ts +4 -2
  118. package/dist/charts/chart-types/mosaicChartTypes.d.ts.map +1 -1
  119. package/dist/charts/chart-types/mosaicChartTypes.js +2 -2
  120. package/dist/charts/chart-types/mosaicChartTypes.js.map +1 -1
  121. package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.d.ts +3 -0
  122. package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.d.ts.map +1 -0
  123. package/dist/charts/chart-types/{bubble-chart/BubbleChartSettings.js → scatter-plot/ScatterPlotSettings.js} +4 -4
  124. package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.js.map +1 -0
  125. package/dist/charts/chart-types/scatter-plot/definition.d.ts +4 -0
  126. package/dist/charts/chart-types/scatter-plot/definition.d.ts.map +1 -0
  127. package/dist/charts/chart-types/scatter-plot/definition.js +24 -0
  128. package/dist/charts/chart-types/scatter-plot/definition.js.map +1 -0
  129. package/dist/charts/chart-types/{bubble-chart → scatter-plot}/schema.d.ts +5 -5
  130. package/dist/charts/chart-types/scatter-plot/schema.d.ts.map +1 -0
  131. package/dist/charts/chart-types/{bubble-chart → scatter-plot}/schema.js +5 -5
  132. package/dist/charts/chart-types/scatter-plot/schema.js.map +1 -0
  133. package/dist/charts/chart-types/scatter-plot/spec.d.ts +5 -0
  134. package/dist/charts/chart-types/scatter-plot/spec.d.ts.map +1 -0
  135. package/dist/charts/chart-types/scatter-plot/spec.js +81 -0
  136. package/dist/charts/chart-types/scatter-plot/spec.js.map +1 -0
  137. package/dist/charts/chart-types/{bubble-chart → scatter-plot}/tool.d.ts +3 -3
  138. package/dist/charts/chart-types/{bubble-chart → scatter-plot}/tool.d.ts.map +1 -1
  139. package/dist/charts/chart-types/{bubble-chart → scatter-plot}/tool.js +17 -13
  140. package/dist/charts/chart-types/scatter-plot/tool.js.map +1 -0
  141. package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.d.ts.map +1 -1
  142. package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.js +12 -5
  143. package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.js.map +1 -1
  144. package/dist/charts/dashboard/MosaicDashboardChartRenderer.d.ts.map +1 -1
  145. package/dist/charts/dashboard/MosaicDashboardChartRenderer.js +2 -2
  146. package/dist/charts/dashboard/MosaicDashboardChartRenderer.js.map +1 -1
  147. package/dist/charts/useChartDataPolicy.d.ts.map +1 -1
  148. package/dist/charts/useChartDataPolicy.js +2 -1
  149. package/dist/charts/useChartDataPolicy.js.map +1 -1
  150. package/dist/charts/useChartPanelClients.d.ts +8 -0
  151. package/dist/charts/useChartPanelClients.d.ts.map +1 -0
  152. package/dist/charts/useChartPanelClients.js +22 -0
  153. package/dist/charts/useChartPanelClients.js.map +1 -0
  154. package/dist/charts/useMosaicChartRenderContext.d.ts +2 -3
  155. package/dist/charts/useMosaicChartRenderContext.d.ts.map +1 -1
  156. package/dist/charts/useMosaicChartRenderContext.js +15 -15
  157. package/dist/charts/useMosaicChartRenderContext.js.map +1 -1
  158. package/dist/charts/worksheet/ChartBlockHeader.d.ts.map +1 -1
  159. package/dist/charts/worksheet/ChartBlockHeader.js +4 -3
  160. package/dist/charts/worksheet/ChartBlockHeader.js.map +1 -1
  161. package/dist/charts/worksheet/ChartBlockRenderer.d.ts.map +1 -1
  162. package/dist/charts/worksheet/ChartBlockRenderer.js +3 -13
  163. package/dist/charts/worksheet/ChartBlockRenderer.js.map +1 -1
  164. package/dist/column-types-utils.d.ts.map +1 -1
  165. package/dist/column-types-utils.js +12 -4
  166. package/dist/column-types-utils.js.map +1 -1
  167. package/dist/components/AggregationSelector.d.ts.map +1 -1
  168. package/dist/components/AggregationSelector.js +9 -2
  169. package/dist/components/AggregationSelector.js.map +1 -1
  170. package/dist/components/BlockCaptionEditor.d.ts +20 -0
  171. package/dist/components/BlockCaptionEditor.d.ts.map +1 -0
  172. package/dist/components/BlockCaptionEditor.js +15 -0
  173. package/dist/components/BlockCaptionEditor.js.map +1 -0
  174. package/dist/components/ColorSelector.d.ts +12 -0
  175. package/dist/components/ColorSelector.d.ts.map +1 -0
  176. package/dist/components/ColorSelector.js +14 -0
  177. package/dist/components/ColorSelector.js.map +1 -0
  178. package/dist/components/ColumnSelector.d.ts +1 -0
  179. package/dist/components/ColumnSelector.d.ts.map +1 -1
  180. package/dist/components/ColumnSelector.js +2 -2
  181. package/dist/components/ColumnSelector.js.map +1 -1
  182. package/dist/components/Combobox.d.ts +45 -0
  183. package/dist/components/Combobox.d.ts.map +1 -0
  184. package/dist/components/Combobox.js +58 -0
  185. package/dist/components/Combobox.js.map +1 -0
  186. package/dist/components/FieldSelectorInput.d.ts +1 -0
  187. package/dist/components/FieldSelectorInput.d.ts.map +1 -1
  188. package/dist/components/FieldSelectorInput.js +4 -9
  189. package/dist/components/FieldSelectorInput.js.map +1 -1
  190. package/dist/components/MultiFieldSelector.d.ts +4 -1
  191. package/dist/components/MultiFieldSelector.d.ts.map +1 -1
  192. package/dist/components/MultiFieldSelector.js +4 -13
  193. package/dist/components/MultiFieldSelector.js.map +1 -1
  194. package/dist/components/TemporalGranularitySelector.d.ts.map +1 -1
  195. package/dist/components/TemporalGranularitySelector.js +13 -9
  196. package/dist/components/TemporalGranularitySelector.js.map +1 -1
  197. package/dist/components/useCombobox.d.ts +23 -0
  198. package/dist/components/useCombobox.d.ts.map +1 -0
  199. package/dist/components/useCombobox.js +26 -0
  200. package/dist/components/useCombobox.js.map +1 -0
  201. package/dist/constants/chart-colors.d.ts +3 -0
  202. package/dist/constants/chart-colors.d.ts.map +1 -0
  203. package/dist/constants/chart-colors.js +5 -0
  204. package/dist/constants/chart-colors.js.map +1 -0
  205. package/dist/dashboard/DefaultMosaicDashboardBlock.d.ts +2 -1
  206. package/dist/dashboard/DefaultMosaicDashboardBlock.d.ts.map +1 -1
  207. package/dist/dashboard/DefaultMosaicDashboardBlock.js +1 -1
  208. package/dist/dashboard/DefaultMosaicDashboardBlock.js.map +1 -1
  209. package/dist/dashboard/MosaicDashboardSlice.d.ts +22 -4
  210. package/dist/dashboard/MosaicDashboardSlice.d.ts.map +1 -1
  211. package/dist/dashboard/MosaicDashboardSlice.js +55 -0
  212. package/dist/dashboard/MosaicDashboardSlice.js.map +1 -1
  213. package/dist/dashboard/components/ResetFiltersButton.d.ts +14 -0
  214. package/dist/dashboard/components/ResetFiltersButton.d.ts.map +1 -0
  215. package/dist/dashboard/components/ResetFiltersButton.js +15 -0
  216. package/dist/dashboard/components/ResetFiltersButton.js.map +1 -0
  217. package/dist/dashboard/dashboard-types.d.ts +9 -3
  218. package/dist/dashboard/dashboard-types.d.ts.map +1 -1
  219. package/dist/dashboard/hooks/useDashboardResetFilters.d.ts +14 -0
  220. package/dist/dashboard/hooks/useDashboardResetFilters.d.ts.map +1 -0
  221. package/dist/dashboard/hooks/useDashboardResetFilters.js +39 -0
  222. package/dist/dashboard/hooks/useDashboardResetFilters.js.map +1 -0
  223. package/dist/dashboard/hooks/usePanelResetFilters.d.ts +16 -0
  224. package/dist/dashboard/hooks/usePanelResetFilters.d.ts.map +1 -0
  225. package/dist/dashboard/hooks/usePanelResetFilters.js +47 -0
  226. package/dist/dashboard/hooks/usePanelResetFilters.js.map +1 -0
  227. package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.d.ts.map +1 -1
  228. package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.js +3 -3
  229. package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.js.map +1 -1
  230. package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.d.ts +7 -0
  231. package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.d.ts.map +1 -0
  232. package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.js +18 -0
  233. package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.js.map +1 -0
  234. package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.d.ts.map +1 -1
  235. package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.js +4 -32
  236. package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.js.map +1 -1
  237. package/dist/dashboard/toolbar/MosaicDashboardToolbar.d.ts +2 -2
  238. package/dist/dashboard/toolbar/MosaicDashboardToolbar.d.ts.map +1 -1
  239. package/dist/dashboard/toolbar/MosaicDashboardToolbar.js +12 -10
  240. package/dist/dashboard/toolbar/MosaicDashboardToolbar.js.map +1 -1
  241. package/dist/dashboard/usePanelClientRegistration.d.ts +7 -0
  242. package/dist/dashboard/usePanelClientRegistration.d.ts.map +1 -0
  243. package/dist/dashboard/usePanelClientRegistration.js +30 -0
  244. package/dist/dashboard/usePanelClientRegistration.js.map +1 -0
  245. package/dist/dashboard/usePanelClients.d.ts +7 -0
  246. package/dist/dashboard/usePanelClients.d.ts.map +1 -0
  247. package/dist/dashboard/usePanelClients.js +13 -0
  248. package/dist/dashboard/usePanelClients.js.map +1 -0
  249. package/dist/data-table-explorer/DataTableExplorer.d.ts +4 -2
  250. package/dist/data-table-explorer/DataTableExplorer.d.ts.map +1 -1
  251. package/dist/data-table-explorer/DataTableExplorer.js +4 -4
  252. package/dist/data-table-explorer/DataTableExplorer.js.map +1 -1
  253. package/dist/data-table-explorer/DataTableExplorerCategoryClient.d.ts.map +1 -1
  254. package/dist/data-table-explorer/DataTableExplorerCategoryClient.js +1 -0
  255. package/dist/data-table-explorer/DataTableExplorerCategoryClient.js.map +1 -1
  256. package/dist/data-table-explorer/createDataTableExplorerStore.d.ts +3 -0
  257. package/dist/data-table-explorer/createDataTableExplorerStore.d.ts.map +1 -1
  258. package/dist/data-table-explorer/createDataTableExplorerStore.js +6 -0
  259. package/dist/data-table-explorer/createDataTableExplorerStore.js.map +1 -1
  260. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.d.ts +4 -0
  261. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.d.ts.map +1 -0
  262. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.js +13 -0
  263. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.js.map +1 -0
  264. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.d.ts.map +1 -1
  265. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.js +22 -7
  266. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.js.map +1 -1
  267. package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.d.ts +13 -0
  268. package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.d.ts.map +1 -0
  269. package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.js +32 -0
  270. package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.js.map +1 -0
  271. package/dist/data-table-explorer/dataTableExplorerController.d.ts +5 -1
  272. package/dist/data-table-explorer/dataTableExplorerController.d.ts.map +1 -1
  273. package/dist/data-table-explorer/dataTableExplorerController.js +5 -2
  274. package/dist/data-table-explorer/dataTableExplorerController.js.map +1 -1
  275. package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.d.ts +12 -0
  276. package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.d.ts.map +1 -0
  277. package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.js +19 -0
  278. package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.js.map +1 -0
  279. package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.d.ts +30 -0
  280. package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.d.ts.map +1 -0
  281. package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.js +120 -0
  282. package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.js.map +1 -0
  283. package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.d.ts +28 -0
  284. package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.d.ts.map +1 -0
  285. package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.js +40 -0
  286. package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.js.map +1 -0
  287. package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.d.ts +13 -0
  288. package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.d.ts.map +1 -0
  289. package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.js +40 -0
  290. package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.js.map +1 -0
  291. package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.d.ts +18 -0
  292. package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.d.ts.map +1 -0
  293. package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.js +23 -0
  294. package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.js.map +1 -0
  295. package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.d.ts +27 -0
  296. package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.d.ts.map +1 -0
  297. package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.js +28 -0
  298. package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.js.map +1 -0
  299. package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.d.ts +15 -0
  300. package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.d.ts.map +1 -0
  301. package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.js +21 -0
  302. package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.js.map +1 -0
  303. package/dist/data-table-explorer/types.d.ts +6 -3
  304. package/dist/data-table-explorer/types.d.ts.map +1 -1
  305. package/dist/data-table-explorer/types.js.map +1 -1
  306. package/dist/data-table-explorer/useDataTableExplorer.d.ts.map +1 -1
  307. package/dist/data-table-explorer/useDataTableExplorer.js +12 -275
  308. package/dist/data-table-explorer/useDataTableExplorer.js.map +1 -1
  309. package/dist/data-table-explorer/worksheet/DataTableBlockHeader.d.ts +1 -0
  310. package/dist/data-table-explorer/worksheet/DataTableBlockHeader.d.ts.map +1 -1
  311. package/dist/data-table-explorer/worksheet/DataTableBlockHeader.js +4 -2
  312. package/dist/data-table-explorer/worksheet/DataTableBlockHeader.js.map +1 -1
  313. package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.d.ts.map +1 -1
  314. package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.js +3 -3
  315. package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.js.map +1 -1
  316. package/dist/index.d.ts +8 -4
  317. package/dist/index.d.ts.map +1 -1
  318. package/dist/index.js +7 -3
  319. package/dist/index.js.map +1 -1
  320. package/dist/useVgPlotChartRender.d.ts.map +1 -1
  321. package/dist/useVgPlotChartRender.js +125 -24
  322. package/dist/useVgPlotChartRender.js.map +1 -1
  323. package/dist/useVgPlotChartRetention.d.ts +11 -0
  324. package/dist/useVgPlotChartRetention.d.ts.map +1 -1
  325. package/dist/useVgPlotChartRetention.js.map +1 -1
  326. package/package.json +14 -14
  327. package/dist/charts/chart-types/bubble-chart/BubbleChartSettings.d.ts +0 -3
  328. package/dist/charts/chart-types/bubble-chart/BubbleChartSettings.d.ts.map +0 -1
  329. package/dist/charts/chart-types/bubble-chart/BubbleChartSettings.js.map +0 -1
  330. package/dist/charts/chart-types/bubble-chart/definition.d.ts +0 -4
  331. package/dist/charts/chart-types/bubble-chart/definition.d.ts.map +0 -1
  332. package/dist/charts/chart-types/bubble-chart/definition.js +0 -24
  333. package/dist/charts/chart-types/bubble-chart/definition.js.map +0 -1
  334. package/dist/charts/chart-types/bubble-chart/schema.d.ts.map +0 -1
  335. package/dist/charts/chart-types/bubble-chart/schema.js.map +0 -1
  336. package/dist/charts/chart-types/bubble-chart/spec.d.ts +0 -4
  337. package/dist/charts/chart-types/bubble-chart/spec.d.ts.map +0 -1
  338. package/dist/charts/chart-types/bubble-chart/spec.js +0 -31
  339. package/dist/charts/chart-types/bubble-chart/spec.js.map +0 -1
  340. package/dist/charts/chart-types/bubble-chart/tool.js.map +0 -1
  341. package/dist/hooks/useDataTable.d.ts +0 -3
  342. package/dist/hooks/useDataTable.d.ts.map +0 -1
  343. package/dist/hooks/useDataTable.js +0 -28
  344. package/dist/hooks/useDataTable.js.map +0 -1
@@ -25,6 +25,7 @@ export declare const ChartConfig: z.ZodUnion<[z.ZodDiscriminatedUnion<readonly [
25
25
  settings: z.ZodObject<{
26
26
  field: z.ZodOptional<z.ZodString>;
27
27
  maxBins: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
28
+ color: z.ZodOptional<z.ZodString>;
28
29
  }, z.core.$strip>;
29
30
  settingsOpen: z.ZodOptional<z.ZodBoolean>;
30
31
  dataPolicy: z.ZodOptional<z.ZodObject<{
@@ -67,6 +68,7 @@ export declare const ChartConfig: z.ZodUnion<[z.ZodDiscriminatedUnion<readonly [
67
68
  avg: "avg";
68
69
  }>>>;
69
70
  }, z.core.$strip>>>;
71
+ showLegend: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
70
72
  }, z.core.$strip>;
71
73
  settingsOpen: z.ZodOptional<z.ZodBoolean>;
72
74
  dataPolicy: z.ZodOptional<z.ZodObject<{
@@ -75,7 +77,7 @@ export declare const ChartConfig: z.ZodUnion<[z.ZodDiscriminatedUnion<readonly [
75
77
  reason: z.ZodOptional<z.ZodString>;
76
78
  }, z.core.$strip>>;
77
79
  }, z.core.$strip>, z.ZodObject<{
78
- chartType: z.ZodLiteral<"bubble-chart">;
80
+ chartType: z.ZodLiteral<"scatter-plot">;
79
81
  settings: z.ZodObject<{
80
82
  x: z.ZodOptional<z.ZodString>;
81
83
  y: z.ZodOptional<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"chart-config.d.ts","sourceRoot":"","sources":["../../../src/charts/chart-types/chart-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAYtB,eAAO,MAAM,mBAAmB,wCAAoC,CAAC;AAErE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAgBtE,eAAO,MAAM,iBAAiB;;;;;;;;;iBAO5B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAEA,CAAC;AAEzB,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;AACpD,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC"}
1
+ {"version":3,"file":"chart-config.d.ts","sourceRoot":"","sources":["../../../src/charts/chart-types/chart-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAYtB,eAAO,MAAM,mBAAmB,wCAAoC,CAAC;AAErE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAgBtE,eAAO,MAAM,iBAAiB;;;;;;;;;iBAO5B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAEA,CAAC;AAEzB,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;AACpD,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC"}
@@ -7,7 +7,7 @@ import { z } from 'zod';
7
7
  import { HistogramChartConfig } from './histogram/schema';
8
8
  import { CountPlotChartConfig } from './count-plot/schema';
9
9
  import { LineChartConfig } from './line-chart/schema';
10
- import { BubbleChartConfig } from './bubble-chart/schema';
10
+ import { ScatterPlotChartConfig } from './scatter-plot/schema';
11
11
  import { HeatmapChartConfig } from './heatmap/schema';
12
12
  import { BoxPlotChartConfig } from './box-plot/schema';
13
13
  import { CustomSpecChartConfig } from './custom-spec/schema';
@@ -17,7 +17,7 @@ const KNOWN_CHART_CONFIGS = [
17
17
  HistogramChartConfig,
18
18
  CountPlotChartConfig,
19
19
  LineChartConfig,
20
- BubbleChartConfig,
20
+ ScatterPlotChartConfig,
21
21
  HeatmapChartConfig,
22
22
  BoxPlotChartConfig,
23
23
  CustomSpecChartConfig,
@@ -1 +1 @@
1
- {"version":3,"file":"chart-config.js","sourceRoot":"","sources":["../../../src/charts/chart-types/chart-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,uDAAuD;AACvD,OAAO,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAC,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAC,qBAAqB,EAAC,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAC,6BAA6B,EAAC,MAAM,sBAAsB,CAAC;AAEnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAIrE,MAAM,mBAAmB,GAAG;IAC1B,oBAAoB;IACpB,oBAAoB;IACpB,eAAe;IACf,iBAAiB;IACjB,kBAAkB;IAClB,kBAAkB;IAClB,qBAAqB;CACb,CAAC;AAEX,MAAM,iBAAiB,GAAa,mBAAmB,CAAC,GAAG,CACzD,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACtE,OAAO,EAAE,wDAAwD;KAClE,CAAC;IACF,QAAQ,EAAE,mBAAmB;IAC7B,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACpC,UAAU,EAAE,6BAA6B,CAAC,QAAQ,EAAE;CACrD,CAAC,CAAC;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC;KACzB,kBAAkB,CAAC,WAAW,EAAE,mBAAmB,CAAC;KACpD,EAAE,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["/**\n * Central ChartConfig discriminated union.\n * Separated from index.ts to avoid circular dependencies with Settings components.\n */\n\nimport {z} from 'zod';\n\n// Import only the Zod schemas (no Settings components)\nimport {HistogramChartConfig} from './histogram/schema';\nimport {CountPlotChartConfig} from './count-plot/schema';\nimport {LineChartConfig} from './line-chart/schema';\nimport {BubbleChartConfig} from './bubble-chart/schema';\nimport {HeatmapChartConfig} from './heatmap/schema';\nimport {BoxPlotChartConfig} from './box-plot/schema';\nimport {CustomSpecChartConfig} from './custom-spec/schema';\nimport {ChartDataPolicyOverrideConfig} from './data-policy-schema';\n\nexport const CustomChartSettings = z.record(z.string(), z.unknown());\n\nexport type CustomChartSettings = z.infer<typeof CustomChartSettings>;\n\nconst KNOWN_CHART_CONFIGS = [\n HistogramChartConfig,\n CountPlotChartConfig,\n LineChartConfig,\n BubbleChartConfig,\n HeatmapChartConfig,\n BoxPlotChartConfig,\n CustomSpecChartConfig,\n] as const;\n\nconst KNOWN_CHART_TYPES: string[] = KNOWN_CHART_CONFIGS.map(\n (config) => config.shape.chartType.value,\n);\n\nexport const CustomChartConfig = z.object({\n chartType: z.string().refine((val) => !KNOWN_CHART_TYPES.includes(val), {\n message: 'Custom chart type cannot use reserved chart type names',\n }),\n settings: CustomChartSettings,\n settingsOpen: z.boolean().optional(),\n dataPolicy: ChartDataPolicyOverrideConfig.optional(),\n});\n\nexport type CustomChartConfig = z.infer<typeof CustomChartConfig>;\n\n/**\n * Discriminated union of all chart configuration types.\n * This schema is used for runtime validation and type inference.\n */\nexport const ChartConfig = z\n .discriminatedUnion('chartType', KNOWN_CHART_CONFIGS)\n .or(CustomChartConfig);\n\nexport type ChartConfig = z.infer<typeof ChartConfig>;\n\nexport type ChartSettings = ChartConfig['settings'];\nexport type ChartType = ChartConfig['chartType'];\n"]}
1
+ {"version":3,"file":"chart-config.js","sourceRoot":"","sources":["../../../src/charts/chart-types/chart-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,uDAAuD;AACvD,OAAO,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAC,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAC,sBAAsB,EAAC,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAC,qBAAqB,EAAC,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAC,6BAA6B,EAAC,MAAM,sBAAsB,CAAC;AAEnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAIrE,MAAM,mBAAmB,GAAG;IAC1B,oBAAoB;IACpB,oBAAoB;IACpB,eAAe;IACf,sBAAsB;IACtB,kBAAkB;IAClB,kBAAkB;IAClB,qBAAqB;CACb,CAAC;AAEX,MAAM,iBAAiB,GAAa,mBAAmB,CAAC,GAAG,CACzD,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACtE,OAAO,EAAE,wDAAwD;KAClE,CAAC;IACF,QAAQ,EAAE,mBAAmB;IAC7B,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACpC,UAAU,EAAE,6BAA6B,CAAC,QAAQ,EAAE;CACrD,CAAC,CAAC;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC;KACzB,kBAAkB,CAAC,WAAW,EAAE,mBAAmB,CAAC;KACpD,EAAE,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["/**\n * Central ChartConfig discriminated union.\n * Separated from index.ts to avoid circular dependencies with Settings components.\n */\n\nimport {z} from 'zod';\n\n// Import only the Zod schemas (no Settings components)\nimport {HistogramChartConfig} from './histogram/schema';\nimport {CountPlotChartConfig} from './count-plot/schema';\nimport {LineChartConfig} from './line-chart/schema';\nimport {ScatterPlotChartConfig} from './scatter-plot/schema';\nimport {HeatmapChartConfig} from './heatmap/schema';\nimport {BoxPlotChartConfig} from './box-plot/schema';\nimport {CustomSpecChartConfig} from './custom-spec/schema';\nimport {ChartDataPolicyOverrideConfig} from './data-policy-schema';\n\nexport const CustomChartSettings = z.record(z.string(), z.unknown());\n\nexport type CustomChartSettings = z.infer<typeof CustomChartSettings>;\n\nconst KNOWN_CHART_CONFIGS = [\n HistogramChartConfig,\n CountPlotChartConfig,\n LineChartConfig,\n ScatterPlotChartConfig,\n HeatmapChartConfig,\n BoxPlotChartConfig,\n CustomSpecChartConfig,\n] as const;\n\nconst KNOWN_CHART_TYPES: string[] = KNOWN_CHART_CONFIGS.map(\n (config) => config.shape.chartType.value,\n);\n\nexport const CustomChartConfig = z.object({\n chartType: z.string().refine((val) => !KNOWN_CHART_TYPES.includes(val), {\n message: 'Custom chart type cannot use reserved chart type names',\n }),\n settings: CustomChartSettings,\n settingsOpen: z.boolean().optional(),\n dataPolicy: ChartDataPolicyOverrideConfig.optional(),\n});\n\nexport type CustomChartConfig = z.infer<typeof CustomChartConfig>;\n\n/**\n * Discriminated union of all chart configuration types.\n * This schema is used for runtime validation and type inference.\n */\nexport const ChartConfig = z\n .discriminatedUnion('chartType', KNOWN_CHART_CONFIGS)\n .or(CustomChartConfig);\n\nexport type ChartConfig = z.infer<typeof ChartConfig>;\n\nexport type ChartSettings = ChartConfig['settings'];\nexport type ChartType = ChartConfig['chartType'];\n"]}
@@ -1,4 +1,5 @@
1
1
  import type { Spec } from '@uwdata/mosaic-spec';
2
2
  import { CountPlotChartSettings } from './schema';
3
- export declare function createCountPlotSpec(tableName: string, { field }: CountPlotChartSettings): Spec;
3
+ import { CreateSpecOptions } from '../base-types';
4
+ export declare function createCountPlotSpec(options: CreateSpecOptions<CountPlotChartSettings>): Spec;
4
5
  //# sourceMappingURL=spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../../src/charts/chart-types/count-plot/spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,sBAAsB,EAAC,MAAM,UAAU,CAAC;AAMhD,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,EAAC,KAAK,EAAC,EAAE,sBAAsB,GAC9B,IAAI,CA6CN"}
1
+ {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../../src/charts/chart-types/count-plot/spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,sBAAsB,EAAC,MAAM,UAAU,CAAC;AAMhD,OAAO,EAAC,iBAAiB,EAAyB,MAAM,eAAe,CAAC;AAMxE,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,iBAAiB,CAAC,sBAAsB,CAAC,GACjD,IAAI,CA4DN"}
@@ -1,49 +1,80 @@
1
- import { ChartSpecError } from '../errors';
1
+ import { InvalidColumnTypeError, MissingColumnsError, RequiredFieldsError, } from '../errors';
2
+ import { getChartTableReference } from '../base-types';
3
+ import { isCategoricalType } from '../../../column-types-utils';
2
4
  const BG_COLOR = 'var(--color-chart-overlay)';
3
5
  const FG_COLOR = 'var(--color-chart-1)';
4
- export function createCountPlotSpec(tableName, { field }) {
5
- if (!field) {
6
- throw new ChartSpecError('Field is required for count plot');
7
- }
6
+ export function createCountPlotSpec(options) {
7
+ const { dataTable, selectionName } = options;
8
+ const { fieldColumn } = validateCountPlotSettings(options);
9
+ const tableReference = getChartTableReference(dataTable);
8
10
  // Count plot shows categorical frequency as horizontal bars
9
11
  // Categories on Y-axis, counts on X-axis
10
- return {
11
- plot: [
12
- {
13
- mark: 'barX',
14
- data: { from: tableName },
15
- x: { count: null },
16
- y: { column: field, sort: { x: 'sum', order: 'desc', limit: 100 } },
17
- fill: BG_COLOR,
18
- inset: 0.5,
12
+ const plot = [
13
+ {
14
+ mark: 'barX',
15
+ data: { from: tableReference },
16
+ x: { count: null },
17
+ y: {
18
+ column: fieldColumn.name,
19
+ sort: { x: 'sum', order: 'desc', limit: 100 },
19
20
  },
20
- {
21
- mark: 'barX',
22
- data: { from: tableName, filterBy: '$brush' },
23
- x: { count: null },
24
- y: { column: field, sort: { x: 'sum', order: 'desc', limit: 100 } },
25
- fill: FG_COLOR,
26
- inset: 0.5,
21
+ fill: BG_COLOR,
22
+ inset: 0.5,
23
+ },
24
+ {
25
+ mark: 'barX',
26
+ data: { from: tableReference, filterBy: '$brush' },
27
+ x: { count: null },
28
+ y: {
29
+ column: fieldColumn.name,
30
+ sort: { x: 'sum', order: 'desc', limit: 100 },
27
31
  },
28
- {
29
- mark: 'text',
30
- data: { from: tableName, filterBy: '$brush' },
31
- x: { count: null },
32
- y: { column: field, sort: { x: 'sum', order: 'desc', limit: 100 } },
33
- text: { count: null },
34
- dx: 5,
35
- textAnchor: 'start',
36
- fill: 'currentColor',
37
- fontSize: 11,
32
+ fill: FG_COLOR,
33
+ inset: 0.5,
34
+ },
35
+ {
36
+ mark: 'text',
37
+ data: { from: tableReference, filterBy: '$brush' },
38
+ x: { count: null },
39
+ y: {
40
+ column: fieldColumn.name,
41
+ sort: { x: 'sum', order: 'desc', limit: 100 },
38
42
  },
39
- { select: 'intervalY', as: '$brush' },
40
- ],
43
+ text: { count: null },
44
+ dx: 5,
45
+ textAnchor: 'start',
46
+ fill: 'currentColor',
47
+ fontSize: 11,
48
+ },
49
+ ];
50
+ if (selectionName) {
51
+ plot.push({ select: 'intervalY', as: '$brush' });
52
+ }
53
+ return {
54
+ plot,
41
55
  xLabel: 'Count',
42
- yLabel: field,
56
+ yLabel: fieldColumn.name,
43
57
  height: 400,
44
58
  width: 380,
45
59
  margins: { left: 50, right: 50, top: 20, bottom: 50 },
46
60
  params: { brush: { select: 'crossfilter' } },
47
61
  };
48
62
  }
63
+ function validateCountPlotSettings({ dataTable, settings: { field }, }) {
64
+ // Basic validation for required fields
65
+ if (!field) {
66
+ throw new RequiredFieldsError('Field');
67
+ }
68
+ // Validate field existence and type
69
+ const fieldColumn = dataTable.columns.find((col) => col.name === field);
70
+ if (!fieldColumn) {
71
+ throw new MissingColumnsError(field);
72
+ }
73
+ if (!isCategoricalType(fieldColumn.type)) {
74
+ throw new InvalidColumnTypeError(fieldColumn.name, 'categorical');
75
+ }
76
+ return {
77
+ fieldColumn,
78
+ };
79
+ }
49
80
  //# sourceMappingURL=spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec.js","sourceRoot":"","sources":["../../../../src/charts/chart-types/count-plot/spec.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAEzC,MAAM,QAAQ,GAAG,4BAA4B,CAAC;AAC9C,MAAM,QAAQ,GAAG,sBAAsB,CAAC;AAExC,MAAM,UAAU,mBAAmB,CACjC,SAAiB,EACjB,EAAC,KAAK,EAAyB;IAE/B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,cAAc,CAAC,kCAAkC,CAAC,CAAC;IAC/D,CAAC;IAED,4DAA4D;IAC5D,yCAAyC;IACzC,OAAO;QACL,IAAI,EAAE;YACJ;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,EAAC,IAAI,EAAE,SAAS,EAAC;gBACvB,CAAC,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC;gBAChB,CAAC,EAAE,EAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAC,EAAC;gBAC/D,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,GAAG;aACX;YACD;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,EAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAC;gBAC3C,CAAC,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC;gBAChB,CAAC,EAAE,EAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAC,EAAC;gBAC/D,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,GAAG;aACX;YACD;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,EAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAC;gBAC3C,CAAC,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC;gBAChB,CAAC,EAAE,EAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAC,EAAC;gBAC/D,IAAI,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC;gBACnB,EAAE,EAAE,CAAC;gBACL,UAAU,EAAE,OAAO;gBACnB,IAAI,EAAE,cAAc;gBACpB,QAAQ,EAAE,EAAE;aACb;YACD,EAAC,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAC;SACpC;QACD,MAAM,EAAE,OAAO;QACf,MAAM,EAAE,KAAK;QACb,MAAM,EAAE,GAAG;QACX,KAAK,EAAE,GAAG;QACV,OAAO,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAC;QACnD,MAAM,EAAE,EAAC,KAAK,EAAE,EAAC,MAAM,EAAE,aAAa,EAAC,EAAC;KACjC,CAAC;AACZ,CAAC","sourcesContent":["import type {Spec} from '@uwdata/mosaic-spec';\nimport {CountPlotChartSettings} from './schema';\nimport {ChartSpecError} from '../errors';\n\nconst BG_COLOR = 'var(--color-chart-overlay)';\nconst FG_COLOR = 'var(--color-chart-1)';\n\nexport function createCountPlotSpec(\n tableName: string,\n {field}: CountPlotChartSettings,\n): Spec {\n if (!field) {\n throw new ChartSpecError('Field is required for count plot');\n }\n\n // Count plot shows categorical frequency as horizontal bars\n // Categories on Y-axis, counts on X-axis\n return {\n plot: [\n {\n mark: 'barX',\n data: {from: tableName},\n x: {count: null},\n y: {column: field, sort: {x: 'sum', order: 'desc', limit: 100}},\n fill: BG_COLOR,\n inset: 0.5,\n },\n {\n mark: 'barX',\n data: {from: tableName, filterBy: '$brush'},\n x: {count: null},\n y: {column: field, sort: {x: 'sum', order: 'desc', limit: 100}},\n fill: FG_COLOR,\n inset: 0.5,\n },\n {\n mark: 'text',\n data: {from: tableName, filterBy: '$brush'},\n x: {count: null},\n y: {column: field, sort: {x: 'sum', order: 'desc', limit: 100}},\n text: {count: null},\n dx: 5,\n textAnchor: 'start',\n fill: 'currentColor',\n fontSize: 11,\n },\n {select: 'intervalY', as: '$brush'},\n ],\n xLabel: 'Count',\n yLabel: field,\n height: 400,\n width: 380,\n margins: {left: 50, right: 50, top: 20, bottom: 50},\n params: {brush: {select: 'crossfilter'}},\n } as Spec;\n}\n"]}
1
+ {"version":3,"file":"spec.js","sourceRoot":"","sources":["../../../../src/charts/chart-types/count-plot/spec.ts"],"names":[],"mappings":"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","sourcesContent":["import type {Spec} from '@uwdata/mosaic-spec';\nimport {CountPlotChartSettings} from './schema';\nimport {\n InvalidColumnTypeError,\n MissingColumnsError,\n RequiredFieldsError,\n} from '../errors';\nimport {CreateSpecOptions, getChartTableReference} from '../base-types';\nimport {isCategoricalType} from '../../../column-types-utils';\n\nconst BG_COLOR = 'var(--color-chart-overlay)';\nconst FG_COLOR = 'var(--color-chart-1)';\n\nexport function createCountPlotSpec(\n options: CreateSpecOptions<CountPlotChartSettings>,\n): Spec {\n const {dataTable, selectionName} = options;\n\n const {fieldColumn} = validateCountPlotSettings(options);\n const tableReference = getChartTableReference(dataTable);\n\n // Count plot shows categorical frequency as horizontal bars\n // Categories on Y-axis, counts on X-axis\n const plot: unknown[] = [\n {\n mark: 'barX',\n data: {from: tableReference},\n x: {count: null},\n y: {\n column: fieldColumn.name,\n sort: {x: 'sum', order: 'desc', limit: 100},\n },\n fill: BG_COLOR,\n inset: 0.5,\n },\n {\n mark: 'barX',\n data: {from: tableReference, filterBy: '$brush'},\n x: {count: null},\n y: {\n column: fieldColumn.name,\n sort: {x: 'sum', order: 'desc', limit: 100},\n },\n fill: FG_COLOR,\n inset: 0.5,\n },\n {\n mark: 'text',\n data: {from: tableReference, filterBy: '$brush'},\n x: {count: null},\n y: {\n column: fieldColumn.name,\n sort: {x: 'sum', order: 'desc', limit: 100},\n },\n text: {count: null},\n dx: 5,\n textAnchor: 'start',\n fill: 'currentColor',\n fontSize: 11,\n },\n ];\n\n if (selectionName) {\n plot.push({select: 'intervalY', as: '$brush'});\n }\n\n return {\n plot,\n xLabel: 'Count',\n yLabel: fieldColumn.name,\n height: 400,\n width: 380,\n margins: {left: 50, right: 50, top: 20, bottom: 50},\n params: {brush: {select: 'crossfilter'}},\n } as Spec;\n}\n\nfunction validateCountPlotSettings({\n dataTable,\n settings: {field},\n}: CreateSpecOptions<CountPlotChartSettings>) {\n // Basic validation for required fields\n if (!field) {\n throw new RequiredFieldsError('Field');\n }\n\n // Validate field existence and type\n const fieldColumn = dataTable.columns.find((col) => col.name === field);\n\n if (!fieldColumn) {\n throw new MissingColumnsError(field);\n }\n\n if (!isCategoricalType(fieldColumn.type)) {\n throw new InvalidColumnTypeError(fieldColumn.name, 'categorical');\n }\n\n return {\n fieldColumn,\n };\n}\n"]}
@@ -21,7 +21,7 @@ NOTE: Count plots aggregate by counting unique values, so they handle large data
21
21
  To UPDATE an existing count plot: provide the panelId parameter. Otherwise creates new panel.
22
22
 
23
23
  CRITICAL: Only for categorical data (text, categories, enums).
24
- Do NOT use for: numeric distributions (use histogram), relationships between columns (use bubble-chart), time series (use line-chart).`,
24
+ Do NOT use for: numeric distributions (use histogram), relationships between columns (use scatter-plot), time series (use line-chart).`,
25
25
  inputSchema: CountPlotToolParameters,
26
26
  execute: async (params, context) => {
27
27
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../../src/charts/chart-types/count-plot/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,IAAI,CAAC;AAExB,OAAO,EAAC,sBAAsB,EAAC,MAAM,UAAU,CAAC;AAChD,OAAO,EAAC,uBAAuB,EAAC,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAC,wBAAwB,EAAC,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,uBAAuB,GAAG,uBAAuB,CAAC,MAAM,CAAC;IACpE,QAAQ,EAAE,sBAAsB,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAIH,MAAM,UAAU,qBAAqB,CAAC,IAAuB;IAC3D,OAAO,IAAI,CAAC;QACV,WAAW,EAAE;;;;;4CAK2B,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;uIAOwD;QACnI,WAAW,EAAE,uBAAuB;QACpC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;YACjC,IAAI,CAAC;gBACH,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CACrC,MAAM,CAAC,UAAU,EACjB,MAAM,CAAC,uBAAuB,EAC9B,OAAO,CACR,CAAC;gBACF,MAAM,EAAC,SAAS,EAAE,OAAO,EAAC,GAAG,IAAI,CAAC,YAAY,CAC5C,UAAU,EACV,MAAM,CAAC,SAAS,CACjB,CAAC;gBAEF,iDAAiD;gBACjD,oBAAoB,CAClB,MAAM,CAAC,QAAQ,CAAC,KAAK,EACrB,wBAAwB,EACxB,OAAO,EACP,OAAO,CACR,CAAC;gBAEF,MAAM,MAAM,GAAG,wBAAwB,CAAC,IAAI,EAAE;oBAC5C,OAAO,EAAE,MAAM,CAAC,OAAO;oBACvB,WAAW,EAAE,UAAU;oBACvB,SAAS;oBACT,KAAK,EAAE,iBAAiB,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE;oBAC/C,MAAM,EAAE;wBACN,SAAS,EAAE,YAAY;wBACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;qBAC1B;iBACF,CAAC,CAAC;gBAEH,OAAO;oBACL,SAAS,EAAE;wBACT,OAAO,EAAE,IAAI;wBACb,OAAO,EAAE,MAAM,CAAC,OAAO;4BACrB,CAAC,CAAC,uBAAuB,MAAM,CAAC,KAAK,IAAI;4BACzC,CAAC,CAAC,uBAAuB,MAAM,CAAC,KAAK,IAAI;wBAC3C,IAAI,EAAE,MAAM;qBACb;iBACF,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO;oBACL,SAAS,EAAE;wBACT,OAAO,EAAE,KAAK;wBACd,YAAY,EACV,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;qBACzD;iBACF,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {tool} from 'ai';\nimport {z} from 'zod';\nimport {CountPlotChartSettings} from './schema';\nimport {BaseChartToolParameters} from '../../../ai/tool-schemas';\nimport {type DashboardToolDeps} from '../base-types';\nimport {validateColumnExists} from '../../../ai/tool-validation';\nimport {CATEGORICAL_COLUMN_TYPES} from '../../../column-types-utils';\nimport {createOrUpdateChartPanel} from '../../../ai/tool-helpers';\n\nexport const CountPlotToolParameters = BaseChartToolParameters.extend({\n settings: CountPlotChartSettings.required(),\n});\n\nexport type CountPlotToolParams = z.infer<typeof CountPlotToolParameters>;\n\nexport function createCountPlotAiTool(deps: DashboardToolDeps) {\n return tool({\n description: `Count plot: horizontal bar chart showing frequency of categorical/text values. Counts how many times each unique value appears.\n\nUse when: user asks to \"count\", \"frequency of\", \"how many\", \"breakdown by category\", \"distribution of [text/category column]\".\nExample queries: \"count by land use type\", \"how many features per administrative region\", \"frequency of terrain types\", \"breakdown by zone classification\", \"count parcels by ownership type\".\n\nRequired: field must be categorical/text (${CATEGORICAL_COLUMN_TYPES.join(', ')}).\n\nNOTE: Count plots aggregate by counting unique values, so they handle large datasets efficiently (no data point limit).\n\nTo UPDATE an existing count plot: provide the panelId parameter. Otherwise creates new panel.\n\nCRITICAL: Only for categorical data (text, categories, enums).\nDo NOT use for: numeric distributions (use histogram), relationships between columns (use bubble-chart), time series (use line-chart).`,\n inputSchema: CountPlotToolParameters,\n execute: async (params, context) => {\n try {\n const artifactId = deps.resolveArtifact(\n params.artifactId,\n params.createArtifactIfMissing,\n context,\n );\n const {tableName, columns} = deps.resolveTable(\n artifactId,\n params.tableName,\n );\n\n // Validate settings - expect categorical columns\n validateColumnExists(\n params.settings.field,\n CATEGORICAL_COLUMN_TYPES,\n columns,\n 'field',\n );\n\n const result = createOrUpdateChartPanel(deps, {\n panelId: params.panelId,\n dashboardId: artifactId,\n tableName,\n title: `Count plot of ${params.settings.field}`,\n config: {\n chartType: 'count-plot',\n settings: params.settings,\n },\n });\n\n return {\n llmResult: {\n success: true,\n details: params.panelId\n ? `Updated count plot \"${result.title}\".`\n : `Created count plot \"${result.title}\".`,\n data: result,\n },\n };\n } catch (error) {\n return {\n llmResult: {\n success: false,\n errorMessage:\n error instanceof Error ? error.message : String(error),\n },\n };\n }\n },\n });\n}\n"]}
1
+ {"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../../src/charts/chart-types/count-plot/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,IAAI,CAAC;AAExB,OAAO,EAAC,sBAAsB,EAAC,MAAM,UAAU,CAAC;AAChD,OAAO,EAAC,uBAAuB,EAAC,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAC,wBAAwB,EAAC,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,uBAAuB,GAAG,uBAAuB,CAAC,MAAM,CAAC;IACpE,QAAQ,EAAE,sBAAsB,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAIH,MAAM,UAAU,qBAAqB,CAAC,IAAuB;IAC3D,OAAO,IAAI,CAAC;QACV,WAAW,EAAE;;;;;4CAK2B,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;uIAOwD;QACnI,WAAW,EAAE,uBAAuB;QACpC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;YACjC,IAAI,CAAC;gBACH,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CACrC,MAAM,CAAC,UAAU,EACjB,MAAM,CAAC,uBAAuB,EAC9B,OAAO,CACR,CAAC;gBACF,MAAM,EAAC,SAAS,EAAE,OAAO,EAAC,GAAG,IAAI,CAAC,YAAY,CAC5C,UAAU,EACV,MAAM,CAAC,SAAS,CACjB,CAAC;gBAEF,iDAAiD;gBACjD,oBAAoB,CAClB,MAAM,CAAC,QAAQ,CAAC,KAAK,EACrB,wBAAwB,EACxB,OAAO,EACP,OAAO,CACR,CAAC;gBAEF,MAAM,MAAM,GAAG,wBAAwB,CAAC,IAAI,EAAE;oBAC5C,OAAO,EAAE,MAAM,CAAC,OAAO;oBACvB,WAAW,EAAE,UAAU;oBACvB,SAAS;oBACT,KAAK,EAAE,iBAAiB,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE;oBAC/C,MAAM,EAAE;wBACN,SAAS,EAAE,YAAY;wBACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;qBAC1B;iBACF,CAAC,CAAC;gBAEH,OAAO;oBACL,SAAS,EAAE;wBACT,OAAO,EAAE,IAAI;wBACb,OAAO,EAAE,MAAM,CAAC,OAAO;4BACrB,CAAC,CAAC,uBAAuB,MAAM,CAAC,KAAK,IAAI;4BACzC,CAAC,CAAC,uBAAuB,MAAM,CAAC,KAAK,IAAI;wBAC3C,IAAI,EAAE,MAAM;qBACb;iBACF,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO;oBACL,SAAS,EAAE;wBACT,OAAO,EAAE,KAAK;wBACd,YAAY,EACV,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;qBACzD;iBACF,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {tool} from 'ai';\nimport {z} from 'zod';\nimport {CountPlotChartSettings} from './schema';\nimport {BaseChartToolParameters} from '../../../ai/tool-schemas';\nimport {type DashboardToolDeps} from '../base-types';\nimport {validateColumnExists} from '../../../ai/tool-validation';\nimport {CATEGORICAL_COLUMN_TYPES} from '../../../column-types-utils';\nimport {createOrUpdateChartPanel} from '../../../ai/tool-helpers';\n\nexport const CountPlotToolParameters = BaseChartToolParameters.extend({\n settings: CountPlotChartSettings.required(),\n});\n\nexport type CountPlotToolParams = z.infer<typeof CountPlotToolParameters>;\n\nexport function createCountPlotAiTool(deps: DashboardToolDeps) {\n return tool({\n description: `Count plot: horizontal bar chart showing frequency of categorical/text values. Counts how many times each unique value appears.\n\nUse when: user asks to \"count\", \"frequency of\", \"how many\", \"breakdown by category\", \"distribution of [text/category column]\".\nExample queries: \"count by land use type\", \"how many features per administrative region\", \"frequency of terrain types\", \"breakdown by zone classification\", \"count parcels by ownership type\".\n\nRequired: field must be categorical/text (${CATEGORICAL_COLUMN_TYPES.join(', ')}).\n\nNOTE: Count plots aggregate by counting unique values, so they handle large datasets efficiently (no data point limit).\n\nTo UPDATE an existing count plot: provide the panelId parameter. Otherwise creates new panel.\n\nCRITICAL: Only for categorical data (text, categories, enums).\nDo NOT use for: numeric distributions (use histogram), relationships between columns (use scatter-plot), time series (use line-chart).`,\n inputSchema: CountPlotToolParameters,\n execute: async (params, context) => {\n try {\n const artifactId = deps.resolveArtifact(\n params.artifactId,\n params.createArtifactIfMissing,\n context,\n );\n const {tableName, columns} = deps.resolveTable(\n artifactId,\n params.tableName,\n );\n\n // Validate settings - expect categorical columns\n validateColumnExists(\n params.settings.field,\n CATEGORICAL_COLUMN_TYPES,\n columns,\n 'field',\n );\n\n const result = createOrUpdateChartPanel(deps, {\n panelId: params.panelId,\n dashboardId: artifactId,\n tableName,\n title: `Count plot of ${params.settings.field}`,\n config: {\n chartType: 'count-plot',\n settings: params.settings,\n },\n });\n\n return {\n llmResult: {\n success: true,\n details: params.panelId\n ? `Updated count plot \"${result.title}\".`\n : `Created count plot \"${result.title}\".`,\n data: result,\n },\n };\n } catch (error) {\n return {\n llmResult: {\n success: false,\n errorMessage:\n error instanceof Error ? error.message : String(error),\n },\n };\n }\n },\n });\n}\n"]}
@@ -3,7 +3,7 @@ import { lineChartChartType } from './line-chart/definition';
3
3
  import { countPlotChartType } from './count-plot/definition';
4
4
  import { heatmapChartType } from './heatmap/definition';
5
5
  import { boxPlotChartType } from './box-plot/definition';
6
- import { bubbleChartChartType } from './bubble-chart/definition';
6
+ import { scatterPlotChartType } from './scatter-plot/definition';
7
7
  import { customSpecChartType } from './custom-spec/definition';
8
8
  /**
9
9
  * Creates the default set of chart type definitions.
@@ -20,7 +20,7 @@ export function createDefaultChartTypes(options) {
20
20
  lineChartChartType,
21
21
  heatmapChartType,
22
22
  boxPlotChartType,
23
- bubbleChartChartType,
23
+ scatterPlotChartType,
24
24
  ];
25
25
  if (includeCustomSpec) {
26
26
  chartTypes.push(customSpecChartType);
@@ -1 +1 @@
1
- {"version":3,"file":"createDefaultChartTypes.js","sourceRoot":"","sources":["../../../src/charts/chart-types/createDefaultChartTypes.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kBAAkB,EAAC,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAEvC;IACC,MAAM,iBAAiB,GAAG,OAAO,EAAE,iBAAiB,IAAI,IAAI,CAAC;IAC7D,MAAM,UAAU,GAA+B;QAC7C,kBAAkB;QAClB,kBAAkB;QAClB,kBAAkB;QAClB,gBAAgB;QAChB,gBAAgB;QAChB,oBAAoB;KACrB,CAAC;IAEF,IAAI,iBAAiB,EAAE,CAAC;QACtB,UAAU,CAAC,IAAI,CAAC,mBAA+C,CAAC,CAAC;IACnE,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import type {ChartTypeDefinition} from './base-types';\nimport {histogramChartType} from './histogram/definition';\nimport {lineChartChartType} from './line-chart/definition';\nimport {countPlotChartType} from './count-plot/definition';\nimport {heatmapChartType} from './heatmap/definition';\nimport {boxPlotChartType} from './box-plot/definition';\nimport {bubbleChartChartType} from './bubble-chart/definition';\nimport {customSpecChartType} from './custom-spec/definition';\n\n/**\n * Creates the default set of chart type definitions.\n *\n * @param options - Configuration options\n * @param options.includeCustomSpec - Whether to include the custom spec chart type (default: true)\n * @returns Array of chart type definitions\n */\nexport function createDefaultChartTypes(options?: {\n includeCustomSpec?: boolean;\n}): ChartTypeDefinition<any>[] {\n const includeCustomSpec = options?.includeCustomSpec ?? true;\n const chartTypes: ChartTypeDefinition<any>[] = [\n histogramChartType,\n countPlotChartType,\n lineChartChartType,\n heatmapChartType,\n boxPlotChartType,\n bubbleChartChartType,\n ];\n\n if (includeCustomSpec) {\n chartTypes.push(customSpecChartType as ChartTypeDefinition<any>);\n }\n\n return chartTypes;\n}\n"]}
1
+ {"version":3,"file":"createDefaultChartTypes.js","sourceRoot":"","sources":["../../../src/charts/chart-types/createDefaultChartTypes.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kBAAkB,EAAC,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAEvC;IACC,MAAM,iBAAiB,GAAG,OAAO,EAAE,iBAAiB,IAAI,IAAI,CAAC;IAC7D,MAAM,UAAU,GAA+B;QAC7C,kBAAkB;QAClB,kBAAkB;QAClB,kBAAkB;QAClB,gBAAgB;QAChB,gBAAgB;QAChB,oBAAoB;KACrB,CAAC;IAEF,IAAI,iBAAiB,EAAE,CAAC;QACtB,UAAU,CAAC,IAAI,CAAC,mBAA+C,CAAC,CAAC;IACnE,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import type {ChartTypeDefinition} from './base-types';\nimport {histogramChartType} from './histogram/definition';\nimport {lineChartChartType} from './line-chart/definition';\nimport {countPlotChartType} from './count-plot/definition';\nimport {heatmapChartType} from './heatmap/definition';\nimport {boxPlotChartType} from './box-plot/definition';\nimport {scatterPlotChartType} from './scatter-plot/definition';\nimport {customSpecChartType} from './custom-spec/definition';\n\n/**\n * Creates the default set of chart type definitions.\n *\n * @param options - Configuration options\n * @param options.includeCustomSpec - Whether to include the custom spec chart type (default: true)\n * @returns Array of chart type definitions\n */\nexport function createDefaultChartTypes(options?: {\n includeCustomSpec?: boolean;\n}): ChartTypeDefinition<any>[] {\n const includeCustomSpec = options?.includeCustomSpec ?? true;\n const chartTypes: ChartTypeDefinition<any>[] = [\n histogramChartType,\n countPlotChartType,\n lineChartChartType,\n heatmapChartType,\n boxPlotChartType,\n scatterPlotChartType,\n ];\n\n if (includeCustomSpec) {\n chartTypes.push(customSpecChartType as ChartTypeDefinition<any>);\n }\n\n return chartTypes;\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { Spec } from '@uwdata/mosaic-spec';
2
2
  import { CustomSpecChartSettings } from './schema';
3
- export declare function createCustomSpec(tableName: string, { vgPlotSpec }: CustomSpecChartSettings): Spec;
3
+ import { CreateSpecOptions } from '../base-types';
4
+ export declare function createCustomSpec({ dataTable, settings: { vgPlotSpec }, selectionName, }: CreateSpecOptions<CustomSpecChartSettings>): Spec;
4
5
  //# sourceMappingURL=spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../../src/charts/chart-types/custom-spec/spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,qBAAqB,CAAC;AACzC,OAAO,EAAC,uBAAuB,EAAC,MAAM,UAAU,CAAC;AAEjD,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,EAAC,UAAU,EAAC,EAAE,uBAAuB,GACpC,IAAI,CAuBN"}
1
+ {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../../src/charts/chart-types/custom-spec/spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,qBAAqB,CAAC;AACzC,OAAO,EAAC,uBAAuB,EAAC,MAAM,UAAU,CAAC;AACjD,OAAO,EAAC,iBAAiB,EAAyB,MAAM,eAAe,CAAC;AAExE,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,QAAQ,EAAE,EAAC,UAAU,EAAC,EACtB,aAAa,GACd,EAAE,iBAAiB,CAAC,uBAAuB,CAAC,GAAG,IAAI,CA4BnD"}
@@ -1,20 +1,24 @@
1
- export function createCustomSpec(tableName, { vgPlotSpec }) {
1
+ import { getChartTableReference } from '../base-types';
2
+ export function createCustomSpec({ dataTable, settings: { vgPlotSpec }, selectionName, }) {
2
3
  if (vgPlotSpec) {
3
4
  return vgPlotSpec;
4
5
  }
5
6
  // Default starter spec
7
+ const plot = [
8
+ {
9
+ mark: 'rectY',
10
+ data: { from: getChartTableReference(dataTable), filterBy: '$brush' },
11
+ x: { bin: 'field_name', maxbins: 25 },
12
+ y: { count: null },
13
+ fill: 'steelblue',
14
+ inset: 0.5,
15
+ },
16
+ ];
17
+ if (selectionName) {
18
+ plot.push({ select: 'intervalX', as: '$brush' });
19
+ }
6
20
  return {
7
- plot: [
8
- {
9
- mark: 'rectY',
10
- data: { from: tableName, filterBy: '$brush' },
11
- x: { bin: 'field_name', maxbins: 25 },
12
- y: { count: null },
13
- fill: 'steelblue',
14
- inset: 0.5,
15
- },
16
- { select: 'intervalX', as: '$brush' },
17
- ],
21
+ plot,
18
22
  xLabel: 'field_name',
19
23
  height: 200,
20
24
  width: 380,
@@ -1 +1 @@
1
- {"version":3,"file":"spec.js","sourceRoot":"","sources":["../../../../src/charts/chart-types/custom-spec/spec.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,gBAAgB,CAC9B,SAAiB,EACjB,EAAC,UAAU,EAA0B;IAErC,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,UAAkB,CAAC;IAC5B,CAAC;IAED,uBAAuB;IACvB,OAAO;QACL,IAAI,EAAE;YACJ;gBACE,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,EAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAC;gBAC3C,CAAC,EAAE,EAAC,GAAG,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EAAC;gBACnC,CAAC,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC;gBAChB,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,GAAG;aACX;YACD,EAAC,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAC;SACpC;QACD,MAAM,EAAE,YAAY;QACpB,MAAM,EAAE,GAAG;QACX,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,EAAC,KAAK,EAAE,EAAC,MAAM,EAAE,aAAa,EAAC,EAAC;KACjC,CAAC;AACZ,CAAC","sourcesContent":["import {Spec} from '@uwdata/mosaic-spec';\nimport {CustomSpecChartSettings} from './schema';\n\nexport function createCustomSpec(\n tableName: string,\n {vgPlotSpec}: CustomSpecChartSettings,\n): Spec {\n if (vgPlotSpec) {\n return vgPlotSpec as Spec;\n }\n\n // Default starter spec\n return {\n plot: [\n {\n mark: 'rectY',\n data: {from: tableName, filterBy: '$brush'},\n x: {bin: 'field_name', maxbins: 25},\n y: {count: null},\n fill: 'steelblue',\n inset: 0.5,\n },\n {select: 'intervalX', as: '$brush'},\n ],\n xLabel: 'field_name',\n height: 200,\n width: 380,\n params: {brush: {select: 'crossfilter'}},\n } as Spec;\n}\n"]}
1
+ {"version":3,"file":"spec.js","sourceRoot":"","sources":["../../../../src/charts/chart-types/custom-spec/spec.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,sBAAsB,EAAC,MAAM,eAAe,CAAC;AAExE,MAAM,UAAU,gBAAgB,CAAC,EAC/B,SAAS,EACT,QAAQ,EAAE,EAAC,UAAU,EAAC,EACtB,aAAa,GAC8B;IAC3C,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,UAAkB,CAAC;IAC5B,CAAC;IAED,uBAAuB;IACvB,MAAM,IAAI,GAAc;QACtB;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,EAAC,IAAI,EAAE,sBAAsB,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAC;YACnE,CAAC,EAAE,EAAC,GAAG,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EAAC;YACnC,CAAC,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC;YAChB,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,GAAG;SACX;KACF,CAAC;IAEF,IAAI,aAAa,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAC,CAAC,CAAC;IACjD,CAAC;IAED,OAAO;QACL,IAAI;QACJ,MAAM,EAAE,YAAY;QACpB,MAAM,EAAE,GAAG;QACX,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,EAAC,KAAK,EAAE,EAAC,MAAM,EAAE,aAAa,EAAC,EAAC;KACjC,CAAC;AACZ,CAAC","sourcesContent":["import {Spec} from '@uwdata/mosaic-spec';\nimport {CustomSpecChartSettings} from './schema';\nimport {CreateSpecOptions, getChartTableReference} from '../base-types';\n\nexport function createCustomSpec({\n dataTable,\n settings: {vgPlotSpec},\n selectionName,\n}: CreateSpecOptions<CustomSpecChartSettings>): Spec {\n if (vgPlotSpec) {\n return vgPlotSpec as Spec;\n }\n\n // Default starter spec\n const plot: unknown[] = [\n {\n mark: 'rectY',\n data: {from: getChartTableReference(dataTable), filterBy: '$brush'},\n x: {bin: 'field_name', maxbins: 25},\n y: {count: null},\n fill: 'steelblue',\n inset: 0.5,\n },\n ];\n\n if (selectionName) {\n plot.push({select: 'intervalX', as: '$brush'});\n }\n\n return {\n plot,\n xLabel: 'field_name',\n height: 200,\n width: 380,\n params: {brush: {select: 'crossfilter'}},\n } as Spec;\n}\n"]}
@@ -4,4 +4,29 @@
4
4
  export declare class ChartSpecError extends Error {
5
5
  constructor(message: string);
6
6
  }
7
+ /**
8
+ * Error thrown when required chart configuration fields are missing.
9
+ * Used during chart validation to indicate which fields must be provided.
10
+ */
11
+ export declare class RequiredFieldsError extends ChartSpecError {
12
+ readonly fieldNames: string[];
13
+ constructor(fieldNames: string | string[]);
14
+ }
15
+ /**
16
+ * Error thrown when chart configuration references columns that don't exist in the data table.
17
+ * Used during chart validation to indicate which columns could not be found.
18
+ */
19
+ export declare class MissingColumnsError extends ChartSpecError {
20
+ readonly columnNames: string[];
21
+ constructor(columnNames: string | string[]);
22
+ }
23
+ /**
24
+ * Error thrown when chart configuration uses columns with incompatible data types.
25
+ * Used during chart validation to indicate which columns have invalid types and what type is expected.
26
+ */
27
+ export declare class InvalidColumnTypeError extends ChartSpecError {
28
+ readonly columnNames: string[];
29
+ readonly expectedType: string;
30
+ constructor(columnNames: string[] | string, expectedType: string);
31
+ }
7
32
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/charts/chart-types/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,cAAe,SAAQ,KAAK;gBAC3B,OAAO,EAAE,MAAM;CAI5B"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/charts/chart-types/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,cAAe,SAAQ,KAAK;gBAC3B,OAAO,EAAE,MAAM;CAI5B;AAED;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,cAAc;IACrD,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;gBAElB,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE;CAM1C;AAED;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,cAAc;IACrD,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;gBAEnB,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE;CAM3C;AAED;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,cAAc;IACxD,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;gBAElB,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,YAAY,EAAE,MAAM;CAQjE"}
@@ -7,4 +7,42 @@ export class ChartSpecError extends Error {
7
7
  this.name = 'ChartSpecError';
8
8
  }
9
9
  }
10
+ /**
11
+ * Error thrown when required chart configuration fields are missing.
12
+ * Used during chart validation to indicate which fields must be provided.
13
+ */
14
+ export class RequiredFieldsError extends ChartSpecError {
15
+ fieldNames;
16
+ constructor(fieldNames) {
17
+ super('Required fields are missing');
18
+ this.fieldNames = Array.isArray(fieldNames) ? fieldNames : [fieldNames];
19
+ this.name = 'RequiredFieldsError';
20
+ }
21
+ }
22
+ /**
23
+ * Error thrown when chart configuration references columns that don't exist in the data table.
24
+ * Used during chart validation to indicate which columns could not be found.
25
+ */
26
+ export class MissingColumnsError extends ChartSpecError {
27
+ columnNames;
28
+ constructor(columnNames) {
29
+ super('Columns not found in data table');
30
+ this.columnNames = Array.isArray(columnNames) ? columnNames : [columnNames];
31
+ this.name = 'MissingColumnsError';
32
+ }
33
+ }
34
+ /**
35
+ * Error thrown when chart configuration uses columns with incompatible data types.
36
+ * Used during chart validation to indicate which columns have invalid types and what type is expected.
37
+ */
38
+ export class InvalidColumnTypeError extends ChartSpecError {
39
+ columnNames;
40
+ expectedType;
41
+ constructor(columnNames, expectedType) {
42
+ super('Invalid column type');
43
+ this.columnNames = Array.isArray(columnNames) ? columnNames : [columnNames];
44
+ this.expectedType = expectedType;
45
+ this.name = 'InvalidColumnTypeError';
46
+ }
47
+ }
10
48
  //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/charts/chart-types/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,KAAK;IACvC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF","sourcesContent":["/**\n * Base error class for chart specification generation errors.\n */\nexport class ChartSpecError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'ChartSpecError';\n }\n}\n"]}
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/charts/chart-types/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,KAAK;IACvC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,mBAAoB,SAAQ,cAAc;IAC5C,UAAU,CAAW;IAE9B,YAAY,UAA6B;QACvC,KAAK,CAAC,6BAA6B,CAAC,CAAC;QAErC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QACxE,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,mBAAoB,SAAQ,cAAc;IAC5C,WAAW,CAAW;IAE/B,YAAY,WAA8B;QACxC,KAAK,CAAC,iCAAiC,CAAC,CAAC;QAEzC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;QAC5E,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,sBAAuB,SAAQ,cAAc;IAC/C,WAAW,CAAW;IACtB,YAAY,CAAS;IAE9B,YAAY,WAA8B,EAAE,YAAoB;QAC9D,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAE7B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;QAC5E,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QAEjC,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;IACvC,CAAC;CACF","sourcesContent":["/**\n * Base error class for chart specification generation errors.\n */\nexport class ChartSpecError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'ChartSpecError';\n }\n}\n\n/**\n * Error thrown when required chart configuration fields are missing.\n * Used during chart validation to indicate which fields must be provided.\n */\nexport class RequiredFieldsError extends ChartSpecError {\n readonly fieldNames: string[];\n\n constructor(fieldNames: string | string[]) {\n super('Required fields are missing');\n\n this.fieldNames = Array.isArray(fieldNames) ? fieldNames : [fieldNames];\n this.name = 'RequiredFieldsError';\n }\n}\n\n/**\n * Error thrown when chart configuration references columns that don't exist in the data table.\n * Used during chart validation to indicate which columns could not be found.\n */\nexport class MissingColumnsError extends ChartSpecError {\n readonly columnNames: string[];\n\n constructor(columnNames: string | string[]) {\n super('Columns not found in data table');\n\n this.columnNames = Array.isArray(columnNames) ? columnNames : [columnNames];\n this.name = 'MissingColumnsError';\n }\n}\n\n/**\n * Error thrown when chart configuration uses columns with incompatible data types.\n * Used during chart validation to indicate which columns have invalid types and what type is expected.\n */\nexport class InvalidColumnTypeError extends ChartSpecError {\n readonly columnNames: string[];\n readonly expectedType: string;\n\n constructor(columnNames: string[] | string, expectedType: string) {\n super('Invalid column type');\n\n this.columnNames = Array.isArray(columnNames) ? columnNames : [columnNames];\n this.expectedType = expectedType;\n\n this.name = 'InvalidColumnTypeError';\n }\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import type { Spec } from '@uwdata/mosaic-spec';
2
2
  import { HeatmapChartSettings } from './schema';
3
- export declare function createHeatmapSpec(tableName: string, { x, y }: HeatmapChartSettings): Spec;
3
+ import { CreateSpecOptions } from '../base-types';
4
+ export declare function createHeatmapSpec(options: CreateSpecOptions<HeatmapChartSettings>): Spec;
4
5
  //# sourceMappingURL=spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../../src/charts/chart-types/heatmap/spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,oBAAoB,EAAC,MAAM,UAAU,CAAC;AAG9C,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,EACjB,EAAC,CAAC,EAAE,CAAC,EAAC,EAAE,oBAAoB,GAC3B,IAAI,CA6BN"}
1
+ {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../../src/charts/chart-types/heatmap/spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,oBAAoB,EAAC,MAAM,UAAU,CAAC;AAM9C,OAAO,EAAC,iBAAiB,EAAyB,MAAM,eAAe,CAAC;AAGxE,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,GAC/C,IAAI,CAgCN"}
@@ -1,32 +1,64 @@
1
- import { ChartSpecError } from '../errors';
2
- export function createHeatmapSpec(tableName, { x, y }) {
3
- if (!x) {
4
- throw new ChartSpecError('X field is required for heatmap');
5
- }
6
- if (!y) {
7
- throw new ChartSpecError('Y field is required for heatmap');
1
+ import { InvalidColumnTypeError, MissingColumnsError, RequiredFieldsError, } from '../errors';
2
+ import { getChartTableReference } from '../base-types';
3
+ import { isNumericType } from '../../../column-types-utils';
4
+ export function createHeatmapSpec(options) {
5
+ const { dataTable, selectionName } = options;
6
+ const { xColumn, yColumn } = validateHeatmapSettings(options);
7
+ const plot = [
8
+ {
9
+ mark: 'raster',
10
+ data: { from: getChartTableReference(dataTable), filterBy: '$brush' },
11
+ x: xColumn.name,
12
+ y: yColumn.name,
13
+ fill: 'density',
14
+ bandwidth: 0,
15
+ pixelSize: 3,
16
+ },
17
+ ];
18
+ if (selectionName) {
19
+ plot.push({ select: 'intervalXY', as: '$brush' });
8
20
  }
9
21
  return {
10
- plot: [
11
- {
12
- mark: 'raster',
13
- data: { from: tableName, filterBy: '$brush' },
14
- x,
15
- y,
16
- fill: 'density',
17
- bandwidth: 0,
18
- pixelSize: 3,
19
- },
20
- { select: 'intervalXY', as: '$brush' },
21
- ],
22
+ plot,
22
23
  colorScale: 'sqrt',
23
24
  colorScheme: 'ylorrd',
24
- xLabel: x,
25
- yLabel: y,
25
+ xLabel: xColumn.name,
26
+ yLabel: yColumn.name,
26
27
  height: 250,
27
28
  width: 380,
28
29
  margins: { left: 50, right: 20, top: 20, bottom: 50 },
29
30
  params: { brush: { select: 'crossfilter' } },
30
31
  };
31
32
  }
33
+ function validateHeatmapSettings({ dataTable, settings: { x, y }, }) {
34
+ // Basic validation for required fields
35
+ if (!x || !y) {
36
+ throw new RequiredFieldsError([
37
+ ...(x ? [] : ['X field']),
38
+ ...(y ? [] : ['Y field']),
39
+ ]);
40
+ }
41
+ // Validate X and Y field existence
42
+ const xColumn = dataTable.columns.find((col) => col.name === x);
43
+ const yColumn = dataTable.columns.find((col) => col.name === y);
44
+ if (!xColumn || !yColumn) {
45
+ throw new MissingColumnsError([
46
+ ...(xColumn ? [] : [x]),
47
+ ...(yColumn ? [] : [y]),
48
+ ]);
49
+ }
50
+ // Validate X and Y field are numeric
51
+ const xIsNumeric = isNumericType(xColumn.type);
52
+ const yIsNumeric = isNumericType(yColumn.type);
53
+ if (!xIsNumeric || !yIsNumeric) {
54
+ throw new InvalidColumnTypeError([
55
+ ...(!xIsNumeric ? [xColumn.name] : []),
56
+ ...(!yIsNumeric ? [yColumn.name] : []),
57
+ ], 'numeric');
58
+ }
59
+ return {
60
+ xColumn,
61
+ yColumn,
62
+ };
63
+ }
32
64
  //# sourceMappingURL=spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec.js","sourceRoot":"","sources":["../../../../src/charts/chart-types/heatmap/spec.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAEzC,MAAM,UAAU,iBAAiB,CAC/B,SAAiB,EACjB,EAAC,CAAC,EAAE,CAAC,EAAuB;IAE5B,IAAI,CAAC,CAAC,EAAE,CAAC;QACP,MAAM,IAAI,cAAc,CAAC,iCAAiC,CAAC,CAAC;IAC9D,CAAC;IACD,IAAI,CAAC,CAAC,EAAE,CAAC;QACP,MAAM,IAAI,cAAc,CAAC,iCAAiC,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO;QACL,IAAI,EAAE;YACJ;gBACE,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,EAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAC;gBAC3C,CAAC;gBACD,CAAC;gBACD,IAAI,EAAE,SAAS;gBACf,SAAS,EAAE,CAAC;gBACZ,SAAS,EAAE,CAAC;aACb;YACD,EAAC,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,QAAQ,EAAC;SACrC;QACD,UAAU,EAAE,MAAM;QAClB,WAAW,EAAE,QAAQ;QACrB,MAAM,EAAE,CAAC;QACT,MAAM,EAAE,CAAC;QACT,MAAM,EAAE,GAAG;QACX,KAAK,EAAE,GAAG;QACV,OAAO,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAC;QACnD,MAAM,EAAE,EAAC,KAAK,EAAE,EAAC,MAAM,EAAE,aAAa,EAAC,EAAC;KACjC,CAAC;AACZ,CAAC","sourcesContent":["import type {Spec} from '@uwdata/mosaic-spec';\nimport {HeatmapChartSettings} from './schema';\nimport {ChartSpecError} from '../errors';\n\nexport function createHeatmapSpec(\n tableName: string,\n {x, y}: HeatmapChartSettings,\n): Spec {\n if (!x) {\n throw new ChartSpecError('X field is required for heatmap');\n }\n if (!y) {\n throw new ChartSpecError('Y field is required for heatmap');\n }\n return {\n plot: [\n {\n mark: 'raster',\n data: {from: tableName, filterBy: '$brush'},\n x,\n y,\n fill: 'density',\n bandwidth: 0,\n pixelSize: 3,\n },\n {select: 'intervalXY', as: '$brush'},\n ],\n colorScale: 'sqrt',\n colorScheme: 'ylorrd',\n xLabel: x,\n yLabel: y,\n height: 250,\n width: 380,\n margins: {left: 50, right: 20, top: 20, bottom: 50},\n params: {brush: {select: 'crossfilter'}},\n } as Spec;\n}\n"]}
1
+ {"version":3,"file":"spec.js","sourceRoot":"","sources":["../../../../src/charts/chart-types/heatmap/spec.ts"],"names":[],"mappings":"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","sourcesContent":["import type {Spec} from '@uwdata/mosaic-spec';\nimport {HeatmapChartSettings} from './schema';\nimport {\n InvalidColumnTypeError,\n MissingColumnsError,\n RequiredFieldsError,\n} from '../errors';\nimport {CreateSpecOptions, getChartTableReference} from '../base-types';\nimport {isNumericType} from '../../../column-types-utils';\n\nexport function createHeatmapSpec(\n options: CreateSpecOptions<HeatmapChartSettings>,\n): Spec {\n const {dataTable, selectionName} = options;\n\n const {xColumn, yColumn} = validateHeatmapSettings(options);\n\n const plot: unknown[] = [\n {\n mark: 'raster',\n data: {from: getChartTableReference(dataTable), filterBy: '$brush'},\n x: xColumn.name,\n y: yColumn.name,\n fill: 'density',\n bandwidth: 0,\n pixelSize: 3,\n },\n ];\n\n if (selectionName) {\n plot.push({select: 'intervalXY', as: '$brush'});\n }\n\n return {\n plot,\n colorScale: 'sqrt',\n colorScheme: 'ylorrd',\n xLabel: xColumn.name,\n yLabel: yColumn.name,\n height: 250,\n width: 380,\n margins: {left: 50, right: 20, top: 20, bottom: 50},\n params: {brush: {select: 'crossfilter'}},\n } as Spec;\n}\n\nfunction validateHeatmapSettings({\n dataTable,\n settings: {x, y},\n}: CreateSpecOptions<HeatmapChartSettings>) {\n // Basic validation for required fields\n if (!x || !y) {\n throw new RequiredFieldsError([\n ...(x ? [] : ['X field']),\n ...(y ? [] : ['Y field']),\n ]);\n }\n\n // Validate X and Y field existence\n const xColumn = dataTable.columns.find((col) => col.name === x);\n const yColumn = dataTable.columns.find((col) => col.name === y);\n\n if (!xColumn || !yColumn) {\n throw new MissingColumnsError([\n ...(xColumn ? [] : [x]),\n ...(yColumn ? [] : [y]),\n ]);\n }\n\n // Validate X and Y field are numeric\n const xIsNumeric = isNumericType(xColumn.type);\n const yIsNumeric = isNumericType(yColumn.type);\n if (!xIsNumeric || !yIsNumeric) {\n throw new InvalidColumnTypeError(\n [\n ...(!xIsNumeric ? [xColumn.name] : []),\n ...(!yIsNumeric ? [yColumn.name] : []),\n ],\n 'numeric',\n );\n }\n\n return {\n xColumn,\n yColumn,\n };\n}\n"]}
@@ -16,13 +16,13 @@ Example queries: "heatmap of population density by latitude and longitude", "tem
16
16
 
17
17
  Required: x and y should be numeric (${NUMERIC_COLUMN_TYPES.join(', ')}) for creating the grid.
18
18
 
19
- NOTE: Heatmaps aggregate data into grid cells and compute density/counts, so they handle large datasets efficiently (no data point limit). Heatmaps are a good alternative when bubble charts would exceed ${deps.maxDataPoints.toLocaleString()} rows.
19
+ NOTE: Heatmaps aggregate data into grid cells and compute density/counts, so they handle large datasets efficiently (no data point limit). Heatmaps are a good alternative when scatter charts would exceed ${deps.maxDataPoints.toLocaleString()} rows.
20
20
 
21
21
  To UPDATE an existing heatmap: provide the panelId parameter. Otherwise creates new panel.
22
22
 
23
23
  Best for: large datasets with overlapping points, finding patterns/hotspots in 2D space, temporal patterns (hour×day), spatial density visualization.
24
24
 
25
- Do NOT use for: individual point plots (use bubble-chart), single variable distribution (use histogram), time trends (use line-chart).`,
25
+ Do NOT use for: individual point plots (use scatter-plot), single variable distribution (use histogram), time trends (use line-chart).`,
26
26
  inputSchema: HeatmapToolParameters,
27
27
  execute: async (params, context) => {
28
28
  try {