@fluentui/react-charts 0.0.0-nightly-20250728-0406.1 → 0.0.0-nightly-20250730-0406.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 (420) hide show
  1. package/CHANGELOG.md +34 -15
  2. package/dist/index.d.ts +198 -10
  3. package/lib/AreaChart.js.map +1 -1
  4. package/lib/CartesianChart.js.map +1 -1
  5. package/lib/DeclarativeChart.js.map +1 -1
  6. package/lib/DonutChart.js.map +1 -1
  7. package/lib/FunnelChart.js.map +1 -1
  8. package/lib/GanttChart.js +1 -0
  9. package/lib/GanttChart.js.map +1 -0
  10. package/lib/GaugeChart.js.map +1 -1
  11. package/lib/GroupedVerticalBarChart.js.map +1 -1
  12. package/lib/HeatMapChart.js.map +1 -1
  13. package/lib/HorizontalBarChart.js.map +1 -1
  14. package/lib/HorizontalBarChartWithAxis.js.map +1 -1
  15. package/lib/Legends.js.map +1 -1
  16. package/lib/LineChart.js.map +1 -1
  17. package/lib/Popover.js.map +1 -1
  18. package/lib/ResponsiveContainer.js.map +1 -1
  19. package/lib/SankeyChart.js.map +1 -1
  20. package/lib/ScatterChart.js.map +1 -1
  21. package/lib/Sparkline.js.map +1 -1
  22. package/lib/VerticalBarChart.js.map +1 -1
  23. package/lib/VerticalStackedBarChart.js.map +1 -1
  24. package/lib/components/AreaChart/AreaChart.js +3 -3
  25. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  26. package/lib/components/AreaChart/AreaChart.types.js.map +1 -1
  27. package/lib/components/AreaChart/index.js.map +1 -1
  28. package/lib/components/AreaChart/useAreaChartStyles.styles.js +1 -2
  29. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +41 -0
  30. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -0
  31. package/lib/components/CommonComponents/CartesianChart.js +12 -8
  32. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  33. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  34. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  35. package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -1
  36. package/lib/components/CommonComponents/index.js.map +1 -1
  37. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +1 -2
  38. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +128 -0
  39. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -0
  40. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +1 -2
  41. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +126 -0
  42. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -0
  43. package/lib/components/DeclarativeChart/DeclarativeChart.js +6 -1
  44. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  45. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +44 -13
  46. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  47. package/lib/components/DeclarativeChart/imageExporter.js +1 -0
  48. package/lib/components/DeclarativeChart/imageExporter.js.map +1 -1
  49. package/lib/components/DeclarativeChart/index.js.map +1 -1
  50. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  51. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
  52. package/lib/components/DonutChart/Arc/index.js.map +1 -1
  53. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +1 -2
  54. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +44 -0
  55. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -0
  56. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  57. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  58. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  59. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
  60. package/lib/components/DonutChart/Pie/index.js.map +1 -1
  61. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +1 -2
  62. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js +29 -0
  63. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -0
  64. package/lib/components/DonutChart/index.js.map +1 -1
  65. package/lib/components/DonutChart/useDonutChartStyles.styles.js +1 -2
  66. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +45 -0
  67. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -0
  68. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  69. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
  70. package/lib/components/FunnelChart/funnelGeometry.js.map +1 -1
  71. package/lib/components/FunnelChart/index.js.map +1 -1
  72. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +1 -2
  73. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +51 -0
  74. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -0
  75. package/lib/components/GanttChart/GanttChart.js +530 -0
  76. package/lib/components/GanttChart/GanttChart.js.map +1 -0
  77. package/lib/components/GanttChart/GanttChart.types.js +4 -0
  78. package/lib/components/GanttChart/GanttChart.types.js.map +1 -0
  79. package/lib/components/GanttChart/index.js +2 -0
  80. package/lib/components/GanttChart/index.js.map +1 -0
  81. package/lib/components/GanttChart/useGanttChartStyles.styles.js +24 -0
  82. package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +1 -0
  83. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +23 -0
  84. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -0
  85. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  86. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  87. package/lib/components/GaugeChart/index.js.map +1 -1
  88. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +1 -2
  89. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +142 -0
  90. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -0
  91. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +61 -56
  92. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  93. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  94. package/lib/components/GroupedVerticalBarChart/index.js.map +1 -1
  95. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +1 -2
  96. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +53 -0
  97. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -0
  98. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  99. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  100. package/lib/components/HeatMapChart/index.js.map +1 -1
  101. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +1 -2
  102. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +38 -0
  103. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -0
  104. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +23 -26
  105. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  106. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +5 -3
  107. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  108. package/lib/components/HorizontalBarChart/index.js.map +1 -1
  109. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +1 -2
  110. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +120 -0
  111. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -0
  112. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  113. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  114. package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  115. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +1 -2
  116. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +39 -0
  117. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -0
  118. package/lib/components/Legends/Legends.js +7 -8
  119. package/lib/components/Legends/Legends.js.map +1 -1
  120. package/lib/components/Legends/Legends.types.js.map +1 -1
  121. package/lib/components/Legends/OverflowMenu.js.map +1 -1
  122. package/lib/components/Legends/index.js.map +1 -1
  123. package/lib/components/Legends/shape.js +3 -3
  124. package/lib/components/Legends/shape.js.map +1 -1
  125. package/lib/components/Legends/useLegendsStyles.styles.js +33 -6
  126. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  127. package/lib/components/Legends/useLegendsStyles.styles.raw.js +125 -0
  128. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -0
  129. package/lib/components/LineChart/LineChart.js +3 -3
  130. package/lib/components/LineChart/LineChart.js.map +1 -1
  131. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  132. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  133. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  134. package/lib/components/LineChart/eventAnnotation/Textbox.js +2 -1
  135. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  136. package/lib/components/LineChart/index.js.map +1 -1
  137. package/lib/components/LineChart/useLineChartStyles.styles.js +1 -2
  138. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +52 -0
  139. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -0
  140. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  141. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  142. package/lib/components/ResponsiveContainer/index.js.map +1 -1
  143. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +1 -2
  144. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +28 -0
  145. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -0
  146. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  147. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  148. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  149. package/lib/components/SankeyChart/index.js.map +1 -1
  150. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +1 -2
  151. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +77 -0
  152. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -0
  153. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  154. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  155. package/lib/components/ScatterChart/index.js.map +1 -1
  156. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +1 -2
  157. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +43 -0
  158. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -0
  159. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  160. package/lib/components/Sparkline/Sparkline.types.js.map +1 -1
  161. package/lib/components/Sparkline/index.js.map +1 -1
  162. package/lib/components/Sparkline/useSparklineStyles.styles.js +1 -2
  163. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js +30 -0
  164. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -0
  165. package/lib/components/VerticalBarChart/VerticalBarChart.js +56 -29
  166. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  167. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  168. package/lib/components/VerticalBarChart/index.js.map +1 -1
  169. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +1 -2
  170. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +58 -0
  171. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -0
  172. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +17 -10
  173. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  174. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  175. package/lib/components/VerticalStackedBarChart/index.js.map +1 -1
  176. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +1 -2
  177. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +49 -0
  178. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -0
  179. package/lib/index.js +1 -0
  180. package/lib/index.js.map +1 -1
  181. package/lib/types/DataPoint.js +3 -1
  182. package/lib/types/DataPoint.js.map +1 -1
  183. package/lib/types/EventAnnotation.js.map +1 -1
  184. package/lib/types/LegendDataItem.js.map +1 -1
  185. package/lib/types/index.js.map +1 -1
  186. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  187. package/lib/utilities/KeyCodes.js.map +1 -1
  188. package/lib/utilities/SVGTooltipText.js +2 -0
  189. package/lib/utilities/SVGTooltipText.js.map +1 -1
  190. package/lib/utilities/async-utils.js.map +1 -1
  191. package/lib/utilities/colors.js.map +1 -1
  192. package/lib/utilities/getWindow.js.map +1 -1
  193. package/lib/utilities/index.js.map +1 -1
  194. package/lib/utilities/overflow-utils.js.map +1 -1
  195. package/lib/utilities/string.js.map +1 -1
  196. package/lib/utilities/test-data.js +236 -0
  197. package/lib/utilities/test-data.js.map +1 -1
  198. package/lib/utilities/utilities.js +95 -27
  199. package/lib/utilities/utilities.js.map +1 -1
  200. package/lib/utilities/vbc-utils.js +2 -2
  201. package/lib/utilities/vbc-utils.js.map +1 -1
  202. package/lib-commonjs/AreaChart.js.map +1 -1
  203. package/lib-commonjs/CartesianChart.js.map +1 -1
  204. package/lib-commonjs/DeclarativeChart.js.map +1 -1
  205. package/lib-commonjs/DonutChart.js.map +1 -1
  206. package/lib-commonjs/FunnelChart.js.map +1 -1
  207. package/lib-commonjs/GanttChart.js +6 -0
  208. package/lib-commonjs/GanttChart.js.map +1 -0
  209. package/lib-commonjs/GaugeChart.js.map +1 -1
  210. package/lib-commonjs/GroupedVerticalBarChart.js.map +1 -1
  211. package/lib-commonjs/HeatMapChart.js.map +1 -1
  212. package/lib-commonjs/HorizontalBarChart.js.map +1 -1
  213. package/lib-commonjs/HorizontalBarChartWithAxis.js.map +1 -1
  214. package/lib-commonjs/Legends.js.map +1 -1
  215. package/lib-commonjs/LineChart.js.map +1 -1
  216. package/lib-commonjs/Popover.js.map +1 -1
  217. package/lib-commonjs/ResponsiveContainer.js.map +1 -1
  218. package/lib-commonjs/SankeyChart.js.map +1 -1
  219. package/lib-commonjs/ScatterChart.js.map +1 -1
  220. package/lib-commonjs/Sparkline.js.map +1 -1
  221. package/lib-commonjs/VerticalBarChart.js.map +1 -1
  222. package/lib-commonjs/VerticalStackedBarChart.js.map +1 -1
  223. package/lib-commonjs/components/AreaChart/AreaChart.js +3 -3
  224. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  225. package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +1 -1
  226. package/lib-commonjs/components/AreaChart/index.js.map +1 -1
  227. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +1 -1
  228. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  229. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +57 -0
  230. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -0
  231. package/lib-commonjs/components/CommonComponents/CartesianChart.js +11 -7
  232. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  233. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  234. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
  235. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +1 -1
  236. package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
  237. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +1 -1
  238. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  239. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +142 -0
  240. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -0
  241. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +1 -1
  242. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  243. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +140 -0
  244. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -0
  245. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +5 -0
  246. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  247. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +47 -13
  248. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  249. package/lib-commonjs/components/DeclarativeChart/imageExporter.js +1 -0
  250. package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -1
  251. package/lib-commonjs/components/DeclarativeChart/index.js.map +1 -1
  252. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  253. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -1
  254. package/lib-commonjs/components/DonutChart/Arc/index.js.map +1 -1
  255. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +1 -1
  256. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  257. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +58 -0
  258. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -0
  259. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  260. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  261. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  262. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -1
  263. package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -1
  264. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +1 -1
  265. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
  266. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js +43 -0
  267. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -0
  268. package/lib-commonjs/components/DonutChart/index.js.map +1 -1
  269. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +1 -1
  270. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  271. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +59 -0
  272. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -0
  273. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
  274. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -1
  275. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -1
  276. package/lib-commonjs/components/FunnelChart/index.js.map +1 -1
  277. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +1 -1
  278. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
  279. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +65 -0
  280. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -0
  281. package/lib-commonjs/components/GanttChart/GanttChart.js +541 -0
  282. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -0
  283. package/lib-commonjs/components/GanttChart/GanttChart.types.js +7 -0
  284. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -0
  285. package/lib-commonjs/components/GanttChart/index.js +7 -0
  286. package/lib-commonjs/components/GanttChart/index.js.map +1 -0
  287. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +39 -0
  288. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +1 -0
  289. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +39 -0
  290. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -0
  291. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  292. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  293. package/lib-commonjs/components/GaugeChart/index.js.map +1 -1
  294. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +1 -1
  295. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  296. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +160 -0
  297. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -0
  298. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +61 -56
  299. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  300. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  301. package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +1 -1
  302. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +1 -1
  303. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  304. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +69 -0
  305. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -0
  306. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  307. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  308. package/lib-commonjs/components/HeatMapChart/index.js.map +1 -1
  309. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +1 -1
  310. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  311. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +56 -0
  312. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -0
  313. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +23 -26
  314. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  315. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +3 -3
  316. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  317. package/lib-commonjs/components/HorizontalBarChart/index.js.map +1 -1
  318. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +1 -1
  319. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  320. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +134 -0
  321. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -0
  322. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  323. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  324. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  325. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +1 -1
  326. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  327. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +55 -0
  328. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -0
  329. package/lib-commonjs/components/Legends/Legends.js +7 -8
  330. package/lib-commonjs/components/Legends/Legends.js.map +1 -1
  331. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  332. package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -1
  333. package/lib-commonjs/components/Legends/index.js.map +1 -1
  334. package/lib-commonjs/components/Legends/shape.js +2 -2
  335. package/lib-commonjs/components/Legends/shape.js.map +1 -1
  336. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +46 -5
  337. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
  338. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +141 -0
  339. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -0
  340. package/lib-commonjs/components/LineChart/LineChart.js +3 -3
  341. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  342. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  343. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  344. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  345. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +2 -1
  346. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  347. package/lib-commonjs/components/LineChart/index.js.map +1 -1
  348. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +1 -1
  349. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  350. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +66 -0
  351. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -0
  352. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  353. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  354. package/lib-commonjs/components/ResponsiveContainer/index.js.map +1 -1
  355. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +1 -1
  356. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -1
  357. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +46 -0
  358. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -0
  359. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  360. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  361. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  362. package/lib-commonjs/components/SankeyChart/index.js.map +1 -1
  363. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +1 -1
  364. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  365. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +95 -0
  366. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -0
  367. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  368. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  369. package/lib-commonjs/components/ScatterChart/index.js.map +1 -1
  370. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +1 -1
  371. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  372. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +57 -0
  373. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -0
  374. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
  375. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -1
  376. package/lib-commonjs/components/Sparkline/index.js.map +1 -1
  377. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +1 -1
  378. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +1 -1
  379. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js +44 -0
  380. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -0
  381. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +56 -29
  382. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  383. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  384. package/lib-commonjs/components/VerticalBarChart/index.js.map +1 -1
  385. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +1 -1
  386. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  387. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +74 -0
  388. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -0
  389. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +17 -10
  390. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  391. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  392. package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +1 -1
  393. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +1 -1
  394. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  395. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +67 -0
  396. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -0
  397. package/lib-commonjs/index.js +1 -0
  398. package/lib-commonjs/index.js.map +1 -1
  399. package/lib-commonjs/types/DataPoint.js +3 -1
  400. package/lib-commonjs/types/DataPoint.js.map +1 -1
  401. package/lib-commonjs/types/EventAnnotation.js.map +1 -1
  402. package/lib-commonjs/types/LegendDataItem.js.map +1 -1
  403. package/lib-commonjs/types/index.js.map +1 -1
  404. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  405. package/lib-commonjs/utilities/KeyCodes.js.map +1 -1
  406. package/lib-commonjs/utilities/SVGTooltipText.js +2 -0
  407. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  408. package/lib-commonjs/utilities/async-utils.js.map +1 -1
  409. package/lib-commonjs/utilities/colors.js.map +1 -1
  410. package/lib-commonjs/utilities/getWindow.js.map +1 -1
  411. package/lib-commonjs/utilities/index.js.map +1 -1
  412. package/lib-commonjs/utilities/overflow-utils.js.map +1 -1
  413. package/lib-commonjs/utilities/string.js.map +1 -1
  414. package/lib-commonjs/utilities/test-data.js +245 -0
  415. package/lib-commonjs/utilities/test-data.js.map +1 -1
  416. package/lib-commonjs/utilities/utilities.js +91 -22
  417. package/lib-commonjs/utilities/utilities.js.map +1 -1
  418. package/lib-commonjs/utilities/vbc-utils.js +2 -2
  419. package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
  420. package/package.json +14 -24
