@fluentui/react-charts 9.3.16 → 9.3.18

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 (259) hide show
  1. package/CHANGELOG.md +27 -2
  2. package/dist/index.d.ts +11 -11
  3. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +3 -1
  4. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -1
  5. package/lib/components/AreaChart/AreaChart.js +3 -5
  6. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  7. package/lib/components/AreaChart/AreaChart.types.js.map +1 -1
  8. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  9. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  10. package/lib/components/ChartTable/ChartTable.types.js +4 -1
  11. package/lib/components/ChartTable/ChartTable.types.js.map +1 -1
  12. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  13. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -1
  14. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -1
  15. package/lib/components/CommonComponents/CartesianChart.js +6 -6
  16. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  17. package/lib/components/CommonComponents/CartesianChart.types.js +2 -1
  18. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  19. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  20. package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -1
  21. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  22. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  23. package/lib/components/DeclarativeChart/DeclarativeChart.js +0 -1
  24. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  25. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +0 -1
  26. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  27. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +0 -1
  28. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  29. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  30. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
  31. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  32. package/lib/components/DonutChart/DonutChart.js +1 -2
  33. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  34. package/lib/components/DonutChart/DonutChart.types.js +4 -1
  35. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  36. package/lib/components/DonutChart/Pie/Pie.js +2 -5
  37. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  38. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
  39. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -1
  40. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  41. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  42. package/lib/components/FunnelChart/FunnelChart.types.js +4 -1
  43. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
  44. package/lib/components/FunnelChart/funnelGeometry.js +0 -1
  45. package/lib/components/FunnelChart/funnelGeometry.js.map +1 -1
  46. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
  47. package/lib/components/GanttChart/GanttChart.js.map +1 -1
  48. package/lib/components/GanttChart/GanttChart.types.js.map +1 -1
  49. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
  50. package/lib/components/GaugeChart/GaugeChart.js +1 -4
  51. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  52. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  53. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
  54. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +2 -3
  55. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  56. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  57. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  58. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  59. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +1 -1
  60. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  61. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +0 -1
  62. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  63. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  64. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +1 -2
  65. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  66. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  67. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  68. package/lib/components/Legends/Legends.js +1 -1
  69. package/lib/components/Legends/Legends.js.map +1 -1
  70. package/lib/components/Legends/Legends.types.js +3 -1
  71. package/lib/components/Legends/Legends.types.js.map +1 -1
  72. package/lib/components/Legends/shape.js.map +1 -1
  73. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  74. package/lib/components/LineChart/LineChart.js +16 -16
  75. package/lib/components/LineChart/LineChart.js.map +1 -1
  76. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  77. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  78. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  79. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  80. package/lib/components/PolarChart/PolarChart.js.map +1 -1
  81. package/lib/components/PolarChart/PolarChart.types.js +4 -1
  82. package/lib/components/PolarChart/PolarChart.types.js.map +1 -1
  83. package/lib/components/PolarChart/PolarChart.utils.js.map +1 -1
  84. package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js.map +1 -1
  85. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  86. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js +4 -1
  87. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  88. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -1
  89. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  90. package/lib/components/SankeyChart/SankeyChart.js +2 -2
  91. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  92. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  93. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  94. package/lib/components/ScatterChart/ScatterChart.js +3 -4
  95. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  96. package/lib/components/ScatterChart/ScatterChart.types.js +1 -1
  97. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  98. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  99. package/lib/components/Sparkline/Sparkline.js +3 -4
  100. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  101. package/lib/components/Sparkline/Sparkline.types.js.map +1 -1
  102. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -1
  103. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js.map +1 -1
  104. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +1 -1
  105. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +1 -1
  106. package/lib/components/VerticalBarChart/VerticalBarChart.js +5 -8
  107. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  108. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  109. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  110. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +5 -5
  111. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  112. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +4 -1
  113. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  114. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  115. package/lib/types/ChartAnnotation.js +1 -1
  116. package/lib/types/ChartAnnotation.js.map +1 -1
  117. package/lib/types/DataPoint.js.map +1 -1
  118. package/lib/types/EventAnnotation.js +1 -1
  119. package/lib/types/EventAnnotation.js.map +1 -1
  120. package/lib/utilities/ChartTitle.js.map +1 -1
  121. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  122. package/lib/utilities/async-utils.js +20 -20
  123. package/lib/utilities/async-utils.js.map +1 -1
  124. package/lib/utilities/hooks.js.map +1 -1
  125. package/lib/utilities/image-export-utils.js.map +1 -1
  126. package/lib/utilities/scatterpolar-utils.js.map +1 -1
  127. package/lib/utilities/test-data.js.map +1 -1
  128. package/lib/utilities/utilities.js +4 -7
  129. package/lib/utilities/utilities.js.map +1 -1
  130. package/lib/utilities/vbc-utils.js.map +1 -1
  131. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +3 -3
  132. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -1
  133. package/lib-commonjs/components/AreaChart/AreaChart.js +3 -5
  134. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  135. package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +1 -1
  136. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  137. package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
  138. package/lib-commonjs/components/ChartTable/ChartTable.types.js +4 -3
  139. package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +1 -1
  140. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  141. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -1
  142. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -1
  143. package/lib-commonjs/components/CommonComponents/CartesianChart.js +6 -6
  144. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  145. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js +1 -2
  146. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  147. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
  148. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +1 -1
  149. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  150. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  151. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +0 -1
  152. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  153. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +0 -2
  154. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  155. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +0 -2
  156. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  157. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  158. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -1
  159. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  160. package/lib-commonjs/components/DonutChart/DonutChart.js +1 -2
  161. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  162. package/lib-commonjs/components/DonutChart/DonutChart.types.js +4 -3
  163. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  164. package/lib-commonjs/components/DonutChart/Pie/Pie.js +2 -5
  165. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  166. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -1
  167. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -1
  168. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  169. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
  170. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js +4 -3
  171. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -1
  172. package/lib-commonjs/components/FunnelChart/funnelGeometry.js +0 -2
  173. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -1
  174. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
  175. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
  176. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -1
  177. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
  178. package/lib-commonjs/components/GaugeChart/GaugeChart.js +1 -4
  179. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  180. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  181. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
  182. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +2 -3
  183. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  184. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  185. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  186. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  187. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +1 -1
  188. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  189. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +3 -3
  190. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  191. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  192. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +1 -2
  193. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  194. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  195. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  196. package/lib-commonjs/components/Legends/Legends.js +1 -1
  197. package/lib-commonjs/components/Legends/Legends.js.map +1 -1
  198. package/lib-commonjs/components/Legends/Legends.types.js +3 -3
  199. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  200. package/lib-commonjs/components/Legends/shape.js.map +1 -1
  201. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  202. package/lib-commonjs/components/LineChart/LineChart.js +16 -16
  203. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  204. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  205. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  206. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  207. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  208. package/lib-commonjs/components/PolarChart/PolarChart.js.map +1 -1
  209. package/lib-commonjs/components/PolarChart/PolarChart.types.js +4 -3
  210. package/lib-commonjs/components/PolarChart/PolarChart.types.js.map +1 -1
  211. package/lib-commonjs/components/PolarChart/PolarChart.utils.js.map +1 -1
  212. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.js.map +1 -1
  213. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  214. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js +4 -3
  215. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  216. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -1
  217. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  218. package/lib-commonjs/components/SankeyChart/SankeyChart.js +2 -2
  219. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  220. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  221. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  222. package/lib-commonjs/components/ScatterChart/ScatterChart.js +3 -4
  223. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  224. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +1 -1
  225. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  226. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  227. package/lib-commonjs/components/Sparkline/Sparkline.js +3 -4
  228. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
  229. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -1
  230. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -1
  231. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js.map +1 -1
  232. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +1 -1
  233. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +1 -1
  234. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +5 -8
  235. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  236. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  237. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  238. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +5 -5
  239. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  240. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +4 -3
  241. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  242. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  243. package/lib-commonjs/types/ChartAnnotation.js +0 -2
  244. package/lib-commonjs/types/ChartAnnotation.js.map +1 -1
  245. package/lib-commonjs/types/DataPoint.js.map +1 -1
  246. package/lib-commonjs/types/EventAnnotation.js +0 -2
  247. package/lib-commonjs/types/EventAnnotation.js.map +1 -1
  248. package/lib-commonjs/utilities/ChartTitle.js.map +1 -1
  249. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  250. package/lib-commonjs/utilities/async-utils.js +20 -20
  251. package/lib-commonjs/utilities/async-utils.js.map +1 -1
  252. package/lib-commonjs/utilities/hooks.js.map +1 -1
  253. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  254. package/lib-commonjs/utilities/scatterpolar-utils.js.map +1 -1
  255. package/lib-commonjs/utilities/test-data.js.map +1 -1
  256. package/lib-commonjs/utilities/utilities.js +2 -2
  257. package/lib-commonjs/utilities/utilities.js.map +1 -1
  258. package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
  259. package/package.json +8 -8
