@fluentui/react-charts 9.1.9 → 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (451) hide show
  1. package/CHANGELOG.md +47 -2
  2. package/dist/index.d.ts +348 -11
  3. package/lib/AreaChart.js.map +1 -1
  4. package/lib/CartesianChart.js.map +1 -1
  5. package/lib/DeclarativeChart.js.map +1 -1
  6. package/lib/DonutChart.js.map +1 -1
  7. package/lib/FunnelChart.js +1 -0
  8. package/lib/FunnelChart.js.map +1 -0
  9. package/lib/GanttChart.js +1 -0
  10. package/lib/GanttChart.js.map +1 -0
  11. package/lib/GaugeChart.js.map +1 -1
  12. package/lib/GroupedVerticalBarChart.js.map +1 -1
  13. package/lib/HeatMapChart.js.map +1 -1
  14. package/lib/HorizontalBarChart.js.map +1 -1
  15. package/lib/HorizontalBarChartWithAxis.js.map +1 -1
  16. package/lib/Legends.js.map +1 -1
  17. package/lib/LineChart.js.map +1 -1
  18. package/lib/Popover.js.map +1 -1
  19. package/lib/ResponsiveContainer.js.map +1 -1
  20. package/lib/SankeyChart.js.map +1 -1
  21. package/lib/ScatterChart.js.map +1 -1
  22. package/lib/Sparkline.js.map +1 -1
  23. package/lib/VerticalBarChart.js.map +1 -1
  24. package/lib/VerticalStackedBarChart.js.map +1 -1
  25. package/lib/components/AreaChart/AreaChart.js +24 -8
  26. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  27. package/lib/components/AreaChart/AreaChart.types.js.map +1 -1
  28. package/lib/components/AreaChart/index.js.map +1 -1
  29. package/lib/components/AreaChart/useAreaChartStyles.styles.js +1 -2
  30. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +41 -0
  31. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -0
  32. package/lib/components/CommonComponents/CartesianChart.js +12 -8
  33. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  34. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  35. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  36. package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -1
  37. package/lib/components/CommonComponents/index.js.map +1 -1
  38. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +1 -2
  39. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +128 -0
  40. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -0
  41. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +1 -2
  42. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +126 -0
  43. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -0
  44. package/lib/components/DeclarativeChart/DeclarativeChart.js +15 -7
  45. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  46. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +44 -13
  47. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  48. package/lib/components/DeclarativeChart/imageExporter.js +1 -0
  49. package/lib/components/DeclarativeChart/imageExporter.js.map +1 -1
  50. package/lib/components/DeclarativeChart/index.js.map +1 -1
  51. package/lib/components/DonutChart/Arc/Arc.js +5 -5
  52. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  53. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
  54. package/lib/components/DonutChart/Arc/index.js.map +1 -1
  55. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +1 -2
  56. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +44 -0
  57. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -0
  58. package/lib/components/DonutChart/DonutChart.js +18 -4
  59. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  60. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  61. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  62. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
  63. package/lib/components/DonutChart/Pie/index.js.map +1 -1
  64. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +1 -2
  65. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js +29 -0
  66. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -0
  67. package/lib/components/DonutChart/index.js.map +1 -1
  68. package/lib/components/DonutChart/useDonutChartStyles.styles.js +1 -2
  69. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +45 -0
  70. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -0
  71. package/lib/components/FunnelChart/FunnelChart.js +400 -0
  72. package/lib/components/FunnelChart/FunnelChart.js.map +1 -0
  73. package/lib/components/FunnelChart/FunnelChart.types.js +1 -0
  74. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -0
  75. package/lib/components/FunnelChart/funnelGeometry.js +220 -0
  76. package/lib/components/FunnelChart/funnelGeometry.js.map +1 -0
  77. package/lib/components/FunnelChart/index.js +2 -0
  78. package/lib/components/FunnelChart/index.js.map +1 -0
  79. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +58 -0
  80. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -0
  81. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +51 -0
  82. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -0
  83. package/lib/components/GanttChart/GanttChart.js +547 -0
  84. package/lib/components/GanttChart/GanttChart.js.map +1 -0
  85. package/lib/components/GanttChart/GanttChart.types.js +4 -0
  86. package/lib/components/GanttChart/GanttChart.types.js.map +1 -0
  87. package/lib/components/GanttChart/index.js +2 -0
  88. package/lib/components/GanttChart/index.js.map +1 -0
  89. package/lib/components/GanttChart/useGanttChartStyles.styles.js +24 -0
  90. package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +1 -0
  91. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +23 -0
  92. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -0
  93. package/lib/components/GaugeChart/GaugeChart.js +9 -2
  94. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  95. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  96. package/lib/components/GaugeChart/index.js.map +1 -1
  97. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +1 -2
  98. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +142 -0
  99. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -0
  100. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +77 -60
  101. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  102. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  103. package/lib/components/GroupedVerticalBarChart/index.js.map +1 -1
  104. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +1 -2
  105. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +53 -0
  106. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -0
  107. package/lib/components/HeatMapChart/HeatMapChart.js +11 -3
  108. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  109. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  110. package/lib/components/HeatMapChart/index.js.map +1 -1
  111. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +1 -2
  112. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +38 -0
  113. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -0
  114. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +23 -26
  115. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  116. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +5 -3
  117. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  118. package/lib/components/HorizontalBarChart/index.js.map +1 -1
  119. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +1 -2
  120. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +120 -0
  121. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -0
  122. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +18 -5
  123. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  124. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  125. package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  126. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +1 -2
  127. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +39 -0
  128. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -0
  129. package/lib/components/Legends/Legends.js +28 -10
  130. package/lib/components/Legends/Legends.js.map +1 -1
  131. package/lib/components/Legends/Legends.types.js.map +1 -1
  132. package/lib/components/Legends/OverflowMenu.js.map +1 -1
  133. package/lib/components/Legends/index.js.map +1 -1
  134. package/lib/components/Legends/shape.js +3 -3
  135. package/lib/components/Legends/shape.js.map +1 -1
  136. package/lib/components/Legends/useLegendsStyles.styles.js +57 -14
  137. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  138. package/lib/components/Legends/useLegendsStyles.styles.raw.js +138 -0
  139. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -0
  140. package/lib/components/LineChart/LineChart.js +23 -9
  141. package/lib/components/LineChart/LineChart.js.map +1 -1
  142. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  143. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  144. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  145. package/lib/components/LineChart/eventAnnotation/Textbox.js +2 -1
  146. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  147. package/lib/components/LineChart/index.js.map +1 -1
  148. package/lib/components/LineChart/useLineChartStyles.styles.js +1 -2
  149. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +52 -0
  150. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -0
  151. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  152. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  153. package/lib/components/ResponsiveContainer/index.js.map +1 -1
  154. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +1 -2
  155. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +28 -0
  156. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -0
  157. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  158. package/lib/components/SankeyChart/SankeyChart.js +5 -1
  159. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  160. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  161. package/lib/components/SankeyChart/index.js.map +1 -1
  162. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +1 -2
  163. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +77 -0
  164. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -0
  165. package/lib/components/ScatterChart/ScatterChart.js +19 -5
  166. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  167. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  168. package/lib/components/ScatterChart/index.js.map +1 -1
  169. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +1 -2
  170. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +43 -0
  171. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -0
  172. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  173. package/lib/components/Sparkline/Sparkline.types.js.map +1 -1
  174. package/lib/components/Sparkline/index.js.map +1 -1
  175. package/lib/components/Sparkline/useSparklineStyles.styles.js +1 -2
  176. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js +30 -0
  177. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -0
  178. package/lib/components/VerticalBarChart/VerticalBarChart.js +71 -31
  179. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  180. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  181. package/lib/components/VerticalBarChart/index.js.map +1 -1
  182. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +1 -2
  183. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +58 -0
  184. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -0
  185. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +26 -12
  186. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  187. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  188. package/lib/components/VerticalStackedBarChart/index.js.map +1 -1
  189. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +1 -2
  190. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +49 -0
  191. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -0
  192. package/lib/index.js +2 -0
  193. package/lib/index.js.map +1 -1
  194. package/lib/types/DataPoint.js +3 -1
  195. package/lib/types/DataPoint.js.map +1 -1
  196. package/lib/types/EventAnnotation.js.map +1 -1
  197. package/lib/types/LegendDataItem.js.map +1 -1
  198. package/lib/types/index.js.map +1 -1
  199. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  200. package/lib/utilities/KeyCodes.js.map +1 -1
  201. package/lib/utilities/SVGTooltipText.js +2 -0
  202. package/lib/utilities/SVGTooltipText.js.map +1 -1
  203. package/lib/utilities/async-utils.js.map +1 -1
  204. package/lib/utilities/colors.js +12 -0
  205. package/lib/utilities/colors.js.map +1 -1
  206. package/lib/utilities/getWindow.js.map +1 -1
  207. package/lib/utilities/image-export-utils.js +256 -0
  208. package/lib/utilities/image-export-utils.js.map +1 -0
  209. package/lib/utilities/index.js.map +1 -1
  210. package/lib/utilities/overflow-utils.js.map +1 -1
  211. package/lib/utilities/string.js.map +1 -1
  212. package/lib/utilities/test-data.js +236 -0
  213. package/lib/utilities/test-data.js.map +1 -1
  214. package/lib/utilities/utilities.js +140 -27
  215. package/lib/utilities/utilities.js.map +1 -1
  216. package/lib/utilities/vbc-utils.js +2 -2
  217. package/lib/utilities/vbc-utils.js.map +1 -1
  218. package/lib-commonjs/AreaChart.js.map +1 -1
  219. package/lib-commonjs/CartesianChart.js.map +1 -1
  220. package/lib-commonjs/DeclarativeChart.js.map +1 -1
  221. package/lib-commonjs/DonutChart.js.map +1 -1
  222. package/lib-commonjs/FunnelChart.js +6 -0
  223. package/lib-commonjs/FunnelChart.js.map +1 -0
  224. package/lib-commonjs/GanttChart.js +6 -0
  225. package/lib-commonjs/GanttChart.js.map +1 -0
  226. package/lib-commonjs/GaugeChart.js.map +1 -1
  227. package/lib-commonjs/GroupedVerticalBarChart.js.map +1 -1
  228. package/lib-commonjs/HeatMapChart.js.map +1 -1
  229. package/lib-commonjs/HorizontalBarChart.js.map +1 -1
  230. package/lib-commonjs/HorizontalBarChartWithAxis.js.map +1 -1
  231. package/lib-commonjs/Legends.js.map +1 -1
  232. package/lib-commonjs/LineChart.js.map +1 -1
  233. package/lib-commonjs/Popover.js.map +1 -1
  234. package/lib-commonjs/ResponsiveContainer.js.map +1 -1
  235. package/lib-commonjs/SankeyChart.js.map +1 -1
  236. package/lib-commonjs/ScatterChart.js.map +1 -1
  237. package/lib-commonjs/Sparkline.js.map +1 -1
  238. package/lib-commonjs/VerticalBarChart.js.map +1 -1
  239. package/lib-commonjs/VerticalStackedBarChart.js.map +1 -1
  240. package/lib-commonjs/components/AreaChart/AreaChart.js +23 -7
  241. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  242. package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +1 -1
  243. package/lib-commonjs/components/AreaChart/index.js.map +1 -1
  244. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +1 -1
  245. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  246. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +57 -0
  247. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -0
  248. package/lib-commonjs/components/CommonComponents/CartesianChart.js +11 -7
  249. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  250. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  251. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
  252. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +1 -1
  253. package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
  254. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +1 -1
  255. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  256. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +142 -0
  257. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -0
  258. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +1 -1
  259. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  260. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +140 -0
  261. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -0
  262. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +14 -6
  263. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  264. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +47 -13
  265. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  266. package/lib-commonjs/components/DeclarativeChart/imageExporter.js +1 -0
  267. package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -1
  268. package/lib-commonjs/components/DeclarativeChart/index.js.map +1 -1
  269. package/lib-commonjs/components/DonutChart/Arc/Arc.js +5 -5
  270. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  271. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -1
  272. package/lib-commonjs/components/DonutChart/Arc/index.js.map +1 -1
  273. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +1 -1
  274. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  275. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +58 -0
  276. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -0
  277. package/lib-commonjs/components/DonutChart/DonutChart.js +17 -3
  278. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  279. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  280. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  281. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -1
  282. package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -1
  283. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +1 -1
  284. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
  285. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js +43 -0
  286. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -0
  287. package/lib-commonjs/components/DonutChart/index.js.map +1 -1
  288. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +1 -1
  289. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  290. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +59 -0
  291. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -0
  292. package/lib-commonjs/components/FunnelChart/FunnelChart.js +411 -0
  293. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -0
  294. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js +6 -0
  295. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -0
  296. package/lib-commonjs/components/FunnelChart/funnelGeometry.js +248 -0
  297. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -0
  298. package/lib-commonjs/components/FunnelChart/index.js +7 -0
  299. package/lib-commonjs/components/FunnelChart/index.js.map +1 -0
  300. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +79 -0
  301. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -0
  302. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +65 -0
  303. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -0
  304. package/lib-commonjs/components/GanttChart/GanttChart.js +558 -0
  305. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -0
  306. package/lib-commonjs/components/GanttChart/GanttChart.types.js +7 -0
  307. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -0
  308. package/lib-commonjs/components/GanttChart/index.js +7 -0
  309. package/lib-commonjs/components/GanttChart/index.js.map +1 -0
  310. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +39 -0
  311. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +1 -0
  312. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +39 -0
  313. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -0
  314. package/lib-commonjs/components/GaugeChart/GaugeChart.js +9 -2
  315. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  316. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  317. package/lib-commonjs/components/GaugeChart/index.js.map +1 -1
  318. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +1 -1
  319. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  320. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +160 -0
  321. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -0
  322. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +77 -60
  323. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  324. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  325. package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +1 -1
  326. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +1 -1
  327. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  328. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +69 -0
  329. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -0
  330. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +10 -2
  331. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  332. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  333. package/lib-commonjs/components/HeatMapChart/index.js.map +1 -1
  334. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +1 -1
  335. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  336. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +56 -0
  337. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -0
  338. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +23 -26
  339. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  340. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +3 -3
  341. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  342. package/lib-commonjs/components/HorizontalBarChart/index.js.map +1 -1
  343. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +1 -1
  344. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  345. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +134 -0
  346. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -0
  347. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +18 -5
  348. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  349. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  350. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  351. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +1 -1
  352. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  353. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +55 -0
  354. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -0
  355. package/lib-commonjs/components/Legends/Legends.js +28 -10
  356. package/lib-commonjs/components/Legends/Legends.js.map +1 -1
  357. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  358. package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -1
  359. package/lib-commonjs/components/Legends/index.js.map +1 -1
  360. package/lib-commonjs/components/Legends/shape.js +2 -2
  361. package/lib-commonjs/components/Legends/shape.js.map +1 -1
  362. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +101 -28
  363. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
  364. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +174 -0
  365. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -0
  366. package/lib-commonjs/components/LineChart/LineChart.js +23 -9
  367. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  368. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  369. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  370. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  371. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +2 -1
  372. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  373. package/lib-commonjs/components/LineChart/index.js.map +1 -1
  374. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +1 -1
  375. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  376. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +66 -0
  377. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -0
  378. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  379. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  380. package/lib-commonjs/components/ResponsiveContainer/index.js.map +1 -1
  381. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +1 -1
  382. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -1
  383. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +46 -0
  384. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -0
  385. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  386. package/lib-commonjs/components/SankeyChart/SankeyChart.js +5 -1
  387. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  388. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  389. package/lib-commonjs/components/SankeyChart/index.js.map +1 -1
  390. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +1 -1
  391. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  392. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +95 -0
  393. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -0
  394. package/lib-commonjs/components/ScatterChart/ScatterChart.js +18 -4
  395. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  396. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  397. package/lib-commonjs/components/ScatterChart/index.js.map +1 -1
  398. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +1 -1
  399. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  400. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +57 -0
  401. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -0
  402. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
  403. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -1
  404. package/lib-commonjs/components/Sparkline/index.js.map +1 -1
  405. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +1 -1
  406. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +1 -1
  407. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js +44 -0
  408. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -0
  409. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +71 -31
  410. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  411. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  412. package/lib-commonjs/components/VerticalBarChart/index.js.map +1 -1
  413. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +1 -1
  414. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  415. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +74 -0
  416. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -0
  417. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +26 -12
  418. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  419. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  420. package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +1 -1
  421. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +1 -1
  422. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  423. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +67 -0
  424. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -0
  425. package/lib-commonjs/index.js +2 -0
  426. package/lib-commonjs/index.js.map +1 -1
  427. package/lib-commonjs/types/DataPoint.js +3 -1
  428. package/lib-commonjs/types/DataPoint.js.map +1 -1
  429. package/lib-commonjs/types/EventAnnotation.js.map +1 -1
  430. package/lib-commonjs/types/LegendDataItem.js.map +1 -1
  431. package/lib-commonjs/types/index.js.map +1 -1
  432. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  433. package/lib-commonjs/utilities/KeyCodes.js.map +1 -1
  434. package/lib-commonjs/utilities/SVGTooltipText.js +2 -0
  435. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  436. package/lib-commonjs/utilities/async-utils.js.map +1 -1
  437. package/lib-commonjs/utilities/colors.js +18 -0
  438. package/lib-commonjs/utilities/colors.js.map +1 -1
  439. package/lib-commonjs/utilities/getWindow.js.map +1 -1
  440. package/lib-commonjs/utilities/image-export-utils.js +274 -0
  441. package/lib-commonjs/utilities/image-export-utils.js.map +1 -0
  442. package/lib-commonjs/utilities/index.js.map +1 -1
  443. package/lib-commonjs/utilities/overflow-utils.js.map +1 -1
  444. package/lib-commonjs/utilities/string.js.map +1 -1
  445. package/lib-commonjs/utilities/test-data.js +245 -0
  446. package/lib-commonjs/utilities/test-data.js.map +1 -1
  447. package/lib-commonjs/utilities/utilities.js +142 -22
  448. package/lib-commonjs/utilities/utilities.js.map +1 -1
  449. package/lib-commonjs/utilities/vbc-utils.js +2 -2
  450. package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
  451. package/package.json +12 -22
