@fluentui/react-charts 9.3.21 → 9.74.3-experimental.esm.20260709-49ee7a20cf.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (767) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/package.json +15 -17
  3. package/dist/index.d.ts +0 -5724
  4. package/lib/AnnotationOnlyChart.js +0 -1
  5. package/lib/AnnotationOnlyChart.js.map +0 -1
  6. package/lib/AreaChart.js +0 -1
  7. package/lib/AreaChart.js.map +0 -1
  8. package/lib/CartesianChart.js +0 -1
  9. package/lib/CartesianChart.js.map +0 -1
  10. package/lib/ChartTable.js +0 -1
  11. package/lib/ChartTable.js.map +0 -1
  12. package/lib/DeclarativeChart.js +0 -1
  13. package/lib/DeclarativeChart.js.map +0 -1
  14. package/lib/DonutChart.js +0 -1
  15. package/lib/DonutChart.js.map +0 -1
  16. package/lib/FunnelChart.js +0 -1
  17. package/lib/FunnelChart.js.map +0 -1
  18. package/lib/GanttChart.js +0 -1
  19. package/lib/GanttChart.js.map +0 -1
  20. package/lib/GaugeChart.js +0 -1
  21. package/lib/GaugeChart.js.map +0 -1
  22. package/lib/GroupedVerticalBarChart.js +0 -1
  23. package/lib/GroupedVerticalBarChart.js.map +0 -1
  24. package/lib/HeatMapChart.js +0 -1
  25. package/lib/HeatMapChart.js.map +0 -1
  26. package/lib/HorizontalBarChart.js +0 -1
  27. package/lib/HorizontalBarChart.js.map +0 -1
  28. package/lib/HorizontalBarChartWithAxis.js +0 -1
  29. package/lib/HorizontalBarChartWithAxis.js.map +0 -1
  30. package/lib/Legends.js +0 -1
  31. package/lib/Legends.js.map +0 -1
  32. package/lib/LineChart.js +0 -1
  33. package/lib/LineChart.js.map +0 -1
  34. package/lib/PolarChart.js +0 -1
  35. package/lib/PolarChart.js.map +0 -1
  36. package/lib/Popover.js +0 -1
  37. package/lib/Popover.js.map +0 -1
  38. package/lib/ResponsiveContainer.js +0 -1
  39. package/lib/ResponsiveContainer.js.map +0 -1
  40. package/lib/SankeyChart.js +0 -1
  41. package/lib/SankeyChart.js.map +0 -1
  42. package/lib/ScatterChart.js +0 -1
  43. package/lib/ScatterChart.js.map +0 -1
  44. package/lib/Sparkline.js +0 -1
  45. package/lib/Sparkline.js.map +0 -1
  46. package/lib/VegaDeclarativeChart.js +0 -1
  47. package/lib/VegaDeclarativeChart.js.map +0 -1
  48. package/lib/VerticalBarChart.js +0 -1
  49. package/lib/VerticalBarChart.js.map +0 -1
  50. package/lib/VerticalStackedBarChart.js +0 -1
  51. package/lib/VerticalStackedBarChart.js.map +0 -1
  52. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +0 -196
  53. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +0 -1
  54. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +0 -3
  55. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +0 -1
  56. package/lib/components/AnnotationOnlyChart/index.js +0 -2
  57. package/lib/components/AnnotationOnlyChart/index.js.map +0 -1
  58. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +0 -33
  59. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +0 -1
  60. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +0 -24
  61. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +0 -1
  62. package/lib/components/AreaChart/AreaChart.js +0 -932
  63. package/lib/components/AreaChart/AreaChart.js.map +0 -1
  64. package/lib/components/AreaChart/AreaChart.types.js +0 -4
  65. package/lib/components/AreaChart/AreaChart.types.js.map +0 -1
  66. package/lib/components/AreaChart/index.js +0 -3
  67. package/lib/components/AreaChart/index.js.map +0 -1
  68. package/lib/components/AreaChart/useAreaChartStyles.styles.js +0 -63
  69. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +0 -1
  70. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +0 -33
  71. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +0 -1
  72. package/lib/components/ChartTable/ChartTable.js +0 -160
  73. package/lib/components/ChartTable/ChartTable.js.map +0 -1
  74. package/lib/components/ChartTable/ChartTable.types.js +0 -4
  75. package/lib/components/ChartTable/ChartTable.types.js.map +0 -1
  76. package/lib/components/ChartTable/index.js +0 -3
  77. package/lib/components/ChartTable/index.js.map +0 -1
  78. package/lib/components/ChartTable/useChartTableStyles.styles.js +0 -136
  79. package/lib/components/ChartTable/useChartTableStyles.styles.js.map +0 -1
  80. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +0 -68
  81. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +0 -1
  82. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +0 -659
  83. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +0 -1
  84. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +0 -1
  85. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +0 -1
  86. package/lib/components/CommonComponents/Annotations/index.js +0 -2
  87. package/lib/components/CommonComponents/Annotations/index.js.map +0 -1
  88. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +0 -223
  89. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +0 -1
  90. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +0 -139
  91. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +0 -1
  92. package/lib/components/CommonComponents/CartesianChart.js +0 -665
  93. package/lib/components/CommonComponents/CartesianChart.js.map +0 -1
  94. package/lib/components/CommonComponents/CartesianChart.types.js +0 -2
  95. package/lib/components/CommonComponents/CartesianChart.types.js.map +0 -1
  96. package/lib/components/CommonComponents/ChartPopover.js +0 -197
  97. package/lib/components/CommonComponents/ChartPopover.js.map +0 -1
  98. package/lib/components/CommonComponents/ChartPopover.types.js +0 -1
  99. package/lib/components/CommonComponents/ChartPopover.types.js.map +0 -1
  100. package/lib/components/CommonComponents/index.js +0 -6
  101. package/lib/components/CommonComponents/index.js.map +0 -1
  102. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +0 -189
  103. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +0 -1
  104. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +0 -131
  105. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +0 -1
  106. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +0 -171
  107. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +0 -1
  108. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -127
  109. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +0 -1
  110. package/lib/components/DeclarativeChart/DeclarativeChart.js +0 -397
  111. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +0 -1
  112. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +0 -163
  113. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +0 -1
  114. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +0 -3490
  115. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +0 -1
  116. package/lib/components/DeclarativeChart/index.js +0 -1
  117. package/lib/components/DeclarativeChart/index.js.map +0 -1
  118. package/lib/components/DonutChart/Arc/Arc.js +0 -118
  119. package/lib/components/DonutChart/Arc/Arc.js.map +0 -1
  120. package/lib/components/DonutChart/Arc/Arc.types.js +0 -1
  121. package/lib/components/DonutChart/Arc/Arc.types.js.map +0 -1
  122. package/lib/components/DonutChart/Arc/index.js +0 -2
  123. package/lib/components/DonutChart/Arc/index.js.map +0 -1
  124. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +0 -80
  125. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +0 -1
  126. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +0 -49
  127. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +0 -1
  128. package/lib/components/DonutChart/DonutChart.js +0 -349
  129. package/lib/components/DonutChart/DonutChart.js.map +0 -1
  130. package/lib/components/DonutChart/DonutChart.types.js +0 -4
  131. package/lib/components/DonutChart/DonutChart.types.js.map +0 -1
  132. package/lib/components/DonutChart/Pie/Pie.js +0 -72
  133. package/lib/components/DonutChart/Pie/Pie.js.map +0 -1
  134. package/lib/components/DonutChart/Pie/Pie.types.js +0 -1
  135. package/lib/components/DonutChart/Pie/Pie.types.js.map +0 -1
  136. package/lib/components/DonutChart/Pie/index.js +0 -2
  137. package/lib/components/DonutChart/Pie/index.js.map +0 -1
  138. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +0 -41
  139. package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +0 -1
  140. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js +0 -30
  141. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +0 -1
  142. package/lib/components/DonutChart/index.js +0 -3
  143. package/lib/components/DonutChart/index.js.map +0 -1
  144. package/lib/components/DonutChart/useDonutChartStyles.styles.js +0 -98
  145. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +0 -1
  146. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +0 -62
  147. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +0 -1
  148. package/lib/components/FunnelChart/FunnelChart.js +0 -401
  149. package/lib/components/FunnelChart/FunnelChart.js.map +0 -1
  150. package/lib/components/FunnelChart/FunnelChart.types.js +0 -4
  151. package/lib/components/FunnelChart/FunnelChart.types.js.map +0 -1
  152. package/lib/components/FunnelChart/funnelGeometry.js +0 -219
  153. package/lib/components/FunnelChart/funnelGeometry.js.map +0 -1
  154. package/lib/components/FunnelChart/index.js +0 -2
  155. package/lib/components/FunnelChart/index.js.map +0 -1
  156. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +0 -83
  157. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +0 -1
  158. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +0 -65
  159. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +0 -1
  160. package/lib/components/GanttChart/GanttChart.js +0 -535
  161. package/lib/components/GanttChart/GanttChart.js.map +0 -1
  162. package/lib/components/GanttChart/GanttChart.types.js +0 -4
  163. package/lib/components/GanttChart/GanttChart.types.js.map +0 -1
  164. package/lib/components/GanttChart/index.js +0 -2
  165. package/lib/components/GanttChart/index.js.map +0 -1
  166. package/lib/components/GanttChart/useGanttChartStyles.styles.js +0 -27
  167. package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +0 -1
  168. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +0 -26
  169. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +0 -1
  170. package/lib/components/GaugeChart/GaugeChart.js +0 -568
  171. package/lib/components/GaugeChart/GaugeChart.js.map +0 -1
  172. package/lib/components/GaugeChart/GaugeChart.types.js +0 -4
  173. package/lib/components/GaugeChart/GaugeChart.types.js.map +0 -1
  174. package/lib/components/GaugeChart/index.js +0 -3
  175. package/lib/components/GaugeChart/index.js.map +0 -1
  176. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +0 -197
  177. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +0 -1
  178. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +0 -149
  179. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +0 -1
  180. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +0 -813
  181. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +0 -1
  182. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +0 -4
  183. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +0 -1
  184. package/lib/components/GroupedVerticalBarChart/index.js +0 -3
  185. package/lib/components/GroupedVerticalBarChart/index.js.map +0 -1
  186. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +0 -77
  187. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +0 -1
  188. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +0 -40
  189. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +0 -1
  190. package/lib/components/HeatMapChart/HeatMapChart.js +0 -677
  191. package/lib/components/HeatMapChart/HeatMapChart.js.map +0 -1
  192. package/lib/components/HeatMapChart/HeatMapChart.types.js +0 -4
  193. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +0 -1
  194. package/lib/components/HeatMapChart/index.js +0 -3
  195. package/lib/components/HeatMapChart/index.js.map +0 -1
  196. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +0 -48
  197. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +0 -1
  198. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +0 -42
  199. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +0 -1
  200. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +0 -411
  201. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +0 -1
  202. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +0 -7
  203. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +0 -1
  204. package/lib/components/HorizontalBarChart/index.js +0 -3
  205. package/lib/components/HorizontalBarChart/index.js.map +0 -1
  206. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +0 -175
  207. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +0 -1
  208. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +0 -125
  209. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +0 -1
  210. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +0 -720
  211. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +0 -1
  212. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +0 -4
  213. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +0 -1
  214. package/lib/components/HorizontalBarChartWithAxis/index.js +0 -3
  215. package/lib/components/HorizontalBarChartWithAxis/index.js.map +0 -1
  216. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +0 -62
  217. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +0 -1
  218. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +0 -54
  219. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +0 -1
  220. package/lib/components/Legends/Legends.js +0 -323
  221. package/lib/components/Legends/Legends.js.map +0 -1
  222. package/lib/components/Legends/Legends.types.js +0 -3
  223. package/lib/components/Legends/Legends.types.js.map +0 -1
  224. package/lib/components/Legends/OverflowMenu.js +0 -33
  225. package/lib/components/Legends/OverflowMenu.js.map +0 -1
  226. package/lib/components/Legends/index.js +0 -3
  227. package/lib/components/Legends/index.js.map +0 -1
  228. package/lib/components/Legends/shape.js +0 -36
  229. package/lib/components/Legends/shape.js.map +0 -1
  230. package/lib/components/Legends/useLegendsStyles.styles.js +0 -262
  231. package/lib/components/Legends/useLegendsStyles.styles.js.map +0 -1
  232. package/lib/components/Legends/useLegendsStyles.styles.raw.js +0 -142
  233. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +0 -1
  234. package/lib/components/LineChart/LineChart.js +0 -1332
  235. package/lib/components/LineChart/LineChart.js.map +0 -1
  236. package/lib/components/LineChart/LineChart.types.js +0 -3
  237. package/lib/components/LineChart/LineChart.types.js.map +0 -1
  238. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +0 -118
  239. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +0 -1
  240. package/lib/components/LineChart/eventAnnotation/LabelLink.js +0 -59
  241. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +0 -1
  242. package/lib/components/LineChart/eventAnnotation/Textbox.js +0 -42
  243. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +0 -1
  244. package/lib/components/LineChart/index.js +0 -4
  245. package/lib/components/LineChart/index.js.map +0 -1
  246. package/lib/components/LineChart/useLineChartStyles.styles.js +0 -93
  247. package/lib/components/LineChart/useLineChartStyles.styles.js.map +0 -1
  248. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +0 -50
  249. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +0 -1
  250. package/lib/components/PolarChart/PolarChart.js +0 -577
  251. package/lib/components/PolarChart/PolarChart.js.map +0 -1
  252. package/lib/components/PolarChart/PolarChart.types.js +0 -4
  253. package/lib/components/PolarChart/PolarChart.types.js.map +0 -1
  254. package/lib/components/PolarChart/PolarChart.utils.js +0 -174
  255. package/lib/components/PolarChart/PolarChart.utils.js.map +0 -1
  256. package/lib/components/PolarChart/index.js +0 -2
  257. package/lib/components/PolarChart/index.js.map +0 -1
  258. package/lib/components/PolarChart/usePolarChartStyles.styles.js +0 -72
  259. package/lib/components/PolarChart/usePolarChartStyles.styles.js.map +0 -1
  260. package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js +0 -61
  261. package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js.map +0 -1
  262. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +0 -99
  263. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +0 -1
  264. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js +0 -4
  265. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +0 -1
  266. package/lib/components/ResponsiveContainer/index.js +0 -3
  267. package/lib/components/ResponsiveContainer/index.js.map +0 -1
  268. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +0 -30
  269. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +0 -1
  270. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +0 -29
  271. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +0 -1
  272. package/lib/components/ResponsiveContainer/withResponsiveContainer.js +0 -20
  273. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +0 -1
  274. package/lib/components/SankeyChart/SankeyChart.js +0 -1026
  275. package/lib/components/SankeyChart/SankeyChart.js.map +0 -1
  276. package/lib/components/SankeyChart/SankeyChart.types.js +0 -3
  277. package/lib/components/SankeyChart/SankeyChart.types.js.map +0 -1
  278. package/lib/components/SankeyChart/index.js +0 -3
  279. package/lib/components/SankeyChart/index.js.map +0 -1
  280. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +0 -123
  281. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +0 -1
  282. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +0 -79
  283. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +0 -1
  284. package/lib/components/ScatterChart/ScatterChart.js +0 -544
  285. package/lib/components/ScatterChart/ScatterChart.js.map +0 -1
  286. package/lib/components/ScatterChart/ScatterChart.types.js +0 -4
  287. package/lib/components/ScatterChart/ScatterChart.types.js.map +0 -1
  288. package/lib/components/ScatterChart/index.js +0 -3
  289. package/lib/components/ScatterChart/index.js.map +0 -1
  290. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +0 -84
  291. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +0 -1
  292. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +0 -41
  293. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +0 -1
  294. package/lib/components/Sparkline/Sparkline.js +0 -123
  295. package/lib/components/Sparkline/Sparkline.js.map +0 -1
  296. package/lib/components/Sparkline/Sparkline.types.js +0 -4
  297. package/lib/components/Sparkline/Sparkline.types.js.map +0 -1
  298. package/lib/components/Sparkline/index.js +0 -3
  299. package/lib/components/Sparkline/index.js.map +0 -1
  300. package/lib/components/Sparkline/useSparklineStyles.styles.js +0 -40
  301. package/lib/components/Sparkline/useSparklineStyles.styles.js.map +0 -1
  302. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js +0 -31
  303. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js.map +0 -1
  304. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js +0 -405
  305. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js.map +0 -1
  306. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js +0 -20
  307. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js.map +0 -1
  308. package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js +0 -415
  309. package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js.map +0 -1
  310. package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js +0 -537
  311. package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js.map +0 -1
  312. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +0 -3279
  313. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +0 -1
  314. package/lib/components/VegaDeclarativeChart/VegaLiteTypes.js +0 -28
  315. package/lib/components/VegaDeclarativeChart/VegaLiteTypes.js.map +0 -1
  316. package/lib/components/VegaDeclarativeChart/index.js +0 -1
  317. package/lib/components/VegaDeclarativeChart/index.js.map +0 -1
  318. package/lib/components/VerticalBarChart/VerticalBarChart.js +0 -930
  319. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +0 -1
  320. package/lib/components/VerticalBarChart/VerticalBarChart.types.js +0 -4
  321. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +0 -1
  322. package/lib/components/VerticalBarChart/index.js +0 -3
  323. package/lib/components/VerticalBarChart/index.js.map +0 -1
  324. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +0 -86
  325. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +0 -1
  326. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +0 -48
  327. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +0 -1
  328. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +0 -1077
  329. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +0 -1
  330. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +0 -4
  331. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +0 -1
  332. package/lib/components/VerticalStackedBarChart/index.js +0 -3
  333. package/lib/components/VerticalStackedBarChart/index.js.map +0 -1
  334. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +0 -74
  335. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +0 -1
  336. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +0 -38
  337. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +0 -1
  338. package/lib/index.js +0 -26
  339. package/lib/index.js.map +0 -1
  340. package/lib/types/ChartAnnotation.js +0 -1
  341. package/lib/types/ChartAnnotation.js.map +0 -1
  342. package/lib/types/DataPoint.js +0 -3
  343. package/lib/types/DataPoint.js.map +0 -1
  344. package/lib/types/EventAnnotation.js +0 -1
  345. package/lib/types/EventAnnotation.js.map +0 -1
  346. package/lib/types/LegendDataItem.js +0 -1
  347. package/lib/types/LegendDataItem.js.map +0 -1
  348. package/lib/types/index.js +0 -3
  349. package/lib/types/index.js.map +0 -1
  350. package/lib/utilities/ChartTitle.js +0 -45
  351. package/lib/utilities/ChartTitle.js.map +0 -1
  352. package/lib/utilities/Common.styles.js +0 -117
  353. package/lib/utilities/Common.styles.js.map +0 -1
  354. package/lib/utilities/Common.styles.raw.js +0 -115
  355. package/lib/utilities/Common.styles.raw.js.map +0 -1
  356. package/lib/utilities/FocusableTooltipText.js +0 -65
  357. package/lib/utilities/FocusableTooltipText.js.map +0 -1
  358. package/lib/utilities/KeyCodes.js +0 -11
  359. package/lib/utilities/KeyCodes.js.map +0 -1
  360. package/lib/utilities/SVGTooltipText.js +0 -179
  361. package/lib/utilities/SVGTooltipText.js.map +0 -1
  362. package/lib/utilities/async-utils.js +0 -380
  363. package/lib/utilities/async-utils.js.map +0 -1
  364. package/lib/utilities/colors.js +0 -281
  365. package/lib/utilities/colors.js.map +0 -1
  366. package/lib/utilities/getWindow.js +0 -25
  367. package/lib/utilities/getWindow.js.map +0 -1
  368. package/lib/utilities/hooks.js +0 -34
  369. package/lib/utilities/hooks.js.map +0 -1
  370. package/lib/utilities/image-export-utils.js +0 -405
  371. package/lib/utilities/image-export-utils.js.map +0 -1
  372. package/lib/utilities/index.js +0 -5
  373. package/lib/utilities/index.js.map +0 -1
  374. package/lib/utilities/overflow-utils.js +0 -27
  375. package/lib/utilities/overflow-utils.js.map +0 -1
  376. package/lib/utilities/scatterpolar-utils.js +0 -52
  377. package/lib/utilities/scatterpolar-utils.js.map +0 -1
  378. package/lib/utilities/string.js +0 -32
  379. package/lib/utilities/string.js.map +0 -1
  380. package/lib/utilities/test-data.js +0 -565
  381. package/lib/utilities/test-data.js.map +0 -1
  382. package/lib/utilities/utilities.js +0 -1990
  383. package/lib/utilities/utilities.js.map +0 -1
  384. package/lib/utilities/vbc-utils.js +0 -51
  385. package/lib/utilities/vbc-utils.js.map +0 -1
  386. package/lib-commonjs/AnnotationOnlyChart.js +0 -6
  387. package/lib-commonjs/AnnotationOnlyChart.js.map +0 -1
  388. package/lib-commonjs/AreaChart.js +0 -6
  389. package/lib-commonjs/AreaChart.js.map +0 -1
  390. package/lib-commonjs/CartesianChart.js +0 -6
  391. package/lib-commonjs/CartesianChart.js.map +0 -1
  392. package/lib-commonjs/ChartTable.js +0 -6
  393. package/lib-commonjs/ChartTable.js.map +0 -1
  394. package/lib-commonjs/DeclarativeChart.js +0 -6
  395. package/lib-commonjs/DeclarativeChart.js.map +0 -1
  396. package/lib-commonjs/DonutChart.js +0 -6
  397. package/lib-commonjs/DonutChart.js.map +0 -1
  398. package/lib-commonjs/FunnelChart.js +0 -6
  399. package/lib-commonjs/FunnelChart.js.map +0 -1
  400. package/lib-commonjs/GanttChart.js +0 -6
  401. package/lib-commonjs/GanttChart.js.map +0 -1
  402. package/lib-commonjs/GaugeChart.js +0 -6
  403. package/lib-commonjs/GaugeChart.js.map +0 -1
  404. package/lib-commonjs/GroupedVerticalBarChart.js +0 -6
  405. package/lib-commonjs/GroupedVerticalBarChart.js.map +0 -1
  406. package/lib-commonjs/HeatMapChart.js +0 -6
  407. package/lib-commonjs/HeatMapChart.js.map +0 -1
  408. package/lib-commonjs/HorizontalBarChart.js +0 -6
  409. package/lib-commonjs/HorizontalBarChart.js.map +0 -1
  410. package/lib-commonjs/HorizontalBarChartWithAxis.js +0 -6
  411. package/lib-commonjs/HorizontalBarChartWithAxis.js.map +0 -1
  412. package/lib-commonjs/Legends.js +0 -6
  413. package/lib-commonjs/Legends.js.map +0 -1
  414. package/lib-commonjs/LineChart.js +0 -6
  415. package/lib-commonjs/LineChart.js.map +0 -1
  416. package/lib-commonjs/PolarChart.js +0 -6
  417. package/lib-commonjs/PolarChart.js.map +0 -1
  418. package/lib-commonjs/Popover.js +0 -6
  419. package/lib-commonjs/Popover.js.map +0 -1
  420. package/lib-commonjs/ResponsiveContainer.js +0 -6
  421. package/lib-commonjs/ResponsiveContainer.js.map +0 -1
  422. package/lib-commonjs/SankeyChart.js +0 -6
  423. package/lib-commonjs/SankeyChart.js.map +0 -1
  424. package/lib-commonjs/ScatterChart.js +0 -6
  425. package/lib-commonjs/ScatterChart.js.map +0 -1
  426. package/lib-commonjs/Sparkline.js +0 -6
  427. package/lib-commonjs/Sparkline.js.map +0 -1
  428. package/lib-commonjs/VegaDeclarativeChart.js +0 -6
  429. package/lib-commonjs/VegaDeclarativeChart.js.map +0 -1
  430. package/lib-commonjs/VerticalBarChart.js +0 -6
  431. package/lib-commonjs/VerticalBarChart.js.map +0 -1
  432. package/lib-commonjs/VerticalStackedBarChart.js +0 -6
  433. package/lib-commonjs/VerticalStackedBarChart.js.map +0 -1
  434. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +0 -207
  435. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +0 -1
  436. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +0 -6
  437. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +0 -1
  438. package/lib-commonjs/components/AnnotationOnlyChart/index.js +0 -7
  439. package/lib-commonjs/components/AnnotationOnlyChart/index.js.map +0 -1
  440. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +0 -57
  441. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +0 -1
  442. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +0 -34
  443. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +0 -1
  444. package/lib-commonjs/components/AreaChart/AreaChart.js +0 -938
  445. package/lib-commonjs/components/AreaChart/AreaChart.js.map +0 -1
  446. package/lib-commonjs/components/AreaChart/AreaChart.types.js +0 -7
  447. package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +0 -1
  448. package/lib-commonjs/components/AreaChart/index.js +0 -8
  449. package/lib-commonjs/components/AreaChart/index.js.map +0 -1
  450. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +0 -96
  451. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +0 -1
  452. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +0 -49
  453. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +0 -1
  454. package/lib-commonjs/components/ChartTable/ChartTable.js +0 -171
  455. package/lib-commonjs/components/ChartTable/ChartTable.js.map +0 -1
  456. package/lib-commonjs/components/ChartTable/ChartTable.types.js +0 -7
  457. package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +0 -1
  458. package/lib-commonjs/components/ChartTable/index.js +0 -8
  459. package/lib-commonjs/components/ChartTable/index.js.map +0 -1
  460. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +0 -200
  461. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +0 -1
  462. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +0 -82
  463. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +0 -1
  464. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +0 -670
  465. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +0 -1
  466. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +0 -4
  467. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +0 -1
  468. package/lib-commonjs/components/CommonComponents/Annotations/index.js +0 -7
  469. package/lib-commonjs/components/CommonComponents/Annotations/index.js.map +0 -1
  470. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +0 -325
  471. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +0 -1
  472. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +0 -174
  473. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +0 -1
  474. package/lib-commonjs/components/CommonComponents/CartesianChart.js +0 -673
  475. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +0 -1
  476. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js +0 -5
  477. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +0 -1
  478. package/lib-commonjs/components/CommonComponents/ChartPopover.js +0 -207
  479. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +0 -1
  480. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js +0 -4
  481. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +0 -1
  482. package/lib-commonjs/components/CommonComponents/index.js +0 -11
  483. package/lib-commonjs/components/CommonComponents/index.js.map +0 -1
  484. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +0 -268
  485. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +0 -1
  486. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +0 -144
  487. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +0 -1
  488. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +0 -238
  489. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +0 -1
  490. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -141
  491. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +0 -1
  492. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +0 -400
  493. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +0 -1
  494. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +0 -195
  495. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +0 -1
  496. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +0 -3577
  497. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +0 -1
  498. package/lib-commonjs/components/DeclarativeChart/index.js +0 -6
  499. package/lib-commonjs/components/DeclarativeChart/index.js.map +0 -1
  500. package/lib-commonjs/components/DonutChart/Arc/Arc.js +0 -125
  501. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +0 -1
  502. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js +0 -4
  503. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +0 -1
  504. package/lib-commonjs/components/DonutChart/Arc/index.js +0 -7
  505. package/lib-commonjs/components/DonutChart/Arc/index.js.map +0 -1
  506. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +0 -110
  507. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +0 -1
  508. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +0 -63
  509. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +0 -1
  510. package/lib-commonjs/components/DonutChart/DonutChart.js +0 -356
  511. package/lib-commonjs/components/DonutChart/DonutChart.js.map +0 -1
  512. package/lib-commonjs/components/DonutChart/DonutChart.types.js +0 -7
  513. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +0 -1
  514. package/lib-commonjs/components/DonutChart/Pie/Pie.js +0 -79
  515. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +0 -1
  516. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js +0 -4
  517. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +0 -1
  518. package/lib-commonjs/components/DonutChart/Pie/index.js +0 -7
  519. package/lib-commonjs/components/DonutChart/Pie/index.js.map +0 -1
  520. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +0 -55
  521. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +0 -1
  522. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js +0 -44
  523. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +0 -1
  524. package/lib-commonjs/components/DonutChart/index.js +0 -8
  525. package/lib-commonjs/components/DonutChart/index.js.map +0 -1
  526. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +0 -145
  527. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +0 -1
  528. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +0 -76
  529. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +0 -1
  530. package/lib-commonjs/components/FunnelChart/FunnelChart.js +0 -412
  531. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +0 -1
  532. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js +0 -7
  533. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +0 -1
  534. package/lib-commonjs/components/FunnelChart/funnelGeometry.js +0 -246
  535. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +0 -1
  536. package/lib-commonjs/components/FunnelChart/index.js +0 -7
  537. package/lib-commonjs/components/FunnelChart/index.js.map +0 -1
  538. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +0 -118
  539. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +0 -1
  540. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +0 -79
  541. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +0 -1
  542. package/lib-commonjs/components/GanttChart/GanttChart.js +0 -546
  543. package/lib-commonjs/components/GanttChart/GanttChart.js.map +0 -1
  544. package/lib-commonjs/components/GanttChart/GanttChart.types.js +0 -7
  545. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +0 -1
  546. package/lib-commonjs/components/GanttChart/index.js +0 -7
  547. package/lib-commonjs/components/GanttChart/index.js.map +0 -1
  548. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +0 -42
  549. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +0 -1
  550. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +0 -42
  551. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +0 -1
  552. package/lib-commonjs/components/GaugeChart/GaugeChart.js +0 -597
  553. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +0 -1
  554. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js +0 -7
  555. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +0 -1
  556. package/lib-commonjs/components/GaugeChart/index.js +0 -8
  557. package/lib-commonjs/components/GaugeChart/index.js.map +0 -1
  558. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +0 -281
  559. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +0 -1
  560. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +0 -167
  561. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +0 -1
  562. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +0 -818
  563. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +0 -1
  564. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +0 -7
  565. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +0 -1
  566. package/lib-commonjs/components/GroupedVerticalBarChart/index.js +0 -8
  567. package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +0 -1
  568. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +0 -116
  569. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +0 -1
  570. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +0 -56
  571. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +0 -1
  572. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +0 -688
  573. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +0 -1
  574. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js +0 -7
  575. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +0 -1
  576. package/lib-commonjs/components/HeatMapChart/index.js +0 -8
  577. package/lib-commonjs/components/HeatMapChart/index.js.map +0 -1
  578. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +0 -71
  579. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +0 -1
  580. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +0 -60
  581. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +0 -1
  582. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +0 -417
  583. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +0 -1
  584. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +0 -17
  585. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +0 -1
  586. package/lib-commonjs/components/HorizontalBarChart/index.js +0 -8
  587. package/lib-commonjs/components/HorizontalBarChart/index.js.map +0 -1
  588. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +0 -264
  589. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +0 -1
  590. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +0 -139
  591. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +0 -1
  592. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +0 -726
  593. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +0 -1
  594. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +0 -7
  595. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +0 -1
  596. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js +0 -8
  597. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +0 -1
  598. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +0 -86
  599. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +0 -1
  600. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +0 -70
  601. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +0 -1
  602. package/lib-commonjs/components/Legends/Legends.js +0 -333
  603. package/lib-commonjs/components/Legends/Legends.js.map +0 -1
  604. package/lib-commonjs/components/Legends/Legends.types.js +0 -6
  605. package/lib-commonjs/components/Legends/Legends.types.js.map +0 -1
  606. package/lib-commonjs/components/Legends/OverflowMenu.js +0 -44
  607. package/lib-commonjs/components/Legends/OverflowMenu.js.map +0 -1
  608. package/lib-commonjs/components/Legends/index.js +0 -8
  609. package/lib-commonjs/components/Legends/index.js.map +0 -1
  610. package/lib-commonjs/components/Legends/shape.js +0 -47
  611. package/lib-commonjs/components/Legends/shape.js.map +0 -1
  612. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +0 -456
  613. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +0 -1
  614. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +0 -178
  615. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +0 -1
  616. package/lib-commonjs/components/LineChart/LineChart.js +0 -1337
  617. package/lib-commonjs/components/LineChart/LineChart.js.map +0 -1
  618. package/lib-commonjs/components/LineChart/LineChart.types.js +0 -6
  619. package/lib-commonjs/components/LineChart/LineChart.types.js.map +0 -1
  620. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +0 -129
  621. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +0 -1
  622. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +0 -70
  623. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +0 -1
  624. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +0 -53
  625. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +0 -1
  626. package/lib-commonjs/components/LineChart/index.js +0 -9
  627. package/lib-commonjs/components/LineChart/index.js.map +0 -1
  628. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +0 -132
  629. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +0 -1
  630. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +0 -63
  631. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +0 -1
  632. package/lib-commonjs/components/PolarChart/PolarChart.js +0 -587
  633. package/lib-commonjs/components/PolarChart/PolarChart.js.map +0 -1
  634. package/lib-commonjs/components/PolarChart/PolarChart.types.js +0 -7
  635. package/lib-commonjs/components/PolarChart/PolarChart.types.js.map +0 -1
  636. package/lib-commonjs/components/PolarChart/PolarChart.utils.js +0 -204
  637. package/lib-commonjs/components/PolarChart/PolarChart.utils.js.map +0 -1
  638. package/lib-commonjs/components/PolarChart/index.js +0 -7
  639. package/lib-commonjs/components/PolarChart/index.js.map +0 -1
  640. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.js +0 -107
  641. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.js.map +0 -1
  642. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.js +0 -75
  643. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.js.map +0 -1
  644. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +0 -107
  645. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +0 -1
  646. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js +0 -7
  647. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +0 -1
  648. package/lib-commonjs/components/ResponsiveContainer/index.js +0 -8
  649. package/lib-commonjs/components/ResponsiveContainer/index.js.map +0 -1
  650. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +0 -50
  651. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +0 -1
  652. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +0 -47
  653. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +0 -1
  654. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js +0 -28
  655. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +0 -1
  656. package/lib-commonjs/components/SankeyChart/SankeyChart.js +0 -1042
  657. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +0 -1
  658. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js +0 -6
  659. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +0 -1
  660. package/lib-commonjs/components/SankeyChart/index.js +0 -8
  661. package/lib-commonjs/components/SankeyChart/index.js.map +0 -1
  662. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +0 -202
  663. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +0 -1
  664. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +0 -97
  665. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +0 -1
  666. package/lib-commonjs/components/ScatterChart/ScatterChart.js +0 -550
  667. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +0 -1
  668. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +0 -7
  669. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +0 -1
  670. package/lib-commonjs/components/ScatterChart/index.js +0 -8
  671. package/lib-commonjs/components/ScatterChart/index.js.map +0 -1
  672. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +0 -120
  673. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +0 -1
  674. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +0 -55
  675. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +0 -1
  676. package/lib-commonjs/components/Sparkline/Sparkline.js +0 -129
  677. package/lib-commonjs/components/Sparkline/Sparkline.js.map +0 -1
  678. package/lib-commonjs/components/Sparkline/Sparkline.types.js +0 -7
  679. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +0 -1
  680. package/lib-commonjs/components/Sparkline/index.js +0 -8
  681. package/lib-commonjs/components/Sparkline/index.js.map +0 -1
  682. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +0 -57
  683. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +0 -1
  684. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js +0 -45
  685. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js.map +0 -1
  686. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChart.js +0 -274
  687. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChart.js.map +0 -1
  688. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js +0 -35
  689. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js.map +0 -1
  690. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteColorAdapter.js +0 -412
  691. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteColorAdapter.js.map +0 -1
  692. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js +0 -533
  693. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js.map +0 -1
  694. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +0 -3214
  695. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +0 -1
  696. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteTypes.js +0 -31
  697. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteTypes.js.map +0 -1
  698. package/lib-commonjs/components/VegaDeclarativeChart/index.js +0 -6
  699. package/lib-commonjs/components/VegaDeclarativeChart/index.js.map +0 -1
  700. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +0 -932
  701. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +0 -1
  702. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js +0 -7
  703. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +0 -1
  704. package/lib-commonjs/components/VerticalBarChart/index.js +0 -8
  705. package/lib-commonjs/components/VerticalBarChart/index.js.map +0 -1
  706. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +0 -128
  707. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +0 -1
  708. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +0 -64
  709. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +0 -1
  710. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +0 -1088
  711. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +0 -1
  712. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +0 -7
  713. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +0 -1
  714. package/lib-commonjs/components/VerticalStackedBarChart/index.js +0 -8
  715. package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +0 -1
  716. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +0 -116
  717. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +0 -1
  718. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +0 -56
  719. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +0 -1
  720. package/lib-commonjs/index.js +0 -31
  721. package/lib-commonjs/index.js.map +0 -1
  722. package/lib-commonjs/types/ChartAnnotation.js +0 -4
  723. package/lib-commonjs/types/ChartAnnotation.js.map +0 -1
  724. package/lib-commonjs/types/DataPoint.js +0 -6
  725. package/lib-commonjs/types/DataPoint.js.map +0 -1
  726. package/lib-commonjs/types/EventAnnotation.js +0 -4
  727. package/lib-commonjs/types/EventAnnotation.js.map +0 -1
  728. package/lib-commonjs/types/LegendDataItem.js +0 -4
  729. package/lib-commonjs/types/LegendDataItem.js.map +0 -1
  730. package/lib-commonjs/types/index.js +0 -8
  731. package/lib-commonjs/types/index.js.map +0 -1
  732. package/lib-commonjs/utilities/ChartTitle.js +0 -53
  733. package/lib-commonjs/utilities/ChartTitle.js.map +0 -1
  734. package/lib-commonjs/utilities/Common.styles.js +0 -138
  735. package/lib-commonjs/utilities/Common.styles.js.map +0 -1
  736. package/lib-commonjs/utilities/Common.styles.raw.js +0 -138
  737. package/lib-commonjs/utilities/Common.styles.raw.js.map +0 -1
  738. package/lib-commonjs/utilities/FocusableTooltipText.js +0 -75
  739. package/lib-commonjs/utilities/FocusableTooltipText.js.map +0 -1
  740. package/lib-commonjs/utilities/KeyCodes.js +0 -21
  741. package/lib-commonjs/utilities/KeyCodes.js.map +0 -1
  742. package/lib-commonjs/utilities/SVGTooltipText.js +0 -189
  743. package/lib-commonjs/utilities/SVGTooltipText.js.map +0 -1
  744. package/lib-commonjs/utilities/async-utils.js +0 -382
  745. package/lib-commonjs/utilities/async-utils.js.map +0 -1
  746. package/lib-commonjs/utilities/colors.js +0 -311
  747. package/lib-commonjs/utilities/colors.js.map +0 -1
  748. package/lib-commonjs/utilities/getWindow.js +0 -28
  749. package/lib-commonjs/utilities/getWindow.js.map +0 -1
  750. package/lib-commonjs/utilities/hooks.js +0 -45
  751. package/lib-commonjs/utilities/hooks.js.map +0 -1
  752. package/lib-commonjs/utilities/image-export-utils.js +0 -423
  753. package/lib-commonjs/utilities/image-export-utils.js.map +0 -1
  754. package/lib-commonjs/utilities/index.js +0 -10
  755. package/lib-commonjs/utilities/index.js.map +0 -1
  756. package/lib-commonjs/utilities/overflow-utils.js +0 -36
  757. package/lib-commonjs/utilities/overflow-utils.js.map +0 -1
  758. package/lib-commonjs/utilities/scatterpolar-utils.js +0 -67
  759. package/lib-commonjs/utilities/scatterpolar-utils.js.map +0 -1
  760. package/lib-commonjs/utilities/string.js +0 -29
  761. package/lib-commonjs/utilities/string.js.map +0 -1
  762. package/lib-commonjs/utilities/test-data.js +0 -628
  763. package/lib-commonjs/utilities/test-data.js.map +0 -1
  764. package/lib-commonjs/utilities/utilities.js +0 -2016
  765. package/lib-commonjs/utilities/utilities.js.map +0 -1
  766. package/lib-commonjs/utilities/vbc-utils.js +0 -72
  767. package/lib-commonjs/utilities/vbc-utils.js.map +0 -1