@@ -19,11 +19,11 @@ const _reactutilities = require("@fluentui/react-utilities");
19
19
  const _reacttheme = require("@fluentui/react-theme");
20
20
  const _index = require("../../index");
21
21
  const _index1 = require("../../utilities/index");
22
- var CircleVisbility;
23
- (function(CircleVisbility) {
22
+ var CircleVisbility = /*#__PURE__*/ function(CircleVisbility) {
24
23
  CircleVisbility["show"] = "visibility";
25
24
  CircleVisbility["hide"] = "hidden";
26
- })(CircleVisbility || (CircleVisbility = {}));
25
+ return CircleVisbility;
26
+ }(CircleVisbility || {});
27
27
  const MIN_DOMAIN_MARGIN = 8;
28
28
  const VerticalBarChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
29
29
  var _props_legendProps;
@@ -217,7 +217,7 @@ const VerticalBarChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>
217
217
  }
218
218
  function _adjustProps() {
219
219
  _points = props.data || [];
220
- _barWidth = (0, _index1.getBarWidth)(props.barWidth, props.maxBarWidth);
220
+ _barWidth = (0, _index1.getBarWidth)(props.barWidth, props.maxBarWidth, undefined, props.mode);
221
221
  const defaultColors = [
222
222
  _reacttheme.tokens.colorPaletteBlueForeground2,
223
223
  _reacttheme.tokens.colorPaletteCornflowerForeground2,
@@ -227,7 +227,7 @@ const VerticalBarChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>
227
227
  ];
228
228
  _colors = props.colors || defaultColors;
229
229
  _isHavingLine = _checkForLine();
230
- _xAxisInnerPadding = (0, _index1.getScalePadding)(props.xAxisInnerPadding, props.xAxisPadding, 2 / 3);
230
+ _xAxisInnerPadding = (0, _index1.getScalePadding)(props.xAxisInnerPadding, props.xAxisPadding, props.mode === 'histogram' ? 0 : _xAxisType === _index1.XAxisTypes.StringAxis ? 2 / 3 : 1 / 2);
231
231
  _xAxisOuterPadding = (0, _index1.getScalePadding)(props.xAxisOuterPadding, props.xAxisPadding, 0);
232
232
  }
233
233
  function _getMargins(_margins) {
@@ -435,10 +435,13 @@ const VerticalBarChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>
435
435
  ] : [
436
436
  xMin,
437
437
  xMax
438
- ]).nice().range([
438
+ ]).range([
439
439
  margins.left + _domainMargin,
440
440
  containerWidth - margins.right - _domainMargin
441
441
  ]);
442
+ if (!(0, _index1.isScalePaddingDefined)(props.xAxisInnerPadding, props.xAxisPadding) && props.mode !== 'histogram') {
443
+ xBarScale.nice();
444
+ }
442
445
  } else if (_xAxisType === _index1.XAxisTypes.DateAxis) {
443
446
  const sDate = (0, _d3array.min)(_points, (point)=>point.x);
444
447
  const lDate = (0, _d3array.max)(_points, (point)=>point.x);
@@ -568,7 +571,7 @@ const VerticalBarChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>
568
571
  const baselineHeight = containerHeight - margins.bottom - yBarScale(yReferencePoint);
569
572
  // Setting the bar width here is safe because there are no dependencies earlier in the code
570
573
  // that rely on the width of bars in vertical bar charts with string x-axis.
571
- _barWidth = (0, _index1.getBarWidth)(props.barWidth, props.maxBarWidth, xBarScale.bandwidth());
574
+ _barWidth = (0, _index1.getBarWidth)(props.barWidth, props.maxBarWidth, xBarScale.bandwidth(), props.mode);
572
575
  return /*#__PURE__*/ _react.createElement("g", {
573
576
  key: point.x instanceof Date ? `${point.x.getTime()}_${index}` : `${point.x}_${index}`,
574
577
  transform: `translate(${0.5 * (xBarScale.bandwidth() - _barWidth)}, 0)`
@@ -807,48 +810,71 @@ const VerticalBarChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>
807
810
  }, typeof props.yAxisTickFormat === 'function' ? props.yAxisTickFormat(barValue) : (0, _index1.formatScientificLimitWidth)(barValue));
808
811
  }
809
812
  function _getDomainMargins(containerWidth) {
813
+ var _props_data;
810
814
  _domainMargin = MIN_DOMAIN_MARGIN;
815
+ const mapX = {};
816
+ (_props_data = props.data) === null || _props_data === void 0 ? void 0 : _props_data.forEach((point)=>{
817
+ if (point.x instanceof Date) {
818
+ mapX[point.x.getTime()] = point.x;
819
+ } else {
820
+ mapX[point.x] = point.x;
821
+ }
822
+ });
823
+ const uniqueX = Object.values(mapX);
811
824
  /** Total width available to render the bars */ const totalWidth = containerWidth - (margins.left + MIN_DOMAIN_MARGIN) - (margins.right + MIN_DOMAIN_MARGIN);
812
825
  /** Rate at which the space between the bars changes wrt the bar width */ const barGapRate = _xAxisInnerPadding / (1 - _xAxisInnerPadding);
826
+ const numBars = uniqueX.length + (uniqueX.length - 1) * barGapRate;
813
827
  if (_xAxisType === _index1.XAxisTypes.StringAxis) {
814
828
  if ((0, _index1.isScalePaddingDefined)(props.xAxisOuterPadding, props.xAxisPadding)) {
815
829
  // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available
816
830
  // to adjust the space before the first bar and after the last bar.
817
831
  _domainMargin = 0;
818
- } else if (props.barWidth !== 'auto') {
832
+ } else if (props.barWidth !== 'auto' && props.mode !== 'histogram') {
819
833
  // Update the bar width so that when CartesianChart rerenders,
820
834
  // the following calculations don't use the previous bar width.
821
835
  _barWidth = (0, _index1.getBarWidth)(props.barWidth, props.maxBarWidth);
822
- /** Total width required to render the bars. Directly proportional to bar width */ const reqWidth = (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate) * _barWidth;
836
+ /** Total width required to render the bars. Directly proportional to bar width */ const reqWidth = numBars * _barWidth;
823
837
  if (totalWidth >= reqWidth) {
824
838
  // Center align the chart by setting equal left and right margins for domain
825
839
  _domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;
826
840
  }
827
- } else if (props.mode === 'plotly' && _xAxisLabels.length > 1) {
841
+ } else if ([
842
+ 'plotly',
843
+ 'histogram'
844
+ ].includes(props.mode) && uniqueX.length > 1) {
828
845
  // Calculate the remaining width after rendering bars at their maximum allowable width
829
- const bandwidth = totalWidth / (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate);
830
- const barWidth = (0, _index1.getBarWidth)(props.barWidth, props.maxBarWidth, bandwidth);
831
- let reqWidth = (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate) * barWidth;
846
+ const bandwidth = totalWidth / numBars;
847
+ const barWidth = (0, _index1.getBarWidth)(props.barWidth, props.maxBarWidth, bandwidth, props.mode);
848
+ let reqWidth = numBars * barWidth;
832
849
  const margin1 = (totalWidth - reqWidth) / 2;
833
- // Calculate the remaining width after accounting for the space required to render x-axis labels
834
- const step = (0, _index1.calculateLongestLabelWidth)(_xAxisLabels) + 20;
835
- reqWidth = (_xAxisLabels.length - _xAxisInnerPadding) * step;
836
- const margin2 = (totalWidth - reqWidth) / 2;
850
+ let margin2 = Number.POSITIVE_INFINITY;
851
+ if (!props.hideTickOverlap) {
852
+ // Calculate the remaining width after accounting for the space required to render x-axis labels
853
+ const step = (0, _index1.calculateLongestLabelWidth)(uniqueX) + 20;
854
+ reqWidth = (uniqueX.length - _xAxisInnerPadding) * step;
855
+ margin2 = (totalWidth - reqWidth) / 2;
856
+ }
837
857
  _domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));
838
858
  }
839
859
  } else {
840
- var _props_data;
841
- const uniqueX = {};
842
- (_props_data = props.data) === null || _props_data === void 0 ? void 0 : _props_data.forEach((point)=>{
843
- if (point.x instanceof Date) {
844
- uniqueX[point.x.getTime()] = point.x;
845
- } else {
846
- uniqueX[point.x] = point.x;
847
- }
848
- });
849
- const data = Object.values(uniqueX);
850
- _barWidth = (0, _index1.getBarWidth)(props.barWidth, props.maxBarWidth, (0, _index1.calculateAppropriateBarWidth)(data, totalWidth));
851
- _domainMargin = MIN_DOMAIN_MARGIN + _barWidth / 2;
860
+ if (props.mode === 'histogram') {
861
+ // Try center-aligning the bars to eliminate any gaps caused by a restricted barWidth.
862
+ // This only works if the bin centers are consistent across all legend groups; otherwise,
863
+ // the calculated domainMargin may be too small.
864
+ const barWidth = props.maxBarWidth;
865
+ const reqWidth = numBars * barWidth;
866
+ _domainMargin += Math.max(0, (totalWidth - reqWidth) / 2);
867
+ }
868
+ // The histogram may appear distorted when bin centers/sizes vary across different legend groups.
869
+ // Currently, we calculate the appropriate bar width using the closest unique x-values to make
870
+ // the bars of the same legend group adjacent. But these x-values can come from different legend groups
871
+ // and result in misleading visuals. Even if we compute bar widths separately within each group,
872
+ // we still lack support for rendering bars with different widths and must use the minimum width,
873
+ // which can cause the same issue.
874
+ // Solution: Instead of estimating the appropriate bar width, render each bar to span the full range
875
+ // of its corresponding bin explicitly.
876
+ _barWidth = (0, _index1.getBarWidth)(props.barWidth, props.maxBarWidth, (0, _index1.calculateAppropriateBarWidth)(uniqueX, totalWidth - 2 * (_domainMargin - MIN_DOMAIN_MARGIN), _xAxisInnerPadding), props.mode);
877
+ _domainMargin += _barWidth / 2;
852
878
  }
853
879
  return {
854
880
  ...margins,
@@ -931,6 +957,7 @@ const VerticalBarChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>
931
957
  xAxisOuterPadding: _xAxisOuterPadding
932
958
  },
933
959
  componentRef: cartesianChartRef,
960
+ showRoundOffXTickValues: !(0, _index1.isScalePaddingDefined)(props.xAxisInnerPadding, props.xAxisPadding) && props.mode !== 'histogram',
934
961
  /* eslint-disable react/jsx-no-bind */ // eslint-disable-next-line react/no-children-prop
935
962
  children: (props)=>{
936
963
  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)));
