@fluentui/react-charts 9.3.22 → 9.3.24

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 (755) hide show
  1. package/CHANGELOG.md +33 -2
  2. package/dist/index.d.cts +5724 -0
  3. package/lib/AnnotationOnlyChart.js +1 -1
  4. package/lib/AnnotationOnlyChart.js.map +1 -1
  5. package/lib/AreaChart.js +1 -1
  6. package/lib/AreaChart.js.map +1 -1
  7. package/lib/CartesianChart.js +1 -1
  8. package/lib/CartesianChart.js.map +1 -1
  9. package/lib/ChartTable.js +1 -1
  10. package/lib/ChartTable.js.map +1 -1
  11. package/lib/DeclarativeChart.js +1 -1
  12. package/lib/DeclarativeChart.js.map +1 -1
  13. package/lib/DonutChart.js +1 -1
  14. package/lib/DonutChart.js.map +1 -1
  15. package/lib/FunnelChart.js +1 -1
  16. package/lib/FunnelChart.js.map +1 -1
  17. package/lib/GanttChart.js +1 -1
  18. package/lib/GanttChart.js.map +1 -1
  19. package/lib/GaugeChart.js +1 -1
  20. package/lib/GaugeChart.js.map +1 -1
  21. package/lib/GroupedVerticalBarChart.js +1 -1
  22. package/lib/GroupedVerticalBarChart.js.map +1 -1
  23. package/lib/HeatMapChart.js +1 -1
  24. package/lib/HeatMapChart.js.map +1 -1
  25. package/lib/HorizontalBarChart.js +1 -1
  26. package/lib/HorizontalBarChart.js.map +1 -1
  27. package/lib/HorizontalBarChartWithAxis.js +1 -1
  28. package/lib/HorizontalBarChartWithAxis.js.map +1 -1
  29. package/lib/Legends.js +1 -1
  30. package/lib/Legends.js.map +1 -1
  31. package/lib/LineChart.js +1 -1
  32. package/lib/LineChart.js.map +1 -1
  33. package/lib/PolarChart.js +1 -1
  34. package/lib/PolarChart.js.map +1 -1
  35. package/lib/Popover.js +1 -1
  36. package/lib/Popover.js.map +1 -1
  37. package/lib/ResponsiveContainer.js +1 -1
  38. package/lib/ResponsiveContainer.js.map +1 -1
  39. package/lib/SankeyChart.js +1 -1
  40. package/lib/SankeyChart.js.map +1 -1
  41. package/lib/ScatterChart.js +1 -1
  42. package/lib/ScatterChart.js.map +1 -1
  43. package/lib/Sparkline.js +1 -1
  44. package/lib/Sparkline.js.map +1 -1
  45. package/lib/VegaDeclarativeChart.js +1 -1
  46. package/lib/VegaDeclarativeChart.js.map +1 -1
  47. package/lib/VerticalBarChart.js +1 -1
  48. package/lib/VerticalBarChart.js.map +1 -1
  49. package/lib/VerticalStackedBarChart.js +1 -1
  50. package/lib/VerticalStackedBarChart.js.map +1 -1
  51. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +5 -5
  52. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
  53. package/lib/components/AnnotationOnlyChart/index.js +2 -2
  54. package/lib/components/AnnotationOnlyChart/index.js.map +1 -1
  55. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +2 -2
  56. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -1
  57. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +2 -2
  58. package/lib/components/AreaChart/AreaChart.js +11 -11
  59. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  60. package/lib/components/AreaChart/index.js +3 -3
  61. package/lib/components/AreaChart/index.js.map +1 -1
  62. package/lib/components/AreaChart/useAreaChartStyles.styles.js +2 -2
  63. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  64. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +2 -2
  65. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  66. package/lib/components/ChartTable/ChartTable.js +9 -9
  67. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  68. package/lib/components/ChartTable/index.js +3 -3
  69. package/lib/components/ChartTable/index.js.map +1 -1
  70. package/lib/components/ChartTable/useChartTableStyles.styles.js +3 -3
  71. package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  72. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +3 -3
  73. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  74. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +5 -5
  75. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
  76. package/lib/components/CommonComponents/Annotations/index.js +2 -2
  77. package/lib/components/CommonComponents/Annotations/index.js.map +1 -1
  78. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +3 -3
  79. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -1
  80. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +3 -3
  81. package/lib/components/CommonComponents/CartesianChart.js +9 -9
  82. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  83. package/lib/components/CommonComponents/ChartPopover.js +9 -9
  84. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  85. package/lib/components/CommonComponents/index.js +6 -6
  86. package/lib/components/CommonComponents/index.js.map +1 -1
  87. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +4 -4
  88. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  89. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +4 -4
  90. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  91. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +2 -2
  92. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  93. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +2 -2
  94. package/lib/components/DeclarativeChart/DeclarativeChart.js +28 -28
  95. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  96. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +5 -5
  97. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  98. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +9 -9
  99. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  100. package/lib/components/DeclarativeChart/index.js +1 -1
  101. package/lib/components/DeclarativeChart/index.js.map +1 -1
  102. package/lib/components/DonutChart/Arc/Arc.js +8 -7
  103. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  104. package/lib/components/DonutChart/Arc/index.js +2 -2
  105. package/lib/components/DonutChart/Arc/index.js.map +1 -1
  106. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +3 -3
  107. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  108. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +3 -3
  109. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  110. package/lib/components/DonutChart/DonutChart.js +10 -10
  111. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  112. package/lib/components/DonutChart/Pie/Pie.js +8 -6
  113. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  114. package/lib/components/DonutChart/Pie/index.js +2 -2
  115. package/lib/components/DonutChart/Pie/index.js.map +1 -1
  116. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +2 -2
  117. package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
  118. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js +2 -2
  119. package/lib/components/DonutChart/index.js +3 -3
  120. package/lib/components/DonutChart/index.js.map +1 -1
  121. package/lib/components/DonutChart/useDonutChartStyles.styles.js +3 -3
  122. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  123. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +3 -3
  124. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  125. package/lib/components/FunnelChart/FunnelChart.js +25 -14
  126. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  127. package/lib/components/FunnelChart/index.js +2 -2
  128. package/lib/components/FunnelChart/index.js.map +1 -1
  129. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +3 -3
  130. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
  131. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +3 -3
  132. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
  133. package/lib/components/GanttChart/GanttChart.js +14 -11
  134. package/lib/components/GanttChart/GanttChart.js.map +1 -1
  135. package/lib/components/GanttChart/index.js +2 -2
  136. package/lib/components/GanttChart/index.js.map +1 -1
  137. package/lib/components/GaugeChart/GaugeChart.js +17 -14
  138. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  139. package/lib/components/GaugeChart/index.js +3 -3
  140. package/lib/components/GaugeChart/index.js.map +1 -1
  141. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +3 -3
  142. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  143. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +3 -3
  144. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
  145. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +11 -11
  146. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  147. package/lib/components/GroupedVerticalBarChart/index.js +3 -3
  148. package/lib/components/GroupedVerticalBarChart/index.js.map +1 -1
  149. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +2 -2
  150. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  151. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +2 -2
  152. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  153. package/lib/components/HeatMapChart/HeatMapChart.js +21 -16
  154. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  155. package/lib/components/HeatMapChart/index.js +3 -3
  156. package/lib/components/HeatMapChart/index.js.map +1 -1
  157. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +2 -2
  158. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  159. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +2 -2
  160. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +11 -11
  161. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  162. package/lib/components/HorizontalBarChart/index.js +3 -3
  163. package/lib/components/HorizontalBarChart/index.js.map +1 -1
  164. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +6 -6
  165. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  166. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +5 -5
  167. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  168. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +13 -13
  169. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  170. package/lib/components/HorizontalBarChartWithAxis/index.js +3 -3
  171. package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  172. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +3 -3
  173. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  174. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +3 -3
  175. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  176. package/lib/components/Legends/Legends.js +72 -42
  177. package/lib/components/Legends/Legends.js.map +1 -1
  178. package/lib/components/Legends/OverflowMenu.js +50 -12
  179. package/lib/components/Legends/OverflowMenu.js.map +1 -1
  180. package/lib/components/Legends/index.js +3 -3
  181. package/lib/components/Legends/index.js.map +1 -1
  182. package/lib/components/Legends/shape.js +2 -2
  183. package/lib/components/Legends/shape.js.map +1 -1
  184. package/lib/components/Legends/useLegendsStyles.styles.js +3 -3
  185. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  186. package/lib/components/Legends/useLegendsStyles.styles.raw.js +3 -3
  187. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  188. package/lib/components/LineChart/LineChart.js +16 -16
  189. package/lib/components/LineChart/LineChart.js.map +1 -1
  190. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +5 -5
  191. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  192. package/lib/components/LineChart/eventAnnotation/LabelLink.js +4 -4
  193. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  194. package/lib/components/LineChart/eventAnnotation/Textbox.js +3 -3
  195. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  196. package/lib/components/LineChart/index.js +4 -4
  197. package/lib/components/LineChart/index.js.map +1 -1
  198. package/lib/components/LineChart/useLineChartStyles.styles.js +4 -4
  199. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  200. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +4 -4
  201. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  202. package/lib/components/PolarChart/PolarChart.js +13 -13
  203. package/lib/components/PolarChart/PolarChart.js.map +1 -1
  204. package/lib/components/PolarChart/PolarChart.utils.js +6 -6
  205. package/lib/components/PolarChart/PolarChart.utils.js.map +1 -1
  206. package/lib/components/PolarChart/index.js +2 -2
  207. package/lib/components/PolarChart/index.js.map +1 -1
  208. package/lib/components/PolarChart/usePolarChartStyles.styles.js +2 -2
  209. package/lib/components/PolarChart/usePolarChartStyles.styles.js.map +1 -1
  210. package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js +2 -2
  211. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +4 -4
  212. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  213. package/lib/components/ResponsiveContainer/index.js +3 -3
  214. package/lib/components/ResponsiveContainer/index.js.map +1 -1
  215. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +1 -1
  216. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -1
  217. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +1 -1
  218. package/lib/components/ResponsiveContainer/withResponsiveContainer.js +2 -2
  219. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  220. package/lib/components/SankeyChart/SankeyChart.js +27 -21
  221. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  222. package/lib/components/SankeyChart/index.js +3 -3
  223. package/lib/components/SankeyChart/index.js.map +1 -1
  224. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +3 -3
  225. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  226. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +3 -3
  227. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  228. package/lib/components/ScatterChart/ScatterChart.js +16 -16
  229. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  230. package/lib/components/ScatterChart/index.js +3 -3
  231. package/lib/components/ScatterChart/index.js.map +1 -1
  232. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +2 -2
  233. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  234. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +2 -2
  235. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  236. package/lib/components/Sparkline/Sparkline.js +7 -7
  237. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  238. package/lib/components/Sparkline/index.js +3 -3
  239. package/lib/components/Sparkline/index.js.map +1 -1
  240. package/lib/components/Sparkline/useSparklineStyles.styles.js +2 -2
  241. package/lib/components/Sparkline/useSparklineStyles.styles.js.map +1 -1
  242. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js +2 -2
  243. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js +15 -15
  244. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js.map +1 -1
  245. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js +4 -4
  246. package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js +2 -2
  247. package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js.map +1 -1
  248. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +5 -5
  249. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +1 -1
  250. package/lib/components/VegaDeclarativeChart/index.js +1 -1
  251. package/lib/components/VegaDeclarativeChart/index.js.map +1 -1
  252. package/lib/components/VerticalBarChart/VerticalBarChart.js +16 -13
  253. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  254. package/lib/components/VerticalBarChart/index.js +3 -3
  255. package/lib/components/VerticalBarChart/index.js.map +1 -1
  256. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +4 -4
  257. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  258. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +4 -4
  259. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  260. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +11 -11
  261. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  262. package/lib/components/VerticalStackedBarChart/index.js +3 -3
  263. package/lib/components/VerticalStackedBarChart/index.js.map +1 -1
  264. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +2 -2
  265. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  266. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +2 -2
  267. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  268. package/lib/index.js +26 -26
  269. package/lib/index.js.map +1 -1
  270. package/lib/types/index.js +3 -3
  271. package/lib/types/index.js.map +1 -1
  272. package/lib/utilities/ChartTitle.js +4 -4
  273. package/lib/utilities/ChartTitle.js.map +1 -1
  274. package/lib/utilities/Common.styles.js +2 -2
  275. package/lib/utilities/Common.styles.js.map +1 -1
  276. package/lib/utilities/Common.styles.raw.js +2 -2
  277. package/lib/utilities/Common.styles.raw.js.map +1 -1
  278. package/lib/utilities/FocusableTooltipText.js +6 -6
  279. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  280. package/lib/utilities/SVGTooltipText.js +7 -7
  281. package/lib/utilities/SVGTooltipText.js.map +1 -1
  282. package/lib/utilities/async-utils.js +1 -1
  283. package/lib/utilities/async-utils.js.map +1 -1
  284. package/lib/utilities/colors.js +2 -2
  285. package/lib/utilities/getWindow.js +1 -1
  286. package/lib/utilities/hooks.js +3 -3
  287. package/lib/utilities/hooks.js.map +1 -1
  288. package/lib/utilities/image-export-utils.js +4 -4
  289. package/lib/utilities/image-export-utils.js.map +1 -1
  290. package/lib/utilities/index.js +5 -5
  291. package/lib/utilities/index.js.map +1 -1
  292. package/lib/utilities/scatterpolar-utils.js +1 -1
  293. package/lib/utilities/test-data.js +1 -1
  294. package/lib/utilities/test-data.js.map +1 -1
  295. package/lib/utilities/utilities.js +13 -13
  296. package/lib/utilities/utilities.js.map +1 -1
  297. package/lib-commonjs/AnnotationOnlyChart.cjs +6 -0
  298. package/lib-commonjs/{AnnotationOnlyChart.js.map → AnnotationOnlyChart.cjs.map} +1 -1
  299. package/lib-commonjs/{DonutChart.js → AreaChart.cjs} +1 -1
  300. package/lib-commonjs/{AreaChart.js.map → AreaChart.cjs.map} +1 -1
  301. package/lib-commonjs/{AnnotationOnlyChart.js → CartesianChart.cjs} +1 -1
  302. package/lib-commonjs/{CartesianChart.js.map → CartesianChart.cjs.map} +1 -1
  303. package/lib-commonjs/{VegaDeclarativeChart.js → ChartTable.cjs} +1 -1
  304. package/lib-commonjs/{ChartTable.js.map → ChartTable.cjs.map} +1 -1
  305. package/lib-commonjs/DeclarativeChart.cjs +6 -0
  306. package/lib-commonjs/{DeclarativeChart.js.map → DeclarativeChart.cjs.map} +1 -1
  307. package/lib-commonjs/{ChartTable.js → DonutChart.cjs} +1 -1
  308. package/lib-commonjs/{DonutChart.js.map → DonutChart.cjs.map} +1 -1
  309. package/lib-commonjs/FunnelChart.cjs +6 -0
  310. package/lib-commonjs/{FunnelChart.js.map → FunnelChart.cjs.map} +1 -1
  311. package/lib-commonjs/GanttChart.cjs +6 -0
  312. package/lib-commonjs/{GanttChart.js.map → GanttChart.cjs.map} +1 -1
  313. package/lib-commonjs/GaugeChart.cjs +6 -0
  314. package/lib-commonjs/{GaugeChart.js.map → GaugeChart.cjs.map} +1 -1
  315. package/lib-commonjs/{GroupedVerticalBarChart.js → GroupedVerticalBarChart.cjs} +1 -1
  316. package/lib-commonjs/{GroupedVerticalBarChart.js.map → GroupedVerticalBarChart.cjs.map} +1 -1
  317. package/lib-commonjs/{DeclarativeChart.js → HeatMapChart.cjs} +1 -1
  318. package/lib-commonjs/{HeatMapChart.js.map → HeatMapChart.cjs.map} +1 -1
  319. package/lib-commonjs/HorizontalBarChart.cjs +6 -0
  320. package/lib-commonjs/{HorizontalBarChart.js.map → HorizontalBarChart.cjs.map} +1 -1
  321. package/lib-commonjs/{HorizontalBarChartWithAxis.js → HorizontalBarChartWithAxis.cjs} +1 -1
  322. package/lib-commonjs/{HorizontalBarChartWithAxis.js.map → HorizontalBarChartWithAxis.cjs.map} +1 -1
  323. package/lib-commonjs/{SankeyChart.js → Legends.cjs} +1 -1
  324. package/lib-commonjs/{Legends.js.map → Legends.cjs.map} +1 -1
  325. package/lib-commonjs/{FunnelChart.js → LineChart.cjs} +1 -1
  326. package/lib-commonjs/{LineChart.js.map → LineChart.cjs.map} +1 -1
  327. package/lib-commonjs/PolarChart.cjs +6 -0
  328. package/lib-commonjs/{PolarChart.js.map → PolarChart.cjs.map} +1 -1
  329. package/lib-commonjs/Popover.cjs +6 -0
  330. package/lib-commonjs/{Popover.js.map → Popover.cjs.map} +1 -1
  331. package/lib-commonjs/ResponsiveContainer.cjs +6 -0
  332. package/lib-commonjs/{ResponsiveContainer.js.map → ResponsiveContainer.cjs.map} +1 -1
  333. package/lib-commonjs/SankeyChart.cjs +6 -0
  334. package/lib-commonjs/{SankeyChart.js.map → SankeyChart.cjs.map} +1 -1
  335. package/lib-commonjs/{CartesianChart.js → ScatterChart.cjs} +1 -1
  336. package/lib-commonjs/{ScatterChart.js.map → ScatterChart.cjs.map} +1 -1
  337. package/lib-commonjs/{AreaChart.js → Sparkline.cjs} +1 -1
  338. package/lib-commonjs/{Sparkline.js.map → Sparkline.cjs.map} +1 -1
  339. package/lib-commonjs/VegaDeclarativeChart.cjs +6 -0
  340. package/lib-commonjs/{VegaDeclarativeChart.js.map → VegaDeclarativeChart.cjs.map} +1 -1
  341. package/lib-commonjs/VerticalBarChart.cjs +6 -0
  342. package/lib-commonjs/{VerticalBarChart.js.map → VerticalBarChart.cjs.map} +1 -1
  343. package/lib-commonjs/{VerticalStackedBarChart.js → VerticalStackedBarChart.cjs} +1 -1
  344. package/lib-commonjs/{VerticalStackedBarChart.js.map → VerticalStackedBarChart.cjs.map} +1 -1
  345. package/lib-commonjs/components/AnnotationOnlyChart/{AnnotationOnlyChart.js → AnnotationOnlyChart.cjs} +5 -5
  346. package/lib-commonjs/components/AnnotationOnlyChart/{AnnotationOnlyChart.js.map → AnnotationOnlyChart.cjs.map} +1 -1
  347. package/lib-commonjs/{HeatMapChart.js → components/AnnotationOnlyChart/index.cjs} +2 -1
  348. package/lib-commonjs/components/AnnotationOnlyChart/{index.js.map → index.cjs.map} +1 -1
  349. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.cjs.map +1 -0
  350. package/lib-commonjs/components/AreaChart/{AreaChart.js → AreaChart.cjs} +4 -4
  351. package/lib-commonjs/components/AreaChart/{AreaChart.js.map → AreaChart.cjs.map} +1 -1
  352. package/lib-commonjs/components/AreaChart/index.cjs +8 -0
  353. package/lib-commonjs/components/AreaChart/{index.js.map → index.cjs.map} +1 -1
  354. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.cjs.map +1 -0
  355. package/lib-commonjs/components/AreaChart/{useAreaChartStyles.styles.raw.js → useAreaChartStyles.styles.raw.cjs} +1 -1
  356. package/lib-commonjs/components/AreaChart/{useAreaChartStyles.styles.raw.js.map → useAreaChartStyles.styles.raw.cjs.map} +1 -1
  357. package/lib-commonjs/components/ChartTable/{ChartTable.js → ChartTable.cjs} +5 -5
  358. package/lib-commonjs/components/ChartTable/{ChartTable.js.map → ChartTable.cjs.map} +1 -1
  359. package/lib-commonjs/components/ChartTable/index.cjs +8 -0
  360. package/lib-commonjs/components/ChartTable/{index.js.map → index.cjs.map} +1 -1
  361. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.cjs.map +1 -0
  362. package/lib-commonjs/components/ChartTable/{useChartTableStyles.styles.raw.js → useChartTableStyles.styles.raw.cjs} +1 -1
  363. package/lib-commonjs/components/ChartTable/{useChartTableStyles.styles.raw.js.map → useChartTableStyles.styles.raw.cjs.map} +1 -1
  364. package/lib-commonjs/components/CommonComponents/Annotations/{ChartAnnotationLayer.js → ChartAnnotationLayer.cjs} +1 -1
  365. package/lib-commonjs/components/CommonComponents/Annotations/{ChartAnnotationLayer.js.map → ChartAnnotationLayer.cjs.map} +1 -1
  366. package/lib-commonjs/components/CommonComponents/Annotations/index.cjs +7 -0
  367. package/lib-commonjs/components/CommonComponents/Annotations/{index.js.map → index.cjs.map} +1 -1
  368. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.cjs.map +1 -0
  369. package/lib-commonjs/components/CommonComponents/{CartesianChart.js → CartesianChart.cjs} +5 -5
  370. package/lib-commonjs/components/CommonComponents/{CartesianChart.js.map → CartesianChart.cjs.map} +1 -1
  371. package/lib-commonjs/components/CommonComponents/{ChartPopover.js → ChartPopover.cjs} +3 -3
  372. package/lib-commonjs/components/CommonComponents/{ChartPopover.js.map → ChartPopover.cjs.map} +1 -1
  373. package/lib-commonjs/components/CommonComponents/index.cjs +11 -0
  374. package/lib-commonjs/components/CommonComponents/{index.js.map → index.cjs.map} +1 -1
  375. package/lib-commonjs/components/CommonComponents/{useCartesianChartStyles.styles.js → useCartesianChartStyles.styles.cjs} +1 -1
  376. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.cjs.map +1 -0
  377. package/lib-commonjs/components/CommonComponents/{useCartesianChartStyles.styles.raw.js → useCartesianChartStyles.styles.raw.cjs} +2 -2
  378. package/lib-commonjs/components/CommonComponents/{useCartesianChartStyles.styles.raw.js.map → useCartesianChartStyles.styles.raw.cjs.map} +1 -1
  379. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.cjs.map +1 -0
  380. package/lib-commonjs/components/DeclarativeChart/{DeclarativeChart.js → DeclarativeChart.cjs} +21 -21
  381. package/lib-commonjs/components/DeclarativeChart/{DeclarativeChart.js.map → DeclarativeChart.cjs.map} +1 -1
  382. package/lib-commonjs/components/DeclarativeChart/{PlotlyColorAdapter.js → PlotlyColorAdapter.cjs} +2 -2
  383. package/lib-commonjs/components/DeclarativeChart/{PlotlyColorAdapter.js.map → PlotlyColorAdapter.cjs.map} +1 -1
  384. package/lib-commonjs/components/DeclarativeChart/{PlotlySchemaAdapter.js → PlotlySchemaAdapter.cjs} +3 -3
  385. package/lib-commonjs/components/DeclarativeChart/{PlotlySchemaAdapter.js.map → PlotlySchemaAdapter.cjs.map} +1 -1
  386. package/lib-commonjs/components/DeclarativeChart/{index.js → index.cjs} +1 -1
  387. package/lib-commonjs/components/DeclarativeChart/{index.js.map → index.cjs.map} +1 -1
  388. package/lib-commonjs/components/DonutChart/Arc/{Arc.js → Arc.cjs} +5 -4
  389. package/lib-commonjs/components/DonutChart/Arc/Arc.cjs.map +1 -0
  390. package/lib-commonjs/components/DonutChart/Arc/index.cjs +7 -0
  391. package/lib-commonjs/components/DonutChart/Arc/{index.js.map → index.cjs.map} +1 -1
  392. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.cjs.map +1 -0
  393. package/lib-commonjs/components/DonutChart/Arc/{useArcStyles.styles.raw.js → useArcStyles.styles.raw.cjs} +1 -1
  394. package/lib-commonjs/components/DonutChart/Arc/{useArcStyles.styles.raw.js.map → useArcStyles.styles.raw.cjs.map} +1 -1
  395. package/lib-commonjs/components/DonutChart/{DonutChart.js → DonutChart.cjs} +6 -6
  396. package/lib-commonjs/components/DonutChart/{DonutChart.js.map → DonutChart.cjs.map} +1 -1
  397. package/lib-commonjs/components/DonutChart/Pie/{Pie.js → Pie.cjs} +6 -4
  398. package/lib-commonjs/components/DonutChart/Pie/{Pie.js.map → Pie.cjs.map} +1 -1
  399. package/lib-commonjs/components/DonutChart/Pie/index.cjs +7 -0
  400. package/lib-commonjs/components/DonutChart/Pie/{index.js.map → index.cjs.map} +1 -1
  401. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.cjs.map +1 -0
  402. package/lib-commonjs/components/DonutChart/index.cjs +8 -0
  403. package/lib-commonjs/components/DonutChart/{index.js.map → index.cjs.map} +1 -1
  404. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.cjs.map +1 -0
  405. package/lib-commonjs/components/DonutChart/{useDonutChartStyles.styles.raw.js → useDonutChartStyles.styles.raw.cjs} +1 -1
  406. package/lib-commonjs/components/DonutChart/{useDonutChartStyles.styles.raw.js.map → useDonutChartStyles.styles.raw.cjs.map} +1 -1
  407. package/lib-commonjs/components/FunnelChart/{FunnelChart.js → FunnelChart.cjs} +21 -10
  408. package/lib-commonjs/components/FunnelChart/FunnelChart.cjs.map +1 -0
  409. package/lib-commonjs/components/FunnelChart/index.cjs +7 -0
  410. package/lib-commonjs/components/FunnelChart/{index.js.map → index.cjs.map} +1 -1
  411. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.cjs.map +1 -0
  412. package/lib-commonjs/components/FunnelChart/{useFunnelChartStyles.styles.raw.js → useFunnelChartStyles.styles.raw.cjs} +1 -1
  413. package/lib-commonjs/components/FunnelChart/{useFunnelChartStyles.styles.raw.js.map → useFunnelChartStyles.styles.raw.cjs.map} +1 -1
  414. package/lib-commonjs/components/GanttChart/{GanttChart.js → GanttChart.cjs} +10 -7
  415. package/lib-commonjs/components/GanttChart/GanttChart.cjs.map +1 -0
  416. package/lib-commonjs/components/GanttChart/index.cjs +7 -0
  417. package/lib-commonjs/components/GanttChart/{index.js.map → index.cjs.map} +1 -1
  418. package/lib-commonjs/components/GaugeChart/{GaugeChart.js → GaugeChart.cjs} +12 -9
  419. package/lib-commonjs/components/GaugeChart/{GaugeChart.js.map → GaugeChart.cjs.map} +1 -1
  420. package/lib-commonjs/components/GaugeChart/index.cjs +8 -0
  421. package/lib-commonjs/components/GaugeChart/{index.js.map → index.cjs.map} +1 -1
  422. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.cjs.map +1 -0
  423. package/lib-commonjs/components/GaugeChart/{useGaugeChartStyles.styles.raw.js → useGaugeChartStyles.styles.raw.cjs} +1 -1
  424. package/lib-commonjs/components/GaugeChart/{useGaugeChartStyles.styles.raw.js.map → useGaugeChartStyles.styles.raw.cjs.map} +1 -1
  425. package/lib-commonjs/components/GroupedVerticalBarChart/{GroupedVerticalBarChart.js → GroupedVerticalBarChart.cjs} +4 -4
  426. package/lib-commonjs/components/GroupedVerticalBarChart/{GroupedVerticalBarChart.js.map → GroupedVerticalBarChart.cjs.map} +1 -1
  427. package/lib-commonjs/components/GroupedVerticalBarChart/index.cjs +8 -0
  428. package/lib-commonjs/components/GroupedVerticalBarChart/{index.js.map → index.cjs.map} +1 -1
  429. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.cjs.map +1 -0
  430. package/lib-commonjs/components/GroupedVerticalBarChart/{useGroupedVerticalBarChartStyles.styles.raw.js → useGroupedVerticalBarChartStyles.styles.raw.cjs} +1 -1
  431. package/lib-commonjs/components/GroupedVerticalBarChart/{useGroupedVerticalBarChartStyles.styles.raw.js.map → useGroupedVerticalBarChartStyles.styles.raw.cjs.map} +1 -1
  432. package/lib-commonjs/components/HeatMapChart/{HeatMapChart.js → HeatMapChart.cjs} +13 -8
  433. package/lib-commonjs/components/HeatMapChart/HeatMapChart.cjs.map +1 -0
  434. package/lib-commonjs/components/HeatMapChart/index.cjs +8 -0
  435. package/lib-commonjs/components/HeatMapChart/{index.js.map → index.cjs.map} +1 -1
  436. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.cjs.map +1 -0
  437. package/lib-commonjs/components/HorizontalBarChart/{HorizontalBarChart.js → HorizontalBarChart.cjs} +6 -6
  438. package/lib-commonjs/components/HorizontalBarChart/{HorizontalBarChart.js.map → HorizontalBarChart.cjs.map} +1 -1
  439. package/lib-commonjs/components/HorizontalBarChart/index.cjs +8 -0
  440. package/lib-commonjs/components/HorizontalBarChart/{index.js.map → index.cjs.map} +1 -1
  441. package/lib-commonjs/components/HorizontalBarChart/{useHorizontalBarChartStyles.styles.js → useHorizontalBarChartStyles.styles.cjs} +5 -5
  442. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.cjs.map +1 -0
  443. package/lib-commonjs/components/HorizontalBarChart/{useHorizontalBarChartStyles.styles.raw.js → useHorizontalBarChartStyles.styles.raw.cjs} +3 -3
  444. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.cjs.map +1 -0
  445. package/lib-commonjs/components/HorizontalBarChartWithAxis/{HorizontalBarChartWithAxis.js → HorizontalBarChartWithAxis.cjs} +9 -9
  446. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.cjs.map +1 -0
  447. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.cjs +8 -0
  448. package/lib-commonjs/components/HorizontalBarChartWithAxis/{index.js.map → index.cjs.map} +1 -1
  449. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.cjs.map +1 -0
  450. package/lib-commonjs/components/HorizontalBarChartWithAxis/{useHorizontalBarChartWithAxisStyles.styles.raw.js → useHorizontalBarChartWithAxisStyles.styles.raw.cjs} +1 -1
  451. package/lib-commonjs/components/HorizontalBarChartWithAxis/{useHorizontalBarChartWithAxisStyles.styles.raw.js.map → useHorizontalBarChartWithAxisStyles.styles.raw.cjs.map} +1 -1
  452. package/lib-commonjs/components/Legends/{Legends.js → Legends.cjs} +66 -36
  453. package/lib-commonjs/components/Legends/Legends.cjs.map +1 -0
  454. package/lib-commonjs/components/Legends/OverflowMenu.cjs +82 -0
  455. package/lib-commonjs/components/Legends/OverflowMenu.cjs.map +1 -0
  456. package/lib-commonjs/components/Legends/index.cjs +8 -0
  457. package/lib-commonjs/components/Legends/{index.js.map → index.cjs.map} +1 -1
  458. package/lib-commonjs/components/Legends/{shape.js → shape.cjs} +1 -1
  459. package/lib-commonjs/components/Legends/{shape.js.map → shape.cjs.map} +1 -1
  460. package/lib-commonjs/components/Legends/useLegendsStyles.styles.cjs.map +1 -0
  461. package/lib-commonjs/components/Legends/{useLegendsStyles.styles.raw.js → useLegendsStyles.styles.raw.cjs} +1 -1
  462. package/lib-commonjs/components/Legends/{useLegendsStyles.styles.raw.js.map → useLegendsStyles.styles.raw.cjs.map} +1 -1
  463. package/lib-commonjs/components/LineChart/{LineChart.js → LineChart.cjs} +7 -7
  464. package/lib-commonjs/components/LineChart/{LineChart.js.map → LineChart.cjs.map} +1 -1
  465. package/lib-commonjs/components/LineChart/eventAnnotation/{EventAnnotation.js → EventAnnotation.cjs} +3 -3
  466. package/lib-commonjs/components/LineChart/eventAnnotation/{EventAnnotation.js.map → EventAnnotation.cjs.map} +1 -1
  467. package/lib-commonjs/components/LineChart/eventAnnotation/{LabelLink.js → LabelLink.cjs} +2 -2
  468. package/lib-commonjs/components/LineChart/eventAnnotation/{LabelLink.js.map → LabelLink.cjs.map} +1 -1
  469. package/lib-commonjs/components/LineChart/eventAnnotation/{Textbox.js → Textbox.cjs} +1 -1
  470. package/lib-commonjs/components/LineChart/eventAnnotation/{Textbox.js.map → Textbox.cjs.map} +1 -1
  471. package/lib-commonjs/components/LineChart/index.cjs +9 -0
  472. package/lib-commonjs/components/LineChart/{index.js.map → index.cjs.map} +1 -1
  473. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.cjs.map +1 -0
  474. package/lib-commonjs/components/LineChart/{useLineChartStyles.styles.raw.js → useLineChartStyles.styles.raw.cjs} +1 -1
  475. package/lib-commonjs/components/LineChart/{useLineChartStyles.styles.raw.js.map → useLineChartStyles.styles.raw.cjs.map} +1 -1
  476. package/lib-commonjs/components/PolarChart/{PolarChart.js → PolarChart.cjs} +6 -6
  477. package/lib-commonjs/components/PolarChart/{PolarChart.js.map → PolarChart.cjs.map} +1 -1
  478. package/lib-commonjs/components/PolarChart/{PolarChart.utils.js → PolarChart.utils.cjs} +1 -1
  479. package/lib-commonjs/components/PolarChart/{PolarChart.utils.js.map → PolarChart.utils.cjs.map} +1 -1
  480. package/lib-commonjs/components/PolarChart/index.cjs +7 -0
  481. package/lib-commonjs/components/PolarChart/{index.js.map → index.cjs.map} +1 -1
  482. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.cjs.map +1 -0
  483. package/lib-commonjs/components/ResponsiveContainer/{ResponsiveContainer.js → ResponsiveContainer.cjs} +2 -2
  484. package/lib-commonjs/components/ResponsiveContainer/{ResponsiveContainer.js.map → ResponsiveContainer.cjs.map} +1 -1
  485. package/lib-commonjs/components/ResponsiveContainer/index.cjs +8 -0
  486. package/lib-commonjs/components/ResponsiveContainer/{index.js.map → index.cjs.map} +1 -1
  487. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.cjs.map +1 -0
  488. package/lib-commonjs/components/ResponsiveContainer/{withResponsiveContainer.js → withResponsiveContainer.cjs} +1 -1
  489. package/lib-commonjs/components/ResponsiveContainer/{withResponsiveContainer.js.map → withResponsiveContainer.cjs.map} +1 -1
  490. package/lib-commonjs/components/SankeyChart/{SankeyChart.js → SankeyChart.cjs} +18 -12
  491. package/lib-commonjs/components/SankeyChart/SankeyChart.cjs.map +1 -0
  492. package/lib-commonjs/components/SankeyChart/index.cjs +8 -0
  493. package/lib-commonjs/components/SankeyChart/{index.js.map → index.cjs.map} +1 -1
  494. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.cjs.map +1 -0
  495. package/lib-commonjs/components/SankeyChart/{useSankeyChartStyles.styles.raw.js → useSankeyChartStyles.styles.raw.cjs} +1 -1
  496. package/lib-commonjs/components/SankeyChart/{useSankeyChartStyles.styles.raw.js.map → useSankeyChartStyles.styles.raw.cjs.map} +1 -1
  497. package/lib-commonjs/components/ScatterChart/{ScatterChart.js → ScatterChart.cjs} +9 -9
  498. package/lib-commonjs/components/ScatterChart/ScatterChart.cjs.map +1 -0
  499. package/lib-commonjs/components/ScatterChart/index.cjs +8 -0
  500. package/lib-commonjs/components/ScatterChart/{index.js.map → index.cjs.map} +1 -1
  501. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.cjs.map +1 -0
  502. package/lib-commonjs/components/ScatterChart/{useScatterChartStyles.styles.raw.js → useScatterChartStyles.styles.raw.cjs} +1 -1
  503. package/lib-commonjs/components/ScatterChart/{useScatterChartStyles.styles.raw.js.map → useScatterChartStyles.styles.raw.cjs.map} +1 -1
  504. package/lib-commonjs/components/Sparkline/{Sparkline.js → Sparkline.cjs} +2 -2
  505. package/lib-commonjs/components/Sparkline/{Sparkline.js.map → Sparkline.cjs.map} +1 -1
  506. package/lib-commonjs/components/Sparkline/index.cjs +8 -0
  507. package/lib-commonjs/components/Sparkline/{index.js.map → index.cjs.map} +1 -1
  508. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.cjs.map +1 -0
  509. package/lib-commonjs/components/VegaDeclarativeChart/{VegaDeclarativeChart.js → VegaDeclarativeChart.cjs} +14 -14
  510. package/lib-commonjs/components/VegaDeclarativeChart/{VegaDeclarativeChart.js.map → VegaDeclarativeChart.cjs.map} +1 -1
  511. package/lib-commonjs/components/VegaDeclarativeChart/{VegaLiteColorAdapter.js → VegaLiteColorAdapter.cjs} +2 -2
  512. package/lib-commonjs/components/VegaDeclarativeChart/{VegaLiteColorAdapter.js.map → VegaLiteColorAdapter.cjs.map} +1 -1
  513. package/lib-commonjs/components/VegaDeclarativeChart/{VegaLiteSchemaAdapter.js → VegaLiteSchemaAdapter.cjs} +2 -2
  514. package/lib-commonjs/components/VegaDeclarativeChart/{VegaLiteSchemaAdapter.js.map → VegaLiteSchemaAdapter.cjs.map} +1 -1
  515. package/lib-commonjs/{Legends.js → components/VegaDeclarativeChart/index.cjs} +1 -1
  516. package/lib-commonjs/components/VegaDeclarativeChart/{index.js.map → index.cjs.map} +1 -1
  517. package/lib-commonjs/components/VerticalBarChart/{VerticalBarChart.js → VerticalBarChart.cjs} +10 -7
  518. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.cjs.map +1 -0
  519. package/lib-commonjs/components/VerticalBarChart/index.cjs +8 -0
  520. package/lib-commonjs/components/VerticalBarChart/{index.js.map → index.cjs.map} +1 -1
  521. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.cjs.map +1 -0
  522. package/lib-commonjs/components/VerticalBarChart/{useVerticalBarChartStyles.styles.raw.js → useVerticalBarChartStyles.styles.raw.cjs} +2 -2
  523. package/lib-commonjs/components/VerticalBarChart/{useVerticalBarChartStyles.styles.raw.js.map → useVerticalBarChartStyles.styles.raw.cjs.map} +1 -1
  524. package/lib-commonjs/components/VerticalStackedBarChart/{VerticalStackedBarChart.js → VerticalStackedBarChart.cjs} +4 -4
  525. package/lib-commonjs/components/VerticalStackedBarChart/{VerticalStackedBarChart.js.map → VerticalStackedBarChart.cjs.map} +1 -1
  526. package/lib-commonjs/components/VerticalStackedBarChart/index.cjs +8 -0
  527. package/lib-commonjs/components/VerticalStackedBarChart/{index.js.map → index.cjs.map} +1 -1
  528. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.cjs.map +1 -0
  529. package/lib-commonjs/components/VerticalStackedBarChart/{useVerticalStackedBarChartStyles.styles.raw.js → useVerticalStackedBarChartStyles.styles.raw.cjs} +1 -1
  530. package/lib-commonjs/components/VerticalStackedBarChart/{useVerticalStackedBarChartStyles.styles.raw.js.map → useVerticalStackedBarChartStyles.styles.raw.cjs.map} +1 -1
  531. package/lib-commonjs/index.cjs +31 -0
  532. package/lib-commonjs/{index.js.map → index.cjs.map} +1 -1
  533. package/lib-commonjs/types/index.cjs +8 -0
  534. package/lib-commonjs/types/{index.js.map → index.cjs.map} +1 -1
  535. package/lib-commonjs/utilities/{ChartTitle.js → ChartTitle.cjs} +3 -3
  536. package/lib-commonjs/utilities/{ChartTitle.js.map → ChartTitle.cjs.map} +1 -1
  537. package/lib-commonjs/utilities/{Common.styles.raw.js → Common.styles.cjs} +1 -1
  538. package/lib-commonjs/utilities/Common.styles.cjs.map +1 -0
  539. package/lib-commonjs/utilities/{Common.styles.js → Common.styles.raw.cjs} +1 -1
  540. package/lib-commonjs/utilities/{Common.styles.raw.js.map → Common.styles.raw.cjs.map} +1 -1
  541. package/lib-commonjs/utilities/{FocusableTooltipText.js → FocusableTooltipText.cjs} +3 -3
  542. package/lib-commonjs/utilities/{FocusableTooltipText.js.map → FocusableTooltipText.cjs.map} +1 -1
  543. package/lib-commonjs/utilities/{SVGTooltipText.js → SVGTooltipText.cjs} +2 -2
  544. package/lib-commonjs/utilities/{SVGTooltipText.js.map → SVGTooltipText.cjs.map} +1 -1
  545. package/lib-commonjs/utilities/{async-utils.js → async-utils.cjs} +1 -1
  546. package/lib-commonjs/utilities/{async-utils.js.map → async-utils.cjs.map} +1 -1
  547. package/lib-commonjs/utilities/{hooks.js → hooks.cjs} +2 -2
  548. package/lib-commonjs/utilities/{hooks.js.map → hooks.cjs.map} +1 -1
  549. package/lib-commonjs/utilities/{image-export-utils.js → image-export-utils.cjs} +2 -2
  550. package/lib-commonjs/utilities/{image-export-utils.js.map → image-export-utils.cjs.map} +1 -1
  551. package/lib-commonjs/utilities/index.cjs +10 -0
  552. package/lib-commonjs/utilities/{index.js.map → index.cjs.map} +1 -1
  553. package/lib-commonjs/utilities/{test-data.js → test-data.cjs} +1 -1
  554. package/lib-commonjs/utilities/{test-data.js.map → test-data.cjs.map} +1 -1
  555. package/lib-commonjs/utilities/{utilities.js → utilities.cjs} +2 -2
  556. package/lib-commonjs/utilities/utilities.cjs.map +1 -0
  557. package/package.json +21 -15
  558. package/lib-commonjs/GanttChart.js +0 -6
  559. package/lib-commonjs/GaugeChart.js +0 -6
  560. package/lib-commonjs/HorizontalBarChart.js +0 -6
  561. package/lib-commonjs/LineChart.js +0 -6
  562. package/lib-commonjs/PolarChart.js +0 -6
  563. package/lib-commonjs/Popover.js +0 -6
  564. package/lib-commonjs/ResponsiveContainer.js +0 -6
  565. package/lib-commonjs/ScatterChart.js +0 -6
  566. package/lib-commonjs/Sparkline.js +0 -6
  567. package/lib-commonjs/VerticalBarChart.js +0 -6
  568. package/lib-commonjs/components/AnnotationOnlyChart/index.js +0 -7
  569. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +0 -1
  570. package/lib-commonjs/components/AreaChart/index.js +0 -8
  571. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +0 -1
  572. package/lib-commonjs/components/ChartTable/index.js +0 -8
  573. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +0 -1
  574. package/lib-commonjs/components/CommonComponents/Annotations/index.js +0 -7
  575. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +0 -1
  576. package/lib-commonjs/components/CommonComponents/index.js +0 -11
  577. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +0 -1
  578. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +0 -1
  579. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +0 -1
  580. package/lib-commonjs/components/DonutChart/Arc/index.js +0 -7
  581. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +0 -1
  582. package/lib-commonjs/components/DonutChart/Pie/index.js +0 -7
  583. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +0 -1
  584. package/lib-commonjs/components/DonutChart/index.js +0 -8
  585. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +0 -1
  586. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +0 -1
  587. package/lib-commonjs/components/FunnelChart/index.js +0 -7
  588. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +0 -1
  589. package/lib-commonjs/components/GanttChart/GanttChart.js.map +0 -1
  590. package/lib-commonjs/components/GanttChart/index.js +0 -7
  591. package/lib-commonjs/components/GaugeChart/index.js +0 -8
  592. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +0 -1
  593. package/lib-commonjs/components/GroupedVerticalBarChart/index.js +0 -8
  594. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +0 -1
  595. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +0 -1
  596. package/lib-commonjs/components/HeatMapChart/index.js +0 -8
  597. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +0 -1
  598. package/lib-commonjs/components/HorizontalBarChart/index.js +0 -8
  599. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +0 -1
  600. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +0 -1
  601. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +0 -1
  602. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js +0 -8
  603. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +0 -1
  604. package/lib-commonjs/components/Legends/Legends.js.map +0 -1
  605. package/lib-commonjs/components/Legends/OverflowMenu.js +0 -44
  606. package/lib-commonjs/components/Legends/OverflowMenu.js.map +0 -1
  607. package/lib-commonjs/components/Legends/index.js +0 -8
  608. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +0 -1
  609. package/lib-commonjs/components/LineChart/index.js +0 -9
  610. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +0 -1
  611. package/lib-commonjs/components/PolarChart/index.js +0 -7
  612. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.js.map +0 -1
  613. package/lib-commonjs/components/ResponsiveContainer/index.js +0 -8
  614. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +0 -1
  615. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +0 -1
  616. package/lib-commonjs/components/SankeyChart/index.js +0 -8
  617. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +0 -1
  618. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +0 -1
  619. package/lib-commonjs/components/ScatterChart/index.js +0 -8
  620. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +0 -1
  621. package/lib-commonjs/components/Sparkline/index.js +0 -8
  622. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +0 -1
  623. package/lib-commonjs/components/VegaDeclarativeChart/index.js +0 -6
  624. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +0 -1
  625. package/lib-commonjs/components/VerticalBarChart/index.js +0 -8
  626. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +0 -1
  627. package/lib-commonjs/components/VerticalStackedBarChart/index.js +0 -8
  628. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +0 -1
  629. package/lib-commonjs/index.js +0 -31
  630. package/lib-commonjs/types/index.js +0 -8
  631. package/lib-commonjs/utilities/Common.styles.js.map +0 -1
  632. package/lib-commonjs/utilities/index.js +0 -10
  633. package/lib-commonjs/utilities/utilities.js.map +0 -1
  634. /package/lib-commonjs/components/AnnotationOnlyChart/{AnnotationOnlyChart.types.js → AnnotationOnlyChart.types.cjs} +0 -0
  635. /package/lib-commonjs/components/AnnotationOnlyChart/{AnnotationOnlyChart.types.js.map → AnnotationOnlyChart.types.cjs.map} +0 -0
  636. /package/lib-commonjs/components/AnnotationOnlyChart/{useAnnotationOnlyChartStyles.styles.js → useAnnotationOnlyChartStyles.styles.cjs} +0 -0
  637. /package/lib-commonjs/components/AnnotationOnlyChart/{useAnnotationOnlyChartStyles.styles.raw.js → useAnnotationOnlyChartStyles.styles.raw.cjs} +0 -0
  638. /package/lib-commonjs/components/AnnotationOnlyChart/{useAnnotationOnlyChartStyles.styles.raw.js.map → useAnnotationOnlyChartStyles.styles.raw.cjs.map} +0 -0
  639. /package/lib-commonjs/components/AreaChart/{AreaChart.types.js → AreaChart.types.cjs} +0 -0
  640. /package/lib-commonjs/components/AreaChart/{AreaChart.types.js.map → AreaChart.types.cjs.map} +0 -0
  641. /package/lib-commonjs/components/AreaChart/{useAreaChartStyles.styles.js → useAreaChartStyles.styles.cjs} +0 -0
  642. /package/lib-commonjs/components/ChartTable/{ChartTable.types.js → ChartTable.types.cjs} +0 -0
  643. /package/lib-commonjs/components/ChartTable/{ChartTable.types.js.map → ChartTable.types.cjs.map} +0 -0
  644. /package/lib-commonjs/components/ChartTable/{useChartTableStyles.styles.js → useChartTableStyles.styles.cjs} +0 -0
  645. /package/lib-commonjs/components/CommonComponents/Annotations/{ChartAnnotationLayer.types.js → ChartAnnotationLayer.types.cjs} +0 -0
  646. /package/lib-commonjs/components/CommonComponents/Annotations/{ChartAnnotationLayer.types.js.map → ChartAnnotationLayer.types.cjs.map} +0 -0
  647. /package/lib-commonjs/components/CommonComponents/Annotations/{useChartAnnotationLayer.styles.js → useChartAnnotationLayer.styles.cjs} +0 -0
  648. /package/lib-commonjs/components/CommonComponents/Annotations/{useChartAnnotationLayer.styles.raw.js → useChartAnnotationLayer.styles.raw.cjs} +0 -0
  649. /package/lib-commonjs/components/CommonComponents/Annotations/{useChartAnnotationLayer.styles.raw.js.map → useChartAnnotationLayer.styles.raw.cjs.map} +0 -0
  650. /package/lib-commonjs/components/CommonComponents/{CartesianChart.types.js → CartesianChart.types.cjs} +0 -0
  651. /package/lib-commonjs/components/CommonComponents/{CartesianChart.types.js.map → CartesianChart.types.cjs.map} +0 -0
  652. /package/lib-commonjs/components/CommonComponents/{ChartPopover.types.js → ChartPopover.types.cjs} +0 -0
  653. /package/lib-commonjs/components/CommonComponents/{ChartPopover.types.js.map → ChartPopover.types.cjs.map} +0 -0
  654. /package/lib-commonjs/components/CommonComponents/{useChartPopoverStyles.styles.js → useChartPopoverStyles.styles.cjs} +0 -0
  655. /package/lib-commonjs/components/CommonComponents/{useChartPopoverStyles.styles.raw.js → useChartPopoverStyles.styles.raw.cjs} +0 -0
  656. /package/lib-commonjs/components/CommonComponents/{useChartPopoverStyles.styles.raw.js.map → useChartPopoverStyles.styles.raw.cjs.map} +0 -0
  657. /package/lib-commonjs/components/DonutChart/Arc/{Arc.types.js → Arc.types.cjs} +0 -0
  658. /package/lib-commonjs/components/DonutChart/Arc/{Arc.types.js.map → Arc.types.cjs.map} +0 -0
  659. /package/lib-commonjs/components/DonutChart/Arc/{useArcStyles.styles.js → useArcStyles.styles.cjs} +0 -0
  660. /package/lib-commonjs/components/DonutChart/{DonutChart.types.js → DonutChart.types.cjs} +0 -0
  661. /package/lib-commonjs/components/DonutChart/{DonutChart.types.js.map → DonutChart.types.cjs.map} +0 -0
  662. /package/lib-commonjs/components/DonutChart/Pie/{Pie.types.js → Pie.types.cjs} +0 -0
  663. /package/lib-commonjs/components/DonutChart/Pie/{Pie.types.js.map → Pie.types.cjs.map} +0 -0
  664. /package/lib-commonjs/components/DonutChart/Pie/{usePieStyles.styles.js → usePieStyles.styles.cjs} +0 -0
  665. /package/lib-commonjs/components/DonutChart/Pie/{usePieStyles.styles.raw.js → usePieStyles.styles.raw.cjs} +0 -0
  666. /package/lib-commonjs/components/DonutChart/Pie/{usePieStyles.styles.raw.js.map → usePieStyles.styles.raw.cjs.map} +0 -0
  667. /package/lib-commonjs/components/DonutChart/{useDonutChartStyles.styles.js → useDonutChartStyles.styles.cjs} +0 -0
  668. /package/lib-commonjs/components/FunnelChart/{FunnelChart.types.js → FunnelChart.types.cjs} +0 -0
  669. /package/lib-commonjs/components/FunnelChart/{FunnelChart.types.js.map → FunnelChart.types.cjs.map} +0 -0
  670. /package/lib-commonjs/components/FunnelChart/{funnelGeometry.js → funnelGeometry.cjs} +0 -0
  671. /package/lib-commonjs/components/FunnelChart/{funnelGeometry.js.map → funnelGeometry.cjs.map} +0 -0
  672. /package/lib-commonjs/components/FunnelChart/{useFunnelChartStyles.styles.js → useFunnelChartStyles.styles.cjs} +0 -0
  673. /package/lib-commonjs/components/GanttChart/{GanttChart.types.js → GanttChart.types.cjs} +0 -0
  674. /package/lib-commonjs/components/GanttChart/{GanttChart.types.js.map → GanttChart.types.cjs.map} +0 -0
  675. /package/lib-commonjs/components/GanttChart/{useGanttChartStyles.styles.js → useGanttChartStyles.styles.cjs} +0 -0
  676. /package/lib-commonjs/components/GanttChart/{useGanttChartStyles.styles.js.map → useGanttChartStyles.styles.cjs.map} +0 -0
  677. /package/lib-commonjs/components/GanttChart/{useGanttChartStyles.styles.raw.js → useGanttChartStyles.styles.raw.cjs} +0 -0
  678. /package/lib-commonjs/components/GanttChart/{useGanttChartStyles.styles.raw.js.map → useGanttChartStyles.styles.raw.cjs.map} +0 -0
  679. /package/lib-commonjs/components/GaugeChart/{GaugeChart.types.js → GaugeChart.types.cjs} +0 -0
  680. /package/lib-commonjs/components/GaugeChart/{GaugeChart.types.js.map → GaugeChart.types.cjs.map} +0 -0
  681. /package/lib-commonjs/components/GaugeChart/{useGaugeChartStyles.styles.js → useGaugeChartStyles.styles.cjs} +0 -0
  682. /package/lib-commonjs/components/GroupedVerticalBarChart/{GroupedVerticalBarChart.types.js → GroupedVerticalBarChart.types.cjs} +0 -0
  683. /package/lib-commonjs/components/GroupedVerticalBarChart/{GroupedVerticalBarChart.types.js.map → GroupedVerticalBarChart.types.cjs.map} +0 -0
  684. /package/lib-commonjs/components/GroupedVerticalBarChart/{useGroupedVerticalBarChartStyles.styles.js → useGroupedVerticalBarChartStyles.styles.cjs} +0 -0
  685. /package/lib-commonjs/components/HeatMapChart/{HeatMapChart.types.js → HeatMapChart.types.cjs} +0 -0
  686. /package/lib-commonjs/components/HeatMapChart/{HeatMapChart.types.js.map → HeatMapChart.types.cjs.map} +0 -0
  687. /package/lib-commonjs/components/HeatMapChart/{useHeatMapChartStyles.styles.js → useHeatMapChartStyles.styles.cjs} +0 -0
  688. /package/lib-commonjs/components/HeatMapChart/{useHeatMapChartStyles.styles.raw.js → useHeatMapChartStyles.styles.raw.cjs} +0 -0
  689. /package/lib-commonjs/components/HeatMapChart/{useHeatMapChartStyles.styles.raw.js.map → useHeatMapChartStyles.styles.raw.cjs.map} +0 -0
  690. /package/lib-commonjs/components/HorizontalBarChart/{HorizontalBarChart.types.js → HorizontalBarChart.types.cjs} +0 -0
  691. /package/lib-commonjs/components/HorizontalBarChart/{HorizontalBarChart.types.js.map → HorizontalBarChart.types.cjs.map} +0 -0
  692. /package/lib-commonjs/components/HorizontalBarChartWithAxis/{HorizontalBarChartWithAxis.types.js → HorizontalBarChartWithAxis.types.cjs} +0 -0
  693. /package/lib-commonjs/components/HorizontalBarChartWithAxis/{HorizontalBarChartWithAxis.types.js.map → HorizontalBarChartWithAxis.types.cjs.map} +0 -0
  694. /package/lib-commonjs/components/HorizontalBarChartWithAxis/{useHorizontalBarChartWithAxisStyles.styles.js → useHorizontalBarChartWithAxisStyles.styles.cjs} +0 -0
  695. /package/lib-commonjs/components/Legends/{Legends.types.js → Legends.types.cjs} +0 -0
  696. /package/lib-commonjs/components/Legends/{Legends.types.js.map → Legends.types.cjs.map} +0 -0
  697. /package/lib-commonjs/components/Legends/{useLegendsStyles.styles.js → useLegendsStyles.styles.cjs} +0 -0
  698. /package/lib-commonjs/components/LineChart/{LineChart.types.js → LineChart.types.cjs} +0 -0
  699. /package/lib-commonjs/components/LineChart/{LineChart.types.js.map → LineChart.types.cjs.map} +0 -0
  700. /package/lib-commonjs/components/LineChart/{useLineChartStyles.styles.js → useLineChartStyles.styles.cjs} +0 -0
  701. /package/lib-commonjs/components/PolarChart/{PolarChart.types.js → PolarChart.types.cjs} +0 -0
  702. /package/lib-commonjs/components/PolarChart/{PolarChart.types.js.map → PolarChart.types.cjs.map} +0 -0
  703. /package/lib-commonjs/components/PolarChart/{usePolarChartStyles.styles.js → usePolarChartStyles.styles.cjs} +0 -0
  704. /package/lib-commonjs/components/PolarChart/{usePolarChartStyles.styles.raw.js → usePolarChartStyles.styles.raw.cjs} +0 -0
  705. /package/lib-commonjs/components/PolarChart/{usePolarChartStyles.styles.raw.js.map → usePolarChartStyles.styles.raw.cjs.map} +0 -0
  706. /package/lib-commonjs/components/ResponsiveContainer/{ResponsiveContainer.types.js → ResponsiveContainer.types.cjs} +0 -0
  707. /package/lib-commonjs/components/ResponsiveContainer/{ResponsiveContainer.types.js.map → ResponsiveContainer.types.cjs.map} +0 -0
  708. /package/lib-commonjs/components/ResponsiveContainer/{useResponsiveChildStyles.styles.js → useResponsiveChildStyles.styles.cjs} +0 -0
  709. /package/lib-commonjs/components/ResponsiveContainer/{useResponsiveChildStyles.styles.raw.js → useResponsiveChildStyles.styles.raw.cjs} +0 -0
  710. /package/lib-commonjs/components/ResponsiveContainer/{useResponsiveChildStyles.styles.raw.js.map → useResponsiveChildStyles.styles.raw.cjs.map} +0 -0
  711. /package/lib-commonjs/components/SankeyChart/{SankeyChart.types.js → SankeyChart.types.cjs} +0 -0
  712. /package/lib-commonjs/components/SankeyChart/{SankeyChart.types.js.map → SankeyChart.types.cjs.map} +0 -0
  713. /package/lib-commonjs/components/SankeyChart/{useSankeyChartStyles.styles.js → useSankeyChartStyles.styles.cjs} +0 -0
  714. /package/lib-commonjs/components/ScatterChart/{ScatterChart.types.js → ScatterChart.types.cjs} +0 -0
  715. /package/lib-commonjs/components/ScatterChart/{ScatterChart.types.js.map → ScatterChart.types.cjs.map} +0 -0
  716. /package/lib-commonjs/components/ScatterChart/{useScatterChartStyles.styles.js → useScatterChartStyles.styles.cjs} +0 -0
  717. /package/lib-commonjs/components/Sparkline/{Sparkline.types.js → Sparkline.types.cjs} +0 -0
  718. /package/lib-commonjs/components/Sparkline/{Sparkline.types.js.map → Sparkline.types.cjs.map} +0 -0
  719. /package/lib-commonjs/components/Sparkline/{useSparklineStyles.styles.js → useSparklineStyles.styles.cjs} +0 -0
  720. /package/lib-commonjs/components/Sparkline/{useSparklineStyles.styles.raw.js → useSparklineStyles.styles.raw.cjs} +0 -0
  721. /package/lib-commonjs/components/Sparkline/{useSparklineStyles.styles.raw.js.map → useSparklineStyles.styles.raw.cjs.map} +0 -0
  722. /package/lib-commonjs/components/VegaDeclarativeChart/{VegaDeclarativeChartHooks.js → VegaDeclarativeChartHooks.cjs} +0 -0
  723. /package/lib-commonjs/components/VegaDeclarativeChart/{VegaDeclarativeChartHooks.js.map → VegaDeclarativeChartHooks.cjs.map} +0 -0
  724. /package/lib-commonjs/components/VegaDeclarativeChart/{VegaLiteExpressionEvaluator.js → VegaLiteExpressionEvaluator.cjs} +0 -0
  725. /package/lib-commonjs/components/VegaDeclarativeChart/{VegaLiteExpressionEvaluator.js.map → VegaLiteExpressionEvaluator.cjs.map} +0 -0
  726. /package/lib-commonjs/components/VegaDeclarativeChart/{VegaLiteTypes.js → VegaLiteTypes.cjs} +0 -0
  727. /package/lib-commonjs/components/VegaDeclarativeChart/{VegaLiteTypes.js.map → VegaLiteTypes.cjs.map} +0 -0
  728. /package/lib-commonjs/components/VerticalBarChart/{VerticalBarChart.types.js → VerticalBarChart.types.cjs} +0 -0
  729. /package/lib-commonjs/components/VerticalBarChart/{VerticalBarChart.types.js.map → VerticalBarChart.types.cjs.map} +0 -0
  730. /package/lib-commonjs/components/VerticalBarChart/{useVerticalBarChartStyles.styles.js → useVerticalBarChartStyles.styles.cjs} +0 -0
  731. /package/lib-commonjs/components/VerticalStackedBarChart/{VerticalStackedBarChart.types.js → VerticalStackedBarChart.types.cjs} +0 -0
  732. /package/lib-commonjs/components/VerticalStackedBarChart/{VerticalStackedBarChart.types.js.map → VerticalStackedBarChart.types.cjs.map} +0 -0
  733. /package/lib-commonjs/components/VerticalStackedBarChart/{useVerticalStackedBarChartStyles.styles.js → useVerticalStackedBarChartStyles.styles.cjs} +0 -0
  734. /package/lib-commonjs/types/{ChartAnnotation.js → ChartAnnotation.cjs} +0 -0
  735. /package/lib-commonjs/types/{ChartAnnotation.js.map → ChartAnnotation.cjs.map} +0 -0
  736. /package/lib-commonjs/types/{DataPoint.js → DataPoint.cjs} +0 -0
  737. /package/lib-commonjs/types/{DataPoint.js.map → DataPoint.cjs.map} +0 -0
  738. /package/lib-commonjs/types/{EventAnnotation.js → EventAnnotation.cjs} +0 -0
  739. /package/lib-commonjs/types/{EventAnnotation.js.map → EventAnnotation.cjs.map} +0 -0
  740. /package/lib-commonjs/types/{LegendDataItem.js → LegendDataItem.cjs} +0 -0
  741. /package/lib-commonjs/types/{LegendDataItem.js.map → LegendDataItem.cjs.map} +0 -0
  742. /package/lib-commonjs/utilities/{KeyCodes.js → KeyCodes.cjs} +0 -0
  743. /package/lib-commonjs/utilities/{KeyCodes.js.map → KeyCodes.cjs.map} +0 -0
  744. /package/lib-commonjs/utilities/{colors.js → colors.cjs} +0 -0
  745. /package/lib-commonjs/utilities/{colors.js.map → colors.cjs.map} +0 -0
  746. /package/lib-commonjs/utilities/{getWindow.js → getWindow.cjs} +0 -0
  747. /package/lib-commonjs/utilities/{getWindow.js.map → getWindow.cjs.map} +0 -0
  748. /package/lib-commonjs/utilities/{overflow-utils.js → overflow-utils.cjs} +0 -0
  749. /package/lib-commonjs/utilities/{overflow-utils.js.map → overflow-utils.cjs.map} +0 -0
  750. /package/lib-commonjs/utilities/{scatterpolar-utils.js → scatterpolar-utils.cjs} +0 -0
  751. /package/lib-commonjs/utilities/{scatterpolar-utils.js.map → scatterpolar-utils.cjs.map} +0 -0
  752. /package/lib-commonjs/utilities/{string.js → string.cjs} +0 -0
  753. /package/lib-commonjs/utilities/{string.js.map → string.cjs.map} +0 -0
  754. /package/lib-commonjs/utilities/{vbc-utils.js → vbc-utils.cjs} +0 -0
  755. /package/lib-commonjs/utilities/{vbc-utils.js.map → vbc-utils.cjs.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ScatterChart/ScatterChart.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ScatterChartProps } from './ScatterChart.types';\nimport { useScatterChartStyles } from './useScatterChartStyles.styles';\nimport type { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select } from 'd3-selection';\nimport type { Legend } from '../Legends/index';\nimport { Legends } from '../Legends/index';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { useId } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { IDomainNRange } from '../../utilities/index';\nimport {\n areArraysEqual,\n createNumericYAxis,\n createStringYAxis,\n getDomainPaddingForMarkers,\n domainRangeOfXStringAxis,\n findNumericMinMaxOfY,\n YAxisType,\n isTextMode,\n isScatterPolarSeries,\n isPlottable,\n getRangeForScatterMarkerSize,\n calculateMarkerRadius,\n domainRangeOfDateForAreaLineScatterVerticalBarCharts,\n domainRangeOfNumericForAreaLineScatterCharts,\n sortAxisCategories,\n findCalloutPoints,\n} from '../../utilities/index';\nimport type {\n AccessibilityProps,\n ChildProps,\n CustomizedCalloutData,\n Margins,\n RefArrayData,\n ScatterChartDataPoint,\n ScatterChartPoints,\n YValueHover,\n} from '../../index';\nimport { CartesianChart } from '../../index';\nimport { tokens } from '@fluentui/react-theme';\nimport {\n calloutData,\n ChartTypes,\n XAxisTypes,\n getTypeOfAxis,\n getNextColor,\n getColorFromToken,\n} from '../../utilities/index';\nimport type { LineChartPoints } from '../../types/DataPoint';\nimport { renderScatterPolarCategoryLabels } from '../../utilities/scatterpolar-utils';\nimport { formatDateToLocaleString } from '@fluentui/chart-utilities';\nimport { useImageExport } from '../../utilities/hooks';\n\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\n\ntype ScatterChartDataWithIndex = ScatterChartPoints & { index: number };\n\n// Create a ScatterChart variant which uses these default styles and this styled subcomponent.\n/**\n * ScatterChart component\n * {@docCategory ScatterChart}\n */\nexport const ScatterChart: React.FunctionComponent<ScatterChartProps> = React.forwardRef<\n HTMLDivElement,\n ScatterChartProps\n>((props, forwardedRef) => {\n const _circleId: string = useId('circle');\n const _seriesId: string = useId('seriesID');\n const _verticalLine: string = useId('verticalLine');\n const _firstRenderOptimization = true;\n const _emptyChartId: string = useId('_ScatterChart_empty');\n let _points: ScatterChartDataWithIndex[] = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _xAxisScale: any = '';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _yAxisScale: any = '';\n let _uniqueCallOutID: string | null = '';\n const _refArray: RefArrayData[] = [];\n let margins: Margins;\n let renderSeries: JSXElement[];\n let _xAxisLabels: string[] = [];\n const xAxisCalloutAccessibilityData: AccessibilityProps = {};\n let _xBandwidth = 0;\n const { cartesianChartRef, legendsRef: _legendsRef } = useImageExport(props.componentRef, props.hideLegend);\n const classes = useScatterChartStyles(props);\n\n const [hoverXValue, setHoverXValue] = React.useState<string | number>('');\n const [activeLegend, setActiveLegend] = React.useState<string>('');\n const [yValueHover, setYValueHover] = React.useState<YValueHover[]>([]);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const [selectedLegendPoints, setSelectedLegendPoints] = React.useState<any[]>([]);\n const [isSelectedLegend, setIsSelectedLegend] = React.useState<boolean>(false);\n const [activePoint, setActivePoint] = React.useState<string>('');\n const [stackCalloutProps, setStackCalloutProps] = React.useState<CustomizedCalloutData>();\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<CustomizedCalloutData>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const prevSelectedLegendsRef = React.useRef<string[] | undefined>(undefined);\n const _isTextMode = React.useRef(false);\n const _isScatterPolarRef = React.useRef(false);\n\n React.useEffect(() => {\n if (\n prevSelectedLegendsRef.current &&\n !areArraysEqual(prevSelectedLegendsRef.current, props.legendProps?.selectedLegends)\n ) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n prevSelectedLegendsRef.current = props.legendProps?.selectedLegends;\n }, [props.legendProps?.selectedLegends]);\n\n const _xAxisType: XAxisTypes =\n props.data.scatterChartData! &&\n props.data.scatterChartData!.length > 0 &&\n props.data.scatterChartData![0].data &&\n props.data.scatterChartData![0].data.length > 0\n ? (getTypeOfAxis(props.data.scatterChartData![0].data[0].x, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\n\n // Detect y axis type (numeric or string)\n const _yAxisType: YAxisType =\n props.data.scatterChartData &&\n props.data.scatterChartData.length > 0 &&\n props.data.scatterChartData[0].data &&\n props.data.scatterChartData[0].data.length > 0\n ? typeof props.data.scatterChartData[0].data[0].y === 'string'\n ? YAxisType.StringAxis\n : YAxisType.NumericAxis\n : YAxisType.NumericAxis;\n\n const pointsRef = React.useRef<ScatterChartDataWithIndex[] | []>([]);\n const calloutPointsRef = React.useRef<Record<string, YValueHover[]>>({});\n React.useEffect(() => {\n /** note that height and width are not used to resize or set as dimesions of the chart,\n * fitParentContainer is responisble for setting the height and width or resizing of the svg/chart\n */\n\n if (_points !== _injectIndexPropertyInScatterChartData(props.data.scatterChartData) || props.data !== _points) {\n pointsRef.current = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);\n calloutPointsRef.current = calloutData(pointsRef.current);\n }\n }, [props.height, props.width, props.data, _points]);\n\n function _injectIndexPropertyInScatterChartData(\n scatterChartData?: ScatterChartPoints[],\n ): ScatterChartDataWithIndex[] | [] {\n return scatterChartData\n ? scatterChartData.map((item: ScatterChartPoints, index: number) => {\n let color: string;\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0);\n } else {\n color = getColorFromToken(item.color);\n }\n return {\n ...item,\n index: -1,\n color,\n };\n })\n : [];\n }\n\n function updatePosition(newX: number, newY: number) {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n function _getNumericMinMaxOfY(\n points: ScatterChartPoints[],\n yAxisType?: YAxisType,\n ): { startValue: number; endValue: number } {\n const { startValue, endValue } = findNumericMinMaxOfY(points, yAxisType);\n const yPadding = getDomainPaddingForMarkers(startValue, endValue, props.yScaleType);\n\n return {\n startValue: startValue - yPadding.start,\n endValue: endValue + yPadding.end,\n };\n }\n\n function _getDomainNRangeValues(\n points: any,\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfNumericForAreaLineScatterCharts(\n points,\n margins,\n width,\n isRTL,\n props.xScaleType,\n true,\n props.xMinValue,\n props.xMaxValue,\n );\n } else if (xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = domainRangeOfDateForAreaLineScatterVerticalBarCharts(\n points,\n margins,\n width,\n isRTL,\n tickValues! as Date[],\n chartType,\n );\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\n }\n\n function _getMargins(_margins: Margins) {\n margins = _margins;\n }\n\n function _initializeScatterChartData(\n xScale: NumericAxis,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) {\n _xAxisScale = xScale;\n _yAxisScale = yScale;\n _isTextMode.current = isTextMode(_points);\n _isScatterPolarRef.current = isScatterPolarSeries(_points);\n renderSeries = _createPlot(xElement!, containerHeight!);\n }\n\n function _onHoverCardHide() {\n setSelectedLegendPoints([]);\n setIsSelectedLegend(false);\n }\n\n function _createLegends(data: ScatterChartDataWithIndex[]): JSXElement {\n const { legendProps } = props;\n const isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);\n const mapLegendToPoints: Record<string, ScatterChartDataWithIndex[]> = {};\n data.forEach((point: ScatterChartDataWithIndex) => {\n if (point.legend) {\n if (!mapLegendToPoints[point.legend]) {\n mapLegendToPoints[point.legend] = [];\n }\n mapLegendToPoints[point.legend].push(point);\n }\n });\n const legendDataItems: Legend[] = Object.entries(mapLegendToPoints).map(([legendTitle, points]) => {\n const representativePoint = points[0];\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: legendTitle,\n color: representativePoint.color!,\n onMouseOutAction: () => {\n setActiveLegend('');\n },\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(legendTitle);\n },\n ...(representativePoint.legendShape && {\n shape: representativePoint.legendShape,\n }),\n };\n return legend;\n });\n\n return (\n <Legends\n legends={[...legendDataItems]}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...(isLegendMultiSelectEnabled && { onLegendHoverCardLeave: _onHoverCardHide })}\n {...props.legendProps}\n selectedLegends={selectedLegends}\n onChange={_onLegendSelectionChange}\n legendRef={_legendsRef}\n />\n );\n }\n\n function _getOrderedYAxisLabels() {\n const shouldOrderYAxisLabelsByCategoryOrder =\n _yAxisType === YAxisType.StringAxis && props.yAxisCategoryOrder !== 'default';\n if (!shouldOrderYAxisLabelsByCategoryOrder) {\n // Collect all unique string y values from all data points in all series, in reverse order\n const yLabelsSet = new Set<string>();\n for (let i = _points.length - 1; i >= 0; i--) {\n const point = _points[i];\n if (point.data && Array.isArray(point.data)) {\n for (const d of point.data) {\n if (typeof d.y === 'string') {\n yLabelsSet.add(d.y);\n }\n }\n }\n }\n return Array.from(yLabelsSet);\n }\n\n return sortAxisCategories(_mapCategoryToValues(), props.yAxisCategoryOrder);\n }\n\n function _mapCategoryToValues() {\n const categoryToValues: Record<string, number[]> = {};\n _points.forEach(point => {\n if (point.data && Array.isArray(point.data)) {\n point.data.forEach(d => {\n if (typeof d.y === 'string') {\n if (!categoryToValues[d.y]) {\n categoryToValues[d.y] = [];\n }\n if (typeof d.x === 'number') {\n categoryToValues[d.y].push(d.x);\n }\n }\n });\n }\n });\n return categoryToValues;\n }\n\n function _onLegendSelectionChange(\n legendsSelected: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(legendsSelected);\n } else {\n setSelectedLegends(legendsSelected.slice(-1));\n }\n\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(legendsSelected, event, currentLegend);\n }\n }\n\n function _getPointFill(seriesColor: string, pointId: string, pointIndex: number, isLastPoint: boolean) {\n if (activePoint === pointId) {\n return tokens.colorNeutralBackground1;\n } else {\n return seriesColor;\n }\n }\n\n function _createPlot(xElement: SVGElement, containerHeight: number): JSXElement[] {\n const series: JSXElement[] = [];\n if (isSelectedLegend) {\n _points = selectedLegendPoints;\n } else {\n _points = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);\n }\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n _xBandwidth = _xAxisScale.bandwidth() / 2;\n }\n\n const minMarkerSize =\n d3Min(_points, (point: ScatterChartPoints) => {\n return d3Min(point.data as ScatterChartDataPoint[], (item: ScatterChartDataPoint) => {\n return item.markerSize as number;\n });\n }) ?? 0;\n const maxMarkerSize =\n d3Max(_points, (point: ScatterChartPoints) => {\n return d3Max(point.data as ScatterChartDataPoint[], (item: ScatterChartDataPoint) => {\n return item.markerSize as number;\n });\n }) ?? 0;\n const isContinuousXY = _xAxisType !== XAxisTypes.StringAxis && _yAxisType !== YAxisType.StringAxis;\n const extraMaxPixels = isContinuousXY\n ? getRangeForScatterMarkerSize({\n data: _points,\n xScale: _xAxisScale,\n yScalePrimary: _yAxisScale,\n xScaleType: props.xScaleType,\n yScaleType: props.yScaleType,\n })\n : 0;\n\n for (let i = _points.length - 1; i >= 0; i--) {\n const pointsForSeries: JSXElement[] = [];\n\n const legendVal: string = _points[i].legend;\n const seriesColor: string = _points[i].color!;\n const verticaLineHeight = containerHeight - margins.bottom! + 6;\n\n for (let j = 0; j < _points[i].data.length; j++) {\n const { x, y, xAxisCalloutData, xAxisCalloutAccessibilityData } = _points?.[i]?.data[j];\n const xPoint = _xAxisScale?.(x);\n // Use string y axis scale if needed\n const yPoint =\n _yAxisType === YAxisType.StringAxis\n ? _yAxisScale?.(y) + (_yAxisScale?.bandwidth ? _yAxisScale.bandwidth() / 2 : 0)\n : _yAxisScale?.(y);\n if (!isPlottable(xPoint, yPoint)) {\n continue;\n }\n const seriesId = `${_seriesId}_${i}_${j}`;\n const circleId = `${_circleId}_${i}_${j}`;\n const pointMarkerSize = (_points[i].data[j] as ScatterChartDataPoint).markerSize;\n const circleRadius = calculateMarkerRadius({\n pointMarkerSize,\n minMarkerSize,\n maxMarkerSize,\n extraMaxPixels,\n isContinuousXY,\n isActive: activePoint === circleId,\n defaultRadius: 4,\n activeRadius: 6,\n });\n\n const isLegendSelected: boolean = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n\n const currentPointHidden = _points[i].hideNonActiveDots && activePoint !== circleId;\n const text = _points?.[i].data[j]?.text;\n if (!_isTextMode.current) {\n pointsForSeries.push(\n <>\n <circle\n id={circleId}\n key={circleId}\n r={circleRadius}\n cx={xPoint + _xBandwidth}\n cy={yPoint}\n data-is-focusable={isLegendSelected}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x,\n y,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x,\n y,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={event =>\n _handleFocus(event, seriesId, x, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)\n }\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[j].onDataPointClick)}\n opacity={isLegendSelected && !currentPointHidden ? 1 : 0.1}\n fill={_getPointFill(seriesColor, circleId, j, false)}\n stroke={seriesColor}\n role=\"option\"\n aria-label={_getAriaLabel(i, j)}\n tabIndex={isLegendSelected ? 0 : undefined}\n />\n {text && (\n <text\n key={`${circleId}-label`}\n x={xPoint + _xBandwidth}\n y={yPoint + Math.max(circleRadius + 12, 16)}\n className={classes.markerLabel}\n >\n {text}\n </text>\n )}\n </>,\n );\n }\n }\n\n if (_isScatterPolarRef.current) {\n pointsForSeries.push(\n ...renderScatterPolarCategoryLabels({\n xAxisScale: _xAxisScale,\n yAxisScale: _yAxisScale,\n className: classes.markerLabel || '',\n lineOptions: (_points?.[i] as Partial<LineChartPoints>)?.lineOptions,\n }),\n );\n }\n\n series.push(\n <g\n key={`series_${i}`}\n role=\"listbox\"\n aria-label={`${legendVal}, series ${i + 1} of ${_points.length} with ${_points[i].data.length} data points.`}\n >\n {pointsForSeries}\n </g>,\n );\n }\n return series;\n }\n\n function _handleFocus(\n event: React.FocusEvent<SVGCircleElement, Element>,\n seriesId: string,\n x: number | Date | string,\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData?: AccessibilityProps,\n ) {\n let cx = 0;\n let cy = 0;\n\n const targetRect = (event.target as SVGCircleElement).getBoundingClientRect();\n cx = targetRect.left + targetRect.width / 2;\n cy = targetRect.top + targetRect.height / 2;\n updatePosition(cx, cy);\n _uniqueCallOutID = circleId;\n const formattedData = x instanceof Date ? formatDateToLocaleString(x, props.culture, props.useUTC as boolean) : x;\n const found = findCalloutPoints(calloutPointsRef.current, x) as CustomizedCalloutData | undefined;\n // if no points need to be called out then don't show vertical line and callout card\n\n if (found) {\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(x) + _xBandwidth}, 0)`)\n .attr('visibility', 'visibility');\n _refArray.forEach((obj: RefArrayData) => {\n if (obj.index === seriesId) {\n setPopoverOpen(true);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);\n setYValueHover(found.values);\n setStackCalloutProps(found!);\n setDataPointCalloutProps(found!);\n setActivePoint(circleId);\n }\n });\n } else {\n setActivePoint(circleId);\n }\n }\n\n function _handleHover(\n x: number | Date | string,\n y: number,\n lineHeight: number,\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData: AccessibilityProps | undefined,\n mouseEvent: React.MouseEvent<SVGElement>,\n ) {\n mouseEvent?.persist();\n const formattedData = x instanceof Date ? formatDateToLocaleString(x, props.culture, props.useUTC as boolean) : x;\n const found = findCalloutPoints(calloutPointsRef.current, x) as CustomizedCalloutData | undefined;\n // if no points need to be called out then don't show vertical line and callout card\n\n if (found) {\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(x) + _xBandwidth}, ${_yAxisScale(y)})`)\n .attr('visibility', 'visibility')\n .attr('y2', `${lineHeight - _yAxisScale(y)}`);\n\n if (_uniqueCallOutID !== circleId) {\n _uniqueCallOutID = circleId;\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);\n setYValueHover(found.values);\n setStackCalloutProps(found!);\n setDataPointCalloutProps(found!);\n setActivePoint(circleId);\n }\n } else {\n setActivePoint(circleId);\n }\n }\n\n /**\n * Screen readers announce an element as clickable if the onClick attribute is set.\n * This function sets the attribute only when a click event handler is provided.*/\n\n function _getClickHandler(func?: () => void): { onClick?: () => void } {\n if (func) {\n return {\n onClick: func,\n };\n }\n\n return {};\n }\n\n function _handleMouseOut() {\n d3Select(`#${_verticalLine}`).attr('visibility', 'hidden');\n }\n\n function _handleChartMouseLeave() {\n _uniqueCallOutID = null;\n setActivePoint('');\n if (isPopoverOpen) {\n setPopoverOpen(false);\n }\n }\n\n function _getCustomizedCallout() {\n return props.onRenderCalloutPerStack\n ? props.onRenderCalloutPerStack(stackCalloutProps)\n : props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps)\n : null;\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it*/\n\n function _legendHighlighted(legend: string): boolean {\n return _getHighlightedLegend().includes(legend);\n }\n\n /**\n * This function checks if none of the legends is selected or hovered.*/\n\n function _noLegendHighlighted(): boolean {\n return _getHighlightedLegend().length === 0;\n }\n\n function _getHighlightedLegend(): string[] {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n }\n\n function _getAriaLabel(seriesIndex: number, pointIndex: number): string {\n const series = _points[seriesIndex];\n const point = series.data[pointIndex];\n const formattedDate =\n point.x instanceof Date ? formatDateToLocaleString(point.x, props.culture, props.useUTC as boolean) : point.x;\n const xValue = point.xAxisCalloutData || formattedDate;\n const legend = series.legend;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n function _isChartEmpty(): boolean {\n return !(\n props.data &&\n props.data.scatterChartData &&\n props.data.scatterChartData.length > 0 &&\n props.data.scatterChartData.filter((item: ScatterChartPoints) => item.data.length).length > 0\n );\n }\n\n const { legendProps, tickValues, tickFormat } = props;\n _points = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);\n\n let points = _points as ScatterChartPoints[];\n if (legendProps && !!legendProps.canSelectMultipleLegends) {\n points = selectedLegendPoints.length >= 1 ? selectedLegendPoints : _points;\n calloutPointsRef.current = calloutData(points);\n }\n\n let legendBars = null;\n // reduce computation cost by only creating legendBars\n // if when hideLegend is false.\n // NOTE: they are rendered only when hideLegend is false in CartesianChart.\n if (!props.hideLegend && !_isTextMode.current) {\n legendBars = _createLegends(_points!); // ToDo: Memoize legends to improve performance.\n }\n const calloutProps = {\n YValueHover: yValueHover,\n hoverXValue,\n descriptionMessage:\n props.getCalloutDescriptionMessage && stackCalloutProps\n ? props.getCalloutDescriptionMessage(stackCalloutProps)\n : undefined,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData,\n ...props.calloutProps,\n clickPosition,\n isPopoverOpen,\n isCalloutForStack: true,\n culture: props.culture,\n isCartesian: true,\n customCallout: {\n customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n };\n const tickParams = {\n tickValues,\n tickFormat,\n };\n\n const xAxisLabels: string[] = _points\n .map((point: ScatterChartDataWithIndex) => point.data.map((dp: ScatterChartDataPoint) => dp.x as string))\n .flat();\n\n _xAxisLabels = [...new Set(xAxisLabels)];\n\n // Compute unique y axis labels for string y axis\n const _yAxisLabels: string[] = _getOrderedYAxisLabels();\n\n return !_isChartEmpty() ? (\n <CartesianChart\n {...props}\n chartTitle={props.data.chartTitle}\n points={points}\n chartType={ChartTypes.ScatterChart}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n getmargins={_getMargins}\n getGraphData={_initializeScatterChartData}\n xAxisType={_xAxisType}\n yAxisType={_yAxisType}\n // Pass stringDatasetForYAxisDomain only if y axis is string\n {...(_yAxisType === YAxisType.StringAxis ? { stringDatasetForYAxisDomain: _yAxisLabels } : {})}\n getMinMaxOfYAxis={_getNumericMinMaxOfY}\n getDomainNRangeValues={_getDomainNRangeValues}\n createYAxis={createNumericYAxis}\n createStringYAxis={createStringYAxis}\n onChartMouseLeave={_handleChartMouseLeave}\n enableFirstRenderOptimization={_firstRenderOptimization}\n datasetForXAxisDomain={_xAxisLabels}\n componentRef={cartesianChartRef}\n {...(_isScatterPolarRef.current ? { yMaxValue: 1, yMinValue: -1 } : {})}\n /* eslint-disable react/jsx-no-bind */\n\n children={(props: ChildProps) => {\n _xAxisScale = props.xScale!;\n _yAxisScale = props.yScalePrimary!;\n return (\n <>\n <g>\n <line\n x1={0}\n y1={0}\n x2={0}\n y2={props.containerHeight}\n stroke={'#323130'}\n id={_verticalLine}\n visibility={'hidden'}\n strokeDasharray={'5,5'}\n />\n <g>{renderSeries}</g>\n </g>\n </>\n );\n }}\n />\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n});\nScatterChart.displayName = 'ScatterChart';\n"],"names":["React","useScatterChartStyles","select","d3Select","Legends","max","d3Max","min","d3Min","useId","areArraysEqual","createNumericYAxis","createStringYAxis","getDomainPaddingForMarkers","domainRangeOfXStringAxis","findNumericMinMaxOfY","YAxisType","isTextMode","isScatterPolarSeries","isPlottable","getRangeForScatterMarkerSize","calculateMarkerRadius","domainRangeOfDateForAreaLineScatterVerticalBarCharts","domainRangeOfNumericForAreaLineScatterCharts","sortAxisCategories","findCalloutPoints","CartesianChart","tokens","calloutData","ChartTypes","XAxisTypes","getTypeOfAxis","getNextColor","getColorFromToken","renderScatterPolarCategoryLabels","formatDateToLocaleString","useImageExport","ScatterChart","forwardRef","props","forwardedRef","_circleId","_seriesId","_verticalLine","_firstRenderOptimization","_emptyChartId","_points","_injectIndexPropertyInScatterChartData","data","scatterChartData","_xAxisScale","_yAxisScale","_uniqueCallOutID","_refArray","margins","renderSeries","_xAxisLabels","xAxisCalloutAccessibilityData","_xBandwidth","cartesianChartRef","legendsRef","_legendsRef","componentRef","hideLegend","classes","hoverXValue","setHoverXValue","useState","activeLegend","setActiveLegend","yValueHover","setYValueHover","selectedLegendPoints","setSelectedLegendPoints","isSelectedLegend","setIsSelectedLegend","activePoint","setActivePoint","stackCalloutProps","setStackCalloutProps","dataPointCalloutProps","setDataPointCalloutProps","clickPosition","setClickPosition","x","y","isPopoverOpen","setPopoverOpen","selectedLegends","setSelectedLegends","legendProps","prevSelectedLegendsRef","useRef","undefined","_isTextMode","_isScatterPolarRef","useEffect","current","_xAxisType","length","StringAxis","_yAxisType","NumericAxis","pointsRef","calloutPointsRef","height","width","map","item","index","color","updatePosition","newX","newY","threshold","distance","Math","sqrt","pow","_getNumericMinMaxOfY","points","yAxisType","startValue","endValue","yPadding","yScaleType","start","end","_getDomainNRangeValues","chartType","isRTL","xAxisType","barWidth","tickValues","domainNRangeValue","xScaleType","xMinValue","xMaxValue","DateAxis","_getMargins","_margins","_initializeScatterChartData","xScale","yScale","containerHeight","containerWidth","xElement","_createPlot","_onHoverCardHide","_createLegends","isLegendMultiSelectEnabled","canSelectMultipleLegends","mapLegendToPoints","forEach","point","legend","push","legendDataItems","Object","entries","legendTitle","representativePoint","title","onMouseOutAction","hoverAction","_handleChartMouseLeave","legendShape","shape","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onLegendHoverCardLeave","onChange","_onLegendSelectionChange","legendRef","_getOrderedYAxisLabels","shouldOrderYAxisLabelsByCategoryOrder","yAxisCategoryOrder","yLabelsSet","Set","i","Array","isArray","d","add","from","_mapCategoryToValues","categoryToValues","legendsSelected","event","currentLegend","slice","_getPointFill","seriesColor","pointId","pointIndex","isLastPoint","colorNeutralBackground1","series","bandwidth","minMarkerSize","markerSize","maxMarkerSize","isContinuousXY","extraMaxPixels","yScalePrimary","pointsForSeries","legendVal","verticaLineHeight","bottom","j","xAxisCalloutData","xPoint","yPoint","seriesId","circleId","pointMarkerSize","circleRadius","isActive","defaultRadius","activeRadius","isLegendSelected","_legendHighlighted","_noLegendHighlighted","currentPointHidden","hideNonActiveDots","text","circle","id","key","r","cx","cy","data-is-focusable","onMouseOver","_handleHover","onMouseMove","onMouseOut","_handleMouseOut","onFocus","_handleFocus","onBlur","_getClickHandler","onDataPointClick","opacity","fill","stroke","role","aria-label","_getAriaLabel","tabIndex","className","markerLabel","xAxisScale","yAxisScale","lineOptions","g","targetRect","target","getBoundingClientRect","left","top","formattedData","Date","culture","useUTC","found","attr","obj","values","lineHeight","mouseEvent","persist","clientX","clientY","func","onClick","_getCustomizedCallout","onRenderCalloutPerStack","onRenderCalloutPerDataPoint","_getHighlightedLegend","includes","seriesIndex","formattedDate","xValue","yValue","yAxisCalloutData","callOutAccessibilityData","ariaLabel","_isChartEmpty","filter","tickFormat","legendBars","calloutProps","YValueHover","descriptionMessage","getCalloutDescriptionMessage","isCalloutForStack","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","xAxisLabels","dp","flat","_yAxisLabels","chartTitle","getmargins","getGraphData","stringDatasetForYAxisDomain","getMinMaxOfYAxis","getDomainNRangeValues","createYAxis","onChartMouseLeave","enableFirstRenderOptimization","datasetForXAxisDomain","yMaxValue","yMinValue","children","line","x1","y1","x2","y2","visibility","strokeDasharray","div","style","displayName"],"mappings":"AAAA;;;;;+BAiEaqC;;;;;;;iEA/DU,QAAQ;6CAEO,oCAAiC;6BAEpC,eAAe;uBAE1B,sBAAmB;yBACA,WAAW;gCAChC,4BAA4B;wBAoB3C,2BAAwB;wBAWA,iBAAc;4BACtB,wBAAwB;mCAUE,wCAAqC;gCAC7C,4BAA4B;uBACtC,2BAAwB;AAWhD,qBAAMA,WAAAA,GAA2DrC,OAAMsC,UAAU,CAGtF,CAACC,OAAOC;QAgC+DD,oBAanEA;IA5CJ,MAAME,YAAoBhC,yBAAAA,EAAM;IAChC,MAAMiC,gBAAoBjC,qBAAAA,EAAM;IAChC,MAAMkC,oBAAwBlC,qBAAAA,EAAM;IACpC,MAAMmC,2BAA2B;IACjC,MAAMC,oBAAwBpC,qB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UAAU,CAAC3R;YACTW,cAAcX,MAAMuG,MAAM;YAC1B3F,cAAcZ,MAAMwK,aAAa;YACjC,OAAA,WAAA,GACE,OAAA,aAAA,CAAA,OAAA,QAAA,EAAA,MAAA,WAAA,GACE,OAAA,aAAA,CAACmD,KAAAA,MAAAA,WAAAA,GACC,OAAA,aAAA,CAACiE,QAAAA;gBACCC,IAAI;gBACJC,IAAI;gBACJC,IAAI;gBACJC,IAAIhS,MAAMyG,eAAe;gBACzBwG,QAAQ;gBACRlB,IAAI3L;gBACJ6R,YAAY;gBACZC,iBAAiB;8BAEnB,OAAA,aAAA,CAACvE,KAAAA,MAAG3M;QAIZ;uBAGF,OAAA,aAAA,CAACmR,OAAAA;QAAIpG,IAAIzL;QAAe4M,MAAM;QAASkF,OAAO;YAAErF,SAAS;QAAI;QAAGI,cAAY;;AAEhF,GAAG;AACHrN,aAAauS,WAAW,GAAG"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./ScatterChart.cjs"), exports);