@@ -1,930 +0,0 @@
1
- 'use client';
2
- import * as React from 'react';
3
- import { useVerticalBarChartStyles } from './useVerticalBarChartStyles.styles';
4
- import { max as d3Max, min as d3Min } from 'd3-array';
5
- import { line as d3Line } from 'd3-shape';
6
- import { scaleLinear as d3ScaleLinear, scaleBand as d3ScaleBand, scaleUtc as d3ScaleUtc } from 'd3-scale';
7
- import { useId } from '@fluentui/react-utilities';
8
- import { tokens } from '@fluentui/react-theme';
9
- import { CartesianChart, Legends, ChartPopover } from '../../index';
10
- import { ChartTypes, getAccessibleDataObject, XAxisTypes, getTypeOfAxis, formatScientificLimitWidth, getBarWidth, getScalePadding, isScalePaddingDefined, calculateAppropriateBarWidth, useRtl, areArraysEqual, calculateLongestLabelWidth, findVerticalNumericMinMaxOfY, createNumericYAxis, domainRangeOfVerticalNumeric, domainRangeOfDateForAreaLineScatterVerticalBarCharts, domainRangeOfXStringAxis, createStringYAxis, calcTotalWidth, calcBandwidth, calcRequiredWidth, sortAxisCategories } from '../../utilities/index';
11
- import { useImageExport } from '../../utilities/hooks';
12
- var CircleVisbility = /*#__PURE__*/ function(CircleVisbility) {
13
- CircleVisbility["show"] = "visibility";
14
- CircleVisbility["hide"] = "hidden";
15
- return CircleVisbility;
16
- }(CircleVisbility || {});
17
- const MIN_DOMAIN_MARGIN = 8;
18
- // Create a VerticalBarChart variant which uses these default styles and this styled subcomponent.
19
- /**
20
- * VerticalBarchart component
21
- * {@docCategory VerticalBarChart}
22
- */ export const VerticalBarChart = /*#__PURE__*/ React.forwardRef((_props, forwardedRef)=>{
23
- var _props_legendProps;
24
- const props = {
25
- xAxisCategoryOrder: 'default',
26
- maxBarWidth: 24,
27
- ..._props
28
- };
29
- let _points = [];
30
- let _barWidth = 0;
31
- let _colors;
32
- const _refArray = [];
33
- let margins;
34
- const _useRtl = useRtl();
35
- let _bars;
36
- let _xAxisLabels;
37
- let _yMax;
38
- let _yMin;
39
- let _isHavingLine = _checkForLine();
40
- let _xAxisType;
41
- let _calloutAnchorPoint;
42
- let _domainMargin;
43
- const _emptyChartId = useId('_VBC_empty');
44
- const _vbcLineId = useId('_VBC_line_');
45
- const _vbcPointId = useId('_VBC_point_');
46
- const _vbcBarId = useId('_VBC_bar_');
47
- let _xAxisInnerPadding = 0;
48
- let _xAxisOuterPadding = 0;
49
- const { cartesianChartRef, legendsRef: _legendsRef } = useImageExport(props.componentRef, props.hideLegend);
50
- const [color, setColor] = React.useState('');
51
- const [dataForHoverCard, setDataForHoverCard] = React.useState(0);
52
- const [activeLegend, setActiveLegend] = React.useState(undefined);
53
- const [xCalloutValue, setXCalloutValue] = React.useState('');
54
- const [yCalloutValue, setYCalloutValue] = React.useState('');
55
- const [activeXdataPoint, setActiveXDatapoint] = React.useState(null);
56
- const [hoveredYValues, setYValueHover] = React.useState();
57
- const [hoverXValue, setHoverXValue] = React.useState('');
58
- const [calloutLegend, setCalloutLegend] = React.useState('');
59
- const [callOutAccessibilityData, setCalloutAccessibilityData] = React.useState();
60
- const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState();
61
- const [clickPosition, setClickPosition] = React.useState({
62
- x: 0,
63
- y: 0
64
- });
65
- const [isPopoverOpen, setPopoverOpen] = React.useState(false);
66
- const [selectedLegends, setSelectedLegends] = React.useState(((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends) || []);
67
- const prevPropsRef = React.useRef(null);
68
- React.useEffect(()=>{
69
- if (prevPropsRef.current) {
70
- var _prevProps_legendProps, _props_legendProps;
71
- const prevProps = prevPropsRef.current;
72
- if (!areArraysEqual((_prevProps_legendProps = prevProps.legendProps) === null || _prevProps_legendProps === void 0 ? void 0 : _prevProps_legendProps.selectedLegends, (_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends)) {
73
- var _props_legendProps1;
74
- setSelectedLegends(((_props_legendProps1 = props.legendProps) === null || _props_legendProps1 === void 0 ? void 0 : _props_legendProps1.selectedLegends) || []);
75
- }
76
- if (prevProps.height !== props.height || prevProps.width !== props.width) {
77
- _adjustProps();
78
- }
79
- }
80
- prevPropsRef.current = props;
81
- }, [
82
- props,
83
- prevPropsRef,
84
- _adjustProps
85
- ]);
86
- function _getDomainNRangeValues(points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues) {
87
- let domainNRangeValue;
88
- if (xAxisType === XAxisTypes.NumericAxis) {
89
- domainNRangeValue = domainRangeOfVerticalNumeric(points, margins, width, isRTL, barWidth);
90
- } else if (xAxisType === XAxisTypes.DateAxis) {
91
- domainNRangeValue = domainRangeOfDateForAreaLineScatterVerticalBarCharts(points, margins, width, isRTL, tickValues, chartType, barWidth);
92
- } else {
93
- domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);
94
- }
95
- return domainNRangeValue;
96
- }
97
- function _createLine(// eslint-disable-next-line @typescript-eslint/no-explicit-any
98
- xScale, // eslint-disable-next-line @typescript-eslint/no-explicit-any
99
- yScalePrimary, containerHeight = 0, containerWidth = 0, // eslint-disable-next-line @typescript-eslint/no-explicit-any
100
- yScaleSecondary) {
101
- var _props_lineOptions;
102
- const isStringAxis = _xAxisType === XAxisTypes.StringAxis;
103
- const colorScale = _createColors();
104
- const { data, lineLegendColor = tokens.colorPaletteYellowBackground1, lineLegendText } = props;
105
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
106
- const lineData = [];
107
- const line = [];
108
- data && data.forEach((item, index)=>{
109
- if (item.lineData && item.lineData.y) {
110
- var _item_lineData_useSecondaryYScale;
111
- lineData.push({
112
- x: item.x,
113
- y: item.lineData.y,
114
- useSecondaryYScale: (_item_lineData_useSecondaryYScale = item.lineData.useSecondaryYScale) !== null && _item_lineData_useSecondaryYScale !== void 0 ? _item_lineData_useSecondaryYScale : false,
115
- point: item,
116
- index
117
- });
118
- }
119
- });
120
- const linePath = d3Line()// eslint-disable-next-line @typescript-eslint/no-explicit-any
121
- .x((d)=>isStringAxis ? xScale(d.x) + 0.5 * xScale.bandwidth() : xScale(d.x))// eslint-disable-next-line @typescript-eslint/no-explicit-any
122
- .y((d)=>d.useSecondaryYScale && yScaleSecondary ? yScaleSecondary(d.y) : yScalePrimary(d.y));
123
- const shouldHighlight = _legendHighlighted(lineLegendText) || _noLegendHighlighted() ? true : false;
124
- const lineBorderWidth = ((_props_lineOptions = props.lineOptions) === null || _props_lineOptions === void 0 ? void 0 : _props_lineOptions.lineBorderWidth) ? Number.parseFloat(props.lineOptions.lineBorderWidth.toString()) : 0;
125
- if (lineBorderWidth > 0) {
126
- line.push(/*#__PURE__*/ React.createElement("path", {
127
- key: _vbcLineId,
128
- id: _vbcLineId,
129
- opacity: shouldHighlight ? 1 : 0.1,
130
- d: linePath(lineData),
131
- fill: "transparent",
132
- strokeLinecap: "square",
133
- strokeWidth: 3 + lineBorderWidth * 2,
134
- className: classes.lineBorder
135
- }));
136
- }
137
- line.push(/*#__PURE__*/ React.createElement("path", {
138
- key: _vbcLineId,
139
- id: _vbcLineId,
140
- opacity: shouldHighlight ? 1 : 0.1,
141
- d: linePath(lineData),
142
- fill: "transparent",
143
- strokeLinecap: "square",
144
- strokeWidth: 3,
145
- stroke: lineLegendColor
146
- }));
147
- const dots = lineData.map((item, index)=>{
148
- var _item_point_lineData;
149
- // Create an object to store line point ref so that the object can be passed by reference to the focus handler
150
- const circleRef = {
151
- refElement: null
152
- };
153
- return /*#__PURE__*/ React.createElement("circle", {
154
- key: index,
155
- id: `${_vbcPointId}-${index}`,
156
- cx: isStringAxis ? xScale(item.x) + 0.5 * xScale.bandwidth() : xScale(item.x),
157
- cy: item.useSecondaryYScale && yScaleSecondary ? yScaleSecondary(item.y) : yScalePrimary(item.y),
158
- onMouseOver: (event)=>_legendHighlighted(lineLegendText) ? _lineHover(item.point, event) : _onBarHover(item.point, colorScale(item.y), event),
159
- onMouseOut: _onBarLeave,
160
- r: _getCircleVisibilityAndRadius(item.x, lineLegendText).radius,
161
- stroke: lineLegendColor,
162
- fill: tokens.colorNeutralBackground1,
163
- strokeWidth: 3,
164
- visibility: _getCircleVisibilityAndRadius(item.x, lineLegendText).visibility,
165
- onClick: (_item_point_lineData = item.point.lineData) === null || _item_point_lineData === void 0 ? void 0 : _item_point_lineData.onClick,
166
- // When no legend is highlighted: Line points are automatically displayed along with the bars
167
- // at the same x-axis point in the stack callout. So to prevent an increase in focusable elements
168
- // and avoid conveying duplicate info, make these line points non-focusable.
169
- "data-is-focusable": _legendHighlighted(lineLegendText),
170
- ref: (e)=>{
171
- circleRef.refElement = e;
172
- },
173
- onFocus: (event)=>_lineFocus(event, item.point, circleRef),
174
- onBlur: _handleChartMouseLeave,
175
- tabIndex: _legendHighlighted(lineLegendText) ? 0 : undefined
176
- });
177
- });
178
- return /*#__PURE__*/ React.createElement(React.Fragment, null, line, dots);
179
- }
180
- function _getCircleVisibilityAndRadius(xAxisPoint, legend) {
181
- if (!_noLegendHighlighted()) {
182
- if (xAxisPoint === activeXdataPoint && _legendHighlighted(legend)) {
183
- return {
184
- visibility: "visibility",
185
- radius: 8
186
- };
187
- } else if (_legendHighlighted(legend)) {
188
- // Don't hide the circle to keep it focusable. For more information,
189
- // see https://fuzzbomb.github.io/accessibility-demos/visually-hidden-focus-test.html
190
- return {
191
- visibility: "visibility",
192
- radius: 0.3
193
- };
194
- } else {
195
- return {
196
- visibility: "hidden",
197
- radius: 0
198
- };
199
- }
200
- } else {
201
- return {
202
- visibility: activeXdataPoint === xAxisPoint ? "visibility" : "hidden",
203
- radius: 8
204
- };
205
- }
206
- }
207
- function _checkForLine() {
208
- const { data } = props;
209
- return data.some((item)=>{
210
- var _item_lineData;
211
- return (item === null || item === void 0 ? void 0 : (_item_lineData = item.lineData) === null || _item_lineData === void 0 ? void 0 : _item_lineData.y) !== undefined;
212
- });
213
- }
214
- function _adjustProps() {
215
- _xAxisType = props.data && props.data.length > 0 ? getTypeOfAxis(props.data[0].x, true) : XAxisTypes.StringAxis;
216
- _points = props.data || [];
217
- _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, undefined, props.mode);
218
- const defaultColors = [
219
- tokens.colorPaletteBlueForeground2,
220
- tokens.colorPaletteCornflowerForeground2,
221
- tokens.colorPaletteDarkGreenForeground2,
222
- tokens.colorPaletteNavyForeground2,
223
- tokens.colorPaletteDarkOrangeForeground2
224
- ];
225
- _colors = props.colors || defaultColors;
226
- _isHavingLine = _checkForLine();
227
- _xAxisInnerPadding = props.mode === 'histogram' ? 0 : getScalePadding(props.xAxisInnerPadding, props.xAxisPadding, _xAxisType === XAxisTypes.StringAxis ? 2 / 3 : 1 / 2);
228
- _xAxisOuterPadding = getScalePadding(props.xAxisOuterPadding, props.xAxisPadding, 0);
229
- }
230
- function _getMargins(_margins) {
231
- margins = _margins;
232
- }
233
- function _renderContentForBothLineAndBars(point) {
234
- // eslint-disable-next-line @typescript-eslint/no-shadow
235
- const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);
236
- const content = YValueHover.map((item, index)=>{
237
- return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(ChartPopover, {
238
- culture: props.culture,
239
- clickPosition: clickPosition,
240
- isPopoverOpen: isPopoverOpen,
241
- legend: item.legend,
242
- ...index === 0 && {
243
- XValue: `${hoverXValue || item.data}`
244
- },
245
- YValue: item.data || item.y,
246
- color: item.color,
247
- isCalloutForStack: false
248
- }));
249
- });
250
- return /*#__PURE__*/ React.createElement(React.Fragment, null, content);
251
- }
252
- function _renderContentForOnlyBars(_props) {
253
- return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(ChartPopover, {
254
- XValue: _props.xAxisCalloutData || _props.x,
255
- xCalloutValue: xCalloutValue,
256
- yCalloutValue: yCalloutValue,
257
- culture: props.culture,
258
- clickPosition: clickPosition,
259
- isPopoverOpen: isPopoverOpen,
260
- legend: _props.legend,
261
- YValue: _props.yAxisCalloutData || _props.y,
262
- color: !props.useSingleColor && _props.color ? _props.color : _createColors()(_props.y),
263
- isCalloutForStack: false
264
- }));
265
- }
266
- // eslint-disable-next-line @typescript-eslint/no-shadow
267
- function _renderCallout(props) {
268
- return props ? _isHavingLine ? _renderContentForBothLineAndBars(props) : _renderContentForOnlyBars(props) : null;
269
- }
270
- function _getCustomizedCallout() {
271
- return props.onRenderCalloutPerDataPoint ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps, _renderCallout) : null;
272
- }
273
- function _getGraphData(// eslint-disable-next-line @typescript-eslint/no-explicit-any
274
- xScale, yScale, containerHeight, containerWidth, xElement) {
275
- return _bars = _xAxisType === XAxisTypes.NumericAxis ? _createNumericBars(containerHeight, containerWidth, xElement) : _xAxisType === XAxisTypes.DateAxis ? _createDateBars(containerHeight, containerWidth, xElement) : _createStringBars(containerHeight, containerWidth, xElement);
276
- }
277
- function _createColors() {
278
- const increment = _colors.length <= 1 ? 1 : 1 / (_colors.length - 1);
279
- const { useSingleColor = false } = props;
280
- if (useSingleColor) {
281
- return (_p)=>{
282
- const { colors } = props;
283
- return colors && colors.length > 0 ? colors[0] : tokens.colorPaletteBlueBackground2;
284
- };
285
- }
286
- const domainValues = [];
287
- for(let i = 0; i < _colors.length; i++){
288
- domainValues.push(increment * i * _yMax);
289
- }
290
- const colorScale = d3ScaleLinear().domain(domainValues).range(_colors);
291
- return colorScale;
292
- }
293
- function _refCallback(element, legendTitle) {
294
- _refArray.push({
295
- index: legendTitle,
296
- refElement: element
297
- });
298
- }
299
- function _getCalloutContentForLineAndBar(point) {
300
- var _selectedPoint__lineData;
301
- const YValueHover = [];
302
- const { useSingleColor = false } = props;
303
- const { data, lineLegendText, lineLegendColor = tokens.colorPaletteYellowBackground1 } = props;
304
- const selectedPoint = data.filter((xDataPoint)=>xDataPoint.x === point.x);
305
- // Check if the line legend is highlighted or no legend is highlighted
306
- if (_isHavingLine && ((_selectedPoint__lineData = selectedPoint[0].lineData) === null || _selectedPoint__lineData === void 0 ? void 0 : _selectedPoint__lineData.y) !== undefined && (_legendHighlighted(lineLegendText) || _noLegendHighlighted())) {
307
- var _selectedPoint__lineData1, _selectedPoint__lineData2, _selectedPoint__lineData3;
308
- // Add callout data for the line
309
- YValueHover.push({
310
- legend: lineLegendText,
311
- color: lineLegendColor,
312
- y: (_selectedPoint__lineData1 = selectedPoint[0].lineData) === null || _selectedPoint__lineData1 === void 0 ? void 0 : _selectedPoint__lineData1.y,
313
- data: (_selectedPoint__lineData2 = selectedPoint[0].lineData) === null || _selectedPoint__lineData2 === void 0 ? void 0 : _selectedPoint__lineData2.yAxisCalloutData,
314
- yAxisCalloutData: (_selectedPoint__lineData3 = selectedPoint[0].lineData) === null || _selectedPoint__lineData3 === void 0 ? void 0 : _selectedPoint__lineData3.yAxisCalloutData
315
- });
316
- }
317
- // Check if the bar legend is highlighted or no legend is highlighted
318
- if (selectedLegends.includes(selectedPoint[0].legend) || _noLegendHighlighted()) {
319
- // Add callout data for the bar
320
- YValueHover.push({
321
- legend: selectedPoint[0].legend,
322
- y: selectedPoint[0].y,
323
- color: !useSingleColor ? selectedPoint[0].color ? selectedPoint[0].color : _createColors()(selectedPoint[0].y) : _createColors()(1),
324
- data: selectedPoint[0].yAxisCalloutData,
325
- yAxisCalloutData: selectedPoint[0].yAxisCalloutData
326
- });
327
- }
328
- // eslint-disable-next-line @typescript-eslint/no-shadow
329
- const hoverXValue = point.x instanceof Date ? point.x.toLocaleString() : point.x.toString();
330
- return {
331
- YValueHover,
332
- hoverXValue: point.xAxisCalloutData || hoverXValue
333
- };
334
- }
335
- function _onBarHover(point, // eslint-disable-next-line @typescript-eslint/no-shadow
336
- color, mouseEvent) {
337
- mouseEvent.persist();
338
- // eslint-disable-next-line @typescript-eslint/no-shadow
339
- const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);
340
- if (_calloutAnchorPoint !== point) {
341
- _calloutAnchorPoint = point;
342
- /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */ updatePosition(mouseEvent.clientX, mouseEvent.clientY);
343
- setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(point.legend));
344
- setDataForHoverCard(point.y);
345
- setCalloutLegend(point.legend);
346
- setColor(point.color || color);
347
- // To display callout value, if no callout value given, taking given point.x value as a string.
348
- setXCalloutValue(point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()));
349
- setDataPointCalloutProps(point);
350
- // Hovering over a bar should highlight corresponding line points only when no legend is selected
351
- setActiveXDatapoint(_noLegendHighlighted() ? point.x : null);
352
- setYValueHover(YValueHover);
353
- setHoverXValue(hoverXValue);
354
- setCalloutAccessibilityData(point.callOutAccessibilityData);
355
- }
356
- }
357
- function _onBarLeave() {
358
- /**/ }
359
- function _handleChartMouseLeave() {
360
- _calloutAnchorPoint = null;
361
- setPopoverOpen(false);
362
- setActiveXDatapoint(null);
363
- setYValueHover([]);
364
- setHoverXValue('');
365
- }
366
- function _onBarFocus(event, point, refArrayIndexNumber, color) {
367
- let x = 0;
368
- let y = 0;
369
- const targetRect = event.target.getBoundingClientRect();
370
- x = targetRect.left + targetRect.width / 2;
371
- y = targetRect.top + targetRect.height / 2;
372
- updatePosition(x, y);
373
- // eslint-disable-next-line @typescript-eslint/no-shadow
374
- const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);
375
- _refArray.forEach((obj, index)=>{
376
- if (obj.index === point.legend && refArrayIndexNumber === index) {
377
- /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */ setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(point.legend));
378
- setDataForHoverCard(point.y);
379
- setCalloutLegend(point.legend);
380
- setColor(point.color || color);
381
- // To display callout value, if no callout value given, taking given point.x value as a string.
382
- setXCalloutValue(point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()));
383
- setYCalloutValue(point.yAxisCalloutData);
384
- setDataPointCalloutProps(point);
385
- // Hovering over a bar should highlight corresponding line points only when no legend is selected
386
- setActiveXDatapoint(point.x);
387
- setYValueHover(YValueHover);
388
- setHoverXValue(hoverXValue);
389
- setCalloutAccessibilityData(point.callOutAccessibilityData);
390
- }
391
- });
392
- }
393
- function _lineHover(point, mouseEvent) {
394
- mouseEvent.persist();
395
- _lineHoverFocus(point, mouseEvent);
396
- }
397
- function _lineFocus(event, point, ref) {
398
- if (ref.refElement) {
399
- _lineHoverFocus(point, ref.refElement);
400
- }
401
- }
402
- function _lineHoverFocus(point, _refSelected) {
403
- const { lineLegendText = '', lineLegendColor = tokens.colorPaletteYellowBackground1 } = props;
404
- setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(lineLegendText));
405
- setCalloutLegend(lineLegendText);
406
- setDataForHoverCard(point.lineData.y);
407
- setColor(lineLegendColor);
408
- setXCalloutValue(point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()));
409
- setYCalloutValue(point.lineData.yAxisCalloutData);
410
- setDataPointCalloutProps(point);
411
- setActiveXDatapoint(point.x);
412
- }
413
- function _getScales(containerHeight, containerWidth) {
414
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
415
- let xBarScale;
416
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
417
- const yBarScale = d3ScaleLinear().domain([
418
- _yMin,
419
- _yMax
420
- ]).range([
421
- 0,
422
- containerHeight - margins.bottom - margins.top
423
- ]);
424
- if (_xAxisType === XAxisTypes.NumericAxis) {
425
- const xMax = d3Max(_points, (point)=>point.x);
426
- const xMin = d3Min(_points, (point)=>point.x);
427
- xBarScale = d3ScaleLinear().domain(_useRtl ? [
428
- xMax,
429
- xMin
430
- ] : [
431
- xMin,
432
- xMax
433
- ]).range([
434
- margins.left + _domainMargin,
435
- containerWidth - margins.right - _domainMargin
436
- ]);
437
- if (!isScalePaddingDefined(props.xAxisInnerPadding, props.xAxisPadding) && props.mode !== 'histogram') {
438
- xBarScale.nice();
439
- }
440
- } else if (_xAxisType === XAxisTypes.DateAxis) {
441
- const sDate = d3Min(_points, (point)=>point.x);
442
- const lDate = d3Max(_points, (point)=>point.x);
443
- xBarScale = d3ScaleUtc().domain([
444
- sDate,
445
- lDate
446
- ]).range(_useRtl ? [
447
- containerWidth - margins.right - _domainMargin,
448
- margins.left + _domainMargin
449
- ] : [
450
- margins.left + _domainMargin,
451
- containerWidth - margins.right - _domainMargin
452
- ]);
453
- } else {
454
- xBarScale = d3ScaleBand().domain(_xAxisLabels).range(_useRtl ? [
455
- containerWidth - margins.right - _domainMargin,
456
- margins.left + _domainMargin
457
- ] : [
458
- margins.left + _domainMargin,
459
- containerWidth - margins.right - _domainMargin
460
- ]).paddingInner(_xAxisInnerPadding).paddingOuter(_xAxisOuterPadding);
461
- }
462
- return {
463
- xBarScale,
464
- yBarScale
465
- };
466
- }
467
- const classes = useVerticalBarChartStyles(props);
468
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
469
- function _calculateMinBarHeight(yMin, yMax, yReferencePoint, yBarScale) {
470
- const maxHeightFromBaseline = yMax < 0 ? Math.abs(yMin - yReferencePoint) : Math.max(Math.abs(yMax - yReferencePoint), Math.abs(yMin - yReferencePoint));
471
- return Math.ceil(yBarScale(maxHeightFromBaseline) / 100.0);
472
- }
473
- function _createNumericBars(containerHeight, containerWidth, xElement) {
474
- const { useSingleColor = false } = props;
475
- const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);
476
- const colorScale = _createColors();
477
- const yReferencePoint = _yMax < 0 ? _yMax : 0;
478
- const bars = _points.map((point, index)=>{
479
- const shouldHighlight = _legendHighlighted(point.legend) || _noLegendHighlighted() ? true : false;
480
- let barHeight = yBarScale(point.y) - yBarScale(yReferencePoint);
481
- const isHeightNegative = barHeight < 0;
482
- barHeight = Math.abs(barHeight);
483
- // Calculate threshold for minimum visible bar height
484
- const minBarHeight = _calculateMinBarHeight(_yMin, _yMax, yReferencePoint, yBarScale);
485
- let adjustedBarHeight = barHeight;
486
- if (barHeight === 0) {
487
- return /*#__PURE__*/ React.createElement(React.Fragment, {
488
- key: point.x
489
- }, " ");
490
- } else if (barHeight <= minBarHeight) {
491
- adjustedBarHeight = minBarHeight;
492
- }
493
- const xPoint = xBarScale(point.x) - _barWidth / 2;
494
- const yPoint = containerHeight - margins.bottom - (isHeightNegative ? -1 * adjustedBarHeight : adjustedBarHeight) - yBarScale(yReferencePoint);
495
- const baselineHeight = containerHeight - margins.bottom - yBarScale(yReferencePoint);
496
- return /*#__PURE__*/ React.createElement("g", {
497
- key: `${point.x}_${index}`
498
- }, /*#__PURE__*/ React.createElement("rect", {
499
- id: `${_vbcBarId}-${index}`,
500
- x: xPoint,
501
- y: !isHeightNegative ? yPoint : baselineHeight,
502
- width: _barWidth,
503
- height: adjustedBarHeight,
504
- ref: (e)=>{
505
- _refCallback(e, point.legend);
506
- },
507
- onClick: point.onClick,
508
- onMouseOver: (event)=>_onBarHover(point, colorScale(point.y), event),
509
- "aria-label": _getAriaLabel(point),
510
- role: "img",
511
- onMouseLeave: _onBarLeave,
512
- onFocus: (event)=>_onBarFocus(event, point, index, colorScale(point.y)),
513
- onBlur: _onBarLeave,
514
- fill: point.color && !useSingleColor ? point.color : colorScale(point.y),
515
- tabIndex: !props.hideTooltip && shouldHighlight ? 0 : undefined,
516
- opacity: shouldHighlight ? 1 : 0.1,
517
- rx: props.roundCorners ? 3 : 0
518
- }), _renderBarLabel(xPoint, yPoint, point.y, point.legend, isHeightNegative, point.barLabel));
519
- });
520
- return bars;
521
- }
522
- function _createStringBars(containerHeight, containerWidth, xElement) {
523
- const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);
524
- const colorScale = _createColors();
525
- const yReferencePoint = _yMax < 0 ? _yMax : 0;
526
- const bars = _points.map((point, index)=>{
527
- const shouldHighlight = _legendHighlighted(point.legend) || _noLegendHighlighted() ? true : false;
528
- let barHeight = yBarScale(point.y) - yBarScale(yReferencePoint);
529
- const isHeightNegative = barHeight < 0;
530
- barHeight = Math.abs(barHeight);
531
- // Calculate threshold for minimum visible bar height
532
- const minBarHeight = _calculateMinBarHeight(_yMin, _yMax, yReferencePoint, yBarScale);
533
- let adjustedBarHeight = barHeight;
534
- if (barHeight === 0) {
535
- return /*#__PURE__*/ React.createElement(React.Fragment, {
536
- key: point.x
537
- }, " ");
538
- } else if (barHeight <= minBarHeight) {
539
- adjustedBarHeight = minBarHeight;
540
- }
541
- const xPoint = xBarScale(point.x);
542
- const yPoint = containerHeight - margins.bottom - (isHeightNegative ? -1 * adjustedBarHeight : adjustedBarHeight) - yBarScale(yReferencePoint);
543
- const baselineHeight = containerHeight - margins.bottom - yBarScale(yReferencePoint);
544
- // Setting the bar width here is safe because there are no dependencies earlier in the code
545
- // that rely on the width of bars in vertical bar charts with string x-axis.
546
- _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, xBarScale.bandwidth(), props.mode);
547
- return /*#__PURE__*/ React.createElement("g", {
548
- key: point.x instanceof Date ? `${point.x.getTime()}_${index}` : `${point.x}_${index}`,
549
- transform: `translate(${0.5 * (xBarScale.bandwidth() - _barWidth)}, 0)`
550
- }, /*#__PURE__*/ React.createElement("rect", {
551
- id: `${_vbcBarId}-${index}`,
552
- x: xPoint,
553
- y: !isHeightNegative ? yPoint : baselineHeight,
554
- width: _barWidth,
555
- height: adjustedBarHeight,
556
- "aria-label": _getAriaLabel(point),
557
- role: "img",
558
- ref: (e)=>{
559
- _refCallback(e, point.legend);
560
- },
561
- onClick: point.onClick,
562
- onMouseOver: (event)=>_onBarHover(point, colorScale(point.y), event),
563
- onMouseLeave: _onBarLeave,
564
- onBlur: _onBarLeave,
565
- onFocus: (event)=>_onBarFocus(event, point, index, colorScale(point.y)),
566
- fill: point.color ? point.color : colorScale(point.y),
567
- tabIndex: !props.hideTooltip && shouldHighlight ? 0 : undefined,
568
- rx: props.roundCorners ? 3 : 0,
569
- opacity: shouldHighlight ? 1 : 0.1
570
- }), _renderBarLabel(xPoint, yPoint, point.y, point.legend, isHeightNegative, point.barLabel));
571
- });
572
- return bars;
573
- }
574
- function _createDateBars(containerHeight, containerWidth, xElement) {
575
- const { useSingleColor = false } = props;
576
- const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);
577
- const colorScale = _createColors();
578
- const yReferencePoint = _yMax < 0 ? _yMax : 0;
579
- const bars = _points.map((point, index)=>{
580
- const shouldHighlight = _legendHighlighted(point.legend) || _noLegendHighlighted() ? true : false;
581
- let barHeight = yBarScale(point.y) - yBarScale(yReferencePoint);
582
- const isHeightNegative = barHeight < 0;
583
- barHeight = Math.abs(barHeight);
584
- // Calculate threshold for minimum visible bar height
585
- const minBarHeight = _calculateMinBarHeight(_yMin, _yMax, yReferencePoint, yBarScale);
586
- let adjustedBarHeight = barHeight;
587
- if (barHeight === 0) {
588
- return /*#__PURE__*/ React.createElement(React.Fragment, {
589
- key: point.x
590
- }, " ");
591
- } else if (barHeight <= minBarHeight) {
592
- adjustedBarHeight = minBarHeight;
593
- }
594
- const xPoint = xBarScale(point.x) - _barWidth / 2;
595
- const yPoint = containerHeight - margins.bottom - (isHeightNegative ? -1 * adjustedBarHeight : adjustedBarHeight) - yBarScale(yReferencePoint);
596
- const baselineHeight = containerHeight - margins.bottom - yBarScale(yReferencePoint);
597
- return /*#__PURE__*/ React.createElement("g", {
598
- key: point.x instanceof Date ? `${point.x.getTime()}_${index}` : `${point.x}_${index}`
599
- }, /*#__PURE__*/ React.createElement("rect", {
600
- id: `${_vbcBarId}-${index}`,
601
- x: xPoint,
602
- className: classes.opacityChangeOnHover,
603
- y: !isHeightNegative ? yPoint : baselineHeight,
604
- width: _barWidth,
605
- height: adjustedBarHeight,
606
- ref: (e)=>{
607
- _refCallback(e, point.legend);
608
- },
609
- onClick: point.onClick,
610
- onMouseOver: (event)=>_onBarHover(point, colorScale(point.y), event),
611
- "aria-label": _getAriaLabel(point),
612
- role: "img",
613
- onMouseLeave: _onBarLeave,
614
- onFocus: (event)=>_onBarFocus(event, point, index, colorScale(point.y)),
615
- onBlur: _onBarLeave,
616
- fill: point.color && !useSingleColor ? point.color : colorScale(point.y),
617
- tabIndex: !props.hideTooltip && shouldHighlight ? 0 : undefined,
618
- rx: props.roundCorners ? 3 : 0,
619
- opacity: shouldHighlight ? 1 : 0.1
620
- }), _renderBarLabel(xPoint, yPoint, point.y, point.legend, isHeightNegative, point.barLabel));
621
- });
622
- return bars;
623
- }
624
- function _onLegendHover(legendTitle) {
625
- setActiveLegend(legendTitle);
626
- }
627
- function _onLegendLeave() {
628
- setActiveLegend(undefined);
629
- }
630
- function _getLegendData(data) {
631
- const { useSingleColor } = props;
632
- const { lineLegendText, lineLegendColor = tokens.colorPaletteYellowForeground1 } = props;
633
- const actions = [];
634
- const mapLegendToColor = {};
635
- data.forEach((point, _index)=>{
636
- // eslint-disable-next-line @typescript-eslint/no-shadow
637
- const color = !useSingleColor ? point.color : _createColors()(1);
638
- mapLegendToColor[point.legend] = color;
639
- });
640
- Object.entries(mapLegendToColor).forEach(([legendTitle, color])=>{
641
- // mapping data to the format Legends component needs
642
- const legend = {
643
- title: legendTitle,
644
- color,
645
- hoverAction: ()=>{
646
- _handleChartMouseLeave();
647
- _onLegendHover(legendTitle);
648
- },
649
- onMouseOutAction: ()=>{
650
- _onLegendLeave();
651
- }
652
- };
653
- actions.push(legend);
654
- });
655
- if (_isHavingLine && lineLegendText && lineLegendColor) {
656
- const lineLegend = {
657
- title: lineLegendText,
658
- color: lineLegendColor,
659
- hoverAction: ()=>{
660
- _handleChartMouseLeave();
661
- _onLegendHover(lineLegendText);
662
- },
663
- onMouseOutAction: ()=>{
664
- _onLegendLeave();
665
- },
666
- isLineLegendInBarChart: true
667
- };
668
- actions.unshift(lineLegend);
669
- }
670
- const legends = /*#__PURE__*/ React.createElement(Legends, {
671
- legends: actions,
672
- enabledWrapLines: props.enabledLegendsWrapLines,
673
- overflowText: props.legendsOverflowText,
674
- ...props.legendProps,
675
- selectedLegends: selectedLegends,
676
- onChange: _onLegendSelectionChange,
677
- legendRef: _legendsRef
678
- });
679
- return legends;
680
- }
681
- function _onLegendSelectionChange(legendsSelected, event, currentLegend) {
682
- var _props_legendProps, _props_legendProps1;
683
- if ((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.canSelectMultipleLegends) {
684
- setSelectedLegends(legendsSelected);
685
- } else {
686
- setSelectedLegends(legendsSelected.slice(-1));
687
- }
688
- if ((_props_legendProps1 = props.legendProps) === null || _props_legendProps1 === void 0 ? void 0 : _props_legendProps1.onChange) {
689
- props.legendProps.onChange(legendsSelected, event, currentLegend);
690
- }
691
- }
692
- function _getAxisData(yAxisData) {
693
- if (yAxisData && yAxisData.yAxisDomainValues.length) {
694
- const { yAxisDomainValues: domainValue } = yAxisData;
695
- _yMax = Math.max(domainValue[domainValue.length - 1], props.yMaxValue || 0);
696
- _yMin = Math.min(domainValue[0], props.yMinValue || 0);
697
- }
698
- }
699
- /**
700
- * This function checks if the given legend is highlighted or not.
701
- * A legend can be highlighted in 2 ways:
702
- * 1. selection: if the user clicks on it
703
- * 2. hovering: if there is no selected legend and the user hovers over it
704
- */ function _legendHighlighted(legendTitle) {
705
- return _getHighlightedLegend().includes(legendTitle);
706
- }
707
- /**
708
- * This function checks if none of the legends is selected or hovered.
709
- */ function _noLegendHighlighted() {
710
- return _getHighlightedLegend().length === 0;
711
- }
712
- function _getHighlightedLegend() {
713
- return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [
714
- activeLegend
715
- ] : [];
716
- }
717
- function _getAriaLabel(point) {
718
- var _point_lineData, _point_lineData1, _point_callOutAccessibilityData;
719
- const xValue = point.xAxisCalloutData ? point.xAxisCalloutData : point.x instanceof Date ? point.x.toLocaleString() : point.x;
720
- const legend = point.legend;
721
- const yValue = point.yAxisCalloutData || point.y;
722
- const lineLegend = props.lineLegendText || 'Line';
723
- const lineYValue = ((_point_lineData = point.lineData) === null || _point_lineData === void 0 ? void 0 : _point_lineData.yAxisCalloutData) || ((_point_lineData1 = point.lineData) === null || _point_lineData1 === void 0 ? void 0 : _point_lineData1.y);
724
- return ((_point_callOutAccessibilityData = point.callOutAccessibilityData) === null || _point_callOutAccessibilityData === void 0 ? void 0 : _point_callOutAccessibilityData.ariaLabel) || `${xValue}. ` + (legend ? `${legend}, ` : '') + `${yValue}.` + (typeof lineYValue !== 'undefined' ? ` ${lineLegend}, ${lineYValue}.` : '');
725
- }
726
- function _renderBarLabel(xPoint, yPoint, barValue, legend, isNegativeBar, customBarLabel) {
727
- if (props.hideLabels || _barWidth < 16 || !(_legendHighlighted(legend) || _noLegendHighlighted())) {
728
- return null;
729
- }
730
- // Use custom barLabel if provided, otherwise use the formatted barValue
731
- const displayLabel = customBarLabel !== undefined ? customBarLabel : typeof props.yAxisTickFormat === 'function' ? props.yAxisTickFormat(barValue) : formatScientificLimitWidth(barValue);
732
- return /*#__PURE__*/ React.createElement("text", {
733
- x: xPoint + _barWidth / 2,
734
- y: isNegativeBar ? yPoint + 12 : yPoint - 6,
735
- textAnchor: "middle",
736
- className: classes.barLabel,
737
- "aria-hidden": true,
738
- style: {
739
- direction: 'ltr',
740
- unicodeBidi: 'isolate'
741
- }
742
- }, displayLabel);
743
- }
744
- function _getDomainMargins(containerWidth) {
745
- var _props_data;
746
- _domainMargin = MIN_DOMAIN_MARGIN;
747
- const mapX = {};
748
- (_props_data = props.data) === null || _props_data === void 0 ? void 0 : _props_data.forEach((point)=>{
749
- if (point.x instanceof Date) {
750
- mapX[point.x.getTime()] = point.x;
751
- } else {
752
- mapX[point.x] = point.x;
753
- }
754
- });
755
- const uniqueX = Object.values(mapX);
756
- /** Total width available to render the bars */ const totalWidth = calcTotalWidth(containerWidth, margins, MIN_DOMAIN_MARGIN);
757
- if (_xAxisType === XAxisTypes.StringAxis) {
758
- if (isScalePaddingDefined(props.xAxisOuterPadding, props.xAxisPadding)) {
759
- // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available
760
- // to adjust the space before the first bar and after the last bar.
761
- _domainMargin = 0;
762
- } else if (props.barWidth !== 'auto' && props.mode !== 'histogram') {
763
- // Update the bar width so that when CartesianChart rerenders,
764
- // the following calculations don't use the previous bar width.
765
- _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);
766
- /** Total width required to render the bars. Directly proportional to bar width */ const reqWidth = calcRequiredWidth(_barWidth, uniqueX.length, _xAxisInnerPadding);
767
- if (totalWidth >= reqWidth) {
768
- // Center align the chart by setting equal left and right margins for domain
769
- _domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;
770
- }
771
- } else if ([
772
- 'plotly',
773
- 'histogram'
774
- ].includes(props.mode) && uniqueX.length > 1) {
775
- // Calculate the remaining width after rendering bars at their maximum allowable width
776
- const bandwidth = calcBandwidth(totalWidth, uniqueX.length, _xAxisInnerPadding);
777
- const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, bandwidth, props.mode);
778
- let reqWidth = calcRequiredWidth(barWidth, uniqueX.length, _xAxisInnerPadding);
779
- const margin1 = (totalWidth - reqWidth) / 2;
780
- let margin2 = Number.POSITIVE_INFINITY;
781
- // This logic may introduce gaps between histogram bars when the barWidth is restricted.
782
- // So disable it for histogram mode.
783
- if (props.mode !== 'histogram') {
784
- // Calculate the remaining width after accounting for the space required to render x-axis labels
785
- const step = calculateLongestLabelWidth(uniqueX) + 20;
786
- reqWidth = (uniqueX.length - _xAxisInnerPadding) * step;
787
- margin2 = (totalWidth - reqWidth) / 2;
788
- }
789
- _domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));
790
- }
791
- } else {
792
- if (props.mode === 'histogram') {
793
- // Try center-aligning the bars to eliminate any gaps caused by a restricted barWidth.
794
- // This only works if the bin centers are consistent across all legend groups; otherwise,
795
- // the calculated domainMargin may be too small.
796
- const barWidth = props.maxBarWidth;
797
- const reqWidth = calcRequiredWidth(barWidth, uniqueX.length, _xAxisInnerPadding);
798
- _domainMargin += Math.max(0, (totalWidth - reqWidth) / 2);
799
- }
800
- // The histogram may appear distorted when bin centers/sizes vary across different legend groups.
801
- // Currently, we calculate the appropriate bar width using the closest unique x-values to make
802
- // the bars of the same legend group adjacent. But these x-values can come from different legend groups
803
- // and result in misleading visuals. Even if we compute bar widths separately within each group,
804
- // we still lack support for rendering bars with different widths and must use the minimum width,
805
- // which can cause the same issue.
806
- // Solution: Instead of estimating the appropriate bar width, render each bar to span the full range
807
- // of its corresponding bin explicitly.
808
- _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, calculateAppropriateBarWidth(uniqueX, calcTotalWidth(containerWidth, margins, _domainMargin), _xAxisInnerPadding), props.mode);
809
- _domainMargin += _barWidth / 2;
810
- _domainMargin += _barWidth / 2;
811
- }
812
- return {
813
- ...margins,
814
- left: margins.left + _domainMargin,
815
- right: margins.right + _domainMargin
816
- };
817
- }
818
- function _getChartTitle() {
819
- const { chartTitle, data } = props;
820
- return (chartTitle ? `${chartTitle}. ` : '') + `Vertical bar chart with ${(data === null || data === void 0 ? void 0 : data.length) || 0} bars` + (_isHavingLine ? ' and 1 line' : '') + '. ';
821
- }
822
- function _isChartEmpty() {
823
- return _points.length === 0 || _points.every((point)=>point.y === 0) && !_isHavingLine;
824
- }
825
- function _getOrderedXAxisLabels() {
826
- if (_xAxisType !== XAxisTypes.StringAxis) {
827
- return [];
828
- }
829
- return sortAxisCategories(_mapCategoryToValues(), props.xAxisCategoryOrder);
830
- }
831
- function _mapCategoryToValues() {
832
- const categoryToValues = {};
833
- _points.forEach((point)=>{
834
- const xValue = point.x;
835
- if (!categoryToValues[xValue]) {
836
- categoryToValues[xValue] = [];
837
- }
838
- categoryToValues[xValue].push(point.y);
839
- if (point.lineData) {
840
- categoryToValues[xValue].push(point.lineData.y);
841
- }
842
- });
843
- return categoryToValues;
844
- }
845
- function updatePosition(newX, newY) {
846
- const threshold = 1; // Set a threshold for movement
847
- const { x, y } = clickPosition;
848
- // Calculate the distance moved
849
- const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));
850
- // Update the position only if the distance moved is greater than the threshold
851
- if (distance > threshold) {
852
- setClickPosition({
853
- x: newX,
854
- y: newY
855
- });
856
- setPopoverOpen(true);
857
- }
858
- }
859
- _adjustProps();
860
- _xAxisLabels = _getOrderedXAxisLabels();
861
- _yMax = Math.max(d3Max(_points, (point)=>point.y), props.yMaxValue || 0);
862
- _yMin = Math.min(d3Min(_points, (point)=>point.y), props.yMinValue || 0);
863
- const legendBars = _getLegendData(_points);
864
- const calloutProps = {
865
- ..._isHavingLine && {
866
- YValueHover: hoveredYValues,
867
- hoverXValue
868
- },
869
- color,
870
- legend: calloutLegend,
871
- XValue: xCalloutValue,
872
- YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,
873
- ...props.calloutProps,
874
- ...getAccessibleDataObject(callOutAccessibilityData),
875
- clickPosition,
876
- isPopoverOpen,
877
- isCalloutForStack: _isHavingLine && (_noLegendHighlighted() || _getHighlightedLegend().length > 1),
878
- culture: props.culture,
879
- isCartesian: true,
880
- customCallout: {
881
- customizedCallout: _getCustomizedCallout() != null ? _getCustomizedCallout() : undefined,
882
- customCalloutProps: props.calloutPropsPerDataPoint ? props.calloutPropsPerDataPoint(dataPointCalloutProps) : undefined
883
- }
884
- };
885
- const tickParams = {
886
- tickValues: props.tickValues,
887
- tickFormat: props.tickFormat
888
- };
889
- return !_isChartEmpty() ? /*#__PURE__*/ React.createElement(CartesianChart, {
890
- ...props,
891
- points: _points,
892
- chartTitle: _getChartTitle(),
893
- chartType: ChartTypes.VerticalBarChart,
894
- xAxisType: _xAxisType,
895
- createYAxis: createNumericYAxis,
896
- calloutProps: calloutProps,
897
- tickParams: tickParams,
898
- ..._isHavingLine && _noLegendHighlighted() && {
899
- isCalloutForStack: true
900
- },
901
- legendBars: legendBars,
902
- datasetForXAxisDomain: _xAxisLabels,
903
- barwidth: _barWidth,
904
- createStringYAxis: createStringYAxis,
905
- getmargins: _getMargins,
906
- getMinMaxOfYAxis: findVerticalNumericMinMaxOfY,
907
- getGraphData: _getGraphData,
908
- getDomainNRangeValues: _getDomainNRangeValues,
909
- getAxisData: _getAxisData,
910
- onChartMouseLeave: _handleChartMouseLeave,
911
- getDomainMargins: _getDomainMargins,
912
- ..._xAxisType === XAxisTypes.StringAxis && {
913
- xAxisInnerPadding: _xAxisInnerPadding,
914
- xAxisOuterPadding: _xAxisOuterPadding
915
- },
916
- componentRef: cartesianChartRef,
917
- showRoundOffXTickValues: !isScalePaddingDefined(props.xAxisInnerPadding, props.xAxisPadding) && props.mode !== 'histogram',
918
- /* eslint-disable react/jsx-no-bind */ children: (props)=>{
919
- return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("g", null, _bars), _isHavingLine && /*#__PURE__*/ React.createElement("g", null, _createLine(props.xScale, props.yScalePrimary, props.containerHeight, props.containerWidth, props.yScaleSecondary)));
920
- }
921
- }) : /*#__PURE__*/ React.createElement("div", {
922
- id: _emptyChartId,
923
- role: 'alert',
924
- style: {
925
- opacity: '0'
926
- },
927
- "aria-label": 'Graph has no data to display'
928
- });
929
- });
930
- VerticalBarChart.displayName = 'VerticalBarChart';