@@ -1 +1 @@
1
- {"version":3,"sources":["VerticalBarChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useVerticalBarChartStyles } from './useVerticalBarChartStyles.styles';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { line as d3Line } from 'd3-shape';\nimport { select as d3Select } from 'd3-selection';\nimport {\n scaleLinear as d3ScaleLinear,\n ScaleLinear as D3ScaleLinear,\n scaleBand as d3ScaleBand,\n scaleUtc as d3ScaleUtc,\n} from 'd3-scale';\nimport { useId } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport {\n AccessibilityProps,\n CartesianChart,\n Margins,\n Legend,\n RefArrayData,\n VerticalBarChartProps,\n VerticalBarChartDataPoint,\n Legends,\n ChildProps,\n YValueHover,\n ChartPopover,\n Chart,\n DataPoint,\n} from '../../index';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n NumericAxis,\n getTypeOfAxis,\n tooltipOfAxislabels,\n formatScientificLimitWidth,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n calculateAppropriateBarWidth,\n useRtl,\n areArraysEqual,\n calculateLongestLabelWidth,\n findVerticalNumericMinMaxOfY,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfVerticalNumeric,\n domainRangeOfDateForAreaLineVerticalBarChart,\n domainRangeOfXStringAxis,\n createStringYAxis,\n} from '../../utilities/index';\n\nenum CircleVisbility {\n show = 'visibility',\n hide = 'hidden',\n}\n\nconst MIN_DOMAIN_MARGIN = 8;\n\n// Create a VerticalBarChart variant which uses these default styles and this styled subcomponent.\n/**\n * VerticalBarchart component\n * {@docCategory VerticalBarChart}\n */\nexport const VerticalBarChart: React.FunctionComponent<VerticalBarChartProps> = React.forwardRef<\n HTMLDivElement,\n VerticalBarChartProps\n>((props, forwardedRef) => {\n let _points: VerticalBarChartDataPoint[] = [];\n let _barWidth: number = 0;\n let _colors: string[];\n const _refArray: RefArrayData[] = [];\n let margins: Margins;\n const _useRtl: boolean = useRtl();\n let _bars: JSX.Element[];\n let _xAxisLabels: string[];\n let _yMax: number;\n let _yMin: number;\n let _isHavingLine: boolean = _checkForLine();\n const _tooltipId: string = useId('VCTooltipID_');\n const _xAxisType: XAxisTypes =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\n let _calloutAnchorPoint: VerticalBarChartDataPoint | null;\n let _domainMargin: number;\n const _emptyChartId: string = useId('_VBC_empty');\n const _vbcLineId: string = useId('_VBC_line_');\n const _vbcPointId: string = useId('_VBC_point_');\n const _vbcBarId: string = useId('_VBC_bar_');\n let _xAxisInnerPadding: number = 0;\n let _xAxisOuterPadding: number = 0;\n type ColorScale = (_p?: number) => string;\n const cartesianChartRef = React.useRef<Chart>(null);\n\n const [color, setColor] = React.useState<string>('');\n const [dataForHoverCard, setDataForHoverCard] = React.useState<number>(0);\n const [activeLegend, setActiveLegend] = React.useState<string | undefined>(undefined);\n const [xCalloutValue, setXCalloutValue] = React.useState<string | undefined>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string | undefined>('');\n const [activeXdataPoint, setActiveXDatapoint] = React.useState<string | number | Date | null>(null);\n const [hoveredYValues, setYValueHover] = React.useState<YValueHover[]>();\n const [hoverXValue, setHoverXValue] = React.useState<string | number | undefined>('');\n const [calloutLegend, setCalloutLegend] = React.useState<string>('');\n const [callOutAccessibilityData, setCalloutAccessibilityData] = React.useState<AccessibilityProps>();\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<VerticalBarChartDataPoint>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const prevPropsRef = React.useRef<VerticalBarChartProps | null>(null);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n }),\n [],\n );\n\n React.useEffect(() => {\n if (prevPropsRef.current) {\n const prevProps = prevPropsRef.current;\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, props.legendProps?.selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n if (prevProps.height !== props.height || prevProps.width !== props.width) {\n _adjustProps();\n }\n }\n prevPropsRef.current = props;\n }, [props, prevPropsRef, _adjustProps]);\n\n function _getDomainNRangeValues(\n points: DataPoint[],\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfVerticalNumeric(points, margins, width, isRTL, barWidth!);\n } else if (xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = domainRangeOfDateForAreaLineVerticalBarChart(\n points,\n margins,\n width,\n isRTL,\n tickValues! as Date[],\n chartType,\n barWidth,\n );\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\n }\n\n function _createLine(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScalePrimary: any,\n containerHeight: number = 0,\n containerWidth: number = 0,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScaleSecondary?: any,\n ): React.ReactNode {\n const isStringAxis = _xAxisType === XAxisTypes.StringAxis;\n const colorScale = _createColors();\n const { data, lineLegendColor = tokens.colorPaletteYellowBackground1, lineLegendText } = props;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const lineData: Array<any> = [];\n const line: JSX.Element[] = [];\n data &&\n data.forEach((item: VerticalBarChartDataPoint, index: number) => {\n if (item.lineData && item.lineData.y) {\n lineData.push({\n x: item.x,\n y: item.lineData!.y,\n useSecondaryYScale: item.lineData!.useSecondaryYScale ?? false,\n point: item,\n index,\n });\n }\n });\n const linePath = d3Line()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => (isStringAxis ? xScale(d.x) + 0.5 * xScale.bandwidth() : xScale(d.x)))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => (d.useSecondaryYScale && yScaleSecondary ? yScaleSecondary(d.y) : yScalePrimary(d.y)));\n const shouldHighlight = _legendHighlighted(lineLegendText!) || _noLegendHighlighted() ? true : false;\n const lineBorderWidth = props.lineOptions?.lineBorderWidth\n ? Number.parseFloat(props.lineOptions!.lineBorderWidth!.toString())\n : 0;\n\n if (lineBorderWidth > 0) {\n line.push(\n <path\n key={_vbcLineId}\n id={_vbcLineId}\n opacity={shouldHighlight ? 1 : 0.1}\n d={linePath(lineData)!}\n fill=\"transparent\"\n strokeLinecap=\"square\"\n strokeWidth={3 + lineBorderWidth * 2}\n className={classes.lineBorder}\n />,\n );\n }\n line.push(\n <path\n key={_vbcLineId}\n id={_vbcLineId}\n opacity={shouldHighlight ? 1 : 0.1}\n d={linePath(lineData)!}\n fill=\"transparent\"\n strokeLinecap=\"square\"\n strokeWidth={3}\n stroke={lineLegendColor}\n />,\n );\n\n const dots: React.ReactNode[] = lineData.map(\n (\n item: {\n x: number | string;\n y: number;\n useSecondaryYScale: boolean;\n point: VerticalBarChartDataPoint;\n index: number;\n },\n index: number,\n ) => {\n // Create an object to store line point ref so that the object can be passed by reference to the focus handler\n const circleRef: { refElement: SVGCircleElement | null } = { refElement: null };\n return (\n <circle\n key={index}\n id={`${_vbcPointId}-${index}`}\n cx={isStringAxis ? xScale(item.x) + 0.5 * xScale.bandwidth() : xScale(item.x)}\n cy={item.useSecondaryYScale && yScaleSecondary ? yScaleSecondary(item.y) : yScalePrimary(item.y)}\n onMouseOver={event =>\n _legendHighlighted(lineLegendText!)\n ? _lineHover(item.point, event)\n : _onBarHover(item.point, colorScale(item.y), event)\n }\n onMouseOut={_onBarLeave}\n r={_getCircleVisibilityAndRadius(item.x, lineLegendText!).radius}\n stroke={lineLegendColor}\n fill={tokens.colorNeutralBackground1}\n strokeWidth={3}\n visibility={_getCircleVisibilityAndRadius(item.x, lineLegendText!).visibility}\n onClick={item.point.lineData?.onClick}\n // When no legend is highlighted: Line points are automatically displayed along with the bars\n // at the same x-axis point in the stack callout. So to prevent an increase in focusable elements\n // and avoid conveying duplicate info, make these line points non-focusable.\n data-is-focusable={_legendHighlighted(lineLegendText!)}\n ref={e => (circleRef.refElement = e)}\n onFocus={event => _lineFocus(event, item.point, circleRef)}\n onBlur={_handleChartMouseLeave}\n tabIndex={_legendHighlighted(lineLegendText!) ? 0 : undefined}\n />\n );\n },\n );\n\n return (\n <>\n {line}\n {dots}\n </>\n );\n }\n\n function _getCircleVisibilityAndRadius(\n xAxisPoint: string | number | Date,\n legend: string,\n ): { visibility: CircleVisbility; radius: number } {\n if (!_noLegendHighlighted()) {\n if (xAxisPoint === activeXdataPoint && _legendHighlighted(legend)) {\n return { visibility: CircleVisbility.show, radius: 8 };\n } else if (_legendHighlighted(legend)) {\n // Don't hide the circle to keep it focusable. For more information,\n // see https://fuzzbomb.github.io/accessibility-demos/visually-hidden-focus-test.html\n return { visibility: CircleVisbility.show, radius: 0.3 };\n } else {\n return { visibility: CircleVisbility.hide, radius: 0 };\n }\n } else {\n return {\n visibility: activeXdataPoint === xAxisPoint ? CircleVisbility.show : CircleVisbility.hide,\n radius: 8,\n };\n }\n }\n\n function _checkForLine(): boolean {\n const { data } = props;\n return data!.some((item: VerticalBarChartDataPoint) => item?.lineData?.y !== undefined);\n }\n\n function _adjustProps(): void {\n _points = props.data || [];\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n const defaultColors: string[] = [\n tokens.colorPaletteBlueForeground2,\n tokens.colorPaletteCornflowerForeground2,\n tokens.colorPaletteDarkGreenForeground2,\n tokens.colorPaletteNavyForeground2,\n tokens.colorPaletteDarkOrangeForeground2,\n ];\n _colors = props.colors || defaultColors;\n _isHavingLine = _checkForLine();\n _xAxisInnerPadding = getScalePadding(props.xAxisInnerPadding, props.xAxisPadding, 2 / 3);\n _xAxisOuterPadding = getScalePadding(props.xAxisOuterPadding, props.xAxisPadding, 0);\n }\n\n function _getMargins(_margins: Margins) {\n margins = _margins;\n }\n\n function _renderContentForBothLineAndBars(point: VerticalBarChartDataPoint): JSX.Element {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);\n const content: JSX.Element[] = YValueHover.map((item: YValueHover, index: number) => {\n return (\n <>\n <ChartPopover\n culture={props.culture ?? 'en-us'}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n legend={item.legend!}\n {...(index === 0 && { XValue: `${hoverXValue || item.data}` })}\n YValue={item.data || item.y}\n color={item.color}\n isCalloutForStack={false}\n />\n </>\n );\n });\n return <>{content}</>;\n }\n\n function _renderContentForOnlyBars(_props: VerticalBarChartDataPoint): JSX.Element {\n return (\n <>\n <ChartPopover\n XValue={_props.xAxisCalloutData || (_props.x as string)}\n xCalloutValue={xCalloutValue}\n yCalloutValue={yCalloutValue}\n culture={props.culture ?? 'en-us'}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n legend={_props.legend!}\n YValue={_props.yAxisCalloutData || _props.y}\n color={!props.useSingleColor && _props.color ? _props.color : _createColors()(_props.y)}\n isCalloutForStack={false}\n />\n </>\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n function _renderCallout(props?: VerticalBarChartDataPoint): JSX.Element | null {\n return props ? (_isHavingLine ? _renderContentForBothLineAndBars(props) : _renderContentForOnlyBars(props)) : null;\n }\n\n function _getCustomizedCallout() {\n return props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps, _renderCallout)\n : null;\n }\n\n function _getGraphData(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale: any,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n ) {\n return (_bars =\n _xAxisType === XAxisTypes.NumericAxis\n ? _createNumericBars(containerHeight, containerWidth, xElement!)\n : _xAxisType === XAxisTypes.DateAxis\n ? _createDateBars(containerHeight, containerWidth, xElement!)\n : _createStringBars(containerHeight, containerWidth, xElement!));\n }\n\n function _createColors(): D3ScaleLinear<string, string> | ColorScale {\n const increment = _colors.length <= 1 ? 1 : 1 / (_colors.length - 1);\n const { useSingleColor = false } = props;\n if (useSingleColor) {\n return (_p?: number) => {\n const { colors } = props;\n return colors && colors.length > 0 ? colors[0] : tokens.colorPaletteBlueBackground2;\n };\n }\n const domainValues = [];\n for (let i = 0; i < _colors.length; i++) {\n domainValues.push(increment * i * _yMax);\n }\n const colorScale = d3ScaleLinear<string>().domain(domainValues).range(_colors);\n return colorScale;\n }\n\n function _refCallback(element: SVGRectElement, legendTitle: string): void {\n _refArray.push({ index: legendTitle, refElement: element });\n }\n\n function _getCalloutContentForLineAndBar(point: VerticalBarChartDataPoint): {\n YValueHover: YValueHover[];\n hoverXValue: string | number | undefined;\n } {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const YValueHover: YValueHover[] = [];\n const { useSingleColor = false } = props;\n const { data, lineLegendText, lineLegendColor = tokens.colorPaletteYellowBackground1 } = props;\n const selectedPoint = data!.filter((xDataPoint: VerticalBarChartDataPoint) => xDataPoint.x === point.x);\n // Check if the line legend is highlighted or no legend is highlighted\n if (\n _isHavingLine &&\n selectedPoint[0].lineData?.y !== undefined &&\n (_legendHighlighted(lineLegendText) || _noLegendHighlighted())\n ) {\n // Add callout data for the line\n YValueHover.push({\n legend: lineLegendText,\n color: lineLegendColor,\n y: selectedPoint[0].lineData?.y,\n data: selectedPoint[0].lineData?.yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].lineData?.yAxisCalloutData,\n });\n }\n // Check if the bar legend is highlighted or no legend is highlighted\n if (selectedLegends.includes(selectedPoint[0].legend!) || _noLegendHighlighted()) {\n // Add callout data for the bar\n YValueHover.push({\n legend: selectedPoint[0].legend,\n y: selectedPoint[0].y,\n color: !useSingleColor\n ? selectedPoint[0].color\n ? selectedPoint[0].color\n : _createColors()(selectedPoint[0].y)\n : _createColors()(1),\n data: selectedPoint[0].yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].yAxisCalloutData,\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const hoverXValue = point.x instanceof Date ? point.x.toLocaleString() : point.x.toString();\n return {\n YValueHover,\n hoverXValue: point.xAxisCalloutData || hoverXValue,\n };\n }\n\n function _onBarHover(\n point: VerticalBarChartDataPoint,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);\n if (_calloutAnchorPoint !== point) {\n _calloutAnchorPoint = point;\n /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(point.legend));\n setDataForHoverCard(point.y);\n setCalloutLegend(point.legend!);\n setColor(point.color || color);\n // To display callout value, if no callout value given, taking given point.x value as a string.\n setXCalloutValue(\n point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()),\n );\n setDataPointCalloutProps(point);\n // Hovering over a bar should highlight corresponding line points only when no legend is selected\n setActiveXDatapoint(_noLegendHighlighted() ? point.x : null);\n setYValueHover(YValueHover);\n setHoverXValue(hoverXValue);\n setCalloutAccessibilityData(point.callOutAccessibilityData);\n }\n }\n\n function _onBarLeave(): void {\n /**/\n }\n\n function _handleChartMouseLeave(): void {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n setActiveXDatapoint(null);\n setYValueHover([]);\n setHoverXValue('');\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n function _onBarFocus(\n event: React.FocusEvent<SVGRectElement, Element>,\n point: VerticalBarChartDataPoint,\n refArrayIndexNumber: number,\n color: string,\n ): void {\n let x = 0;\n let y = 0;\n\n const targetRect = (event.target as SVGRectElement).getBoundingClientRect();\n x = targetRect.left + targetRect.width / 2;\n y = targetRect.top + targetRect.height / 2;\n updatePosition(x, y);\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);\n _refArray.forEach((obj: RefArrayData, index: number) => {\n if (obj.index === point.legend! && refArrayIndexNumber === index) {\n /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(point.legend));\n setDataForHoverCard(point.y);\n setCalloutLegend(point.legend!);\n setColor(point.color || color);\n // To display callout value, if no callout value given, taking given point.x value as a string.\n setXCalloutValue(\n point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()),\n );\n setYCalloutValue(point.yAxisCalloutData!);\n setDataPointCalloutProps(point);\n // Hovering over a bar should highlight corresponding line points only when no legend is selected\n setActiveXDatapoint(point.x);\n setYValueHover(YValueHover);\n setHoverXValue(hoverXValue);\n setCalloutAccessibilityData(point.callOutAccessibilityData);\n }\n });\n }\n\n function _lineHover(point: VerticalBarChartDataPoint, mouseEvent: React.MouseEvent<SVGElement>) {\n mouseEvent.persist();\n _lineHoverFocus(point, mouseEvent);\n }\n\n function _lineFocus(\n event: React.FocusEvent<SVGCircleElement, Element>,\n point: VerticalBarChartDataPoint,\n ref: { refElement: SVGCircleElement | null },\n ) {\n if (ref.refElement) {\n _lineHoverFocus(point, ref.refElement);\n }\n }\n\n function _lineHoverFocus(\n point: VerticalBarChartDataPoint,\n _refSelected: React.MouseEvent<SVGElement> | SVGCircleElement,\n ) {\n const { lineLegendText = '', lineLegendColor = tokens.colorPaletteYellowBackground1 } = props;\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(lineLegendText));\n setCalloutLegend(lineLegendText);\n setDataForHoverCard(point.lineData!.y);\n setColor(lineLegendColor);\n setXCalloutValue(\n point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()),\n );\n setYCalloutValue(point.lineData!.yAxisCalloutData);\n setDataPointCalloutProps(point);\n setActiveXDatapoint(point.x);\n }\n\n function _getScales(\n containerHeight: number,\n containerWidth: number,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): { xBarScale: any; yBarScale: any } {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let xBarScale: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const yBarScale: any = d3ScaleLinear()\n .domain([_yMin, _yMax])\n .range([0, containerHeight - margins.bottom! - margins.top!]);\n\n if (_xAxisType === XAxisTypes.NumericAxis) {\n const xMax = d3Max(_points, (point: VerticalBarChartDataPoint) => point.x as number)!;\n const xMin = d3Min(_points, (point: VerticalBarChartDataPoint) => point.x as number)!;\n xBarScale = d3ScaleLinear()\n .domain(_useRtl ? [xMax, xMin] : [xMin, xMax])\n .nice()\n .range([margins.left! + _domainMargin, containerWidth - margins.right! - _domainMargin]);\n } else if (_xAxisType === XAxisTypes.DateAxis) {\n const sDate = d3Min(_points, (point: VerticalBarChartDataPoint) => point.x as Date)!;\n const lDate = d3Max(_points, (point: VerticalBarChartDataPoint) => point.x as Date)!;\n xBarScale = d3ScaleUtc()\n .domain([sDate, lDate])\n .range(\n _useRtl\n ? [containerWidth - margins.right! - _domainMargin, margins.left! + _domainMargin]\n : [margins.left! + _domainMargin, containerWidth - margins.right! - _domainMargin],\n );\n } else {\n xBarScale = d3ScaleBand()\n .domain(_xAxisLabels)\n .range(\n _useRtl\n ? [containerWidth - margins.right! - _domainMargin, margins.left! + _domainMargin]\n : [margins.left! + _domainMargin, containerWidth - margins.right! - _domainMargin],\n )\n .paddingInner(_xAxisInnerPadding)\n .paddingOuter(_xAxisOuterPadding);\n }\n\n return { xBarScale, yBarScale };\n }\n\n const classes = useVerticalBarChartStyles(props);\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _calculateMinBarHeight(yMin: number, yMax: number, yReferencePoint: number, yBarScale: any): number {\n const maxHeightFromBaseline =\n yMax < 0\n ? Math.abs(yMin - yReferencePoint)\n : Math.max(Math.abs(yMax - yReferencePoint), Math.abs(yMin - yReferencePoint));\n return Math.ceil(yBarScale(maxHeightFromBaseline) / 100.0);\n }\n\n function _createNumericBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSX.Element[] {\n const { useSingleColor = false } = props;\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);\n const colorScale = _createColors();\n const yReferencePoint = _yMax < 0 ? _yMax : 0;\n const bars = _points.map((point: VerticalBarChartDataPoint, index: number) => {\n const shouldHighlight = _legendHighlighted(point.legend!) || _noLegendHighlighted() ? true : false;\n\n let barHeight: number = yBarScale(point.y) - yBarScale(yReferencePoint);\n const isHeightNegative = barHeight < 0;\n barHeight = Math.abs(barHeight);\n // Calculate threshold for minimum visible bar height\n const minBarHeight = _calculateMinBarHeight(_yMin, _yMax, yReferencePoint, yBarScale);\n let adjustedBarHeight = barHeight;\n\n if (barHeight === 0) {\n return <React.Fragment key={point.x as string}> </React.Fragment>;\n }\n // Adjust bar height if it's smaller than the threshold\n else if (barHeight <= minBarHeight) {\n adjustedBarHeight = minBarHeight;\n }\n const xPoint = xBarScale(point.x as number) - _barWidth / 2;\n const yPoint =\n containerHeight -\n margins.bottom! -\n (isHeightNegative ? -1 * adjustedBarHeight : adjustedBarHeight) -\n yBarScale(yReferencePoint);\n const baselineHeight = containerHeight - margins.bottom! - yBarScale(yReferencePoint);\n return (\n <g key={`${point.x}_${index}` as string}>\n <rect\n id={`${_vbcBarId}-${index}`}\n x={xPoint}\n y={!isHeightNegative ? yPoint : baselineHeight}\n width={_barWidth}\n height={adjustedBarHeight}\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={event => _onBarHover(point, colorScale(point.y), event)}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n onMouseLeave={_onBarLeave}\n onFocus={event => _onBarFocus(event, point, index, colorScale(point.y))}\n onBlur={_onBarLeave}\n fill={point.color && !useSingleColor ? point.color : colorScale(point.y)}\n tabIndex={!props.hideTooltip && shouldHighlight ? 0 : undefined}\n opacity={shouldHighlight ? 1 : 0.1}\n rx={props.roundCorners ? 3 : 0}\n />\n {_renderBarLabel(xPoint, yPoint, point.y, point.legend!, isHeightNegative)}\n </g>\n );\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return bars;\n }\n\n function _createStringBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSX.Element[] {\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);\n const colorScale = _createColors();\n const yReferencePoint = _yMax < 0 ? _yMax : 0;\n const bars = _points.map((point: VerticalBarChartDataPoint, index: number) => {\n const shouldHighlight = _legendHighlighted(point.legend!) || _noLegendHighlighted() ? true : false;\n let barHeight: number = yBarScale(point.y) - yBarScale(yReferencePoint);\n const isHeightNegative = barHeight < 0;\n barHeight = Math.abs(barHeight);\n // Calculate threshold for minimum visible bar height\n const minBarHeight = _calculateMinBarHeight(_yMin, _yMax, yReferencePoint, yBarScale);\n let adjustedBarHeight = barHeight;\n\n if (barHeight === 0) {\n return <React.Fragment key={point.x as string}> </React.Fragment>;\n }\n // Adjust bar height if it's smaller than the threshold\n else if (barHeight <= minBarHeight) {\n adjustedBarHeight = minBarHeight;\n }\n const xPoint = xBarScale(point.x);\n const yPoint =\n containerHeight -\n margins.bottom! -\n (isHeightNegative ? -1 * adjustedBarHeight : adjustedBarHeight) -\n yBarScale(yReferencePoint);\n const baselineHeight = containerHeight - margins.bottom! - yBarScale(yReferencePoint);\n // Setting the bar width here is safe because there are no dependencies earlier in the code\n // that rely on the width of bars in vertical bar charts with string x-axis.\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, xBarScale.bandwidth());\n return (\n <g\n key={point.x instanceof Date ? `${point.x.getTime()}_${index}` : `${point.x}_${index}`}\n transform={`translate(${0.5 * (xBarScale.bandwidth() - _barWidth)}, 0)`}\n >\n <rect\n id={`${_vbcBarId}-${index}`}\n x={xPoint}\n y={!isHeightNegative ? yPoint : baselineHeight}\n width={_barWidth}\n height={adjustedBarHeight}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={event => _onBarHover(point, colorScale(point.y), event)}\n onMouseLeave={_onBarLeave}\n onBlur={_onBarLeave}\n onFocus={event => _onBarFocus(event, point, index, colorScale(point.y))}\n fill={point.color ? point.color : colorScale(point.y)}\n tabIndex={!props.hideTooltip && shouldHighlight ? 0 : undefined}\n rx={props.roundCorners ? 3 : 0}\n opacity={shouldHighlight ? 1 : 0.1}\n />\n {_renderBarLabel(xPoint, yPoint, point.y, point.legend!, isHeightNegative)}\n </g>\n );\n });\n\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: xAxisElement,\n showTooltip: props.showXAxisLablesTooltip,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return bars;\n }\n\n function _createDateBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSX.Element[] {\n const { useSingleColor = false } = props;\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);\n const colorScale = _createColors();\n const yReferencePoint = _yMax < 0 ? _yMax : 0;\n const bars = _points.map((point: VerticalBarChartDataPoint, index: number) => {\n const shouldHighlight = _legendHighlighted(point.legend!) || _noLegendHighlighted() ? true : false;\n let barHeight: number = yBarScale(point.y) - yBarScale(yReferencePoint);\n const isHeightNegative = barHeight < 0;\n barHeight = Math.abs(barHeight);\n // Calculate threshold for minimum visible bar height\n const minBarHeight = _calculateMinBarHeight(_yMin, _yMax, yReferencePoint, yBarScale);\n let adjustedBarHeight = barHeight;\n\n if (barHeight === 0) {\n return <React.Fragment key={point.x as string}> </React.Fragment>;\n }\n // Adjust bar height if it's smaller than the threshold\n else if (barHeight <= minBarHeight) {\n adjustedBarHeight = minBarHeight;\n }\n const xPoint = xBarScale(point.x as number) - _barWidth / 2;\n const yPoint =\n containerHeight -\n margins.bottom! -\n (isHeightNegative ? -1 * adjustedBarHeight : adjustedBarHeight) -\n yBarScale(yReferencePoint);\n const baselineHeight = containerHeight - margins.bottom! - yBarScale(yReferencePoint);\n return (\n <g key={point.x instanceof Date ? `${point.x.getTime()}_${index}` : `${point.x}_${index}`}>\n <rect\n id={`${_vbcBarId}-${index}`}\n x={xPoint}\n className={classes.opacityChangeOnHover}\n y={!isHeightNegative ? yPoint : baselineHeight}\n width={_barWidth}\n height={adjustedBarHeight}\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={event => _onBarHover(point, colorScale(point.y), event)}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n onMouseLeave={_onBarLeave}\n onFocus={event => _onBarFocus(event, point, index, colorScale(point.y))}\n onBlur={_onBarLeave}\n fill={point.color && !useSingleColor ? point.color : colorScale(point.y)}\n tabIndex={!props.hideTooltip && shouldHighlight ? 0 : undefined}\n rx={props.roundCorners ? 3 : 0}\n opacity={shouldHighlight ? 1 : 0.1}\n />\n {_renderBarLabel(xPoint, yPoint, point.y, point.legend!, isHeightNegative)}\n </g>\n );\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return bars;\n }\n\n function _onLegendHover(legendTitle: string): void {\n setActiveLegend(legendTitle);\n }\n\n function _onLegendLeave(): void {\n setActiveLegend(undefined);\n }\n\n function _getLegendData(data: VerticalBarChartDataPoint[]): JSX.Element {\n const { useSingleColor } = props;\n const { lineLegendText, lineLegendColor = tokens.colorPaletteYellowForeground1 } = props;\n const actions: Legend[] = [];\n const mapLegendToColor: Record<string, string> = {};\n data.forEach((point: VerticalBarChartDataPoint, _index: number) => {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const color: string = !useSingleColor ? point.color! : _createColors()(1);\n mapLegendToColor[point.legend!] = color;\n });\n Object.entries(mapLegendToColor).forEach(([legendTitle, color]) => {\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: legendTitle,\n color,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(legendTitle);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n };\n actions.push(legend);\n });\n if (_isHavingLine && lineLegendText && lineLegendColor) {\n const lineLegend: Legend = {\n title: lineLegendText,\n color: lineLegendColor,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(lineLegendText);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n isLineLegendInBarChart: true,\n };\n actions.unshift(lineLegend);\n }\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n selectedLegends={selectedLegends}\n onChange={_onLegendSelectionChange}\n />\n );\n return legends;\n }\n\n function _onLegendSelectionChange(\n legendsSelected: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(legendsSelected);\n } else {\n setSelectedLegends(legendsSelected.slice(-1));\n }\n\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(legendsSelected, event, currentLegend);\n }\n }\n\n function _getAxisData(yAxisData: IAxisData) {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n _yMax = Math.max(domainValue[domainValue.length - 1], props.yMaxValue || 0);\n _yMin = Math.min(domainValue[0], props.yMinValue || 0);\n }\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n function _legendHighlighted(legendTitle: string | undefined): boolean {\n return _getHighlightedLegend().includes(legendTitle!);\n }\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n function _noLegendHighlighted(): boolean {\n return _getHighlightedLegend().length === 0;\n }\n\n function _getHighlightedLegend() {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n }\n\n function _getAriaLabel(point: VerticalBarChartDataPoint): string {\n const xValue = point.xAxisCalloutData\n ? point.xAxisCalloutData\n : point.x instanceof Date\n ? point.x.toLocaleString()\n : point.x;\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.y;\n const lineLegend = props.lineLegendText || 'Line';\n const lineYValue = point.lineData?.yAxisCalloutData || point.lineData?.y;\n return (\n point.callOutAccessibilityData?.ariaLabel ||\n `${xValue}. ` +\n (legend ? `${legend}, ` : '') +\n `${yValue}.` +\n (typeof lineYValue !== 'undefined' ? ` ${lineLegend}, ${lineYValue}.` : '')\n );\n }\n\n function _renderBarLabel(xPoint: number, yPoint: number, barValue: number, legend: string, isNegativeBar: boolean) {\n if (props.hideLabels || _barWidth < 16 || !(_legendHighlighted(legend) || _noLegendHighlighted())) {\n return null;\n }\n\n return (\n <text\n x={xPoint + _barWidth / 2}\n y={isNegativeBar ? yPoint + 12 : yPoint - 6}\n textAnchor=\"middle\"\n className={classes.barLabel}\n aria-hidden={true}\n >\n {typeof props.yAxisTickFormat === 'function'\n ? props.yAxisTickFormat(barValue)\n : formatScientificLimitWidth(barValue)}\n </text>\n );\n }\n\n function _getDomainMargins(containerWidth: number): Margins {\n _domainMargin = MIN_DOMAIN_MARGIN;\n\n /** Total width available to render the bars */\n const totalWidth = containerWidth - (margins.left! + MIN_DOMAIN_MARGIN) - (margins.right! + MIN_DOMAIN_MARGIN);\n /** Rate at which the space between the bars changes wrt the bar width */\n const barGapRate = _xAxisInnerPadding / (1 - _xAxisInnerPadding);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(props.xAxisOuterPadding, props.xAxisPadding)) {\n // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available\n // to adjust the space before the first bar and after the last bar.\n _domainMargin = 0;\n } else if (props.barWidth !== 'auto') {\n // Update the bar width so that when CartesianChart rerenders,\n // the following calculations don't use the previous bar width.\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n /** Total width required to render the bars. Directly proportional to bar width */\n const reqWidth = (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate) * _barWidth;\n\n if (totalWidth >= reqWidth) {\n // Center align the chart by setting equal left and right margins for domain\n _domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;\n }\n } else if (props.mode === 'plotly' && _xAxisLabels.length > 1) {\n // Calculate the remaining width after rendering bars at their maximum allowable width\n const bandwidth = totalWidth / (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate);\n const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, bandwidth);\n let reqWidth = (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate) * barWidth;\n const margin1 = (totalWidth - reqWidth) / 2;\n\n // Calculate the remaining width after accounting for the space required to render x-axis labels\n const step = calculateLongestLabelWidth(_xAxisLabels) + 20;\n reqWidth = (_xAxisLabels.length - _xAxisInnerPadding) * step;\n const margin2 = (totalWidth - reqWidth) / 2;\n\n _domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));\n }\n } else {\n const uniqueX: Record<number, number | Date> = {};\n props.data?.forEach(point => {\n if (point.x instanceof Date) {\n uniqueX[point.x.getTime()] = point.x;\n } else {\n uniqueX[point.x as number] = point.x as number;\n }\n });\n const data = Object.values(uniqueX) as number[] | Date[];\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, calculateAppropriateBarWidth(data, totalWidth));\n _domainMargin = MIN_DOMAIN_MARGIN + _barWidth / 2;\n }\n\n return {\n ...margins,\n left: margins.left! + _domainMargin,\n right: margins.right! + _domainMargin,\n };\n }\n\n function _isChartEmpty(): boolean {\n return _points.length === 0 || (_points.every(point => point.y === 0) && !_isHavingLine);\n }\n\n function updatePosition(newX: number, newY: number) {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n _adjustProps();\n _xAxisLabels = _points.map((point: VerticalBarChartDataPoint) => point.x as string);\n _yMax = Math.max(d3Max(_points, (point: VerticalBarChartDataPoint) => point.y)!, props.yMaxValue || 0);\n _yMin = Math.min(d3Min(_points, (point: VerticalBarChartDataPoint) => point.y)!, props.yMinValue || 0);\n const legendBars: JSX.Element = _getLegendData(_points);\n const calloutProps = {\n ...(_isHavingLine && {\n YValueHover: hoveredYValues,\n hoverXValue: hoverXValue,\n }),\n color: color,\n legend: calloutLegend,\n XValue: xCalloutValue,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData),\n clickPosition: clickPosition,\n isPopoverOpen: isPopoverOpen,\n isCalloutForStack: _isHavingLine && (_noLegendHighlighted() || _getHighlightedLegend().length > 1),\n culture: props.culture ?? 'en-us',\n isCartesian: true,\n customCallout: {\n customizedCallout: _getCustomizedCallout() != null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n };\n\n const tickParams = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n return !_isChartEmpty() ? (\n <CartesianChart\n {...props}\n points={_points}\n chartType={ChartTypes.VerticalBarChart}\n xAxisType={_xAxisType}\n createYAxis={createNumericYAxis}\n calloutProps={calloutProps}\n tickParams={tickParams}\n {...(_isHavingLine && _noLegendHighlighted() && { isCalloutForStack: true })}\n legendBars={legendBars}\n datasetForXAxisDomain={_xAxisLabels}\n barwidth={_barWidth}\n createStringYAxis={createStringYAxis}\n getmargins={_getMargins}\n getMinMaxOfYAxis={findVerticalNumericMinMaxOfY}\n getGraphData={_getGraphData}\n getDomainNRangeValues={_getDomainNRangeValues}\n getAxisData={_getAxisData}\n onChartMouseLeave={_handleChartMouseLeave}\n getDomainMargins={_getDomainMargins}\n {...(_xAxisType === XAxisTypes.StringAxis && {\n xAxisInnerPadding: _xAxisInnerPadding,\n xAxisOuterPadding: _xAxisOuterPadding,\n })}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: ChildProps) => {\n return (\n <>\n <g>{_bars}</g>\n {_isHavingLine && (\n <g>\n {_createLine(\n props.xScale!,\n props.yScalePrimary!,\n props.containerHeight,\n props.containerWidth,\n props.yScaleSecondary,\n )}\n </g>\n )}\n </>\n );\n }}\n />\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n});\nVerticalBarChart.displayName = 'VerticalBarChart';\n"],"names":["VerticalBarChart","CircleVisbility","MIN_DOMAIN_MARGIN","React","forwardRef","props","forwardedRef","_points","_barWidth","_colors","_refArray","margins","_useRtl","useRtl","_bars","_xAxisLabels","_yMax","_yMin","_isHavingLine","_checkForLine","_tooltipId","useId","_xAxisType","data","length","getTypeOfAxis","x","XAxisTypes","StringAxis","_calloutAnchorPoint","_domainMargin","_emptyChartId","_vbcLineId","_vbcPointId","_vbcBarId","_xAxisInnerPadding","_xAxisOuterPadding","cartesianChartRef","useRef","color","setColor","useState","dataForHoverCard","setDataForHoverCard","activeLegend","setActiveLegend","undefined","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","activeXdataPoint","setActiveXDatapoint","hoveredYValues","setYValueHover","hoverXValue","setHoverXValue","calloutLegend","setCalloutLegend","callOutAccessibilityData","setCalloutAccessibilityData","dataPointCalloutProps","setDataPointCalloutProps","clickPosition","setClickPosition","y","isPopoverOpen","setPopoverOpen","selectedLegends","setSelectedLegends","legendProps","prevPropsRef","useImperativeHandle","componentRef","chartContainer","current","useEffect","prevProps","areArraysEqual","height","width","_adjustProps","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","barWidth","tickValues","shiftX","domainNRangeValue","NumericAxis","domainRangeOfVerticalNumeric","DateAxis","domainRangeOfDateForAreaLineVerticalBarChart","domainRangeOfXStringAxis","_createLine","xScale","yScalePrimary","containerHeight","containerWidth","yScaleSecondary","isStringAxis","colorScale","_createColors","lineLegendColor","tokens","colorPaletteYellowBackground1","lineLegendText","lineData","line","forEach","item","index","push","useSecondaryYScale","point","linePath","d3Line","d","bandwidth","shouldHighlight","_legendHighlighted","_noLegendHighlighted","lineBorderWidth","lineOptions","Number","parseFloat","toString","createElement","path","key","id","opacity","fill","strokeLinecap","strokeWidth","className","classes","lineBorder","stroke","dots","map","circleRef","refElement","circle","cx","cy","onMouseOver","event","_lineHover","_onBarHover","onMouseOut","_onBarLeave","r","_getCircleVisibilityAndRadius","radius","colorNeutralBackground1","visibility","onClick","data-is-focusable","ref","e","onFocus","_lineFocus","onBlur","_handleChartMouseLeave","tabIndex","Fragment","xAxisPoint","legend","some","getBarWidth","maxBarWidth","defaultColors","colorPaletteBlueForeground2","colorPaletteCornflowerForeground2","colorPaletteDarkGreenForeground2","colorPaletteNavyForeground2","colorPaletteDarkOrangeForeground2","colors","getScalePadding","xAxisInnerPadding","xAxisPadding","xAxisOuterPadding","_getMargins","_margins","_renderContentForBothLineAndBars","YValueHover","_getCalloutContentForLineAndBar","content","ChartPopover","culture","XValue","YValue","isCalloutForStack","_renderContentForOnlyBars","_props","xAxisCalloutData","yAxisCalloutData","useSingleColor","_renderCallout","_getCustomizedCallout","onRenderCalloutPerDataPoint","_getGraphData","yScale","xElement","_createNumericBars","_createDateBars","_createStringBars","increment","_p","colorPaletteBlueBackground2","domainValues","i","d3ScaleLinear","domain","range","_refCallback","element","legendTitle","selectedPoint","filter","xDataPoint","includes","Date","toLocaleString","mouseEvent","persist","updatePosition","clientX","clientY","toLocaleDateString","_onBarFocus","refArrayIndexNumber","targetRect","target","getBoundingClientRect","left","top","obj","_lineHoverFocus","_refSelected","_getScales","xBarScale","yBarScale","bottom","xMax","d3Max","xMin","d3Min","nice","right","sDate","lDate","d3ScaleUtc","d3ScaleBand","paddingInner","paddingOuter","useVerticalBarChartStyles","_calculateMinBarHeight","yMin","yMax","yReferencePoint","maxHeightFromBaseline","Math","abs","max","ceil","bars","barHeight","isHeightNegative","minBarHeight","adjustedBarHeight","xPoint","yPoint","baselineHeight","g","rect","aria-label","_getAriaLabel","role","onMouseLeave","hideTooltip","rx","roundCorners","_renderBarLabel","showXAxisLablesTooltip","document","getElementById","remove","wrapXAxisLables","xAxisElement","d3Select","call","tooltipProps","tooltipCls","tooltip","axis","tooltipOfAxislabels","getTime","transform","showTooltip","opacityChangeOnHover","_onLegendHover","_onLegendLeave","_getLegendData","colorPaletteYellowForeground1","actions","mapLegendToColor","_index","Object","entries","title","hoverAction","onMouseOutAction","lineLegend","isLineLegendInBarChart","unshift","legends","Legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onChange","_onLegendSelectionChange","legendsSelected","currentLegend","canSelectMultipleLegends","slice","_getAxisData","yAxisData","yAxisDomainValues","domainValue","yMaxValue","min","yMinValue","_getHighlightedLegend","xValue","yValue","lineYValue","ariaLabel","barValue","isNegativeBar","hideLabels","text","textAnchor","barLabel","aria-hidden","yAxisTickFormat","formatScientificLimitWidth","_getDomainMargins","totalWidth","barGapRate","isScalePaddingDefined","reqWidth","mode","margin1","step","calculateLongestLabelWidth","margin2","uniqueX","values","calculateAppropriateBarWidth","_isChartEmpty","every","newX","newY","threshold","distance","sqrt","pow","legendBars","calloutProps","getAccessibleDataObject","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","tickFormat","CartesianChart","ChartTypes","createYAxis","createNumericYAxis","datasetForXAxisDomain","barwidth","createStringYAxis","getmargins","getMinMaxOfYAxis","findVerticalNumericMinMaxOfY","getGraphData","getDomainNRangeValues","getAxisData","onChartMouseLeave","getDomainMargins","children","div","style","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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GACErK,OAAA8H,aAAA,CAACoJ,KAAAA,MAAGvQ,QACHI,iBAAAA,WAAAA,GACCf,OAAA8H,aAAA,CAACoJ,KAAAA,MACErL,YACC3F,MAAM4F,MAAM,EACZ5F,MAAM6F,aAAa,EACnB7F,MAAM8F,eAAe,EACrB9F,MAAM+F,cAAc,EACpB/F,MAAMgG,eAAe;QAMjC;uBAGFlG,OAAA8H,aAAA,CAAC8Q,OAAAA;QAAI3Q,IAAIrG;QAAe0P,MAAM;QAASuH,OAAO;YAAE3Q,SAAS;QAAI;QAAGkJ,cAAY;;AAEhF;AACAvR,iBAAiBiZ,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/VerticalBarChart/VerticalBarChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useVerticalBarChartStyles } from './useVerticalBarChartStyles.styles';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { line as d3Line } from 'd3-shape';\nimport { select as d3Select } from 'd3-selection';\nimport {\n scaleLinear as d3ScaleLinear,\n ScaleLinear as D3ScaleLinear,\n scaleBand as d3ScaleBand,\n scaleUtc as d3ScaleUtc,\n} from 'd3-scale';\nimport { useId } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport {\n AccessibilityProps,\n CartesianChart,\n Margins,\n Legend,\n RefArrayData,\n VerticalBarChartProps,\n VerticalBarChartDataPoint,\n Legends,\n ChildProps,\n YValueHover,\n ChartPopover,\n Chart,\n DataPoint,\n} from '../../index';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n NumericAxis,\n getTypeOfAxis,\n tooltipOfAxislabels,\n formatScientificLimitWidth,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n calculateAppropriateBarWidth,\n useRtl,\n areArraysEqual,\n calculateLongestLabelWidth,\n findVerticalNumericMinMaxOfY,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfVerticalNumeric,\n domainRangeOfDateForAreaLineVerticalBarChart,\n domainRangeOfXStringAxis,\n createStringYAxis,\n} from '../../utilities/index';\n\nenum CircleVisbility {\n show = 'visibility',\n hide = 'hidden',\n}\n\nconst MIN_DOMAIN_MARGIN = 8;\n\n// Create a VerticalBarChart variant which uses these default styles and this styled subcomponent.\n/**\n * VerticalBarchart component\n * {@docCategory VerticalBarChart}\n */\nexport const VerticalBarChart: React.FunctionComponent<VerticalBarChartProps> = React.forwardRef<\n HTMLDivElement,\n VerticalBarChartProps\n>((props, forwardedRef) => {\n let _points: VerticalBarChartDataPoint[] = [];\n let _barWidth: number = 0;\n let _colors: string[];\n const _refArray: RefArrayData[] = [];\n let margins: Margins;\n const _useRtl: boolean = useRtl();\n let _bars: JSX.Element[];\n let _xAxisLabels: string[];\n let _yMax: number;\n let _yMin: number;\n let _isHavingLine: boolean = _checkForLine();\n const _tooltipId: string = useId('VCTooltipID_');\n const _xAxisType: XAxisTypes =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\n let _calloutAnchorPoint: VerticalBarChartDataPoint | null;\n let _domainMargin: number;\n const _emptyChartId: string = useId('_VBC_empty');\n const _vbcLineId: string = useId('_VBC_line_');\n const _vbcPointId: string = useId('_VBC_point_');\n const _vbcBarId: string = useId('_VBC_bar_');\n let _xAxisInnerPadding: number = 0;\n let _xAxisOuterPadding: number = 0;\n type ColorScale = (_p?: number) => string;\n const cartesianChartRef = React.useRef<Chart>(null);\n\n const [color, setColor] = React.useState<string>('');\n const [dataForHoverCard, setDataForHoverCard] = React.useState<number>(0);\n const [activeLegend, setActiveLegend] = React.useState<string | undefined>(undefined);\n const [xCalloutValue, setXCalloutValue] = React.useState<string | undefined>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string | undefined>('');\n const [activeXdataPoint, setActiveXDatapoint] = React.useState<string | number | Date | null>(null);\n const [hoveredYValues, setYValueHover] = React.useState<YValueHover[]>();\n const [hoverXValue, setHoverXValue] = React.useState<string | number | undefined>('');\n const [calloutLegend, setCalloutLegend] = React.useState<string>('');\n const [callOutAccessibilityData, setCalloutAccessibilityData] = React.useState<AccessibilityProps>();\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<VerticalBarChartDataPoint>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const prevPropsRef = React.useRef<VerticalBarChartProps | null>(null);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n }),\n [],\n );\n\n React.useEffect(() => {\n if (prevPropsRef.current) {\n const prevProps = prevPropsRef.current;\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, props.legendProps?.selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n if (prevProps.height !== props.height || prevProps.width !== props.width) {\n _adjustProps();\n }\n }\n prevPropsRef.current = props;\n }, [props, prevPropsRef, _adjustProps]);\n\n function _getDomainNRangeValues(\n points: DataPoint[],\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfVerticalNumeric(points, margins, width, isRTL, barWidth!);\n } else if (xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = domainRangeOfDateForAreaLineVerticalBarChart(\n points,\n margins,\n width,\n isRTL,\n tickValues! as Date[],\n chartType,\n barWidth,\n );\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\n }\n\n function _createLine(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScalePrimary: any,\n containerHeight: number = 0,\n containerWidth: number = 0,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScaleSecondary?: any,\n ): React.ReactNode {\n const isStringAxis = _xAxisType === XAxisTypes.StringAxis;\n const colorScale = _createColors();\n const { data, lineLegendColor = tokens.colorPaletteYellowBackground1, lineLegendText } = props;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const lineData: Array<any> = [];\n const line: JSX.Element[] = [];\n data &&\n data.forEach((item: VerticalBarChartDataPoint, index: number) => {\n if (item.lineData && item.lineData.y) {\n lineData.push({\n x: item.x,\n y: item.lineData!.y,\n useSecondaryYScale: item.lineData!.useSecondaryYScale ?? false,\n point: item,\n index,\n });\n }\n });\n const linePath = d3Line()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => (isStringAxis ? xScale(d.x) + 0.5 * xScale.bandwidth() : xScale(d.x)))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => (d.useSecondaryYScale && yScaleSecondary ? yScaleSecondary(d.y) : yScalePrimary(d.y)));\n const shouldHighlight = _legendHighlighted(lineLegendText!) || _noLegendHighlighted() ? true : false;\n const lineBorderWidth = props.lineOptions?.lineBorderWidth\n ? Number.parseFloat(props.lineOptions!.lineBorderWidth!.toString())\n : 0;\n\n if (lineBorderWidth > 0) {\n line.push(\n <path\n key={_vbcLineId}\n id={_vbcLineId}\n opacity={shouldHighlight ? 1 : 0.1}\n d={linePath(lineData)!}\n fill=\"transparent\"\n strokeLinecap=\"square\"\n strokeWidth={3 + lineBorderWidth * 2}\n className={classes.lineBorder}\n />,\n );\n }\n line.push(\n <path\n key={_vbcLineId}\n id={_vbcLineId}\n opacity={shouldHighlight ? 1 : 0.1}\n d={linePath(lineData)!}\n fill=\"transparent\"\n strokeLinecap=\"square\"\n strokeWidth={3}\n stroke={lineLegendColor}\n />,\n );\n\n const dots: React.ReactNode[] = lineData.map(\n (\n item: {\n x: number | string;\n y: number;\n useSecondaryYScale: boolean;\n point: VerticalBarChartDataPoint;\n index: number;\n },\n index: number,\n ) => {\n // Create an object to store line point ref so that the object can be passed by reference to the focus handler\n const circleRef: { refElement: SVGCircleElement | null } = { refElement: null };\n return (\n <circle\n key={index}\n id={`${_vbcPointId}-${index}`}\n cx={isStringAxis ? xScale(item.x) + 0.5 * xScale.bandwidth() : xScale(item.x)}\n cy={item.useSecondaryYScale && yScaleSecondary ? yScaleSecondary(item.y) : yScalePrimary(item.y)}\n onMouseOver={event =>\n _legendHighlighted(lineLegendText!)\n ? _lineHover(item.point, event)\n : _onBarHover(item.point, colorScale(item.y), event)\n }\n onMouseOut={_onBarLeave}\n r={_getCircleVisibilityAndRadius(item.x, lineLegendText!).radius}\n stroke={lineLegendColor}\n fill={tokens.colorNeutralBackground1}\n strokeWidth={3}\n visibility={_getCircleVisibilityAndRadius(item.x, lineLegendText!).visibility}\n onClick={item.point.lineData?.onClick}\n // When no legend is highlighted: Line points are automatically displayed along with the bars\n // at the same x-axis point in the stack callout. So to prevent an increase in focusable elements\n // and avoid conveying duplicate info, make these line points non-focusable.\n data-is-focusable={_legendHighlighted(lineLegendText!)}\n ref={e => (circleRef.refElement = e)}\n onFocus={event => _lineFocus(event, item.point, circleRef)}\n onBlur={_handleChartMouseLeave}\n tabIndex={_legendHighlighted(lineLegendText!) ? 0 : undefined}\n />\n );\n },\n );\n\n return (\n <>\n {line}\n {dots}\n </>\n );\n }\n\n function _getCircleVisibilityAndRadius(\n xAxisPoint: string | number | Date,\n legend: string,\n ): { visibility: CircleVisbility; radius: number } {\n if (!_noLegendHighlighted()) {\n if (xAxisPoint === activeXdataPoint && _legendHighlighted(legend)) {\n return { visibility: CircleVisbility.show, radius: 8 };\n } else if (_legendHighlighted(legend)) {\n // Don't hide the circle to keep it focusable. For more information,\n // see https://fuzzbomb.github.io/accessibility-demos/visually-hidden-focus-test.html\n return { visibility: CircleVisbility.show, radius: 0.3 };\n } else {\n return { visibility: CircleVisbility.hide, radius: 0 };\n }\n } else {\n return {\n visibility: activeXdataPoint === xAxisPoint ? CircleVisbility.show : CircleVisbility.hide,\n radius: 8,\n };\n }\n }\n\n function _checkForLine(): boolean {\n const { data } = props;\n return data!.some((item: VerticalBarChartDataPoint) => item?.lineData?.y !== undefined);\n }\n\n function _adjustProps(): void {\n _points = props.data || [];\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, undefined, props.mode);\n const defaultColors: string[] = [\n tokens.colorPaletteBlueForeground2,\n tokens.colorPaletteCornflowerForeground2,\n tokens.colorPaletteDarkGreenForeground2,\n tokens.colorPaletteNavyForeground2,\n tokens.colorPaletteDarkOrangeForeground2,\n ];\n _colors = props.colors || defaultColors;\n _isHavingLine = _checkForLine();\n _xAxisInnerPadding = getScalePadding(\n props.xAxisInnerPadding,\n props.xAxisPadding,\n props.mode === 'histogram' ? 0 : _xAxisType === XAxisTypes.StringAxis ? 2 / 3 : 1 / 2,\n );\n _xAxisOuterPadding = getScalePadding(props.xAxisOuterPadding, props.xAxisPadding, 0);\n }\n\n function _getMargins(_margins: Margins) {\n margins = _margins;\n }\n\n function _renderContentForBothLineAndBars(point: VerticalBarChartDataPoint): JSX.Element {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);\n const content: JSX.Element[] = YValueHover.map((item: YValueHover, index: number) => {\n return (\n <>\n <ChartPopover\n culture={props.culture ?? 'en-us'}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n legend={item.legend!}\n {...(index === 0 && { XValue: `${hoverXValue || item.data}` })}\n YValue={item.data || item.y}\n color={item.color}\n isCalloutForStack={false}\n />\n </>\n );\n });\n return <>{content}</>;\n }\n\n function _renderContentForOnlyBars(_props: VerticalBarChartDataPoint): JSX.Element {\n return (\n <>\n <ChartPopover\n XValue={_props.xAxisCalloutData || (_props.x as string)}\n xCalloutValue={xCalloutValue}\n yCalloutValue={yCalloutValue}\n culture={props.culture ?? 'en-us'}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n legend={_props.legend!}\n YValue={_props.yAxisCalloutData || _props.y}\n color={!props.useSingleColor && _props.color ? _props.color : _createColors()(_props.y)}\n isCalloutForStack={false}\n />\n </>\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n function _renderCallout(props?: VerticalBarChartDataPoint): JSX.Element | null {\n return props ? (_isHavingLine ? _renderContentForBothLineAndBars(props) : _renderContentForOnlyBars(props)) : null;\n }\n\n function _getCustomizedCallout() {\n return props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps, _renderCallout)\n : null;\n }\n\n function _getGraphData(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale: any,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n ) {\n return (_bars =\n _xAxisType === XAxisTypes.NumericAxis\n ? _createNumericBars(containerHeight, containerWidth, xElement!)\n : _xAxisType === XAxisTypes.DateAxis\n ? _createDateBars(containerHeight, containerWidth, xElement!)\n : _createStringBars(containerHeight, containerWidth, xElement!));\n }\n\n function _createColors(): D3ScaleLinear<string, string> | ColorScale {\n const increment = _colors.length <= 1 ? 1 : 1 / (_colors.length - 1);\n const { useSingleColor = false } = props;\n if (useSingleColor) {\n return (_p?: number) => {\n const { colors } = props;\n return colors && colors.length > 0 ? colors[0] : tokens.colorPaletteBlueBackground2;\n };\n }\n const domainValues = [];\n for (let i = 0; i < _colors.length; i++) {\n domainValues.push(increment * i * _yMax);\n }\n const colorScale = d3ScaleLinear<string>().domain(domainValues).range(_colors);\n return colorScale;\n }\n\n function _refCallback(element: SVGRectElement, legendTitle: string): void {\n _refArray.push({ index: legendTitle, refElement: element });\n }\n\n function _getCalloutContentForLineAndBar(point: VerticalBarChartDataPoint): {\n YValueHover: YValueHover[];\n hoverXValue: string | number | undefined;\n } {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const YValueHover: YValueHover[] = [];\n const { useSingleColor = false } = props;\n const { data, lineLegendText, lineLegendColor = tokens.colorPaletteYellowBackground1 } = props;\n const selectedPoint = data!.filter((xDataPoint: VerticalBarChartDataPoint) => xDataPoint.x === point.x);\n // Check if the line legend is highlighted or no legend is highlighted\n if (\n _isHavingLine &&\n selectedPoint[0].lineData?.y !== undefined &&\n (_legendHighlighted(lineLegendText) || _noLegendHighlighted())\n ) {\n // Add callout data for the line\n YValueHover.push({\n legend: lineLegendText,\n color: lineLegendColor,\n y: selectedPoint[0].lineData?.y,\n data: selectedPoint[0].lineData?.yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].lineData?.yAxisCalloutData,\n });\n }\n // Check if the bar legend is highlighted or no legend is highlighted\n if (selectedLegends.includes(selectedPoint[0].legend!) || _noLegendHighlighted()) {\n // Add callout data for the bar\n YValueHover.push({\n legend: selectedPoint[0].legend,\n y: selectedPoint[0].y,\n color: !useSingleColor\n ? selectedPoint[0].color\n ? selectedPoint[0].color\n : _createColors()(selectedPoint[0].y)\n : _createColors()(1),\n data: selectedPoint[0].yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].yAxisCalloutData,\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const hoverXValue = point.x instanceof Date ? point.x.toLocaleString() : point.x.toString();\n return {\n YValueHover,\n hoverXValue: point.xAxisCalloutData || hoverXValue,\n };\n }\n\n function _onBarHover(\n point: VerticalBarChartDataPoint,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);\n if (_calloutAnchorPoint !== point) {\n _calloutAnchorPoint = point;\n /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(point.legend));\n setDataForHoverCard(point.y);\n setCalloutLegend(point.legend!);\n setColor(point.color || color);\n // To display callout value, if no callout value given, taking given point.x value as a string.\n setXCalloutValue(\n point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()),\n );\n setDataPointCalloutProps(point);\n // Hovering over a bar should highlight corresponding line points only when no legend is selected\n setActiveXDatapoint(_noLegendHighlighted() ? point.x : null);\n setYValueHover(YValueHover);\n setHoverXValue(hoverXValue);\n setCalloutAccessibilityData(point.callOutAccessibilityData);\n }\n }\n\n function _onBarLeave(): void {\n /**/\n }\n\n function _handleChartMouseLeave(): void {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n setActiveXDatapoint(null);\n setYValueHover([]);\n setHoverXValue('');\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n function _onBarFocus(\n event: React.FocusEvent<SVGRectElement, Element>,\n point: VerticalBarChartDataPoint,\n refArrayIndexNumber: number,\n color: string,\n ): void {\n let x = 0;\n let y = 0;\n\n const targetRect = (event.target as SVGRectElement).getBoundingClientRect();\n x = targetRect.left + targetRect.width / 2;\n y = targetRect.top + targetRect.height / 2;\n updatePosition(x, y);\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);\n _refArray.forEach((obj: RefArrayData, index: number) => {\n if (obj.index === point.legend! && refArrayIndexNumber === index) {\n /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(point.legend));\n setDataForHoverCard(point.y);\n setCalloutLegend(point.legend!);\n setColor(point.color || color);\n // To display callout value, if no callout value given, taking given point.x value as a string.\n setXCalloutValue(\n point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()),\n );\n setYCalloutValue(point.yAxisCalloutData!);\n setDataPointCalloutProps(point);\n // Hovering over a bar should highlight corresponding line points only when no legend is selected\n setActiveXDatapoint(point.x);\n setYValueHover(YValueHover);\n setHoverXValue(hoverXValue);\n setCalloutAccessibilityData(point.callOutAccessibilityData);\n }\n });\n }\n\n function _lineHover(point: VerticalBarChartDataPoint, mouseEvent: React.MouseEvent<SVGElement>) {\n mouseEvent.persist();\n _lineHoverFocus(point, mouseEvent);\n }\n\n function _lineFocus(\n event: React.FocusEvent<SVGCircleElement, Element>,\n point: VerticalBarChartDataPoint,\n ref: { refElement: SVGCircleElement | null },\n ) {\n if (ref.refElement) {\n _lineHoverFocus(point, ref.refElement);\n }\n }\n\n function _lineHoverFocus(\n point: VerticalBarChartDataPoint,\n _refSelected: React.MouseEvent<SVGElement> | SVGCircleElement,\n ) {\n const { lineLegendText = '', lineLegendColor = tokens.colorPaletteYellowBackground1 } = props;\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(lineLegendText));\n setCalloutLegend(lineLegendText);\n setDataForHoverCard(point.lineData!.y);\n setColor(lineLegendColor);\n setXCalloutValue(\n point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()),\n );\n setYCalloutValue(point.lineData!.yAxisCalloutData);\n setDataPointCalloutProps(point);\n setActiveXDatapoint(point.x);\n }\n\n function _getScales(\n containerHeight: number,\n containerWidth: number,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): { xBarScale: any; yBarScale: any } {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let xBarScale: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const yBarScale: any = d3ScaleLinear()\n .domain([_yMin, _yMax])\n .range([0, containerHeight - margins.bottom! - margins.top!]);\n\n if (_xAxisType === XAxisTypes.NumericAxis) {\n const xMax = d3Max(_points, (point: VerticalBarChartDataPoint) => point.x as number)!;\n const xMin = d3Min(_points, (point: VerticalBarChartDataPoint) => point.x as number)!;\n xBarScale = d3ScaleLinear()\n .domain(_useRtl ? [xMax, xMin] : [xMin, xMax])\n .range([margins.left! + _domainMargin, containerWidth - margins.right! - _domainMargin]);\n if (!isScalePaddingDefined(props.xAxisInnerPadding, props.xAxisPadding) && props.mode !== 'histogram') {\n xBarScale.nice();\n }\n } else if (_xAxisType === XAxisTypes.DateAxis) {\n const sDate = d3Min(_points, (point: VerticalBarChartDataPoint) => point.x as Date)!;\n const lDate = d3Max(_points, (point: VerticalBarChartDataPoint) => point.x as Date)!;\n xBarScale = d3ScaleUtc()\n .domain([sDate, lDate])\n .range(\n _useRtl\n ? [containerWidth - margins.right! - _domainMargin, margins.left! + _domainMargin]\n : [margins.left! + _domainMargin, containerWidth - margins.right! - _domainMargin],\n );\n } else {\n xBarScale = d3ScaleBand()\n .domain(_xAxisLabels)\n .range(\n _useRtl\n ? [containerWidth - margins.right! - _domainMargin, margins.left! + _domainMargin]\n : [margins.left! + _domainMargin, containerWidth - margins.right! - _domainMargin],\n )\n .paddingInner(_xAxisInnerPadding)\n .paddingOuter(_xAxisOuterPadding);\n }\n\n return { xBarScale, yBarScale };\n }\n\n const classes = useVerticalBarChartStyles(props);\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _calculateMinBarHeight(yMin: number, yMax: number, yReferencePoint: number, yBarScale: any): number {\n const maxHeightFromBaseline =\n yMax < 0\n ? Math.abs(yMin - yReferencePoint)\n : Math.max(Math.abs(yMax - yReferencePoint), Math.abs(yMin - yReferencePoint));\n return Math.ceil(yBarScale(maxHeightFromBaseline) / 100.0);\n }\n\n function _createNumericBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSX.Element[] {\n const { useSingleColor = false } = props;\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);\n const colorScale = _createColors();\n const yReferencePoint = _yMax < 0 ? _yMax : 0;\n const bars = _points.map((point: VerticalBarChartDataPoint, index: number) => {\n const shouldHighlight = _legendHighlighted(point.legend!) || _noLegendHighlighted() ? true : false;\n\n let barHeight: number = yBarScale(point.y) - yBarScale(yReferencePoint);\n const isHeightNegative = barHeight < 0;\n barHeight = Math.abs(barHeight);\n // Calculate threshold for minimum visible bar height\n const minBarHeight = _calculateMinBarHeight(_yMin, _yMax, yReferencePoint, yBarScale);\n let adjustedBarHeight = barHeight;\n\n if (barHeight === 0) {\n return <React.Fragment key={point.x as string}> </React.Fragment>;\n }\n // Adjust bar height if it's smaller than the threshold\n else if (barHeight <= minBarHeight) {\n adjustedBarHeight = minBarHeight;\n }\n const xPoint = xBarScale(point.x as number) - _barWidth / 2;\n const yPoint =\n containerHeight -\n margins.bottom! -\n (isHeightNegative ? -1 * adjustedBarHeight : adjustedBarHeight) -\n yBarScale(yReferencePoint);\n const baselineHeight = containerHeight - margins.bottom! - yBarScale(yReferencePoint);\n return (\n <g key={`${point.x}_${index}` as string}>\n <rect\n id={`${_vbcBarId}-${index}`}\n x={xPoint}\n y={!isHeightNegative ? yPoint : baselineHeight}\n width={_barWidth}\n height={adjustedBarHeight}\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={event => _onBarHover(point, colorScale(point.y), event)}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n onMouseLeave={_onBarLeave}\n onFocus={event => _onBarFocus(event, point, index, colorScale(point.y))}\n onBlur={_onBarLeave}\n fill={point.color && !useSingleColor ? point.color : colorScale(point.y)}\n tabIndex={!props.hideTooltip && shouldHighlight ? 0 : undefined}\n opacity={shouldHighlight ? 1 : 0.1}\n rx={props.roundCorners ? 3 : 0}\n />\n {_renderBarLabel(xPoint, yPoint, point.y, point.legend!, isHeightNegative)}\n </g>\n );\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return bars;\n }\n\n function _createStringBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSX.Element[] {\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);\n const colorScale = _createColors();\n const yReferencePoint = _yMax < 0 ? _yMax : 0;\n const bars = _points.map((point: VerticalBarChartDataPoint, index: number) => {\n const shouldHighlight = _legendHighlighted(point.legend!) || _noLegendHighlighted() ? true : false;\n let barHeight: number = yBarScale(point.y) - yBarScale(yReferencePoint);\n const isHeightNegative = barHeight < 0;\n barHeight = Math.abs(barHeight);\n // Calculate threshold for minimum visible bar height\n const minBarHeight = _calculateMinBarHeight(_yMin, _yMax, yReferencePoint, yBarScale);\n let adjustedBarHeight = barHeight;\n\n if (barHeight === 0) {\n return <React.Fragment key={point.x as string}> </React.Fragment>;\n }\n // Adjust bar height if it's smaller than the threshold\n else if (barHeight <= minBarHeight) {\n adjustedBarHeight = minBarHeight;\n }\n const xPoint = xBarScale(point.x);\n const yPoint =\n containerHeight -\n margins.bottom! -\n (isHeightNegative ? -1 * adjustedBarHeight : adjustedBarHeight) -\n yBarScale(yReferencePoint);\n const baselineHeight = containerHeight - margins.bottom! - yBarScale(yReferencePoint);\n // Setting the bar width here is safe because there are no dependencies earlier in the code\n // that rely on the width of bars in vertical bar charts with string x-axis.\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, xBarScale.bandwidth(), props.mode);\n return (\n <g\n key={point.x instanceof Date ? `${point.x.getTime()}_${index}` : `${point.x}_${index}`}\n transform={`translate(${0.5 * (xBarScale.bandwidth() - _barWidth)}, 0)`}\n >\n <rect\n id={`${_vbcBarId}-${index}`}\n x={xPoint}\n y={!isHeightNegative ? yPoint : baselineHeight}\n width={_barWidth}\n height={adjustedBarHeight}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={event => _onBarHover(point, colorScale(point.y), event)}\n onMouseLeave={_onBarLeave}\n onBlur={_onBarLeave}\n onFocus={event => _onBarFocus(event, point, index, colorScale(point.y))}\n fill={point.color ? point.color : colorScale(point.y)}\n tabIndex={!props.hideTooltip && shouldHighlight ? 0 : undefined}\n rx={props.roundCorners ? 3 : 0}\n opacity={shouldHighlight ? 1 : 0.1}\n />\n {_renderBarLabel(xPoint, yPoint, point.y, point.legend!, isHeightNegative)}\n </g>\n );\n });\n\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: xAxisElement,\n showTooltip: props.showXAxisLablesTooltip,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return bars;\n }\n\n function _createDateBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSX.Element[] {\n const { useSingleColor = false } = props;\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);\n const colorScale = _createColors();\n const yReferencePoint = _yMax < 0 ? _yMax : 0;\n const bars = _points.map((point: VerticalBarChartDataPoint, index: number) => {\n const shouldHighlight = _legendHighlighted(point.legend!) || _noLegendHighlighted() ? true : false;\n let barHeight: number = yBarScale(point.y) - yBarScale(yReferencePoint);\n const isHeightNegative = barHeight < 0;\n barHeight = Math.abs(barHeight);\n // Calculate threshold for minimum visible bar height\n const minBarHeight = _calculateMinBarHeight(_yMin, _yMax, yReferencePoint, yBarScale);\n let adjustedBarHeight = barHeight;\n\n if (barHeight === 0) {\n return <React.Fragment key={point.x as string}> </React.Fragment>;\n }\n // Adjust bar height if it's smaller than the threshold\n else if (barHeight <= minBarHeight) {\n adjustedBarHeight = minBarHeight;\n }\n const xPoint = xBarScale(point.x as number) - _barWidth / 2;\n const yPoint =\n containerHeight -\n margins.bottom! -\n (isHeightNegative ? -1 * adjustedBarHeight : adjustedBarHeight) -\n yBarScale(yReferencePoint);\n const baselineHeight = containerHeight - margins.bottom! - yBarScale(yReferencePoint);\n return (\n <g key={point.x instanceof Date ? `${point.x.getTime()}_${index}` : `${point.x}_${index}`}>\n <rect\n id={`${_vbcBarId}-${index}`}\n x={xPoint}\n className={classes.opacityChangeOnHover}\n y={!isHeightNegative ? yPoint : baselineHeight}\n width={_barWidth}\n height={adjustedBarHeight}\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={event => _onBarHover(point, colorScale(point.y), event)}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n onMouseLeave={_onBarLeave}\n onFocus={event => _onBarFocus(event, point, index, colorScale(point.y))}\n onBlur={_onBarLeave}\n fill={point.color && !useSingleColor ? point.color : colorScale(point.y)}\n tabIndex={!props.hideTooltip && shouldHighlight ? 0 : undefined}\n rx={props.roundCorners ? 3 : 0}\n opacity={shouldHighlight ? 1 : 0.1}\n />\n {_renderBarLabel(xPoint, yPoint, point.y, point.legend!, isHeightNegative)}\n </g>\n );\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return bars;\n }\n\n function _onLegendHover(legendTitle: string): void {\n setActiveLegend(legendTitle);\n }\n\n function _onLegendLeave(): void {\n setActiveLegend(undefined);\n }\n\n function _getLegendData(data: VerticalBarChartDataPoint[]): JSX.Element {\n const { useSingleColor } = props;\n const { lineLegendText, lineLegendColor = tokens.colorPaletteYellowForeground1 } = props;\n const actions: Legend[] = [];\n const mapLegendToColor: Record<string, string> = {};\n data.forEach((point: VerticalBarChartDataPoint, _index: number) => {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const color: string = !useSingleColor ? point.color! : _createColors()(1);\n mapLegendToColor[point.legend!] = color;\n });\n Object.entries(mapLegendToColor).forEach(([legendTitle, color]) => {\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: legendTitle,\n color,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(legendTitle);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n };\n actions.push(legend);\n });\n if (_isHavingLine && lineLegendText && lineLegendColor) {\n const lineLegend: Legend = {\n title: lineLegendText,\n color: lineLegendColor,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(lineLegendText);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n isLineLegendInBarChart: true,\n };\n actions.unshift(lineLegend);\n }\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n selectedLegends={selectedLegends}\n onChange={_onLegendSelectionChange}\n />\n );\n return legends;\n }\n\n function _onLegendSelectionChange(\n legendsSelected: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(legendsSelected);\n } else {\n setSelectedLegends(legendsSelected.slice(-1));\n }\n\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(legendsSelected, event, currentLegend);\n }\n }\n\n function _getAxisData(yAxisData: IAxisData) {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n _yMax = Math.max(domainValue[domainValue.length - 1], props.yMaxValue || 0);\n _yMin = Math.min(domainValue[0], props.yMinValue || 0);\n }\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n function _legendHighlighted(legendTitle: string | undefined): boolean {\n return _getHighlightedLegend().includes(legendTitle!);\n }\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n function _noLegendHighlighted(): boolean {\n return _getHighlightedLegend().length === 0;\n }\n\n function _getHighlightedLegend() {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n }\n\n function _getAriaLabel(point: VerticalBarChartDataPoint): string {\n const xValue = point.xAxisCalloutData\n ? point.xAxisCalloutData\n : point.x instanceof Date\n ? point.x.toLocaleString()\n : point.x;\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.y;\n const lineLegend = props.lineLegendText || 'Line';\n const lineYValue = point.lineData?.yAxisCalloutData || point.lineData?.y;\n return (\n point.callOutAccessibilityData?.ariaLabel ||\n `${xValue}. ` +\n (legend ? `${legend}, ` : '') +\n `${yValue}.` +\n (typeof lineYValue !== 'undefined' ? ` ${lineLegend}, ${lineYValue}.` : '')\n );\n }\n\n function _renderBarLabel(xPoint: number, yPoint: number, barValue: number, legend: string, isNegativeBar: boolean) {\n if (props.hideLabels || _barWidth < 16 || !(_legendHighlighted(legend) || _noLegendHighlighted())) {\n return null;\n }\n\n return (\n <text\n x={xPoint + _barWidth / 2}\n y={isNegativeBar ? yPoint + 12 : yPoint - 6}\n textAnchor=\"middle\"\n className={classes.barLabel}\n aria-hidden={true}\n >\n {typeof props.yAxisTickFormat === 'function'\n ? props.yAxisTickFormat(barValue)\n : formatScientificLimitWidth(barValue)}\n </text>\n );\n }\n\n function _getDomainMargins(containerWidth: number): Margins {\n _domainMargin = MIN_DOMAIN_MARGIN;\n\n const mapX: Record<string, number | string | Date> = {};\n props.data?.forEach(point => {\n if (point.x instanceof Date) {\n mapX[point.x.getTime()] = point.x;\n } else {\n mapX[point.x] = point.x;\n }\n });\n const uniqueX = Object.values(mapX);\n\n /** Total width available to render the bars */\n const totalWidth = containerWidth - (margins.left! + MIN_DOMAIN_MARGIN) - (margins.right! + MIN_DOMAIN_MARGIN);\n /** Rate at which the space between the bars changes wrt the bar width */\n const barGapRate = _xAxisInnerPadding / (1 - _xAxisInnerPadding);\n const numBars = uniqueX.length + (uniqueX.length - 1) * barGapRate;\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(props.xAxisOuterPadding, props.xAxisPadding)) {\n // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available\n // to adjust the space before the first bar and after the last bar.\n _domainMargin = 0;\n } else if (props.barWidth !== 'auto' && props.mode !== 'histogram') {\n // Update the bar width so that when CartesianChart rerenders,\n // the following calculations don't use the previous bar width.\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n /** Total width required to render the bars. Directly proportional to bar width */\n const reqWidth = numBars * _barWidth;\n\n if (totalWidth >= reqWidth) {\n // Center align the chart by setting equal left and right margins for domain\n _domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;\n }\n } else if (['plotly', 'histogram'].includes(props.mode!) && uniqueX.length > 1) {\n // Calculate the remaining width after rendering bars at their maximum allowable width\n const bandwidth = totalWidth / numBars;\n const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, bandwidth, props.mode);\n let reqWidth = numBars * barWidth;\n const margin1 = (totalWidth - reqWidth) / 2;\n\n let margin2 = Number.POSITIVE_INFINITY;\n if (!props.hideTickOverlap) {\n // Calculate the remaining width after accounting for the space required to render x-axis labels\n const step = calculateLongestLabelWidth(uniqueX as string[]) + 20;\n reqWidth = (uniqueX.length - _xAxisInnerPadding) * step;\n margin2 = (totalWidth - reqWidth) / 2;\n }\n\n _domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));\n }\n } else {\n if (props.mode === 'histogram') {\n // Try center-aligning the bars to eliminate any gaps caused by a restricted barWidth.\n // This only works if the bin centers are consistent across all legend groups; otherwise,\n // the calculated domainMargin may be too small.\n const barWidth = props.maxBarWidth!;\n const reqWidth = numBars * barWidth;\n _domainMargin += Math.max(0, (totalWidth - reqWidth) / 2);\n }\n\n // The histogram may appear distorted when bin centers/sizes vary across different legend groups.\n // Currently, we calculate the appropriate bar width using the closest unique x-values to make\n // the bars of the same legend group adjacent. But these x-values can come from different legend groups\n // and result in misleading visuals. Even if we compute bar widths separately within each group,\n // we still lack support for rendering bars with different widths and must use the minimum width,\n // which can cause the same issue.\n // Solution: Instead of estimating the appropriate bar width, render each bar to span the full range\n // of its corresponding bin explicitly.\n _barWidth = getBarWidth(\n props.barWidth,\n props.maxBarWidth,\n calculateAppropriateBarWidth(\n uniqueX as number[] | Date[],\n totalWidth - 2 * (_domainMargin - MIN_DOMAIN_MARGIN),\n _xAxisInnerPadding,\n ),\n props.mode,\n );\n _domainMargin += _barWidth / 2;\n }\n\n return {\n ...margins,\n left: margins.left! + _domainMargin,\n right: margins.right! + _domainMargin,\n };\n }\n\n function _isChartEmpty(): boolean {\n return _points.length === 0 || (_points.every(point => point.y === 0) && !_isHavingLine);\n }\n\n function updatePosition(newX: number, newY: number) {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n _adjustProps();\n _xAxisLabels = _points.map((point: VerticalBarChartDataPoint) => point.x as string);\n _yMax = Math.max(d3Max(_points, (point: VerticalBarChartDataPoint) => point.y)!, props.yMaxValue || 0);\n _yMin = Math.min(d3Min(_points, (point: VerticalBarChartDataPoint) => point.y)!, props.yMinValue || 0);\n const legendBars: JSX.Element = _getLegendData(_points);\n const calloutProps = {\n ...(_isHavingLine && {\n YValueHover: hoveredYValues,\n hoverXValue: hoverXValue,\n }),\n color: color,\n legend: calloutLegend,\n XValue: xCalloutValue,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData),\n clickPosition: clickPosition,\n isPopoverOpen: isPopoverOpen,\n isCalloutForStack: _isHavingLine && (_noLegendHighlighted() || _getHighlightedLegend().length > 1),\n culture: props.culture ?? 'en-us',\n isCartesian: true,\n customCallout: {\n customizedCallout: _getCustomizedCallout() != null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n };\n\n const tickParams = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n return !_isChartEmpty() ? (\n <CartesianChart\n {...props}\n points={_points}\n chartType={ChartTypes.VerticalBarChart}\n xAxisType={_xAxisType}\n createYAxis={createNumericYAxis}\n calloutProps={calloutProps}\n tickParams={tickParams}\n {...(_isHavingLine && _noLegendHighlighted() && { isCalloutForStack: true })}\n legendBars={legendBars}\n datasetForXAxisDomain={_xAxisLabels}\n barwidth={_barWidth}\n createStringYAxis={createStringYAxis}\n getmargins={_getMargins}\n getMinMaxOfYAxis={findVerticalNumericMinMaxOfY}\n getGraphData={_getGraphData}\n getDomainNRangeValues={_getDomainNRangeValues}\n getAxisData={_getAxisData}\n onChartMouseLeave={_handleChartMouseLeave}\n getDomainMargins={_getDomainMargins}\n {...(_xAxisType === XAxisTypes.StringAxis && {\n xAxisInnerPadding: _xAxisInnerPadding,\n xAxisOuterPadding: _xAxisOuterPadding,\n })}\n componentRef={cartesianChartRef}\n showRoundOffXTickValues={\n !isScalePaddingDefined(props.xAxisInnerPadding, props.xAxisPadding) && props.mode !== 'histogram'\n }\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: ChildProps) => {\n return (\n <>\n <g>{_bars}</g>\n {_isHavingLine && (\n <g>\n {_createLine(\n props.xScale!,\n props.yScalePrimary!,\n props.containerHeight,\n props.containerWidth,\n props.yScaleSecondary,\n )}\n </g>\n )}\n </>\n );\n }}\n />\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n});\nVerticalBarChart.displayName = 'VerticalBarChart';\n"],"names":["React","useVerticalBarChartStyles","max","d3Max","min","d3Min","line","d3Line","select","d3Select","scaleLinear","d3ScaleLinear","scaleBand","d3ScaleBand","scaleUtc","d3ScaleUtc","useId","tokens","CartesianChart","Legends","ChartPopover","ChartTypes","getAccessibleDataObject","XAxisTypes","getTypeOfAxis","tooltipOfAxislabels","formatScientificLimitWidth","getBarWidth","getScalePadding","isScalePaddingDefined","calculateAppropriateBarWidth","useRtl","areArraysEqual","calculateLongestLabelWidth","findVerticalNumericMinMaxOfY","createNumericYAxis","domainRangeOfVerticalNumeric","domainRangeOfDateForAreaLineVerticalBarChart","domainRangeOfXStringAxis","createStringYAxis","CircleVisbility","MIN_DOMAIN_MARGIN","VerticalBarChart","forwardRef","props","forwardedRef","_points","_barWidth","_colors","_refArray","margins","_useRtl","_bars","_xAxisLabels","_yMax","_yMin","_isHavingLine","_checkForLine","_tooltipId","_xAxisType","data","length","x","StringAxis","_calloutAnchorPoint","_domainMargin","_emptyChartId","_vbcLineId","_vbcPointId","_vbcBarId","_xAxisInnerPadding","_xAxisOuterPadding","cartesianChartRef","useRef","color","setColor","useState","dataForHoverCard","setDataForHoverCard","activeLegend","setActiveLegend","undefined","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","activeXdataPoint","setActiveXDatapoint","hoveredYValues","setYValueHover","hoverXValue","setHoverXValue","calloutLegend","setCalloutLegend","callOutAccessibilityData","setCalloutAccessibilityData","dataPointCalloutProps","setDataPointCalloutProps","clickPosition","setClickPosition","y","isPopoverOpen","setPopoverOpen","selectedLegends","setSelectedLegends","legendProps","prevPropsRef","useImperativeHandle","componentRef","chartContainer","current","useEffect","prevProps","height","width","_adjustProps","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","barWidth","tickValues","shiftX","domainNRangeValue","NumericAxis","DateAxis","_createLine","xScale","yScalePrimary","containerHeight","containerWidth","yScaleSecondary","isStringAxis","colorScale","_createColors","lineLegendColor","colorPaletteYellowBackground1","lineLegendText","lineData","forEach","item","index","push","useSecondaryYScale","point","linePath","d","bandwidth","shouldHighlight","_legendHighlighted","_noLegendHighlighted","lineBorderWidth","lineOptions","Number","parseFloat","toString","path","key","id","opacity","fill","strokeLinecap","strokeWidth","className","classes","lineBorder","stroke","dots","map","circleRef","refElement","circle","cx","cy","onMouseOver","event","_lineHover","_onBarHover","onMouseOut","_onBarLeave","r","_getCircleVisibilityAndRadius","radius","colorNeutralBackground1","visibility","onClick","data-is-focusable","ref","e","onFocus","_lineFocus","onBlur","_handleChartMouseLeave","tabIndex","xAxisPoint","legend","some","maxBarWidth","mode","defaultColors","colorPaletteBlueForeground2","colorPaletteCornflowerForeground2","colorPaletteDarkGreenForeground2","colorPaletteNavyForeground2","colorPaletteDarkOrangeForeground2","colors","xAxisInnerPadding","xAxisPadding","xAxisOuterPadding","_getMargins","_margins","_renderContentForBothLineAndBars","YValueHover","_getCalloutContentForLineAndBar","content","culture","XValue","YValue","isCalloutForStack","_renderContentForOnlyBars","_props","xAxisCalloutData","yAxisCalloutData","useSingleColor","_renderCallout","_getCustomizedCallout","onRenderCalloutPerDataPoint","_getGraphData","yScale","xElement","_createNumericBars","_createDateBars","_createStringBars","increment","_p","colorPaletteBlueBackground2","domainValues","i","domain","range","_refCallback","element","legendTitle","selectedPoint","filter","xDataPoint","includes","Date","toLocaleString","mouseEvent","persist","updatePosition","clientX","clientY","toLocaleDateString","_onBarFocus","refArrayIndexNumber","targetRect","target","getBoundingClientRect","left","top","obj","_lineHoverFocus","_refSelected","_getScales","xBarScale","yBarScale","bottom","xMax","xMin","right","nice","sDate","lDate","paddingInner","paddingOuter","_calculateMinBarHeight","yMin","yMax","yReferencePoint","maxHeightFromBaseline","Math","abs","ceil","bars","barHeight","isHeightNegative","minBarHeight","adjustedBarHeight","Fragment","xPoint","yPoint","baselineHeight","g","rect","aria-label","_getAriaLabel","role","onMouseLeave","hideTooltip","rx","roundCorners","_renderBarLabel","showXAxisLablesTooltip","document","getElementById","remove","wrapXAxisLables","xAxisElement","call","tooltipProps","tooltipCls","tooltip","axis","getTime","transform","showTooltip","opacityChangeOnHover","_onLegendHover","_onLegendLeave","_getLegendData","colorPaletteYellowForeground1","actions","mapLegendToColor","_index","Object","entries","title","hoverAction","onMouseOutAction","lineLegend","isLineLegendInBarChart","unshift","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onChange","_onLegendSelectionChange","legendsSelected","currentLegend","canSelectMultipleLegends","slice","_getAxisData","yAxisData","yAxisDomainValues","domainValue","yMaxValue","yMinValue","_getHighlightedLegend","xValue","yValue","lineYValue","ariaLabel","barValue","isNegativeBar","hideLabels","text","textAnchor","barLabel","aria-hidden","yAxisTickFormat","_getDomainMargins","mapX","uniqueX","values","totalWidth","barGapRate","numBars","reqWidth","margin1","margin2","POSITIVE_INFINITY","hideTickOverlap","step","_isChartEmpty","every","newX","newY","threshold","distance","sqrt","pow","legendBars","calloutProps","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","tickFormat","createYAxis","datasetForXAxisDomain","barwidth","getmargins","getMinMaxOfYAxis","getGraphData","getDomainNRangeVal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