@fluentui/react-charts 1.2.0 → 9.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. package/CHANGELOG.md +193 -15
  2. package/LICENSE +11 -17
  3. package/README.md +174 -23
  4. package/dist/index.d.ts +2143 -0
  5. package/lib/CartesianChart.js +1 -0
  6. package/lib/CartesianChart.js.map +1 -0
  7. package/lib/DeclarativeChart.js +1 -0
  8. package/lib/DeclarativeChart.js.map +1 -0
  9. package/lib/DonutChart.js +1 -0
  10. package/lib/DonutChart.js.map +1 -0
  11. package/lib/HorizontalBarChart.js +1 -0
  12. package/lib/HorizontalBarChart.js.map +1 -0
  13. package/lib/Legends.js +1 -0
  14. package/lib/Legends.js.map +1 -0
  15. package/lib/LineChart.js +1 -0
  16. package/lib/LineChart.js.map +1 -0
  17. package/lib/Popover.js +1 -0
  18. package/lib/Popover.js.map +1 -0
  19. package/lib/ResponsiveContainer.js +1 -0
  20. package/lib/ResponsiveContainer.js.map +1 -0
  21. package/lib/Sparkline.js +1 -0
  22. package/lib/Sparkline.js.map +1 -0
  23. package/lib/VerticalBarChart.js +1 -0
  24. package/lib/VerticalBarChart.js.map +1 -0
  25. package/lib/components/CommonComponents/CartesianChart.js +462 -0
  26. package/lib/components/CommonComponents/CartesianChart.js.map +1 -0
  27. package/lib/components/CommonComponents/CartesianChart.types.js +1 -0
  28. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -0
  29. package/lib/components/CommonComponents/ChartPopover.js +187 -0
  30. package/lib/components/CommonComponents/ChartPopover.js.map +1 -0
  31. package/lib/components/CommonComponents/ChartPopover.types.js +1 -0
  32. package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -0
  33. package/lib/components/CommonComponents/index.js +4 -0
  34. package/lib/components/CommonComponents/index.js.map +1 -0
  35. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +229 -0
  36. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -0
  37. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +178 -0
  38. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -0
  39. package/lib/components/DeclarativeChart/DeclarativeChart.js +150 -0
  40. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
  41. package/lib/components/DeclarativeChart/PlotlySchema.js +7 -0
  42. package/lib/components/DeclarativeChart/PlotlySchema.js.map +1 -0
  43. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +400 -0
  44. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
  45. package/lib/components/DeclarativeChart/imageExporter.js +221 -0
  46. package/lib/components/DeclarativeChart/imageExporter.js.map +1 -0
  47. package/lib/components/DeclarativeChart/index.js +1 -0
  48. package/lib/components/DeclarativeChart/index.js.map +1 -0
  49. package/lib/components/DonutChart/Arc/Arc.js +110 -0
  50. package/lib/components/DonutChart/Arc/Arc.js.map +1 -0
  51. package/lib/components/DonutChart/Arc/Arc.types.js +1 -0
  52. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -0
  53. package/lib/components/DonutChart/Arc/index.js +2 -0
  54. package/lib/components/DonutChart/Arc/index.js.map +1 -0
  55. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +54 -0
  56. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -0
  57. package/lib/components/DonutChart/DonutChart.js +291 -0
  58. package/lib/components/DonutChart/DonutChart.js.map +1 -0
  59. package/lib/components/DonutChart/DonutChart.types.js +1 -0
  60. package/lib/components/DonutChart/DonutChart.types.js.map +1 -0
  61. package/lib/components/DonutChart/Pie/Pie.js +72 -0
  62. package/lib/components/DonutChart/Pie/Pie.js.map +1 -0
  63. package/lib/components/DonutChart/Pie/Pie.types.js +1 -0
  64. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -0
  65. package/lib/components/DonutChart/Pie/index.js +2 -0
  66. package/lib/components/DonutChart/Pie/index.js.map +1 -0
  67. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +44 -0
  68. package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -0
  69. package/lib/components/DonutChart/index.js +3 -0
  70. package/lib/components/DonutChart/index.js.map +1 -0
  71. package/lib/components/DonutChart/useDonutChartStyles.styles.js +58 -0
  72. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -0
  73. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +402 -0
  74. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
  75. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +6 -0
  76. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -0
  77. package/lib/components/HorizontalBarChart/index.js +3 -0
  78. package/lib/components/HorizontalBarChart/index.js.map +1 -0
  79. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +163 -0
  80. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -0
  81. package/lib/components/Legends/Legends.js +302 -0
  82. package/lib/components/Legends/Legends.js.map +1 -0
  83. package/lib/components/Legends/Legends.types.js +1 -0
  84. package/lib/components/Legends/Legends.types.js.map +1 -0
  85. package/lib/components/Legends/OverflowMenu.js +25 -0
  86. package/lib/components/Legends/OverflowMenu.js.map +1 -0
  87. package/lib/components/Legends/index.js +3 -0
  88. package/lib/components/Legends/index.js.map +1 -0
  89. package/lib/components/Legends/shape.js +35 -0
  90. package/lib/components/Legends/shape.js.map +1 -0
  91. package/lib/components/Legends/useLegendsStyles.styles.js +147 -0
  92. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -0
  93. package/lib/components/LineChart/LineChart.js +1026 -0
  94. package/lib/components/LineChart/LineChart.js.map +1 -0
  95. package/lib/components/LineChart/LineChart.types.js +3 -0
  96. package/lib/components/LineChart/LineChart.types.js.map +1 -0
  97. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +119 -0
  98. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -0
  99. package/lib/components/LineChart/eventAnnotation/LabelLink.js +57 -0
  100. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -0
  101. package/lib/components/LineChart/eventAnnotation/Textbox.js +40 -0
  102. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -0
  103. package/lib/components/LineChart/index.js +4 -0
  104. package/lib/components/LineChart/index.js.map +1 -0
  105. package/lib/components/LineChart/useLineChartStyles.styles.js +65 -0
  106. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -0
  107. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +65 -0
  108. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -0
  109. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js +1 -0
  110. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -0
  111. package/lib/components/ResponsiveContainer/index.js +1 -0
  112. package/lib/components/ResponsiveContainer/index.js.map +1 -0
  113. package/lib/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js +23 -0
  114. package/lib/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js.map +1 -0
  115. package/lib/components/Sparkline/Sparkline.js +119 -0
  116. package/lib/components/Sparkline/Sparkline.js.map +1 -0
  117. package/lib/components/Sparkline/Sparkline.types.js +4 -0
  118. package/lib/components/Sparkline/Sparkline.types.js.map +1 -0
  119. package/lib/components/Sparkline/index.js +3 -0
  120. package/lib/components/Sparkline/index.js.map +1 -0
  121. package/lib/components/Sparkline/useSparklineStyles.styles.js +49 -0
  122. package/lib/components/Sparkline/useSparklineStyles.styles.js.map +1 -0
  123. package/lib/components/VerticalBarChart/VerticalBarChart.js +849 -0
  124. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -0
  125. package/lib/components/VerticalBarChart/VerticalBarChart.types.js +4 -0
  126. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -0
  127. package/lib/components/VerticalBarChart/index.js +3 -0
  128. package/lib/components/VerticalBarChart/index.js.map +1 -0
  129. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +74 -0
  130. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -0
  131. package/lib/index.js +12 -8
  132. package/lib/index.js.map +1 -1
  133. package/lib/types/DataPoint.js +3 -0
  134. package/lib/types/DataPoint.js.map +1 -0
  135. package/lib/types/EventAnnotation.js +1 -0
  136. package/lib/types/EventAnnotation.js.map +1 -0
  137. package/lib/types/LegendDataItem.js +1 -0
  138. package/lib/types/LegendDataItem.js.map +1 -0
  139. package/lib/types/index.js +2 -2
  140. package/lib/types/index.js.map +1 -1
  141. package/lib/utilities/FocusableTooltipText.js +65 -0
  142. package/lib/utilities/FocusableTooltipText.js.map +1 -0
  143. package/lib/utilities/KeyCodes.js +8 -0
  144. package/lib/utilities/KeyCodes.js.map +1 -0
  145. package/lib/utilities/SVGTooltipText.js +138 -0
  146. package/lib/utilities/SVGTooltipText.js.map +1 -0
  147. package/lib/utilities/async-utils.js +380 -0
  148. package/lib/utilities/async-utils.js.map +1 -0
  149. package/lib/utilities/colors.js +249 -0
  150. package/lib/utilities/colors.js.map +1 -0
  151. package/lib/utilities/getWindow.js +25 -0
  152. package/lib/utilities/getWindow.js.map +1 -0
  153. package/lib/utilities/index.js +3 -0
  154. package/lib/utilities/index.js.map +1 -0
  155. package/lib/utilities/locale-util.js +15 -0
  156. package/lib/utilities/locale-util.js.map +1 -0
  157. package/lib/utilities/overflow-utils.js +27 -0
  158. package/lib/utilities/overflow-utils.js.map +1 -0
  159. package/lib/utilities/test-data.js +276 -0
  160. package/lib/utilities/test-data.js.map +1 -0
  161. package/lib/utilities/utilities.js +1215 -0
  162. package/lib/utilities/utilities.js.map +1 -0
  163. package/lib/utilities/vbc-utils.js +27 -0
  164. package/lib/utilities/vbc-utils.js.map +1 -0
  165. package/lib-commonjs/CartesianChart.js +6 -0
  166. package/lib-commonjs/CartesianChart.js.map +1 -0
  167. package/lib-commonjs/DeclarativeChart.js +6 -0
  168. package/lib-commonjs/DeclarativeChart.js.map +1 -0
  169. package/lib-commonjs/DonutChart.js +6 -0
  170. package/lib-commonjs/DonutChart.js.map +1 -0
  171. package/lib-commonjs/HorizontalBarChart.js +6 -0
  172. package/lib-commonjs/HorizontalBarChart.js.map +1 -0
  173. package/lib-commonjs/Legends.js +6 -0
  174. package/lib-commonjs/Legends.js.map +1 -0
  175. package/lib-commonjs/LineChart.js +6 -0
  176. package/lib-commonjs/LineChart.js.map +1 -0
  177. package/lib-commonjs/Popover.js +6 -0
  178. package/lib-commonjs/Popover.js.map +1 -0
  179. package/lib-commonjs/ResponsiveContainer.js +6 -0
  180. package/lib-commonjs/ResponsiveContainer.js.map +1 -0
  181. package/lib-commonjs/Sparkline.js +6 -0
  182. package/lib-commonjs/Sparkline.js.map +1 -0
  183. package/lib-commonjs/VerticalBarChart.js +6 -0
  184. package/lib-commonjs/VerticalBarChart.js.map +1 -0
  185. package/lib-commonjs/components/CommonComponents/CartesianChart.js +469 -0
  186. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -0
  187. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js +6 -0
  188. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -0
  189. package/lib-commonjs/components/CommonComponents/ChartPopover.js +197 -0
  190. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -0
  191. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js +4 -0
  192. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +1 -0
  193. package/lib-commonjs/components/CommonComponents/index.js +9 -0
  194. package/lib-commonjs/components/CommonComponents/index.js.map +1 -0
  195. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +356 -0
  196. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -0
  197. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +261 -0
  198. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -0
  199. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +158 -0
  200. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
  201. package/lib-commonjs/components/DeclarativeChart/PlotlySchema.js +10 -0
  202. package/lib-commonjs/components/DeclarativeChart/PlotlySchema.js.map +1 -0
  203. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +445 -0
  204. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
  205. package/lib-commonjs/components/DeclarativeChart/imageExporter.js +231 -0
  206. package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -0
  207. package/lib-commonjs/components/DeclarativeChart/index.js +6 -0
  208. package/lib-commonjs/components/DeclarativeChart/index.js.map +1 -0
  209. package/lib-commonjs/components/DonutChart/Arc/Arc.js +117 -0
  210. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -0
  211. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js +4 -0
  212. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -0
  213. package/lib-commonjs/components/DonutChart/Arc/index.js +7 -0
  214. package/lib-commonjs/components/DonutChart/Arc/index.js.map +1 -0
  215. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +83 -0
  216. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -0
  217. package/lib-commonjs/components/DonutChart/DonutChart.js +298 -0
  218. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -0
  219. package/lib-commonjs/components/DonutChart/DonutChart.types.js +6 -0
  220. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -0
  221. package/lib-commonjs/components/DonutChart/Pie/Pie.js +79 -0
  222. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -0
  223. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js +4 -0
  224. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -0
  225. package/lib-commonjs/components/DonutChart/Pie/index.js +7 -0
  226. package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -0
  227. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +61 -0
  228. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -0
  229. package/lib-commonjs/components/DonutChart/index.js +8 -0
  230. package/lib-commonjs/components/DonutChart/index.js.map +1 -0
  231. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +82 -0
  232. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -0
  233. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +408 -0
  234. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
  235. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +17 -0
  236. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -0
  237. package/lib-commonjs/components/HorizontalBarChart/index.js +8 -0
  238. package/lib-commonjs/components/HorizontalBarChart/index.js.map +1 -0
  239. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +251 -0
  240. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -0
  241. package/lib-commonjs/components/Legends/Legends.js +313 -0
  242. package/lib-commonjs/components/Legends/Legends.js.map +1 -0
  243. package/lib-commonjs/components/Legends/Legends.types.js +6 -0
  244. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -0
  245. package/lib-commonjs/components/Legends/OverflowMenu.js +36 -0
  246. package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -0
  247. package/lib-commonjs/components/Legends/index.js +8 -0
  248. package/lib-commonjs/components/Legends/index.js.map +1 -0
  249. package/lib-commonjs/components/Legends/shape.js +46 -0
  250. package/lib-commonjs/components/Legends/shape.js.map +1 -0
  251. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +304 -0
  252. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -0
  253. package/lib-commonjs/components/LineChart/LineChart.js +1032 -0
  254. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -0
  255. package/lib-commonjs/components/LineChart/LineChart.types.js +6 -0
  256. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -0
  257. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +129 -0
  258. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -0
  259. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +68 -0
  260. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -0
  261. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +51 -0
  262. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -0
  263. package/lib-commonjs/components/LineChart/index.js +9 -0
  264. package/lib-commonjs/components/LineChart/index.js.map +1 -0
  265. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +96 -0
  266. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -0
  267. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +76 -0
  268. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -0
  269. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js +6 -0
  270. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -0
  271. package/lib-commonjs/components/ResponsiveContainer/index.js +6 -0
  272. package/lib-commonjs/components/ResponsiveContainer/index.js.map +1 -0
  273. package/lib-commonjs/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js +47 -0
  274. package/lib-commonjs/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js.map +1 -0
  275. package/lib-commonjs/components/Sparkline/Sparkline.js +125 -0
  276. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -0
  277. package/lib-commonjs/components/Sparkline/Sparkline.types.js +7 -0
  278. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -0
  279. package/lib-commonjs/components/Sparkline/index.js +8 -0
  280. package/lib-commonjs/components/Sparkline/index.js.map +1 -0
  281. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +77 -0
  282. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +1 -0
  283. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +851 -0
  284. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -0
  285. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js +7 -0
  286. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -0
  287. package/lib-commonjs/components/VerticalBarChart/index.js +8 -0
  288. package/lib-commonjs/components/VerticalBarChart/index.js.map +1 -0
  289. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +117 -0
  290. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -0
  291. package/lib-commonjs/index.js +17 -0
  292. package/lib-commonjs/index.js.map +1 -0
  293. package/lib-commonjs/types/DataPoint.js +6 -0
  294. package/lib-commonjs/types/DataPoint.js.map +1 -0
  295. package/lib-commonjs/types/EventAnnotation.js +6 -0
  296. package/lib-commonjs/types/EventAnnotation.js.map +1 -0
  297. package/lib-commonjs/types/LegendDataItem.js +4 -0
  298. package/lib-commonjs/types/LegendDataItem.js.map +1 -0
  299. package/lib-commonjs/types/index.js +7 -0
  300. package/lib-commonjs/types/index.js.map +1 -0
  301. package/lib-commonjs/utilities/FocusableTooltipText.js +75 -0
  302. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -0
  303. package/lib-commonjs/utilities/KeyCodes.js +18 -0
  304. package/lib-commonjs/utilities/KeyCodes.js.map +1 -0
  305. package/lib-commonjs/utilities/SVGTooltipText.js +148 -0
  306. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -0
  307. package/lib-commonjs/utilities/async-utils.js +382 -0
  308. package/lib-commonjs/utilities/async-utils.js.map +1 -0
  309. package/lib-commonjs/utilities/colors.js +270 -0
  310. package/lib-commonjs/utilities/colors.js.map +1 -0
  311. package/lib-commonjs/utilities/getWindow.js +28 -0
  312. package/lib-commonjs/utilities/getWindow.js.map +1 -0
  313. package/lib-commonjs/utilities/index.js +8 -0
  314. package/lib-commonjs/utilities/index.js.map +1 -0
  315. package/lib-commonjs/utilities/locale-util.js +25 -0
  316. package/lib-commonjs/utilities/locale-util.js.map +1 -0
  317. package/lib-commonjs/utilities/overflow-utils.js +36 -0
  318. package/lib-commonjs/utilities/overflow-utils.js.map +1 -0
  319. package/lib-commonjs/utilities/test-data.js +324 -0
  320. package/lib-commonjs/utilities/test-data.js.map +1 -0
  321. package/lib-commonjs/utilities/utilities.js +1184 -0
  322. package/lib-commonjs/utilities/utilities.js.map +1 -0
  323. package/lib-commonjs/utilities/vbc-utils.js +45 -0
  324. package/lib-commonjs/utilities/vbc-utils.js.map +1 -0
  325. package/package.json +80 -72
  326. package/CHANGELOG.json +0 -65
  327. package/lib/chart/chart-legend.d.ts +0 -6
  328. package/lib/chart/chart-legend.js +0 -445
  329. package/lib/chart/chart-legend.js.map +0 -1
  330. package/lib/chart/chart-render.d.ts +0 -3
  331. package/lib/chart/chart-render.js +0 -50
  332. package/lib/chart/chart-render.js.map +0 -1
  333. package/lib/chart/chart.d.ts +0 -3
  334. package/lib/chart/chart.js +0 -10
  335. package/lib/chart/chart.js.map +0 -1
  336. package/lib/chart/index.d.ts +0 -1
  337. package/lib/chart/index.js +0 -2
  338. package/lib/chart/index.js.map +0 -1
  339. package/lib/index.d.ts +0 -7
  340. package/lib/lib/builder.d.ts +0 -89
  341. package/lib/lib/builder.js +0 -379
  342. package/lib/lib/builder.js.map +0 -1
  343. package/lib/lib/datasets.d.ts +0 -123
  344. package/lib/lib/datasets.js +0 -285
  345. package/lib/lib/datasets.js.map +0 -1
  346. package/lib/lib/patterns.d.ts +0 -43
  347. package/lib/lib/patterns.js +0 -433
  348. package/lib/lib/patterns.js.map +0 -1
  349. package/lib/lib/plugins.d.ts +0 -11
  350. package/lib/lib/plugins.js +0 -403
  351. package/lib/lib/plugins.js.map +0 -1
  352. package/lib/lib/settings.d.ts +0 -12
  353. package/lib/lib/settings.js +0 -368
  354. package/lib/lib/settings.js.map +0 -1
  355. package/lib/lib/storybook.d.ts +0 -11
  356. package/lib/lib/storybook.js +0 -13
  357. package/lib/lib/storybook.js.map +0 -1
  358. package/lib/lib/utils.d.ts +0 -34
  359. package/lib/lib/utils.js +0 -253
  360. package/lib/lib/utils.js.map +0 -1
  361. package/lib/types/index.d.ts +0 -1
  362. package/lib/types/types.d.ts +0 -101
  363. package/lib/types/types.js +0 -41
  364. package/lib/types/types.js.map +0 -1