@@ -18,14 +18,15 @@ const _reactutilities = require("@fluentui/react-utilities");
18
18
  const _reacttheme = require("@fluentui/react-theme");
19
19
  const _index = require("../../index");
20
20
  const _index1 = require("../../utilities/index");
21
+ const _imageexportutils = require("../../utilities/image-export-utils");
21
22
  const barGapMultiplier = 0.2;
22
23
  const barGapMin = 1;
23
24
  const MIN_DOMAIN_MARGIN = 8;
24
- var CircleVisbility;
25
- (function(CircleVisbility) {
25
+ var CircleVisbility = /*#__PURE__*/ function(CircleVisbility) {
26
26
  CircleVisbility["show"] = "visibility";
27
27
  CircleVisbility["hide"] = "hidden";
28
- })(CircleVisbility || (CircleVisbility = {}));
28
+ return CircleVisbility;
29
+ }(CircleVisbility || {});
29
30
  const VerticalStackedBarChart = (props)=>{
30
31
  var _props_legendProps;
31
32
  const _isRtl = (0, _index1.useRtl)();
@@ -49,6 +50,7 @@ const VerticalStackedBarChart = (props)=>{
49
50
  let _xAxisOuterPadding = 0;
50
51
  const cartesianChartRef = _react.useRef(null);
51
52
  const Y_ORIGIN = 0;
53
+ const _legendsRef = _react.useRef(null);
52
54
  const [selectedLegends, setSelectedLegends] = _react.useState(((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends) || []);
53
55
  const [activeLegend, setActiveLegend] = _react.useState(undefined);
54
56
  const [dataForHoverCard, setDataForHoverCard] = _react.useState(0);
@@ -89,7 +91,11 @@ const VerticalStackedBarChart = (props)=>{
89
91
  var _cartesianChartRef_current;
90
92
  var _cartesianChartRef_current_chartContainer;
91
93
  return {
92
- chartContainer: (_cartesianChartRef_current_chartContainer = (_cartesianChartRef_current = cartesianChartRef.current) === null || _cartesianChartRef_current === void 0 ? void 0 : _cartesianChartRef_current.chartContainer) !== null && _cartesianChartRef_current_chartContainer !== void 0 ? _cartesianChartRef_current_chartContainer : null
94
+ chartContainer: (_cartesianChartRef_current_chartContainer = (_cartesianChartRef_current = cartesianChartRef.current) === null || _cartesianChartRef_current === void 0 ? void 0 : _cartesianChartRef_current.chartContainer) !== null && _cartesianChartRef_current_chartContainer !== void 0 ? _cartesianChartRef_current_chartContainer : null,
95
+ toImage: (opts)=>{
96
+ var _cartesianChartRef_current, _legendsRef_current;
97
+ return (0, _imageexportutils.toImage)((_cartesianChartRef_current = cartesianChartRef.current) === null || _cartesianChartRef_current === void 0 ? void 0 : _cartesianChartRef_current.chartContainer, (_legendsRef_current = _legendsRef.current) === null || _legendsRef_current === void 0 ? void 0 : _legendsRef_current.toSVG, _isRtl, opts);
98
+ }
93
99
  };
94
100
  }, []);
95
101
  function _getLegendData(data, lineLegends) {
@@ -146,7 +152,8 @@ const VerticalStackedBarChart = (props)=>{
146
152
  enabledWrapLines: props.enabledLegendsWrapLines,
147
153
  overflowText: props.legendsOverflowText,
148
154
  ...props.legendProps,
149
- onChange: _onLegendSelectionChange
155
+ onChange: _onLegendSelectionChange,
156
+ legendRef: _legendsRef
150
157
  });
151
158
  }
152
159
  function _getHighlightedLegend() {
@@ -232,7 +239,7 @@ const VerticalStackedBarChart = (props)=>{
232
239
  _colors = defaultColors;
233
240
  _xAxisType = (0, _index1.getTypeOfAxis)(props.data[0].xAxisPoint, true);
234
241
  _lineObject = _getFormattedLineData(props.data);
235
- _xAxisInnerPadding = (0, _index1.getScalePadding)(props.xAxisInnerPadding, props.xAxisPadding, 2 / 3);
242
+ _xAxisInnerPadding = (0, _index1.getScalePadding)(props.xAxisInnerPadding, props.xAxisPadding, _xAxisType === _index1.XAxisTypes.StringAxis ? 2 / 3 : 1 / 2);
236
243
  _xAxisOuterPadding = (0, _index1.getScalePadding)(props.xAxisOuterPadding, props.xAxisPadding, 0);
237
244
  }
238
245
  function _createDataSetLayer() {
@@ -607,10 +614,13 @@ const VerticalStackedBarChart = (props)=>{
607
614
  ] : [
608
615
  xMin,
609
616
  xMax
610
- ]).nice().range([
617
+ ]).range([
611
618
  _margins.left + _domainMargin,
612
619
  containerWidth - _margins.right - _domainMargin
613
620
  ]);
621
+ if (!(0, _index1.isScalePaddingDefined)(props.xAxisInnerPadding, props.xAxisPadding)) {
622
+ xBarScale.nice();
623
+ }
614
624
  return {
615
625
  xBarScale,
616
626
  yBarScale
@@ -692,16 +702,19 @@ const VerticalStackedBarChart = (props)=>{
692
702
  const barWidth = (0, _index1.getBarWidth)(props.barWidth, props.maxBarWidth, bandwidth);
693
703
  let reqWidth = (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate) * barWidth;
694
704
  const margin1 = (totalWidth - reqWidth) / 2;
695
- // Calculate the remaining width after accounting for the space required to render x-axis labels
696
- const step = (0, _index1.calculateLongestLabelWidth)(_xAxisLabels) + 20;
697
- reqWidth = (_xAxisLabels.length - _xAxisInnerPadding) * step;
698
- const margin2 = (totalWidth - reqWidth) / 2;
705
+ let margin2 = Number.POSITIVE_INFINITY;
706
+ if (!props.hideTickOverlap) {
707
+ // Calculate the remaining width after accounting for the space required to render x-axis labels
708
+ const step = (0, _index1.calculateLongestLabelWidth)(_xAxisLabels) + 20;
709
+ reqWidth = (_xAxisLabels.length - _xAxisInnerPadding) * step;
710
+ margin2 = (totalWidth - reqWidth) / 2;
711
+ }
699
712
  _domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));
700
713
  }
701
714
  } else {
702
715
  var _props_data;
703
716
  const data = ((_props_data = props.data) === null || _props_data === void 0 ? void 0 : _props_data.map((point)=>point.xAxisPoint)) || [];
704
- _barWidth = (0, _index1.getBarWidth)(props.barWidth, props.maxBarWidth, (0, _index1.calculateAppropriateBarWidth)(data, totalWidth));
717
+ _barWidth = (0, _index1.getBarWidth)(props.barWidth, props.maxBarWidth, (0, _index1.calculateAppropriateBarWidth)(data, totalWidth, _xAxisInnerPadding));
705
718
  _domainMargin = MIN_DOMAIN_MARGIN + _barWidth / 2;
706
719
  }
