@fluentui/react-charts 9.3.4 → 9.3.6

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 (309) hide show
  1. package/CHANGELOG.md +41 -2
  2. package/dist/index.d.ts +225 -46
  3. package/lib/AnnotationOnlyChart.js +1 -0
  4. package/lib/AnnotationOnlyChart.js.map +1 -0
  5. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +208 -0
  6. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
  7. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +1 -0
  8. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
  9. package/lib/components/AnnotationOnlyChart/index.js +2 -0
  10. package/lib/components/AnnotationOnlyChart/index.js.map +1 -0
  11. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +31 -0
  12. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -0
  13. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +23 -0
  14. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -0
  15. package/lib/components/AreaChart/useAreaChartStyles.styles.js +11 -6
  16. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  17. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -1
  18. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  19. package/lib/components/ChartTable/ChartTable.js +3 -1
  20. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  21. package/lib/components/ChartTable/useChartTableStyles.styles.js +59 -39
  22. package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  23. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +5 -5
  24. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  25. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +617 -0
  26. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
  27. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +1 -0
  28. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
  29. package/lib/components/CommonComponents/Annotations/index.js +2 -0
  30. package/lib/components/CommonComponents/Annotations/index.js.map +1 -0
  31. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +173 -0
  32. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -0
  33. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +126 -0
  34. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -0
  35. package/lib/components/CommonComponents/CartesianChart.js +182 -153
  36. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  37. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  38. package/lib/components/CommonComponents/index.js +2 -0
  39. package/lib/components/CommonComponents/index.js.map +1 -1
  40. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +29 -13
  41. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  42. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +14 -1
  43. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  44. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +2 -6
  45. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  46. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +3 -2
  47. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  48. package/lib/components/DeclarativeChart/DeclarativeChart.js +42 -25
  49. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  50. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  51. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +635 -38
  52. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  53. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +23 -8
  54. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  55. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +2 -2
  56. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  57. package/lib/components/DonutChart/DonutChart.js +12 -7
  58. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  59. package/lib/components/DonutChart/useDonutChartStyles.styles.js +2 -2
  60. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  61. package/lib/components/FunnelChart/FunnelChart.js +5 -5
  62. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  63. package/lib/components/GanttChart/GanttChart.js +3 -3
  64. package/lib/components/GanttChart/GanttChart.js.map +1 -1
  65. package/lib/components/GanttChart/GanttChart.types.js.map +1 -1
  66. package/lib/components/GanttChart/useGanttChartStyles.styles.js +3 -1
  67. package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +1 -1
  68. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +3 -1
  69. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
  70. package/lib/components/GaugeChart/GaugeChart.js +3 -1
  71. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  72. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +1 -1
  73. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  74. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +11 -6
  75. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  76. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -1
  77. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  78. package/lib/components/HeatMapChart/HeatMapChart.js +6 -6
  79. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  80. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  81. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +3 -1
  82. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  83. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +3 -1
  84. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
  85. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +3 -1
  86. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  87. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +25 -12
  88. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  89. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +4 -4
  90. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  91. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -2
  92. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  93. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  94. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +3 -1
  95. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  96. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +3 -1
  97. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  98. package/lib/components/Legends/Legends.js +3 -1
  99. package/lib/components/Legends/Legends.js.map +1 -1
  100. package/lib/components/Legends/Legends.types.js.map +1 -1
  101. package/lib/components/Legends/useLegendsStyles.styles.js +97 -37
  102. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  103. package/lib/components/Legends/useLegendsStyles.styles.raw.js +10 -11
  104. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  105. package/lib/components/LineChart/LineChart.js +6 -5
  106. package/lib/components/LineChart/LineChart.js.map +1 -1
  107. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  108. package/lib/components/LineChart/useLineChartStyles.styles.js +15 -10
  109. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  110. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +3 -1
  111. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  112. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +1 -1
  113. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  114. package/lib/components/SankeyChart/SankeyChart.js +1 -1
  115. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  116. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +13 -10
  117. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  118. package/lib/components/ScatterChart/ScatterChart.js +1 -1
  119. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  120. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  121. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +13 -8
  122. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  123. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -1
  124. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  125. package/lib/components/VerticalBarChart/VerticalBarChart.js +4 -2
  126. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  127. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +13 -8
  128. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  129. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -1
  130. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  131. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +13 -5
  132. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  133. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  134. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +11 -6
  135. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  136. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -1
  137. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  138. package/lib/index.js +1 -0
  139. package/lib/index.js.map +1 -1
  140. package/lib/types/ChartAnnotation.js +1 -0
  141. package/lib/types/ChartAnnotation.js.map +1 -0
  142. package/lib/types/index.js +1 -0
  143. package/lib/types/index.js.map +1 -1
  144. package/lib/utilities/Common.styles.js +1 -2
  145. package/lib/utilities/Common.styles.js.map +1 -1
  146. package/lib/utilities/Common.styles.raw.js +1 -2
  147. package/lib/utilities/Common.styles.raw.js.map +1 -1
  148. package/lib/utilities/FocusableTooltipText.js +1 -1
  149. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  150. package/lib/utilities/SVGTooltipText.js +8 -8
  151. package/lib/utilities/SVGTooltipText.js.map +1 -1
  152. package/lib/utilities/image-export-utils.js +108 -0
  153. package/lib/utilities/image-export-utils.js.map +1 -1
  154. package/lib/utilities/utilities.js +16 -13
  155. package/lib/utilities/utilities.js.map +1 -1
  156. package/lib-commonjs/AnnotationOnlyChart.js +6 -0
  157. package/lib-commonjs/AnnotationOnlyChart.js.map +1 -0
  158. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +219 -0
  159. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
  160. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +6 -0
  161. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
  162. package/lib-commonjs/components/AnnotationOnlyChart/index.js +7 -0
  163. package/lib-commonjs/components/AnnotationOnlyChart/index.js.map +1 -0
  164. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +56 -0
  165. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -0
  166. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +33 -0
  167. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -0
  168. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +14 -15
  169. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  170. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -1
  171. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  172. package/lib-commonjs/components/ChartTable/ChartTable.js +3 -1
  173. package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
  174. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +74 -102
  175. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  176. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +4 -4
  177. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  178. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +628 -0
  179. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
  180. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +4 -0
  181. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
  182. package/lib-commonjs/components/CommonComponents/Annotations/index.js +7 -0
  183. package/lib-commonjs/components/CommonComponents/Annotations/index.js.map +1 -0
  184. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +265 -0
  185. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -0
  186. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +161 -0
  187. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -0
  188. package/lib-commonjs/components/CommonComponents/CartesianChart.js +182 -152
  189. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  190. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  191. package/lib-commonjs/components/CommonComponents/index.js +2 -0
  192. package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
  193. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +32 -21
  194. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  195. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +14 -1
  196. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  197. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +0 -14
  198. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  199. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +2 -1
  200. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  201. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +41 -24
  202. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  203. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  204. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +638 -38
  205. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  206. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +25 -16
  207. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  208. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +1 -1
  209. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  210. package/lib-commonjs/components/DonutChart/DonutChart.js +12 -7
  211. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  212. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +2 -2
  213. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  214. package/lib-commonjs/components/FunnelChart/FunnelChart.js +5 -5
  215. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
  216. package/lib-commonjs/components/GanttChart/GanttChart.js +3 -3
  217. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
  218. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -1
  219. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +3 -1
  220. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +1 -1
  221. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +3 -1
  222. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
  223. package/lib-commonjs/components/GaugeChart/GaugeChart.js +3 -1
  224. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  225. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +1 -1
  226. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  227. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +14 -15
  228. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  229. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -1
  230. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  231. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +6 -6
  232. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  233. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  234. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +3 -1
  235. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  236. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +3 -1
  237. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
  238. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +3 -1
  239. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  240. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +47 -34
  241. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  242. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +3 -3
  243. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  244. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -2
  245. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  246. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  247. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +3 -1
  248. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  249. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +3 -1
  250. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  251. package/lib-commonjs/components/Legends/Legends.js +3 -1
  252. package/lib-commonjs/components/Legends/Legends.js.map +1 -1
  253. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  254. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +144 -86
  255. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
  256. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +9 -10
  257. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  258. package/lib-commonjs/components/LineChart/LineChart.js +6 -5
  259. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  260. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  261. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +18 -19
  262. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  263. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +3 -1
  264. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  265. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +1 -1
  266. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  267. package/lib-commonjs/components/SankeyChart/SankeyChart.js +1 -1
  268. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  269. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +16 -19
  270. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  271. package/lib-commonjs/components/ScatterChart/ScatterChart.js +1 -1
  272. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  273. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  274. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +16 -17
  275. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  276. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -1
  277. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  278. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +4 -2
  279. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  280. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +16 -17
  281. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  282. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -1
  283. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  284. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +13 -5
  285. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  286. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  287. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +14 -15
  288. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  289. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -1
  290. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  291. package/lib-commonjs/index.js +1 -0
  292. package/lib-commonjs/index.js.map +1 -1
  293. package/lib-commonjs/types/ChartAnnotation.js +6 -0
  294. package/lib-commonjs/types/ChartAnnotation.js.map +1 -0
  295. package/lib-commonjs/types/index.js +1 -0
  296. package/lib-commonjs/types/index.js.map +1 -1
  297. package/lib-commonjs/utilities/Common.styles.js +1 -2
  298. package/lib-commonjs/utilities/Common.styles.js.map +1 -1
  299. package/lib-commonjs/utilities/Common.styles.raw.js +1 -2
  300. package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -1
  301. package/lib-commonjs/utilities/FocusableTooltipText.js +1 -1
  302. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  303. package/lib-commonjs/utilities/SVGTooltipText.js +8 -8
  304. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  305. package/lib-commonjs/utilities/image-export-utils.js +108 -0
  306. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  307. package/lib-commonjs/utilities/utilities.js +16 -13
  308. package/lib-commonjs/utilities/utilities.js.map +1 -1
  309. package/package.json +11 -11
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/VerticalBarChart/VerticalBarChart.tsx"],"sourcesContent":["'use client';\n\nimport * 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 type { JSXElement } 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 ImageExportOptions,\n LegendContainer,\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 domainRangeOfDateForAreaLineScatterVerticalBarCharts,\n domainRangeOfXStringAxis,\n createStringYAxis,\n calcTotalWidth,\n calcBandwidth,\n calcRequiredWidth,\n sortAxisCategories,\n} from '../../utilities/index';\nimport { toImage } from '../../utilities/image-export-utils';\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 const props: VerticalBarChartProps = {\n xAxisCategoryOrder: 'default',\n maxBarWidth: 24,\n ..._props,\n };\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: JSXElement[];\n let _xAxisLabels: string[];\n let _yMax: number;\n let _yMin: number;\n let _isHavingLine: boolean = _checkForLine();\n const _tooltipId: string = useId('VCTooltipID_');\n let _xAxisType: XAxisTypes;\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 const _legendsRef = React.useRef<LegendContainer>(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 toImage: (opts?: ImageExportOptions): Promise<string> => {\n return toImage(cartesianChartRef.current?.chartContainer, _legendsRef.current?.toSVG, _useRtl, opts);\n },\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 = domainRangeOfDateForAreaLineScatterVerticalBarCharts(\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: JSXElement[] = [];\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 _xAxisType =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\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 =\n props.mode === 'histogram'\n ? 0\n : getScalePadding(\n props.xAxisInnerPadding,\n props.xAxisPadding,\n _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): JSXElement {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);\n const content: JSXElement[] = YValueHover.map((item: YValueHover, index: number) => {\n return (\n <>\n <ChartPopover\n culture={props.culture}\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): JSXElement {\n return (\n <>\n <ChartPopover\n XValue={_props.xAxisCalloutData || (_props.x as string)}\n xCalloutValue={xCalloutValue}\n yCalloutValue={yCalloutValue}\n culture={props.culture}\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): JSXElement | 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): JSXElement[] {\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): JSXElement[] {\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): JSXElement[] {\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[]): JSXElement {\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 legendRef={_legendsRef}\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 style={{ direction: 'ltr', unicodeBidi: 'isolate' }}\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 = calcTotalWidth(containerWidth, margins, MIN_DOMAIN_MARGIN);\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 = calcRequiredWidth(_barWidth, uniqueX.length, _xAxisInnerPadding);\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 = calcBandwidth(totalWidth, uniqueX.length, _xAxisInnerPadding);\n const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, bandwidth, props.mode);\n let reqWidth = calcRequiredWidth(barWidth, uniqueX.length, _xAxisInnerPadding);\n const margin1 = (totalWidth - reqWidth) / 2;\n\n let margin2 = Number.POSITIVE_INFINITY;\n // This logic may introduce gaps between histogram bars when the barWidth is restricted.\n // So disable it for histogram mode.\n if (props.mode !== 'histogram') {\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 = calcRequiredWidth(barWidth, uniqueX.length, _xAxisInnerPadding);\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 calcTotalWidth(containerWidth, margins, _domainMargin),\n _xAxisInnerPadding,\n ),\n props.mode,\n );\n _domainMargin += _barWidth / 2;\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 _getOrderedXAxisLabels() {\n if (_xAxisType !== XAxisTypes.StringAxis) {\n return [];\n }\n\n return sortAxisCategories(_mapCategoryToValues(), props.xAxisCategoryOrder);\n }\n\n function _mapCategoryToValues() {\n const categoryToValues: Record<string, number[]> = {};\n _points.forEach(point => {\n const xValue = point.x as string;\n if (!categoryToValues[xValue]) {\n categoryToValues[xValue] = [];\n }\n categoryToValues[xValue].push(point.y);\n if (point.lineData) {\n categoryToValues[xValue].push(point.lineData.y);\n }\n });\n return categoryToValues;\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 = _getOrderedXAxisLabels();\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: JSXElement = _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,\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","domainRangeOfDateForAreaLineScatterVerticalBarCharts","domainRangeOfXStringAxis","createStringYAxis","calcTotalWidth","calcBandwidth","calcRequiredWidth","sortAxisCategories","toImage","CircleVisbility","MIN_DOMAIN_MARGIN","VerticalBarChart","forwardRef","_props","forwardedRef","props","xAxisCategoryOrder","maxBarWidth","_points","_barWidth","_colors","_refArray","margins","_useRtl","_bars","_xAxisLabels","_yMax","_yMin","_isHavingLine","_checkForLine","_tooltipId","_xAxisType","_calloutAnchorPoint","_domainMargin","_emptyChartId","_vbcLineId","_vbcPointId","_vbcBarId","_xAxisInnerPadding","_xAxisOuterPadding","cartesianChartRef","useRef","_legendsRef","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","x","y","isPopoverOpen","setPopoverOpen","selectedLegends","setSelectedLegends","legendProps","prevPropsRef","useImperativeHandle","componentRef","chartContainer","current","opts","toSVG","useEffect","prevProps","height","width","_adjustProps","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","barWidth","tickValues","shiftX","domainNRangeValue","NumericAxis","DateAxis","_createLine","xScale","yScalePrimary","containerHeight","containerWidth","yScaleSecondary","isStringAxis","StringAxis","colorScale","_createColors","data","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","length","mode","defaultColors","colorPaletteBlueForeground2","colorPaletteCornflowerForeground2","colorPaletteDarkGreenForeground2","colorPaletteNavyForeground2","colorPaletteDarkOrangeForeground2","colors","xAxisInnerPadding","xAxisPadding","xAxisOuterPadding","_getMargins","_margins","_renderContentForBothLineAndBars","YValueHover","_getCalloutContentForLineAndBar","content","culture","XValue","YValue","isCalloutForStack","_renderContentForOnlyBars","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","legendRef","legendsSelected","currentLegend","canSelectMultipleLegends","slice","_getAxisData","yAxisData","yAxisDomainValues","domainValue","yMaxValue","yMinValue","_getHighlightedLegend","xValue","yValue","lineYValue","ariaLabel","barValue","isNegativeBar","hideLabels","text","textAnchor","barLabel","aria-hidden","style","direction","unicodeBidi","yAxisTickFormat","_getDomainMargins","mapX","uniqueX","values","totalWidth","reqWidth","margin1","margin2","POSITIVE_INFINITY","step","_isChartEmpty","every","_getOrderedXAxisLabels","_mapCategoryToValues","categoryToValues","newX","newY","threshold","distance","sqrt","pow","legendBars","calloutProps","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","tickFormat","createYAxis","datasetForXAxisDomain","barwidth","getmargins","getMinMaxOfYAxis","getGraphData","getDomainNRangeValues","getAxisData","onChartMouseLeave","getDomainMargins","showRoundOffXTickValues","children","div","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qCAAqC;AAC/E,SAASC,OAAOC,KAAK,EAAEC,OAAOC,KAAK,QAAQ,WAAW;AACtD,SAASC,QAAQC,MAAM,QAAQ,WAAW;AAC1C,SAASC,UAAUC,QAAQ,QAAQ,eAAe;AAClD,SACEC,eAAeC,aAAa,EAE5BC,aAAaC,WAAW,EACxBC,YAAYC,UAAU,QACjB,WAAW;AAClB,SAASC,KAAK,QAAQ,4BAA4B;AAElD,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAEEC,cAAc,EAMdC,OAAO,EAGPC,YA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HI,+BACC,oBAACgP,WACEzK,YACCpF,MAAMqF,MAAM,EACZrF,MAAMsF,aAAa,EACnBtF,MAAMuF,eAAe,EACrBvF,MAAMwF,cAAc,EACpBxF,MAAMyF,eAAe;QAMjC;uBAGF,oBAACwR;QAAI3P,IAAInG;QAAe8O,MAAM;QAASkE,OAAO;YAAE5M,SAAS;QAAI;QAAGwI,cAAY;;AAEhF,GAAG;AACHnQ,iBAAiBsX,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/VerticalBarChart/VerticalBarChart.tsx"],"sourcesContent":["'use client';\n\nimport * 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 type { JSXElement } 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 ImageExportOptions,\n LegendContainer,\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 domainRangeOfDateForAreaLineScatterVerticalBarCharts,\n domainRangeOfXStringAxis,\n createStringYAxis,\n calcTotalWidth,\n calcBandwidth,\n calcRequiredWidth,\n sortAxisCategories,\n} from '../../utilities/index';\nimport { toImage } from '../../utilities/image-export-utils';\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 const props: VerticalBarChartProps = {\n xAxisCategoryOrder: 'default',\n maxBarWidth: 24,\n ..._props,\n };\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: JSXElement[];\n let _xAxisLabels: string[];\n let _yMax: number;\n let _yMin: number;\n let _isHavingLine: boolean = _checkForLine();\n const _tooltipId: string = useId('VCTooltipID_');\n let _xAxisType: XAxisTypes;\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 const _legendsRef = React.useRef<LegendContainer>(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 toImage: (opts?: ImageExportOptions): Promise<string> => {\n return toImage(cartesianChartRef.current?.chartContainer, _legendsRef.current?.toSVG, _useRtl, opts);\n },\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 ) {\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 = domainRangeOfDateForAreaLineScatterVerticalBarCharts(\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: JSXElement[] = [];\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 => {\n circleRef.refElement = e;\n }}\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 _xAxisType =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\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 =\n props.mode === 'histogram'\n ? 0\n : getScalePadding(\n props.xAxisInnerPadding,\n props.xAxisPadding,\n _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): JSXElement {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);\n const content: JSXElement[] = YValueHover.map((item: YValueHover, index: number) => {\n return (\n <>\n <ChartPopover\n culture={props.culture}\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): JSXElement {\n return (\n <>\n <ChartPopover\n XValue={_props.xAxisCalloutData || (_props.x as string)}\n xCalloutValue={xCalloutValue}\n yCalloutValue={yCalloutValue}\n culture={props.culture}\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): JSXElement | 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): JSXElement[] {\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): JSXElement[] {\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): JSXElement[] {\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[]): JSXElement {\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 legendRef={_legendsRef}\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 style={{ direction: 'ltr', unicodeBidi: 'isolate' }}\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 = calcTotalWidth(containerWidth, margins, MIN_DOMAIN_MARGIN);\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 = calcRequiredWidth(_barWidth, uniqueX.length, _xAxisInnerPadding);\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 = calcBandwidth(totalWidth, uniqueX.length, _xAxisInnerPadding);\n const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, bandwidth, props.mode);\n let reqWidth = calcRequiredWidth(barWidth, uniqueX.length, _xAxisInnerPadding);\n const margin1 = (totalWidth - reqWidth) / 2;\n\n let margin2 = Number.POSITIVE_INFINITY;\n // This logic may introduce gaps between histogram bars when the barWidth is restricted.\n // So disable it for histogram mode.\n if (props.mode !== 'histogram') {\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 = calcRequiredWidth(barWidth, uniqueX.length, _xAxisInnerPadding);\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 calcTotalWidth(containerWidth, margins, _domainMargin),\n _xAxisInnerPadding,\n ),\n props.mode,\n );\n _domainMargin += _barWidth / 2;\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 _getOrderedXAxisLabels() {\n if (_xAxisType !== XAxisTypes.StringAxis) {\n return [];\n }\n\n return sortAxisCategories(_mapCategoryToValues(), props.xAxisCategoryOrder);\n }\n\n function _mapCategoryToValues() {\n const categoryToValues: Record<string, number[]> = {};\n _points.forEach(point => {\n const xValue = point.x as string;\n if (!categoryToValues[xValue]) {\n categoryToValues[xValue] = [];\n }\n categoryToValues[xValue].push(point.y);\n if (point.lineData) {\n categoryToValues[xValue].push(point.lineData.y);\n }\n });\n return categoryToValues;\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 = _getOrderedXAxisLabels();\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: JSXElement = _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,\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","domainRangeOfDateForAreaLineScatterVerticalBarCharts","domainRangeOfXStringAxis","createStringYAxis","calcTotalWidth","calcBandwidth","calcRequiredWidth","sortAxisCategories","toImage","CircleVisbility","MIN_DOMAIN_MARGIN","VerticalBarChart","forwardRef","_props","forwardedRef","props","xAxisCategoryOrder","maxBarWidth","_points","_barWidth","_colors","_refArray","margins","_useRtl","_bars","_xAxisLabels","_yMax","_yMin","_isHavingLine","_checkForLine","_tooltipId","_xAxisType","_calloutAnchorPoint","_domainMargin","_emptyChartId","_vbcLineId","_vbcPointId","_vbcBarId","_xAxisInnerPadding","_xAxisOuterPadding","cartesianChartRef","useRef","_legendsRef","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","x","y","isPopoverOpen","setPopoverOpen","selectedLegends","setSelectedLegends","legendProps","prevPropsRef","useImperativeHandle","componentRef","chartContainer","current","opts","toSVG","useEffect","prevProps","height","width","_adjustProps","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","barWidth","tickValues","domainNRangeValue","NumericAxis","DateAxis","_createLine","xScale","yScalePrimary","containerHeight","containerWidth","yScaleSecondary","isStringAxis","StringAxis","colorScale","_createColors","data","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","length","mode","defaultColors","colorPaletteBlueForeground2","colorPaletteCornflowerForeground2","colorPaletteDarkGreenForeground2","colorPaletteNavyForeground2","colorPaletteDarkOrangeForeground2","colors","xAxisInnerPadding","xAxisPadding","xAxisOuterPadding","_getMargins","_margins","_renderContentForBothLineAndBars","YValueHover","_getCalloutContentForLineAndBar","content","culture","XValue","YValue","isCalloutForStack","_renderContentForOnlyBars","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","legendRef","legendsSelected","currentLegend","canSelectMultipleLegends","slice","_getAxisData","yAxisData","yAxisDomainValues","domainValue","yMaxValue","yMinValue","_getHighlightedLegend","xValue","yValue","lineYValue","ariaLabel","barValue","isNegativeBar","hideLabels","text","textAnchor","barLabel","aria-hidden","style","direction","unicodeBidi","yAxisTickFormat","_getDomainMargins","mapX","uniqueX","values","totalWidth","reqWidth","margin1","margin2","POSITIVE_INFINITY","step","_isChartEmpty","every","_getOrderedXAxisLabels","_mapCategoryToValues","categoryToValues","newX","newY","threshold","distance","sqrt","pow","legendBars","calloutProps","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","tickFormat","createYAxis","datasetForXAxisDomain","barwidth","getmargins","getMinMaxOfYAxis","getGraphData","getDomainNRangeValues","getAxisData","onChartMouseLeave","getDomainMargins","showRoundOffXTickValues","children","div","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qCAAqC;AAC/E,SAASC,OAAOC,KAAK,EAAEC,OAAOC,KAAK,QAAQ,WAAW;AACtD,SAASC,QAAQC,MAAM,QAAQ,WAAW;AAC1C,SAASC,UAAUC,QAAQ,QAAQ,eAAe;AAClD,SACEC,eAAeC,aAAa,EAE5BC,aAAaC,WAAW,EACxBC,YAAYC,UAAU,QACjB,WAAW;AAClB,SAASC,KAAK,QAAQ,4BAA4B;AAElD,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAEEC,cAAc,EAMdC,OAAO,EAGPC,YAAY,QAKP,cAAc;AACrB,SACEC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AAa,EACnBrF,MAAMsF,eAAe,EACrBtF,MAAMuF,cAAc,EACpBvF,MAAMwF,eAAe;QAMjC;uBAGF,oBAACwR;QAAI3P,IAAIlG;QAAe6O,MAAM;QAASkE,OAAO;YAAE5M,SAAS;QAAI;QAAGwI,cAAY;;AAEhF,GAAG;AACHlQ,iBAAiBqX,WAAW,GAAG"}
@@ -21,7 +21,9 @@ export const verticalbarchartClassNames = {
21
21
  chartWrapper: '',
22
22
  svgTooltip: '',
23
23
  chart: '',
24
- axisAnnotation: ''
24
+ axisAnnotation: '',
25
+ plotContainer: '',
26
+ annotationLayer: ''
25
27
  };
26
28
  const useStyles = /*#__PURE__*/__styles({
27
29
  opacityChangeOnHover: {},
@@ -32,10 +34,11 @@ const useStyles = /*#__PURE__*/__styles({
32
34
  Bg96gwp: "f1i3iumi",
33
35
  mc9l5x: "f22iagw",
34
36
  Beiy3e4: "f1vx9l62",
35
- z8tnut: "f17mpqex",
36
- z189sj: ["f1vdfbxk", "f1f5gg8d"],
37
- Byoj8tv: "fdvome7",
38
- uwmqm3: ["f1f5gg8d", "f1vdfbxk"],
37
+ Byoj8tv: 0,
38
+ uwmqm3: 0,
39
+ z189sj: 0,
40
+ z8tnut: 0,
41
+ B0ocmuz: "f1bnz8pu",
39
42
  qhf8xq: "f1euv43f",
40
43
  fsow6f: "f17mccla",
41
44
  Bhzewxz: "fr6rvge",
@@ -58,13 +61,15 @@ const useStyles = /*#__PURE__*/__styles({
58
61
  },
59
62
  lineBorder: {
60
63
  ojy3ng: "f1yuyku4",
61
- Bpvj6i6: "fdvt8h6"
64
+ Bj7tp1g: "f1s33jy0"
62
65
  }
63
66
  }, {
64
- d: [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f22iagw{display:flex;}", ".f1vx9l62{flex-direction:column;}", ".f17mpqex{padding-top:var(--spacingHorizontalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".fdvome7{padding-bottom:var(--spacingHorizontalS);}", ".f1euv43f{position:absolute;}", ".f17mccla{text-align:center;}", ".fr6rvge{top:var(--spacingVerticalNone);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", [".fq9zq91{border-radius:var(--borderRadiusSmall);}", {
67
+ d: [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f22iagw{display:flex;}", ".f1vx9l62{flex-direction:column;}", [".f1bnz8pu{padding:var(--spacingHorizontalS);}", {
68
+ p: -1
69
+ }], ".f1euv43f{position:absolute;}", ".f17mccla{text-align:center;}", ".fr6rvge{top:var(--spacingVerticalNone);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", [".fq9zq91{border-radius:var(--borderRadiusSmall);}", {
65
70
  p: -1
66
71
  }], ".f1aehjj5{pointer-events:none;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fhuob2q{fill:var(--colorNeutralForeground1);}", ".fhv2zbx{forced-color-adjust:auto;}", ".f1yuyku4{stroke:var(--colorNeutralBackground1);}"],
67
- m: [["@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.fdvt8h6{stroke:Canvas;}}", {
72
+ m: [["@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.f1s33jy0{stroke:Canvas;}}", {
68
73
  m: "screen and (-ms-high-contrast: active), screen and (forced-colors: active)"
69
74
  }]]
70
75
  });
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","tokens","HighContrastSelector","getBarLabelStyle","getTooltipStyle","verticalbarchartClassNames","opacityChangeOnHover","tooltip","barLabel","lineBorder","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","sj55zd","Bkfmm31","Bvjb7m6","ojy3ng","Bpvj6i6","d","p","m","useVerticalBarChartStyles","props","baseStyles"],"sources":["useVerticalBarChartStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/utilities';\nimport { getBarLabelStyle, getTooltipStyle } from '../../utilities/index';\nexport const verticalbarchartClassNames = {\n opacityChangeOnHover: 'fui-vbc__opacityChangeOnHover',\n tooltip: 'fui-vbc__tooltip',\n barLabel: 'fui-vbc__barLabel',\n lineBorder: 'fui-vbc_lineBorder',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: ''\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {},\n tooltip: getTooltipStyle(),\n barLabel: getBarLabelStyle(),\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas'\n }\n }\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const useVerticalBarChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(verticalbarchartClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/ ),\n tooltip: mergeClasses(verticalbarchartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ ),\n barLabel: mergeClasses(verticalbarchartClassNames.barLabel, baseStyles.barLabel /*props.styles?.barLabel*/ ),\n lineBorder: mergeClasses(verticalbarchartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/ )\n };\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,gBAAgB,EAAEC,eAAe,QAAQ,uBAAuB;AACzE,OAAO,MAAMC,0BAA0B,GAAG;EACtCC,oBAAoB,EAAE,+BAA+B;EACrDC,OAAO,EAAE,kBAAkB;EAC3BC,QAAQ,EAAE,mBAAmB;EAC7BC,UAAU,EAAE,oBAAoB;EAChCC,IAAI,EAAE,EAAE;EACRC,KAAK,EAAE,EAAE;EACTC,KAAK,EAAE,EAAE;EACTC,eAAe,EAAE,EAAE;EACnBC,KAAK,EAAE,EAAE;EACTC,kBAAkB,EAAE,EAAE;EACtBC,SAAS,EAAE,EAAE;EACbC,UAAU,EAAE,EAAE;EACdC,WAAW,EAAE,EAAE;EACfC,YAAY,EAAE,EAAE;EAChBC,UAAU,EAAE,EAAE;EACdC,KAAK,EAAE,EAAE;EACTC,cAAc,EAAE;AACpB,CAAC;AACD,MAAMC,SAAS,gBAAGxB,QAAA;EAAAO,oBAAA;EAAAC,OAAA;IAAAiB,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAApC,QAAA;IAAAgB,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAkB,OAAA;IAAAC,OAAA;EAAA;EAAArC,UAAA;IAAAsC,MAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;IAAAC,CAAA;EAAA;EAAAC,CAAA;IAAAA,CAAA;EAAA;AAAA,CAUjB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,yBAAyB,GAAIC,KAAK,IAAG;EAClD,MAAMC,UAAU,GAAG/B,SAAS,CAAC,CAAC;EAC9B,OAAO;IACHjB,oBAAoB,EAAEN,YAAY,CAACK,0BAA0B,CAACC,oBAAoB,EAAEgD,UAAU,CAAChD,oBAAoB,CAAC,sCAAuC,CAAC;IAC5JC,OAAO,EAAEP,YAAY,CAACK,0BAA0B,CAACE,OAAO,EAAE+C,UAAU,CAAC/C,OAAO,CAAC,yBAA0B,CAAC;IACxGC,QAAQ,EAAER,YAAY,CAACK,0BAA0B,CAACG,QAAQ,EAAE8C,UAAU,CAAC9C,QAAQ,CAAC,0BAA2B,CAAC;IAC5GC,UAAU,EAAET,YAAY,CAACK,0BAA0B,CAACI,UAAU,EAAE6C,UAAU,CAAC7C,UAAU,CAAC,4BAA6B;EACvH,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__styles","mergeClasses","tokens","HighContrastSelector","getBarLabelStyle","getTooltipStyle","verticalbarchartClassNames","opacityChangeOnHover","tooltip","barLabel","lineBorder","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","plotContainer","annotationLayer","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","qhf8xq","fsow6f","Bhzewxz","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","sj55zd","Bkfmm31","Bvjb7m6","ojy3ng","Bj7tp1g","d","p","m","useVerticalBarChartStyles","props","baseStyles"],"sources":["useVerticalBarChartStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/utilities';\nimport { getBarLabelStyle, getTooltipStyle } from '../../utilities/index';\nexport const verticalbarchartClassNames = {\n opacityChangeOnHover: 'fui-vbc__opacityChangeOnHover',\n tooltip: 'fui-vbc__tooltip',\n barLabel: 'fui-vbc__barLabel',\n lineBorder: 'fui-vbc_lineBorder',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n plotContainer: '',\n annotationLayer: ''\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {},\n tooltip: getTooltipStyle(),\n barLabel: getBarLabelStyle(),\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas'\n }\n }\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const useVerticalBarChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(verticalbarchartClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/ ),\n tooltip: mergeClasses(verticalbarchartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ ),\n barLabel: mergeClasses(verticalbarchartClassNames.barLabel, baseStyles.barLabel /*props.styles?.barLabel*/ ),\n lineBorder: mergeClasses(verticalbarchartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/ )\n };\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,gBAAgB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IAAG;EAClD,MAAMC,UAAU,GAAGhC,SAAS,CAAC,CAAC;EAC9B,OAAO;IACHnB,oBAAoB,EAAEN,YAAY,CAACK,0BAA0B,CAACC,oBAAoB,EAAEmD,UAAU,CAACnD,oBAAoB,CAAC,sCAAuC,CAAC;IAC5JC,OAAO,EAAEP,YAAY,CAACK,0BAA0B,CAACE,OAAO,EAAEkD,UAAU,CAAClD,OAAO,CAAC,yBAA0B,CAAC;IACxGC,QAAQ,EAAER,YAAY,CAACK,0BAA0B,CAACG,QAAQ,EAAEiD,UAAU,CAACjD,QAAQ,CAAC,0BAA2B,CAAC;IAC5GC,UAAU,EAAET,YAAY,CAACK,0BAA0B,CAACI,UAAU,EAAEgD,UAAU,CAAChD,UAAU,CAAC,4BAA6B;EACvH,CAAC;AACL,CAAC","ignoreList":[]}
@@ -20,7 +20,9 @@ export const verticalbarchartClassNames = {
20
20
  chartWrapper: '',
21
21
  svgTooltip: '',
22
22
  chart: '',
23
- axisAnnotation: ''
23
+ axisAnnotation: '',
24
+ plotContainer: '',
25
+ annotationLayer: ''
24
26
  };
25
27
  const useStyles = makeStyles({
26
28
  opacityChangeOnHover: {},
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/VerticalBarChart/useVerticalBarChartStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { GriffelStyle, makeStyles, mergeClasses } from '@griffel/react';\nimport { VerticalBarChartProps, VerticalBarChartStyles } from '../../index';\nimport { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { tokens } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/utilities';\nimport { getBarLabelStyle, getTooltipStyle } from '../../utilities/index';\n\nexport const verticalbarchartClassNames: SlotClassNames<VerticalBarChartStyles> = {\n opacityChangeOnHover: 'fui-vbc__opacityChangeOnHover',\n tooltip: 'fui-vbc__tooltip',\n barLabel: 'fui-vbc__barLabel',\n lineBorder: 'fui-vbc_lineBorder',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {},\n tooltip: getTooltipStyle() as GriffelStyle,\n barLabel: getBarLabelStyle() as GriffelStyle,\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas',\n },\n },\n});\n\n/**\n * Apply styling to the Carousel slots based on the state\n */\nexport const useVerticalBarChartStyles = (props: VerticalBarChartProps): VerticalBarChartStyles => {\n const baseStyles = useStyles();\n\n return {\n opacityChangeOnHover: mergeClasses(\n verticalbarchartClassNames.opacityChangeOnHover,\n baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/,\n ),\n tooltip: mergeClasses(verticalbarchartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/),\n barLabel: mergeClasses(verticalbarchartClassNames.barLabel, baseStyles.barLabel /*props.styles?.barLabel*/),\n lineBorder: mergeClasses(verticalbarchartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","HighContrastSelector","getBarLabelStyle","getTooltipStyle","verticalbarchartClassNames","opacityChangeOnHover","tooltip","barLabel","lineBorder","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","stroke","colorNeutralBackground1","useVerticalBarChartStyles","props","baseStyles"],"mappings":"AAAA;AAEA,SAAuBA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAGxE,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,oBAAoB,QAAQ,4BAA4B;AACjE,SAASC,gBAAgB,EAAEC,eAAe,QAAQ,wBAAwB;AAE1E,OAAO,MAAMC,6BAAqE;IAChFC,sBAAsB;IACtBC,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;IACPC,gBAAgB;AAClB,EAAE;AACF,MAAMC,YAAYxB,WAAW;IAC3BO,sBAAsB,CAAC;IACvBC,SAASH;IACTI,UAAUL;IACVM,YAAY;QACVe,QAAQvB,OAAOwB,uBAAuB;QACtC,CAACvB,qBAAqB,EAAE;YACtBsB,QAAQ;QACV;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAME,4BAA4B,CAACC;IACxC,MAAMC,aAAaL;IAEnB,OAAO;QACLjB,sBAAsBN,aACpBK,2BAA2BC,oBAAoB,EAC/CsB,WAAWtB,oBAAoB,CAAC,oCAAoC;QAEtEC,SAASP,aAAaK,2BAA2BE,OAAO,EAAEqB,WAAWrB,OAAO,CAAC,uBAAuB;QACpGC,UAAUR,aAAaK,2BAA2BG,QAAQ,EAAEoB,WAAWpB,QAAQ,CAAC,wBAAwB;QACxGC,YAAYT,aAAaK,2BAA2BI,UAAU,EAAEmB,WAAWnB,UAAU,CAAC,0BAA0B;IAClH;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/VerticalBarChart/useVerticalBarChartStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { GriffelStyle, makeStyles, mergeClasses } from '@griffel/react';\nimport { VerticalBarChartProps, VerticalBarChartStyles } from '../../index';\nimport { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { tokens } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/utilities';\nimport { getBarLabelStyle, getTooltipStyle } from '../../utilities/index';\n\nexport const verticalbarchartClassNames: SlotClassNames<VerticalBarChartStyles> = {\n opacityChangeOnHover: 'fui-vbc__opacityChangeOnHover',\n tooltip: 'fui-vbc__tooltip',\n barLabel: 'fui-vbc__barLabel',\n lineBorder: 'fui-vbc_lineBorder',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n plotContainer: '',\n annotationLayer: '',\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {},\n tooltip: getTooltipStyle() as GriffelStyle,\n barLabel: getBarLabelStyle() as GriffelStyle,\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas',\n },\n },\n});\n\n/**\n * Apply styling to the Carousel slots based on the state\n */\nexport const useVerticalBarChartStyles = (props: VerticalBarChartProps): VerticalBarChartStyles => {\n const baseStyles = useStyles();\n\n return {\n opacityChangeOnHover: mergeClasses(\n verticalbarchartClassNames.opacityChangeOnHover,\n baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/,\n ),\n tooltip: mergeClasses(verticalbarchartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/),\n barLabel: mergeClasses(verticalbarchartClassNames.barLabel, baseStyles.barLabel /*props.styles?.barLabel*/),\n lineBorder: mergeClasses(verticalbarchartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","HighContrastSelector","getBarLabelStyle","getTooltipStyle","verticalbarchartClassNames","opacityChangeOnHover","tooltip","barLabel","lineBorder","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","plotContainer","annotationLayer","useStyles","stroke","colorNeutralBackground1","useVerticalBarChartStyles","props","baseStyles"],"mappings":"AAAA;AAEA,SAAuBA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAGxE,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,oBAAoB,QAAQ,4BAA4B;AACjE,SAASC,gBAAgB,EAAEC,eAAe,QAAQ,wBAAwB;AAE1E,OAAO,MAAMC,6BAAqE;IAChFC,sBAAsB;IACtBC,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;IACPC,gBAAgB;IAChBC,eAAe;IACfC,iBAAiB;AACnB,EAAE;AACF,MAAMC,YAAY1B,WAAW;IAC3BO,sBAAsB,CAAC;IACvBC,SAASH;IACTI,UAAUL;IACVM,YAAY;QACViB,QAAQzB,OAAO0B,uBAAuB;QACtC,CAACzB,qBAAqB,EAAE;YACtBwB,QAAQ;QACV;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAME,4BAA4B,CAACC;IACxC,MAAMC,aAAaL;IAEnB,OAAO;QACLnB,sBAAsBN,aACpBK,2BAA2BC,oBAAoB,EAC/CwB,WAAWxB,oBAAoB,CAAC,oCAAoC;QAEtEC,SAASP,aAAaK,2BAA2BE,OAAO,EAAEuB,WAAWvB,OAAO,CAAC,uBAAuB;QACpGC,UAAUR,aAAaK,2BAA2BG,QAAQ,EAAEsB,WAAWtB,QAAQ,CAAC,wBAAwB;QACxGC,YAAYT,aAAaK,2BAA2BI,UAAU,EAAEqB,WAAWrB,UAAU,CAAC,0BAA0B;IAClH;AACF,EAAE"}
@@ -351,7 +351,7 @@ export const VerticalStackedBarChart = /*#__PURE__*/ React.forwardRef((_props, f
351
351
  }
352
352
  return shouldFocusStackOnly;
353
353
  }
354
- function _getDomainNRangeValues(points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues, shiftX) {
354
+ function _getDomainNRangeValues(points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues) {
355
355
  let domainNRangeValue;
356
356
  if (xAxisType === XAxisTypes.NumericAxis) {
357
357
  domainNRangeValue = domainRangeOfVSBCNumeric(points, margins, width, isRTL, barWidth);
@@ -471,7 +471,9 @@ export const VerticalStackedBarChart = /*#__PURE__*/ React.forwardRef((_props, f
471
471
  // For more information, see https://fuzzbomb.github.io/accessibility-demos/visually-hidden-focus-test.html
472
472
  opacity: _getCircleOpacityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).opacity,
473
473
  transform: `translate(${xScaleBandwidthTranslate}, ${yScaleBandwidthTranslate})`,
474
- ref: (e)=>circleRef.refElement = e,
474
+ ref: (e)=>{
475
+ circleRef.refElement = e;
476
+ },
475
477
  ...noBarsAndLinesActive ? {
476
478
  tabIndex: !props.hideTooltip ? 0 : undefined,
477
479
  onFocus: (event)=>_lineFocus(event, circlePoint, circleRef),
@@ -821,7 +823,9 @@ export const VerticalStackedBarChart = /*#__PURE__*/ React.forwardRef((_props, f
821
823
  `,
822
824
  fill: startColor,
823
825
  rx: props.roundCorners ? 3 : 0,
824
- ref: (e)=>ref.refElement = e,
826
+ ref: (e)=>{
827
+ ref.refElement = e;
828
+ },
825
829
  transform: `translate(${xScaleBandwidthTranslate}, 0)`,
826
830
  cursor: props.href ? 'pointer' : 'default',
827
831
  ...rectFocusProps
@@ -844,7 +848,9 @@ export const VerticalStackedBarChart = /*#__PURE__*/ React.forwardRef((_props, f
844
848
  opacity: shouldHighlight ? 1 : 0.1,
845
849
  cursor: props.href ? 'pointer' : 'default',
846
850
  rx: props.roundCorners ? 3 : 0,
847
- ref: (e)=>ref.refElement = e,
851
+ ref: (e)=>{
852
+ ref.refElement = e;
853
+ },
848
854
  ...rectFocusProps,
849
855
  transform: `translate(${xScaleBandwidthTranslate}, 0)`
850
856
  }));
@@ -884,7 +890,9 @@ export const VerticalStackedBarChart = /*#__PURE__*/ React.forwardRef((_props, f
884
890
  key: indexNumber + `${shouldFocusWholeStack}`
885
891
  }, /*#__PURE__*/ React.createElement("g", {
886
892
  id: `${indexNumber}-singleBar`,
887
- ref: (e)=>groupRef.refElement = e,
893
+ ref: (e)=>{
894
+ groupRef.refElement = e;
895
+ },
888
896
  ...stackFocusProps
889
897
  }, singleBar), !props.hideLabels && _barWidth >= 16 && showLabel && /*#__PURE__*/ React.createElement("text", {
890
898
  x: xPoint + _barWidth / 2,