7
+ _export_star._(require("./ScatterChart.types.cjs"), exports);
8
+ _export_star._(require("../../types/index.cjs"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ScatterChart/index.ts"],"sourcesContent":["export * from './ScatterChart';\nexport * from './ScatterChart.types';\nexport * from '../../types/index';\n"],"names":[],"mappings":";;;;;uBAAc,iBAAiB;uBACjB,uBAAuB;uBACvB,oBAAoB"}
1
+ {"version":3,"sources":["../src/components/ScatterChart/index.ts"],"sourcesContent":["export * from './ScatterChart';\nexport * from './ScatterChart.types';\nexport * from '../../types/index';\n"],"names":[],"mappings":";;;;;uBAAc,oBAAiB;uBACjB,0BAAuB;uBACvB,uBAAoB"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useScatterChartStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from \"@griffel/react\";\nimport { getMarkerLabelStyle, getTooltipStyle } from \"../../utilities/index.js\";\n/**\n * @internal\n */ export const scatterChartClassNames = {\n tooltip: 'fui-line__tooltip',\n markerLabel: 'fui-line__markerLabel',\n root: 'fui-line__root',\n xAxis: 'fui-line__xAxis',\n yAxis: 'fui-line__yAxis',\n legendContainer: 'fui-line__legendContainer',\n hover: 'fui-line__hover',\n descriptionMessage: 'fui-line__descriptionMessage',\n axisTitle: 'fui-line__axisTitle',\n chartTitle: 'fui-line__chartTitle',\n opacityChangeOnHover: 'fui-line__opacityChangeOnHover',\n shapeStyles: 'fui-line__shapeStyles',\n chartWrapper: 'fui-line__chartWrapper',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n plotContainer: '',\n annotationLayer: ''\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n tooltip: getTooltipStyle(),\n markerLabel: getMarkerLabelStyle()\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const useScatterChartStyles = (props)=>{\n var _props_styles;\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(scatterChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ ),\n markerLabel: mergeClasses(scatterChartClassNames.markerLabel, baseStyles.markerLabel, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.markerLabel)\n };\n};\n"],"names":["__styles","mergeClasses","getMarkerLabelStyle","getTooltipStyle","scatterChartClassNames","tooltip","markerLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","plotContainer","annotationLayer","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","qhf8xq","fsow6f","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","sj55zd","Bkfmm31","jzqdnp","Bxms50k","d","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AA;QAAAkB,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAAC,CAAA,EAAA,CAAA;YAAA;SAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAAA,CAAA,EAAA,CAAA;YAAA;SAAA;QAAA;QAAA;QAAA;QAAA;KAAA;IAAAC,CAAA,EAAA;QAAA;YAAA;YAAA;gBAAAA,CAAA,EAAA;YAAA;SAAA;KAAA;AAAA,CAGrB,CAAC;AAGS,+BAA+BE,KAAK,IAAG;IAC9C,IAAIC,aAAa;IACjB,MAAMC,UAAU,GAAG/B,SAAS,CAAC,CAAC;IAC9B,OAAO;QACHlB,OAAO,MAAEJ,mBAAY,EAACG,sBAAsB,CAACC,OAAO,EAAEiD,UAAU,CAACjD,OAAO,CAAC,uBAAA,EAA0B,CAAC;QACpGC,WAAW,MAAEL,mBAAY,EAACG,sBAAsB,CAACE,WAAW,EAAEgD,UAAU,CAAChD,WAAW,EAAE,CAAC+C,aAAa,GAAGD,KAAK,CAACG,MAAAA,AAAM,MAAM,IAAI,IAAIF,aAAa,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,aAAa,CAAC/C,WAAW;IAClM,CAAC;AACL,CAAC"}
@@ -18,7 +18,7 @@ _export(exports, {
18
18
  }
19
19
  });
20
20
  const _react = require("@griffel/react");
21
- const _index = require("../../utilities/index");
21
+ const _index = require("../../utilities/index.cjs");
22
22
  const scatterChartClassNames = {
23
23
  tooltip: 'fui-line__tooltip',
24
24
  markerLabel: 'fui-line__markerLabel',
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ScatterChart/useScatterChartStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport type { GriffelStyle } from '@griffel/react';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { ScatterChartProps, ScatterChartStyles } from './ScatterChart.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { getMarkerLabelStyle, getTooltipStyle } from '../../utilities/index';\n\n/**\n * @internal\n */\nexport const scatterChartClassNames: SlotClassNames<ScatterChartStyles> = {\n tooltip: 'fui-line__tooltip',\n markerLabel: 'fui-line__markerLabel',\n root: 'fui-line__root',\n xAxis: 'fui-line__xAxis',\n yAxis: 'fui-line__yAxis',\n legendContainer: 'fui-line__legendContainer',\n hover: 'fui-line__hover',\n descriptionMessage: 'fui-line__descriptionMessage',\n axisTitle: 'fui-line__axisTitle',\n chartTitle: 'fui-line__chartTitle',\n opacityChangeOnHover: 'fui-line__opacityChangeOnHover',\n shapeStyles: 'fui-line__shapeStyles',\n chartWrapper: 'fui-line__chartWrapper',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n plotContainer: '',\n annotationLayer: '',\n};\n\n/**\n * Base Styles\n */\nconst useStyles = makeStyles({\n tooltip: getTooltipStyle() as GriffelStyle,\n markerLabel: getMarkerLabelStyle() as GriffelStyle,\n});\n\n/**\n * Apply styling to the Carousel slots based on the state\n */\nexport const useScatterChartStyles = (props: ScatterChartProps): ScatterChartStyles => {\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(scatterChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/),\n markerLabel: mergeClasses(scatterChartClassNames.markerLabel, baseStyles.markerLabel, props.styles?.markerLabel),\n };\n};\n"],"names":["makeStyles","mergeClasses","getMarkerLabelStyle","getTooltipStyle","scatterChartClassNames","tooltip","markerLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","plotContainer","annotationLayer","useStyles","useScatterChartStyles","props","baseStyles","styles"],"mappings":"AAAA;;;;;;;;;;;;IAWaI,sBAAAA;;;IAgCAoB,qBAAAA;;;;uBAxC4B,iBAAiB;uBAGL,wBAAwB;AAKtE,+BAAmE;IACxEnB,SAAS;IACTC,aAAa;IACbC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,sBAAsB;IACtBC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;IACPC,gBAAgB;IAChBC,eAAe;IACfC,iBAAiB;AACnB,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYvB,iBAAAA,EAAW;IAC3BK,aAASF,sBAAAA;IACTG,iBAAaJ,0BAAAA;AACf;AAKO,8BAA8B,CAACuB;QAIoDA;IAHxF,MAAMC,aAAaH;IACnB,OAAO;QACLlB,aAASJ,mBAAAA,EAAaG,uBAAuBC,OAAO,EAAEqB,WAAWrB,OAAO,CAAC,uBAAuB;QAChGC,iBAAaL,mBAAAA,EAAaG,uBAAuBE,WAAW,EAAEoB,WAAWpB,WAAW,EAAA,CAAEmB,gBAAAA,MAAME,MAAAA,AAAM,MAAA,QAAZF,kBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,cAAcnB,WAAW;IACjH;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/ScatterChart/useScatterChartStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport type { GriffelStyle } from '@griffel/react';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { ScatterChartProps, ScatterChartStyles } from './ScatterChart.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { getMarkerLabelStyle, getTooltipStyle } from '../../utilities/index';\n\n/**\n * @internal\n */\nexport const scatterChartClassNames: SlotClassNames<ScatterChartStyles> = {\n tooltip: 'fui-line__tooltip',\n markerLabel: 'fui-line__markerLabel',\n root: 'fui-line__root',\n xAxis: 'fui-line__xAxis',\n yAxis: 'fui-line__yAxis',\n legendContainer: 'fui-line__legendContainer',\n hover: 'fui-line__hover',\n descriptionMessage: 'fui-line__descriptionMessage',\n axisTitle: 'fui-line__axisTitle',\n chartTitle: 'fui-line__chartTitle',\n opacityChangeOnHover: 'fui-line__opacityChangeOnHover',\n shapeStyles: 'fui-line__shapeStyles',\n chartWrapper: 'fui-line__chartWrapper',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n plotContainer: '',\n annotationLayer: '',\n};\n\n/**\n * Base Styles\n */\nconst useStyles = makeStyles({\n tooltip: getTooltipStyle() as GriffelStyle,\n markerLabel: getMarkerLabelStyle() as GriffelStyle,\n});\n\n/**\n * Apply styling to the Carousel slots based on the state\n */\nexport const useScatterChartStyles = (props: ScatterChartProps): ScatterChartStyles => {\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(scatterChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/),\n markerLabel: mergeClasses(scatterChartClassNames.markerLabel, baseStyles.markerLabel, props.styles?.markerLabel),\n };\n};\n"],"names":["makeStyles","mergeClasses","getMarkerLabelStyle","getTooltipStyle","scatterChartClassNames","tooltip","markerLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","plotContainer","annotationLayer","useStyles","useScatterChartStyles","props","baseStyles","styles"],"mappings":"AAAA;;;;;;;;;;;;IAWaI,sBAAAA;;;IAgCAoB,qBAAAA;;;;uBAxC4B,iBAAiB;uBAGL,2BAAwB;AAKtE,+BAAmE;IACxEnB,SAAS;IACTC,aAAa;IACbC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,sBAAsB;IACtBC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;IACPC,gBAAgB;IAChBC,eAAe;IACfC,iBAAiB;AACnB,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYvB,iBAAAA,EAAW;IAC3BK,aAASF,sBAAAA;IACTG,iBAAaJ,0BAAAA;AACf;AAKO,8BAA8B,CAACuB;QAIoDA;IAHxF,MAAMC,aAAaH;IACnB,OAAO;QACLlB,aAASJ,mBAAAA,EAAaG,uBAAuBC,OAAO,EAAEqB,WAAWrB,OAAO,CAAC,uBAAuB;QAChGC,iBAAaL,mBAAAA,EAAaG,uBAAuBE,WAAW,EAAEoB,WAAWpB,WAAW,EAAA,CAAEmB,gBAAAA,MAAME,MAAAA,AAAM,MAAA,QAAZF,kBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,cAAcnB,WAAW;IACjH;AACF,EAAE"}
@@ -15,8 +15,8 @@ const _d3array = require("d3-array");
15
15
  const _d3scale = require("d3-scale");
16
16
  const _d3shape = require("d3-shape");
17
17
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
18
- const _index = require("../../utilities/index");
19
- const _useSparklineStylesstyles = require("./useSparklineStyles.styles");
18
+ const _index = require("../../utilities/index.cjs");
19
+ const _useSparklineStylesstyles = require("./useSparklineStyles.styles.cjs");
20
20
  const Sparkline = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
21
21
  const margin = {
22
22
  top: 2,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Sparkline/Sparkline.tsx"],"sourcesContent":["'use client';\n\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { extent as d3Extent, max as d3Max } from 'd3-array';\nimport { scaleLinear as d3ScaleLinear } from 'd3-scale';\nimport { area as d3Area, line as d3Line, curveLinear as d3curveLinear } from 'd3-shape';\nimport * as React from 'react';\nimport type { SparklineProps } from '../../index';\nimport type { LineChartDataPoint } from '../../types/DataPoint';\nimport { useRtl } from '../../utilities/index';\nimport { useSparklineStyles } from './useSparklineStyles.styles';\n\n/**\n * Sparkline is the context wrapper and container for all Sparkline content/controls,\n * It has no direct style or slot opinions.\n *\n * Sparkline also provides API interfaces for callbacks that will occur on navigation events.\n */\nexport const Sparkline: React.FunctionComponent<SparklineProps> = React.forwardRef<HTMLDivElement, SparklineProps>(\n (props, forwardedRef) => {\n const margin = {\n top: 2,\n right: 0,\n bottom: 0,\n left: 0,\n };\n let x: any;\n let y: any;\n const _emptyChartId: string = '_SparklineChart_empty';\n const _isRTL: boolean = useRtl();\n const [points, setPoints] = React.useState<LineChartDataPoint[]>([]);\n\n // Use props with default fallbacks instead of hardcoded values\n const width = props.width ?? 80;\n const height = props.height ?? 20;\n const valueTextWidth = props.valueTextWidth ?? 80;\n\n const line = React.useMemo(() => {\n return d3Line<LineChartDataPoint>()\n .x((d: LineChartDataPoint) => x(d.x))\n .y((d: LineChartDataPoint) => y(d.y))\n .curve(d3curveLinear);\n }, [x, y]);\n\n const area = React.useMemo(() => {\n return d3Area<LineChartDataPoint>()\n .x((d: LineChartDataPoint) => x(d.x))\n .y0(height)\n .y1((d: LineChartDataPoint) => y(d.y))\n .curve(d3curveLinear);\n }, [height, x, y]);\n\n React.useEffect(() => {\n if (!_isChartEmpty()) {\n const _points = props.data!.lineChartData![0].data;\n\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const [xMin, xMax] = d3Extent(_points, (d: any) => d.x);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n x = d3ScaleLinear()\n .domain([xMin, xMax])\n .range([margin.left!, width - margin.right!]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n y = d3ScaleLinear()\n /* eslint-disable @typescript-eslint/no-explicit-any */\n .domain([0, d3Max(_points, (d: any) => d.y)])\n .range([height - margin.bottom!, margin.top!]);\n\n setPoints(_points as LineChartDataPoint[]);\n }\n }, []);\n\n const { data } = props;\n function _isChartEmpty(): boolean {\n return !(\n data &&\n data.lineChartData &&\n data.lineChartData.length > 0 &&\n data.lineChartData.filter(item => item.data.length === 0).length === 0\n );\n }\n function drawSparkline() {\n if (!line || !area) {\n return null;\n }\n return (\n <>\n <path\n className=\"line\"\n d={line(points)!}\n fill={'transparent'}\n opacity={1}\n strokeWidth={2}\n stroke={data!.lineChartData![0].color!}\n />\n <path\n className=\"area\"\n d={area(points)!}\n opacity={1}\n fillOpacity={0.2}\n fill={data!.lineChartData![0].color!}\n role=\"img\"\n aria-hidden\n />\n </>\n );\n }\n\n const classes = useSparklineStyles(props);\n const focusAttributes = useFocusableGroup();\n return !_isChartEmpty() ? (\n <div className={classes.inlineBlock} {...focusAttributes}>\n {width >= 50 && height >= 16 ? (\n <svg\n width={width}\n height={height}\n aria-label={`Sparkline with label ${data!.lineChartData![0].legend!}`}\n tabIndex={0}\n >\n {points ? drawSparkline() : null}\n </svg>\n ) : (\n <></>\n )}\n {props.showLegend && props.data!.lineChartData![0].legend ? (\n <svg width={valueTextWidth} height={height}>\n <text x=\"0%\" textAnchor={_isRTL ? 'end' : 'start'} dx={8} y=\"100%\" dy={-5} className={classes.valueText}>\n {props.data!.lineChartData![0].legend!}\n </text>\n </svg>\n ) : (\n <></>\n )}\n </div>\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n },\n);\nSparkline.displayName = 'Sparkline';\n"],"names":["useFocusableGroup","extent","d3Extent","max","d3Max","scaleLinear","d3ScaleLinear","area","d3Area","line","d3Line","curveLinear","d3curveLinear","React","useRtl","useSparklineStyles","Sparkline","forwardRef","props","forwardedRef","margin","top","right","bottom","left","x","y","_emptyChartId","_isRTL","points","setPoints","useState","width","height","valueTextWidth","useMemo","d","curve","y0","y1","useEffect","_isChartEmpty","_points","data","lineChartData","xMin","xMax","domain","range","length","filter","item","drawSparkline","path","className","fill","opacity","strokeWidth","stroke","color","fillOpacity","role","aria-hidden","classes","focusAttributes","div","inlineBlock","svg","aria-label","legend","tabIndex","showLegend","text","textAnchor","dx","dy","valueText","id","style","displayName"],"mappings":"AAAA;;;;;+BAkBagB;;;;;;;8BAhBqB,0BAA0B;yBACX,WAAW;yBACf,WAAW;yBACqB,WAAW;iEACjE,QAAQ;uBAGR,wBAAwB;0CACZ,8BAA8B;AAQ1D,kBAAMA,WAAAA,GAAqDH,OAAMI,UAAU,CAChF,CAACC,OAAOC;IACN,MAAMC,SAAS;QACbC,KAAK;Q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AACyC,kBAAAA,WAAAA,GACN,OAAA,aAAA,CAACwB,OAAAA;QAAIX,WAAWS,QAAQG,WAAW;QAAG,GAAGF,eAAe;OACrDhC,SAAS,MAAMC,UAAU,KAAA,WAAA,GACxB,OAAA,aAAA,CAACkC,OAAAA;QACCnC,OAAOA;QACPC,QAAQA;QACRmC,cAAY,CAAC,qBAAqB,EAAEzB,KAAMC,aAAc,CAAC,EAAE,CAACyB,MAAM,EAAG;QACrEC,UAAU;OAETzC,SAASuB,kBAAkB,QAAA,WAAA,GAG9B,OAAA,aAAA,CAAA,OAAA,QAAA,EAAA,OAEDlC,MAAMqD,UAAU,IAAIrD,MAAMyB,IAAI,CAAEC,aAAc,CAAC,EAAE,CAACyB,MAAM,GAAA,WAAA,GACvD,OAAA,aAAA,CAACF,OAAAA;QAAInC,OAAOE;QAAgBD,QAAQA;qBAClC,OAAA,aAAA,CAACuC,QAAAA;QAAK/C,GAAE;QAAKgD,YAAY7C,SAAS,QAAQ;QAAS8C,IAAI;QAAGhD,GAAE;QAAOiD,IAAI,CAAC;QAAGrB,WAAWS,QAAQa,SAAS;OACpG1D,MAAMyB,IAAI,CAAEC,aAAc,CAAC,EAAE,CAACyB,MAAM,KAAA,WAAA,GAIzC,OAAA,aAAA,CAAA,OAAA,QAAA,EAAA,SAAA,WAAA,GAIJ,OAAA,aAAA,CAACJ,OAAAA;QAAIY,IAAIlD;QAAekC,MAAM;QAASiB,OAAO;YAAEtB,SAAS;QAAI;QAAGY,cAAY;;AAEhF,GACA;AACFpD,UAAU+D,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/Sparkline/Sparkline.tsx"],"sourcesContent":["'use client';\n\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { extent as d3Extent, max as d3Max } from 'd3-array';\nimport { scaleLinear as d3ScaleLinear } from 'd3-scale';\nimport { area as d3Area, line as d3Line, curveLinear as d3curveLinear } from 'd3-shape';\nimport * as React from 'react';\nimport type { SparklineProps } from '../../index';\nimport type { LineChartDataPoint } from '../../types/DataPoint';\nimport { useRtl } from '../../utilities/index';\nimport { useSparklineStyles } from './useSparklineStyles.styles';\n\n/**\n * Sparkline is the context wrapper and container for all Sparkline content/controls,\n * It has no direct style or slot opinions.\n *\n * Sparkline also provides API interfaces for callbacks that will occur on navigation events.\n */\nexport const Sparkline: React.FunctionComponent<SparklineProps> = React.forwardRef<HTMLDivElement, SparklineProps>(\n (props, forwardedRef) => {\n const margin = {\n top: 2,\n right: 0,\n bottom: 0,\n left: 0,\n };\n let x: any;\n let y: any;\n const _emptyChartId: string = '_SparklineChart_empty';\n const _isRTL: boolean = useRtl();\n const [points, setPoints] = React.useState<LineChartDataPoint[]>([]);\n\n // Use props with default fallbacks instead of hardcoded values\n const width = props.width ?? 80;\n const height = props.height ?? 20;\n const valueTextWidth = props.valueTextWidth ?? 80;\n\n const line = React.useMemo(() => {\n return d3Line<LineChartDataPoint>()\n .x((d: LineChartDataPoint) => x(d.x))\n .y((d: LineChartDataPoint) => y(d.y))\n .curve(d3curveLinear);\n }, [x, y]);\n\n const area = React.useMemo(() => {\n return d3Area<LineChartDataPoint>()\n .x((d: LineChartDataPoint) => x(d.x))\n .y0(height)\n .y1((d: LineChartDataPoint) => y(d.y))\n .curve(d3curveLinear);\n }, [height, x, y]);\n\n React.useEffect(() => {\n if (!_isChartEmpty()) {\n const _points = props.data!.lineChartData![0].data;\n\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const [xMin, xMax] = d3Extent(_points, (d: any) => d.x);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n x = d3ScaleLinear()\n .domain([xMin, xMax])\n .range([margin.left!, width - margin.right!]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n y = d3ScaleLinear()\n /* eslint-disable @typescript-eslint/no-explicit-any */\n .domain([0, d3Max(_points, (d: any) => d.y)])\n .range([height - margin.bottom!, margin.top!]);\n\n setPoints(_points as LineChartDataPoint[]);\n }\n }, []);\n\n const { data } = props;\n function _isChartEmpty(): boolean {\n return !(\n data &&\n data.lineChartData &&\n data.lineChartData.length > 0 &&\n data.lineChartData.filter(item => item.data.length === 0).length === 0\n );\n }\n function drawSparkline() {\n if (!line || !area) {\n return null;\n }\n return (\n <>\n <path\n className=\"line\"\n d={line(points)!}\n fill={'transparent'}\n opacity={1}\n strokeWidth={2}\n stroke={data!.lineChartData![0].color!}\n />\n <path\n className=\"area\"\n d={area(points)!}\n opacity={1}\n fillOpacity={0.2}\n fill={data!.lineChartData![0].color!}\n role=\"img\"\n aria-hidden\n />\n </>\n );\n }\n\n const classes = useSparklineStyles(props);\n const focusAttributes = useFocusableGroup();\n return !_isChartEmpty() ? (\n <div className={classes.inlineBlock} {...focusAttributes}>\n {width >= 50 && height >= 16 ? (\n <svg\n width={width}\n height={height}\n aria-label={`Sparkline with label ${data!.lineChartData![0].legend!}`}\n tabIndex={0}\n >\n {points ? drawSparkline() : null}\n </svg>\n ) : (\n <></>\n )}\n {props.showLegend && props.data!.lineChartData![0].legend ? (\n <svg width={valueTextWidth} height={height}>\n <text x=\"0%\" textAnchor={_isRTL ? 'end' : 'start'} dx={8} y=\"100%\" dy={-5} className={classes.valueText}>\n {props.data!.lineChartData![0].legend!}\n </text>\n </svg>\n ) : (\n <></>\n )}\n </div>\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n },\n);\nSparkline.displayName = 'Sparkline';\n"],"names":["useFocusableGroup","extent","d3Extent","max","d3Max","scaleLinear","d3ScaleLinear","area","d3Area","line","d3Line","curveLinear","d3curveLinear","React","useRtl","useSparklineStyles","Sparkline","forwardRef","props","forwardedRef","margin","top","right","bottom","left","x","y","_emptyChartId","_isRTL","points","setPoints","useState","width","height","valueTextWidth","useMemo","d","curve","y0","y1","useEffect","_isChartEmpty","_points","data","lineChartData","xMin","xMax","domain","range","length","filter","item","drawSparkline","path","className","fill","opacity","strokeWidth","stroke","color","fillOpacity","role","aria-hidden","classes","focusAttributes","div","inlineBlock","svg","aria-label","legend","tabIndex","showLegend","text","textAnchor","dx","dy","valueText","id","style","displayName"],"mappings":"AAAA;;;;;+BAkBagB;;;;;;;8BAhBqB,0BAA0B;yBACX,WAAW;yBACf,WAAW;yBACqB,WAAW;iEACjE,QAAQ;uBAGR,2BAAwB;0CACZ,iCAA8B;AAQ1D,kBAAMA,WAAAA,GAAqDH,OAAMI,UAAU,CAChF,CAACC,OAAOC;IACN,MAAMC,SAAS;QACbC,KAAK;QACLC,OAAO;QACPC,QAAQ;QACRC,MAAM;IACR;IACA,IAAIC;IACJ,IAAIC;IACJ,MAAMC,gBAAwB;IAC9B,MAAMC,aAAkBd,aAAAA;IACxB,MAAM,CAACe,QAAQC,UAAU,GAAGjB,OAAMkB,QAAQ,CAAuB,EAAE;QAGrDb;IADd,+DAA+D;IAC/D,MAAMc,QAAQd,CAAAA,eAAAA,MAAMc,KAAAA,AAAK,MAAA,QAAXd,iBAAAA,KAAAA,IAAAA,eAAe;QACdA;IAAf,MAAMe,SAASf,iBAAAA,MAAMe,MAAAA,AAAM,MAAA,QAAZf,kBAAAA,KAAAA,IAAAA,gBAAgB;QACRA;IAAvB,MAAMgB,iBAAiBhB,CAAAA,wBAAAA,MAAMgB,cAAc,AAAdA,MAAc,QAApBhB,0BAAAA,KAAAA,IAAAA,wBAAwB;IAE/C,MAAMT,OAAOI,OAAMsB,OAAO,CAAC;QACzB,WAAOzB,aAAAA,IACJe,CAAC,CAAC,CAACW,IAA0BX,EAAEW,EAAEX,CAAC,GAClCC,CAAC,CAAC,CAACU,IAA0BV,EAAEU,EAAEV,CAAC,GAClCW,KAAK,CAACzB,oBAAAA;IACX,GAAG;QAACa;QAAGC;KAAE;IAET,MAAMnB,OAAOM,OAAMsB,OAAO,CAAC;QACzB,WAAO3B,aAAAA,IACJiB,CAAC,CAAC,CAACW,IAA0BX,EAAEW,EAAEX,CAAC,GAClCa,EAAE,CAACL,QACHM,EAAE,CAAC,CAACH,IAA0BV,EAAEU,EAAEV,CAAC,G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pD,UAAU+D,WAAW,GAAG"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./Sparkline.cjs"), exports);
7
+ _export_star._(require("./Sparkline.types.cjs"), exports);
8
+ _export_star._(require("../../types/index.cjs"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Sparkline/index.ts"],"sourcesContent":["export * from './Sparkline';\nexport * from './Sparkline.types';\nexport * from '../../types/index';\n"],"names":[],"mappings":";;;;;uBAAc,cAAc;uBACd,oBAAoB;uBACpB,oBAAoB"}
1
+ {"version":3,"sources":["../src/components/Sparkline/index.ts"],"sourcesContent":["export * from './Sparkline';\nexport * from './Sparkline.types';\nexport * from '../../types/index';\n"],"names":[],"mappings":";;;;;uBAAc,iBAAc;uBACd,uBAAoB;uBACpB,uBAAoB"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useSparklineStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from \"@griffel/react\";\nimport { tokens, typographyStyles } from \"@fluentui/react-theme\";\n/**\n * @internal\n */ export const sparklineClassNames = {\n inlineBlock: 'fui-sprk__inlineBlock',\n valueText: 'fui-sprk__valueText'\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n inlineBlock: {\n display: 'inline'\n },\n valueText: {\n ...typographyStyles.caption1,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n }\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const useSparklineStyles = (props)=>{\n var _props_styles, _props_styles1;\n const baseStyles = useStyles();\n return {\n inlineBlock: mergeClasses(sparklineClassNames.inlineBlock, baseStyles.inlineBlock, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.inlineBlock),\n valueText: mergeClasses(sparklineClassNames.valueText, baseStyles.valueText, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.valueText)\n };\n};\n"],"names":["__styles","mergeClasses","tokens","typographyStyles","sparklineClassNames","inlineBlock","valueText","useStyles","mc9l5x","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","Bkfmm31","Bvjb7m6","d","useSparklineStyles","props","_props_styles","_props_styles1","baseStyles","styles"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAKKI,mBAAmB;;;sBAkBD;;;;uBAtBM,gBAAgB;AAI9C,4BAA4B;IACnCC,WAAW,EAAE,uBAAuB;IACpCC,SAAS,EAAE;AACf,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGP,eAAA,EAAA;IAAAK,WAAA,EAAA;QAAAG,MAAA,EAAA;IAAA;IAAAF,SAAA,EAAA;QAAAG,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CASrB,CAAC;AAGS,MAAMC,sBAAsBC,KAAK,IAAG;IAC3C,IAAIC,aAAa,EAAEC,cAAc;IACjC,MAAMC,UAAU,GAAGb,SAAS,CAAC,CAAC;IAC9B,OAAO;QACHF,WAAW,MAAEJ,mBAAY,EAACG,mBAAmB,CAACC,WAAW,EAAEe,UAAU,CAACf,WAAW,EAAE,CAACa,aAAa,GAAGD,KAAK,CAACI,MAAAA,AAAM,MAAM,IAAI,IAAIH,aAAa,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,aAAa,CAACb,WAAW,CAAC;QAC5LC,SAAS,MAAEL,mBAAY,EAACG,mBAAmB,CAACE,SAAS,EAAEc,UAAU,CAACd,SAAS,EAAE,CAACa,cAAc,GAAGF,KAAK,CAACI,MAAM,AAANA,MAAY,IAAI,IAAIF,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAACb,SAAS;IAC1L,CAAC;AACL,CAAC"}
@@ -11,20 +11,20 @@ Object.defineProperty(exports, "VegaDeclarativeChart", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _VegaLiteSchemaAdapter = require("./VegaLiteSchemaAdapter");
15
- const _index = require("../Legends/index");
16
- const _withResponsiveContainer = require("../ResponsiveContainer/withResponsiveContainer");
17
- const _index1 = require("../LineChart/index");
18
- const _index2 = require("../VerticalBarChart/index");
19
- const _index3 = require("../VerticalStackedBarChart/index");
20
- const _index4 = require("../GroupedVerticalBarChart/index");
21
- const _index5 = require("../HorizontalBarChartWithAxis/index");
22
- const _index6 = require("../AreaChart/index");
23
- const _index7 = require("../ScatterChart/index");
24
- const _index8 = require("../DonutChart/index");
25
- const _index9 = require("../HeatMapChart/index");
26
- const _index10 = require("../PolarChart/index");
27
- const _VegaDeclarativeChartHooks = require("./VegaDeclarativeChartHooks");
14
+ const _VegaLiteSchemaAdapter = require("./VegaLiteSchemaAdapter.cjs");
15
+ const _index = require("../Legends/index.cjs");
16
+ const _withResponsiveContainer = require("../ResponsiveContainer/withResponsiveContainer.cjs");
17
+ const _index1 = require("../LineChart/index.cjs");
18
+ const _index2 = require("../VerticalBarChart/index.cjs");
19
+ const _index3 = require("../VerticalStackedBarChart/index.cjs");
20
+ const _index4 = require("../GroupedVerticalBarChart/index.cjs");
21
+ const _index5 = require("../HorizontalBarChartWithAxis/index.cjs");
22
+ const _index6 = require("../AreaChart/index.cjs");
23
+ const _index7 = require("../ScatterChart/index.cjs");
24
+ const _index8 = require("../DonutChart/index.cjs");
25
+ const _index9 = require("../HeatMapChart/index.cjs");
26
+ const _index10 = require("../PolarChart/index.cjs");
27
+ const _VegaDeclarativeChartHooks = require("./VegaDeclarativeChartHooks.cjs");
28
28
  /**
29
29
  * Maximum allowed nesting depth for incoming JSON specs.
30
30
  * Matches the Plotly adapter's MAX_DEPTH to prevent stack overflow / memory exhaustion.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/VegaDeclarativeChart/VegaDeclarativeChart.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n transformVegaLiteToLineChartProps,\n transformVegaLiteToVerticalBarChartProps,\n transformVegaLiteToVerticalStackedBarChartProps,\n transformVegaLiteToGroupedVerticalBarChartProps,\n transformVegaLiteToHorizontalBarChartProps,\n transformVegaLiteToAreaChartProps,\n transformVegaLiteToScatterChartProps,\n transformVegaLiteToDonutChartProps,\n transformVegaLiteToHeatMapChartProps,\n transformVegaLiteToHistogramProps,\n transformVegaLiteToPolarChartProps,\n getChartType,\n getMarkType,\n getVegaLiteLegendsProps,\n} from './VegaLiteSchemaAdapter';\nimport type { VegaLiteUnitSpec, VegaLiteSpec } from './VegaLiteTypes';\nimport { Legends } from '../Legends/index';\nimport { withResponsiveContainer } from '../ResponsiveContainer/withResponsiveContainer';\nimport { LineChart } from '../LineChart/index';\nimport { VerticalBarChart } from '../VerticalBarChart/index';\nimport { VerticalStackedBarChart } from '../VerticalStackedBarChart/index';\nimport { GroupedVerticalBarChart } from '../GroupedVerticalBarChart/index';\nimport { HorizontalBarChartWithAxis } from '../HorizontalBarChartWithAxis/index';\nimport { AreaChart } from '../AreaChart/index';\nimport { ScatterChart } from '../ScatterChart/index';\nimport { DonutChart } from '../DonutChart/index';\nimport { HeatMapChart } from '../HeatMapChart/index';\nimport { PolarChart } from '../PolarChart/index';\nimport { useIsDarkTheme, useColorMapping } from './VegaDeclarativeChartHooks';\nimport type { Chart } from '../../types/index';\n\n// Re-export the typed VegaLiteSpec for public API\nexport type { VegaLiteSpec } from './VegaLiteTypes';\n\n/**\n * Maximum allowed nesting depth for incoming JSON specs.\n * Matches the Plotly adapter's MAX_DEPTH to prevent stack overflow / memory exhaustion.\n */\nconst MAX_DEPTH = 15;\n\n/**\n * Validates that a JSON value does not exceed the maximum nesting depth.\n * Throws if the depth limit is exceeded (same behavior as Plotly's sanitizeJson).\n */\nfunction validateJsonDepth(value: unknown, depth: number = 0): void {\n if (depth > MAX_DEPTH) {\n throw new Error('VegaDeclarativeChart: Maximum JSON depth exceeded');\n }\n if (value !== null && typeof value === 'object') {\n for (const key of Object.keys(value as Record<string, unknown>)) {\n validateJsonDepth((value as Record<string, unknown>)[key], depth + 1);\n }\n }\n}\n\n/**\n * Schema for VegaDeclarativeChart component\n */\nexport interface VegaSchema {\n /**\n * Vega-Lite specification\n *\n * @see https://vega.github.io/vega-lite/docs/spec.html\n */\n vegaLiteSpec: VegaLiteSpec;\n\n /**\n * Selected legends for filtering\n */\n selectedLegends?: string[];\n}\n\n/**\n * Props for VegaDeclarativeChart component\n */\nexport interface VegaDeclarativeChartProps {\n /**\n * Vega-Lite chart schema\n */\n chartSchema: VegaSchema;\n\n /**\n * Callback when schema changes (e.g., legend selection)\n */\n onSchemaChange?: (newSchema: VegaSchema) => void;\n\n /**\n * Additional CSS class name\n */\n className?: string;\n\n /**\n * Additional inline styles\n */\n style?: React.CSSProperties;\n}\n\n/**\n * Check if spec is a horizontal concatenation\n */\nfunction isHConcatSpec(spec: VegaLiteSpec): boolean {\n return !!spec.hconcat && Array.isArray(spec.hconcat) && spec.hconcat.length > 0;\n}\n\n/**\n * Check if spec is a vertical concatenation\n */\nfunction isVConcatSpec(spec: VegaLiteSpec): boolean {\n return !!spec.vconcat && Array.isArray(spec.vconcat) && spec.vconcat.length > 0;\n}\n\n/**\n * Get grid properties for concat specs\n */\nfunction getVegaConcatGridProperties(spec: VegaLiteSpec): {\n templateRows: string;\n templateColumns: string;\n isHorizontal: boolean;\n specs: VegaLiteSpec[];\n} {\n if (isHConcatSpec(spec)) {\n return {\n templateRows: 'auto',\n templateColumns: `repeat(${spec.hconcat!.length}, 1fr)`,\n isHorizontal: true,\n specs: spec.hconcat!,\n };\n }\n\n if (isVConcatSpec(spec)) {\n return {\n templateRows: `repeat(${spec.vconcat!.length}, auto)`,\n templateColumns: '1fr',\n isHorizontal: false,\n specs: spec.vconcat!,\n };\n }\n\n return {\n templateRows: '1fr',\n templateColumns: '1fr',\n isHorizontal: false,\n specs: [spec],\n };\n}\n\nconst ResponsiveLineChart = withResponsiveContainer(LineChart);\nconst ResponsiveVerticalBarChart = withResponsiveContainer(VerticalBarChart);\nconst ResponsiveVerticalStackedBarChart = withResponsiveContainer(VerticalStackedBarChart);\nconst ResponsiveGroupedVerticalBarChart = withResponsiveContainer(GroupedVerticalBarChart);\nconst ResponsiveHorizontalBarChartWithAxis = withResponsiveContainer(HorizontalBarChartWithAxis);\nconst ResponsiveAreaChart = withResponsiveContainer(AreaChart);\nconst ResponsiveScatterChart = withResponsiveContainer(ScatterChart);\nconst ResponsiveDonutChart = withResponsiveContainer(DonutChart);\nconst ResponsiveHeatMapChart = withResponsiveContainer(HeatMapChart);\nconst ResponsivePolarChart = withResponsiveContainer(PolarChart);\n\n/**\n * Chart type mapping with transformers and renderers\n * Follows the factory functor pattern from PlotlyDeclarativeChart\n */\ntype VegaChartTypeMap = {\n line: { transformer: typeof transformVegaLiteToLineChartProps; renderer: typeof ResponsiveLineChart };\n bar: { transformer: typeof transformVegaLiteToVerticalBarChartProps; renderer: typeof ResponsiveVerticalBarChart };\n 'stacked-bar': {\n transformer: typeof transformVegaLiteToVerticalStackedBarChartProps;\n renderer: typeof ResponsiveVerticalStackedBarChart;\n };\n 'grouped-bar': {\n transformer: typeof transformVegaLiteToGroupedVerticalBarChartProps;\n renderer: typeof ResponsiveGroupedVerticalBarChart;\n };\n 'horizontal-bar': {\n transformer: typeof transformVegaLiteToHorizontalBarChartProps;\n renderer: typeof ResponsiveHorizontalBarChartWithAxis;\n };\n area: { transformer: typeof transformVegaLiteToAreaChartProps; renderer: typeof ResponsiveAreaChart };\n scatter: { transformer: typeof transformVegaLiteToScatterChartProps; renderer: typeof ResponsiveScatterChart };\n donut: { transformer: typeof transformVegaLiteToDonutChartProps; renderer: typeof ResponsiveDonutChart };\n heatmap: { transformer: typeof transformVegaLiteToHeatMapChartProps; renderer: typeof ResponsiveHeatMapChart };\n histogram: { transformer: typeof transformVegaLiteToHistogramProps; renderer: typeof ResponsiveVerticalBarChart };\n polar: { transformer: typeof transformVegaLiteToPolarChartProps; renderer: typeof ResponsivePolarChart };\n};\n\nconst vegaChartMap: VegaChartTypeMap = {\n line: { transformer: transformVegaLiteToLineChartProps, renderer: ResponsiveLineChart },\n bar: { transformer: transformVegaLiteToVerticalBarChartProps, renderer: ResponsiveVerticalBarChart },\n 'stacked-bar': {\n transformer: transformVegaLiteToVerticalStackedBarChartProps,\n renderer: ResponsiveVerticalStackedBarChart,\n },\n 'grouped-bar': {\n transformer: transformVegaLiteToGroupedVerticalBarChartProps,\n renderer: ResponsiveGroupedVerticalBarChart,\n },\n 'horizontal-bar': {\n transformer: transformVegaLiteToHorizontalBarChartProps,\n renderer: ResponsiveHorizontalBarChartWithAxis,\n },\n area: { transformer: transformVegaLiteToAreaChartProps, renderer: ResponsiveAreaChart },\n scatter: { transformer: transformVegaLiteToScatterChartProps, renderer: ResponsiveScatterChart },\n donut: { transformer: transformVegaLiteToDonutChartProps, renderer: ResponsiveDonutChart },\n heatmap: { transformer: transformVegaLiteToHeatMapChartProps, renderer: ResponsiveHeatMapChart },\n histogram: { transformer: transformVegaLiteToHistogramProps, renderer: ResponsiveVerticalBarChart },\n polar: { transformer: transformVegaLiteToPolarChartProps, renderer: ResponsivePolarChart },\n};\n\ninterface MultiSelectLegendProps {\n canSelectMultipleLegends: boolean;\n onChange: (keys: string[]) => void;\n selectedLegends: string[];\n}\n\n/**\n * Renders a single Vega-Lite chart spec\n */\nfunction renderSingleChart(\n spec: VegaLiteSpec,\n colorMap: React.RefObject<Map<string, string>>,\n isDarkTheme: boolean,\n interactiveCommonProps: { componentRef: React.RefObject<Chart | null>; legendProps: MultiSelectLegendProps },\n): React.ReactElement {\n const chartType = getChartType(spec);\n const chartConfig = vegaChartMap[chartType.type];\n\n if (!chartConfig) {\n throw new Error(`VegaDeclarativeChart: Unsupported chart type '${chartType.type}'`);\n }\n\n const { transformer, renderer: ChartRenderer } = chartConfig;\n const chartProps = transformer(spec, colorMap, isDarkTheme) as Record<string, unknown>;\n\n // For hconcat/vconcat sub-charts, hide per-chart legends (shared legend rendered separately)\n if ((spec as Record<string, unknown>)._hideLegend) {\n chartProps.hideLegend = true;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return <ChartRenderer {...(chartProps as any)} {...interactiveCommonProps} />;\n}\n\n/**\n * VegaDeclarativeChart - Render Vega-Lite specifications with Fluent UI styling\n *\n * Supported chart types:\n * - Line charts: mark: 'line' or 'point'\n * - Area charts: mark: 'area'\n * - Scatter charts: mark: 'point', 'circle', or 'square'\n * - Vertical bar charts: mark: 'bar' with nominal/ordinal x-axis\n * - Stacked bar charts: mark: 'bar' with color encoding\n * - Grouped bar charts: mark: 'bar' with color encoding (via configuration)\n * - Horizontal bar charts: mark: 'bar' with nominal/ordinal y-axis\n * - Donut/Pie charts: mark: 'arc' with theta encoding\n * - Heatmaps: mark: 'rect' with x, y, and color (quantitative) encodings\n * - Combo charts: Layered specs with bar + line marks render as VerticalStackedBarChart with line overlays\n *\n * Multi-plot Support:\n * - Horizontal concatenation (hconcat): Multiple charts side-by-side\n * - Vertical concatenation (vconcat): Multiple charts stacked vertically\n * - Shared data and encoding are merged from parent spec to each subplot\n *\n * Limitations:\n * - Most layered specifications (multiple chart types) are not fully supported\n * - Bar + Line combinations ARE supported and will render properly\n * - For other composite charts, only the first layer will be rendered\n * - Faceting and repeat operators are not yet supported\n * - Funnel charts are not a native Vega-Lite mark type. The conversion_funnel.json example\n * uses a horizontal bar chart (y: nominal, x: quantitative) which is the standard way to\n * represent funnel data in Vega-Lite. For specialized funnel visualizations with tapering\n * shapes, consider using Plotly's native funnel chart type instead.\n *\n * Note: Sankey, Gantt, and Gauge charts are not standard Vega-Lite marks.\n * These specialized visualizations would require custom extensions or alternative approaches.\n *\n * @example Line Chart\n * ```tsx\n * import { VegaDeclarativeChart } from '@fluentui/react-charts';\n *\n * const spec = {\n * mark: 'line',\n * data: { values: [{ x: 1, y: 10 }, { x: 2, y: 20 }] },\n * encoding: {\n * x: { field: 'x', type: 'quantitative' },\n * y: { field: 'y', type: 'quantitative' }\n * }\n * };\n *\n * <VegaDeclarativeChart chartSchema={{ vegaLiteSpec: spec }} />\n * ```\n *\n * @example Area Chart\n * ```tsx\n * const areaSpec = {\n * mark: 'area',\n * data: { values: [{ date: '2023-01', value: 100 }, { date: '2023-02', value: 150 }] },\n * encoding: {\n * x: { field: 'date', type: 'temporal' },\n * y: { field: 'value', type: 'quantitative' }\n * }\n * };\n *\n * <VegaDeclarativeChart chartSchema={{ vegaLiteSpec: areaSpec }} />\n * ```\n *\n * @example Scatter Chart\n * ```tsx\n * const scatterSpec = {\n * mark: 'point',\n * data: { values: [{ x: 10, y: 20, size: 100 }, { x: 15, y: 30, size: 200 }] },\n * encoding: {\n * x: { field: 'x', type: 'quantitative' },\n * y: { field: 'y', type: 'quantitative' },\n * size: { field: 'size', type: 'quantitative' }\n * }\n * };\n *\n * <VegaDeclarativeChart chartSchema={{ vegaLiteSpec: scatterSpec }} />\n * ```\n *\n * @example Vertical Bar Chart\n * ```tsx\n * const barSpec = {\n * mark: 'bar',\n * data: { values: [{ cat: 'A', val: 28 }, { cat: 'B', val: 55 }] },\n * encoding: {\n * x: { field: 'cat', type: 'nominal' },\n * y: { field: 'val', type: 'quantitative' }\n * }\n * };\n *\n * <VegaDeclarativeChart chartSchema={{ vegaLiteSpec: barSpec }} />\n * ```\n *\n * @example Stacked Bar Chart\n * ```tsx\n * const stackedSpec = {\n * mark: 'bar',\n * data: { values: [\n * { cat: 'A', group: 'G1', val: 28 },\n * { cat: 'A', group: 'G2', val: 15 }\n * ]},\n * encoding: {\n * x: { field: 'cat', type: 'nominal' },\n * y: { field: 'val', type: 'quantitative' },\n * color: { field: 'group', type: 'nominal' }\n * }\n * };\n *\n * <VegaDeclarativeChart chartSchema={{ vegaLiteSpec: stackedSpec }} />\n * ```\n *\n * @example Donut Chart\n * ```tsx\n * const donutSpec = {\n * mark: 'arc',\n * data: { values: [{ category: 'A', value: 30 }, { category: 'B', value: 70 }] },\n * encoding: {\n * theta: { field: 'value', type: 'quantitative' },\n * color: { field: 'category', type: 'nominal' }\n * }\n * };\n *\n * <VegaDeclarativeChart chartSchema={{ vegaLiteSpec: donutSpec }} />\n * ```\n *\n * @example Heatmap\n * ```tsx\n * const heatmapSpec = {\n * mark: 'rect',\n * data: { values: [\n * { x: 'A', y: 'Mon', value: 28 },\n * { x: 'B', y: 'Mon', value: 55 },\n * { x: 'A', y: 'Tue', value: 43 }\n * ]},\n * encoding: {\n * x: { field: 'x', type: 'nominal' },\n * y: { field: 'y', type: 'nominal' },\n * color: { field: 'value', type: 'quantitative' }\n * }\n * };\n *\n * <VegaDeclarativeChart chartSchema={{ vegaLiteSpec: heatmapSpec }} />\n * ```\n */\nexport const VegaDeclarativeChart = React.forwardRef<HTMLDivElement, VegaDeclarativeChartProps>(\n (props, forwardedRef) => {\n const { vegaLiteSpec, selectedLegends = [] } = props.chartSchema;\n\n if (!vegaLiteSpec) {\n throw new Error('VegaDeclarativeChart: vegaLiteSpec is required in chartSchema');\n }\n\n // Guard against excessively deep JSON specs that could cause stack overflow / memory exhaustion\n validateJsonDepth(vegaLiteSpec);\n\n const colorMap = useColorMapping();\n const isDarkTheme = useIsDarkTheme();\n const chartRef = React.useRef<Chart>(null);\n\n const [activeLegends, setActiveLegends] = React.useState<string[]>(selectedLegends);\n\n const onActiveLegendsChange = (keys: string[]) => {\n setActiveLegends(keys);\n if (props.onSchemaChange) {\n props.onSchemaChange({ vegaLiteSpec, selectedLegends: keys });\n }\n };\n\n React.useEffect(() => {\n setActiveLegends(props.chartSchema.selectedLegends ?? []);\n }, [props.chartSchema.selectedLegends]);\n\n const multiSelectLegendProps = {\n canSelectMultipleLegends: true,\n onChange: onActiveLegendsChange,\n selectedLegends: activeLegends,\n };\n\n const interactiveCommonProps = {\n componentRef: chartRef,\n legendProps: multiSelectLegendProps,\n };\n\n try {\n // Check if this is a concat spec (multiple charts side-by-side or stacked)\n if (isHConcatSpec(vegaLiteSpec) || isVConcatSpec(vegaLiteSpec)) {\n const gridProps = getVegaConcatGridProperties(vegaLiteSpec);\n\n // Build shared legend from the first sub-chart's color encoding\n const firstSubSpec = {\n ...gridProps.specs[0],\n data: gridProps.specs[0].data || vegaLiteSpec.data,\n encoding: {\n ...(vegaLiteSpec.encoding || {}),\n ...(gridProps.specs[0].encoding || {}),\n },\n };\n const sharedLegendProps = getVegaLiteLegendsProps(firstSubSpec, colorMap, isDarkTheme);\n\n return (\n <div ref={forwardedRef} className={props.className} style={props.style}>\n <div\n style={{\n display: 'grid',\n gridTemplateRows: gridProps.templateRows,\n gridTemplateColumns: gridProps.templateColumns,\n gap: '16px',\n }}\n >\n {gridProps.specs.map((subSpec: VegaLiteSpec, index: number) => {\n // Compute default height for sub-charts\n const defaultSubHeight =\n typeof vegaLiteSpec.height === 'number'\n ? vegaLiteSpec.height\n : typeof subSpec.height === 'number'\n ? subSpec.height\n : 300;\n\n const mergedSpec = {\n ...subSpec,\n data: subSpec.data || vegaLiteSpec.data,\n encoding: {\n ...(vegaLiteSpec.encoding || {}),\n ...(subSpec.encoding || {}),\n },\n height: typeof subSpec.height === 'number' ? subSpec.height : defaultSubHeight,\n // Hide legends on ALL sub-charts — shared legend is rendered below\n _hideLegend: true,\n };\n\n const cellRow = gridProps.isHorizontal ? 1 : index + 1;\n const cellColumn = gridProps.isHorizontal ? index + 1 : 1;\n\n return (\n <div\n key={`chart_${index}`}\n style={{\n gridRowStart: cellRow,\n gridRowEnd: cellRow + 1,\n gridColumnStart: cellColumn,\n gridColumnEnd: cellColumn + 1,\n minWidth: 0,\n }}\n >\n {renderSingleChart(mergedSpec, colorMap, isDarkTheme, interactiveCommonProps)}\n </div>\n );\n })}\n </div>\n {sharedLegendProps.legends.length > 0 && <Legends {...sharedLegendProps} {...multiSelectLegendProps} />}\n </div>\n );\n }\n\n // Check if this is a layered spec (composite chart)\n if (vegaLiteSpec.layer && vegaLiteSpec.layer.length > 1) {\n // Check if it's a supported bar+line combo\n const marks = vegaLiteSpec.layer.map((layer: VegaLiteUnitSpec) => getMarkType(layer.mark));\n const hasBar = marks.includes('bar');\n const hasLine = marks.includes('line') || marks.includes('point');\n const isBarLineCombo = hasBar && hasLine;\n\n // Only warn for unsupported layered specs\n if (!isBarLineCombo) {\n // Layered specifications with multiple chart types are not fully supported.\n // Only the first layer will be rendered.\n }\n }\n\n // Render single chart\n const chartComponent = renderSingleChart(vegaLiteSpec, colorMap, isDarkTheme, interactiveCommonProps);\n\n return (\n <div ref={forwardedRef} className={props.className} style={props.style}>\n {chartComponent}\n </div>\n );\n } catch (error) {\n throw new Error(`Failed to transform Vega-Lite spec: ${error}`);\n }\n },\n);\n\nVegaDeclarativeChart.displayName = 'VegaDeclarativeChart';\n"],"names":["React","transformVegaLiteToLineChartProps","transformVegaLiteToVerticalBarChartProps","transformVegaLiteToVerticalStackedBarChartProps","transformVegaLiteToGroupedVerticalBarChartProps","transformVegaLiteToHorizontalBarChartProps","transformVegaLiteToAreaChartProps","transformVegaLiteToScatterChartProps","transformVegaLiteToDonutChartProps","transformVegaLiteToHeatMapChartProps","transformVegaLiteToHistogramProps","transformVegaLiteToPolarChartProps","getChartType","getMarkType","getVegaLiteLegendsProps","Legends","withResponsiveContainer","LineChart","VerticalBarChart","VerticalStackedBarChart","GroupedVerticalBarChart","HorizontalBarChartWithAxis","AreaChart","ScatterChart","DonutChart","HeatMapChart","PolarChart","useIsDarkTheme","useColorMapping","MAX_DEPTH","validateJsonDepth","value","depth","Error","key","Object","keys","isHConcatSpec","spec","hconcat","Array","isArray","length","isVConcatSpec","vconcat","getVegaConcatGridProperties","templateRows","templateColumns","isHorizontal","specs","ResponsiveLineChart","ResponsiveVerticalBarChart","ResponsiveVerticalStackedBarChart","ResponsiveGroupedVerticalBarChart","ResponsiveHorizontalBarChartWithAxis","ResponsiveAreaChart","ResponsiveScatterChart","ResponsiveDonutChart","ResponsiveHeatMapChart","ResponsivePolarChart","vegaChartMap","line","transformer","renderer","bar","area","scatter","donut","heatmap","histogram","polar","renderSingleChart","colorMap","isDarkTheme","interactiveCommonProps","chartType","chartConfig","type","ChartRenderer","chartProps","_hideLegend","hideLegend","VegaDeclarativeChart","forwardRef","props","forwardedRef","vegaLiteSpec","selectedLegends","chartSchema","chartRef","useRef","activeLegends","setActiveLegends","useState","onActiveLegendsChange","onSchemaChange","useEffect","multiSelectLegendProps","canSelectMultipleLegends","onChange","componentRef","legendProps","gridProps","firstSubSpec","data","encoding","sharedLegendProps","div","ref","className","style","display","gridTemplateRows","gridTemplateColumns","gap","map","subSpec","index","defaultSubHeight","height","mergedSpec","cellRow","cellColumn","gridRowStart","gridRowEnd","gridColumnStart","gridColumnEnd","minWidth","legends","layer","marks","mark","hasBar","includes","hasLine","isBarLineCombo","chartComponent","error","displayName"],"mappings":"AAAA;;;;;+BAoYakF;;;;;;;iEAlYU,QAAQ;uCAgBxB,0BAA0B;uBAET,mBAAmB;yCACH,iDAAiD;wBAC/D,qBAAqB;wBACd,4BAA4B;wBACrB,mCAAmC;wBACnC,mCAAmC;wBAChC,sCAAsC;wBACvD,qBAAqB;wBAClB,wBAAwB;wBAC1B,sBAAsB;wBACpB,wBAAwB;yBAC1B,sBAAsB;2CACD,8BAA8B;AAM9E;;;CAGC,GACD,MAAMrD,YAAY;AAElB;;;CAGC,GACD,SAASC,kBAAkBC,KAAc,EAAEC,QAAgB,CAAC;IAC1D,IAAIA,QAAQH,WAAW;QACrB,MAAM,IAAII,MAAM;IAClB;IACA,IAAIF,UAAU,QAAQ,OAAOA,UAAU,UAAU;QAC/C,KAAK,MAAMG,OAAOC,OAAOC,IAAI,CAACL,OAAmC;YAC/DD,kBAAmBC,KAAiC,CAACG,IAAI,EAAEF,QAAQ;QACrE;IACF;AACF;AA4CA;;CAEC,GACD,SAASK,cA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mF,OAAO;oBACrBP,OAAO;wBACLa,cAAcF;wBACdG,YAAYH,UAAU;wBACtBI,iBAAiBH;wBACjBI,eAAeJ,aAAa;wBAC5BK,UAAU;oBACZ;mBAECxD,kBAAkBiD,YAAYhD,UAAUC,aAAaC;YAG5D,KAEDgC,kBAAkBsB,OAAO,CAACtF,MAAM,GAAG,KAAA,WAAA,GAAK,OAAA,aAAA,CAAC3B,cAAAA,EAAAA;gBAAS,GAAG2F,iBAAiB;gBAAG,GAAGT,sBAAsB;;QAGzG;QAEA,oDAAoD;QACpD,IAAIX,aAAa2C,KAAK,IAAI3C,aAAa2C,KAAK,CAACvF,MAAM,GAAG,GAAG;YACvD,2CAA2C;YAC3C,MAAMwF,QAAQ5C,aAAa2C,KAAK,CAACd,GAAG,CAAC,CAACc,QAA4BpH,sCAAAA,EAAYoH,MAAME,IAAI;YACxF,MAAMC,SAASF,MAAMG,QAAQ,CAAC;YAC9B,MAAMC,UAAUJ,MAAMG,QAAQ,CAAC,WAAWH,MAAMG,QAAQ,CAAC;YACzD,MAAME,iBAAiBH,UAAUE;YAEjC,0CAA0C;YAC1C,IAAI,CAACC,gBAAgB;YACnB,4EAA4E;YAC5E,yCAAyC;YAC3C;QACF;QAEA,sBAAsB;QACtB,MAAMC,iBAAiBjE,kBAAkBe,cAAcd,UAAUC,aAAaC;QAE9E,OAAA,WAAA,GACE,OAAA,aAAA,CAACiC,OAAAA;YAAIC,KAAKvB;YAAcwB,WAAWzB,MAAMyB,SAAS;YAAEC,OAAO1B,MAAM0B,KAAK;WACnE0B;IAGP,EAAE,OAAOC,OAAO;QACd,MAAM,IAAIxG,MAAM,CAAC,oCAAoC,EAAEwG,OAAO;IAChE;AACF,GACA;AAEFvD,qBAAqBwD,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/VegaDeclarativeChart/VegaDeclarativeChart.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n transformVegaLiteToLineChartProps,\n transformVegaLiteToVerticalBarChartProps,\n transformVegaLiteToVerticalStackedBarChartProps,\n transformVegaLiteToGroupedVerticalBarChartProps,\n transformVegaLiteToHorizontalBarChartProps,\n transformVegaLiteToAreaChartProps,\n transformVegaLiteToScatterChartProps,\n transformVegaLiteToDonutChartProps,\n transformVegaLiteToHeatMapChartProps,\n transformVegaLiteToHistogramProps,\n transformVegaLiteToPolarChartProps,\n getChartType,\n getMarkType,\n getVegaLiteLegendsProps,\n} from './VegaLiteSchemaAdapter';\nimport type { VegaLiteUnitSpec, VegaLiteSpec } from './VegaLiteTypes';\nimport { Legends } from '../Legends/index';\nimport { withResponsiveContainer } from '../ResponsiveContainer/withResponsiveContainer';\nimport { LineChart } from '../LineChart/index';\nimport { VerticalBarChart } from '../VerticalBarChart/index';\nimport { VerticalStackedBarChart } from '../VerticalStackedBarChart/index';\nimport { GroupedVerticalBarChart } from '../GroupedVerticalBarChart/index';\nimport { HorizontalBarChartWithAxis } from '../HorizontalBarChartWithAxis/index';\nimport { AreaChart } from '../AreaChart/index';\nimport { ScatterChart } from '../ScatterChart/index';\nimport { DonutChart } from '../DonutChart/index';\nimport { HeatMapChart } from '../HeatMapChart/index';\nimport { PolarChart } from '../PolarChart/index';\nimport { useIsDarkTheme, useColorMapping } from './VegaDeclarativeChartHooks';\nimport type { Chart } from '../../types/index';\n\n// Re-export the typed VegaLiteSpec for public API\nexport type { VegaLiteSpec } from './VegaLiteTypes';\n\n/**\n * Maximum allowed nesting depth for incoming JSON specs.\n * Matches the Plotly adapter's MAX_DEPTH to prevent stack overflow / memory exhaustion.\n */\nconst MAX_DEPTH = 15;\n\n/**\n * Validates that a JSON value does not exceed the maximum nesting depth.\n * Throws if the depth limit is exceeded (same behavior as Plotly's sanitizeJson).\n */\nfunction validateJsonDepth(value: unknown, depth: number = 0): void {\n if (depth > MAX_DEPTH) {\n throw new Error('VegaDeclarativeChart: Maximum JSON depth exceeded');\n }\n if (value !== null && typeof value === 'object') {\n for (const key of Object.keys(value as Record<string, unknown>)) {\n validateJsonDepth((value as Record<string, unknown>)[key], depth + 1);\n }\n }\n}\n\n/**\n * Schema for VegaDeclarativeChart component\n */\nexport interface VegaSchema {\n /**\n * Vega-Lite specification\n *\n * @see https://vega.github.io/vega-lite/docs/spec.html\n */\n vegaLiteSpec: VegaLiteSpec;\n\n /**\n * Selected legends for filtering\n */\n selectedLegends?: string[];\n}\n\n/**\n * Props for VegaDeclarativeChart component\n */\nexport interface VegaDeclarativeChartProps {\n /**\n * Vega-Lite chart schema\n */\n chartSchema: VegaSchema;\n\n /**\n * Callback when schema changes (e.g., legend selection)\n */\n onSchemaChange?: (newSchema: VegaSchema) => void;\n\n /**\n * Additional CSS class name\n */\n className?: string;\n\n /**\n * Additional inline styles\n */\n style?: React.CSSProperties;\n}\n\n/**\n * Check if spec is a horizontal concatenation\n */\nfunction isHConcatSpec(spec: VegaLiteSpec): boolean {\n return !!spec.hconcat && Array.isArray(spec.hconcat) && spec.hconcat.length > 0;\n}\n\n/**\n * Check if spec is a vertical concatenation\n */\nfunction isVConcatSpec(spec: VegaLiteSpec): boolean {\n return !!spec.vconcat && Array.isArray(spec.vconcat) && spec.vconcat.length > 0;\n}\n\n/**\n * Get grid properties for concat specs\n */\nfunction getVegaConcatGridProperties(spec: VegaLiteSpec): {\n templateRows: string;\n templateColumns: string;\n isHorizontal: boolean;\n specs: VegaLiteSpec[];\n} {\n if (isHConcatSpec(spec)) {\n return {\n templateRows: 'auto',\n templateColumns: `repeat(${spec.hconcat!.length}, 1fr)`,\n isHorizontal: true,\n specs: spec.hconcat!,\n };\n }\n\n if (isVConcatSpec(spec)) {\n return {\n templateRows: `repeat(${spec.vconcat!.length}, auto)`,\n templateColumns: '1fr',\n isHorizontal: false,\n specs: spec.vconcat!,\n };\n }\n\n return {\n templateRows: '1fr',\n templateColumns: '1fr',\n isHorizontal: false,\n specs: [spec],\n };\n}\n\nconst ResponsiveLineChart = withResponsiveContainer(LineChart);\nconst ResponsiveVerticalBarChart = withResponsiveContainer(VerticalBarChart);\nconst ResponsiveVerticalStackedBarChart = withResponsiveContainer(VerticalStackedBarChart);\nconst ResponsiveGroupedVerticalBarChart = withResponsiveContainer(GroupedVerticalBarChart);\nconst ResponsiveHorizontalBarChartWithAxis = withResponsiveContainer(HorizontalBarChartWithAxis);\nconst ResponsiveAreaChart = withResponsiveContainer(AreaChart);\nconst ResponsiveScatterChart = withResponsiveContainer(ScatterChart);\nconst ResponsiveDonutChart = withResponsiveContainer(DonutChart);\nconst ResponsiveHeatMapChart = withResponsiveContainer(HeatMapChart);\nconst ResponsivePolarChart = withResponsiveContainer(PolarChart);\n\n/**\n * Chart type mapping with transformers and renderers\n * Follows the factory functor pattern from PlotlyDeclarativeChart\n */\ntype VegaChartTypeMap = {\n line: { transformer: typeof transformVegaLiteToLineChartProps; renderer: typeof ResponsiveLineChart };\n bar: { transformer: typeof transformVegaLiteToVerticalBarChartProps; renderer: typeof ResponsiveVerticalBarChart };\n 'stacked-bar': {\n transformer: typeof transformVegaLiteToVerticalStackedBarChartProps;\n renderer: typeof ResponsiveVerticalStackedBarChart;\n };\n 'grouped-bar': {\n transformer: typeof transformVegaLiteToGroupedVerticalBarChartProps;\n renderer: typeof ResponsiveGroupedVerticalBarChart;\n };\n 'horizontal-bar': {\n transformer: typeof transformVegaLiteToHorizontalBarChartProps;\n renderer: typeof ResponsiveHorizontalBarChartWithAxis;\n };\n area: { transformer: typeof transformVegaLiteToAreaChartProps; renderer: typeof ResponsiveAreaChart };\n scatter: { transformer: typeof transformVegaLiteToScatterChartProps; renderer: typeof ResponsiveScatterChart };\n donut: { transformer: typeof transformVegaLiteToDonutChartProps; renderer: typeof ResponsiveDonutChart };\n heatmap: { transformer: typeof transformVegaLiteToHeatMapChartProps; renderer: typeof ResponsiveHeatMapChart };\n histogram: { transformer: typeof transformVegaLiteToHistogramProps; renderer: typeof ResponsiveVerticalBarChart };\n polar: { transformer: typeof transformVegaLiteToPolarChartProps; renderer: typeof ResponsivePolarChart };\n};\n\nconst vegaChartMap: VegaChartTypeMap = {\n line: { transformer: transformVegaLiteToLineChartProps, renderer: ResponsiveLineChart },\n bar: { transformer: transformVegaLiteToVerticalBarChartProps, renderer: ResponsiveVerticalBarChart },\n 'stacked-bar': {\n transformer: transformVegaLiteToVerticalStackedBarChartProps,\n renderer: ResponsiveVerticalStackedBarChart,\n },\n 'grouped-bar': {\n transformer: transformVegaLiteToGroupedVerticalBarChartProps,\n renderer: ResponsiveGroupedVerticalBarChart,\n },\n 'horizontal-bar': {\n transformer: transformVegaLiteToHorizontalBarChartProps,\n renderer: ResponsiveHorizontalBarChartWithAxis,\n },\n area: { transformer: transformVegaLiteToAreaChartProps, renderer: ResponsiveAreaChart },\n scatter: { transformer: transformVegaLiteToScatterChartProps, renderer: ResponsiveScatterChart },\n donut: { transformer: transformVegaLiteToDonutChartProps, renderer: ResponsiveDonutChart },\n heatmap: { transformer: transformVegaLiteToHeatMapChartProps, renderer: ResponsiveHeatMapChart },\n histogram: { transformer: transformVegaLiteToHistogramProps, renderer: ResponsiveVerticalBarChart },\n polar: { transformer: transformVegaLiteToPolarChartProps, renderer: ResponsivePolarChart },\n};\n\ninterface MultiSelectLegendProps {\n canSelectMultipleLegends: boolean;\n onChange: (keys: string[]) => void;\n selectedLegends: string[];\n}\n\n/**\n * Renders a single Vega-Lite chart spec\n */\nfunction renderSingleChart(\n spec: VegaLiteSpec,\n colorMap: React.RefObject<Map<string, string>>,\n isDarkTheme: boolean,\n interactiveCommonProps: { componentRef: React.RefObject<Chart | null>; legendProps: MultiSelectLegendProps },\n): React.ReactElement {\n const chartType = getChartType(spec);\n const chartConfig = vegaChartMap[chartType.type];\n\n if (!chartConfig) {\n throw new Error(`VegaDeclarativeChart: Unsupported chart type '${chartType.type}'`);\n }\n\n const { transformer, renderer: ChartRenderer } = chartConfig;\n const chartProps = transformer(spec, colorMap, isDarkTheme) as Record<string, unknown>;\n\n // For hconcat/vconcat sub-charts, hide per-chart legends (shared legend rendered separately)\n if ((spec as Record<string, unknown>)._hideLegend) {\n chartProps.hideLegend = true;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return <ChartRenderer {...(chartProps as any)} {...interactiveCommonProps} />;\n}\n\n/**\n * VegaDeclarativeChart - Render Vega-Lite specifications with Fluent UI styling\n *\n * Supported chart types:\n * - Line charts: mark: 'line' or 'point'\n * - Area charts: mark: 'area'\n * - Scatter charts: mark: 'point', 'circle', or 'square'\n * - Vertical bar charts: mark: 'bar' with nominal/ordinal x-axis\n * - Stacked bar charts: mark: 'bar' with color encoding\n * - Grouped bar charts: mark: 'bar' with color encoding (via configuration)\n * - Horizontal bar charts: mark: 'bar' with nominal/ordinal y-axis\n * - Donut/Pie charts: mark: 'arc' with theta encoding\n * - Heatmaps: mark: 'rect' with x, y, and color (quantitative) encodings\n * - Combo charts: Layered specs with bar + line marks render as VerticalStackedBarChart with line overlays\n *\n * Multi-plot Support:\n * - Horizontal concatenation (hconcat): Multiple charts side-by-side\n * - Vertical concatenation (vconcat): Multiple charts stacked vertically\n * - Shared data and encoding are merged from parent spec to each subplot\n *\n * Limitations:\n * - Most layered specifications (multiple chart types) are not fully supported\n * - Bar + Line combinations ARE supported and will render properly\n * - For other composite charts, only the first layer will be rendered\n * - Faceting and repeat operators are not yet supported\n * - Funnel charts are not a native Vega-Lite mark type. The conversion_funnel.json example\n * uses a horizontal bar chart (y: nominal, x: quantitative) which is the standard way to\n * represent funnel data in Vega-Lite. For specialized funnel visualizations with tapering\n * shapes, consider using Plotly's native funnel chart type instead.\n *\n * Note: Sankey, Gantt, and Gauge charts are not standard Vega-Lite marks.\n * These specialized visualizations would require custom extensions or alternative approaches.\n *\n * @example Line Chart\n * ```tsx\n * import { VegaDeclarativeChart } from '@fluentui/react-charts';\n *\n * const spec = {\n * mark: 'line',\n * data: { values: [{ x: 1, y: 10 }, { x: 2, y: 20 }] },\n * encoding: {\n * x: { field: 'x', type: 'quantitative' },\n * y: { field: 'y', type: 'quantitative' }\n * }\n * };\n *\n * <VegaDeclarativeChart chartSchema={{ vegaLiteSpec: spec }} />\n * ```\n *\n * @example Area Chart\n * ```tsx\n * const areaSpec = {\n * mark: 'area',\n * data: { values: [{ date: '2023-01', value: 100 }, { date: '2023-02', value: 150 }] },\n * encoding: {\n * x: { field: 'date', type: 'temporal' },\n * y: { field: 'value', type: 'quantitative' }\n * }\n * };\n *\n * <VegaDeclarativeChart chartSchema={{ vegaLiteSpec: areaSpec }} />\n * ```\n *\n * @example Scatter Chart\n * ```tsx\n * const scatterSpec = {\n * mark: 'point',\n * data: { values: [{ x: 10, y: 20, size: 100 }, { x: 15, y: 30, size: 200 }] },\n * encoding: {\n * x: { field: 'x', type: 'quantitative' },\n * y: { field: 'y', type: 'quantitative' },\n * size: { field: 'size', type: 'quantitative' }\n * }\n * };\n *\n * <VegaDeclarativeChart chartSchema={{ vegaLiteSpec: scatterSpec }} />\n * ```\n *\n * @example Vertical Bar Chart\n * ```tsx\n * const barSpec = {\n * mark: 'bar',\n * data: { values: [{ cat: 'A', val: 28 }, { cat: 'B', val: 55 }] },\n * encoding: {\n * x: { field: 'cat', type: 'nominal' },\n * y: { field: 'val', type: 'quantitative' }\n * }\n * };\n *\n * <VegaDeclarativeChart chartSchema={{ vegaLiteSpec: barSpec }} />\n * ```\n *\n * @example Stacked Bar Chart\n * ```tsx\n * const stackedSpec = {\n * mark: 'bar',\n * data: { values: [\n * { cat: 'A', group: 'G1', val: 28 },\n * { cat: 'A', group: 'G2', val: 15 }\n * ]},\n * encoding: {\n * x: { field: 'cat', type: 'nominal' },\n * y: { field: 'val', type: 'quantitative' },\n * color: { field: 'group', type: 'nominal' }\n * }\n * };\n *\n * <VegaDeclarativeChart chartSchema={{ vegaLiteSpec: stackedSpec }} />\n * ```\n *\n * @example Donut Chart\n * ```tsx\n * const donutSpec = {\n * mark: 'arc',\n * data: { values: [{ category: 'A', value: 30 }, { category: 'B', value: 70 }] },\n * encoding: {\n * theta: { field: 'value', type: 'quantitative' },\n * color: { field: 'category', type: 'nominal' }\n * }\n * };\n *\n * <VegaDeclarativeChart chartSchema={{ vegaLiteSpec: donutSpec }} />\n * ```\n *\n * @example Heatmap\n * ```tsx\n * const heatmapSpec = {\n * mark: 'rect',\n * data: { values: [\n * { x: 'A', y: 'Mon', value: 28 },\n * { x: 'B', y: 'Mon', value: 55 },\n * { x: 'A', y: 'Tue', value: 43 }\n * ]},\n * encoding: {\n * x: { field: 'x', type: 'nominal' },\n * y: { field: 'y', type: 'nominal' },\n * color: { field: 'value', type: 'quantitative' }\n * }\n * };\n *\n * <VegaDeclarativeChart chartSchema={{ vegaLiteSpec: heatmapSpec }} />\n * ```\n */\nexport const VegaDeclarativeChart = React.forwardRef<HTMLDivElement, VegaDeclarativeChartProps>(\n (props, forwardedRef) => {\n const { vegaLiteSpec, selectedLegends = [] } = props.chartSchema;\n\n if (!vegaLiteSpec) {\n throw new Error('VegaDeclarativeChart: vegaLiteSpec is required in chartSchema');\n }\n\n // Guard against excessively deep JSON specs that could cause stack overflow / memory exhaustion\n validateJsonDepth(vegaLiteSpec);\n\n const colorMap = useColorMapping();\n const isDarkTheme = useIsDarkTheme();\n const chartRef = React.useRef<Chart>(null);\n\n const [activeLegends, setActiveLegends] = React.useState<string[]>(selectedLegends);\n\n const onActiveLegendsChange = (keys: string[]) => {\n setActiveLegends(keys);\n if (props.onSchemaChange) {\n props.onSchemaChange({ vegaLiteSpec, selectedLegends: keys });\n }\n };\n\n React.useEffect(() => {\n setActiveLegends(props.chartSchema.selectedLegends ?? []);\n }, [props.chartSchema.selectedLegends]);\n\n const multiSelectLegendProps = {\n canSelectMultipleLegends: true,\n onChange: onActiveLegendsChange,\n selectedLegends: activeLegends,\n };\n\n const interactiveCommonProps = {\n componentRef: chartRef,\n legendProps: multiSelectLegendProps,\n };\n\n try {\n // Check if this is a concat spec (multiple charts side-by-side or stacked)\n if (isHConcatSpec(vegaLiteSpec) || isVConcatSpec(vegaLiteSpec)) {\n const gridProps = getVegaConcatGridProperties(vegaLiteSpec);\n\n // Build shared legend from the first sub-chart's color encoding\n const firstSubSpec = {\n ...gridProps.specs[0],\n data: gridProps.specs[0].data || vegaLiteSpec.data,\n encoding: {\n ...(vegaLiteSpec.encoding || {}),\n ...(gridProps.specs[0].encoding || {}),\n },\n };\n const sharedLegendProps = getVegaLiteLegendsProps(firstSubSpec, colorMap, isDarkTheme);\n\n return (\n <div ref={forwardedRef} className={props.className} style={props.style}>\n <div\n style={{\n display: 'grid',\n gridTemplateRows: gridProps.templateRows,\n gridTemplateColumns: gridProps.templateColumns,\n gap: '16px',\n }}\n >\n {gridProps.specs.map((subSpec: VegaLiteSpec, index: number) => {\n // Compute default height for sub-charts\n const defaultSubHeight =\n typeof vegaLiteSpec.height === 'number'\n ? vegaLiteSpec.height\n : typeof subSpec.height === 'number'\n ? subSpec.height\n : 300;\n\n const mergedSpec = {\n ...subSpec,\n data: subSpec.data || vegaLiteSpec.data,\n encoding: {\n ...(vegaLiteSpec.encoding || {}),\n ...(subSpec.encoding || {}),\n },\n height: typeof subSpec.height === 'number' ? subSpec.height : defaultSubHeight,\n // Hide legends on ALL sub-charts — shared legend is rendered below\n _hideLegend: true,\n };\n\n const cellRow = gridProps.isHorizontal ? 1 : index + 1;\n const cellColumn = gridProps.isHorizontal ? index + 1 : 1;\n\n return (\n <div\n key={`chart_${index}`}\n style={{\n gridRowStart: cellRow,\n gridRowEnd: cellRow + 1,\n gridColumnStart: cellColumn,\n gridColumnEnd: cellColumn + 1,\n minWidth: 0,\n }}\n >\n {renderSingleChart(mergedSpec, colorMap, isDarkTheme, interactiveCommonProps)}\n </div>\n );\n })}\n </div>\n {sharedLegendProps.legends.length > 0 && <Legends {...sharedLegendProps} {...multiSelectLegendProps} />}\n </div>\n );\n }\n\n // Check if this is a layered spec (composite chart)\n if (vegaLiteSpec.layer && vegaLiteSpec.layer.length > 1) {\n // Check if it's a supported bar+line combo\n const marks = vegaLiteSpec.layer.map((layer: VegaLiteUnitSpec) => getMarkType(layer.mark));\n const hasBar = marks.includes('bar');\n const hasLine = marks.includes('line') || marks.includes('point');\n const isBarLineCombo = hasBar && hasLine;\n\n // Only warn for unsupported layered specs\n if (!isBarLineCombo) {\n // Layered specifications with multiple chart types are not fully supported.\n // Only the first layer will be rendered.\n }\n }\n\n // Render single chart\n const chartComponent = renderSingleChart(vegaLiteSpec, colorMap, isDarkTheme, interactiveCommonProps);\n\n return (\n <div ref={forwardedRef} className={props.className} style={props.style}>\n {chartComponent}\n </div>\n );\n } catch (error) {\n throw new Error(`Failed to transform Vega-Lite spec: ${error}`);\n }\n },\n);\n\nVegaDeclarativeChart.displayName = 'VegaDeclarativeChart';\n"],"names":["React","transformVegaLiteToLineChartProps","transformVegaLiteToVerticalBarChartProps","transformVegaLiteToVerticalStackedBarChartProps","transformVegaLiteToGroupedVerticalBarChartProps","transformVegaLiteToHorizontalBarChartProps","transformVegaLiteToAreaChartProps","transformVegaLiteToScatterChartProps","transformVegaLiteToDonutChartProps","transformVegaLiteToHeatMapChartProps","transformVegaLiteToHistogramProps","transformVegaLiteToPolarChartProps","getChartType","getMarkType","getVegaLiteLegendsProps","Legends","withResponsiveContainer","LineChart","VerticalBarChart","VerticalStackedBarChart","GroupedVerticalBarChart","HorizontalBarChartWithAxis","AreaChart","ScatterChart","DonutChart","HeatMapChart","PolarChart","useIsDarkTheme","useColorMapping","MAX_DEPTH","validateJsonDepth","value","depth","Error","key","Object","keys","isHConcatSpec","spec","hconcat","Array","isArray","length","isVConcatSpec","vconcat","getVegaConcatGridProperties","templateRows","templateColumns","isHorizontal","specs","ResponsiveLineChart","ResponsiveVerticalBarChart","ResponsiveVerticalStackedBarChart","ResponsiveGroupedVerticalBarChart","ResponsiveHorizontalBarChartWithAxis","ResponsiveAreaChart","ResponsiveScatterChart","ResponsiveDonutChart","ResponsiveHeatMapChart","ResponsivePolarChart","vegaChartMap","line","transformer","renderer","bar","area","scatter","donut","heatmap","histogram","polar","renderSingleChart","colorMap","isDarkTheme","interactiveCommonProps","chartType","chartConfig","type","ChartRenderer","chartProps","_hideLegend","hideLegend","VegaDeclarativeChart","forwardRef","props","forwardedRef","vegaLiteSpec","selectedLegends","chartSchema","chartRef","useRef","activeLegends","setActiveLegends","useState","onActiveLegendsChange","onSchemaChange","useEffect","multiSelectLegendProps","canSelectMultipleLegends","onChange","componentRef","legendProps","gridProps","firstSubSpec","data","encoding","sharedLegendProps","div","ref","className","style","display","gridTemplateRows","gridTemplateColumns","gap","map","subSpec","index","defaultSubHeight","height","mergedSpec","cellRow","cellColumn","gridRowStart","gridRowEnd","gridColumnStart","gridColumnEnd","minWidth","legends","layer","marks","mark","hasBar","includes","hasLine","isBarLineCombo","chartComponent","error","displayName"],"mappings":"AAAA;;;;;+BAoYakF;;;;;;;iEAlYU,QAAQ;uCAgBxB,6BAA0B;uBAET,sBAAmB;yCACH,oDAAiD;wBAC/D,wBAAqB;wBACd,+BAA4B;wBACrB,sCAAmC;wBACnC,sCAAmC;wBAChC,yCAAsC;wBACvD,wBAAqB;wBAClB,2BAAwB;wBAC1B,yBAAsB;wBACpB,2BAAwB;yBAC1B,yBAAsB;2CACD,iCAA8B;AAM9E;;;CAGC,GACD,MAAMrD,YAAY;AAElB;;;CAGC,GACD,SAASC,kBAAkBC,KAAc,EAAEC,QAAgB,CAAC;IAC1D,IAAIA,QAAQH,WAAW;QACrB,MAAM,IAAII,MAAM;IAClB;IACA,IAAIF,UAAU,QAAQ,OAAOA,UAAU,UAAU;QAC/C,KAAK,MAAMG,OAAOC,OAAOC,IAAI,CAACL,OAAmC;YAC/DD,kBAAmBC,KAAiC,CAACG,IAAI,EAAEF,QAAQ;QACrE;IACF;AACF;AA4CA;;CAEC,GACD,SAASK,cAAcC,IAAkB;IACvC,OAAO,CAAC,CAACA,KAAKC,OAAO,IAAIC,MAAMC,OAAO,CAACH,KAAKC,OAAO,KAAKD,KAAKC,OAAO,CAACG,MAAM,GAAG;AAChF;AAEA;;CAEC,GACD,SAASC,cAAcL,IAAkB;IACvC,OAAO,CAAC,CAACA,KAAKM,OAAO,IAAIJ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,KAAA,WAAA,GAAK,OAAA,aAAA,CAAC3B,cAAAA,EAAAA;gBAAS,GAAG2F,iBAAiB;gBAAG,GAAGT,sBAAsB;;QAGzG;QAEA,oDAAoD;QACpD,IAAIX,aAAa2C,KAAK,IAAI3C,aAAa2C,KAAK,CAACvF,MAAM,GAAG,GAAG;YACvD,2CAA2C;YAC3C,MAAMwF,QAAQ5C,aAAa2C,KAAK,CAACd,GAAG,CAAC,CAACc,QAA4BpH,sCAAAA,EAAYoH,MAAME,IAAI;YACxF,MAAMC,SAASF,MAAMG,QAAQ,CAAC;YAC9B,MAAMC,UAAUJ,MAAMG,QAAQ,CAAC,WAAWH,MAAMG,QAAQ,CAAC;YACzD,MAAME,iBAAiBH,UAAUE;YAEjC,0CAA0C;YAC1C,IAAI,CAACC,gBAAgB;YACnB,4EAA4E;YAC5E,yCAAyC;YAC3C;QACF;QAEA,sBAAsB;QACtB,MAAMC,iBAAiBjE,kBAAkBe,cAAcd,UAAUC,aAAaC;QAE9E,OAAA,WAAA,GACE,OAAA,aAAA,CAACiC,OAAAA;YAAIC,KAAKvB;YAAcwB,WAAWzB,MAAMyB,SAAS;YAAEC,OAAO1B,MAAM0B,KAAK;WACnE0B;IAGP,EAAE,OAAOC,OAAO;QACd,MAAM,IAAIxG,MAAM,CAAC,oCAAoC,EAAEwG,OAAO;IAChE;AACF,GACA;AAEFvD,qBAAqBwD,WAAW,GAAG"}
@@ -22,8 +22,8 @@ _export(exports, {
22
22
  return isStandardVegaScheme;
23
23
  }
24
24
  });
25
- const _colors = require("../../utilities/colors");
26
- const _utilities = require("../../utilities/utilities");
25
+ const _colors = require("../../utilities/colors.cjs");
26
+ const _utilities = require("../../utilities/utilities.cjs");
27
27
  /**
28
28
  * Vega-Lite Color Scheme to Fluent DataViz Palette Adapter
29
29
  *
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/VegaDeclarativeChart/VegaLiteColorAdapter.ts"],"sourcesContent":["import { DataVizPalette, getColorFromToken, getNextColor } from '../../utilities/colors';\nimport { areArraysEqual } from '../../utilities/utilities';\n\n/**\n * A ref-like object holding a mutable Map of legend-label to color.\n * Structurally compatible with React.RefObject<Map<string, string>>.\n */\nexport type ColorMapRef = { readonly current: Map<string, string> | null };\n\n/**\n * Vega-Lite Color Scheme to Fluent DataViz Palette Adapter\n *\n * Maps standard Vega-Lite color schemes to Fluent UI DataViz colors\n * Similar to PlotlyColorAdapter but for Vega-Lite specifications\n */\n\n// Vega's category10 scheme (D3 Category10)\n// https://vega.github.io/vega/docs/schemes/#categorical\nconst VEGA_CATEGORY10 = [\n '#1f77b4', // blue\n '#ff7f0e', // orange\n '#2ca02c', // green\n '#d62728', // red\n '#9467bd', // purple\n '#8c564b', // brown\n '#e377c2', // pink\n '#7f7f7f', // gray\n '#bcbd22', // olive\n '#17becf', // cyan\n];\n\n// Vega's category20 scheme\nconst VEGA_CATEGORY20 = [\n '#1f77b4',\n '#aec7e8', // blue shades\n '#ff7f0e',\n '#ffbb78', // orange shades\n '#2ca02c',\n '#98df8a', // green shades\n '#d62728',\n '#ff9896', // red shades\n '#9467bd',\n '#c5b0d5', // purple shades\n '#8c564b',\n '#c49c94', // brown shades\n '#e377c2',\n '#f7b6d2', // pink shades\n '#7f7f7f',\n '#c7c7c7', // gray shades\n '#bcbd22',\n '#dbdb8d', // olive shades\n '#17becf',\n '#9edae5', // cyan shades\n];\n\n// Tableau10 scheme (commonly used in Vega-Lite)\nconst VEGA_TABLEAU10 = [\n '#4e79a7', // blue\n '#f28e2c', // orange\n '#e15759', // red\n '#76b7b2', // teal\n '#59a14f', // green\n '#edc949', // yellow\n '#af7aa1', // purple\n '#ff9da7', // pink\n '#9c755f', // brown\n '#bab0ab', // gray\n];\n\n// Tableau20 scheme\nconst VEGA_TABLEAU20 = [\n '#4e79a7',\n '#a0cbe8', // blue shades\n '#f28e2c',\n '#ffbe7d', // orange shades\n '#59a14f',\n '#8cd17d', // green shades\n '#b6992d',\n '#f1ce63', // yellow shades\n '#499894',\n '#86bcb6', // teal shades\n '#e15759',\n '#ff9d9a', // red shades\n '#79706e',\n '#bab0ab', // gray shades\n '#d37295',\n '#fabfd2', // pink shades\n '#b07aa1',\n '#d4a6c8', // purple shades\n '#9d7660',\n '#d7b5a6', // brown shades\n];\n\n// Mapping from Vega category10 to Fluent DataViz tokens\nconst CATEGORY10_FLUENT_MAPPING: string[] = [\n DataVizPalette.color26, // blue -> lightBlue.shade10\n DataVizPalette.warning, // orange -> semantic warning\n DataVizPalette.color5, // green -> lightGreen.primary\n DataVizPalette.error, // red -> semantic error\n DataVizPalette.color4, // purple -> orchid.tint10\n DataVizPalette.color17, // brown -> pumpkin.shade20\n DataVizPalette.color22, // pink -> hotPink.tint20\n DataVizPalette.disabled, // gray -> semantic disabled\n DataVizPalette.color10, // olive/yellow-green -> gold.shade10\n DataVizPalette.color3, // cyan/teal -> teal.tint20\n];\n\n// Mapping from Vega category20 to Fluent DataViz tokens\nconst CATEGORY20_FLUENT_MAPPING: string[] = [\n DataVizPalette.color26,\n DataVizPalette.color36, // blue shades\n DataVizPalette.warning,\n DataVizPalette.color27, // orange shades\n DataVizPalette.color5,\n DataVizPalette.color15, // green shades\n DataVizPalette.error,\n DataVizPalette.color32, // red shades\n DataVizPalette.color4,\n DataVizPalette.color24, // purple shades\n DataVizPalette.color17,\n DataVizPalette.color37, // brown shades\n DataVizPalette.color22,\n DataVizPalette.color12, // pink shades\n DataVizPalette.disabled,\n DataVizPalette.color31, // gray shades\n DataVizPalette.color10,\n DataVizPalette.color30, // olive shades\n DataVizPalette.color3,\n DataVizPalette.color13, // cyan shades\n];\n\n// Mapping from Tableau10 to Fluent DataViz tokens\nconst TABLEAU10_FLUENT_MAPPING: string[] = [\n DataVizPalette.color1, // blue -> cornflower.tint10\n DataVizPalette.color7, // orange -> pumpkin.primary\n DataVizPalette.error, // red -> semantic error\n DataVizPalette.color3, // teal -> teal.tint20\n DataVizPalette.color5, // green -> lightGreen.primary\n DataVizPalette.color10, // yellow -> gold.shade10\n DataVizPalette.color4, // purple -> orchid.tint10\n DataVizPalette.color2, // pink -> hotPink.primary\n DataVizPalette.color17, // brown -> pumpkin.shade20\n DataVizPalette.disabled, // gray -> semantic disabled\n];\n\n// Mapping from Tableau20 to Fluent DataViz tokens\nconst TABLEAU20_FLUENT_MAPPING: string[] = [\n DataVizPalette.color1,\n DataVizPalette.color11, // blue shades\n DataVizPalette.color7,\n DataVizPalette.color27, // orange shades\n DataVizPalette.color5,\n DataVizPalette.color15, // green shades\n DataVizPalette.color10,\n DataVizPalette.color30, // yellow shades\n DataVizPalette.color3,\n DataVizPalette.color13, // teal shades\n DataVizPalette.error,\n DataVizPalette.color32, // red shades\n DataVizPalette.disabled,\n DataVizPalette.color31, // gray shades\n DataVizPalette.color2,\n DataVizPalette.color12, // pink shades\n DataVizPalette.color4,\n DataVizPalette.color24, // purple shades\n DataVizPalette.color17,\n DataVizPalette.color37, // brown shades\n];\n\n/**\n * Supported Vega-Lite color scheme names\n */\nexport type VegaColorScheme =\n | 'category10'\n | 'category20'\n | 'category20b'\n | 'category20c'\n | 'tableau10'\n | 'tableau20'\n | 'accent'\n | 'dark2'\n | 'paired'\n | 'pastel1'\n | 'pastel2'\n | 'set1'\n | 'set2'\n | 'set3';\n\n/**\n * Gets the Fluent color mapping for a given Vega-Lite color scheme\n */\nfunction getSchemeMapping(scheme: string | undefined): string[] | undefined {\n if (!scheme) {\n return undefined;\n }\n\n const schemeLower = scheme.toLowerCase();\n\n switch (schemeLower) {\n case 'category10':\n return CATEGORY10_FLUENT_MAPPING;\n case 'category20':\n case 'category20b':\n case 'category20c':\n return CATEGORY20_FLUENT_MAPPING;\n case 'tableau10':\n return TABLEAU10_FLUENT_MAPPING;\n case 'tableau20':\n return TABLEAU20_FLUENT_MAPPING;\n // For unsupported schemes, fall back to default Fluent palette\n case 'accent':\n case 'dark2':\n case 'paired':\n case 'pastel1':\n case 'pastel2':\n case 'set1':\n case 'set2':\n case 'set3':\n // Color schemes not yet mapped to Fluent colors. Using default palette.\n return undefined;\n default:\n return undefined;\n }\n}\n\n/**\n * Gets a color for a series based on Vega-Lite color encoding\n *\n * @param index - Series index\n * @param scheme - Vega-Lite color scheme name (e.g., 'category10', 'tableau10')\n * @param range - Custom color range array\n * @param isDarkTheme - Whether dark theme is active\n * @returns Color string (hex)\n */\nexport function getVegaColor(\n index: number,\n scheme: string | undefined,\n range: string[] | undefined,\n isDarkTheme: boolean = false,\n): string {\n // Priority 1: Custom range (highest priority)\n if (range && range.length > 0) {\n return range[index % range.length];\n }\n\n // Priority 2: Named color scheme mapped to Fluent\n const schemeMapping = getSchemeMapping(scheme);\n if (schemeMapping) {\n const token = schemeMapping[index % schemeMapping.length];\n return getColorFromToken(token, isDarkTheme);\n }\n\n // Priority 3: Default Fluent qualitative palette\n return getNextColor(index, 0, isDarkTheme);\n}\n\n/**\n * Gets a color from the color map or creates a new one based on Vega-Lite encoding\n *\n * @param legendLabel - Legend label for the series\n * @param colorMap - Color mapping ref for consistent coloring across charts\n * @param scheme - Vega-Lite color scheme name\n * @param range - Custom color range array\n * @param isDarkTheme - Whether dark theme is active\n * @returns Color string (hex)\n */\nexport function getVegaColorFromMap(\n legendLabel: string,\n colorMap: ColorMapRef,\n scheme: string | undefined,\n range: string[] | undefined,\n isDarkTheme: boolean = false,\n): string {\n // Check if color is already assigned\n if (colorMap.current?.has(legendLabel)) {\n return colorMap.current.get(legendLabel)!;\n }\n\n // Assign new color based on current map size\n const index = colorMap.current?.size ?? 0;\n const color = getVegaColor(index, scheme, range, isDarkTheme);\n\n colorMap.current?.set(legendLabel, color);\n return color;\n}\n\n/**\n * Sequential and diverging color scheme ramps for heatmaps and continuous color scales.\n * Each ramp is a 5-point gradient matching D3/Vega defaults.\n */\nconst SEQUENTIAL_SCHEMES: Record<string, string[]> = {\n blues: ['#deebf7', '#9ecae1', '#4292c6', '#2171b5', '#084594'],\n greens: ['#e5f5e0', '#a1d99b', '#41ab5d', '#238b45', '#005a32'],\n reds: ['#fee0d2', '#fc9272', '#ef3b2c', '#cb181d', '#99000d'],\n oranges: ['#feedde', '#fdbe85', '#fd8d3c', '#e6550d', '#a63603'],\n purples: ['#efedf5', '#bcbddc', '#807dba', '#6a51a3', '#4a1486'],\n greys: ['#f0f0f0', '#bdbdbd', '#969696', '#636363', '#252525'],\n viridis: ['#440154', '#3b528b', '#21918c', '#5ec962', '#fde725'],\n inferno: ['#000004', '#57106e', '#bc3754', '#f98c0a', '#fcffa4'],\n magma: ['#000004', '#51127c', '#b73779', '#fc8961', '#fcfdbf'],\n plasma: ['#0d0887', '#7e03a8', '#cc4778', '#f89540', '#f0f921'],\n greenblue: ['#e0f3db', '#a8ddb5', '#4eb3d3', '#2b8cbe', '#08589e'],\n yellowgreen: ['#ffffcc', '#c2e699', '#78c679', '#31a354', '#006837'],\n yellowgreenblue: ['#ffffcc', '#a1dab4', '#41b6c4', '#2c7fb8', '#253494'],\n redyellowgreen: ['#d73027', '#fc8d59', '#fee08b', '#91cf60', '#1a9850'],\n blueorange: ['#2166ac', '#67a9cf', '#f7f7f7', '#f4a582', '#b2182b'],\n redblue: ['#ca0020', '#f4a582', '#f7f7f7', '#92c5de', '#0571b0'],\n};\n\n/**\n * Gets a sequential or diverging color ramp for heatmap rendering.\n * Returns an array of `steps` interpolated colors for the given scheme name.\n *\n * @param scheme - Vega-Lite scheme name (e.g., 'blues', 'viridis', 'redyellowgreen')\n * @param steps - Number of color stops (default: 5)\n * @returns Array of hex/rgb color strings, or undefined if scheme is not recognized\n */\nexport function getSequentialSchemeColors(scheme: string, steps: number = 5): string[] | undefined {\n const ramp = SEQUENTIAL_SCHEMES[scheme.toLowerCase()];\n if (!ramp) {\n return undefined;\n }\n\n if (steps === ramp.length) {\n return [...ramp];\n }\n\n // Interpolate to requested number of steps\n const result: string[] = [];\n for (let i = 0; i < steps; i++) {\n const t = steps === 1 ? 0.5 : i / (steps - 1);\n const pos = t * (ramp.length - 1);\n const lo = Math.floor(pos);\n const hi = Math.min(lo + 1, ramp.length - 1);\n const frac = pos - lo;\n\n if (frac === 0) {\n result.push(ramp[lo]);\n } else {\n result.push(interpolateHexColor(ramp[lo], ramp[hi], frac));\n }\n }\n return result;\n}\n\n/**\n * Linearly interpolates between two hex colors\n */\nfunction interpolateHexColor(c1: string, c2: string, t: number): string {\n const r1 = parseInt(c1.slice(1, 3), 16);\n const g1 = parseInt(c1.slice(3, 5), 16);\n const b1 = parseInt(c1.slice(5, 7), 16);\n const r2 = parseInt(c2.slice(1, 3), 16);\n const g2 = parseInt(c2.slice(3, 5), 16);\n const b2 = parseInt(c2.slice(5, 7), 16);\n\n const r = Math.round(r1 + (r2 - r1) * t);\n const g = Math.round(g1 + (g2 - g1) * t);\n const b = Math.round(b1 + (b2 - b1) * t);\n\n return `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${b.toString(16).padStart(2, '0')}`;\n}\n\n/**\n * Checks if the provided range matches a standard Vega scheme\n * Useful for optimizing color assignment\n */\nexport function isStandardVegaScheme(range: string[] | undefined): VegaColorScheme | undefined {\n if (!range || range.length === 0) {\n return undefined;\n }\n\n const rangeLower = range.map(c => c.toLowerCase());\n\n if (areArraysEqual(rangeLower, VEGA_CATEGORY10)) {\n return 'category10';\n }\n if (areArraysEqual(rangeLower, VEGA_CATEGORY20)) {\n return 'category20';\n }\n if (areArraysEqual(rangeLower, VEGA_TABLEAU10)) {\n return 'tableau10';\n }\n if (areArraysEqual(rangeLower, VEGA_TABLEAU20)) {\n return 'tableau20';\n }\n\n return undefined;\n}\n"],"names":["DataVizPalette","getColorFromToken","getNextColor","areArraysEqual","VEGA_CATEGORY10","VEGA_CATEGORY20","VEGA_TABLEAU10","VEGA_TABLEAU20","CATEGORY10_FLUENT_MAPPING","color26","warning","color5","error","color4","color17","color22","disabled","color10","color3","CATEGORY20_FLUENT_MAPPING","color36","color27","color15","color32","color24","color37","color12","color31","color30","color13","TABLEAU10_FLUENT_MAPPING","color1","color7","color2","TABLEAU20_FLUENT_MAPPING","color11","getSchemeMapping","scheme","undefined","schemeLower","toLowerCase","getVegaColor","index","range","isDarkTheme","length","schemeMapping","token","getVegaColorFromMap","legendLabel","colorMap","current","has","get","size","color","set","SEQUENTIAL_SCHEMES","blues","greens","reds","oranges","purples","greys","viridis","inferno","magma","plasma","greenblue","yellowgreen","yellowgreenblue","redyellowgreen","blueorange","redblue","getSequentialSchemeColors","steps","ramp","result","i","t","pos","lo","Math","floor","hi","min","frac","push","interpolateHexColor","c1","c2","r1","parseInt","slice","g1","b1","r2","g2","b2","r","round","g","b","toString","padStart","isStandardVegaScheme","rangeLower","map","c"],"mappings":";;;;;;;;;;;IA6TgB0E,yBAAAA;;;IAnFAjC,YAAAA;;;uBAgCAO;eAAAA;;wBAqGAyD;;;;wBA/WgD,yBAAyB;2BAC1D,4BAA4B;AAQ3D;;;;;CAKC,GAED,2CAA2C;AAC3C,wDAAwD;AACxD,MAAMrG,kBAAkB;IACtB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,2BAA2B;AAC3B,MAAMC,kBAAkB;IACtB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,gDAAgD;AAChD,MAAMC,iBAAiB;IACrB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,mBAAmB;AACnB,MAAMC,iBAAiB;IACrB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,wDAAwD;AACxD,MAAMC,4BAAsC;IAC1CR,sBAAAA,CAAeS,OAAO;IACtBT,sBAAAA,CAAeU,OAAO;IACtBV,sBAAAA,CAAeW,MAAM;IACrBX,sBAAAA,CAAeY,KAAK;IACpBZ,sBAAAA,CAAea,MAAM;IACrBb,sBAAAA,CAAec,OAAO;IACtBd,sBAAAA,CAAee,OAAO;IACtBf,sBAAAA,CAAeg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;IACT;IAEA,OAAO+B;AACT"}
1
+ {"version":3,"sources":["../src/components/VegaDeclarativeChart/VegaLiteColorAdapter.ts"],"sourcesContent":["import { DataVizPalette, getColorFromToken, getNextColor } from '../../utilities/colors';\nimport { areArraysEqual } from '../../utilities/utilities';\n\n/**\n * A ref-like object holding a mutable Map of legend-label to color.\n * Structurally compatible with React.RefObject<Map<string, string>>.\n */\nexport type ColorMapRef = { readonly current: Map<string, string> | null };\n\n/**\n * Vega-Lite Color Scheme to Fluent DataViz Palette Adapter\n *\n * Maps standard Vega-Lite color schemes to Fluent UI DataViz colors\n * Similar to PlotlyColorAdapter but for Vega-Lite specifications\n */\n\n// Vega's category10 scheme (D3 Category10)\n// https://vega.github.io/vega/docs/schemes/#categorical\nconst VEGA_CATEGORY10 = [\n '#1f77b4', // blue\n '#ff7f0e', // orange\n '#2ca02c', // green\n '#d62728', // red\n '#9467bd', // purple\n '#8c564b', // brown\n '#e377c2', // pink\n '#7f7f7f', // gray\n '#bcbd22', // olive\n '#17becf', // cyan\n];\n\n// Vega's category20 scheme\nconst VEGA_CATEGORY20 = [\n '#1f77b4',\n '#aec7e8', // blue shades\n '#ff7f0e',\n '#ffbb78', // orange shades\n '#2ca02c',\n '#98df8a', // green shades\n '#d62728',\n '#ff9896', // red shades\n '#9467bd',\n '#c5b0d5', // purple shades\n '#8c564b',\n '#c49c94', // brown shades\n '#e377c2',\n '#f7b6d2', // pink shades\n '#7f7f7f',\n '#c7c7c7', // gray shades\n '#bcbd22',\n '#dbdb8d', // olive shades\n '#17becf',\n '#9edae5', // cyan shades\n];\n\n// Tableau10 scheme (commonly used in Vega-Lite)\nconst VEGA_TABLEAU10 = [\n '#4e79a7', // blue\n '#f28e2c', // orange\n '#e15759', // red\n '#76b7b2', // teal\n '#59a14f', // green\n '#edc949', // yellow\n '#af7aa1', // purple\n '#ff9da7', // pink\n '#9c755f', // brown\n '#bab0ab', // gray\n];\n\n// Tableau20 scheme\nconst VEGA_TABLEAU20 = [\n '#4e79a7',\n '#a0cbe8', // blue shades\n '#f28e2c',\n '#ffbe7d', // orange shades\n '#59a14f',\n '#8cd17d', // green shades\n '#b6992d',\n '#f1ce63', // yellow shades\n '#499894',\n '#86bcb6', // teal shades\n '#e15759',\n '#ff9d9a', // red shades\n '#79706e',\n '#bab0ab', // gray shades\n '#d37295',\n '#fabfd2', // pink shades\n '#b07aa1',\n '#d4a6c8', // purple shades\n '#9d7660',\n '#d7b5a6', // brown shades\n];\n\n// Mapping from Vega category10 to Fluent DataViz tokens\nconst CATEGORY10_FLUENT_MAPPING: string[] = [\n DataVizPalette.color26, // blue -> lightBlue.shade10\n DataVizPalette.warning, // orange -> semantic warning\n DataVizPalette.color5, // green -> lightGreen.primary\n DataVizPalette.error, // red -> semantic error\n DataVizPalette.color4, // purple -> orchid.tint10\n DataVizPalette.color17, // brown -> pumpkin.shade20\n DataVizPalette.color22, // pink -> hotPink.tint20\n DataVizPalette.disabled, // gray -> semantic disabled\n DataVizPalette.color10, // olive/yellow-green -> gold.shade10\n DataVizPalette.color3, // cyan/teal -> teal.tint20\n];\n\n// Mapping from Vega category20 to Fluent DataViz tokens\nconst CATEGORY20_FLUENT_MAPPING: string[] = [\n DataVizPalette.color26,\n DataVizPalette.color36, // blue shades\n DataVizPalette.warning,\n DataVizPalette.color27, // orange shades\n DataVizPalette.color5,\n DataVizPalette.color15, // green shades\n DataVizPalette.error,\n DataVizPalette.color32, // red shades\n DataVizPalette.color4,\n DataVizPalette.color24, // purple shades\n DataVizPalette.color17,\n DataVizPalette.color37, // brown shades\n DataVizPalette.color22,\n DataVizPalette.color12, // pink shades\n DataVizPalette.disabled,\n DataVizPalette.color31, // gray shades\n DataVizPalette.color10,\n DataVizPalette.color30, // olive shades\n DataVizPalette.color3,\n DataVizPalette.color13, // cyan shades\n];\n\n// Mapping from Tableau10 to Fluent DataViz tokens\nconst TABLEAU10_FLUENT_MAPPING: string[] = [\n DataVizPalette.color1, // blue -> cornflower.tint10\n DataVizPalette.color7, // orange -> pumpkin.primary\n DataVizPalette.error, // red -> semantic error\n DataVizPalette.color3, // teal -> teal.tint20\n DataVizPalette.color5, // green -> lightGreen.primary\n DataVizPalette.color10, // yellow -> gold.shade10\n DataVizPalette.color4, // purple -> orchid.tint10\n DataVizPalette.color2, // pink -> hotPink.primary\n DataVizPalette.color17, // brown -> pumpkin.shade20\n DataVizPalette.disabled, // gray -> semantic disabled\n];\n\n// Mapping from Tableau20 to Fluent DataViz tokens\nconst TABLEAU20_FLUENT_MAPPING: string[] = [\n DataVizPalette.color1,\n DataVizPalette.color11, // blue shades\n DataVizPalette.color7,\n DataVizPalette.color27, // orange shades\n DataVizPalette.color5,\n DataVizPalette.color15, // green shades\n DataVizPalette.color10,\n DataVizPalette.color30, // yellow shades\n DataVizPalette.color3,\n DataVizPalette.color13, // teal shades\n DataVizPalette.error,\n DataVizPalette.color32, // red shades\n DataVizPalette.disabled,\n DataVizPalette.color31, // gray shades\n DataVizPalette.color2,\n DataVizPalette.color12, // pink shades\n DataVizPalette.color4,\n DataVizPalette.color24, // purple shades\n DataVizPalette.color17,\n DataVizPalette.color37, // brown shades\n];\n\n/**\n * Supported Vega-Lite color scheme names\n */\nexport type VegaColorScheme =\n | 'category10'\n | 'category20'\n | 'category20b'\n | 'category20c'\n | 'tableau10'\n | 'tableau20'\n | 'accent'\n | 'dark2'\n | 'paired'\n | 'pastel1'\n | 'pastel2'\n | 'set1'\n | 'set2'\n | 'set3';\n\n/**\n * Gets the Fluent color mapping for a given Vega-Lite color scheme\n */\nfunction getSchemeMapping(scheme: string | undefined): string[] | undefined {\n if (!scheme) {\n return undefined;\n }\n\n const schemeLower = scheme.toLowerCase();\n\n switch (schemeLower) {\n case 'category10':\n return CATEGORY10_FLUENT_MAPPING;\n case 'category20':\n case 'category20b':\n case 'category20c':\n return CATEGORY20_FLUENT_MAPPING;\n case 'tableau10':\n return TABLEAU10_FLUENT_MAPPING;\n case 'tableau20':\n return TABLEAU20_FLUENT_MAPPING;\n // For unsupported schemes, fall back to default Fluent palette\n case 'accent':\n case 'dark2':\n case 'paired':\n case 'pastel1':\n case 'pastel2':\n case 'set1':\n case 'set2':\n case 'set3':\n // Color schemes not yet mapped to Fluent colors. Using default palette.\n return undefined;\n default:\n return undefined;\n }\n}\n\n/**\n * Gets a color for a series based on Vega-Lite color encoding\n *\n * @param index - Series index\n * @param scheme - Vega-Lite color scheme name (e.g., 'category10', 'tableau10')\n * @param range - Custom color range array\n * @param isDarkTheme - Whether dark theme is active\n * @returns Color string (hex)\n */\nexport function getVegaColor(\n index: number,\n scheme: string | undefined,\n range: string[] | undefined,\n isDarkTheme: boolean = false,\n): string {\n // Priority 1: Custom range (highest priority)\n if (range && range.length > 0) {\n return range[index % range.length];\n }\n\n // Priority 2: Named color scheme mapped to Fluent\n const schemeMapping = getSchemeMapping(scheme);\n if (schemeMapping) {\n const token = schemeMapping[index % schemeMapping.length];\n return getColorFromToken(token, isDarkTheme);\n }\n\n // Priority 3: Default Fluent qualitative palette\n return getNextColor(index, 0, isDarkTheme);\n}\n\n/**\n * Gets a color from the color map or creates a new one based on Vega-Lite encoding\n *\n * @param legendLabel - Legend label for the series\n * @param colorMap - Color mapping ref for consistent coloring across charts\n * @param scheme - Vega-Lite color scheme name\n * @param range - Custom color range array\n * @param isDarkTheme - Whether dark theme is active\n * @returns Color string (hex)\n */\nexport function getVegaColorFromMap(\n legendLabel: string,\n colorMap: ColorMapRef,\n scheme: string | undefined,\n range: string[] | undefined,\n isDarkTheme: boolean = false,\n): string {\n // Check if color is already assigned\n if (colorMap.current?.has(legendLabel)) {\n return colorMap.current.get(legendLabel)!;\n }\n\n // Assign new color based on current map size\n const index = colorMap.current?.size ?? 0;\n const color = getVegaColor(index, scheme, range, isDarkTheme);\n\n colorMap.current?.set(legendLabel, color);\n return color;\n}\n\n/**\n * Sequential and diverging color scheme ramps for heatmaps and continuous color scales.\n * Each ramp is a 5-point gradient matching D3/Vega defaults.\n */\nconst SEQUENTIAL_SCHEMES: Record<string, string[]> = {\n blues: ['#deebf7', '#9ecae1', '#4292c6', '#2171b5', '#084594'],\n greens: ['#e5f5e0', '#a1d99b', '#41ab5d', '#238b45', '#005a32'],\n reds: ['#fee0d2', '#fc9272', '#ef3b2c', '#cb181d', '#99000d'],\n oranges: ['#feedde', '#fdbe85', '#fd8d3c', '#e6550d', '#a63603'],\n purples: ['#efedf5', '#bcbddc', '#807dba', '#6a51a3', '#4a1486'],\n greys: ['#f0f0f0', '#bdbdbd', '#969696', '#636363', '#252525'],\n viridis: ['#440154', '#3b528b', '#21918c', '#5ec962', '#fde725'],\n inferno: ['#000004', '#57106e', '#bc3754', '#f98c0a', '#fcffa4'],\n magma: ['#000004', '#51127c', '#b73779', '#fc8961', '#fcfdbf'],\n plasma: ['#0d0887', '#7e03a8', '#cc4778', '#f89540', '#f0f921'],\n greenblue: ['#e0f3db', '#a8ddb5', '#4eb3d3', '#2b8cbe', '#08589e'],\n yellowgreen: ['#ffffcc', '#c2e699', '#78c679', '#31a354', '#006837'],\n yellowgreenblue: ['#ffffcc', '#a1dab4', '#41b6c4', '#2c7fb8', '#253494'],\n redyellowgreen: ['#d73027', '#fc8d59', '#fee08b', '#91cf60', '#1a9850'],\n blueorange: ['#2166ac', '#67a9cf', '#f7f7f7', '#f4a582', '#b2182b'],\n redblue: ['#ca0020', '#f4a582', '#f7f7f7', '#92c5de', '#0571b0'],\n};\n\n/**\n * Gets a sequential or diverging color ramp for heatmap rendering.\n * Returns an array of `steps` interpolated colors for the given scheme name.\n *\n * @param scheme - Vega-Lite scheme name (e.g., 'blues', 'viridis', 'redyellowgreen')\n * @param steps - Number of color stops (default: 5)\n * @returns Array of hex/rgb color strings, or undefined if scheme is not recognized\n */\nexport function getSequentialSchemeColors(scheme: string, steps: number = 5): string[] | undefined {\n const ramp = SEQUENTIAL_SCHEMES[scheme.toLowerCase()];\n if (!ramp) {\n return undefined;\n }\n\n if (steps === ramp.length) {\n return [...ramp];\n }\n\n // Interpolate to requested number of steps\n const result: string[] = [];\n for (let i = 0; i < steps; i++) {\n const t = steps === 1 ? 0.5 : i / (steps - 1);\n const pos = t * (ramp.length - 1);\n const lo = Math.floor(pos);\n const hi = Math.min(lo + 1, ramp.length - 1);\n const frac = pos - lo;\n\n if (frac === 0) {\n result.push(ramp[lo]);\n } else {\n result.push(interpolateHexColor(ramp[lo], ramp[hi], frac));\n }\n }\n return result;\n}\n\n/**\n * Linearly interpolates between two hex colors\n */\nfunction interpolateHexColor(c1: string, c2: string, t: number): string {\n const r1 = parseInt(c1.slice(1, 3), 16);\n const g1 = parseInt(c1.slice(3, 5), 16);\n const b1 = parseInt(c1.slice(5, 7), 16);\n const r2 = parseInt(c2.slice(1, 3), 16);\n const g2 = parseInt(c2.slice(3, 5), 16);\n const b2 = parseInt(c2.slice(5, 7), 16);\n\n const r = Math.round(r1 + (r2 - r1) * t);\n const g = Math.round(g1 + (g2 - g1) * t);\n const b = Math.round(b1 + (b2 - b1) * t);\n\n return `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${b.toString(16).padStart(2, '0')}`;\n}\n\n/**\n * Checks if the provided range matches a standard Vega scheme\n * Useful for optimizing color assignment\n */\nexport function isStandardVegaScheme(range: string[] | undefined): VegaColorScheme | undefined {\n if (!range || range.length === 0) {\n return undefined;\n }\n\n const rangeLower = range.map(c => c.toLowerCase());\n\n if (areArraysEqual(rangeLower, VEGA_CATEGORY10)) {\n return 'category10';\n }\n if (areArraysEqual(rangeLower, VEGA_CATEGORY20)) {\n return 'category20';\n }\n if (areArraysEqual(rangeLower, VEGA_TABLEAU10)) {\n return 'tableau10';\n }\n if (areArraysEqual(rangeLower, VEGA_TABLEAU20)) {\n return 'tableau20';\n }\n\n return undefined;\n}\n"],"names":["DataVizPalette","getColorFromToken","getNextColor","areArraysEqual","VEGA_CATEGORY10","VEGA_CATEGORY20","VEGA_TABLEAU10","VEGA_TABLEAU20","CATEGORY10_FLUENT_MAPPING","color26","warning","color5","error","color4","color17","color22","disabled","color10","color3","CATEGORY20_FLUENT_MAPPING","color36","color27","color15","color32","color24","color37","color12","color31","color30","color13","TABLEAU10_FLUENT_MAPPING","color1","color7","color2","TABLEAU20_FLUENT_MAPPING","color11","getSchemeMapping","scheme","undefined","schemeLower","toLowerCase","getVegaColor","index","range","isDarkTheme","length","schemeMapping","token","getVegaColorFromMap","legendLabel","colorMap","current","has","get","size","color","set","SEQUENTIAL_SCHEMES","blues","greens","reds","oranges","purples","greys","viridis","inferno","magma","plasma","greenblue","yellowgreen","yellowgreenblue","redyellowgreen","blueorange","redblue","getSequentialSchemeColors","steps","ramp","result","i","t","pos","lo","Math","floor","hi","min","frac","push","interpolateHexColor","c1","c2","r1","parseInt","slice","g1","b1","r2","g2","b2","r","round","g","b","toString","padStart","isStandardVegaScheme","rangeLower","map","c"],"mappings":";;;;;;;;;;;IA6TgB0E,yBAAAA;;;IAnFAjC,YAAAA;;;uBAgCAO;eAAAA;;wBAqGAyD;;;;wBA/WgD,4BAAyB;2BAC1D,+BAA4B;AAQ3D;;;;;CAKC,GAED,2CAA2C;AAC3C,wDAAwD;AACxD,MAAMrG,kBAAkB;IACtB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,2BAA2B;AAC3B,MAAMC,kBAAkB;IACtB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,gDAAgD;AAChD,MAAMC,iBAAiB;IACrB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,mBAAmB;AACnB,MAAMC,iBAAiB;IACrB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,wDAAwD;AACxD,MAAMC,4BAAsC;IAC1CR,sBAAAA,CAAeS,OAAO;IACtBT,sBAAAA,CAAeU,OAAO;IACtBV,sBAAAA,CAAeW,MAAM;IACrB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