707
720
  return {
@@ -953,6 +966,7 @@ const VerticalStackedBarChart = (props)=>{
953
966
  xAxisOuterPadding: _xAxisOuterPadding
954
967
  },
955
968
  componentRef: cartesianChartRef,
969
+ showRoundOffXTickValues: !(0, _index1.isScalePaddingDefined)(props.xAxisInnerPadding, props.xAxisPadding),
956
970
  /* eslint-disable react/jsx-no-bind */ children: (props)=>{
957
971
  return /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement("g", null, _bars), /*#__PURE__*/ _react.createElement("g", null, _isHavingLines && _createLines(props.xScale, props.yScalePrimary, props.containerHeight, props.containerWidth, props.yScaleSecondary)));
958
972
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["VerticalStackedBarChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select } from 'd3-selection';\nimport { useVerticalStackedBarChartStyles } from './useVerticalStackedBarChartStyles.styles';\nimport {\n scaleLinear as d3ScaleLinear,\n ScaleLinear as D3ScaleLinear,\n scaleBand as d3ScaleBand,\n scaleUtc as d3ScaleUtc,\n scaleTime as d3ScaleTime,\n} from 'd3-scale';\nimport { useId } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport {\n AccessibilityProps,\n CartesianChart,\n ChildProps,\n VerticalStackedBarDataPoint,\n Margins,\n VerticalStackedBarChartProps,\n VerticalStackedChartProps,\n VSChartDataPoint,\n LineDataInVerticalStackedBarChart,\n ModifiedCartesianChartProps,\n Legend,\n ChartPopover,\n Legends,\n Chart,\n DataPoint,\n} from '../../index';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n getTypeOfAxis,\n tooltipOfAxislabels,\n formatScientificLimitWidth,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n calculateAppropriateBarWidth,\n formatDate,\n areArraysEqual,\n calculateLongestLabelWidth,\n useRtl,\n DataVizPalette,\n getColorFromToken,\n findVSBCNumericMinMaxOfY,\n YAxisType,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfDateForAreaLineVerticalBarChart,\n domainRangeOfVSBCNumeric,\n domainRangeOfXStringAxis,\n createStringYAxis,\n} from '../../utilities/index';\n\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\ntype NumericScale = D3ScaleLinear<number, number>;\nconst barGapMultiplier = 0.2;\nconst barGapMin = 1;\nconst MIN_DOMAIN_MARGIN = 8;\n\ninterface RefArrayData {\n refElement?: SVGGElement | null;\n}\n\ntype LinePoint = LineDataInVerticalStackedBarChart & { index: number; xItem: VerticalStackedChartProps };\ntype LineObject = { [key: string]: LinePoint[] };\ntype LineLegends = {\n title: string;\n color: string;\n};\nenum CircleVisbility {\n show = 'visibility',\n hide = 'hidden',\n}\ntype CalloutAnchorPointData = {\n xAxisDataPoint: string;\n chartDataPoint: VSChartDataPoint;\n};\n\nexport const VerticalStackedBarChart: React.FunctionComponent<VerticalStackedBarChartProps> = props => {\n const _isRtl: boolean = useRtl();\n const _createLegendsForLine: (data: VerticalStackedChartProps[]) => LineLegends[] = (\n data: VerticalStackedChartProps[],\n ) => _getLineLegends(data);\n const _tooltipId: string = useId('VSBCTooltipId_');\n const _emptyChartId: string = useId('_VSBC_empty');\n let _points: VerticalStackedChartProps[] = [];\n let _dataset: VerticalStackedBarDataPoint[];\n let _xAxisLabels: string[] = [];\n let _bars: JSX.Element[];\n let _xAxisType: XAxisTypes =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data[0]!.xAxisPoint, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\n let _barWidth: number = 0;\n let _colors: string[];\n let _margins: Margins;\n let _lineObject: LineObject;\n let _yMax: number;\n let _yMin: number;\n let _calloutAnchorPoint: CalloutAnchorPointData | null;\n let _domainMargin: number = MIN_DOMAIN_MARGIN;\n let _xAxisInnerPadding: number = 0;\n let _xAxisOuterPadding: number = 0;\n const cartesianChartRef = React.useRef<Chart>(null);\n const Y_ORIGIN: number = 0;\n\n const [selectedLegends, setSelectedLegends] = React.useState(props.legendProps?.selectedLegends || []);\n const [activeLegend, setActiveLegend] = React.useState<string | undefined>(undefined);\n const [dataForHoverCard, setDataForHoverCard] = React.useState(0);\n const [color, setColor] = React.useState('');\n const [hoverXValue, setHoverXValue] = React.useState<string | number>('');\n const [YValueHover, setYValueHover] = React.useState<(LineDataInVerticalStackedBarChart | VSChartDataPoint)[]>([]);\n const [xCalloutValue, setXCalloutValue] = React.useState('');\n const [yCalloutValue, setYCalloutValue] = React.useState('');\n const [activeXAxisDataPoint, setActiveXAxisDataPoint] = React.useState<number | string | Date>('');\n const [calloutLegend, setCalloutLegend] = React.useState('');\n const [stackCalloutProps, setStackCalloutProps] = React.useState<VerticalStackedChartProps>();\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<VSChartDataPoint>();\n const [callOutAccessibilityData, setCallOutAccessibilityData] = React.useState<AccessibilityProps>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n const prevPropsRef = React.useRef<VerticalStackedBarChartProps | null>(null);\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 || prevProps.data !== props.data) {\n _adjustProps();\n _dataset = _createDataSetLayer();\n }\n }\n prevPropsRef.current = props;\n }, [props]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n }),\n [],\n );\n\n function _getLegendData(data: VerticalStackedChartProps[], lineLegends: LineLegends[]): JSX.Element {\n if (props.hideLegend) {\n return <></>;\n }\n const defaultPalette: string[] = [\n getColorFromToken(DataVizPalette.color6),\n getColorFromToken(DataVizPalette.color1),\n getColorFromToken(DataVizPalette.color5),\n getColorFromToken(DataVizPalette.color7),\n getColorFromToken(DataVizPalette.color10),\n ];\n const actions: Legend[] = [];\n const { allowHoverOnLegend = true } = props;\n\n data.forEach((singleChartData: VerticalStackedChartProps) => {\n singleChartData.chartData.forEach((point: VSChartDataPoint) => {\n const color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n const checkSimilarLegends = actions.filter((leg: Legend) => leg.title === point.legend && leg.color === color);\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n\n const legend: Legend = {\n title: point.legend,\n color,\n hoverAction: allowHoverOnLegend\n ? () => {\n _handleChartMouseLeave();\n _onLegendHover(point.legend);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => _onLegendLeave() : undefined,\n };\n\n actions.push(legend);\n });\n });\n const legendsOfLine: Legend[] = [];\n if (lineLegends && lineLegends.length > 0) {\n lineLegends.forEach((point: LineLegends) => {\n const legend: Legend = {\n title: point.title,\n color: point.color,\n isLineLegendInBarChart: true,\n hoverAction: allowHoverOnLegend\n ? () => {\n _handleChartMouseLeave();\n _onLegendHover(point.title);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => _onLegendLeave() : undefined,\n };\n legendsOfLine.push(legend);\n });\n }\n const totalLegends: Legend[] = legendsOfLine.concat(actions);\n return (\n <Legends\n legends={totalLegends}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n onChange={_onLegendSelectionChange}\n />\n );\n }\n\n function _getHighlightedLegend() {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n }\n\n function _lineHoverOut() {\n setPopoverOpen(false);\n setXCalloutValue('');\n setYCalloutValue('');\n setActiveXAxisDataPoint('');\n setColor('');\n }\n\n function _lineHoverFocus(lineData: LinePoint) {\n setPopoverOpen(true);\n setXCalloutValue(`${lineData.xItem.xAxisPoint}`);\n setYCalloutValue(`${lineData.yAxisCalloutData || lineData.data || lineData.y}`);\n setActiveXAxisDataPoint(lineData.xItem.xAxisPoint);\n setColor(lineData.color);\n }\n\n function _onStackHoverFocus(\n stack: VerticalStackedChartProps,\n mouseEvent: React.MouseEvent<SVGElement> | SVGGElement,\n ): void {\n let clientX = 0;\n let clientY = 0;\n if ('clientX' in mouseEvent) {\n clientX = mouseEvent.clientX;\n clientY = mouseEvent.clientY;\n } else {\n // Handle case where mouseEvent is an SVGGElement\n const boundingRect = mouseEvent.getBoundingClientRect();\n clientX = boundingRect.left + boundingRect.width / 2;\n clientY = boundingRect.top + boundingRect.height / 2;\n }\n if (!_noLegendHighlighted()) {\n stack = {\n ...stack,\n chartData: stack.chartData.filter((dataPoint: { legend: any }) => _isLegendHighlighted(dataPoint.legend)),\n lineData: stack.lineData?.filter((dataPoint: { legend: any }) => _isLegendHighlighted(dataPoint.legend)),\n };\n }\n const lineData = stack.lineData;\n const isLinesPresent: boolean = lineData !== undefined && lineData.length > 0;\n if (isLinesPresent) {\n lineData!.forEach((item: LineDataInVerticalStackedBarChart & { shouldDrawBorderBottom?: boolean }) => {\n item.data = item.data || item.y;\n item.shouldDrawBorderBottom = true;\n });\n }\n _updatePosition(clientX, clientY);\n setPopoverOpen(stack.chartData.length > 0 || (stack.lineData?.length ?? 0) > 0);\n setYValueHover(\n isLinesPresent\n ? [...lineData!.sort((a, b) => (a.data! < b.data! ? 1 : -1)), ...stack.chartData.slice().reverse()]\n : stack.chartData.slice().reverse(),\n );\n setHoverXValue(stack.xAxisPoint instanceof Date ? formatDate(stack.xAxisPoint, props.useUTC) : stack.xAxisPoint);\n setStackCalloutProps(stack);\n setActiveXAxisDataPoint(stack.xAxisPoint);\n setCallOutAccessibilityData(stack.stackCallOutAccessibilityData);\n }\n\n function _handleChartMouseLeave(): void {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n setActiveXAxisDataPoint('');\n }\n\n const _onClick = (\n data: VerticalStackedChartProps | VSChartDataPoint,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void => {\n props.onBarClick?.(mouseEvent, data);\n props.href ? (window.location.href = props.href) : '';\n };\n\n function _adjustProps(): void {\n _points = props.data || [];\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n const defaultColors: string[] = [\n getColorFromToken(DataVizPalette.color6),\n getColorFromToken(DataVizPalette.color1),\n getColorFromToken(DataVizPalette.color5),\n getColorFromToken(DataVizPalette.color7),\n getColorFromToken(DataVizPalette.color10),\n ];\n _colors = defaultColors;\n _xAxisType = getTypeOfAxis(props.data[0].xAxisPoint, true) as XAxisTypes;\n _lineObject = _getFormattedLineData(props.data);\n _xAxisInnerPadding = getScalePadding(props.xAxisInnerPadding, props.xAxisPadding, 2 / 3);\n _xAxisOuterPadding = getScalePadding(props.xAxisOuterPadding, props.xAxisPadding, 0);\n }\n\n function _createDataSetLayer(): VerticalStackedBarDataPoint[] {\n const tempArr: string[] = [];\n const dataset: VerticalStackedBarDataPoint[] = _points.map(singlePointData => {\n let total: number = 0;\n singlePointData.chartData!.forEach((point: VSChartDataPoint) => {\n total = total + point.data;\n });\n tempArr.push(singlePointData.xAxisPoint as string);\n return {\n x: singlePointData.xAxisPoint,\n y: total,\n };\n });\n _xAxisLabels = tempArr;\n return dataset;\n }\n\n function _onLegendHover(legendTitle: string): void {\n setActiveLegend(legendTitle);\n }\n\n function _onLegendLeave(): void {\n setActiveLegend(undefined);\n }\n\n function _onLegendSelectionChange(\n _selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(_selectedLegends);\n } else {\n setSelectedLegends(_selectedLegends.slice(-1));\n }\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(_selectedLegends, event, currentLegend);\n }\n }\n\n function _getMargins(margins: Margins) {\n _margins = margins;\n }\n\n function _getGraphData(\n xScale: any,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) {\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);\n return (_bars = _createBar(xBarScale, yBarScale, containerHeight, xElement!));\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 || Y_ORIGIN);\n _yMin = Math.min(domainValue[0], props.yMinValue || Y_ORIGIN);\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 _isLegendHighlighted(legendTitle: string) {\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() {\n return _getHighlightedLegend().length === 0;\n }\n\n function _getAriaLabel(singleChartData: VerticalStackedChartProps, point?: VSChartDataPoint): string {\n if (!point) {\n /** if shouldFocusWholeStack is true */\n const xValue =\n singleChartData.xAxisCalloutData ||\n (singleChartData.xAxisPoint instanceof Date\n ? formatDate(singleChartData.xAxisPoint)\n : singleChartData.xAxisPoint);\n const pointValues = singleChartData.chartData\n .map(pt => {\n const legend = pt.legend;\n const yValue = pt.yAxisCalloutData || pt.data;\n return `${legend}, ${yValue}.`;\n })\n .join(' ');\n const lineValues = singleChartData.lineData\n ?.map(ln => {\n const legend = ln.legend;\n const yValue = ln.yAxisCalloutData || ln.data || ln.y;\n return `${legend}, ${yValue}.`;\n })\n .join(' ');\n return (\n singleChartData.stackCallOutAccessibilityData?.ariaLabel ||\n `${xValue}. ${pointValues}` + (lineValues ? ` ${lineValues}` : '')\n );\n }\n /** if shouldFocusWholeStack is false */\n const xValue =\n singleChartData.xAxisCalloutData ||\n point.xAxisCalloutData ||\n (singleChartData.xAxisPoint instanceof Date\n ? formatDate(singleChartData.xAxisPoint)\n : singleChartData.xAxisPoint);\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.data;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n function _getCustomizedCallout() {\n const _isHavingLines = props.data.some(\n (item: VerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n return props.onRenderCalloutPerStack\n ? props.onRenderCalloutPerStack(stackCalloutProps)\n : props.onRenderCalloutPerDataPoint && !_isHavingLines\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps, _renderCallout)\n : null;\n }\n\n function _toFocusWholeStack(_isHavingLines: boolean): boolean {\n const { isCalloutForStack = false } = props;\n let shouldFocusStackOnly: boolean = false;\n if (_isHavingLines) {\n if (_getHighlightedLegend().length === 1) {\n shouldFocusStackOnly = false;\n } else {\n shouldFocusStackOnly = true;\n }\n } else {\n shouldFocusStackOnly = isCalloutForStack;\n }\n return shouldFocusStackOnly;\n }\n\n function _getDomainNRangeValues(\n points: DataPoint[],\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfVSBCNumeric(points, margins, width, isRTL, barWidth!);\n } else if (xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = domainRangeOfDateForAreaLineVerticalBarChart(\n points,\n margins,\n width,\n isRTL,\n tickValues! as Date[],\n chartType,\n barWidth,\n );\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\n }\n\n function _getFormattedLineData(data: VerticalStackedChartProps[]): LineObject {\n const linesData: LinePoint[] = [];\n const formattedLineData: LineObject = {};\n data.forEach((item: VerticalStackedChartProps, index: number) => {\n if (item.lineData) {\n item.lineData.forEach((line: any) => {\n linesData.push({\n ...line,\n index,\n xItem: item,\n });\n });\n }\n });\n linesData.forEach(item => {\n if (formattedLineData[item.legend]) {\n formattedLineData[item.legend].push(item);\n } else {\n formattedLineData[item.legend] = [item];\n }\n });\n return formattedLineData;\n }\n\n function _getLineLegends(data: VerticalStackedChartProps[]): LineLegends[] {\n const lineObject: LineObject = _lineObject;\n const lineLegends: LineLegends[] = [];\n Object.keys(lineObject).forEach((item: string) => {\n lineLegends.push({\n title: item,\n color: lineObject[item][0].color,\n });\n });\n return lineLegends;\n }\n\n function _createLines(\n xScale: any,\n yScalePrimary: NumericScale,\n containerHeight: number,\n containerWidth: number,\n yScaleSecondary?: NumericScale,\n ): JSX.Element {\n const lineObject: LineObject = _getFormattedLineData(props.data);\n const lines: React.ReactNode[] = [];\n const borderForLines: React.ReactNode[] = [];\n const dots: React.ReactNode[] = [];\n //const { theme } = props;\n const lineBorderWidth = props.lineOptions?.lineBorderWidth\n ? Number.parseFloat(props.lineOptions!.lineBorderWidth!.toString())\n : 0;\n const xScaleBandwidthTranslate = _xAxisType !== XAxisTypes.StringAxis ? 0 : xScale.bandwidth() / 2;\n Object.keys(lineObject).forEach((item: string, index: number) => {\n const shouldHighlight = _isLegendHighlighted(item) || _noLegendHighlighted();\n for (let i = 1; i < lineObject[item].length; i++) {\n const x1 = xScale(lineObject[item][i - 1].xItem.xAxisPoint);\n const useSecondaryYScale =\n lineObject[item][i - 1].useSecondaryYScale && lineObject[item][i].useSecondaryYScale && yScaleSecondary;\n const y1 = useSecondaryYScale\n ? yScaleSecondary!(lineObject[item][i - 1].y)\n : yScalePrimary(lineObject[item][i - 1].y);\n const x2 = xScale(lineObject[item][i].xItem.xAxisPoint);\n const y2 = useSecondaryYScale ? yScaleSecondary!(lineObject[item][i].y) : yScalePrimary(lineObject[item][i].y);\n if (lineBorderWidth > 0) {\n borderForLines.push(\n <line\n key={`${index}-${i}-BorderLine`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={3 + lineBorderWidth * 2}\n fill=\"transparent\"\n strokeLinecap=\"round\"\n stroke={tokens.colorNeutralBackground1}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />,\n );\n }\n lines.push(\n <line\n key={`${index}-${i}-line`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={lineObject[item][0].lineOptions?.strokeWidth ?? 3}\n strokeLinecap={lineObject[item][0].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={lineObject[item][0].lineOptions?.strokeDasharray}\n stroke={lineObject[item][i].color}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n {...(_isLegendHighlighted(item) && {\n onMouseOver: _lineHover.bind(lineObject[item][i - 1]),\n onMouseLeave: _lineHoverOut,\n })}\n />,\n );\n }\n });\n Object.keys(lineObject).forEach((item: string, index: number) => {\n lineObject[item].forEach((circlePoint: LinePoint, subIndex: number) => {\n const circleRef: { refElement: SVGCircleElement | null } = { refElement: null };\n const noBarsAndLinesActive =\n circlePoint.xItem.chartData.filter(\n dataPoint => _noLegendHighlighted() || _isLegendHighlighted(dataPoint.legend),\n ).length === 0;\n dots.push(\n <circle\n key={`${index}-${subIndex}-dot`}\n cx={xScale(circlePoint.xItem.xAxisPoint)}\n cy={\n circlePoint.useSecondaryYScale && yScaleSecondary\n ? yScaleSecondary(circlePoint.y)\n : yScalePrimary(circlePoint.y)\n }\n onMouseOver={\n _isLegendHighlighted(item)\n ? (event: React.MouseEvent<SVGElement, MouseEvent>) => _lineHover(circlePoint, event)\n : (event: React.MouseEvent<SVGElement, MouseEvent>) => _onStackHover(circlePoint.xItem, event)\n }\n {...(_isLegendHighlighted(item) && {\n onMouseLeave: _lineHoverOut,\n })}\n r={_getCircleVisibilityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).radius}\n stroke={circlePoint.color}\n fill={tokens.colorNeutralBackground1}\n strokeWidth={3}\n visibility={_getCircleVisibilityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).visibility}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n ref={e => (circleRef.refElement = e)}\n {...(noBarsAndLinesActive\n ? {\n tabIndex: !props.hideTooltip ? 0 : undefined,\n onFocus: event => _lineFocus(event, circlePoint, circleRef),\n onBlur: _handleMouseOut,\n role: 'img',\n 'aria-label': _getAriaLabel(circlePoint.xItem, circlePoint as VSChartDataPoint),\n }\n : {})}\n />,\n );\n });\n });\n return (\n <>\n {borderForLines}\n {lines}\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 === activeXAxisDataPoint && _isLegendHighlighted(legend)) {\n return { visibility: CircleVisbility.show, radius: 8 };\n } else if (_isLegendHighlighted(legend)) {\n return { visibility: CircleVisbility.show, radius: 0.3 };\n } else {\n return { visibility: CircleVisbility.hide, radius: 0 };\n }\n } else {\n return {\n visibility: activeXAxisDataPoint === xAxisPoint ? CircleVisbility.show : CircleVisbility.hide,\n radius: 8,\n };\n }\n }\n\n function _renderCallout(props?: VSChartDataPoint): JSX.Element | null {\n return props ? (\n <ChartPopover\n culture={props.culture ?? 'en-us'}\n XValue={props.xAxisCalloutData}\n xCalloutValue={xCalloutValue}\n yCalloutValue={yCalloutValue}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n legend={props.legend}\n YValue={props.yAxisCalloutData}\n color={props.color}\n />\n ) : null;\n }\n\n function _onRectHover(\n xAxisPoint: string | number | Date,\n point: VSChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n _onRectFocusHover(xAxisPoint, point, color, mouseEvent);\n }\n\n function _onRectFocusHover(\n xAxisPoint: string | number | Date,\n point: VSChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement> | SVGGElement,\n ) {\n let clientX = 0;\n let clientY = 0;\n if ('clientX' in mouseEvent) {\n clientX = mouseEvent.clientX;\n clientY = mouseEvent.clientY;\n } else {\n // Handle case where mouseEvent is an SVGGElement\n const boundingRect = mouseEvent.getBoundingClientRect();\n clientX = boundingRect.left + boundingRect.width / 2;\n clientY = boundingRect.top + boundingRect.height / 2;\n }\n if (_calloutAnchorPoint?.chartDataPoint !== point || _calloutAnchorPoint?.xAxisDataPoint !== xAxisPoint) {\n _calloutAnchorPoint = {\n chartDataPoint: point,\n xAxisDataPoint: `${xAxisPoint}`,\n };\n _updatePosition(clientX, clientY);\n setPopoverOpen(_noLegendHighlighted() || _isLegendHighlighted(point.legend));\n setCalloutLegend(point.legend);\n setDataForHoverCard(point.data);\n setColor(color);\n setXCalloutValue(point.xAxisCalloutData ? point.xAxisCalloutData : `${xAxisPoint}`);\n setYCalloutValue(point.yAxisCalloutData!);\n setDataPointCalloutProps(point);\n setCallOutAccessibilityData(point.callOutAccessibilityData);\n }\n }\n\n function _lineHover(lineData: LinePoint, mouseEvent: React.MouseEvent<SVGElement>) {\n mouseEvent.persist();\n _lineHoverFocus(lineData);\n }\n\n function _lineFocus(\n event: React.FocusEvent<SVGCircleElement, Element>,\n lineData: LinePoint,\n ref: { refElement: SVGCircleElement | null },\n ) {\n if (ref.refElement) {\n _lineHoverFocus(lineData);\n }\n }\n\n function _onStackHover(stack: VerticalStackedChartProps, mouseEvent: React.MouseEvent<SVGElement>): void {\n mouseEvent.persist();\n _onStackHoverFocus(stack, mouseEvent);\n }\n\n function _onRectFocus(point: VSChartDataPoint, xAxisPoint: string, color: string, ref: RefArrayData): void {\n if (ref.refElement) {\n _onRectFocusHover(xAxisPoint, point, color, ref.refElement);\n }\n }\n\n function _onStackFocus(stack: VerticalStackedChartProps, groupRef: RefArrayData): void {\n if (groupRef.refElement) {\n _onStackHoverFocus(stack, groupRef.refElement);\n }\n }\n\n function _handleMouseOut(): void {\n setPopoverOpen(false);\n }\n\n function _getBarGapAndScale(\n bars: VSChartDataPoint[],\n yBarScale: NumericScale,\n defaultTotalHeight?: number,\n ): {\n readonly gapHeight: number;\n readonly heightValueScale: number;\n readonly absStackTotal: number;\n } {\n const { barGapMax = 0 } = props;\n // When displaying gaps between the bars, the height of each bar is\n // adjusted so that the total of all bars is not changed by the gaps\n const totalData = bars.reduce((iter, value) => iter + Math.abs(value.data), 0);\n const totalHeight = defaultTotalHeight ?? Math.abs(yBarScale(totalData) - yBarScale(Y_ORIGIN));\n let sumOfPercent = 0;\n bars.forEach(point => {\n let value = (Math.abs(point.data) / totalData) * 100;\n if (value < 1 && value !== 0) {\n value = 1;\n }\n sumOfPercent += value;\n });\n const scalingRatio = sumOfPercent !== 0 ? sumOfPercent / 100 : 1;\n const gaps = barGapMax && bars.length - 1;\n const gapHeight = gaps && Math.max(barGapMin, Math.min(barGapMax, (totalHeight * barGapMultiplier) / gaps));\n const heightValueScale = (totalHeight - gapHeight * gaps) / (totalData * scalingRatio);\n return {\n gapHeight,\n heightValueScale,\n absStackTotal: totalData,\n } as const;\n }\n\n function _getScales(containerHeight: number, containerWidth: number) {\n const yDomain = [Math.min(Y_ORIGIN, _yMin), Math.max(Y_ORIGIN, _yMax)];\n const yBarScale = d3ScaleLinear()\n .domain(yDomain)\n .range([0, containerHeight - _margins.bottom! - _margins.top!]);\n if (_xAxisType === XAxisTypes.NumericAxis) {\n const xMax = d3Max(_dataset, (point: VerticalStackedBarDataPoint) => point.x as number)!;\n const xMin = d3Min(_dataset, (point: VerticalStackedBarDataPoint) => point.x as number)!;\n\n const xBarScale = d3ScaleLinear()\n .domain(_isRtl ? [xMax, xMin] : [xMin, xMax])\n .nice()\n .range([_margins.left! + _domainMargin, containerWidth - _margins.right! - _domainMargin]);\n\n return { xBarScale, yBarScale };\n }\n if (_xAxisType === XAxisTypes.DateAxis) {\n const sDate = d3Min(_dataset, (point: VerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const lDate = d3Max(_dataset, (point: VerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const xBarScale = props.useUTC ? d3ScaleUtc() : d3ScaleTime();\n xBarScale\n .domain(_isRtl ? [lDate, sDate] : [sDate, lDate])\n .range([_margins.left! + _domainMargin, containerWidth - _margins.right! - _domainMargin]);\n\n return { xBarScale, yBarScale };\n }\n const xBarScale = d3ScaleBand()\n .domain(_xAxisLabels)\n .range(\n _isRtl\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 return { xBarScale, yBarScale };\n }\n\n const _isChartEmpty = (): boolean => {\n return !(\n props.data &&\n props.data.length > 0 &&\n props.data.some(item => item.chartData.length > 0 || (item.lineData && item.lineData.length > 0))\n );\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 function _getDomainMargins(containerWidth: number): Margins {\n _domainMargin = MIN_DOMAIN_MARGIN;\n\n /** Total width available to render the bars */\n const totalWidth = containerWidth - (_margins.left! + MIN_DOMAIN_MARGIN) - (_margins.right! + MIN_DOMAIN_MARGIN);\n /** Rate at which the space between the bars changes wrt the bar width */\n const barGapRate = _xAxisInnerPadding / (1 - _xAxisInnerPadding);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(props.xAxisOuterPadding, props.xAxisPadding)) {\n // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available\n // to adjust the space before the first bar and after the last bar.\n _domainMargin = 0;\n } else if (props.barWidth !== 'auto') {\n // Update the bar width so that when CartesianChart rerenders,\n // the following calculations don't use the previous bar width.\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n /** Total width required to render the bars. Directly proportional to bar width */\n const reqWidth = (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate) * _barWidth;\n\n if (totalWidth >= reqWidth) {\n // Center align the chart by setting equal left and right margins for domain\n _domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;\n }\n } else if (props.mode === 'plotly' && _xAxisLabels.length > 1) {\n // Calculate the remaining width after rendering bars at their maximum allowable width\n const bandwidth = totalWidth / (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate);\n const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, bandwidth);\n let reqWidth = (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate) * barWidth;\n const margin1 = (totalWidth - reqWidth) / 2;\n\n // Calculate the remaining width after accounting for the space required to render x-axis labels\n const step = calculateLongestLabelWidth(_xAxisLabels) + 20;\n reqWidth = (_xAxisLabels.length - _xAxisInnerPadding) * step;\n const margin2 = (totalWidth - reqWidth) / 2;\n\n _domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));\n }\n } else {\n const data = (props.data?.map(point => point.xAxisPoint) as number[] | Date[] | undefined) || [];\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, calculateAppropriateBarWidth(data, totalWidth));\n _domainMargin = MIN_DOMAIN_MARGIN + _barWidth / 2;\n }\n\n return {\n ..._margins,\n left: _margins.left! + _domainMargin,\n right: _margins.right! + _domainMargin,\n };\n }\n\n function _getChartTitle(): string {\n const { chartTitle, data } = props;\n const numLines = Object.keys(_lineObject).length;\n return (\n (chartTitle ? `${chartTitle}. ` : '') +\n `Vertical bar chart with ${data?.length || 0} stacked bars` +\n (numLines > 0 ? ` and ${numLines} lines` : '') +\n '. '\n );\n }\n\n const classes = useVerticalStackedBarChartStyles(props);\n function _createBar(\n xBarScale: any,\n yBarScale: NumericScale,\n containerHeight: number,\n xElement: SVGElement,\n ): JSX.Element[] {\n const { barCornerRadius = 0, barMinimumHeight = 0 } = props;\n const _isHavingLines = props.data.some(\n (item: VerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = _toFocusWholeStack(_isHavingLines);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, xBarScale.bandwidth());\n }\n\n const bars = _points.map((singleChartData: VerticalStackedChartProps, indexNumber: number) => {\n const xPoint = xBarScale(\n _xAxisType === XAxisTypes.NumericAxis\n ? (singleChartData.xAxisPoint as number)\n : _xAxisType === XAxisTypes.DateAxis\n ? (singleChartData.xAxisPoint as Date)\n : (singleChartData.xAxisPoint as string),\n );\n const xScaleBandwidthTranslate =\n _xAxisType !== XAxisTypes.StringAxis ? -_barWidth / 2 : (xBarScale.bandwidth() - _barWidth) / 2;\n\n let barTotalValue = 0;\n\n const barsToDisplay = singleChartData.chartData.filter(point => point.data !== 0);\n\n if (!barsToDisplay.length) {\n return undefined;\n }\n\n const { gapHeight, heightValueScale, absStackTotal } = _getBarGapAndScale(barsToDisplay, yBarScale);\n\n if (heightValueScale < 0) {\n return undefined;\n }\n\n const yBaseline = containerHeight - _margins.bottom! - yBarScale(Y_ORIGIN);\n let yPositiveStart = yBaseline;\n let yNegativeStart = yBaseline;\n let yPoint = 0;\n let heightOfLastBar = 0;\n\n const singleBar = barsToDisplay.map((point: VSChartDataPoint, index: number) => {\n const startColor = point.color ? point.color : _colors[index];\n const ref: RefArrayData = {};\n const shouldHighlight = _isLegendHighlighted(point.legend) || _noLegendHighlighted() ? true : false;\n const rectFocusProps = !shouldFocusWholeStack && {\n 'aria-label': _getAriaLabel(singleChartData, point),\n onMouseOver: (event: React.MouseEvent<SVGElement, MouseEvent>) =>\n _onRectHover(singleChartData.xAxisPoint, point, startColor, event),\n onMouseMove: (event: React.MouseEvent<SVGElement, MouseEvent>) =>\n _onRectHover(singleChartData.xAxisPoint, point, startColor, event),\n onMouseLeave: _handleMouseOut,\n onFocus: () => _onRectFocus(point, singleChartData.xAxisPoint as string, startColor, ref),\n onBlur: _handleMouseOut,\n onClick: (event: React.MouseEvent<SVGElement, MouseEvent>) => _onClick(point, event),\n role: 'img',\n tabIndex: !props.hideTooltip && shouldHighlight ? 0 : undefined,\n };\n\n let barHeight = Math.abs(heightValueScale * point.data);\n // FIXME: The current scaling logic may produce different min and gap heights for each bar stack.\n const minHeight = Math.max((heightValueScale * absStackTotal) / 100.0, barMinimumHeight);\n if (barHeight < minHeight) {\n barHeight = minHeight;\n }\n const gapOffset = index ? gapHeight : 0;\n if (point.data >= Y_ORIGIN) {\n yPositiveStart -= barHeight + gapOffset;\n yPoint = yPositiveStart;\n } else {\n yPoint = yNegativeStart + gapOffset;\n yNegativeStart = yPoint + barHeight;\n }\n\n barTotalValue += point.data;\n heightOfLastBar = index === barsToDisplay.length - 1 ? barHeight : 0;\n\n if (barCornerRadius && barHeight > barCornerRadius && index === barsToDisplay.length - 1) {\n return (\n <React.Fragment key={index + indexNumber + `${shouldFocusWholeStack}`}>\n <path\n className={classes.opacityChangeOnHover}\n d={`\n M ${xPoint} ${yPoint + barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${-barCornerRadius}\n h ${_barWidth - 2 * barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${barCornerRadius}\n v ${barHeight - barCornerRadius}\n h ${-_barWidth}\n z\n `}\n fill={startColor}\n rx={props.roundCorners ? 3 : 0}\n ref={e => (ref.refElement = e)}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n cursor={props.href ? 'pointer' : 'default'}\n {...rectFocusProps}\n />\n </React.Fragment>\n );\n }\n if (barHeight < 0) {\n return <React.Fragment key={index + indexNumber}> </React.Fragment>;\n }\n return (\n <React.Fragment key={index + indexNumber}>\n <rect\n className={classes.opacityChangeOnHover}\n x={xPoint}\n y={yPoint}\n width={_barWidth}\n height={barHeight}\n fill={startColor}\n opacity={shouldHighlight ? 1 : 0.1}\n cursor={props.href ? 'pointer' : 'default'}\n rx={props.roundCorners ? 3 : 0}\n ref={e => (ref.refElement = e)}\n {...rectFocusProps}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />\n </React.Fragment>\n );\n });\n const groupRef: RefArrayData = {};\n const stackFocusProps = shouldFocusWholeStack && {\n 'aria-label': _getAriaLabel(singleChartData),\n onMouseOver: (event: any) => _onStackHover(singleChartData, event),\n onMouseMove: (event: any) => _onStackHover(singleChartData, event),\n onMouseLeave: _handleMouseOut,\n onFocus: () => _onStackFocus(singleChartData, groupRef),\n onBlur: _handleMouseOut,\n onClick: (event: any) => _onClick(singleChartData, event),\n role: 'img',\n tabIndex: !props.hideTooltip ? 0 : undefined,\n };\n let showLabel = false;\n let barLabel = 0;\n if (!props.hideLabels) {\n if (_noLegendHighlighted()) {\n showLabel = true;\n barLabel = barTotalValue;\n } else {\n barsToDisplay.forEach(point => {\n if (_isLegendHighlighted(point.legend)) {\n showLabel = true;\n barLabel += point.data;\n }\n });\n }\n }\n return (\n <g key={indexNumber + `${shouldFocusWholeStack}`}>\n <g id={`${indexNumber}-singleBar`} ref={e => (groupRef.refElement = e)} {...stackFocusProps}>\n {singleBar}\n </g>\n {!props.hideLabels && _barWidth >= 16 && showLabel && (\n <text\n x={xPoint + _barWidth / 2}\n //if total bar value >=0, show label above top bar, otherwise below bottom bar\n y={barLabel >= Y_ORIGIN ? yPoint - 6 : yPoint + heightOfLastBar + 12}\n textAnchor=\"middle\"\n className={classes.barLabel}\n aria-label={`Total: ${barLabel}`}\n role=\"img\"\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n >\n {typeof props.yAxisTickFormat === 'function'\n ? props.yAxisTickFormat(barLabel)\n : formatScientificLimitWidth(barLabel)}\n </text>\n )}\n </g>\n );\n });\n if (!props.showXAxisLablesTooltip) {\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return bars.filter((bar): bar is JSX.Element => !!bar);\n }\n\n function _getMinMaxOfYAxis(\n dataset: DataPoint[],\n yAxisType?: YAxisType,\n useSecondaryYScale?: boolean,\n ): { startValue: number; endValue: number } {\n if (!useSecondaryYScale) {\n return findVSBCNumericMinMaxOfY(dataset);\n }\n\n const values: number[] = [];\n props.data.forEach(xPoint => {\n xPoint.lineData?.forEach(point => {\n // useSecondaryYScale is applicable only for lines in VSBC\n if (point.useSecondaryYScale) {\n values.push(point.y);\n }\n });\n });\n\n return { startValue: d3Min(values)!, endValue: d3Max(values)! };\n }\n\n if (!_isChartEmpty()) {\n _adjustProps();\n const _isHavingLines = props.data.some(\n (item: VerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = _toFocusWholeStack(_isHavingLines);\n _dataset = _createDataSetLayer();\n const legendBars: JSX.Element = _getLegendData(_points, _createLegendsForLine(props.data));\n const calloutProps: ModifiedCartesianChartProps['calloutProps'] = {\n color: color,\n legend: calloutLegend,\n XValue: xCalloutValue!,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n YValueHover: YValueHover,\n hoverXValue: hoverXValue,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData),\n clickPosition: clickPosition,\n isPopoverOpen: isPopoverOpen,\n isCalloutForStack:\n props.isCalloutForStack || (_isHavingLines && (_noLegendHighlighted() || _getHighlightedLegend().length > 1)),\n isCartesian: true,\n customCallout: {\n customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n };\n const tickParams = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n return (\n <CartesianChart\n {...props}\n chartTitle={_getChartTitle()}\n points={_dataset}\n chartType={ChartTypes.VerticalStackedBarChart}\n xAxisType={_xAxisType}\n getMinMaxOfYAxis={_getMinMaxOfYAxis}\n calloutProps={calloutProps}\n createYAxis={createNumericYAxis}\n tickParams={tickParams}\n legendBars={legendBars}\n datasetForXAxisDomain={_xAxisLabels}\n isCalloutForStack={shouldFocusWholeStack}\n getDomainNRangeValues={_getDomainNRangeValues}\n createStringYAxis={createStringYAxis}\n barwidth={_barWidth}\n getmargins={_getMargins}\n getGraphData={_getGraphData}\n getAxisData={_getAxisData}\n onChartMouseLeave={_handleChartMouseLeave}\n getDomainMargins={_getDomainMargins}\n {...(_xAxisType === XAxisTypes.StringAxis && {\n xAxisInnerPadding: _xAxisInnerPadding,\n xAxisOuterPadding: _xAxisOuterPadding,\n })}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n children={(props: ChildProps) => {\n return (\n <>\n <g>{_bars}</g>\n <g>\n {_isHavingLines &&\n _createLines(\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 return <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />;\n};\nVerticalStackedBarChart.displayName = 'VerticalStackedBarChart';\n"],"names":["VerticalStackedBarChart","barGapMultiplier","barGapMin","MIN_DOMAIN_MARGIN","CircleVisbility","props","_isRtl","useRtl","_createLegendsForLine","data","_getLineLegends","_tooltipId","useId","_emptyChartId","_points","_dataset","_xAxisLabels","_bars","_xAxisType","length","getTypeOfAxis","xAxisPoint","XAxisTypes","StringAxis","_barWidth","_colors","_margins","_lineObject","_yMax","_yMin","_calloutAnchorPoint","_domainMargin","_xAxisInnerPadding","_xAxisOuterPadding","cartesianChartRef","React","useRef","Y_ORIGIN","selectedLegends","setSelectedLegends","useState","legendProps","activeLegend","setActiveLegend","undefined","dataForHoverCard","setDataForHoverCard","color","setColor","hoverXValue","setHoverXValue","YValueHover","setYValueHover","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","activeXAxisDataPoint","setActiveXAxisDataPoint","calloutLegend","setCalloutLegend","stackCalloutProps","setStackCalloutProps","dataPointCalloutProps","setDataPointCalloutProps","callOutAccessibilityData","setCallOutAccessibilityData","clickPosition","setClickPosition","x","y","isPopoverOpen","setPopoverOpen","prevPropsRef","useEffect","current","prevProps","areArraysEqual","height","width","_adjustProps","_createDataSetLayer","useImperativeHandle","componentRef","chartContainer","_getLegendData","lineLegends","hideLegend","createElement","Fragment","defaultPalette","getColorFromToken","DataVizPalette","color6","color1","color5","color7","color10","actions","allowHoverOnLegend","forEach","singleChartData","chartData","point","Math","floor","random","checkSimilarLegends","filter","leg","title","legend","hoverAction","_handleChartMouseLeave","_onLegendHover","onMouseOutAction","_onLegendLeave","push","legendsOfLine","isLineLegendInBarChart","totalLegends","concat","Legends","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onChange","_onLegendSelectionChange","_getHighlightedLegend","_lineHoverOut","_lineHoverFocus","lineData","xItem","yAxisCalloutData","_onStackHoverFocus","stack","mouseEvent","clientX","clientY","boundingRect","getBoundingClientRect","left","top","_noLegendHighlighted","dataPoint","_isLegendHighlighted","isLinesPresent","item","shouldDrawBorderBottom","_updatePosition","sort","a","b","slice","reverse","Date","formatDate","useUTC","stackCallOutAccessibilityData","_onClick","onBarClick","href","window","location","getBarWidth","barWidth","maxBarWidth","defaultColors","_getFormattedLineData","getScalePadding","xAxisInnerPadding","xAxisPadding","xAxisOuterPadding","tempArr","dataset","map","singlePointData","total","legendTitle","_selectedLegends","event","currentLegend","canSelectMultipleLegends","_getMargins","margins","_getGraphData","xScale","yScale","containerHeight","containerWidth","xElement","xBarScale","yBarScale","_getScales","_createBar","_getAxisData","yAxisData","yAxisDomainValues","domainValue","max","yMaxValue","min","yMinValue","includes","_getAriaLabel","xValue","xAxisCalloutData","pointValues","pt","yValue","join","lineValues","ln","ariaLabel","_getCustomizedCallout","_isHavingLines","some","onRenderCalloutPerStack","onRenderCalloutPerDataPoint","_renderCallout","_toFocusWholeStack","isCalloutForStack","shouldFocusStackOnly","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","tickValues","shiftX","domainNRangeValue","NumericAxis","domainRangeOfVSBCNumeric","DateAxis","domainRangeOfDateForAreaLineVerticalBarChart","domainRangeOfXStringAxis","linesData","formattedLineData","index","line","lineObject","Object","keys","_createLines","yScalePrimary","yScaleSecondary","lines","borderForLines","dots","lineBorderWidth","lineOptions","Number","parseFloat","toString","xScaleBandwidthTranslate","bandwidth","shouldHighlight","i","x1","useSecondaryYScale","y1","x2","y2","key","opacity","strokeWidth","fill","strokeLinecap","stroke","tokens","colorNeutralBackground1","transform","strokeDasharray","onMouseOver","_lineHover","bind","onMouseLeave","circlePoint","subIndex","circleRef","refElement","noBarsAndLinesActive","circle","cx","cy","_onStackHover","r","_getCircleVisibilityAndRadius","radius","visibility","ref","e","tabIndex","hideTooltip","onFocus","_lineFocus","onBlur","_handleMouseOut","role","ChartPopover","culture","XValue","YValue","_onRectHover","persist","_onRectFocusHover","chartDataPoint","xAxisDataPoint","_onRectFocus","_onStackFocus","groupRef","_getBarGapAndScale","bars","defaultTotalHeight","barGapMax","totalData","reduce","iter","value","abs","totalHeight","sumOfPercent","scalingRatio","gaps","gapHeight","heightValueScale","absStackTotal","yDomain","d3ScaleLinear","domain","range","bottom","xMax","d3Max","xMin","d3Min","nice","right","sDate","lDate","d3ScaleUtc","d3ScaleTime","d3ScaleBand","paddingInner","paddingOuter","_isChartEmpty","newX","newY","threshold","distance","sqrt","pow","_getDomainMargins","totalWidth","barGapRate","isScalePaddingDefined","reqWidth","mode","margin1","step","calculateLongestLabelWidth","margin2","calculateAppropriateBarWidth","_getChartTitle","chartTitle","numLines","classes","useVerticalStackedBarChartStyles","barCornerRadius","barMinimumHeight","shouldFocusWholeStack","indexNumber","xPoint","barTotalValue","barsToDisplay","yBaseline","yPositiveStart","yNegativeStart","yPoint","heightOfLastBar","singleBar","startColor","rectFocusProps","onMouseMove","onClick","barHeight","minHeight","gapOffset","path","className","opacityChangeOnHover","d","rx","roundCorners","cursor","rect","stackFocusProps","showLabel","barLabel","hideLabels","g","id","text","textAnchor","aria-label","yAxisTickFormat","formatScientificLimitWidth","showXAxisLablesTooltip","document","getElementById","remove","wrapXAxisLables","xAxisElement","d3Select","call","tooltipProps","tooltipCls","tooltip","axis","tooltipOfAxislabels","bar","_getMinMaxOfYAxis","yAxisType","findVSBCNumericMinMaxOfY","values","startValue","endValue","legendBars","calloutProps","getAccessibleDataObject","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","tickFormat","CartesianChart","ChartTypes","getMinMaxOfYAxis","createYAxis","createNumericYAxis","datasetForXAxisDomain","getDomainNRangeValues","createStringYAxis","barwidth","getmargins","getGraphData","getAxisData","onChartMouseLeave","getDomainMargins","children","div","style","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAU,CAAChc;gBACT,OAAA,WAAA,GACE8B,OAAAqD,aAAA,CAAArD,OAAAsD,QAAA,EAAA,MAAA,WAAA,GACEtD,OAAAqD,aAAA,CAAC0T,KAAAA,MAAGjY,QAAAA,WAAAA,GACJkB,OAAAqD,aAAA,CAAC0T,KAAAA,MACEzL,kBACC4B,aACEhP,MAAMuL,MAAM,EACZvL,MAAMiP,aAAa,EACnBjP,MAAMyL,eAAe,EACrBzL,MAAM0L,cAAc,EACpB1L,MAAMkP,eAAe;YAKjC;;IAGN;IACA,OAAA,WAAA,GAAOpN,OAAAqD,aAAA,CAAC8W,OAAAA;QAAInD,IAAItY;QAAe+R,MAAM;QAAS2J,OAAO;YAAE7L,SAAS;QAAI;QAAG4I,cAAY;;AACrF;AACAtZ,wBAAwBwc,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/VerticalStackedBarChart/VerticalStackedBarChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select } from 'd3-selection';\nimport { useVerticalStackedBarChartStyles } from './useVerticalStackedBarChartStyles.styles';\nimport {\n scaleLinear as d3ScaleLinear,\n ScaleLinear as D3ScaleLinear,\n scaleBand as d3ScaleBand,\n scaleUtc as d3ScaleUtc,\n scaleTime as d3ScaleTime,\n} from 'd3-scale';\nimport { useId } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport {\n AccessibilityProps,\n CartesianChart,\n ChildProps,\n VerticalStackedBarDataPoint,\n Margins,\n VerticalStackedBarChartProps,\n VerticalStackedChartProps,\n VSChartDataPoint,\n LineDataInVerticalStackedBarChart,\n ModifiedCartesianChartProps,\n Legend,\n ChartPopover,\n Legends,\n Chart,\n DataPoint,\n ImageExportOptions,\n LegendContainer,\n} from '../../index';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n getTypeOfAxis,\n tooltipOfAxislabels,\n formatScientificLimitWidth,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n calculateAppropriateBarWidth,\n formatDate,\n areArraysEqual,\n calculateLongestLabelWidth,\n useRtl,\n DataVizPalette,\n getColorFromToken,\n findVSBCNumericMinMaxOfY,\n YAxisType,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfDateForAreaLineVerticalBarChart,\n domainRangeOfVSBCNumeric,\n domainRangeOfXStringAxis,\n createStringYAxis,\n} from '../../utilities/index';\nimport { toImage } from '../../utilities/image-export-utils';\n\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\ntype NumericScale = D3ScaleLinear<number, number>;\nconst barGapMultiplier = 0.2;\nconst barGapMin = 1;\nconst MIN_DOMAIN_MARGIN = 8;\n\ninterface RefArrayData {\n refElement?: SVGGElement | null;\n}\n\ntype LinePoint = LineDataInVerticalStackedBarChart & { index: number; xItem: VerticalStackedChartProps };\ntype LineObject = { [key: string]: LinePoint[] };\ntype LineLegends = {\n title: string;\n color: string;\n};\nenum CircleVisbility {\n show = 'visibility',\n hide = 'hidden',\n}\ntype CalloutAnchorPointData = {\n xAxisDataPoint: string;\n chartDataPoint: VSChartDataPoint;\n};\n\nexport const VerticalStackedBarChart: React.FunctionComponent<VerticalStackedBarChartProps> = props => {\n const _isRtl: boolean = useRtl();\n const _createLegendsForLine: (data: VerticalStackedChartProps[]) => LineLegends[] = (\n data: VerticalStackedChartProps[],\n ) => _getLineLegends(data);\n const _tooltipId: string = useId('VSBCTooltipId_');\n const _emptyChartId: string = useId('_VSBC_empty');\n let _points: VerticalStackedChartProps[] = [];\n let _dataset: VerticalStackedBarDataPoint[];\n let _xAxisLabels: string[] = [];\n let _bars: JSX.Element[];\n let _xAxisType: XAxisTypes =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data[0]!.xAxisPoint, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\n let _barWidth: number = 0;\n let _colors: string[];\n let _margins: Margins;\n let _lineObject: LineObject;\n let _yMax: number;\n let _yMin: number;\n let _calloutAnchorPoint: CalloutAnchorPointData | null;\n let _domainMargin: number = MIN_DOMAIN_MARGIN;\n let _xAxisInnerPadding: number = 0;\n let _xAxisOuterPadding: number = 0;\n const cartesianChartRef = React.useRef<Chart>(null);\n const Y_ORIGIN: number = 0;\n const _legendsRef = React.useRef<LegendContainer>(null);\n\n const [selectedLegends, setSelectedLegends] = React.useState(props.legendProps?.selectedLegends || []);\n const [activeLegend, setActiveLegend] = React.useState<string | undefined>(undefined);\n const [dataForHoverCard, setDataForHoverCard] = React.useState(0);\n const [color, setColor] = React.useState('');\n const [hoverXValue, setHoverXValue] = React.useState<string | number>('');\n const [YValueHover, setYValueHover] = React.useState<(LineDataInVerticalStackedBarChart | VSChartDataPoint)[]>([]);\n const [xCalloutValue, setXCalloutValue] = React.useState('');\n const [yCalloutValue, setYCalloutValue] = React.useState('');\n const [activeXAxisDataPoint, setActiveXAxisDataPoint] = React.useState<number | string | Date>('');\n const [calloutLegend, setCalloutLegend] = React.useState('');\n const [stackCalloutProps, setStackCalloutProps] = React.useState<VerticalStackedChartProps>();\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<VSChartDataPoint>();\n const [callOutAccessibilityData, setCallOutAccessibilityData] = React.useState<AccessibilityProps>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n const prevPropsRef = React.useRef<VerticalStackedBarChartProps | null>(null);\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 || prevProps.data !== props.data) {\n _adjustProps();\n _dataset = _createDataSetLayer();\n }\n }\n prevPropsRef.current = props;\n }, [props]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n toImage: (opts?: ImageExportOptions): Promise<string> => {\n return toImage(cartesianChartRef.current?.chartContainer, _legendsRef.current?.toSVG, _isRtl, opts);\n },\n }),\n [],\n );\n\n function _getLegendData(data: VerticalStackedChartProps[], lineLegends: LineLegends[]): JSX.Element {\n if (props.hideLegend) {\n return <></>;\n }\n const defaultPalette: string[] = [\n getColorFromToken(DataVizPalette.color6),\n getColorFromToken(DataVizPalette.color1),\n getColorFromToken(DataVizPalette.color5),\n getColorFromToken(DataVizPalette.color7),\n getColorFromToken(DataVizPalette.color10),\n ];\n const actions: Legend[] = [];\n const { allowHoverOnLegend = true } = props;\n\n data.forEach((singleChartData: VerticalStackedChartProps) => {\n singleChartData.chartData.forEach((point: VSChartDataPoint) => {\n const color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n const checkSimilarLegends = actions.filter((leg: Legend) => leg.title === point.legend && leg.color === color);\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n\n const legend: Legend = {\n title: point.legend,\n color,\n hoverAction: allowHoverOnLegend\n ? () => {\n _handleChartMouseLeave();\n _onLegendHover(point.legend);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => _onLegendLeave() : undefined,\n };\n\n actions.push(legend);\n });\n });\n const legendsOfLine: Legend[] = [];\n if (lineLegends && lineLegends.length > 0) {\n lineLegends.forEach((point: LineLegends) => {\n const legend: Legend = {\n title: point.title,\n color: point.color,\n isLineLegendInBarChart: true,\n hoverAction: allowHoverOnLegend\n ? () => {\n _handleChartMouseLeave();\n _onLegendHover(point.title);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => _onLegendLeave() : undefined,\n };\n legendsOfLine.push(legend);\n });\n }\n const totalLegends: Legend[] = legendsOfLine.concat(actions);\n return (\n <Legends\n legends={totalLegends}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n onChange={_onLegendSelectionChange}\n legendRef={_legendsRef}\n />\n );\n }\n\n function _getHighlightedLegend() {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n }\n\n function _lineHoverOut() {\n setPopoverOpen(false);\n setXCalloutValue('');\n setYCalloutValue('');\n setActiveXAxisDataPoint('');\n setColor('');\n }\n\n function _lineHoverFocus(lineData: LinePoint) {\n setPopoverOpen(true);\n setXCalloutValue(`${lineData.xItem.xAxisPoint}`);\n setYCalloutValue(`${lineData.yAxisCalloutData || lineData.data || lineData.y}`);\n setActiveXAxisDataPoint(lineData.xItem.xAxisPoint);\n setColor(lineData.color);\n }\n\n function _onStackHoverFocus(\n stack: VerticalStackedChartProps,\n mouseEvent: React.MouseEvent<SVGElement> | SVGGElement,\n ): void {\n let clientX = 0;\n let clientY = 0;\n if ('clientX' in mouseEvent) {\n clientX = mouseEvent.clientX;\n clientY = mouseEvent.clientY;\n } else {\n // Handle case where mouseEvent is an SVGGElement\n const boundingRect = mouseEvent.getBoundingClientRect();\n clientX = boundingRect.left + boundingRect.width / 2;\n clientY = boundingRect.top + boundingRect.height / 2;\n }\n if (!_noLegendHighlighted()) {\n stack = {\n ...stack,\n chartData: stack.chartData.filter((dataPoint: { legend: any }) => _isLegendHighlighted(dataPoint.legend)),\n lineData: stack.lineData?.filter((dataPoint: { legend: any }) => _isLegendHighlighted(dataPoint.legend)),\n };\n }\n const lineData = stack.lineData;\n const isLinesPresent: boolean = lineData !== undefined && lineData.length > 0;\n if (isLinesPresent) {\n lineData!.forEach((item: LineDataInVerticalStackedBarChart & { shouldDrawBorderBottom?: boolean }) => {\n item.data = item.data || item.y;\n item.shouldDrawBorderBottom = true;\n });\n }\n _updatePosition(clientX, clientY);\n setPopoverOpen(stack.chartData.length > 0 || (stack.lineData?.length ?? 0) > 0);\n setYValueHover(\n isLinesPresent\n ? [...lineData!.sort((a, b) => (a.data! < b.data! ? 1 : -1)), ...stack.chartData.slice().reverse()]\n : stack.chartData.slice().reverse(),\n );\n setHoverXValue(stack.xAxisPoint instanceof Date ? formatDate(stack.xAxisPoint, props.useUTC) : stack.xAxisPoint);\n setStackCalloutProps(stack);\n setActiveXAxisDataPoint(stack.xAxisPoint);\n setCallOutAccessibilityData(stack.stackCallOutAccessibilityData);\n }\n\n function _handleChartMouseLeave(): void {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n setActiveXAxisDataPoint('');\n }\n\n const _onClick = (\n data: VerticalStackedChartProps | VSChartDataPoint,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void => {\n props.onBarClick?.(mouseEvent, data);\n props.href ? (window.location.href = props.href) : '';\n };\n\n function _adjustProps(): void {\n _points = props.data || [];\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n const defaultColors: string[] = [\n getColorFromToken(DataVizPalette.color6),\n getColorFromToken(DataVizPalette.color1),\n getColorFromToken(DataVizPalette.color5),\n getColorFromToken(DataVizPalette.color7),\n getColorFromToken(DataVizPalette.color10),\n ];\n _colors = defaultColors;\n _xAxisType = getTypeOfAxis(props.data[0].xAxisPoint, true) as XAxisTypes;\n _lineObject = _getFormattedLineData(props.data);\n _xAxisInnerPadding = 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 _createDataSetLayer(): VerticalStackedBarDataPoint[] {\n const tempArr: string[] = [];\n const dataset: VerticalStackedBarDataPoint[] = _points.map(singlePointData => {\n let total: number = 0;\n singlePointData.chartData!.forEach((point: VSChartDataPoint) => {\n total = total + point.data;\n });\n tempArr.push(singlePointData.xAxisPoint as string);\n return {\n x: singlePointData.xAxisPoint,\n y: total,\n };\n });\n _xAxisLabels = tempArr;\n return dataset;\n }\n\n function _onLegendHover(legendTitle: string): void {\n setActiveLegend(legendTitle);\n }\n\n function _onLegendLeave(): void {\n setActiveLegend(undefined);\n }\n\n function _onLegendSelectionChange(\n _selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(_selectedLegends);\n } else {\n setSelectedLegends(_selectedLegends.slice(-1));\n }\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(_selectedLegends, event, currentLegend);\n }\n }\n\n function _getMargins(margins: Margins) {\n _margins = margins;\n }\n\n function _getGraphData(\n xScale: any,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) {\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);\n return (_bars = _createBar(xBarScale, yBarScale, containerHeight, xElement!));\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 || Y_ORIGIN);\n _yMin = Math.min(domainValue[0], props.yMinValue || Y_ORIGIN);\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 _isLegendHighlighted(legendTitle: string) {\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() {\n return _getHighlightedLegend().length === 0;\n }\n\n function _getAriaLabel(singleChartData: VerticalStackedChartProps, point?: VSChartDataPoint): string {\n if (!point) {\n /** if shouldFocusWholeStack is true */\n const xValue =\n singleChartData.xAxisCalloutData ||\n (singleChartData.xAxisPoint instanceof Date\n ? formatDate(singleChartData.xAxisPoint)\n : singleChartData.xAxisPoint);\n const pointValues = singleChartData.chartData\n .map(pt => {\n const legend = pt.legend;\n const yValue = pt.yAxisCalloutData || pt.data;\n return `${legend}, ${yValue}.`;\n })\n .join(' ');\n const lineValues = singleChartData.lineData\n ?.map(ln => {\n const legend = ln.legend;\n const yValue = ln.yAxisCalloutData || ln.data || ln.y;\n return `${legend}, ${yValue}.`;\n })\n .join(' ');\n return (\n singleChartData.stackCallOutAccessibilityData?.ariaLabel ||\n `${xValue}. ${pointValues}` + (lineValues ? ` ${lineValues}` : '')\n );\n }\n /** if shouldFocusWholeStack is false */\n const xValue =\n singleChartData.xAxisCalloutData ||\n point.xAxisCalloutData ||\n (singleChartData.xAxisPoint instanceof Date\n ? formatDate(singleChartData.xAxisPoint)\n : singleChartData.xAxisPoint);\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.data;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n function _getCustomizedCallout() {\n const _isHavingLines = props.data.some(\n (item: VerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n return props.onRenderCalloutPerStack\n ? props.onRenderCalloutPerStack(stackCalloutProps)\n : props.onRenderCalloutPerDataPoint && !_isHavingLines\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps, _renderCallout)\n : null;\n }\n\n function _toFocusWholeStack(_isHavingLines: boolean): boolean {\n const { isCalloutForStack = false } = props;\n let shouldFocusStackOnly: boolean = false;\n if (_isHavingLines) {\n if (_getHighlightedLegend().length === 1) {\n shouldFocusStackOnly = false;\n } else {\n shouldFocusStackOnly = true;\n }\n } else {\n shouldFocusStackOnly = isCalloutForStack;\n }\n return shouldFocusStackOnly;\n }\n\n function _getDomainNRangeValues(\n points: DataPoint[],\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfVSBCNumeric(points, margins, width, isRTL, barWidth!);\n } else if (xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = domainRangeOfDateForAreaLineVerticalBarChart(\n points,\n margins,\n width,\n isRTL,\n tickValues! as Date[],\n chartType,\n barWidth,\n );\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\n }\n\n function _getFormattedLineData(data: VerticalStackedChartProps[]): LineObject {\n const linesData: LinePoint[] = [];\n const formattedLineData: LineObject = {};\n data.forEach((item: VerticalStackedChartProps, index: number) => {\n if (item.lineData) {\n item.lineData.forEach((line: any) => {\n linesData.push({\n ...line,\n index,\n xItem: item,\n });\n });\n }\n });\n linesData.forEach(item => {\n if (formattedLineData[item.legend]) {\n formattedLineData[item.legend].push(item);\n } else {\n formattedLineData[item.legend] = [item];\n }\n });\n return formattedLineData;\n }\n\n function _getLineLegends(data: VerticalStackedChartProps[]): LineLegends[] {\n const lineObject: LineObject = _lineObject;\n const lineLegends: LineLegends[] = [];\n Object.keys(lineObject).forEach((item: string) => {\n lineLegends.push({\n title: item,\n color: lineObject[item][0].color,\n });\n });\n return lineLegends;\n }\n\n function _createLines(\n xScale: any,\n yScalePrimary: NumericScale,\n containerHeight: number,\n containerWidth: number,\n yScaleSecondary?: NumericScale,\n ): JSX.Element {\n const lineObject: LineObject = _getFormattedLineData(props.data);\n const lines: React.ReactNode[] = [];\n const borderForLines: React.ReactNode[] = [];\n const dots: React.ReactNode[] = [];\n //const { theme } = props;\n const lineBorderWidth = props.lineOptions?.lineBorderWidth\n ? Number.parseFloat(props.lineOptions!.lineBorderWidth!.toString())\n : 0;\n const xScaleBandwidthTranslate = _xAxisType !== XAxisTypes.StringAxis ? 0 : xScale.bandwidth() / 2;\n Object.keys(lineObject).forEach((item: string, index: number) => {\n const shouldHighlight = _isLegendHighlighted(item) || _noLegendHighlighted();\n for (let i = 1; i < lineObject[item].length; i++) {\n const x1 = xScale(lineObject[item][i - 1].xItem.xAxisPoint);\n const useSecondaryYScale =\n lineObject[item][i - 1].useSecondaryYScale && lineObject[item][i].useSecondaryYScale && yScaleSecondary;\n const y1 = useSecondaryYScale\n ? yScaleSecondary!(lineObject[item][i - 1].y)\n : yScalePrimary(lineObject[item][i - 1].y);\n const x2 = xScale(lineObject[item][i].xItem.xAxisPoint);\n const y2 = useSecondaryYScale ? yScaleSecondary!(lineObject[item][i].y) : yScalePrimary(lineObject[item][i].y);\n if (lineBorderWidth > 0) {\n borderForLines.push(\n <line\n key={`${index}-${i}-BorderLine`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={3 + lineBorderWidth * 2}\n fill=\"transparent\"\n strokeLinecap=\"round\"\n stroke={tokens.colorNeutralBackground1}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />,\n );\n }\n lines.push(\n <line\n key={`${index}-${i}-line`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={lineObject[item][0].lineOptions?.strokeWidth ?? 3}\n strokeLinecap={lineObject[item][0].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={lineObject[item][0].lineOptions?.strokeDasharray}\n stroke={lineObject[item][i].color}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n {...(_isLegendHighlighted(item) && {\n onMouseOver: _lineHover.bind(lineObject[item][i - 1]),\n onMouseLeave: _lineHoverOut,\n })}\n />,\n );\n }\n });\n Object.keys(lineObject).forEach((item: string, index: number) => {\n lineObject[item].forEach((circlePoint: LinePoint, subIndex: number) => {\n const circleRef: { refElement: SVGCircleElement | null } = { refElement: null };\n const noBarsAndLinesActive =\n circlePoint.xItem.chartData.filter(\n dataPoint => _noLegendHighlighted() || _isLegendHighlighted(dataPoint.legend),\n ).length === 0;\n dots.push(\n <circle\n key={`${index}-${subIndex}-dot`}\n cx={xScale(circlePoint.xItem.xAxisPoint)}\n cy={\n circlePoint.useSecondaryYScale && yScaleSecondary\n ? yScaleSecondary(circlePoint.y)\n : yScalePrimary(circlePoint.y)\n }\n onMouseOver={\n _isLegendHighlighted(item)\n ? (event: React.MouseEvent<SVGElement, MouseEvent>) => _lineHover(circlePoint, event)\n : (event: React.MouseEvent<SVGElement, MouseEvent>) => _onStackHover(circlePoint.xItem, event)\n }\n {...(_isLegendHighlighted(item) && {\n onMouseLeave: _lineHoverOut,\n })}\n r={_getCircleVisibilityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).radius}\n stroke={circlePoint.color}\n fill={tokens.colorNeutralBackground1}\n strokeWidth={3}\n visibility={_getCircleVisibilityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).visibility}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n ref={e => (circleRef.refElement = e)}\n {...(noBarsAndLinesActive\n ? {\n tabIndex: !props.hideTooltip ? 0 : undefined,\n onFocus: event => _lineFocus(event, circlePoint, circleRef),\n onBlur: _handleMouseOut,\n role: 'img',\n 'aria-label': _getAriaLabel(circlePoint.xItem, circlePoint as VSChartDataPoint),\n }\n : {})}\n />,\n );\n });\n });\n return (\n <>\n {borderForLines}\n {lines}\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 === activeXAxisDataPoint && _isLegendHighlighted(legend)) {\n return { visibility: CircleVisbility.show, radius: 8 };\n } else if (_isLegendHighlighted(legend)) {\n return { visibility: CircleVisbility.show, radius: 0.3 };\n } else {\n return { visibility: CircleVisbility.hide, radius: 0 };\n }\n } else {\n return {\n visibility: activeXAxisDataPoint === xAxisPoint ? CircleVisbility.show : CircleVisbility.hide,\n radius: 8,\n };\n }\n }\n\n function _renderCallout(props?: VSChartDataPoint): JSX.Element | null {\n return props ? (\n <ChartPopover\n culture={props.culture ?? 'en-us'}\n XValue={props.xAxisCalloutData}\n xCalloutValue={xCalloutValue}\n yCalloutValue={yCalloutValue}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n legend={props.legend}\n YValue={props.yAxisCalloutData}\n color={props.color}\n />\n ) : null;\n }\n\n function _onRectHover(\n xAxisPoint: string | number | Date,\n point: VSChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n _onRectFocusHover(xAxisPoint, point, color, mouseEvent);\n }\n\n function _onRectFocusHover(\n xAxisPoint: string | number | Date,\n point: VSChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement> | SVGGElement,\n ) {\n let clientX = 0;\n let clientY = 0;\n if ('clientX' in mouseEvent) {\n clientX = mouseEvent.clientX;\n clientY = mouseEvent.clientY;\n } else {\n // Handle case where mouseEvent is an SVGGElement\n const boundingRect = mouseEvent.getBoundingClientRect();\n clientX = boundingRect.left + boundingRect.width / 2;\n clientY = boundingRect.top + boundingRect.height / 2;\n }\n if (_calloutAnchorPoint?.chartDataPoint !== point || _calloutAnchorPoint?.xAxisDataPoint !== xAxisPoint) {\n _calloutAnchorPoint = {\n chartDataPoint: point,\n xAxisDataPoint: `${xAxisPoint}`,\n };\n _updatePosition(clientX, clientY);\n setPopoverOpen(_noLegendHighlighted() || _isLegendHighlighted(point.legend));\n setCalloutLegend(point.legend);\n setDataForHoverCard(point.data);\n setColor(color);\n setXCalloutValue(point.xAxisCalloutData ? point.xAxisCalloutData : `${xAxisPoint}`);\n setYCalloutValue(point.yAxisCalloutData!);\n setDataPointCalloutProps(point);\n setCallOutAccessibilityData(point.callOutAccessibilityData);\n }\n }\n\n function _lineHover(lineData: LinePoint, mouseEvent: React.MouseEvent<SVGElement>) {\n mouseEvent.persist();\n _lineHoverFocus(lineData);\n }\n\n function _lineFocus(\n event: React.FocusEvent<SVGCircleElement, Element>,\n lineData: LinePoint,\n ref: { refElement: SVGCircleElement | null },\n ) {\n if (ref.refElement) {\n _lineHoverFocus(lineData);\n }\n }\n\n function _onStackHover(stack: VerticalStackedChartProps, mouseEvent: React.MouseEvent<SVGElement>): void {\n mouseEvent.persist();\n _onStackHoverFocus(stack, mouseEvent);\n }\n\n function _onRectFocus(point: VSChartDataPoint, xAxisPoint: string, color: string, ref: RefArrayData): void {\n if (ref.refElement) {\n _onRectFocusHover(xAxisPoint, point, color, ref.refElement);\n }\n }\n\n function _onStackFocus(stack: VerticalStackedChartProps, groupRef: RefArrayData): void {\n if (groupRef.refElement) {\n _onStackHoverFocus(stack, groupRef.refElement);\n }\n }\n\n function _handleMouseOut(): void {\n setPopoverOpen(false);\n }\n\n function _getBarGapAndScale(\n bars: VSChartDataPoint[],\n yBarScale: NumericScale,\n defaultTotalHeight?: number,\n ): {\n readonly gapHeight: number;\n readonly heightValueScale: number;\n readonly absStackTotal: number;\n } {\n const { barGapMax = 0 } = props;\n // When displaying gaps between the bars, the height of each bar is\n // adjusted so that the total of all bars is not changed by the gaps\n const totalData = bars.reduce((iter, value) => iter + Math.abs(value.data), 0);\n const totalHeight = defaultTotalHeight ?? Math.abs(yBarScale(totalData) - yBarScale(Y_ORIGIN));\n let sumOfPercent = 0;\n bars.forEach(point => {\n let value = (Math.abs(point.data) / totalData) * 100;\n if (value < 1 && value !== 0) {\n value = 1;\n }\n sumOfPercent += value;\n });\n const scalingRatio = sumOfPercent !== 0 ? sumOfPercent / 100 : 1;\n const gaps = barGapMax && bars.length - 1;\n const gapHeight = gaps && Math.max(barGapMin, Math.min(barGapMax, (totalHeight * barGapMultiplier) / gaps));\n const heightValueScale = (totalHeight - gapHeight * gaps) / (totalData * scalingRatio);\n return {\n gapHeight,\n heightValueScale,\n absStackTotal: totalData,\n } as const;\n }\n\n function _getScales(containerHeight: number, containerWidth: number) {\n const yDomain = [Math.min(Y_ORIGIN, _yMin), Math.max(Y_ORIGIN, _yMax)];\n const yBarScale = d3ScaleLinear()\n .domain(yDomain)\n .range([0, containerHeight - _margins.bottom! - _margins.top!]);\n if (_xAxisType === XAxisTypes.NumericAxis) {\n const xMax = d3Max(_dataset, (point: VerticalStackedBarDataPoint) => point.x as number)!;\n const xMin = d3Min(_dataset, (point: VerticalStackedBarDataPoint) => point.x as number)!;\n\n const xBarScale = d3ScaleLinear()\n .domain(_isRtl ? [xMax, xMin] : [xMin, xMax])\n .range([_margins.left! + _domainMargin, containerWidth - _margins.right! - _domainMargin]);\n if (!isScalePaddingDefined(props.xAxisInnerPadding, props.xAxisPadding)) {\n xBarScale.nice();\n }\n return { xBarScale, yBarScale };\n }\n if (_xAxisType === XAxisTypes.DateAxis) {\n const sDate = d3Min(_dataset, (point: VerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const lDate = d3Max(_dataset, (point: VerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const xBarScale = props.useUTC ? d3ScaleUtc() : d3ScaleTime();\n xBarScale\n .domain(_isRtl ? [lDate, sDate] : [sDate, lDate])\n .range([_margins.left! + _domainMargin, containerWidth - _margins.right! - _domainMargin]);\n\n return { xBarScale, yBarScale };\n }\n const xBarScale = d3ScaleBand()\n .domain(_xAxisLabels)\n .range(\n _isRtl\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 return { xBarScale, yBarScale };\n }\n\n const _isChartEmpty = (): boolean => {\n return !(\n props.data &&\n props.data.length > 0 &&\n props.data.some(item => item.chartData.length > 0 || (item.lineData && item.lineData.length > 0))\n );\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 function _getDomainMargins(containerWidth: number): Margins {\n _domainMargin = MIN_DOMAIN_MARGIN;\n\n /** Total width available to render the bars */\n const totalWidth = containerWidth - (_margins.left! + MIN_DOMAIN_MARGIN) - (_margins.right! + MIN_DOMAIN_MARGIN);\n /** Rate at which the space between the bars changes wrt the bar width */\n const barGapRate = _xAxisInnerPadding / (1 - _xAxisInnerPadding);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(props.xAxisOuterPadding, props.xAxisPadding)) {\n // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available\n // to adjust the space before the first bar and after the last bar.\n _domainMargin = 0;\n } else if (props.barWidth !== 'auto') {\n // Update the bar width so that when CartesianChart rerenders,\n // the following calculations don't use the previous bar width.\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n /** Total width required to render the bars. Directly proportional to bar width */\n const reqWidth = (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate) * _barWidth;\n\n if (totalWidth >= reqWidth) {\n // Center align the chart by setting equal left and right margins for domain\n _domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;\n }\n } else if (props.mode === 'plotly' && _xAxisLabels.length > 1) {\n // Calculate the remaining width after rendering bars at their maximum allowable width\n const bandwidth = totalWidth / (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate);\n const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, bandwidth);\n let reqWidth = (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate) * barWidth;\n const margin1 = (totalWidth - reqWidth) / 2;\n\n let margin2 = Number.POSITIVE_INFINITY;\n if (!props.hideTickOverlap) {\n // Calculate the remaining width after accounting for the space required to render x-axis labels\n const step = calculateLongestLabelWidth(_xAxisLabels) + 20;\n reqWidth = (_xAxisLabels.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 const data = (props.data?.map(point => point.xAxisPoint) as number[] | Date[] | undefined) || [];\n _barWidth = getBarWidth(\n props.barWidth,\n props.maxBarWidth,\n calculateAppropriateBarWidth(data, totalWidth, _xAxisInnerPadding),\n );\n _domainMargin = MIN_DOMAIN_MARGIN + _barWidth / 2;\n }\n\n return {\n ..._margins,\n left: _margins.left! + _domainMargin,\n right: _margins.right! + _domainMargin,\n };\n }\n\n function _getChartTitle(): string {\n const { chartTitle, data } = props;\n const numLines = Object.keys(_lineObject).length;\n return (\n (chartTitle ? `${chartTitle}. ` : '') +\n `Vertical bar chart with ${data?.length || 0} stacked bars` +\n (numLines > 0 ? ` and ${numLines} lines` : '') +\n '. '\n );\n }\n\n const classes = useVerticalStackedBarChartStyles(props);\n function _createBar(\n xBarScale: any,\n yBarScale: NumericScale,\n containerHeight: number,\n xElement: SVGElement,\n ): JSX.Element[] {\n const { barCornerRadius = 0, barMinimumHeight = 0 } = props;\n const _isHavingLines = props.data.some(\n (item: VerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = _toFocusWholeStack(_isHavingLines);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, xBarScale.bandwidth());\n }\n\n const bars = _points.map((singleChartData: VerticalStackedChartProps, indexNumber: number) => {\n const xPoint = xBarScale(\n _xAxisType === XAxisTypes.NumericAxis\n ? (singleChartData.xAxisPoint as number)\n : _xAxisType === XAxisTypes.DateAxis\n ? (singleChartData.xAxisPoint as Date)\n : (singleChartData.xAxisPoint as string),\n );\n const xScaleBandwidthTranslate =\n _xAxisType !== XAxisTypes.StringAxis ? -_barWidth / 2 : (xBarScale.bandwidth() - _barWidth) / 2;\n\n let barTotalValue = 0;\n\n const barsToDisplay = singleChartData.chartData.filter(point => point.data !== 0);\n\n if (!barsToDisplay.length) {\n return undefined;\n }\n\n const { gapHeight, heightValueScale, absStackTotal } = _getBarGapAndScale(barsToDisplay, yBarScale);\n\n if (heightValueScale < 0) {\n return undefined;\n }\n\n const yBaseline = containerHeight - _margins.bottom! - yBarScale(Y_ORIGIN);\n let yPositiveStart = yBaseline;\n let yNegativeStart = yBaseline;\n let yPoint = 0;\n let heightOfLastBar = 0;\n\n const singleBar = barsToDisplay.map((point: VSChartDataPoint, index: number) => {\n const startColor = point.color ? point.color : _colors[index];\n const ref: RefArrayData = {};\n const shouldHighlight = _isLegendHighlighted(point.legend) || _noLegendHighlighted() ? true : false;\n const rectFocusProps = !shouldFocusWholeStack && {\n 'aria-label': _getAriaLabel(singleChartData, point),\n onMouseOver: (event: React.MouseEvent<SVGElement, MouseEvent>) =>\n _onRectHover(singleChartData.xAxisPoint, point, startColor, event),\n onMouseMove: (event: React.MouseEvent<SVGElement, MouseEvent>) =>\n _onRectHover(singleChartData.xAxisPoint, point, startColor, event),\n onMouseLeave: _handleMouseOut,\n onFocus: () => _onRectFocus(point, singleChartData.xAxisPoint as string, startColor, ref),\n onBlur: _handleMouseOut,\n onClick: (event: React.MouseEvent<SVGElement, MouseEvent>) => _onClick(point, event),\n role: 'img',\n tabIndex: !props.hideTooltip && shouldHighlight ? 0 : undefined,\n };\n\n let barHeight = Math.abs(heightValueScale * point.data);\n // FIXME: The current scaling logic may produce different min and gap heights for each bar stack.\n const minHeight = Math.max((heightValueScale * absStackTotal) / 100.0, barMinimumHeight);\n if (barHeight < minHeight) {\n barHeight = minHeight;\n }\n const gapOffset = index ? gapHeight : 0;\n if (point.data >= Y_ORIGIN) {\n yPositiveStart -= barHeight + gapOffset;\n yPoint = yPositiveStart;\n } else {\n yPoint = yNegativeStart + gapOffset;\n yNegativeStart = yPoint + barHeight;\n }\n\n barTotalValue += point.data;\n heightOfLastBar = index === barsToDisplay.length - 1 ? barHeight : 0;\n\n if (barCornerRadius && barHeight > barCornerRadius && index === barsToDisplay.length - 1) {\n return (\n <React.Fragment key={index + indexNumber + `${shouldFocusWholeStack}`}>\n <path\n className={classes.opacityChangeOnHover}\n d={`\n M ${xPoint} ${yPoint + barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${-barCornerRadius}\n h ${_barWidth - 2 * barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${barCornerRadius}\n v ${barHeight - barCornerRadius}\n h ${-_barWidth}\n z\n `}\n fill={startColor}\n rx={props.roundCorners ? 3 : 0}\n ref={e => (ref.refElement = e)}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n cursor={props.href ? 'pointer' : 'default'}\n {...rectFocusProps}\n />\n </React.Fragment>\n );\n }\n if (barHeight < 0) {\n return <React.Fragment key={index + indexNumber}> </React.Fragment>;\n }\n return (\n <React.Fragment key={index + indexNumber}>\n <rect\n className={classes.opacityChangeOnHover}\n x={xPoint}\n y={yPoint}\n width={_barWidth}\n height={barHeight}\n fill={startColor}\n opacity={shouldHighlight ? 1 : 0.1}\n cursor={props.href ? 'pointer' : 'default'}\n rx={props.roundCorners ? 3 : 0}\n ref={e => (ref.refElement = e)}\n {...rectFocusProps}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />\n </React.Fragment>\n );\n });\n const groupRef: RefArrayData = {};\n const stackFocusProps = shouldFocusWholeStack && {\n 'aria-label': _getAriaLabel(singleChartData),\n onMouseOver: (event: any) => _onStackHover(singleChartData, event),\n onMouseMove: (event: any) => _onStackHover(singleChartData, event),\n onMouseLeave: _handleMouseOut,\n onFocus: () => _onStackFocus(singleChartData, groupRef),\n onBlur: _handleMouseOut,\n onClick: (event: any) => _onClick(singleChartData, event),\n role: 'img',\n tabIndex: !props.hideTooltip ? 0 : undefined,\n };\n let showLabel = false;\n let barLabel = 0;\n if (!props.hideLabels) {\n if (_noLegendHighlighted()) {\n showLabel = true;\n barLabel = barTotalValue;\n } else {\n barsToDisplay.forEach(point => {\n if (_isLegendHighlighted(point.legend)) {\n showLabel = true;\n barLabel += point.data;\n }\n });\n }\n }\n return (\n <g key={indexNumber + `${shouldFocusWholeStack}`}>\n <g id={`${indexNumber}-singleBar`} ref={e => (groupRef.refElement = e)} {...stackFocusProps}>\n {singleBar}\n </g>\n {!props.hideLabels && _barWidth >= 16 && showLabel && (\n <text\n x={xPoint + _barWidth / 2}\n //if total bar value >=0, show label above top bar, otherwise below bottom bar\n y={barLabel >= Y_ORIGIN ? yPoint - 6 : yPoint + heightOfLastBar + 12}\n textAnchor=\"middle\"\n className={classes.barLabel}\n aria-label={`Total: ${barLabel}`}\n role=\"img\"\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n >\n {typeof props.yAxisTickFormat === 'function'\n ? props.yAxisTickFormat(barLabel)\n : formatScientificLimitWidth(barLabel)}\n </text>\n )}\n </g>\n );\n });\n if (!props.showXAxisLablesTooltip) {\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return bars.filter((bar): bar is JSX.Element => !!bar);\n }\n\n function _getMinMaxOfYAxis(\n dataset: DataPoint[],\n yAxisType?: YAxisType,\n useSecondaryYScale?: boolean,\n ): { startValue: number; endValue: number } {\n if (!useSecondaryYScale) {\n return findVSBCNumericMinMaxOfY(dataset);\n }\n\n const values: number[] = [];\n props.data.forEach(xPoint => {\n xPoint.lineData?.forEach(point => {\n // useSecondaryYScale is applicable only for lines in VSBC\n if (point.useSecondaryYScale) {\n values.push(point.y);\n }\n });\n });\n\n return { startValue: d3Min(values)!, endValue: d3Max(values)! };\n }\n\n if (!_isChartEmpty()) {\n _adjustProps();\n const _isHavingLines = props.data.some(\n (item: VerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = _toFocusWholeStack(_isHavingLines);\n _dataset = _createDataSetLayer();\n const legendBars: JSX.Element = _getLegendData(_points, _createLegendsForLine(props.data));\n const calloutProps: ModifiedCartesianChartProps['calloutProps'] = {\n color: color,\n legend: calloutLegend,\n XValue: xCalloutValue!,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n YValueHover: YValueHover,\n hoverXValue: hoverXValue,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData),\n clickPosition: clickPosition,\n isPopoverOpen: isPopoverOpen,\n isCalloutForStack:\n props.isCalloutForStack || (_isHavingLines && (_noLegendHighlighted() || _getHighlightedLegend().length > 1)),\n isCartesian: true,\n customCallout: {\n customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n };\n const tickParams = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n return (\n <CartesianChart\n {...props}\n chartTitle={_getChartTitle()}\n points={_dataset}\n chartType={ChartTypes.VerticalStackedBarChart}\n xAxisType={_xAxisType}\n getMinMaxOfYAxis={_getMinMaxOfYAxis}\n calloutProps={calloutProps}\n createYAxis={createNumericYAxis}\n tickParams={tickParams}\n legendBars={legendBars}\n datasetForXAxisDomain={_xAxisLabels}\n isCalloutForStack={shouldFocusWholeStack}\n getDomainNRangeValues={_getDomainNRangeValues}\n createStringYAxis={createStringYAxis}\n barwidth={_barWidth}\n getmargins={_getMargins}\n getGraphData={_getGraphData}\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={!isScalePaddingDefined(props.xAxisInnerPadding, props.xAxisPadding)}\n /* eslint-disable react/jsx-no-bind */\n children={(props: ChildProps) => {\n return (\n <>\n <g>{_bars}</g>\n <g>\n {_isHavingLines &&\n _createLines(\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 return <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />;\n};\nVerticalStackedBarChart.displayName = 'VerticalStackedBarChart';\n"],"names":["React","max","d3Max","min","d3Min","select","d3Select","useVerticalStackedBarChartStyles","scaleLinear","d3ScaleLinear","scaleBand","d3ScaleBand","scaleUtc","d3ScaleUtc","scaleTime","d3ScaleTime","useId","tokens","CartesianChart","ChartPopover","Legends","ChartTypes","getAccessibleDataObject","XAxisTypes","getTypeOfAxis","tooltipOfAxislabels","formatScientificLimitWidth","getBarWidth","getScalePadding","isScalePaddingDefined","calculateAppropriateBarWidth","formatDate","areArraysEqual","calculateLongestLabelWidth","useRtl","DataVizPalette","getColorFromToken","findVSBCNumericMinMaxOfY","createNumericYAxis","domainRangeOfDateForAreaLineVerticalBarChart","domainRangeOfVSBCNumeric","domainRangeOfXStringAxis","createStringYAxis","toImage","barGapMultiplier","barGapMin","MIN_DOMAIN_MARGIN","CircleVisbility","VerticalStackedBarChart","props","_isRtl","_createLegendsForLine","data","_getLineLegends","_tooltipId","_emptyChartId","_points","_dataset","_xAxisLabels","_bars","_xAxisType","length","xAxisPoint","StringAxis","_barWidth","_colors","_margins","_lineObject","_yMax","_yMin","_calloutAnchorPoint","_domainMargin","_xAxisInnerPadding","_xAxisOuterPadding","cartesianChartRef","useRef","Y_ORIGIN","_legendsRef","selectedLegends","setSelectedLegends","useState","legendProps","activeLegend","setActiveLegend","undefined","dataForHoverCard","setDataForHoverCard","color","setColor","hoverXValue","setHoverXValue","YValueHover","setYValueHover","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","activeXAxisDataPoint","setActiveXAxisDataPoint","calloutLegend","setCalloutLegend","stackCalloutProps","setStackCalloutProps","dataPointCalloutProps","setDataPointCalloutProps","callOutAccessibilityData","setCallOutAccessibilityData","clickPosition","setClickPosition","x","y","isPopoverOpen","setPopoverOpen","prevPropsRef","useEffect","current","prevProps","height","width","_adjustProps","_createDataSetLayer","useImperativeHandle","componentRef","chartContainer","opts","toSVG","_getLegendData","lineLegends","hideLegend","defaultPalette","color6","color1","color5","color7","color10","actions","allowHoverOnLegend","forEach","singleChartData","chartData","point","Math","floor","random","checkSimilarLegends","filter","leg","title","legend","hoverAction","_handleChartMouseLeave","_onLegendHover","onMouseOutAction","_onLegendLeave","push","legendsOfLine","isLineLegendInBarChart","totalLegends","concat","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onChange","_onLegendSelectionChange","legendRef","_getHighlightedLegend","_lineHoverOut","_lineHoverFocus","lineData","xItem","yAxisCalloutData","_onStackHoverFocus","stack","mouseEvent","clientX","clientY","boundingRect","getBoundingClientRect","left","top","_noLegendHighlighted","dataPoint","_isLegendHighlighted","isLinesPresent","item","shouldDrawBorderBottom","_updatePosition","sort","a","b","slice","reverse","Date","useUTC","stackCallOutAccessibilityData","_onClick","onBarClick","href","window","location","barWidth","maxBarWidth","defaultColors","_getFormattedLineData","xAxisInnerPadding","xAxisPadding","xAxisOuterPadding","tempArr","dataset","map","singlePointData","total","legendTitle","_selectedLegends","event","currentLegend","canSelectMultipleLegends","_getMargins","margins","_getGraphData","xScale","yScale","containerHeight","containerWidth","xElement","xBarScale","yBarScale","_getScales","_createBar","_getAxisData","yAxisData","yAxisDomainValues","domainValue","yMaxValue","yMinValue","includes","_getAriaLabel","xValue","xAxisCalloutData","pointValues","pt","yValue","join","lineValues","ln","ariaLabel","_getCustomizedCallout","_isHavingLines","some","onRenderCalloutPerStack","onRenderCalloutPerDataPoint","_renderCallout","_toFocusWholeStack","isCalloutForStack","shouldFocusStackOnly","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","tickValues","shiftX","domainNRangeValue","NumericAxis","DateAxis","linesData","formattedLineData","index","line","lineObject","Object","keys","_createLines","yScalePrimary","yScaleSecondary","lines","borderForLines","dots","lineBorderWidth","lineOptions","Number","parseFloat","toString","xScaleBandwidthTranslate","bandwidth","shouldHighlight","i","x1","useSecondaryYScale","y1","x2","y2","key","opacity","strokeWidth","fill","strokeLinecap","stroke","colorNeutralBackground1","transform","strokeDasharray","onMouseOver","_lineHover","bind","onMouseLeave","circlePoint","subIndex","circleRef","refElement","noBarsAndLinesActive","circle","cx","cy","_onStackHover","r","_getCircleVisibilityAndRadius","radius","visibility","ref","e","tabIndex","hideTooltip","onFocus","_lineFocus","onBlur","_handleMouseOut","role","culture","XValue","YValue","_onRectHover","persist","_onRectFocusHover","chartDataPoint","xAxisDataPoint","_onRectFocus","_onStackFocus","groupRef","_getBarGapAndScale","bars","defaultTotalHeight","barGapMax","totalData","reduce","iter","value","abs","totalHeight","sumOfPercent","scalingRatio","gaps","gapHeight","heightValueScale","absStackTotal","yDomain","domain","range","bottom","xMax","xMin","right","nice","sDate","lDate","paddingInner","paddingOuter","_isChartEmpty","newX","newY","threshold","distance","sqrt","pow","_getDomainMargins","totalWidth","barGapRate","reqWidth","mode","margin1","margin2","POSITIVE_INFINITY","hideTickOverlap","step","_getChartTitle","chartTitle","numLines","classes","barCornerRadius","barMinimumHeight","shouldFocusWholeStack","indexNumber","xPoint","barTotalValue","barsToDisplay","yBaseline","yPositiveStart","yNegativeStart","yPoint","heightOfLastBar","singleBar","startColor","rectFocusProps","onMouseMove","onClick","barHeight","minHeight","gapOffset","Fragment","path","className","opacityChangeOnHover","d","rx","roundCorners","cursor","rect","stackFocusProps","showLabel","barLabel","hideLabels","g","id","text","textAnchor","aria-label","yAxisTickFormat","showXAxisLablesTooltip","document","getElementById","remove","wrapXAxisLables","xAxisElement","call","tooltipProps","tooltipCls","tooltip","axis","bar","_getMinMaxOfYAxis","yAxisType","values","startValue","endValue","legendBars","calloutProps","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","tickFormat","getMinMaxOfYAxis","createYAxis","datasetForXAxisDomain","getDomainNRangeValues","barwidth","getmargins","getGraphData","getAxisData","onChartMouseLeave","getDomainMargins","showRoundOffXTickValues","children","div","style","displayName"],"mappings":";;;;+BAuFagD;;;;;;;iEAvFU,QAAQ;yBACY,WAAW;6BAEnB,eAAe;wDACD,4CAA4C;yBAOtF,WAAW;gCACI,4BAA4B;4BAC3B,wBAAwB;uBAmBxC,cAAc;wBA2Bd,wBAAwB;kCACP,qCAAqC;AAI7D,MAAMJ,mBAAmB;AACzB,MAAMC,YAAY;AAClB,MAAMC,oBAAoB;AAY1B,IAAKC,kBAAAA,WAAAA,GAAAA,SAAAA,eAAAA;;;WAAAA;EAAAA,mBAAAA,CAAAA;AASE,gCAAuFE,CAAAA;QA6B/BA;IA5B7D,MAAMC,aAAkBhB,cAAAA;IACxB,MAAMiB,wBAA8E,CAClFC,OACGC,gBAAgBD;IACrB,MAAME,iBAAqBtC,qBAAAA,EAAM;IACjC,MAAMuC,oBAAwBvC,qBAAAA,EAAM;IACpC,IAAIwC,UAAuC,EAAE;IAC7C,IAAIC;IACJ,IAAIC,eAAyB,EAAE;IAC/B,IAAIC;IACJ,IAAIC,aACFX,MAAMG,IAAI,IAAKH,MAAMG,IAAI,CAAES,MAAM,GAAG,QAC/BrC,qBAAAA,EAAcyB,MAAMG,IAAI,CAAC,EAAE,CAAEU,UAAU,EAAE,QAC1CvC,kBAAAA,CAAWwC,UAAU;IAC3B,IAAIC,YAAoB;IACxB,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC,gBAAwBzB;IAC5B,IAAI0B,qBAA6B;IACjC,IAAIC,qBAA6B;IACjC,MAAMC,oBAAoB1E,OAAM2E,MAAM,CAAQ;IAC9C,MAAMC,WAAmB;IACzB,MAAMC,cAAc7E,OAAM2E,MAAM,CAAkB;IAElD,MAAM,CAACG,iBAAiBC,mBAAmB,GAAG/E,OAAMgF,QAAQ,CAAC/B,CAAAA,CAAAA,qBAAAA,MAAMgC,W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iV,YAAYD;YACZ/H,QAAQzM;YACR0M,WAAW9O,kBAAAA,CAAW2B,uBAAuB;YAC7CqN,WAAWzM;YACX0Y,kBAAkBd;YAClBM,cAAcA;YACdS,aAAaja,0BAAAA;YACb8Z,YAAYA;YACZP,YAAYA;YACZW,uBAAuB9Y;YACvBqM,mBAAmBwI;YACnBkE,uBAAuBxM;YACvBvN,mBAAmBA,yBAAAA;YACnBga,UAAU1Y;YACV2Y,YAAYhP;YACZiP,cAAc/O;YACdgP,aAAatO;YACbuO,mBAAmBxT;YACnByT,kBAAkBxF;YACjB,GAAI3T,eAAerC,kBAAAA,CAAWwC,UAAU,IAAI;gBAC3C+I,mBAAmBtI;gBACnBwI,mBAAmBvI;YACrB,CAAC;YACDiD,cAAchD;YACdsY,yBAAyB,CAACnb,iCAAAA,EAAsBoB,MAAM6J,iBAAiB,EAAE7J,MAAM8J,YAAY;YAC3F,oCAAoC,GACpCkQ,UAAU,CAACha;gBACT,OAAA,WAAA,GACE,OAAA,aAAA,CAAA,OAAA,QAAA,EAAA,MAAA,WAAA,GACE,OAAA,aAAA,CAACqX,KAAAA,MAAG3W,QAAAA,WAAAA,GACJ,OAAA,aAAA,CAAC2W,KAAAA,MACE7K,kBACCyB,aACEjO,MAAM6K,MAAM,EACZ7K,MAAMkO,aAAa,EACnBlO,MAAM+K,eAAe,EACrB/K,MAAMgL,cAAc,EACpBhL,MAAMmO,eAAe;YAKjC;;IAGN;IACA,OAAA,WAAA,GAAO,OAAA,aAAA,CAAC8L,OAAAA;QAAI3C,IAAIhX;QAAeiR,MAAM;QAAS2I,OAAO;YAAE5K,SAAS;QAAI;QAAGmI,cAAY;;AACrF,EAAE;AACF1X,wBAAwBoa,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["VerticalStackedBarChart.types.ts"],"sourcesContent":["import * as React from 'react';\n//import { ICalloutProps } from '@fluentui/react/lib/Callout';\nimport { RenderFunction } from '../../utilities/index';\nimport {\n CartesianChartProps,\n CartesianChartStyleProps,\n CartesianChartStyles,\n LineChartLineOptions,\n VerticalStackedChartProps,\n VSChartDataPoint,\n} from '../../index';\n\n/**\n * Vertical Stacked Bar Chart properties\n * {@docCategory VerticalStackedBarChart}\n */\nexport interface VerticalStackedBarChartProps extends CartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data: VerticalStackedChartProps[];\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 */\n barWidth?: number | 'default' | 'auto';\n\n /**\n * Gap (max) between bars in a stack. When non-zero, the bars in a stack will\n * be separated by gaps. The actual size of each gap is calculated as 20% of\n * the height of that stack, with a minimum size of 1px and a maximum given by\n * this prop.\n * @default 0\n */\n barGapMax?: number;\n\n /**\n * Corner radius of the bars\n * @default 0\n */\n barCornerRadius?: number;\n\n /**\n * The minimum height of a bar; bars below this height will be displayed at\n * this height. Note that this setting will result in the height of these data\n * points not being to scale.\n * @default 0\n */\n barMinimumHeight?: number;\n\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * To display multi stack callout or single callout\n * @default flase\n */\n isCalloutForStack?: boolean;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: Partial<VerticalStackedBarChartStyles>;\n\n /**\n * Define a custom callout renderer for a stack; default is to render per data point\n */\n onRenderCalloutPerStack?: RenderFunction<VerticalStackedChartProps>;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: RenderFunction<VSChartDataPoint>;\n\n /**\n * yMinValue is supported for bar charts that has only lines\n */\n yMinValue?: number | undefined;\n\n /**\n * Allow hover actions on the legend\n * @default true\n */\n allowHoverOnLegend?: boolean;\n\n /**\n * Click handler for bars; type of data is dependant on isCalloutForStack\n */\n onBarClick?: (event: React.MouseEvent<SVGElement>, data: VerticalStackedChartProps | VSChartDataPoint) => void;\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';\n}\n\n/**\n * Vertical Stacked Bar Chart style properties\n * {@docCategory VerticalStackedBarChart}\n */\nexport interface VerticalStackedBarChartStyleProps extends CartesianChartStyleProps {}\n\n/**\n * Vertical Stacked Bar Chart styles\n * {@docCategory VerticalStackedBarChart}\n */\nexport interface VerticalStackedBarChartStyles extends CartesianChartStyles {\n /**\n * Style to change the opacity of bars in dataviz when we hover on a single bar or legends\n */\n opacityChangeOnHover?: string;\n\n /**\n * Style for the bar labels\n */\n barLabel: string;\n}\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
1
+ {"version":3,"sources":["../src/components/VerticalStackedBarChart/VerticalStackedBarChart.types.ts"],"sourcesContent":["import * as React from 'react';\n//import { ICalloutProps } from '@fluentui/react/lib/Callout';\nimport { RenderFunction } from '../../utilities/index';\nimport {\n CartesianChartProps,\n CartesianChartStyleProps,\n CartesianChartStyles,\n LineChartLineOptions,\n VerticalStackedChartProps,\n VSChartDataPoint,\n} from '../../index';\n\n/**\n * Vertical Stacked Bar Chart properties\n * {@docCategory VerticalStackedBarChart}\n */\nexport interface VerticalStackedBarChartProps extends CartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data: VerticalStackedChartProps[];\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 */\n barWidth?: number | 'default' | 'auto';\n\n /**\n * Gap (max) between bars in a stack. When non-zero, the bars in a stack will\n * be separated by gaps. The actual size of each gap is calculated as 20% of\n * the height of that stack, with a minimum size of 1px and a maximum given by\n * this prop.\n * @default 0\n */\n barGapMax?: number;\n\n /**\n * Corner radius of the bars\n * @default 0\n */\n barCornerRadius?: number;\n\n /**\n * The minimum height of a bar; bars below this height will be displayed at\n * this height. Note that this setting will result in the height of these data\n * points not being to scale.\n * @default 0\n */\n barMinimumHeight?: number;\n\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * To display multi stack callout or single callout\n * @default flase\n */\n isCalloutForStack?: boolean;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: Partial<VerticalStackedBarChartStyles>;\n\n /**\n * Define a custom callout renderer for a stack; default is to render per data point\n */\n onRenderCalloutPerStack?: RenderFunction<VerticalStackedChartProps>;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: RenderFunction<VSChartDataPoint>;\n\n /**\n * yMinValue is supported for bar charts that has only lines\n */\n yMinValue?: number | undefined;\n\n /**\n * Allow hover actions on the legend\n * @default true\n */\n allowHoverOnLegend?: boolean;\n\n /**\n * Click handler for bars; type of data is dependant on isCalloutForStack\n */\n onBarClick?: (event: React.MouseEvent<SVGElement>, data: VerticalStackedChartProps | VSChartDataPoint) => void;\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';\n}\n\n/**\n * Vertical Stacked Bar Chart style properties\n * {@docCategory VerticalStackedBarChart}\n */\nexport interface VerticalStackedBarChartStyleProps extends CartesianChartStyleProps {}\n\n/**\n * Vertical Stacked Bar Chart styles\n * {@docCategory VerticalStackedBarChart}\n */\nexport interface VerticalStackedBarChartStyles extends CartesianChartStyles {\n /**\n * Style to change the opacity of bars in dataviz when we hover on a single bar or legends\n */\n opacityChangeOnHover?: string;\n\n /**\n * Style for the bar labels\n */\n barLabel: string;\n}\n"],"names":["React"],"mappings":";;;;;iEAAuB,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './VerticalStackedBarChart';\nexport * from './VerticalStackedBarChart.types';\nexport * from '../../types/index';\n"],"names":[],"rangeMappings":";;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA"}
1
+ {"version":3,"sources":["../src/components/VerticalStackedBarChart/index.ts"],"sourcesContent":["export * from './VerticalStackedBarChart';\nexport * from './VerticalStackedBarChart.types';\nexport * from '../../types/index';\n"],"names":[],"mappings":";;;;;uBAAc,4BAA4B;uBAC5B,kCAAkC;uBAClC,oBAAoB"}
@@ -112,4 +112,4 @@ const useVerticalStackedBarChartStyles = (props)=>{
112
112
  tooltip: (0, _react.mergeClasses)(verticalstackedbarchartClassNames.tooltip, baseStyles.tooltip),
113
113
  barLabel: (0, _react.mergeClasses)(verticalstackedbarchartClassNames.barLabel, baseStyles.barLabel)
114
114
  };