@@ -0,0 +1,851 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "VerticalBarChart", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return VerticalBarChart;
9
+ }
10
+ });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _useVerticalBarChartStylesstyles = require("./useVerticalBarChartStyles.styles");
14
+ const _d3array = require("d3-array");
15
+ const _d3shape = require("d3-shape");
16
+ const _d3selection = require("d3-selection");
17
+ const _d3scale = require("d3-scale");
18
+ const _reactutilities = require("@fluentui/react-utilities");
19
+ const _reacttheme = require("@fluentui/react-theme");
20
+ const _index = require("../../index");
21
+ const _index1 = require("../../utilities/index");
22
+ var CircleVisbility;
23
+ (function(CircleVisbility) {
24
+ CircleVisbility["show"] = "visibility";
25
+ CircleVisbility["hide"] = "hidden";
26
+ })(CircleVisbility || (CircleVisbility = {}));
27
+ const MIN_DOMAIN_MARGIN = 8;
28
+ const VerticalBarChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
29
+ let _points = [];
30
+ let _barWidth = 0;
31
+ let _colors;
32
+ const _refArray = [];
33
+ let margins;
34
+ const _useRtl = (0, _index1.useRtl)();
35
+ let _bars;
36
+ let _xAxisLabels;
37
+ let _yMax;
38
+ let _isHavingLine = _checkForLine();
39
+ const _tooltipId = (0, _reactutilities.useId)('VCTooltipID_');
40
+ const _xAxisType = props.data && props.data.length > 0 ? (0, _index1.getTypeOfAxis)(props.data[0].x, true) : _index1.XAxisTypes.StringAxis;
41
+ let _calloutAnchorPoint;
42
+ let _domainMargin;
43
+ const _emptyChartId = (0, _reactutilities.useId)('_VBC_empty');
44
+ const _vbcLineId = (0, _reactutilities.useId)('_VBC_line_');
45
+ const _vbcPointId = (0, _reactutilities.useId)('_VBC_point_');
46
+ const _vbcBarId = (0, _reactutilities.useId)('_VBC_bar_');
47
+ let _xAxisInnerPadding = 0;
48
+ let _xAxisOuterPadding = 0;
49
+ const cartesianChartRef = _react.useRef(null);
50
+ const [color, setColor] = _react.useState('');
51
+ const [dataForHoverCard, setDataForHoverCard] = _react.useState(0);
52
+ const [selectedLegend, setSelectedLegend] = _react.useState('');
53
+ const [activeLegend, setActiveLegend] = _react.useState('');
54
+ const [xCalloutValue, setXCalloutValue] = _react.useState('');
55
+ const [yCalloutValue, setYCalloutValue] = _react.useState('');
56
+ const [activeXdataPoint, setActiveXDatapoint] = _react.useState(null);
57
+ const [YValueHover, setYValueHover] = _react.useState();
58
+ const [hoverXValue, setHoverXValue] = _react.useState('');
59
+ const [calloutLegend, setCalloutLegend] = _react.useState('');
60
+ const [callOutAccessibilityData, setCalloutAccessibilityData] = _react.useState();
61
+ const [dataPointCalloutProps, setDataPointCalloutProps] = _react.useState();
62
+ const [clickPosition, setClickPosition] = _react.useState({
63
+ x: 0,
64
+ y: 0
65
+ });
66
+ const [isPopoverOpen, setPopoverOpen] = _react.useState(false);
67
+ _react.useImperativeHandle(props.componentRef, ()=>{
68
+ var _cartesianChartRef_current;
69
+ var _cartesianChartRef_current_chartContainer;
70
+ return {
71
+ chartContainer: (_cartesianChartRef_current_chartContainer = (_cartesianChartRef_current = cartesianChartRef.current) === null || _cartesianChartRef_current === void 0 ? void 0 : _cartesianChartRef_current.chartContainer) !== null && _cartesianChartRef_current_chartContainer !== void 0 ? _cartesianChartRef_current_chartContainer : null
72
+ };
73
+ }, []);
74
+ function _createLine(xScale, yScale, containerHeight = 0, containerWidth = 0, yScaleSecondary) {
75
+ var _props_lineOptions;
76
+ const isStringAxis = _xAxisType === _index1.XAxisTypes.StringAxis;
77
+ const colorScale = _createColors();
78
+ const { data, lineLegendColor = _reacttheme.tokens.colorPaletteYellowBackground1, lineLegendText } = props;
79
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
80
+ const lineData = [];
81
+ const line = [];
82
+ data && data.forEach((item, index)=>{
83
+ if (item.lineData && item.lineData.y) {
84
+ var _item_lineData_useSecondaryYScale;
85
+ lineData.push({
86
+ x: item.x,
87
+ y: item.lineData.y,
88
+ useSecondaryYScale: (_item_lineData_useSecondaryYScale = item.lineData.useSecondaryYScale) !== null && _item_lineData_useSecondaryYScale !== void 0 ? _item_lineData_useSecondaryYScale : false,
89
+ point: item,
90
+ index
91
+ });
92
+ }
93
+ });
94
+ const linePath = (0, _d3shape.line)() // eslint-disable-next-line @typescript-eslint/no-explicit-any
95
+ .x((d)=>isStringAxis ? xScale(d.x) + 0.5 * xScale.bandwidth() : xScale(d.x)) // eslint-disable-next-line @typescript-eslint/no-explicit-any
96
+ .y((d)=>d.useSecondaryYScale && yScaleSecondary ? yScaleSecondary(d.y) : yScale(d.y));
97
+ const shouldHighlight = _legendHighlighted(lineLegendText) || _noLegendHighlighted() ? true : false;
98
+ const lineBorderWidth = ((_props_lineOptions = props.lineOptions) === null || _props_lineOptions === void 0 ? void 0 : _props_lineOptions.lineBorderWidth) ? Number.parseFloat(props.lineOptions.lineBorderWidth.toString()) : 0;
99
+ if (lineBorderWidth > 0) {
100
+ line.push(/*#__PURE__*/ _react.createElement("path", {
101
+ key: _vbcLineId,
102
+ id: _vbcLineId,
103
+ opacity: shouldHighlight ? 1 : 0.1,
104
+ d: linePath(lineData),
105
+ fill: "transparent",
106
+ strokeLinecap: "square",
107
+ strokeWidth: 3 + lineBorderWidth * 2,
108
+ stroke: _reacttheme.tokens.colorNeutralBackground1
109
+ }));
110
+ }
111
+ line.push(/*#__PURE__*/ _react.createElement("path", {
112
+ key: _vbcLineId,
113
+ id: _vbcLineId,
114
+ opacity: shouldHighlight ? 1 : 0.1,
115
+ d: linePath(lineData),
116
+ fill: "transparent",
117
+ strokeLinecap: "square",
118
+ strokeWidth: 3,
119
+ stroke: lineLegendColor
120
+ }));
121
+ const dots = lineData.map((item, index)=>{
122
+ var _item_point_lineData;
123
+ // Create an object to store line point ref so that the object can be passed by reference to the focus handler
124
+ const circleRef = {
125
+ refElement: null
126
+ };
127
+ return /*#__PURE__*/ _react.createElement("circle", {
128
+ key: index,
129
+ id: `${_vbcPointId}-${index}`,
130
+ cx: isStringAxis ? xScale(item.x) + 0.5 * xScale.bandwidth() : xScale(item.x),
131
+ cy: item.useSecondaryYScale && yScaleSecondary ? yScaleSecondary(item.y) : yScale(item.y),
132
+ onMouseOver: _legendHighlighted(lineLegendText) ? _lineHover.bind(item.point) : (event)=>_onBarHover(item.point, colorScale(item.y), event),
133
+ onMouseOut: _onBarLeave,
134
+ r: _getCircleVisibilityAndRadius(item.x, lineLegendText).radius,
135
+ stroke: lineLegendColor,
136
+ fill: _reacttheme.tokens.colorNeutralBackground1,
137
+ strokeWidth: 3,
138
+ visibility: _getCircleVisibilityAndRadius(item.x, lineLegendText).visibility,
139
+ onClick: (_item_point_lineData = item.point.lineData) === null || _item_point_lineData === void 0 ? void 0 : _item_point_lineData.onClick,
140
+ // When no legend is highlighted: Line points are automatically displayed along with the bars
141
+ // at the same x-axis point in the stack callout. So to prevent an increase in focusable elements
142
+ // and avoid conveying duplicate info, make these line points non-focusable.
143
+ "data-is-focusable": _legendHighlighted(lineLegendText),
144
+ ref: (e)=>circleRef.refElement = e,
145
+ onFocus: _lineFocus.bind(item.point, circleRef),
146
+ onBlur: _handleChartMouseLeave
147
+ });
148
+ });
149
+ return /*#__PURE__*/ _react.createElement(_react.Fragment, null, line, dots);
150
+ }
151
+ function _getCircleVisibilityAndRadius(xAxisPoint, legend) {
152
+ if (selectedLegend !== '') {
153
+ if (xAxisPoint === activeXdataPoint && selectedLegend === legend) {
154
+ return {
155
+ visibility: "visibility",
156
+ radius: 8
157
+ };
158
+ } else if (selectedLegend === legend) {
159
+ // Don't hide the circle to keep it focusable. For more information,
160
+ // see https://fuzzbomb.github.io/accessibility-demos/visually-hidden-focus-test.html
161
+ return {
162
+ visibility: "visibility",
163
+ radius: 0.3
164
+ };
165
+ } else {
166
+ return {
167
+ visibility: "hidden",
168
+ radius: 0
169
+ };
170
+ }
171
+ } else {
172
+ return {
173
+ visibility: activeXdataPoint === xAxisPoint ? "visibility" : "hidden",
174
+ radius: 8
175
+ };
176
+ }
177
+ }
178
+ function _checkForLine() {
179
+ const { data } = props;
180
+ return data.some((item)=>{
181
+ var _item_lineData;
182
+ return (item === null || item === void 0 ? void 0 : (_item_lineData = item.lineData) === null || _item_lineData === void 0 ? void 0 : _item_lineData.y) !== undefined;
183
+ });
184
+ }
185
+ function _adjustProps() {
186
+ _points = props.data || [];
187
+ _barWidth = (0, _index1.getBarWidth)(props.barWidth, props.maxBarWidth);
188
+ const defaultColors = [
189
+ _reacttheme.tokens.colorPaletteBlueForeground2,
190
+ _reacttheme.tokens.colorPaletteCornflowerForeground2,
191
+ _reacttheme.tokens.colorPaletteDarkGreenForeground2,
192
+ _reacttheme.tokens.colorPaletteNavyForeground2,
193
+ _reacttheme.tokens.colorPaletteDarkOrangeForeground2
194
+ ];
195
+ _colors = props.colors || defaultColors;
196
+ _isHavingLine = _checkForLine();
197
+ _xAxisInnerPadding = (0, _index1.getScalePadding)(props.xAxisInnerPadding, props.xAxisPadding, 2 / 3);
198
+ _xAxisOuterPadding = (0, _index1.getScalePadding)(props.xAxisOuterPadding, props.xAxisPadding, 0);
199
+ }
200
+ function _getMargins(_margins) {
201
+ margins = _margins;
202
+ }
203
+ function _renderContentForBothLineAndBars(point) {
204
+ // eslint-disable-next-line @typescript-eslint/no-shadow
205
+ const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);
206
+ const content = YValueHover.map((item, index)=>{
207
+ var _props_culture;
208
+ return /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement(_index.ChartPopover, {
209
+ culture: (_props_culture = props.culture) !== null && _props_culture !== void 0 ? _props_culture : 'en-us',
210
+ clickPosition: clickPosition,
211
+ isPopoverOpen: isPopoverOpen,
212
+ legend: item.legend,
213
+ ...index === 0 && {
214
+ XValue: `${hoverXValue || item.data}`
215
+ },
216
+ YValue: item.data || item.y,
217
+ color: item.color,
218
+ isCalloutForStack: false
219
+ }));
220
+ });
221
+ return /*#__PURE__*/ _react.createElement(_react.Fragment, null, content);
222
+ }
223
+ function _renderContentForOnlyBars(_props) {
224
+ var _props_culture;
225
+ return /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement(_index.ChartPopover, {
226
+ XValue: _props.xAxisCalloutData || _props.x,
227
+ xCalloutValue: xCalloutValue,
228
+ yCalloutValue: yCalloutValue,
229
+ culture: (_props_culture = props.culture) !== null && _props_culture !== void 0 ? _props_culture : 'en-us',
230
+ clickPosition: clickPosition,
231
+ isPopoverOpen: isPopoverOpen,
232
+ legend: _props.legend,
233
+ YValue: _props.yAxisCalloutData || _props.y,
234
+ color: !props.useSingleColor && _props.color ? _props.color : _createColors()(_props.y),
235
+ isCalloutForStack: false
236
+ }));
237
+ }
238
+ // eslint-disable-next-line @typescript-eslint/no-shadow
239
+ function _renderCallout(props) {
240
+ return props ? _isHavingLine ? _renderContentForBothLineAndBars(props) : _renderContentForOnlyBars(props) : null;
241
+ }
242
+ function _getCustomizedCallout() {
243
+ return props.onRenderCalloutPerDataPoint ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps, _renderCallout) : null;
244
+ }
245
+ function _getGraphData(xScale, yScale, containerHeight, containerWidth, xElement) {
246
+ return _bars = _xAxisType === _index1.XAxisTypes.NumericAxis ? _createNumericBars(containerHeight, containerWidth, xElement) : _xAxisType === _index1.XAxisTypes.DateAxis ? _createDateBars(containerHeight, containerWidth, xElement) : _createStringBars(containerHeight, containerWidth, xElement);
247
+ }
248
+ function _createColors() {
249
+ const increment = _colors.length <= 1 ? 1 : 1 / (_colors.length - 1);
250
+ const { useSingleColor = false } = props;
251
+ if (useSingleColor) {
252
+ return (_p)=>{
253
+ const { colors } = props;
254
+ return colors && colors.length > 0 ? colors[0] : _reacttheme.tokens.colorPaletteBlueBackground2;
255
+ };
256
+ }
257
+ const domainValues = [];
258
+ for(let i = 0; i < _colors.length; i++){
259
+ domainValues.push(increment * i * _yMax);
260
+ }
261
+ const colorScale = (0, _d3scale.scaleLinear)().domain(domainValues).range(_colors);
262
+ return colorScale;
263
+ }
264
+ function _refCallback(element, legendTitle) {
265
+ _refArray.push({
266
+ index: legendTitle,
267
+ refElement: element
268
+ });
269
+ }
270
+ function _getCalloutContentForLineAndBar(point) {
271
+ var _selectedPoint__lineData;
272
+ // eslint-disable-next-line @typescript-eslint/no-shadow
273
+ const YValueHover = [];
274
+ const { useSingleColor = false } = props;
275
+ const { data, lineLegendText, lineLegendColor = _reacttheme.tokens.colorPaletteYellowBackground1 } = props;
276
+ const selectedPoint = data.filter((xDataPoint)=>xDataPoint.x === point.x);
277
+ // there might be no y value of the line for the hovered bar. so we need to check this condition
278
+ if (_isHavingLine && ((_selectedPoint__lineData = selectedPoint[0].lineData) === null || _selectedPoint__lineData === void 0 ? void 0 : _selectedPoint__lineData.y) !== undefined) {
279
+ var _selectedPoint__lineData1, _selectedPoint__lineData2, _selectedPoint__lineData3;
280
+ // callout data for the line
281
+ YValueHover.push({
282
+ legend: lineLegendText,
283
+ color: lineLegendColor,
284
+ y: (_selectedPoint__lineData1 = selectedPoint[0].lineData) === null || _selectedPoint__lineData1 === void 0 ? void 0 : _selectedPoint__lineData1.y,
285
+ data: (_selectedPoint__lineData2 = selectedPoint[0].lineData) === null || _selectedPoint__lineData2 === void 0 ? void 0 : _selectedPoint__lineData2.yAxisCalloutData,
286
+ yAxisCalloutData: (_selectedPoint__lineData3 = selectedPoint[0].lineData) === null || _selectedPoint__lineData3 === void 0 ? void 0 : _selectedPoint__lineData3.yAxisCalloutData
287
+ });
288
+ }
289
+ // callout data for the bar
290
+ YValueHover.push({
291
+ legend: selectedPoint[0].legend,
292
+ y: selectedPoint[0].y,
293
+ color: !useSingleColor ? selectedPoint[0].color ? selectedPoint[0].color : _createColors()(selectedPoint[0].y) : _createColors()(1),
294
+ data: selectedPoint[0].yAxisCalloutData,
295
+ yAxisCalloutData: selectedPoint[0].yAxisCalloutData
296
+ });
297
+ // eslint-disable-next-line @typescript-eslint/no-shadow
298
+ const hoverXValue = point.x instanceof Date ? point.x.toLocaleString() : point.x.toString();
299
+ return {
300
+ YValueHover,
301
+ hoverXValue: point.xAxisCalloutData || hoverXValue
302
+ };
303
+ }
304
+ function _onBarHover(point, color, mouseEvent) {
305
+ mouseEvent.persist();
306
+ // eslint-disable-next-line @typescript-eslint/no-shadow
307
+ const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);
308
+ if (_calloutAnchorPoint !== point) {
309
+ _calloutAnchorPoint = point;
310
+ /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */ updatePosition(mouseEvent.clientX, mouseEvent.clientY);
311
+ setPopoverOpen(selectedLegend === '' || selectedLegend === point.legend);
312
+ setDataForHoverCard(point.y);
313
+ setCalloutLegend(point.legend);
314
+ setColor(point.color || color);
315
+ // To display callout value, if no callout value given, taking given point.x value as a string.
316
+ setXCalloutValue(point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()));
317
+ setDataPointCalloutProps(point);
318
+ // Hovering over a bar should highlight corresponding line points only when no legend is selected
319
+ setActiveXDatapoint(_noLegendHighlighted() ? point.x : null);
320
+ setYValueHover(YValueHover);
321
+ setHoverXValue(hoverXValue);
322
+ setCalloutAccessibilityData(point.callOutAccessibilityData);
323
+ }
324
+ }
325
+ function _onBarLeave() {
326
+ /**/ }
327
+ function _handleChartMouseLeave() {
328
+ _calloutAnchorPoint = null;
329
+ setPopoverOpen(false);
330
+ setActiveXDatapoint(null);
331
+ setYValueHover([]);
332
+ setHoverXValue('');
333
+ }
334
+ // eslint-disable-next-line @typescript-eslint/no-shadow
335
+ function _onBarFocus(point, refArrayIndexNumber, color) {
336
+ // eslint-disable-next-line @typescript-eslint/no-shadow
337
+ const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);
338
+ _refArray.forEach((obj, index)=>{
339
+ if (obj.index === point.legend && refArrayIndexNumber === index) {
340
+ /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */ setPopoverOpen(selectedLegend === '' || selectedLegend === point.legend);
341
+ setDataForHoverCard(point.y);
342
+ setCalloutLegend(point.legend);
343
+ setColor(point.color || color);
344
+ // To display callout value, if no callout value given, taking given point.x value as a string.
345
+ setXCalloutValue(point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()));
346
+ setYCalloutValue(point.yAxisCalloutData);
347
+ setDataPointCalloutProps(point);
348
+ // Hovering over a bar should highlight corresponding line points only when no legend is selected
349
+ setActiveXDatapoint(point.x);
350
+ setYValueHover(YValueHover);
351
+ setHoverXValue(hoverXValue);
352
+ setCalloutAccessibilityData(point.callOutAccessibilityData);
353
+ }
354
+ });
355
+ }
356
+ function _lineHover(point, mouseEvent) {
357
+ mouseEvent.persist();
358
+ _lineHoverFocus(point, mouseEvent);
359
+ }
360
+ function _lineFocus(point, ref) {
361
+ if (ref.refElement) {
362
+ _lineHoverFocus(point, ref.refElement);
363
+ }
364
+ }
365
+ function _lineHoverFocus(point, _refSelected) {
366
+ const { lineLegendText = '', lineLegendColor = _reacttheme.tokens.colorPaletteYellowBackground1 } = props;
367
+ setPopoverOpen(false);
368
+ setCalloutLegend(lineLegendText);
369
+ setDataForHoverCard(point.lineData.y);
370
+ setColor(lineLegendColor);
371
+ setXCalloutValue(point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()));
372
+ setYCalloutValue(point.lineData.yAxisCalloutData);
373
+ setDataPointCalloutProps(point);
374
+ setActiveXDatapoint(point.x);
375
+ }
376
+ function _getScales(containerHeight, containerWidth) {
377
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
378
+ let xBarScale;
379
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
380
+ const yBarScale = (0, _d3scale.scaleLinear)().domain([
381
+ 0,
382
+ _yMax
383
+ ]).range([
384
+ 0,
385
+ containerHeight - margins.bottom - margins.top
386
+ ]);
387
+ if (_xAxisType === _index1.XAxisTypes.NumericAxis) {
388
+ const xMax = (0, _d3array.max)(_points, (point)=>point.x);
389
+ const xMin = (0, _d3array.min)(_points, (point)=>point.x);
390
+ xBarScale = (0, _d3scale.scaleLinear)().domain(_useRtl ? [
391
+ xMax,
392
+ xMin
393
+ ] : [
394
+ xMin,
395
+ xMax
396
+ ]).nice().range([
397
+ margins.left + _domainMargin,
398
+ containerWidth - margins.right - _domainMargin
399
+ ]);
400
+ } else if (_xAxisType === _index1.XAxisTypes.DateAxis) {
401
+ const sDate = (0, _d3array.min)(_points, (point)=>point.x);
402
+ const lDate = (0, _d3array.max)(_points, (point)=>point.x);
403
+ xBarScale = (0, _d3scale.scaleUtc)().domain([
404
+ sDate,
405
+ lDate
406
+ ]).range(_useRtl ? [
407
+ containerWidth - margins.right - _domainMargin,
408
+ margins.left + _domainMargin
409
+ ] : [
410
+ margins.left + _domainMargin,
411
+ containerWidth - margins.right - _domainMargin
412
+ ]);
413
+ } else {
414
+ xBarScale = (0, _d3scale.scaleBand)().domain(_xAxisLabels).range(_useRtl ? [
415
+ containerWidth - margins.right - _domainMargin,
416
+ margins.left + _domainMargin
417
+ ] : [
418
+ margins.left + _domainMargin,
419
+ containerWidth - margins.right - _domainMargin
420
+ ]).paddingInner(_xAxisInnerPadding).paddingOuter(_xAxisOuterPadding);
421
+ }
422
+ return {
423
+ xBarScale,
424
+ yBarScale
425
+ };
426
+ }
427
+ const classes = (0, _useVerticalBarChartStylesstyles.useVerticalBarChartStyles)(props);
428
+ function _createNumericBars(containerHeight, containerWidth, xElement) {
429
+ const { useSingleColor = false } = props;
430
+ const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);
431
+ const colorScale = _createColors();
432
+ const bars = _points.map((point, index)=>{
433
+ const shouldHighlight = _legendHighlighted(point.legend) || _noLegendHighlighted() ? true : false;
434
+ const barHeight = Math.max(yBarScale(point.y), 0);
435
+ let adjustedBarHeight = 0;
436
+ if (barHeight <= 0) {
437
+ return /*#__PURE__*/ _react.createElement(_react.Fragment, {
438
+ key: point.x
439
+ }, " ");
440
+ } else if (barHeight <= Math.ceil(yBarScale(_yMax) / 100.0)) {
441
+ adjustedBarHeight = Math.ceil(yBarScale(_yMax) / 100.0);
442
+ } else {
443
+ adjustedBarHeight = barHeight;
444
+ }
445
+ const xPoint = xBarScale(point.x) - _barWidth / 2;
446
+ const yPoint = containerHeight - margins.bottom - adjustedBarHeight;
447
+ return /*#__PURE__*/ _react.createElement("g", {
448
+ key: point.x
449
+ }, /*#__PURE__*/ _react.createElement("rect", {
450
+ id: `${_vbcBarId}-${index}`,
451
+ x: xPoint,
452
+ y: yPoint,
453
+ width: _barWidth,
454
+ "data-is-focusable": !props.hideTooltip && shouldHighlight,
455
+ height: adjustedBarHeight,
456
+ ref: (e)=>{
457
+ _refCallback(e, point.legend);
458
+ },
459
+ onClick: point.onClick,
460
+ onMouseOver: (event)=>_onBarHover(point, colorScale(point.y), event),
461
+ "aria-label": _getAriaLabel(point),
462
+ role: "img",
463
+ onMouseLeave: _onBarLeave,
464
+ onFocus: _onBarFocus.bind(point, index, colorScale(point.y)),
465
+ onBlur: _onBarLeave,
466
+ fill: point.color && !useSingleColor ? point.color : colorScale(point.y),
467
+ tabIndex: point.legend !== '' ? 0 : undefined,
468
+ opacity: shouldHighlight ? '1' : '0.1'
469
+ }), _renderBarLabel(xPoint, yPoint, point.y, point.legend));
470
+ });
471
+ // Removing un wanted tooltip div from DOM, when prop not provided.
472
+ if (!props.showXAxisLablesTooltip) {
473
+ try {
474
+ // eslint-disable-next-line no-restricted-globals
475
+ document.getElementById(_tooltipId) && document.getElementById(_tooltipId).remove();
476
+ // eslint-disable-next-line no-empty
477
+ } catch (e) {}
478
+ }
479
+ // Used to display tooltip at x axis labels.
480
+ if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {
481
+ const xAxisElement = (0, _d3selection.select)(xElement).call(xBarScale);
482
+ try {
483
+ // eslint-disable-next-line no-restricted-globals
484
+ document.getElementById(_tooltipId) && document.getElementById(_tooltipId).remove();
485
+ // eslint-disable-next-line no-empty
486
+ } catch (e) {}
487
+ const tooltipProps = {
488
+ tooltipCls: classes.tooltip,
489
+ id: _tooltipId,
490
+ xAxis: xAxisElement
491
+ };
492
+ xAxisElement && (0, _index1.tooltipOfXAxislabels)(tooltipProps);
493
+ }
494
+ return bars;
495
+ }
496
+ function _createStringBars(containerHeight, containerWidth, xElement) {
497
+ const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);
498
+ const colorScale = _createColors();
499
+ const bars = _points.map((point, index)=>{
500
+ const barHeight = Math.max(yBarScale(point.y), 0);
501
+ let adjustedBarHeight = 0;
502
+ if (barHeight <= 0) {
503
+ return /*#__PURE__*/ _react.createElement(_react.Fragment, {
504
+ key: point.x instanceof Date ? point.x.getTime() : point.x
505
+ }, " ");
506
+ } else if (barHeight <= Math.ceil(yBarScale(_yMax) / 100.0)) {
507
+ adjustedBarHeight = Math.ceil(yBarScale(_yMax) / 100.0);
508
+ } else {
509
+ adjustedBarHeight = barHeight;
510
+ }
511
+ const xPoint = xBarScale(point.x);
512
+ const yPoint = containerHeight - margins.bottom - adjustedBarHeight;
513
+ // Setting the bar width here is safe because there are no dependencies earlier in the code
514
+ // that rely on the width of bars in vertical bar charts with string x-axis.
515
+ _barWidth = (0, _index1.getBarWidth)(props.barWidth, props.maxBarWidth, xBarScale.bandwidth());
516
+ return /*#__PURE__*/ _react.createElement("g", {
517
+ key: point.x instanceof Date ? point.x.getTime() : point.x,
518
+ transform: `translate(${0.5 * (xBarScale.bandwidth() - _barWidth)}, 0)`
519
+ }, /*#__PURE__*/ _react.createElement("rect", {
520
+ id: `${_vbcBarId}-${index}`,
521
+ x: xPoint,
522
+ y: yPoint,
523
+ width: _barWidth,
524
+ height: adjustedBarHeight,
525
+ "aria-label": _getAriaLabel(point),
526
+ role: "img",
527
+ ref: (e)=>{
528
+ _refCallback(e, point.legend);
529
+ },
530
+ onClick: point.onClick,
531
+ onMouseOver: (event)=>_onBarHover(point, colorScale(point.y), event),
532
+ onMouseLeave: _onBarLeave,
533
+ onBlur: _onBarLeave,
534
+ "data-is-focusable": !props.hideTooltip,
535
+ onFocus: _onBarFocus.bind(point, index, colorScale(point.y)),
536
+ fill: point.color ? point.color : colorScale(point.y),
537
+ tabIndex: point.legend !== '' ? 0 : undefined
538
+ }), _renderBarLabel(xPoint, yPoint, point.y, point.legend));
539
+ });
540
+ // Removing un wanted tooltip div from DOM, when prop not provided.
541
+ if (!props.showXAxisLablesTooltip) {
542
+ try {
543
+ // eslint-disable-next-line no-restricted-globals
544
+ document.getElementById(_tooltipId) && document.getElementById(_tooltipId).remove();
545
+ // eslint-disable-next-line no-empty
546
+ } catch (e) {}
547
+ }
548
+ // Used to display tooltip at x axis labels.
549
+ if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {
550
+ const xAxisElement = (0, _d3selection.select)(xElement).call(xBarScale);
551
+ try {
552
+ // eslint-disable-next-line no-restricted-globals
553
+ document.getElementById(_tooltipId) && document.getElementById(_tooltipId).remove();
554
+ // eslint-disable-next-line no-empty
555
+ } catch (e) {}
556
+ const tooltipProps = {
557
+ tooltipCls: classes.tooltip,
558
+ id: _tooltipId,
559
+ xAxis: xAxisElement,
560
+ showTooltip: props.showXAxisLablesTooltip
561
+ };
562
+ xAxisElement && (0, _index1.tooltipOfXAxislabels)(tooltipProps);
563
+ }
564
+ return bars;
565
+ }
566
+ function _createDateBars(containerHeight, containerWidth, xElement) {
567
+ const { useSingleColor = false } = props;
568
+ const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);
569
+ const colorScale = _createColors();
570
+ const bars = _points.map((point, index)=>{
571
+ const shouldHighlight = _legendHighlighted(point.legend) || _noLegendHighlighted() ? true : false;
572
+ const barHeight = Math.max(yBarScale(point.y), 0);
573
+ let adjustedBarHeight = 0;
574
+ if (barHeight <= 0) {
575
+ return /*#__PURE__*/ _react.createElement(_react.Fragment, {
576
+ key: point.x instanceof Date ? point.x.getTime() : point.x
577
+ }, " ");
578
+ } else if (barHeight <= Math.ceil(yBarScale(_yMax) / 100.0)) {
579
+ adjustedBarHeight = Math.ceil(yBarScale(_yMax) / 100.0);
580
+ } else {
581
+ adjustedBarHeight = barHeight;
582
+ }
583
+ const xPoint = xBarScale(point.x) - _barWidth / 2;
584
+ const yPoint = containerHeight - margins.bottom - adjustedBarHeight;
585
+ return /*#__PURE__*/ _react.createElement("g", {
586
+ key: point.x instanceof Date ? point.x.getTime() : point.x
587
+ }, /*#__PURE__*/ _react.createElement("rect", {
588
+ id: `${_vbcBarId}-${index}`,
589
+ x: xPoint,
590
+ className: classes.opacityChangeOnHover,
591
+ y: yPoint,
592
+ width: _barWidth,
593
+ "data-is-focusable": !props.hideTooltip && shouldHighlight,
594
+ height: adjustedBarHeight,
595
+ ref: (e)=>{
596
+ _refCallback(e, point.legend);
597
+ },
598
+ onClick: point.onClick,
599
+ onMouseOver: (event)=>_onBarHover(point, colorScale(point.y), event),
600
+ "aria-label": _getAriaLabel(point),
601
+ role: "img",
602
+ onMouseLeave: _onBarLeave,
603
+ onFocus: _onBarFocus.bind(point, index, colorScale(point.y)),
604
+ onBlur: _onBarLeave,
605
+ fill: point.color && !useSingleColor ? point.color : colorScale(point.y),
606
+ tabIndex: point.legend !== '' ? 0 : undefined
607
+ }), _renderBarLabel(xPoint, yPoint, point.y, point.legend));
608
+ });
609
+ // Removing un wanted tooltip div from DOM, when prop not provided.
610
+ if (!props.showXAxisLablesTooltip) {
611
+ try {
612
+ // eslint-disable-next-line no-restricted-globals
613
+ document.getElementById(_tooltipId) && document.getElementById(_tooltipId).remove();
614
+ // eslint-disable-next-line no-empty
615
+ } catch (e) {}
616
+ }
617
+ // Used to display tooltip at x axis labels.
618
+ if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {
619
+ const xAxisElement = (0, _d3selection.select)(xElement).call(xBarScale);
620
+ try {
621
+ // eslint-disable-next-line no-restricted-globals
622
+ document.getElementById(_tooltipId) && document.getElementById(_tooltipId).remove();
623
+ // eslint-disable-next-line no-empty
624
+ } catch (e) {}
625
+ const tooltipProps = {
626
+ tooltipCls: classes.tooltip,
627
+ id: _tooltipId,
628
+ xAxis: xAxisElement
629
+ };
630
+ xAxisElement && (0, _index1.tooltipOfXAxislabels)(tooltipProps);
631
+ }
632
+ return bars;
633
+ }
634
+ function _onLegendClick(legendTitle) {
635
+ if (selectedLegend === legendTitle) {
636
+ setSelectedLegend('');
637
+ } else {
638
+ setSelectedLegend(legendTitle);
639
+ }
640
+ }
641
+ function _onLegendHover(legendTitle) {
642
+ setActiveLegend(legendTitle);
643
+ }
644
+ function _onLegendLeave() {
645
+ setActiveLegend('');
646
+ }
647
+ function _getLegendData(data) {
648
+ const { useSingleColor } = props;
649
+ const { lineLegendText, lineLegendColor = _reacttheme.tokens.colorPaletteYellowForeground1 } = props;
650
+ const actions = [];
651
+ data.forEach((point, _index)=>{
652
+ // eslint-disable-next-line @typescript-eslint/no-shadow
653
+ const color = !useSingleColor ? point.color : _createColors()(1);
654
+ // mapping data to the format Legends component needs
655
+ const legend = {
656
+ title: point.legend,
657
+ color,
658
+ action: ()=>{
659
+ _onLegendClick(point.legend);
660
+ },
661
+ hoverAction: ()=>{
662
+ _handleChartMouseLeave();
663
+ _onLegendHover(point.legend);
664
+ },
665
+ onMouseOutAction: ()=>{
666
+ _onLegendLeave();
667
+ }
668
+ };
669
+ actions.push(legend);
670
+ });
671
+ if (_isHavingLine && lineLegendText && lineLegendColor) {
672
+ const lineLegend = {
673
+ title: lineLegendText,
674
+ color: lineLegendColor,
675
+ action: ()=>{
676
+ _onLegendClick(lineLegendText);
677
+ },
678
+ hoverAction: ()=>{
679
+ _handleChartMouseLeave();
680
+ _onLegendHover(lineLegendText);
681
+ },
682
+ onMouseOutAction: ()=>{
683
+ _onLegendLeave();
684
+ },
685
+ isLineLegendInBarChart: true
686
+ };
687
+ actions.unshift(lineLegend);
688
+ }
689
+ const legends = /*#__PURE__*/ _react.createElement(_index.Legends, {
690
+ legends: actions,
691
+ enabledWrapLines: props.enabledLegendsWrapLines,
692
+ overflowText: props.legendsOverflowText,
693
+ ...props.legendProps
694
+ });
695
+ return legends;
696
+ }
697
+ function _getAxisData(yAxisData) {
698
+ if (yAxisData && yAxisData.yAxisDomainValues.length) {
699
+ const { yAxisDomainValues: domainValue } = yAxisData;
700
+ _yMax = Math.max(domainValue[domainValue.length - 1], props.yMaxValue || 0);
701
+ }
702
+ }
703
+ /**
704
+ * This function checks if the given legend is highlighted or not.
705
+ * A legend can be highlighted in 2 ways:
706
+ * 1. selection: if the user clicks on it
707
+ * 2. hovering: if there is no selected legend and the user hovers over it
708
+ */ function _legendHighlighted(legendTitle) {
709
+ return selectedLegend === legendTitle || selectedLegend === '' && activeLegend === legendTitle;
710
+ }
711
+ /**
712
+ * This function checks if none of the legends is selected or hovered.
713
+ */ function _noLegendHighlighted() {
714
+ return selectedLegend === '' && activeLegend === '';
715
+ }
716
+ function _getAriaLabel(point) {
717
+ var _point_lineData, _point_lineData1, _point_callOutAccessibilityData;
718
+ const xValue = point.xAxisCalloutData ? point.xAxisCalloutData : point.x instanceof Date ? point.x.toLocaleString() : point.x;
719
+ const legend = point.legend;
720
+ const yValue = point.yAxisCalloutData || point.y;
721
+ const lineLegend = props.lineLegendText || 'Line';
722
+ 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);
723
+ return ((_point_callOutAccessibilityData = point.callOutAccessibilityData) === null || _point_callOutAccessibilityData === void 0 ? void 0 : _point_callOutAccessibilityData.ariaLabel) || `${xValue}. ` + (legend ? `${legend}, ` : '') + `${yValue}.` + (typeof lineYValue !== 'undefined' ? ` ${lineLegend}, ${lineYValue}.` : '');
724
+ }
725
+ function _renderBarLabel(xPoint, yPoint, barValue, legend) {
726
+ if (props.hideLabels || _barWidth < 16 || !(_legendHighlighted(legend) || _noLegendHighlighted())) {
727
+ return null;
728
+ }
729
+ return /*#__PURE__*/ _react.createElement("text", {
730
+ x: xPoint + _barWidth / 2,
731
+ y: yPoint - 6,
732
+ textAnchor: "middle",
733
+ className: classes.barLabel,
734
+ "aria-hidden": true
735
+ }, (0, _index1.formatValueWithSIPrefix)(barValue));
736
+ }
737
+ function _getDomainMargins(containerWidth) {
738
+ _domainMargin = MIN_DOMAIN_MARGIN;
739
+ /** Total width available to render the bars */ const totalWidth = containerWidth - (margins.left + MIN_DOMAIN_MARGIN) - (margins.right + MIN_DOMAIN_MARGIN);
740
+ if (_xAxisType === _index1.XAxisTypes.StringAxis) {
741
+ if ((0, _index1.isScalePaddingDefined)(props.xAxisOuterPadding, props.xAxisPadding)) {
742
+ // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available
743
+ // to adjust the space before the first bar and after the last bar.
744
+ _domainMargin = 0;
745
+ } else if (props.barWidth !== 'auto') {
746
+ /** Rate at which the space between the bars changes wrt the bar width */ const barGapRate = _xAxisInnerPadding / (1 - _xAxisInnerPadding);
747
+ // Update the bar width so that when CartesianChart rerenders,
748
+ // the following calculations don't use the previous bar width.
749
+ _barWidth = (0, _index1.getBarWidth)(props.barWidth, props.maxBarWidth);
750
+ /** Total width required to render the bars. Directly proportional to bar width */ const reqWidth = (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate) * _barWidth;
751
+ if (totalWidth >= reqWidth) {
752
+ // Center align the chart by setting equal left and right margins for domain
753
+ _domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;
754
+ }
755
+ }
756
+ } else {
757
+ var _props_data;
758
+ const data = ((_props_data = props.data) === null || _props_data === void 0 ? void 0 : _props_data.map((point)=>point.x)) || [];
759
+ _barWidth = (0, _index1.getBarWidth)(props.barWidth, props.maxBarWidth, (0, _index1.calculateAppropriateBarWidth)(data, totalWidth));
760
+ _domainMargin = MIN_DOMAIN_MARGIN + _barWidth / 2;
761
+ }
762
+ return {
763
+ ...margins,
764
+ left: margins.left + _domainMargin,
765
+ right: margins.right + _domainMargin
766
+ };
767
+ }
768
+ function _isChartEmpty() {
769
+ return _points.length === 0 || (0, _d3array.max)(_points, (point)=>point.y) <= 0 && !_isHavingLine;
770
+ }
771
+ function updatePosition(newX, newY) {
772
+ const threshold = 1; // Set a threshold for movement
773
+ const { x, y } = clickPosition;
774
+ // Calculate the distance moved
775
+ const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));
776
+ // Update the position only if the distance moved is greater than the threshold
777
+ if (distance > threshold) {
778
+ setClickPosition({
779
+ x: newX,
780
+ y: newY
781
+ });
782
+ setPopoverOpen(true);
783
+ }
784
+ }
785
+ _adjustProps();
786
+ _xAxisLabels = _points.map((point)=>point.x);
787
+ _yMax = Math.max((0, _d3array.max)(_points, (point)=>point.y), props.yMaxValue || 0);
788
+ const legendBars = _getLegendData(_points);
789
+ var _props_culture;
790
+ const calloutProps = {
791
+ ..._isHavingLine && {
792
+ YValueHover: YValueHover,
793
+ hoverXValue: hoverXValue
794
+ },
795
+ color: color,
796
+ legend: calloutLegend,
797
+ XValue: xCalloutValue,
798
+ YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,
799
+ ...props.calloutProps,
800
+ ...(0, _index1.getAccessibleDataObject)(callOutAccessibilityData),
801
+ clickPosition: clickPosition,
802
+ isPopoverOpen: isPopoverOpen,
803
+ isCalloutForStack: _isHavingLine && _noLegendHighlighted(),
804
+ culture: (_props_culture = props.culture) !== null && _props_culture !== void 0 ? _props_culture : 'en-us',
805
+ isCartesian: true,
806
+ customCallout: {
807
+ customizedCallout: _getCustomizedCallout() != null ? _getCustomizedCallout() : undefined,
808
+ customCalloutProps: props.calloutPropsPerDataPoint ? props.calloutPropsPerDataPoint(dataPointCalloutProps) : undefined
809
+ }
810
+ };
811
+ const tickParams = {
812
+ tickValues: props.tickValues,
813
+ tickFormat: props.tickFormat
814
+ };
815
+ return !_isChartEmpty() ? /*#__PURE__*/ _react.createElement(_index.CartesianChart, {
816
+ ...props,
817
+ points: _points,
818
+ chartType: _index1.ChartTypes.VerticalBarChart,
819
+ xAxisType: _xAxisType,
820
+ calloutProps: calloutProps,
821
+ tickParams: tickParams,
822
+ ..._isHavingLine && _noLegendHighlighted() && {
823
+ isCalloutForStack: true
824
+ },
825
+ legendBars: legendBars,
826
+ datasetForXAxisDomain: _xAxisLabels,
827
+ barwidth: _barWidth,
828
+ getmargins: _getMargins,
829
+ getGraphData: _getGraphData,
830
+ getAxisData: _getAxisData,
831
+ onChartMouseLeave: _handleChartMouseLeave,
832
+ getDomainMargins: _getDomainMargins,
833
+ ..._xAxisType === _index1.XAxisTypes.StringAxis && {
834
+ xAxisInnerPadding: _xAxisInnerPadding,
835
+ xAxisOuterPadding: _xAxisOuterPadding
836
+ },
837
+ componentRef: cartesianChartRef,
838
+ /* eslint-disable react/jsx-no-bind */ // eslint-disable-next-line react/no-children-prop
839
+ children: (props)=>{
840
+ return /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement("g", null, _bars), _isHavingLine && /*#__PURE__*/ _react.createElement("g", null, _createLine(props.xScale, props.yScale, props.containerHeight, props.containerWidth, props.yScaleSecondary)));
841
+ }
842
+ }) : /*#__PURE__*/ _react.createElement("div", {
843
+ id: _emptyChartId,
844
+ role: 'alert',
845
+ style: {
846
+ opacity: '0'
847
+ },
848
+ "aria-label": 'Graph has no data to display'
849
+ });
850
+ });
851
+ VerticalBarChart.displayName = 'VerticalBarChart';