@@ -301,7 +301,6 @@ const VerticalBarChart = /*#__PURE__*/ _react.forwardRef((_props, forwardedRef)=
301
301
  }
302
302
  function _getCalloutContentForLineAndBar(point) {
303
303
  var _selectedPoint__lineData;
304
- // eslint-disable-next-line @typescript-eslint/no-shadow
305
304
  const YValueHover = [];
306
305
  const { useSingleColor = false } = props;
307
306
  const { data, lineLegendText, lineLegendColor = _reacttheme.tokens.colorPaletteYellowBackground1 } = props;
@@ -366,7 +365,6 @@ const VerticalBarChart = /*#__PURE__*/ _react.forwardRef((_props, forwardedRef)=
366
365
  setYValueHover([]);
367
366
  setHoverXValue('');
368
367
  }
369
- // eslint-disable-next-line @typescript-eslint/no-shadow
370
368
  function _onBarFocus(event, point, refArrayIndexNumber, color) {
371
369
  let x = 0;
372
370
  let y = 0;
@@ -868,16 +866,16 @@ const VerticalBarChart = /*#__PURE__*/ _react.forwardRef((_props, forwardedRef)=
868
866
  const calloutProps = {
869
867
  ..._isHavingLine && {
870
868
  YValueHover: hoveredYValues,
871
- hoverXValue: hoverXValue
869
+ hoverXValue
872
870
  },
873
- color: color,
871
+ color,
874
872
  legend: calloutLegend,
875
873
  XValue: xCalloutValue,
876
874
  YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,
877
875
  ...props.calloutProps,
878
876
  ...(0, _index1.getAccessibleDataObject)(callOutAccessibilityData),
879
- clickPosition: clickPosition,
880
- isPopoverOpen: isPopoverOpen,
877
+ clickPosition,
878
+ isPopoverOpen,
881
879
  isCalloutForStack: _isHavingLine && (_noLegendHighlighted() || _getHighlightedLegend().length > 1),
882
880
  culture: props.culture,
883
881
  isCartesian: true,
@@ -919,8 +917,7 @@ const VerticalBarChart = /*#__PURE__*/ _react.forwardRef((_props, forwardedRef)=
919
917
  },
920
918
  componentRef: cartesianChartRef,
921
919
  showRoundOffXTickValues: !(0, _index1.isScalePaddingDefined)(props.xAxisInnerPadding, props.xAxisPadding) && props.mode !== 'histogram',
922
- /* eslint-disable react/jsx-no-bind */ // eslint-disable-next-line react/no-children-prop
923
- children: (props)=>{
920
+ /* eslint-disable react/jsx-no-bind */ children: (props)=>{
924
921
  return /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement("g", null, _bars), _isHavingLine && /*#__PURE__*/ _react.createElement("g", null, _createLine(props.xScale, props.yScalePrimary, props.containerHeight, props.containerWidth, props.yScaleSecondary)));
925
922
  }
926
923
  }) : /*#__PURE__*/ _react.createElement("div", {
@@ -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 {\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 DataPoint,\n} from '../../index';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n NumericAxis,\n getTypeOfAxis,\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 { useImageExport } from '../../utilities/hooks';\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 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, legendsRef: _legendsRef } = useImageExport(props.componentRef, props.hideLegend);\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.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, point.barLabel)}\n </g>\n );\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, point.barLabel)}\n </g>\n );\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, point.barLabel)}\n </g>\n );\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(\n xPoint: number,\n yPoint: number,\n barValue: number,\n legend: string,\n isNegativeBar: boolean,\n customBarLabel?: string,\n ) {\n if (props.hideLabels || _barWidth < 16 || !(_legendHighlighted(legend) || _noLegendHighlighted())) {\n return null;\n }\n\n // Use custom barLabel if provided, otherwise use the formatted barValue\n const displayLabel =\n customBarLabel !== undefined\n ? customBarLabel\n : typeof props.yAxisTickFormat === 'function'\n ? props.yAxisTickFormat(barValue)\n : formatScientificLimitWidth(barValue);\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 {displayLabel}\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 _getChartTitle(): string {\n const { chartTitle, data } = props;\n return (\n (chartTitle ? `${chartTitle}. ` : '') +\n `Vertical bar chart with ${data?.length || 0} bars` +\n (_isHavingLine ? ' and 1 line' : '') +\n '. '\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 chartTitle={_getChartTitle()}\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","scaleLinear","d3ScaleLinear","scaleBand","d3ScaleBand","scaleUtc","d3ScaleUtc","useId","tokens","CartesianChart","Legends","ChartPopover","ChartTypes","getAccessibleDataObject","XAxisTypes","getTypeOfAxis","formatScientificLimitWidth","getBarWidth","getScalePadding","isScalePaddingDefined","calculateAppropriateBarWidth","useRtl","areArraysEqual","calculateLongestLabelWidth","findVerticalNumericMinMaxOfY","createNumericYAxis","domainRangeOfVerticalNumeric","domainRangeOfDateForAreaLineScatterVerticalBarCharts","domainRangeOfXStringAxis","createStringYAxis","calcTotalWidth","calcBandwidth","calcRequiredWidth","sortAxisCategories","useImageExport","CircleVisbility","MIN_DOMAIN_MARGIN","VerticalBarChart","forwardRef","_props","forwardedRef","props","xAxisCategoryOrder","maxBarWidth","_points","_barWidth","_colors","_refArray","margins","_useRtl","_bars","_xAxisLabels","_yMax","_yMin","_isHavingLine","_checkForLine","_xAxisType","_calloutAnchorPoint","_domainMargin","_emptyChartId","_vbcLineId","_vbcPointId","_vbcBarId","_xAxisInnerPadding","_xAxisOuterPadding","cartesianChartRef","legendsRef","_legendsRef","componentRef","hideLegend","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","useRef","useEffect","current","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","barLabel","getTime","transform","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","customBarLabel","hideLabels","displayLabel","yAxisTickFormat","text","textAnchor","aria-hidden","style","direction","unicodeBidi","_getDomainMargins","mapX","uniqueX","values","totalWidth","reqWidth","margin1","margin2","POSITIVE_INFINITY","step","_getChartTitle","chartTitle","_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;;;;;+BAsEa4C;;;;;;;iEApEU,QAAQ;iDACW,qCAAqC;yBACpC,WAAW;yBACvB,WAAW;yBAMnC,WAAW;gCACI,4BAA4B;4BAE3B,wBAAwB;uBAcxC,cAAc;wBA2Bd,wBAAwB;uBACA,wBAAwB;AAEvD,IAAKF,kBAAAA,WAAAA,GAAAA,SAAAA,eAAAA;;;WAAAA;EAAAA,mBAAAA,CAAAA;AAKL,MAAMC,oBAAoB;AAOnB,yBAAMC,WAAAA,GAAmE5C,OAAM6C,UAAU,CAG9F,CAACC,QAAQC;QA0C8DC;IAzCvE,MAAMA,QAA+B;QACnCC,oBAAoB;QACpBC,aAAa;QACb,GAAGJ,MAAM;IACX;IACA,IAAIK,UAAuC,EAAE;IAC7C,IAAIC,YAAoB;IACxB,IAAIC;IACJ,MAAMC,YAA4B,EAAE;IACpC,IAAIC;IACJ,MAAMC,cAAmB5B,cAAAA;IACzB,IAAI6B;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC,gBAAyBC;IAC7B,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,MAAMC,oBAAwBpD,qBAAAA,EAAM;IACpC,MAAMqD,aAAqBrD,yBAAAA,EAAM;IACjC,MAAMsD,kBAAsBtD,qBAAAA,EAAM;IAClC,MAAMuD,gBAAoBvD,qBAAAA,EAAM;IAChC,IAAIwD,qBAA6B;IACjC,IAAIC,qBAA6B;IAEjC,MAAM,EAAEC,iBAAiB,EAAEC,YAAYC,WAAW,EAAE,OAAG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UvV;QACVhB,mBAAmBA,yBAAAA;QACnBwW,YAAYvL;QACZwL,kBAAkB9W,oCAAAA;QAClB+W,cAAcxK;QACdyK,uBAAuBzR;QACvB0R,aAAa9D;QACb+D,mBAAmB7M;QACnB8M,kBAAkBzC;QACjB,GAAI1S,eAAgB1C,kBAAAA,CAAWkH,UAAU,IAAI;YAC5C2E,mBAAmB5I;YACnB8I,mBAAmB7I;QACrB,CAAC;QACDI,cAAcH;QACd2U,yBACE,KAACzX,6BAAAA,EAAsBsB,MAAMkK,iBAAiB,EAAElK,MAAMmK,YAAY,KAAKnK,MAAM0J,IAAI,KAAK;QAExF,oCAAoC,GACpC,kDAAkD;QAClD0M,UAAU,CAACpW;YACT,OAAA,WAAA,GACE,OAAA,aAAA,CAAA,OAAA,QAAA,EAAA,MAAA,WAAA,GACE,OAAA,aAAA,CAACyP,KAAAA,MAAGhP,QACHI,iBAAAA,WAAAA,GACC,OAAA,aAAA,CAAC4O,KAAAA,MACEzK,YACChF,MAAMiF,MAAM,EACZjF,MAAMkF,aAAa,EACnBlF,MAAMmF,eAAe,EACrBnF,MAAMoF,cAAc,EACpBpF,MAAMqF,eAAe;QAMjC;uBAGF,OAAA,aAAA,CAACgR,OAAAA;QAAInP,IAAIhG;QAAe2O,MAAM;QAASyD,OAAO;YAAEnM,SAAS;QAAI;QAAGwI,cAAY;;AAEhF,GAAG;AACH/P,iBAAiB0W,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 type { ScaleLinear as D3ScaleLinear } from 'd3-scale';\nimport { scaleLinear as d3ScaleLinear, scaleBand as d3ScaleBand, scaleUtc as d3ScaleUtc } from 'd3-scale';\nimport { useId } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport type {\n AccessibilityProps,\n Margins,\n Legend,\n RefArrayData,\n VerticalBarChartProps,\n VerticalBarChartDataPoint,\n ChildProps,\n YValueHover,\n DataPoint,\n} from '../../index';\nimport { CartesianChart, Legends, ChartPopover } from '../../index';\nimport type { IAxisData, NumericAxis, IDomainNRange } from '../../utilities/index';\nimport {\n ChartTypes,\n getAccessibleDataObject,\n XAxisTypes,\n getTypeOfAxis,\n formatScientificLimitWidth,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n calculateAppropriateBarWidth,\n useRtl,\n areArraysEqual,\n calculateLongestLabelWidth,\n findVerticalNumericMinMaxOfY,\n createNumericYAxis,\n domainRangeOfVerticalNumeric,\n domainRangeOfDateForAreaLineScatterVerticalBarCharts,\n domainRangeOfXStringAxis,\n createStringYAxis,\n calcTotalWidth,\n calcBandwidth,\n calcRequiredWidth,\n sortAxisCategories,\n} from '../../utilities/index';\nimport { useImageExport } from '../../utilities/hooks';\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 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, legendsRef: _legendsRef } = useImageExport(props.componentRef, props.hideLegend);\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.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 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 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, point.barLabel)}\n </g>\n );\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, point.barLabel)}\n </g>\n );\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, point.barLabel)}\n </g>\n );\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(\n xPoint: number,\n yPoint: number,\n barValue: number,\n legend: string,\n isNegativeBar: boolean,\n customBarLabel?: string,\n ) {\n if (props.hideLabels || _barWidth < 16 || !(_legendHighlighted(legend) || _noLegendHighlighted())) {\n return null;\n }\n\n // Use custom barLabel if provided, otherwise use the formatted barValue\n const displayLabel =\n customBarLabel !== undefined\n ? customBarLabel\n : typeof props.yAxisTickFormat === 'function'\n ? props.yAxisTickFormat(barValue)\n : formatScientificLimitWidth(barValue);\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 {displayLabel}\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 _getChartTitle(): string {\n const { chartTitle, data } = props;\n return (\n (chartTitle ? `${chartTitle}. ` : '') +\n `Vertical bar chart with ${data?.length || 0} bars` +\n (_isHavingLine ? ' and 1 line' : '') +\n '. '\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,\n }),\n color,\n legend: calloutLegend,\n XValue: xCalloutValue,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData),\n clickPosition,\n 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 chartTitle={_getChartTitle()}\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\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","scaleLinear","d3ScaleLinear","scaleBand","d3ScaleBand","scaleUtc","d3ScaleUtc","useId","tokens","CartesianChart","Legends","ChartPopover","ChartTypes","getAccessibleDataObject","XAxisTypes","getTypeOfAxis","formatScientificLimitWidth","getBarWidth","getScalePadding","isScalePaddingDefined","calculateAppropriateBarWidth","useRtl","areArraysEqual","calculateLongestLabelWidth","findVerticalNumericMinMaxOfY","createNumericYAxis","domainRangeOfVerticalNumeric","domainRangeOfDateForAreaLineScatterVerticalBarCharts","domainRangeOfXStringAxis","createStringYAxis","calcTotalWidth","calcBandwidth","calcRequiredWidth","sortAxisCategories","useImageExport","CircleVisbility","MIN_DOMAIN_MARGIN","VerticalBarChart","forwardRef","_props","forwardedRef","props","xAxisCategoryOrder","maxBarWidth","_points","_barWidth","_colors","_refArray","margins","_useRtl","_bars","_xAxisLabels","_yMax","_yMin","_isHavingLine","_checkForLine","_xAxisType","_calloutAnchorPoint","_domainMargin","_emptyChartId","_vbcLineId","_vbcPointId","_vbcBarId","_xAxisInnerPadding","_xAxisOuterPadding","cartesianChartRef","legendsRef","_legendsRef","componentRef","hideLegend","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","useRef","useEffect","current","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","barLabel","getTime","transform","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","customBarLabel","hideLabels","displayLabel","yAxisTickFormat","text","textAnchor","aria-hidden","style","direction","unicodeBidi","_getDomainMargins","mapX","uniqueX","values","totalWidth","reqWidth","margin1","margin2","POSITIVE_INFINITY","step","_getChartTitle","chartTitle","_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;;;;;+BA8Da4C;;;;;;;iEA5DU,QAAQ;iDACW,qCAAqC;yBACpC,WAAW;yBACvB,WAAW;yBAEqD,WAAW;gCACpF,4BAA4B;4BAE3B,wBAAwB;uBAYO,cAAc;wBAyB7D,wBAAwB;uBACA,wBAAwB;AAEvD,IAAKF,kBAAAA,WAAAA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,GACC,OAAA,aAAA,CAAC4O,KAAAA,MACEzK,YACChF,MAAMiF,MAAM,EACZjF,MAAMkF,aAAa,EACnBlF,MAAMmF,eAAe,EACrBnF,MAAMoF,cAAc,EACpBpF,MAAMqF,eAAe;QAMjC;uBAGF,OAAA,aAAA,CAACgR,OAAAA;QAAInP,IAAIhG;QAAe2O,MAAM;QAASyD,OAAO;YAAEnM,SAAS;QAAI;QAAGwI,cAAY;;AAEhF,GAAG;AACH/P,iBAAiB0W,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/VerticalBarChart/VerticalBarChart.types.ts"],"sourcesContent":["import { RenderFunction } from '../../utilities/index';\nimport {\n CartesianChartProps,\n CartesianChartStyleProps,\n CartesianChartStyles,\n VerticalBarChartDataPoint,\n} from '../../index';\nimport { LineChartLineOptions } from '../../types/index';\n\n/**\n * Vertical Bar Chart properties\n * {@docCategory VerticalBarChart}\n */\nexport interface VerticalBarChartProps extends CartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data?: VerticalBarChartDataPoint[];\n\n /**\n * Define a custom callout renderer for a data point.\n */\n onRenderCalloutPerDataPoint?: RenderFunction<VerticalBarChartDataPoint>;\n\n /**\n * Width of each bar in the chart. When set to `undefined` or `'default'`, the bar width defaults to 16px,\n * which may decrease to prevent overlap. When set to `'auto'`, the bar width is calculated from padding values.\n * @default 16\n */\n barWidth?: number | 'default' | 'auto';\n\n /**\n * Colors from which to select the color of each bar.\n */\n colors?: string[];\n\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * Legend text for the line datapoint in the chart\n */\n lineLegendText?: string;\n\n /**\n * color for the legend of the line in the chart\n * @default theme.yellow\n */\n\n lineLegendColor?: string;\n\n /**\n * This prop makes sure that all the bars are of same color.\n * it will take the first color from the array of colors in\n * prop `colors` or if `colors` prop is not given then default color is palette.blueLight\n * @default false\n */\n useSingleColor?: boolean;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: Partial<VerticalBarChartStyles>;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * it's padding between bar's or lines in the graph\n */\n xAxisPadding?: number;\n\n /**\n * options for the line drawn\n */\n lineOptions?: LineChartLineOptions;\n\n /**\n * Prop to hide the bar labels\n * @default false\n */\n hideLabels?: boolean;\n\n /**\n * Maximum width of a bar, in pixels.\n * @default 24\n */\n maxBarWidth?: number;\n\n /**\n * Padding between bars as a fraction of the [step](https://d3js.org/d3-scale/band#band_step).\n * Takes a number in the range [0, 1]. Only applicable to string x-axis.\n * @default 2/3\n */\n xAxisInnerPadding?: number;\n\n /**\n * Padding before the first bar and after the last bar as a fraction of\n * the [step](https://d3js.org/d3-scale/band#band_step). Takes a number in the range [0, 1].\n * Only applicable to string x-axis.\n */\n xAxisOuterPadding?: number;\n\n /**\n * @default false\n * The prop used to enable gradient fill color for the chart.\n */\n enableGradient?: boolean;\n\n /**\n * @default false\n * The prop used to enable rounded corners for the chart.\n */\n roundCorners?: boolean;\n\n /**\n * Specifies the mode of the chart.\n * @default 'default'\n */\n mode?: 'default' | 'plotly' | 'histogram';\n}\n\n/**\n * Vertical Bar Chart style properties\n * {@docCategory VerticalBarChart}\n */\nexport interface VerticalBarChartStyleProps extends CartesianChartStyleProps {\n /**\n * color of the datapoint legend\n */\n legendColor?: string;\n}\n\n/**\n * Vertical Bar Chart styles\n * {@docCategory VerticalBarChart}\n */\nexport interface VerticalBarChartStyles extends CartesianChartStyles {\n /**\n * Style for the bar labels\n */\n barLabel: string;\n\n /**\n * Styles for line border\n */\n lineBorder: string;\n}\n"],"names":[],"mappings":"AAyIA;;;CAGC,GACD,WAUC"}
1
+ {"version":3,"sources":["../src/components/VerticalBarChart/VerticalBarChart.types.ts"],"sourcesContent":["import type { RenderFunction } from '../../utilities/index';\nimport type {\n CartesianChartProps,\n CartesianChartStyleProps,\n CartesianChartStyles,\n VerticalBarChartDataPoint,\n} from '../../index';\nimport type { LineChartLineOptions } from '../../types/index';\n\n/**\n * Vertical Bar Chart properties\n * {@docCategory VerticalBarChart}\n */\nexport interface VerticalBarChartProps extends CartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data?: VerticalBarChartDataPoint[];\n\n /**\n * Define a custom callout renderer for a data point.\n */\n onRenderCalloutPerDataPoint?: RenderFunction<VerticalBarChartDataPoint>;\n\n /**\n * Width of each bar in the chart. When set to `undefined` or `'default'`, the bar width defaults to 16px,\n * which may decrease to prevent overlap. When set to `'auto'`, the bar width is calculated from padding values.\n * @default 16\n */\n barWidth?: number | 'default' | 'auto';\n\n /**\n * Colors from which to select the color of each bar.\n */\n colors?: string[];\n\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * Legend text for the line datapoint in the chart\n */\n lineLegendText?: string;\n\n /**\n * color for the legend of the line in the chart\n * @default theme.yellow\n */\n\n lineLegendColor?: string;\n\n /**\n * This prop makes sure that all the bars are of same color.\n * it will take the first color from the array of colors in\n * prop `colors` or if `colors` prop is not given then default color is palette.blueLight\n * @default false\n */\n useSingleColor?: boolean;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: Partial<VerticalBarChartStyles>;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * it's padding between bar's or lines in the graph\n */\n xAxisPadding?: number;\n\n /**\n * options for the line drawn\n */\n lineOptions?: LineChartLineOptions;\n\n /**\n * Prop to hide the bar labels\n * @default false\n */\n hideLabels?: boolean;\n\n /**\n * Maximum width of a bar, in pixels.\n * @default 24\n */\n maxBarWidth?: number;\n\n /**\n * Padding between bars as a fraction of the [step](https://d3js.org/d3-scale/band#band_step).\n * Takes a number in the range [0, 1]. Only applicable to string x-axis.\n * @default 2/3\n */\n xAxisInnerPadding?: number;\n\n /**\n * Padding before the first bar and after the last bar as a fraction of\n * the [step](https://d3js.org/d3-scale/band#band_step). Takes a number in the range [0, 1].\n * Only applicable to string x-axis.\n */\n xAxisOuterPadding?: number;\n\n /**\n * @default false\n * The prop used to enable gradient fill color for the chart.\n */\n enableGradient?: boolean;\n\n /**\n * @default false\n * The prop used to enable rounded corners for the chart.\n */\n roundCorners?: boolean;\n\n /**\n * Specifies the mode of the chart.\n * @default 'default'\n */\n mode?: 'default' | 'plotly' | 'histogram';\n}\n\n/**\n * Vertical Bar Chart style properties\n * {@docCategory VerticalBarChart}\n */\nexport interface VerticalBarChartStyleProps extends CartesianChartStyleProps {\n /**\n * color of the datapoint legend\n */\n legendColor?: string;\n}\n\n/**\n * Vertical Bar Chart styles\n * {@docCategory VerticalBarChart}\n */\nexport interface VerticalBarChartStyles extends CartesianChartStyles {\n /**\n * Style for the bar labels\n */\n barLabel: string;\n\n /**\n * Styles for line border\n */\n lineBorder: string;\n}\n"],"names":[],"mappings":"AAyIA;;;CAGC,GACD,WAUC"}
@@ -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 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;;;;;;;;;;;;IA6Ca6B,yBAAAA;;;IApCAvB,0BAAAA;;;;uBAP0C,iBAAiB;4BAGjD,wBAAwB;2BACV,4BAA4B;uBACf,wBAAwB;AAEnE,mCAA2E;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,gBAAY1B,iBAAAA,EAAW;IAC3BO,sBAAsB,CAAC;IACvBC,aAASH,sBAAAA;IACTI,cAAUL,uBAAAA;IACVM,YAAY;QACViB,QAAQzB,kBAAAA,CAAO0B,uBAAuB;QACtC,CAACzB,+BAAAA,CAAqB,EAAE;YACtBwB,QAAQ;QACV;IACF;AACF;AAKO,kCAAkC,CAACG;IACxC,MAAMC,aAAaL;IAEnB,OAAO;QACLnB,0BAAsBN,mBAAAA,EACpBK,2BAA2BC,oBAAoB,EAC/CwB,WAAWxB,oBAAoB,CAAC,oCAAoC;QAEtEC,aAASP,mBAAAA,EAAaK,2BAA2BE,OAAO,EAAEuB,WAAWvB,OAAO,CAAC,uBAAuB;QACpGC,cAAUR,mBAAAA,EAAaK,2BAA2BG,QAAQ,EAAEsB,WAAWtB,QAAQ,CAAC,wBAAwB;QACxGC,gBAAYT,mBAAAA,EAAaK,2BAA2BI,UAAU,EAAEqB,WAAWrB,UAAU,CAAC,0BAA0B;IAClH;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/VerticalBarChart/useVerticalBarChartStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport type { GriffelStyle } from '@griffel/react';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { VerticalBarChartProps, VerticalBarChartStyles } from '../../index';\nimport type { 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;;;;;;;;;;;;IA8Ca6B,yBAAAA;;;IApCAvB,0BAAAA;;;;uBAP4B,iBAAiB;4BAGnC,wBAAwB;2BACV,4BAA4B;uBACf,wBAAwB;AAEnE,mCAA2E;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,gBAAY1B,iBAAAA,EAAW;IAC3BO,sBAAsB,CAAC;IACvBC,aAASH,sBAAAA;IACTI,cAAUL,uBAAAA;IACVM,YAAY;QACViB,QAAQzB,kBAAAA,CAAO0B,uBAAuB;QACtC,CAACzB,+BAAAA,CAAqB,EAAE;YACtBwB,QAAQ;QACV;IACF;AACF;AAKO,kCAAkC,CAACG;IACxC,MAAMC,aAAaL;IAEnB,OAAO;QACLnB,0BAAsBN,mBAAAA,EACpBK,2BAA2BC,oBAAoB,EAC/CwB,WAAWxB,oBAAoB,CAAC,oCAAoC;QAEtEC,aAASP,mBAAAA,EAAaK,2BAA2BE,OAAO,EAAEuB,WAAWvB,OAAO,CAAC,uBAAuB;QACpGC,cAAUR,mBAAAA,EAAaK,2BAA2BG,QAAQ,EAAEsB,WAAWtB,QAAQ,CAAC,wBAAwB;QACxGC,gBAAYT,mBAAAA,EAAaK,2BAA2BI,UAAU,EAAEqB,WAAWrB,UAAU,CAAC,0BAA0B;IAClH;AACF,EAAE"}
@@ -1017,16 +1017,16 @@ const VerticalStackedBarChart = /*#__PURE__*/ _react.forwardRef((_props, forward
1017
1017
  _dataset = _createDataSetLayer();
1018
1018
  const legendBars = _getLegendData(_points, _createLegendsForLine(props.data));
1019
1019
  const calloutProps = {
1020
- color: color,
1020
+ color,
1021
1021
  legend: calloutLegend,
1022
1022
  XValue: xCalloutValue,
1023
1023
  YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,
1024
- YValueHover: YValueHover,
1025
- hoverXValue: hoverXValue,
1024
+ YValueHover,
1025
+ hoverXValue,
1026
1026
  ...props.calloutProps,
1027
1027
  ...(0, _index1.getAccessibleDataObject)(callOutAccessibilityData),
1028
- clickPosition: clickPosition,
1029
- isPopoverOpen: isPopoverOpen,
1028
+ clickPosition,
1029
+ isPopoverOpen,
1030
1030
  isCalloutForStack: shouldFocusWholeStack,
1031
1031
  isCartesian: true,
1032
1032
  customCallout: {