115
- }; //# sourceMappingURL=useVerticalStackedBarChartStyles.styles.js.map
115
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["useVerticalStackedBarChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const verticalstackedbarchartClassNames = {\n opacityChangeOnHover: 'fui-vsbc__opacityChangeOnHover',\n tooltip: 'fui-vsbc__tooltip',\n barLabel: 'fui-vsbc__barLabel',\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};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n cursor: 'default'\n },\n tooltip: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.padding(tokens.spacingHorizontalS),\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n fill: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none'\n },\n barLabel: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n }\n});\nexport const useVerticalStackedBarChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(verticalstackedbarchartClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover, props.href ? 'pointer' : 'default'),\n tooltip: mergeClasses(verticalstackedbarchartClassNames.tooltip, baseStyles.tooltip),\n barLabel: mergeClasses(verticalstackedbarchartClassNames.barLabel, baseStyles.barLabel)\n };\n};\n"],"names":["useVerticalStackedBarChartStyles","verticalstackedbarchartClassNames","opacityChangeOnHover","tooltip","barLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","useStyles","__styles","Bceei9c","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","Bkfmm31","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","Bvjb7m6","d","p","props","baseStyles","mergeClasses","href"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAyCaA,gCAAgC;eAAhCA;;IAvCAC,iCAAiC;eAAjCA;;;uBAFwC;AAE9C,MAAMA,oCAAoC;IAC7CC,sBAAsB;IACtBC,SAAS;IACTC,UAAU;IACVC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;AACX;AACA,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAhB,sBAAA;QAAAiB,SAAA;IAAA;IAAAhB,SAAA;QAAAiB,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,SAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;IAAA;IAAAnC,UAAA;QAAAgB,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAU,SAAA;QAAAO,SAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAAC,GAAA,CAAA;YAAA;SAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAsBX,MAAM1C,mCAAoC2C,CAAAA;IAC7C,MAAMC,aAAa3B;IACnB,OAAO;QACHf,sBAAsB2C,IAAAA,mBAAY,EAAC5C,kCAAkCC,oBAAoB,EAAE0C,WAAW1C,oBAAoB,EAAEyC,MAAMG,IAAI,GAAG,YAAY;QACrJ3C,SAAS0C,IAAAA,mBAAY,EAAC5C,kCAAkCE,OAAO,EAAEyC,WAAWzC,OAAO;QACnFC,UAAUyC,IAAAA,mBAAY,EAAC5C,kCAAkCG,QAAQ,EAAEwC,WAAWxC,QAAQ;IAC1F;AACJ"}
1
+ {"version":3,"sources":["useVerticalStackedBarChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const verticalstackedbarchartClassNames = {\n opacityChangeOnHover: 'fui-vsbc__opacityChangeOnHover',\n tooltip: 'fui-vsbc__tooltip',\n barLabel: 'fui-vsbc__barLabel',\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};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n cursor: 'default'\n },\n tooltip: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.padding(tokens.spacingHorizontalS),\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n fill: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none'\n },\n barLabel: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n }\n});\nexport const useVerticalStackedBarChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(verticalstackedbarchartClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover, props.href ? 'pointer' : 'default'),\n tooltip: mergeClasses(verticalstackedbarchartClassNames.tooltip, baseStyles.tooltip),\n barLabel: mergeClasses(verticalstackedbarchartClassNames.barLabel, baseStyles.barLabel)\n };\n};\n"],"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","verticalstackedbarchartClassNames","opacityChangeOnHover","tooltip","barLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","useStyles","Bceei9c","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","Bkfmm31","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","Bvjb7m6","d","p","useVerticalStackedBarChartStyles","props","baseStyles","href"],"mappings":";;;;;;;;;;;oCAyC6C;eAAhC8C;;IAvCAzC,iCAAiC;;;;uBAFO,gBAAgB;AAE9D,0CAA0C;IAC7CC,oBAAoB,EAAE,gCAAgC;IACtDC,OAAO,EAAE,mBAAmB;IAC5BC,QAAQ,EAAE,oBAAoB;IAC9BC,IAAI,EAAE,EAAE;IACRC,KAAK,EAAE,EAAE;IACTC,KAAK,EAAE,EAAE;IACTC,eAAe,EAAE,EAAE;IACnBC,KAAK,EAAE,EAAE;IACTC,kBAAkB,EAAE,EAAE;IACtBC,SAAS,E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