@fluentui/react-charts 9.3.27 → 9.3.29

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 (440) hide show
  1. package/CHANGELOG.md +32 -2
  2. package/dist/index.d.cts +51 -0
  3. package/dist/index.d.ts +51 -0
  4. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +1 -4
  5. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
  6. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -1
  7. package/lib/components/AnnotationOnlyChart/index.js.map +1 -1
  8. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -1
  9. package/lib/components/AreaChart/AreaChart.js +35 -5
  10. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  11. package/lib/components/AreaChart/AreaChart.types.js.map +1 -1
  12. package/lib/components/AreaChart/index.js.map +1 -1
  13. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  14. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  15. package/lib/components/ChartTable/ChartTable.types.js.map +1 -1
  16. package/lib/components/ChartTable/index.js.map +1 -1
  17. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  18. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +19 -29
  19. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
  20. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -1
  21. package/lib/components/CommonComponents/Annotations/index.js.map +1 -1
  22. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +2 -2
  23. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -1
  24. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +2 -2
  25. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -1
  26. package/lib/components/CommonComponents/CartesianChart.js +17 -15
  27. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  28. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  29. package/lib/components/CommonComponents/ChartPopover.js +3 -2
  30. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  31. package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -1
  32. package/lib/components/CommonComponents/index.js.map +1 -1
  33. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  34. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  35. package/lib/components/DeclarativeChart/DeclarativeChart.js +9 -9
  36. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  37. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +4 -4
  38. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  39. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +92 -110
  40. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  41. package/lib/components/DeclarativeChart/index.js.map +1 -1
  42. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  43. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
  44. package/lib/components/DonutChart/Arc/index.js.map +1 -1
  45. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  46. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  47. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  48. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  49. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
  50. package/lib/components/DonutChart/Pie/index.js.map +1 -1
  51. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -1
  52. package/lib/components/DonutChart/index.js.map +1 -1
  53. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  54. package/lib/components/FunnelChart/FunnelChart.js +5 -5
  55. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  56. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
  57. package/lib/components/FunnelChart/funnelGeometry.js.map +1 -1
  58. package/lib/components/FunnelChart/index.js.map +1 -1
  59. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
  60. package/lib/components/GanttChart/GanttChart.js +4 -3
  61. package/lib/components/GanttChart/GanttChart.js.map +1 -1
  62. package/lib/components/GanttChart/GanttChart.types.js.map +1 -1
  63. package/lib/components/GanttChart/index.js.map +1 -1
  64. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
  65. package/lib/components/GaugeChart/GaugeChart.js +34 -13
  66. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  67. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  68. package/lib/components/GaugeChart/index.js.map +1 -1
  69. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
  70. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +45 -46
  71. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  72. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  73. package/lib/components/GroupedVerticalBarChart/index.js.map +1 -1
  74. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  75. package/lib/components/HeatMapChart/HeatMapChart.js +1 -0
  76. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  77. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  78. package/lib/components/HeatMapChart/index.js.map +1 -1
  79. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
  80. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +5 -6
  81. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  82. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  83. package/lib/components/HorizontalBarChart/index.js.map +1 -1
  84. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  85. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +4 -4
  86. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  87. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  88. package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  89. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  90. package/lib/components/Legends/Legends.js +16 -20
  91. package/lib/components/Legends/Legends.js.map +1 -1
  92. package/lib/components/Legends/Legends.types.js.map +1 -1
  93. package/lib/components/Legends/OverflowMenu.js +13 -10
  94. package/lib/components/Legends/OverflowMenu.js.map +1 -1
  95. package/lib/components/Legends/index.js.map +1 -1
  96. package/lib/components/Legends/shape.js.map +1 -1
  97. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  98. package/lib/components/LineChart/LineChart.js +40 -36
  99. package/lib/components/LineChart/LineChart.js.map +1 -1
  100. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  101. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  102. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  103. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  104. package/lib/components/LineChart/index.js.map +1 -1
  105. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  106. package/lib/components/PolarChart/PolarChart.js +3 -4
  107. package/lib/components/PolarChart/PolarChart.js.map +1 -1
  108. package/lib/components/PolarChart/PolarChart.types.js.map +1 -1
  109. package/lib/components/PolarChart/PolarChart.utils.js +3 -3
  110. package/lib/components/PolarChart/PolarChart.utils.js.map +1 -1
  111. package/lib/components/PolarChart/index.js.map +1 -1
  112. package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js.map +1 -1
  113. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +1 -1
  114. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  115. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  116. package/lib/components/ResponsiveContainer/index.js.map +1 -1
  117. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -1
  118. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  119. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  120. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  121. package/lib/components/SankeyChart/index.js.map +1 -1
  122. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  123. package/lib/components/ScatterChart/ScatterChart.js +3 -3
  124. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  125. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  126. package/lib/components/ScatterChart/index.js.map +1 -1
  127. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  128. package/lib/components/Sparkline/Sparkline.js +1 -3
  129. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  130. package/lib/components/Sparkline/Sparkline.types.js.map +1 -1
  131. package/lib/components/Sparkline/index.js.map +1 -1
  132. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -1
  133. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js.map +1 -1
  134. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js.map +1 -1
  135. package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js +2 -2
  136. package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js.map +1 -1
  137. package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js +1 -0
  138. package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js.map +1 -1
  139. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +88 -88
  140. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +1 -1
  141. package/lib/components/VegaDeclarativeChart/VegaLiteTypes.js.map +1 -1
  142. package/lib/components/VegaDeclarativeChart/index.js.map +1 -1
  143. package/lib/components/VerticalBarChart/VerticalBarChart.js +2 -1
  144. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  145. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  146. package/lib/components/VerticalBarChart/index.js.map +1 -1
  147. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  148. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +6 -5
  149. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  150. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  151. package/lib/components/VerticalStackedBarChart/index.js.map +1 -1
  152. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  153. package/lib/types/ChartAnnotation.js.map +1 -1
  154. package/lib/types/DataPoint.js.map +1 -1
  155. package/lib/types/EventAnnotation.js.map +1 -1
  156. package/lib/types/LegendDataItem.js.map +1 -1
  157. package/lib/types/index.js.map +1 -1
  158. package/lib/utilities/ChartTitle.js +3 -4
  159. package/lib/utilities/ChartTitle.js.map +1 -1
  160. package/lib/utilities/Common.styles.js +1 -4
  161. package/lib/utilities/Common.styles.js.map +1 -1
  162. package/lib/utilities/Common.styles.raw.js +1 -4
  163. package/lib/utilities/Common.styles.raw.js.map +1 -1
  164. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  165. package/lib/utilities/KeyCodes.js.map +1 -1
  166. package/lib/utilities/SVGTooltipText.js.map +1 -1
  167. package/lib/utilities/async-utils.js.map +1 -1
  168. package/lib/utilities/colors.js.map +1 -1
  169. package/lib/utilities/getWindow.js.map +1 -1
  170. package/lib/utilities/hooks.js.map +1 -1
  171. package/lib/utilities/image-export-utils.js.map +1 -1
  172. package/lib/utilities/index.js.map +1 -1
  173. package/lib/utilities/overflow-utils.js.map +1 -1
  174. package/lib/utilities/scatterpolar-utils.js +3 -4
  175. package/lib/utilities/scatterpolar-utils.js.map +1 -1
  176. package/lib/utilities/string.js.map +1 -1
  177. package/lib/utilities/test-data/specialChartNames.js +11 -0
  178. package/lib/utilities/test-data/specialChartNames.js.map +1 -0
  179. package/lib/utilities/test-data.js.map +1 -1
  180. package/lib/utilities/utilities.js +9 -9
  181. package/lib/utilities/utilities.js.map +1 -1
  182. package/lib/utilities/vbc-utils.js.map +1 -1
  183. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.cjs +1 -4
  184. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.cjs.map +1 -1
  185. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.cjs.map +1 -1
  186. package/lib-commonjs/components/AnnotationOnlyChart/index.cjs.map +1 -1
  187. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.cjs.map +1 -1
  188. package/lib-commonjs/components/AreaChart/AreaChart.cjs +35 -5
  189. package/lib-commonjs/components/AreaChart/AreaChart.cjs.map +1 -1
  190. package/lib-commonjs/components/AreaChart/AreaChart.types.cjs.map +1 -1
  191. package/lib-commonjs/components/AreaChart/index.cjs.map +1 -1
  192. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.cjs +3 -3
  193. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.cjs.map +1 -1
  194. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.cjs +3 -3
  195. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.cjs.map +1 -1
  196. package/lib-commonjs/components/ChartTable/ChartTable.cjs.map +1 -1
  197. package/lib-commonjs/components/ChartTable/ChartTable.types.cjs.map +1 -1
  198. package/lib-commonjs/components/ChartTable/index.cjs.map +1 -1
  199. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.cjs +3 -3
  200. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.cjs.map +1 -1
  201. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.cjs +3 -3
  202. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.cjs.map +1 -1
  203. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.cjs +19 -29
  204. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.cjs.map +1 -1
  205. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.cjs.map +1 -1
  206. package/lib-commonjs/components/CommonComponents/Annotations/index.cjs.map +1 -1
  207. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.cjs +14 -14
  208. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.cjs.map +1 -1
  209. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.cjs +14 -14
  210. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.cjs.map +1 -1
  211. package/lib-commonjs/components/CommonComponents/CartesianChart.cjs +17 -15
  212. package/lib-commonjs/components/CommonComponents/CartesianChart.cjs.map +1 -1
  213. package/lib-commonjs/components/CommonComponents/CartesianChart.types.cjs.map +1 -1
  214. package/lib-commonjs/components/CommonComponents/ChartPopover.cjs +3 -2
  215. package/lib-commonjs/components/CommonComponents/ChartPopover.cjs.map +1 -1
  216. package/lib-commonjs/components/CommonComponents/ChartPopover.types.cjs.map +1 -1
  217. package/lib-commonjs/components/CommonComponents/index.cjs.map +1 -1
  218. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.cjs +3 -3
  219. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.cjs.map +1 -1
  220. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.cjs +3 -3
  221. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.cjs.map +1 -1
  222. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.cjs +3 -3
  223. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.cjs.map +1 -1
  224. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.cjs +3 -3
  225. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.cjs.map +1 -1
  226. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.cjs +9 -9
  227. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.cjs.map +1 -1
  228. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.cjs +13 -13
  229. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.cjs.map +1 -1
  230. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.cjs +122 -140
  231. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.cjs.map +1 -1
  232. package/lib-commonjs/components/DeclarativeChart/index.cjs.map +1 -1
  233. package/lib-commonjs/components/DonutChart/Arc/Arc.cjs.map +1 -1
  234. package/lib-commonjs/components/DonutChart/Arc/Arc.types.cjs.map +1 -1
  235. package/lib-commonjs/components/DonutChart/Arc/index.cjs.map +1 -1
  236. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.cjs +3 -3
  237. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.cjs.map +1 -1
  238. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.cjs +3 -3
  239. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.cjs.map +1 -1
  240. package/lib-commonjs/components/DonutChart/DonutChart.cjs.map +1 -1
  241. package/lib-commonjs/components/DonutChart/DonutChart.types.cjs.map +1 -1
  242. package/lib-commonjs/components/DonutChart/Pie/Pie.cjs.map +1 -1
  243. package/lib-commonjs/components/DonutChart/Pie/Pie.types.cjs.map +1 -1
  244. package/lib-commonjs/components/DonutChart/Pie/index.cjs.map +1 -1
  245. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.cjs +3 -3
  246. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.cjs.map +1 -1
  247. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.cjs +3 -3
  248. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.cjs.map +1 -1
  249. package/lib-commonjs/components/DonutChart/index.cjs.map +1 -1
  250. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.cjs +3 -3
  251. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.cjs.map +1 -1
  252. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.cjs +3 -3
  253. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.cjs.map +1 -1
  254. package/lib-commonjs/components/FunnelChart/FunnelChart.cjs +5 -5
  255. package/lib-commonjs/components/FunnelChart/FunnelChart.cjs.map +1 -1
  256. package/lib-commonjs/components/FunnelChart/FunnelChart.types.cjs.map +1 -1
  257. package/lib-commonjs/components/FunnelChart/funnelGeometry.cjs +6 -6
  258. package/lib-commonjs/components/FunnelChart/funnelGeometry.cjs.map +1 -1
  259. package/lib-commonjs/components/FunnelChart/index.cjs.map +1 -1
  260. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.cjs +3 -3
  261. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.cjs.map +1 -1
  262. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.cjs +3 -3
  263. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.cjs.map +1 -1
  264. package/lib-commonjs/components/GanttChart/GanttChart.cjs +4 -3
  265. package/lib-commonjs/components/GanttChart/GanttChart.cjs.map +1 -1
  266. package/lib-commonjs/components/GanttChart/GanttChart.types.cjs.map +1 -1
  267. package/lib-commonjs/components/GanttChart/index.cjs.map +1 -1
  268. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.cjs +3 -3
  269. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.cjs.map +1 -1
  270. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.cjs +3 -3
  271. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.cjs.map +1 -1
  272. package/lib-commonjs/components/GaugeChart/GaugeChart.cjs +41 -20
  273. package/lib-commonjs/components/GaugeChart/GaugeChart.cjs.map +1 -1
  274. package/lib-commonjs/components/GaugeChart/GaugeChart.types.cjs.map +1 -1
  275. package/lib-commonjs/components/GaugeChart/index.cjs.map +1 -1
  276. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.cjs +3 -3
  277. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.cjs.map +1 -1
  278. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.cjs +3 -3
  279. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.cjs.map +1 -1
  280. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.cjs +44 -44
  281. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.cjs.map +1 -1
  282. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.cjs.map +1 -1
  283. package/lib-commonjs/components/GroupedVerticalBarChart/index.cjs.map +1 -1
  284. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.cjs +3 -3
  285. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.cjs.map +1 -1
  286. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.cjs +3 -3
  287. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.cjs.map +1 -1
  288. package/lib-commonjs/components/HeatMapChart/HeatMapChart.cjs +1 -0
  289. package/lib-commonjs/components/HeatMapChart/HeatMapChart.cjs.map +1 -1
  290. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.cjs.map +1 -1
  291. package/lib-commonjs/components/HeatMapChart/index.cjs.map +1 -1
  292. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.cjs +3 -3
  293. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.cjs.map +1 -1
  294. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.cjs +3 -3
  295. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.cjs.map +1 -1
  296. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.cjs +5 -6
  297. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.cjs.map +1 -1
  298. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.cjs.map +1 -1
  299. package/lib-commonjs/components/HorizontalBarChart/index.cjs.map +1 -1
  300. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.cjs +3 -3
  301. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.cjs.map +1 -1
  302. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.cjs +3 -3
  303. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.cjs.map +1 -1
  304. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.cjs +4 -4
  305. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.cjs.map +1 -1
  306. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.cjs.map +1 -1
  307. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.cjs.map +1 -1
  308. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.cjs +3 -3
  309. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.cjs.map +1 -1
  310. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.cjs +3 -3
  311. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.cjs.map +1 -1
  312. package/lib-commonjs/components/Legends/Legends.cjs +16 -19
  313. package/lib-commonjs/components/Legends/Legends.cjs.map +1 -1
  314. package/lib-commonjs/components/Legends/Legends.types.cjs.map +1 -1
  315. package/lib-commonjs/components/Legends/OverflowMenu.cjs +12 -9
  316. package/lib-commonjs/components/Legends/OverflowMenu.cjs.map +1 -1
  317. package/lib-commonjs/components/Legends/index.cjs.map +1 -1
  318. package/lib-commonjs/components/Legends/shape.cjs.map +1 -1
  319. package/lib-commonjs/components/Legends/useLegendsStyles.styles.cjs +11 -11
  320. package/lib-commonjs/components/Legends/useLegendsStyles.styles.cjs.map +1 -1
  321. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.cjs +11 -11
  322. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.cjs.map +1 -1
  323. package/lib-commonjs/components/LineChart/LineChart.cjs +40 -36
  324. package/lib-commonjs/components/LineChart/LineChart.cjs.map +1 -1
  325. package/lib-commonjs/components/LineChart/LineChart.types.cjs.map +1 -1
  326. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.cjs.map +1 -1
  327. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.cjs.map +1 -1
  328. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.cjs.map +1 -1
  329. package/lib-commonjs/components/LineChart/index.cjs.map +1 -1
  330. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.cjs +3 -3
  331. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.cjs.map +1 -1
  332. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.cjs +3 -3
  333. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.cjs.map +1 -1
  334. package/lib-commonjs/components/PolarChart/PolarChart.cjs +3 -4
  335. package/lib-commonjs/components/PolarChart/PolarChart.cjs.map +1 -1
  336. package/lib-commonjs/components/PolarChart/PolarChart.types.cjs.map +1 -1
  337. package/lib-commonjs/components/PolarChart/PolarChart.utils.cjs +10 -10
  338. package/lib-commonjs/components/PolarChart/PolarChart.utils.cjs.map +1 -1
  339. package/lib-commonjs/components/PolarChart/index.cjs.map +1 -1
  340. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.cjs +3 -3
  341. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.cjs.map +1 -1
  342. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.cjs +3 -3
  343. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.cjs.map +1 -1
  344. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.cjs +1 -1
  345. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.cjs.map +1 -1
  346. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.cjs.map +1 -1
  347. package/lib-commonjs/components/ResponsiveContainer/index.cjs.map +1 -1
  348. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.cjs +3 -3
  349. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.cjs.map +1 -1
  350. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.cjs +3 -3
  351. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.cjs.map +1 -1
  352. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.cjs.map +1 -1
  353. package/lib-commonjs/components/SankeyChart/SankeyChart.cjs +5 -5
  354. package/lib-commonjs/components/SankeyChart/SankeyChart.cjs.map +1 -1
  355. package/lib-commonjs/components/SankeyChart/SankeyChart.types.cjs.map +1 -1
  356. package/lib-commonjs/components/SankeyChart/index.cjs.map +1 -1
  357. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.cjs +3 -3
  358. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.cjs.map +1 -1
  359. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.cjs +3 -3
  360. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.cjs.map +1 -1
  361. package/lib-commonjs/components/ScatterChart/ScatterChart.cjs +3 -3
  362. package/lib-commonjs/components/ScatterChart/ScatterChart.cjs.map +1 -1
  363. package/lib-commonjs/components/ScatterChart/ScatterChart.types.cjs.map +1 -1
  364. package/lib-commonjs/components/ScatterChart/index.cjs.map +1 -1
  365. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.cjs +3 -3
  366. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.cjs.map +1 -1
  367. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.cjs +3 -3
  368. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.cjs.map +1 -1
  369. package/lib-commonjs/components/Sparkline/Sparkline.cjs +1 -3
  370. package/lib-commonjs/components/Sparkline/Sparkline.cjs.map +1 -1
  371. package/lib-commonjs/components/Sparkline/Sparkline.types.cjs.map +1 -1
  372. package/lib-commonjs/components/Sparkline/index.cjs.map +1 -1
  373. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.cjs +3 -3
  374. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.cjs.map +1 -1
  375. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.cjs +3 -3
  376. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.cjs.map +1 -1
  377. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChart.cjs.map +1 -1
  378. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.cjs +3 -3
  379. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.cjs.map +1 -1
  380. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteColorAdapter.cjs +7 -7
  381. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteColorAdapter.cjs.map +1 -1
  382. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.cjs +1 -0
  383. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.cjs.map +1 -1
  384. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.cjs +105 -105
  385. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.cjs.map +1 -1
  386. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteTypes.cjs.map +1 -1
  387. package/lib-commonjs/components/VegaDeclarativeChart/index.cjs.map +1 -1
  388. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.cjs +2 -1
  389. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.cjs.map +1 -1
  390. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.cjs.map +1 -1
  391. package/lib-commonjs/components/VerticalBarChart/index.cjs.map +1 -1
  392. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.cjs +3 -3
  393. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.cjs.map +1 -1
  394. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.cjs +3 -3
  395. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.cjs.map +1 -1
  396. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.cjs +6 -5
  397. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.cjs.map +1 -1
  398. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.cjs.map +1 -1
  399. package/lib-commonjs/components/VerticalStackedBarChart/index.cjs.map +1 -1
  400. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.cjs +3 -3
  401. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.cjs.map +1 -1
  402. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.cjs +3 -3
  403. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.cjs.map +1 -1
  404. package/lib-commonjs/types/ChartAnnotation.cjs.map +1 -1
  405. package/lib-commonjs/types/DataPoint.cjs.map +1 -1
  406. package/lib-commonjs/types/EventAnnotation.cjs.map +1 -1
  407. package/lib-commonjs/types/LegendDataItem.cjs.map +1 -1
  408. package/lib-commonjs/types/index.cjs.map +1 -1
  409. package/lib-commonjs/utilities/ChartTitle.cjs +3 -4
  410. package/lib-commonjs/utilities/ChartTitle.cjs.map +1 -1
  411. package/lib-commonjs/utilities/Common.styles.cjs +9 -12
  412. package/lib-commonjs/utilities/Common.styles.cjs.map +1 -1
  413. package/lib-commonjs/utilities/Common.styles.raw.cjs +9 -12
  414. package/lib-commonjs/utilities/Common.styles.raw.cjs.map +1 -1
  415. package/lib-commonjs/utilities/FocusableTooltipText.cjs.map +1 -1
  416. package/lib-commonjs/utilities/KeyCodes.cjs.map +1 -1
  417. package/lib-commonjs/utilities/SVGTooltipText.cjs.map +1 -1
  418. package/lib-commonjs/utilities/async-utils.cjs.map +1 -1
  419. package/lib-commonjs/utilities/colors.cjs +7 -7
  420. package/lib-commonjs/utilities/colors.cjs.map +1 -1
  421. package/lib-commonjs/utilities/getWindow.cjs.map +1 -1
  422. package/lib-commonjs/utilities/hooks.cjs.map +1 -1
  423. package/lib-commonjs/utilities/image-export-utils.cjs +3 -3
  424. package/lib-commonjs/utilities/image-export-utils.cjs.map +1 -1
  425. package/lib-commonjs/utilities/index.cjs.map +1 -1
  426. package/lib-commonjs/utilities/overflow-utils.cjs +4 -4
  427. package/lib-commonjs/utilities/overflow-utils.cjs.map +1 -1
  428. package/lib-commonjs/utilities/scatterpolar-utils.cjs +6 -7
  429. package/lib-commonjs/utilities/scatterpolar-utils.cjs.map +1 -1
  430. package/lib-commonjs/utilities/string.cjs +1 -1
  431. package/lib-commonjs/utilities/string.cjs.map +1 -1
  432. package/lib-commonjs/utilities/test-data/specialChartNames.cjs +21 -0
  433. package/lib-commonjs/utilities/test-data/specialChartNames.cjs.map +1 -0
  434. package/lib-commonjs/utilities/test-data.cjs +18 -18
  435. package/lib-commonjs/utilities/test-data.cjs.map +1 -1
  436. package/lib-commonjs/utilities/utilities.cjs +92 -92
  437. package/lib-commonjs/utilities/utilities.cjs.map +1 -1
  438. package/lib-commonjs/utilities/vbc-utils.cjs +7 -7
  439. package/lib-commonjs/utilities/vbc-utils.cjs.map +1 -1
  440. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/GanttChart/GanttChart.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport type { ScaleLinear, ScaleBand, ScaleTime } from 'd3-scale';\nimport { useId } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { Legend } from '../Legends/index';\nimport { Legends } from '../Legends/index';\nimport type { Margins, GanttChartDataPoint } from '../../types/DataPoint';\nimport type { ModifiedCartesianChartProps } from '../CommonComponents/index';\nimport { CartesianChart } from '../CommonComponents/index';\nimport type { GanttChartProps } from './GanttChart.types';\nimport { ChartPopover } from '../CommonComponents/ChartPopover';\nimport type { ChartPopoverProps } from '../../index';\nimport type { IDomainNRange } from '../../utilities/index';\nimport {\n ChartTypes,\n YAxisType,\n XAxisTypes,\n getTypeOfAxis,\n getNextColor,\n findHBCWANumericMinMaxOfY,\n createYAxisForHorizontalBarChartWithAxis,\n createStringYAxisForHorizontalBarChartWithAxis,\n areArraysEqual,\n MIN_DOMAIN_MARGIN,\n sortAxisCategories,\n calculateAppropriateBarWidth,\n getColorFromToken,\n getScalePadding,\n getDateFormatLevel,\n} from '../../utilities/index';\nimport { formatDateToLocaleString, getMultiLevelDateTimeFormatOptions } from '@fluentui/chart-utilities';\nimport { useImageExport } from '../../utilities/hooks';\n\ntype NumberScale = ScaleLinear<number, number>;\ntype StringScale = ScaleBand<string>;\ntype DateScale = ScaleTime<Date, number>;\n\nconst DEFAULT_BAR_HEIGHT = 24;\nconst MIN_BAR_HEIGHT = 1;\n\nexport const GanttChart: React.FunctionComponent<GanttChartProps> = React.forwardRef<HTMLDivElement, GanttChartProps>(\n ({ useUTC = true, yAxisCategoryOrder = 'default', maxBarHeight = 24, ...props }, forwardedRef) => {\n const _barHeight = React.useRef<number>(DEFAULT_BAR_HEIGHT);\n const _margins = React.useRef<Margins>({});\n const _calloutAnchorPoint = React.useRef<GanttChartDataPoint | null>(null);\n const _emptyChartId = useId('Gantt_empty');\n const _legendId = useId('gantt_legend');\n const _legendMap = React.useRef<Record<string, { id: string; startColor: string; endColor: string }>>({});\n const _prevProps = React.useRef<Partial<GanttChartProps>>({});\n\n const [calloutColor, setCalloutColor] = React.useState<string>('');\n const [hoveredLegend, setHoveredLegend] = React.useState<string>('');\n const [calloutLegend, setCalloutLegend] = React.useState<string>('');\n const [xCalloutValue, setXCalloutValue] = React.useState<string>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string>('');\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const [calloutDataPoint, setCalloutDataPoint] = React.useState<GanttChartDataPoint>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n const { cartesianChartRef, legendsRef: _legendsRef } = useImageExport(props.componentRef, props.hideLegend);\n\n React.useEffect(() => {\n if (!areArraysEqual(_prevProps.current.legendProps?.selectedLegends, props.legendProps?.selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n _prevProps.current = props;\n }, [props]);\n\n const _points = React.useMemo(() => {\n _legendMap.current = {};\n let colorIndex = 0;\n\n return (\n props.data?.map(point => {\n const legend = `${point.legend}`;\n if (!_legendMap.current[legend]) {\n let startColor = point.color ? getColorFromToken(point.color) : getNextColor(colorIndex, 0);\n let endColor = startColor;\n\n if (props.enableGradient) {\n startColor = point.gradient?.[0]!;\n endColor = point.gradient?.[1]!;\n }\n\n _legendMap.current[legend] = { id: `${_legendId}_${colorIndex}`, startColor, endColor };\n colorIndex += 1;\n }\n\n const { startColor, endColor } = _legendMap.current[legend];\n return {\n ...point,\n color: startColor,\n ...(props.enableGradient ? { gradient: [startColor, endColor] as [string, string] } : {}),\n };\n }) ?? []\n );\n }, [props.data, props.enableGradient]);\n\n const _xAxisType = React.useMemo(() => {\n if (_points.length > 0) {\n return getTypeOfAxis(_points[0].x.start, true) as XAxisTypes;\n }\n return XAxisTypes.DateAxis;\n }, [_points]);\n\n const _yAxisType = React.useMemo(() => {\n if (_points.length > 0) {\n return getTypeOfAxis(_points[0].y, false) as YAxisType;\n }\n return YAxisType.StringAxis;\n }, [_points]);\n\n const _yAxisPadding = React.useMemo(() => {\n return getScalePadding(props.yAxisPadding, undefined, 1 / 2);\n }, [props.yAxisPadding]);\n\n const _dateFormatOptions = React.useMemo(() => {\n if (_xAxisType !== XAxisTypes.DateAxis) {\n return undefined;\n }\n\n let lowestFormatLevel = 100;\n let highestFormatLevel = -1;\n _points.forEach(p => {\n const startFormatLevel = getDateFormatLevel(p.x.start as Date, useUTC as boolean);\n const endFormatLevel = getDateFormatLevel(p.x.end as Date, useUTC as boolean);\n lowestFormatLevel = Math.min(lowestFormatLevel, startFormatLevel, endFormatLevel);\n highestFormatLevel = Math.max(highestFormatLevel, startFormatLevel, endFormatLevel);\n });\n\n return getMultiLevelDateTimeFormatOptions(lowestFormatLevel, highestFormatLevel);\n }, [useUTC, _points, _xAxisType]);\n\n const _mapYValueToXValues = React.useCallback(() => {\n const yValueToXValues: Record<string, number[]> = Object.create(null);\n _points.forEach(point => {\n if (!yValueToXValues[point.y]) {\n yValueToXValues[point.y] = [];\n }\n yValueToXValues[point.y].push(+point.x.end - +point.x.start);\n });\n return yValueToXValues;\n }, [_points]);\n\n const _getOrderedYAxisLabels = React.useCallback(() => {\n const yValueToXValues = _mapYValueToXValues();\n\n if (_yAxisType !== YAxisType.StringAxis) {\n return Object.keys(yValueToXValues).sort((a, b) => +a - +b);\n }\n\n if (yAxisCategoryOrder === 'default') {\n return Object.keys(yValueToXValues).reverse();\n }\n return sortAxisCategories(yValueToXValues, yAxisCategoryOrder);\n }, [_mapYValueToXValues, _yAxisType, yAxisCategoryOrder]);\n\n const _yAxisLabels = React.useMemo(() => _getOrderedYAxisLabels(), [_getOrderedYAxisLabels]);\n\n const _getDomainNRangeValues = React.useCallback(\n (\n points: GanttChartDataPoint[],\n margins: Margins,\n containerWidth: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n ): IDomainNRange => {\n const xValues: (Date | number)[] = [];\n points.forEach(point => {\n xValues.push(point.x.start, point.x.end);\n });\n\n const xMin = d3Min(xValues) || 0;\n const xMax = d3Max(xValues) || 0;\n\n return {\n dStartValue: isRTL ? xMax : xMin,\n dEndValue: isRTL ? xMin : xMax,\n rStartValue: margins.left!,\n rEndValue: containerWidth - margins.right!,\n };\n },\n [],\n );\n\n const _getMargins = React.useCallback((margins: Margins) => {\n _margins.current = margins;\n }, []);\n\n const _getFormattedXValue = React.useCallback(\n (point: GanttChartDataPoint): string => {\n let formattedStartX: string;\n let formattedEndX: string;\n\n if (_xAxisType === XAxisTypes.DateAxis) {\n formattedStartX = formatDateToLocaleString(\n point.x.start as Date,\n props.culture,\n useUTC as boolean,\n false,\n _dateFormatOptions,\n );\n formattedEndX = formatDateToLocaleString(\n point.x.end as Date,\n props.culture,\n useUTC as boolean,\n false,\n _dateFormatOptions,\n );\n } else {\n formattedStartX = point.x.start.toString();\n formattedEndX = point.x.end.toString();\n }\n\n return `${formattedStartX} - ${formattedEndX}`;\n },\n [props.culture, useUTC, _dateFormatOptions, _xAxisType],\n );\n\n const _getCustomizedCallout = React.useCallback(() => {\n const defaultRender = (point?: GanttChartDataPoint): JSXElement | null => {\n return point ? (\n <ChartPopover\n isPopoverOpen={isPopoverOpen}\n clickPosition={clickPosition}\n XValue={point.yAxisCalloutData || point.y.toString()}\n legend={point.legend}\n YValue={point.xAxisCalloutData || _getFormattedXValue(point)}\n color={point.color}\n culture={props.culture}\n />\n ) : null;\n };\n\n return props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(calloutDataPoint, defaultRender)\n : null;\n //eslint-disable-next-line react-hooks/exhaustive-deps\n }, [_getFormattedXValue, calloutDataPoint, props.culture, props.onRenderCalloutPerDataPoint]);\n\n const _getAriaLabel = React.useCallback(\n (point: GanttChartDataPoint): string => {\n const xValue = point.xAxisCalloutData || _getFormattedXValue(point);\n const yValue = point.yAxisCalloutData || point.y;\n return (\n point.callOutAccessibilityData?.ariaLabel ||\n `${yValue}. ` + (point.legend ? `${point.legend}, ` : '') + `${xValue}.`\n );\n },\n [_getFormattedXValue],\n );\n\n const _getHighlightedLegend = React.useCallback(() => {\n return selectedLegends.length > 0 ? selectedLegends : hoveredLegend ? [hoveredLegend] : [];\n }, [hoveredLegend, selectedLegends]);\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 const _legendHighlighted = React.useCallback(\n (legend: string | undefined) => {\n return _getHighlightedLegend().includes(`${legend}`);\n },\n [_getHighlightedLegend],\n );\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n const _noLegendHighlighted = React.useCallback(() => {\n return _getHighlightedLegend().length === 0;\n }, [_getHighlightedLegend]);\n\n const _showCallout = React.useCallback(\n (target: React.MouseEvent<SVGElement> | React.FocusEvent<SVGElement>, point: GanttChartDataPoint) => {\n if (!(_noLegendHighlighted() || _legendHighlighted(point.legend)) || _calloutAnchorPoint.current === point) {\n return;\n }\n if ('clientX' in target && 'clientY' in target) {\n updatePosition(target.clientX, target.clientY);\n } else {\n const rect = (target.target as SVGElement).getBoundingClientRect();\n updatePosition(rect.left, rect.top);\n }\n _calloutAnchorPoint.current = point;\n setPopoverOpen(true);\n setCalloutLegend(point.legend!);\n setCalloutColor(point.color!);\n setXCalloutValue(point.yAxisCalloutData || point.y.toString());\n setYCalloutValue(point.xAxisCalloutData! || _getFormattedXValue(point));\n setCalloutDataPoint(point);\n },\n [_getFormattedXValue, _legendHighlighted, _noLegendHighlighted],\n );\n\n const _onBarFocus = React.useCallback(\n (point: GanttChartDataPoint, focusEvent: React.FocusEvent<SVGElement>): void => {\n _showCallout(focusEvent, point);\n },\n [_showCallout],\n );\n\n const _onBarHover = React.useCallback(\n (point: GanttChartDataPoint, mouseEvent: React.MouseEvent<SVGElement>): void => {\n _showCallout(mouseEvent, point);\n },\n [_showCallout],\n );\n\n const _onBarLeave = React.useCallback((): void => {\n // do nothing\n }, []);\n\n const _handleChartMouseLeave = React.useCallback((): void => {\n _calloutAnchorPoint.current = null;\n setPopoverOpen(false);\n setCalloutLegend('');\n setCalloutColor('');\n setXCalloutValue('');\n setYCalloutValue('');\n setCalloutDataPoint(undefined);\n }, []);\n\n const _getBarHeight = React.useCallback(\n (adjustedValue: number): number => {\n let barHeight: number;\n if (typeof props.barHeight === 'number') {\n barHeight = props.barHeight;\n } else {\n barHeight = adjustedValue;\n }\n if (typeof maxBarHeight === 'number') {\n barHeight = Math.min(barHeight, maxBarHeight);\n }\n barHeight = Math.max(barHeight, MIN_BAR_HEIGHT);\n return barHeight;\n },\n [maxBarHeight, props.barHeight],\n );\n\n const _getOrderedDataPoints = React.useCallback(() => {\n const result: GanttChartDataPoint[] = [];\n\n const yValueToPoints: Record<string, GanttChartDataPoint[]> = Object.create(null);\n _points.forEach(point => {\n if (!yValueToPoints[point.y]) {\n yValueToPoints[point.y] = [];\n }\n yValueToPoints[point.y].push(point);\n });\n\n for (let i = _yAxisLabels.length - 1; i >= 0; i--) {\n const yValue = _yAxisLabels[i];\n if (yValueToPoints[yValue]) {\n result.push(...yValueToPoints[yValue].sort((a, b) => +a.x.start - +b.x.start));\n }\n }\n\n return result;\n }, [_points, _yAxisLabels]);\n\n const _createBars = React.useCallback(\n ({\n xScale,\n yScalePrimary: yScale,\n }: {\n xScale: DateScale | NumberScale;\n yScalePrimary: NumberScale | StringScale;\n }): JSXElement => {\n const getGradientId = (legend: string | undefined) => {\n const legendId = _legendMap.current[`${legend}`].id;\n return `${legendId}_gradient`;\n };\n\n const gradientDefs: JSXElement[] = [];\n if (props.enableGradient) {\n Object.keys(_legendMap.current).forEach((legend: string, index: number) => {\n const { startColor, endColor } = _legendMap.current[legend];\n gradientDefs.push(\n <linearGradient key={index} id={getGradientId(legend)}>\n <stop offset=\"0\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>,\n );\n });\n }\n\n let scaleBandwidth = 0;\n if (_yAxisType === YAxisType.StringAxis) {\n scaleBandwidth = (yScale as StringScale).bandwidth();\n _barHeight.current = _getBarHeight(scaleBandwidth);\n }\n\n const points = _getOrderedDataPoints();\n const bars = points.map((point: GanttChartDataPoint, index: number) => {\n const rectStartX = xScale(point.x.start);\n const rectEndX = xScale(point.x.end);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const rectY = yScale(point.y as any)! + (scaleBandwidth - _barHeight.current) / 2;\n\n const shouldHighlight = _noLegendHighlighted() || _legendHighlighted(point.legend);\n\n return (\n <rect\n key={index}\n x={Math.min(rectStartX, rectEndX)}\n y={rectY}\n width={Math.max(Math.abs(rectEndX - rectStartX), 2)}\n height={_barHeight.current}\n rx={props.roundCorners ? 3 : 0}\n fill={props.enableGradient ? `url(#${getGradientId(point.legend)})` : point.color}\n opacity={shouldHighlight ? 1 : 0.1}\n onClick={point.onClick}\n onMouseOver={(event: React.MouseEvent<SVGElement>) => _onBarHover(point, event)}\n onMouseLeave={_onBarLeave}\n onFocus={(event: React.FocusEvent<SVGElement>) => _onBarFocus(point, event)}\n onBlur={_onBarLeave}\n tabIndex={shouldHighlight ? 0 : -1}\n role=\"option\"\n aria-label={_getAriaLabel(point)}\n />\n );\n });\n return (\n <g role=\"listbox\" aria-label={`${points.length} ${points.length === 1 ? 'bar' : 'bars'}`}>\n {gradientDefs.length > 0 ? <defs>{gradientDefs}</defs> : null}\n {bars}\n </g>\n );\n },\n [\n _getAriaLabel,\n _getBarHeight,\n _getOrderedDataPoints,\n _legendHighlighted,\n _noLegendHighlighted,\n _onBarFocus,\n _onBarHover,\n _onBarLeave,\n _yAxisType,\n props.enableGradient,\n props.roundCorners,\n ],\n );\n\n const _onLegendHover = React.useCallback((legend: string): void => {\n setHoveredLegend(legend);\n }, []);\n\n const _onLegendLeave = React.useCallback((): void => {\n setHoveredLegend('');\n }, []);\n\n const _onLegendSelectionChange = React.useCallback(\n (_selectedLegends: string[], event: React.MouseEvent<HTMLButtonElement>, currentLegend?: Legend): 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 [props.legendProps],\n );\n\n const _getLegendData = React.useCallback((): JSXElement => {\n const actions: Legend[] = [];\n\n Object.keys(_legendMap.current).forEach((legendTitle: string) => {\n const legend: Legend = {\n title: legendTitle,\n color: _legendMap.current[legendTitle].startColor,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(legendTitle);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n };\n\n actions.push(legend);\n });\n\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n onChange={_onLegendSelectionChange}\n {...props.legendProps}\n legendRef={_legendsRef}\n />\n );\n return legends;\n }, [\n _handleChartMouseLeave,\n _onLegendHover,\n _onLegendLeave,\n _onLegendSelectionChange,\n props.enabledLegendsWrapLines,\n props.legendProps,\n props.legendsOverflowText,\n ]);\n\n const _getChartTitle = React.useCallback((): string => {\n return (props.chartTitle ? `${props.chartTitle}. ` : '') + `Gantt chart with ${_points.length} data points. `;\n }, [_points.length, props.chartTitle]);\n\n const _isChartEmpty = React.useCallback((): boolean => {\n return _points.length === 0;\n }, [_points.length]);\n\n const _getYDomainMargins = React.useCallback(\n (containerHeight: number): Margins => {\n let domainMargin = MIN_DOMAIN_MARGIN;\n\n const ySet = new Set<string | number>();\n _points.forEach((point: GanttChartDataPoint) => {\n ySet.add(point.y);\n });\n const uniqueY = Array.from(ySet);\n\n /** Total height available to render the bars */\n const totalHeight =\n containerHeight -\n (_margins.current.top! + MIN_DOMAIN_MARGIN) -\n (_margins.current.bottom! + MIN_DOMAIN_MARGIN);\n\n if (_yAxisType !== YAxisType.StringAxis) {\n _barHeight.current = _getBarHeight(\n calculateAppropriateBarWidth(uniqueY as number[] | Date[], totalHeight, _yAxisPadding),\n );\n domainMargin += _barHeight.current / 2;\n }\n\n return {\n ..._margins.current,\n top: _margins.current.top! + domainMargin,\n bottom: _margins.current.bottom! + domainMargin,\n };\n },\n [_getBarHeight, _points, _yAxisPadding, _yAxisType],\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 if (!_isChartEmpty()) {\n _barHeight.current = _getBarHeight(DEFAULT_BAR_HEIGHT);\n\n const calloutProps: ChartPopoverProps = {\n isPopoverOpen,\n clickPosition,\n color: calloutColor,\n legend: calloutLegend,\n XValue: xCalloutValue,\n YValue: yCalloutValue,\n ...props.calloutProps,\n };\n const tickParams: ModifiedCartesianChartProps['tickParams'] = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n\n return (\n <CartesianChart\n {...props}\n yAxisPadding={_yAxisPadding}\n chartTitle={_getChartTitle()}\n points={_points}\n chartType={ChartTypes.GanttChart}\n xAxisType={_xAxisType}\n yAxisType={_yAxisType}\n componentRef={cartesianChartRef}\n stringDatasetForYAxisDomain={_yAxisLabels}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={_getLegendData()}\n createYAxis={createYAxisForHorizontalBarChartWithAxis}\n getDomainNRangeValues={_getDomainNRangeValues}\n createStringYAxis={createStringYAxisForHorizontalBarChartWithAxis}\n getMinMaxOfYAxis={findHBCWANumericMinMaxOfY}\n customizedCallout={_getCustomizedCallout()}\n getmargins={_getMargins}\n getYDomainMargins={_getYDomainMargins}\n onChartMouseLeave={_handleChartMouseLeave}\n useUTC={useUTC}\n children={_createBars}\n />\n );\n } else {\n return (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n }\n },\n);\n\nGanttChart.displayName = 'GanttChart';\n"],"names":["React","max","d3Max","min","d3Min","useId","Legends","CartesianChart","ChartPopover","ChartTypes","YAxisType","XAxisTypes","getTypeOfAxis","getNextColor","findHBCWANumericMinMaxOfY","createYAxisForHorizontalBarChartWithAxis","createStringYAxisForHorizontalBarChartWithAxis","areArraysEqual","MIN_DOMAIN_MARGIN","sortAxisCategories","calculateAppropriateBarWidth","getColorFromToken","getScalePadding","getDateFormatLevel","formatDateToLocaleString","getMultiLevelDateTimeFormatOptions","useImageExport","DEFAULT_BAR_HEIGHT","MIN_BAR_HEIGHT","GanttChart","forwardRef","useUTC","yAxisCategoryOrder","maxBarHeight","props","forwardedRef","_barHeight","useRef","_margins","_calloutAnchorPoint","_emptyChartId","_legendId","_legendMap","_prevProps","calloutColor","setCalloutColor","useState","hoveredLegend","setHoveredLegend","calloutLegend","setCalloutLegend","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","selectedLegends","setSelectedLegends","legendProps","calloutDataPoint","setCalloutDataPoint","clickPosition","setClickPosition","x","y","isPopoverOpen","setPopoverOpen","cartesianChartRef","legendsRef","_legendsRef","componentRef","hideLegend","useEffect","current","_points","useMemo","colorIndex","data","map","point","legend","startColor","color","endColor","enableGradient","gradient","id","_xAxisType","length","start","DateAxis","_yAxisType","StringAxis","_yAxisPadding","yAxisPadding","undefined","_dateFormatOptions","lowestFormatLevel","highestFormatLevel","forEach","p","startFormatLevel","endFormatLevel","end","Math","_mapYValueToXValues","useCallback","yValueToXValues","Object","create","push","_getOrderedYAxisLabels","keys","sort","a","b","reverse","_yAxisLabels","_getDomainNRangeValues","points","margins","containerWidth","chartType","isRTL","xAxisType","barWidth","tickValues","xValues","xMin","xMax","dStartValue","dEndValue","rStartValue","left","rEndValue","right","_getMargins","_getFormattedXValue","formattedStartX","formattedEndX","culture","toString","_getCustomizedCallout","defaultRender","XValue","yAxisCalloutData","YValue","xAxisCalloutData","onRenderCalloutPerDataPoint","_getAriaLabel","xValue","yValue","callOutAccessibilityData","ariaLabel","_getHighlightedLegend","_legendHighlighted","includes","_noLegendHighlighted","_showCallout","target","updatePosition","clientX","clientY","rect","getBoundingClientRect","top","_onBarFocus","focusEvent","_onBarHover","mouseEvent","_onBarLeave","_handleChartMouseLeave","_getBarHeight","adjustedValue","barHeight","_getOrderedDataPoints","result","yValueToPoints","i","_createBars","xScale","yScalePrimary","yScale","getGradientId","legendId","gradientDefs","index","linearGradient","key","stop","offset","stopColor","scaleBandwidth","bandwidth","bars","rectStartX","rectEndX","rectY","shouldHighlight","width","abs","height","rx","roundCorners","fill","opacity","onClick","onMouseOver","event","onMouseLeave","onFocus","onBlur","tabIndex","role","aria-label","g","defs","_onLegendHover","_onLegendLeave","_onLegendSelectionChange","_selectedLegends","currentLegend","canSelectMultipleLegends","slice","onChange","_getLegendData","actions","legendTitle","title","hoverAction","onMouseOutAction","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","legendRef","_getChartTitle","chartTitle","_isChartEmpty","_getYDomainMargins","containerHeight","domainMargin","ySet","Set","add","uniqueY","Array","from","totalHeight","bottom","newX","newY","threshold","distance","sqrt","pow","calloutProps","tickParams","tickFormat","yAxisType","stringDatasetForYAxisDomain","legendBars","createYAxis","getDomainNRangeValues","createStringYAxis","getMinMaxOfYAxis","customizedCallout","getmargins","getYDomainMargins","onChartMou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;QAC9B;QAEA,OAAA,WAAA,GACE,OAAA,aAAA,CAAC3P,sBAAAA,EAAAA;YACE,GAAG2B,KAAK;YACT2D,cAAcD;YACdiJ,YAAYD;YACZtH,QAAQ7C;YACRgD,WAAWhH,kBAAAA,CAAWoB,UAAU;YAChC8F,WAAWrC;YACX6K,WAAWzK;YACXrB,cAAcH;YACdkM,6BAA6BhJ;YAC7B4I,cAAcA;YACdC,YAAYA;YACZI,YAAYrC;YACZsC,aAAavP,gDAAAA;YACbwP,uBAAuBlJ;YACvBmJ,mBAAmBxP,sDAAAA;YACnByP,kBAAkB3P,iCAAAA;YAClB4P,mBAAmB7H;YACnB8H,YAAYpI;YACZqI,mBAAmB7B;YACnB8B,mBAAmBnG;YACnB3I,QAAQA;YACR+O,UAAU5F;;IAGhB,OAAO;QACL,OAAA,WAAA,GACE,OAAA,aAAA,CAAC6F,OAAAA;YAAI1L,IAAI7C;YAAe4K,MAAM;YAAS4D,OAAO;gBAAEpE,SAAS;YAAI;YAAGS,cAAY;;IAEhF;AACF,GACA;AAEFxL,WAAWoP,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/GanttChart/GanttChart.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport type { ScaleLinear, ScaleBand, ScaleTime } from 'd3-scale';\nimport { useId } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { Legend } from '../Legends/index';\nimport { Legends } from '../Legends/index';\nimport type { Margins, GanttChartDataPoint } from '../../types/DataPoint';\nimport type { ModifiedCartesianChartProps } from '../CommonComponents/index';\nimport { CartesianChart } from '../CommonComponents/index';\nimport type { GanttChartProps } from './GanttChart.types';\nimport { ChartPopover } from '../CommonComponents/ChartPopover';\nimport type { ChartPopoverProps } from '../../index';\nimport type { IDomainNRange } from '../../utilities/index';\nimport {\n ChartTypes,\n YAxisType,\n XAxisTypes,\n getTypeOfAxis,\n getNextColor,\n findHBCWANumericMinMaxOfY,\n createYAxisForHorizontalBarChartWithAxis,\n createStringYAxisForHorizontalBarChartWithAxis,\n areArraysEqual,\n MIN_DOMAIN_MARGIN,\n sortAxisCategories,\n calculateAppropriateBarWidth,\n getColorFromToken,\n getScalePadding,\n getDateFormatLevel,\n} from '../../utilities/index';\nimport { formatDateToLocaleString, getMultiLevelDateTimeFormatOptions } from '@fluentui/chart-utilities';\nimport { useImageExport } from '../../utilities/hooks';\n\ntype NumberScale = ScaleLinear<number, number>;\ntype StringScale = ScaleBand<string>;\ntype DateScale = ScaleTime<Date, number>;\n\nconst DEFAULT_BAR_HEIGHT = 24;\nconst MIN_BAR_HEIGHT = 1;\n\nexport const GanttChart: React.FunctionComponent<GanttChartProps> = React.forwardRef<HTMLDivElement, GanttChartProps>(\n ({ useUTC = true, yAxisCategoryOrder = 'default', maxBarHeight = 24, ...props }, forwardedRef) => {\n const _barHeight = React.useRef<number>(DEFAULT_BAR_HEIGHT);\n const _margins = React.useRef<Margins>({});\n const _calloutAnchorPoint = React.useRef<GanttChartDataPoint | null>(null);\n const _emptyChartId = useId('Gantt_empty');\n const _legendId = useId('gantt_legend');\n const _legendMap = React.useRef<Record<string, { id: string; startColor: string; endColor: string }>>({});\n const _prevProps = React.useRef<Partial<GanttChartProps>>({});\n\n const [calloutColor, setCalloutColor] = React.useState<string>('');\n const [hoveredLegend, setHoveredLegend] = React.useState<string>('');\n const [calloutLegend, setCalloutLegend] = React.useState<string>('');\n const [xCalloutValue, setXCalloutValue] = React.useState<string>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string>('');\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const [calloutDataPoint, setCalloutDataPoint] = React.useState<GanttChartDataPoint>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n const { cartesianChartRef, legendsRef: _legendsRef } = useImageExport(props.componentRef, props.hideLegend);\n\n React.useEffect(() => {\n if (!areArraysEqual(_prevProps.current.legendProps?.selectedLegends, props.legendProps?.selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n _prevProps.current = props;\n }, [props]);\n\n const _points = React.useMemo(() => {\n _legendMap.current = {};\n let colorIndex = 0;\n\n return (\n props.data?.map(point => {\n const legend = `${point.legend}`;\n if (!_legendMap.current[legend]) {\n let startColor = point.color ? getColorFromToken(point.color) : getNextColor(colorIndex, 0);\n let endColor = startColor;\n\n if (props.enableGradient) {\n startColor = point.gradient?.[0]!;\n endColor = point.gradient?.[1]!;\n }\n\n _legendMap.current[legend] = { id: `${_legendId}_${colorIndex}`, startColor, endColor };\n colorIndex += 1;\n }\n\n const { startColor, endColor } = _legendMap.current[legend];\n return {\n ...point,\n color: startColor,\n ...(props.enableGradient ? { gradient: [startColor, endColor] as [string, string] } : {}),\n };\n }) ?? []\n );\n }, [props.data, props.enableGradient]);\n\n const _xAxisType = React.useMemo(() => {\n if (_points.length > 0) {\n return getTypeOfAxis(_points[0].x.start, true) as XAxisTypes;\n }\n return XAxisTypes.DateAxis;\n }, [_points]);\n\n const _yAxisType = React.useMemo(() => {\n if (_points.length > 0) {\n return getTypeOfAxis(_points[0].y, false) as YAxisType;\n }\n return YAxisType.StringAxis;\n }, [_points]);\n\n const _yAxisPadding = React.useMemo(() => {\n return getScalePadding(props.yAxisPadding, undefined, 1 / 2);\n }, [props.yAxisPadding]);\n\n const _dateFormatOptions = React.useMemo(() => {\n if (_xAxisType !== XAxisTypes.DateAxis) {\n return undefined;\n }\n\n let lowestFormatLevel = 100;\n let highestFormatLevel = -1;\n _points.forEach(p => {\n const startFormatLevel = getDateFormatLevel(p.x.start as Date, useUTC as boolean);\n const endFormatLevel = getDateFormatLevel(p.x.end as Date, useUTC as boolean);\n lowestFormatLevel = Math.min(lowestFormatLevel, startFormatLevel, endFormatLevel);\n highestFormatLevel = Math.max(highestFormatLevel, startFormatLevel, endFormatLevel);\n });\n\n return getMultiLevelDateTimeFormatOptions(lowestFormatLevel, highestFormatLevel);\n }, [useUTC, _points, _xAxisType]);\n\n const _mapYValueToXValues = React.useCallback(() => {\n const yValueToXValues: Record<string, number[]> = Object.create(null);\n _points.forEach(point => {\n if (!yValueToXValues[point.y]) {\n yValueToXValues[point.y] = [];\n }\n yValueToXValues[point.y].push(+point.x.end - +point.x.start);\n });\n return yValueToXValues;\n }, [_points]);\n\n const _getOrderedYAxisLabels = React.useCallback(() => {\n const yValueToXValues = _mapYValueToXValues();\n\n if (_yAxisType !== YAxisType.StringAxis) {\n return Object.keys(yValueToXValues).sort((a, b) => +a - +b);\n }\n\n if (yAxisCategoryOrder === 'default') {\n return Object.keys(yValueToXValues).reverse();\n }\n return sortAxisCategories(yValueToXValues, yAxisCategoryOrder);\n }, [_mapYValueToXValues, _yAxisType, yAxisCategoryOrder]);\n\n const _yAxisLabels = React.useMemo(() => _getOrderedYAxisLabels(), [_getOrderedYAxisLabels]);\n\n const _getDomainNRangeValues = React.useCallback(\n (\n points: GanttChartDataPoint[],\n margins: Margins,\n containerWidth: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n ): IDomainNRange => {\n const xValues: (Date | number)[] = [];\n points.forEach(point => {\n xValues.push(point.x.start, point.x.end);\n });\n\n const xMin = d3Min(xValues) || 0;\n const xMax = d3Max(xValues) || 0;\n\n return {\n dStartValue: isRTL ? xMax : xMin,\n dEndValue: isRTL ? xMin : xMax,\n rStartValue: margins.left!,\n rEndValue: containerWidth - margins.right!,\n };\n },\n [],\n );\n\n const _getMargins = React.useCallback((margins: Margins) => {\n _margins.current = margins;\n }, []);\n\n const _getFormattedXValue = React.useCallback(\n (point: GanttChartDataPoint): string => {\n let formattedStartX: string;\n let formattedEndX: string;\n\n if (_xAxisType === XAxisTypes.DateAxis) {\n formattedStartX = formatDateToLocaleString(\n point.x.start as Date,\n props.culture,\n useUTC as boolean,\n false,\n _dateFormatOptions,\n );\n formattedEndX = formatDateToLocaleString(\n point.x.end as Date,\n props.culture,\n useUTC as boolean,\n false,\n _dateFormatOptions,\n );\n } else {\n formattedStartX = point.x.start.toString();\n formattedEndX = point.x.end.toString();\n }\n\n return `${formattedStartX} - ${formattedEndX}`;\n },\n [props.culture, useUTC, _dateFormatOptions, _xAxisType],\n );\n\n const _getCustomizedCallout = React.useCallback(() => {\n const defaultRender = (point?: GanttChartDataPoint): JSXElement | null => {\n return point ? (\n <ChartPopover\n isPopoverOpen={isPopoverOpen}\n clickPosition={clickPosition}\n XValue={point.yAxisCalloutData || point.y.toString()}\n legend={point.legend}\n YValue={point.xAxisCalloutData || _getFormattedXValue(point)}\n color={point.color}\n culture={props.culture}\n />\n ) : null;\n };\n\n return props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(calloutDataPoint, defaultRender)\n : null;\n //eslint-disable-next-line react-hooks/exhaustive-deps\n }, [_getFormattedXValue, calloutDataPoint, props.culture, props.onRenderCalloutPerDataPoint]);\n\n const _getAriaLabel = React.useCallback(\n (point: GanttChartDataPoint): string => {\n const xValue = point.xAxisCalloutData || _getFormattedXValue(point);\n const yValue = point.yAxisCalloutData || point.y;\n return (\n point.callOutAccessibilityData?.ariaLabel ||\n `${yValue}. ` + (point.legend ? `${point.legend}, ` : '') + `${xValue}.`\n );\n },\n [_getFormattedXValue],\n );\n\n const _getHighlightedLegend = React.useCallback(() => {\n return selectedLegends.length > 0 ? selectedLegends : hoveredLegend ? [hoveredLegend] : [];\n }, [hoveredLegend, selectedLegends]);\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 const _legendHighlighted = React.useCallback(\n (legend: string | undefined) => {\n return _getHighlightedLegend().includes(`${legend}`);\n },\n [_getHighlightedLegend],\n );\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n const _noLegendHighlighted = React.useCallback(() => {\n return _getHighlightedLegend().length === 0;\n }, [_getHighlightedLegend]);\n\n const _showCallout = React.useCallback(\n (target: React.MouseEvent<SVGElement> | React.FocusEvent<SVGElement>, point: GanttChartDataPoint) => {\n if (!(_noLegendHighlighted() || _legendHighlighted(point.legend)) || _calloutAnchorPoint.current === point) {\n return;\n }\n if ('clientX' in target && 'clientY' in target) {\n updatePosition(target.clientX, target.clientY);\n } else {\n const rect = (target.target as SVGElement).getBoundingClientRect();\n updatePosition(rect.left, rect.top);\n }\n _calloutAnchorPoint.current = point;\n setPopoverOpen(true);\n setCalloutLegend(point.legend!);\n setCalloutColor(point.color!);\n setXCalloutValue(point.yAxisCalloutData || point.y.toString());\n setYCalloutValue(point.xAxisCalloutData! || _getFormattedXValue(point));\n setCalloutDataPoint(point);\n },\n [_getFormattedXValue, _legendHighlighted, _noLegendHighlighted],\n );\n\n const _onBarFocus = React.useCallback(\n (point: GanttChartDataPoint, focusEvent: React.FocusEvent<SVGElement>): void => {\n _showCallout(focusEvent, point);\n },\n [_showCallout],\n );\n\n const _onBarHover = React.useCallback(\n (point: GanttChartDataPoint, mouseEvent: React.MouseEvent<SVGElement>): void => {\n _showCallout(mouseEvent, point);\n },\n [_showCallout],\n );\n\n const _onBarLeave = React.useCallback((): void => {\n // do nothing\n }, []);\n\n const _handleChartMouseLeave = React.useCallback((): void => {\n _calloutAnchorPoint.current = null;\n setPopoverOpen(false);\n setCalloutLegend('');\n setCalloutColor('');\n setXCalloutValue('');\n setYCalloutValue('');\n setCalloutDataPoint(undefined);\n }, []);\n\n const _getBarHeight = React.useCallback(\n (adjustedValue: number): number => {\n let barHeight: number;\n if (typeof props.barHeight === 'number') {\n barHeight = props.barHeight;\n } else {\n barHeight = adjustedValue;\n }\n if (typeof maxBarHeight === 'number') {\n barHeight = Math.min(barHeight, maxBarHeight);\n }\n barHeight = Math.max(barHeight, MIN_BAR_HEIGHT);\n return barHeight;\n },\n [maxBarHeight, props.barHeight],\n );\n\n const _getOrderedDataPoints = React.useCallback(() => {\n const result: GanttChartDataPoint[] = [];\n\n const yValueToPoints: Record<string, GanttChartDataPoint[]> = Object.create(null);\n _points.forEach(point => {\n if (!yValueToPoints[point.y]) {\n yValueToPoints[point.y] = [];\n }\n yValueToPoints[point.y].push(point);\n });\n\n for (let i = _yAxisLabels.length - 1; i >= 0; i--) {\n const yValue = _yAxisLabels[i];\n if (yValueToPoints[yValue]) {\n result.push(...yValueToPoints[yValue].sort((a, b) => +a.x.start - +b.x.start));\n }\n }\n\n return result;\n }, [_points, _yAxisLabels]);\n\n const _createBars = React.useCallback(\n ({\n xScale,\n yScalePrimary: yScale,\n }: {\n xScale: DateScale | NumberScale;\n yScalePrimary: NumberScale | StringScale;\n }): JSXElement => {\n const getGradientId = (legend: string | undefined) => {\n const legendId = _legendMap.current[`${legend}`].id;\n return `${legendId}_gradient`;\n };\n\n const gradientDefs: JSXElement[] = [];\n if (props.enableGradient) {\n Object.keys(_legendMap.current).forEach((legend: string, index: number) => {\n const { startColor, endColor } = _legendMap.current[legend];\n gradientDefs.push(\n <linearGradient key={index} id={getGradientId(legend)}>\n <stop offset=\"0\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>,\n );\n });\n }\n\n let scaleBandwidth = 0;\n if (_yAxisType === YAxisType.StringAxis) {\n scaleBandwidth = (yScale as StringScale).bandwidth();\n _barHeight.current = _getBarHeight(scaleBandwidth);\n }\n\n const points = _getOrderedDataPoints();\n const bars = points.map((point: GanttChartDataPoint, index: number) => {\n const rectStartX = xScale(point.x.start);\n const rectEndX = xScale(point.x.end);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const rectY = yScale(point.y as any)! + (scaleBandwidth - _barHeight.current) / 2;\n\n const shouldHighlight = _noLegendHighlighted() || _legendHighlighted(point.legend);\n\n return (\n <rect\n key={index}\n x={Math.min(rectStartX, rectEndX)}\n y={rectY}\n width={Math.max(Math.abs(rectEndX - rectStartX), 2)}\n height={_barHeight.current}\n rx={props.roundCorners ? 3 : 0}\n fill={props.enableGradient ? `url(#${getGradientId(point.legend)})` : point.color}\n opacity={shouldHighlight ? 1 : 0.1}\n onClick={point.onClick}\n onMouseOver={(event: React.MouseEvent<SVGElement>) => _onBarHover(point, event)}\n onMouseLeave={_onBarLeave}\n onFocus={(event: React.FocusEvent<SVGElement>) => _onBarFocus(point, event)}\n onBlur={_onBarLeave}\n tabIndex={shouldHighlight ? 0 : -1}\n role=\"option\"\n aria-label={_getAriaLabel(point)}\n />\n );\n });\n return (\n <g role=\"listbox\" aria-label={`${points.length} ${points.length === 1 ? 'bar' : 'bars'}`}>\n {gradientDefs.length > 0 ? <defs>{gradientDefs}</defs> : null}\n {bars}\n </g>\n );\n },\n [\n _getAriaLabel,\n _getBarHeight,\n _getOrderedDataPoints,\n _legendHighlighted,\n _noLegendHighlighted,\n _onBarFocus,\n _onBarHover,\n _onBarLeave,\n _yAxisType,\n props.enableGradient,\n props.roundCorners,\n ],\n );\n\n const _onLegendHover = React.useCallback((legend: string): void => {\n setHoveredLegend(legend);\n }, []);\n\n const _onLegendLeave = React.useCallback((): void => {\n setHoveredLegend('');\n }, []);\n\n const _onLegendSelectionChange = React.useCallback(\n (_selectedLegends: string[], event: React.MouseEvent<HTMLButtonElement>, currentLegend?: Legend): 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 [props.legendProps],\n );\n\n const _getLegendData = React.useCallback((): JSXElement => {\n const actions: Legend[] = [];\n\n Object.keys(_legendMap.current).forEach((legendTitle: string) => {\n const legend: Legend = {\n title: legendTitle,\n color: _legendMap.current[legendTitle].startColor,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(legendTitle);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n };\n\n actions.push(legend);\n });\n\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n onChange={_onLegendSelectionChange}\n {...props.legendProps}\n legendRef={_legendsRef}\n />\n );\n return legends;\n }, [\n _handleChartMouseLeave,\n _onLegendHover,\n _onLegendLeave,\n _onLegendSelectionChange,\n props.enabledLegendsWrapLines,\n props.legendProps,\n props.legendsOverflowText,\n ]);\n\n const _getChartTitle = React.useCallback((): string => {\n return (props.chartTitle ? `${props.chartTitle}. ` : '') + `Gantt chart with ${_points.length} data points. `;\n }, [_points.length, props.chartTitle]);\n\n const _isChartEmpty = React.useCallback((): boolean => {\n return _points.length === 0;\n }, [_points.length]);\n\n const _getYDomainMargins = React.useCallback(\n (containerHeight: number): Margins => {\n let domainMargin = MIN_DOMAIN_MARGIN;\n\n const ySet = new Set<string | number>();\n _points.forEach((point: GanttChartDataPoint) => {\n ySet.add(point.y);\n });\n const uniqueY = Array.from(ySet);\n\n /** Total height available to render the bars */\n const totalHeight =\n containerHeight -\n (_margins.current.top! + MIN_DOMAIN_MARGIN) -\n (_margins.current.bottom! + MIN_DOMAIN_MARGIN);\n\n if (_yAxisType !== YAxisType.StringAxis) {\n _barHeight.current = _getBarHeight(\n calculateAppropriateBarWidth(uniqueY as number[] | Date[], totalHeight, _yAxisPadding),\n );\n domainMargin += _barHeight.current / 2;\n }\n\n return {\n ..._margins.current,\n top: _margins.current.top! + domainMargin,\n bottom: _margins.current.bottom! + domainMargin,\n };\n },\n [_getBarHeight, _points, _yAxisPadding, _yAxisType],\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 if (!_isChartEmpty()) {\n _barHeight.current = _getBarHeight(DEFAULT_BAR_HEIGHT);\n\n const calloutProps: ChartPopoverProps = {\n isPopoverOpen,\n clickPosition,\n color: calloutColor,\n legend: calloutLegend,\n XValue: xCalloutValue,\n YValue: yCalloutValue,\n ...props.calloutProps,\n };\n const tickParams: ModifiedCartesianChartProps['tickParams'] = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n\n return (\n <CartesianChart\n {...props}\n yAxisPadding={_yAxisPadding}\n chartTitle={_getChartTitle()}\n points={_points}\n chartType={ChartTypes.GanttChart}\n xAxisType={_xAxisType}\n yAxisType={_yAxisType}\n componentRef={cartesianChartRef}\n stringDatasetForYAxisDomain={_yAxisLabels}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={_getLegendData()}\n createYAxis={createYAxisForHorizontalBarChartWithAxis}\n getDomainNRangeValues={_getDomainNRangeValues}\n createStringYAxis={createStringYAxisForHorizontalBarChartWithAxis}\n getMinMaxOfYAxis={findHBCWANumericMinMaxOfY}\n customizedCallout={_getCustomizedCallout()}\n getmargins={_getMargins}\n getYDomainMargins={_getYDomainMargins}\n onChartMouseLeave={_handleChartMouseLeave}\n onChartBlur={_handleChartMouseLeave}\n useUTC={useUTC}\n children={_createBars}\n />\n );\n } else {\n return (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n }\n },\n);\n\nGanttChart.displayName = 'GanttChart';\n"],"names":["React","max","d3Max","min","d3Min","useId","Legends","CartesianChart","ChartPopover","ChartTypes","YAxisType","XAxisTypes","getTypeOfAxis","getNextColor","findHBCWANumericMinMaxOfY","createYAxisForHorizontalBarChartWithAxis","createStringYAxisForHorizontalBarChartWithAxis","areArraysEqual","MIN_DOMAIN_MARGIN","sortAxisCategories","calculateAppropriateBarWidth","getColorFromToken","getScalePadding","getDateFormatLevel","formatDateToLocaleString","getMultiLevelDateTimeFormatOptions","useImageExport","DEFAULT_BAR_HEIGHT","MIN_BAR_HEIGHT","GanttChart","forwardRef","useUTC","yAxisCategoryOrder","maxBarHeight","props","forwardedRef","_barHeight","useRef","_margins","_calloutAnchorPoint","_emptyChartId","_legendId","_legendMap","_prevProps","calloutColor","setCalloutColor","useState","hoveredLegend","setHoveredLegend","calloutLegend","setCalloutLegend","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","selectedLegends","setSelectedLegends","legendProps","calloutDataPoint","setCalloutDataPoint","clickPosition","setClickPosition","x","y","isPopoverOpen","setPopoverOpen","cartesianChartRef","legendsRef","_legendsRef","componentRef","hideLegend","useEffect","current","_points","useMemo","colorIndex","data","map","point","legend","startColor","color","endColor","enableGradient","gradient","id","_xAxisType","length","start","DateAxis","_yAxisType","StringAxis","_yAxisPadding","yAxisPadding","undefined","_dateFormatOptions","lowestFormatLevel","highestFormatLevel","forEach","p","startFormatLevel","endFormatLevel","end","Math","_mapYValueToXValues","useCallback","yValueToXValues","Object","create","push","_getOrderedYAxisLabels","keys","sort","a","b","reverse","_yAxisLabels","_getDomainNRangeValues","points","margins","containerWidth","chartType","isRTL","xAxisType","barWidth","tickValues","xValues","xMin","xMax","dStartValue","dEndValue","rStartValue","left","rEndValue","right","_getMargins","_getFormattedXValue","formattedStartX","formattedEndX","culture","toString","_getCustomizedCallout","defaultRender","XValue","yAxisCalloutData","YValue","xAxisCalloutData","onRenderCalloutPerDataPoint","_getAriaLabel","xValue","yValue","callOutAccessibilityData","ariaLabel","_getHighlightedLegend","_legendHighlighted","includes","_noLegendHighlighted","_showCallout","target","updatePosition","clientX","clientY","rect","getBoundingClientRect","top","_onBarFocus","focusEvent","_onBarHover","mouseEvent","_onBarLeave","_handleChartMouseLeave","_getBarHeight","adjustedValue","barHeight","_getOrderedDataPoints","result","yValueToPoints","i","_createBars","xScale","yScalePrimary","yScale","getGradientId","legendId","gradientDefs","index","linearGradient","key","stop","offset","stopColor","scaleBandwidth","bandwidth","bars","rectStartX","rectEndX","rectY","shouldHighlight","width","abs","height","rx","roundCorners","fill","opacity","onClick","onMouseOver","event","onMouseLeave","onFocus","onBlur","tabIndex","role","aria-label","g","defs","_onLegendHover","_onLegendLeave","_onLegendSelectionChange","_selectedLegends","currentLegend","canSelectMultipleLegends","slice","onChange","_getLegendData","actions","legendTitle","title","hoverAction","onMouseOutAction","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","legendRef","_getChartTitle","chartTitle","_isChartEmpty","_getYDomainMargins","containerHeight","domainMargin","ySet","Set","add","uniqueY","Array","from","totalHeight","bottom","newX","newY","threshold","distance","sqrt","pow","calloutProps","tickParams","tickFormat","yAxisType","stringDatasetForYAxisDomain","legendBars","createYAxis","getDomainNRangeValues","createStringYAxis","getMinMaxOfYAxis","customizedCallout","getmargins","getYDomainMargins","onChartMouseLeave","onChartBlur","children","div","style","displayName"],"mappings":"AAAA;;;;;+BA2Ca6B;;;;;;;iEAzCU,QAAQ;yBACY,WAAW;gCAEhC,4BAA4B;uBAG1B,sBAAmB;wBAGZ,+BAA4B;8BAE9B,sCAAmC;wBAmBzD,2BAAwB;gCAC8C,4BAA4B;uBAC1E,2BAAwB;AAMvD,MAAMF,qBAAqB;AAC3B,MAAMC,iBAAiB;AAEhB,mBAAMC,WAAAA,GAAuD7B,OAAM8B,UAAU,CAClF,CAAC,EAAEC,SAAS,IAAI,EAAEC,qBAAqB,SAAS,EAAEC,eAAe,EAAE,EAAE,GAAGC,OAAO,EAAEC;QAcRD;IAbvE,MAAME,aAAapC,OAAMqC,MAAM,CAASV;IACxC,MAAMW,WAAWtC,OAAMqC,MAAM,CAAU,CAAC;IACxC,MAAME,sBAAsBvC,OAAMqC,MAAM,CAA6B;IACrE,MAAMG,oBAAgBnC,qBAAAA,EAAM;IAC5B,MAAMoC,gBAAYpC,qBAAAA,EAAM;IACxB,MAAMqC,aAAa1C,OAAMqC,MAAM,CAAuE,CAAC;IACvG,MAAMM,aAAa3C,OAAMqC,MAAM,CAA2B,CAAC;IAE3D,MAAM,CAACO,cAAcC,gBAAgB,GAAG7C,OAAM8C,QAAQ,CAAS;IAC/D,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,GAAG,CAACJ,OAAO5L,GAAG;QACtE,+EAA+E;QAC/E,IAAI8L,WAAWD,WAAW;YACxB/L,iBAAiB;gBAAEC,GAAG4L;gBAAM3L,GAAG4L;YAAK;YACpC1L,eAAe;QACjB;IACF;IAEA,IAAI,CAAC6K,iBAAiB;QACpB1M,WAAWoC,OAAO,GAAGmG,cAAchJ;QAEnC,MAAMqO,eAAkC;YACtChM;YACAJ;YACAqB,OAAOrC;YACPmC,QAAQ9B;YACR8F,QAAQ5F;YACR8F,QAAQ5F;YACR,GAAGnB,MAAM8N,YAAY;QACvB;QACA,MAAMC,aAAwD;YAC5DpI,YAAY3F,MAAM2F,UAAU;YAC5BqI,YAAYhO,MAAMgO,UAAU;QAC9B;QAEA,OAAA,WAAA,GACE,OAAA,aAAA,CAAC3P,sBAAAA,EAAAA;YACE,GAAG2B,KAAK;YACT2D,cAAcD;YACdiJ,YAAYD;YACZtH,QAAQ7C;YACRgD,WAAWhH,kBAAAA,CAAWoB,UAAU;YAChC8F,WAAWrC;YACX6K,WAAWzK;YACXrB,cAAcH;YACdkM,6BAA6BhJ;YAC7B4I,cAAcA;YACdC,YAAYA;YACZI,YAAYrC;YACZsC,aAAavP,gDAAAA;YACbwP,uBAAuBlJ;YACvBmJ,mBAAmBxP,sDAAAA;YACnByP,kBAAkB3P,iCAAAA;YAClB4P,mBAAmB7H;YACnB8H,YAAYpI;YACZqI,mBAAmB7B;YACnB8B,mBAAmBnG;YACnBoG,aAAapG;YACb3I,QAAQA;YACRgP,UAAU7F;;IAGhB,OAAO;QACL,OAAA,WAAA,GACE,OAAA,aAAA,CAAC8F,OAAAA;YAAI3L,IAAI7C;YAAe4K,MAAM;YAAS6D,OAAO;gBAAErE,SAAS;YAAI;YAAGS,cAAY;;IAEhF;AACF,GACA;AAEFxL,WAAWqP,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/GanttChart/GanttChart.types.ts"],"sourcesContent":["import type { RenderFunction } from '../../utilities/index';\nimport type {\n CartesianChartProps,\n CartesianChartStyleProps,\n CartesianChartStyles,\n GanttChartDataPoint,\n} from '../../index';\n\n/**\n * Gantt Chart properties\n * {@docCategory GanttChart}\n */\nexport interface GanttChartProps extends CartesianChartProps {\n /**\n * An array of data points to be rendered in the chart.\n */\n data?: GanttChartDataPoint[];\n\n /**\n * Callback function to render a custom callout for each data point.\n */\n onRenderCalloutPerDataPoint?: RenderFunction<GanttChartDataPoint>;\n\n /**\n * Height of each bar, in pixels.\n */\n barHeight?: number;\n\n /**\n * Title of the chart.\n */\n chartTitle?: string;\n\n /**\n * Locale identifier string used to format numbers and dates according to the specified culture.\n * Example: 'en-US', 'fr-FR'.\n */\n culture?: string;\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].\n * @default 1/2\n */\n yAxisPadding?: number;\n\n /**\n * If true, enables gradient fills for the bars.\n * @default false\n */\n enableGradient?: boolean;\n\n /**\n * If true, applies rounded corners to the bars.\n * @default false\n */\n roundCorners?: boolean;\n\n /**\n * Maximum height of each bar, in pixels.\n * @default 24\n */\n maxBarHeight?: number;\n}\n\n/**\n * Gantt Chart style properties\n * {@docCategory GanttChart}\n */\nexport interface GanttChartStyleProps extends CartesianChartStyleProps {}\n\n/**\n * Gantt Chart styles\n * {@docCategory GanttChart}\n */\nexport interface GanttChartStyles extends CartesianChartStyles {}\n"],"names":[],"mappings":"AAuEA;;;CAGC,GACD,WAAiE"}
1
+ {"version":3,"sources":["../../../src/components/GanttChart/GanttChart.types.ts"],"sourcesContent":["import type { RenderFunction } from '../../utilities/index';\nimport type {\n CartesianChartProps,\n CartesianChartStyleProps,\n CartesianChartStyles,\n GanttChartDataPoint,\n} from '../../index';\n\n/**\n * Gantt Chart properties\n * {@docCategory GanttChart}\n */\nexport interface GanttChartProps extends CartesianChartProps {\n /**\n * An array of data points to be rendered in the chart.\n */\n data?: GanttChartDataPoint[];\n\n /**\n * Callback function to render a custom callout for each data point.\n */\n onRenderCalloutPerDataPoint?: RenderFunction<GanttChartDataPoint>;\n\n /**\n * Height of each bar, in pixels.\n */\n barHeight?: number;\n\n /**\n * Title of the chart.\n */\n chartTitle?: string;\n\n /**\n * Locale identifier string used to format numbers and dates according to the specified culture.\n * Example: 'en-US', 'fr-FR'.\n */\n culture?: string;\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].\n * @default 1/2\n */\n yAxisPadding?: number;\n\n /**\n * If true, enables gradient fills for the bars.\n * @default false\n */\n enableGradient?: boolean;\n\n /**\n * If true, applies rounded corners to the bars.\n * @default false\n */\n roundCorners?: boolean;\n\n /**\n * Maximum height of each bar, in pixels.\n * @default 24\n */\n maxBarHeight?: number;\n}\n\n/**\n * Gantt Chart style properties\n * {@docCategory GanttChart}\n */\nexport interface GanttChartStyleProps extends CartesianChartStyleProps {}\n\n/**\n * Gantt Chart styles\n * {@docCategory GanttChart}\n */\nexport interface GanttChartStyles extends CartesianChartStyles {}\n"],"names":[],"mappings":"AAuEA;;;CAGC,GACD,WAAiE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/GanttChart/index.ts"],"sourcesContent":["export * from './GanttChart';\nexport * from './GanttChart.types';\n"],"names":[],"mappings":";;;;;uBAAc,kBAAe;uBACf,wBAAqB"}
1
+ {"version":3,"sources":["../../../src/components/GanttChart/index.ts"],"sourcesContent":["export * from './GanttChart';\nexport * from './GanttChart.types';\n"],"names":[],"mappings":";;;;;uBAAc,kBAAe;uBACf,wBAAqB"}
@@ -7,14 +7,14 @@ Object.defineProperty(exports, "__esModule", {
7
7
  function _export(target, all) {
8
8
  for(var name in all)Object.defineProperty(target, name, {
9
9
  enumerable: true,
10
- get: all[name]
10
+ get: Object.getOwnPropertyDescriptor(all, name).get
11
11
  });
12
12
  }
13
13
  _export(exports, {
14
- ganttClassNames: function() {
14
+ get ganttClassNames () {
15
15
  return ganttClassNames;
16
16
  },
17
- useGanttChartStyles: function() {
17
+ get useGanttChartStyles () {
18
18
  return useGanttChartStyles;
19
19
  }
20
20
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["useGanttChartStyles.styles.js"],"sourcesContent":["/**\n * @internal\n */ export const ganttClassNames = {\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n tooltip: '',\n axisTitle: '',\n chartTitle: '',\n opacityChangeOnHover: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n plotContainer: '',\n annotationLayer: ''\n};\n/**\n * Apply styling to the GanttChart component\n */ export const useGanttChartStyles = (props)=>{\n return {};\n};\n"],"names":["ganttClassNames","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","tooltip","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","plotContainer","annotationLayer","useGanttChartStyles","props"],"mappings":"AAAA;;CAEA,EAAI;;;;;;;;;;;mBAA4B;;;uBAqBI;;;;AArBzB,MAAMA,kBAAkB;IAC/BC,IAAI,EAAE,EAAE;IACRC,KAAK,EAAE,EAAE;IACTC,KAAK,EAAE,EAAE;IACTC,eAAe,EAAE,EAAE;IACnBC,KAAK,EAAE,EAAE;IACTC,kBAAkB,EAAE,EAAE;IACtBC,OAAO,EAAE,EAAE;IACXC,SAAS,EAAE,EAAE;IACbC,UAAU,EAAE,EAAE;IACdC,oBAAoB,EAAE,EAAE;IACxBC,WAAW,EAAE,EAAE;IACfC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE,EAAE;IACdC,KAAK,EAAE,EAAE;IACTC,cAAc,EAAE,EAAE;IAClBC,aAAa,EAAE,EAAE;IACjBC,eAAe,EAAE;AACrB,CAAC;AAGU,MAAMC,uBAAuBC,KAAK,IAAG;IAC5C,OAAO,CAAC,CAAC;AACb,CAAC"}
1
+ {"version":3,"sources":["useGanttChartStyles.styles.js"],"sourcesContent":["/**\n * @internal\n */ export const ganttClassNames = {\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n tooltip: '',\n axisTitle: '',\n chartTitle: '',\n opacityChangeOnHover: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n plotContainer: '',\n annotationLayer: ''\n};\n/**\n * Apply styling to the GanttChart component\n */ export const useGanttChartStyles = (props)=>{\n return {};\n};\n"],"names":["ganttClassNames","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","tooltip","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","plotContainer","annotationLayer","useGanttChartStyles","props"],"mappings":"AAAA;;CAEA,EAAI;;;;;;;;;;;;;;;;;;AAAO,MAAMA,eAAe,GAAG;IAC/BC,IAAI,EAAE,EAAE;IACRC,KAAK,EAAE,EAAE;IACTC,KAAK,EAAE,EAAE;IACTC,eAAe,EAAE,EAAE;IACnBC,KAAK,EAAE,EAAE;IACTC,kBAAkB,EAAE,EAAE;IACtBC,OAAO,EAAE,EAAE;IACXC,SAAS,EAAE,EAAE;IACbC,UAAU,EAAE,EAAE;IACdC,oBAAoB,EAAE,EAAE;IACxBC,WAAW,EAAE,EAAE;IACfC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE,EAAE;IACdC,KAAK,EAAE,EAAE;IACTC,cAAc,EAAE,EAAE;IAClBC,aAAa,EAAE,EAAE;IACjBC,eAAe,EAAE;AACrB,CAAC;AAGU,MAAMC,mBAAmB,IAAIC,KAAK,IAAG;IAC5C,OAAO,CAAC,CAAC;AACb,CAAC"}
@@ -7,14 +7,14 @@ Object.defineProperty(exports, "__esModule", {
7
7
  function _export(target, all) {
8
8
  for(var name in all)Object.defineProperty(target, name, {
9
9
  enumerable: true,
10
- get: all[name]
10
+ get: Object.getOwnPropertyDescriptor(all, name).get
11
11
  });
12
12
  }
13
13
  _export(exports, {
14
- ganttClassNames: function() {
14
+ get ganttClassNames () {
15
15
  return ganttClassNames;
16
16
  },
17
- useGanttChartStyles: function() {
17
+ get useGanttChartStyles () {
18
18
  return useGanttChartStyles;
19
19
  }
20
20
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/GanttChart/useGanttChartStyles.styles.ts"],"sourcesContent":["import type { GanttChartStyles, GanttChartProps } from '../../index';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\n/**\n * @internal\n */\nexport const ganttClassNames: SlotClassNames<GanttChartStyles> = {\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n tooltip: '',\n axisTitle: '',\n chartTitle: '',\n opacityChangeOnHover: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n plotContainer: '',\n annotationLayer: '',\n};\n\n/**\n * Apply styling to the GanttChart component\n */\nexport const useGanttChartStyles = (props: GanttChartProps): GanttChartStyles => {\n return {};\n};\n"],"names":["ganttClassNames","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","tooltip","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","plotContainer","annotationLayer","useGanttChartStyles","props"],"mappings":"AAGA;;CAEC,GACD;;;;;;;;;;;mBAAaA;;;uBAuBAkB;;;;AAvBN,MAAMlB,kBAAoD;IAC/DC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,SAAS;IACTC,WAAW;IACXC,YAAY;IACZC,sBAAsB;IACtBC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;IACPC,gBAAgB;IAChBC,eAAe;IACfC,iBAAiB;AACnB,EAAE;AAKK,MAAMC,sBAAsB,CAACC;IAClC,OAAO,CAAC;AACV,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/GanttChart/useGanttChartStyles.styles.ts"],"sourcesContent":["import type { GanttChartStyles, GanttChartProps } from '../../index';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\n/**\n * @internal\n */\nexport const ganttClassNames: SlotClassNames<GanttChartStyles> = {\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n tooltip: '',\n axisTitle: '',\n chartTitle: '',\n opacityChangeOnHover: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n plotContainer: '',\n annotationLayer: '',\n};\n\n/**\n * Apply styling to the GanttChart component\n */\nexport const useGanttChartStyles = (props: GanttChartProps): GanttChartStyles => {\n return {};\n};\n"],"names":["ganttClassNames","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","tooltip","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","plotContainer","annotationLayer","useGanttChartStyles","props"],"mappings":"AAGA;;CAEC,GACD;;;;;;;;;;;;;;;;;;AAAO,MAAMA,kBAAoD;IAC/DC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,SAAS;IACTC,WAAW;IACXC,YAAY;IACZC,sBAAsB;IACtBC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;IACPC,gBAAgB;IAChBC,eAAe;IACfC,iBAAiB;AACnB,EAAE;AAKK,MAAMC,sBAAsB,CAACC;IAClC,OAAO,CAAC;AACV,EAAE"}
@@ -6,26 +6,29 @@ Object.defineProperty(exports, "__esModule", {
6
6
  function _export(target, all) {
7
7
  for(var name in all)Object.defineProperty(target, name, {
8
8
  enumerable: true,
9
- get: all[name]
9
+ get: Object.getOwnPropertyDescriptor(all, name).get
10
10
  });
11
11
  }
12
12
  _export(exports, {
13
- ARC_PADDING: function() {
13
+ get ARC_PADDING () {
14
14
  return ARC_PADDING;
15
15
  },
16
- BREAKPOINTS: function() {
16
+ get BREAKPOINTS () {
17
17
  return BREAKPOINTS;
18
18
  },
19
- GaugeChart: function() {
19
+ get GaugeChart () {
20
20
  return GaugeChart;
21
21
  },
22
- calcNeedleRotation: function() {
22
+ get calcNeedleRotation () {
23
23
  return calcNeedleRotation;
24
24
  },
25
- getChartValueLabel: function() {
25
+ get getChartValueLabel () {
26
26
  return getChartValueLabel;
27
27
  },
28
- getSegmentLabel: function() {
28
+ get getGaugeChartSegmentLabel () {
29
+ return getGaugeChartSegmentLabel;
30
+ },
31
+ get getSegmentLabel () {
29
32
  return getSegmentLabel;
30
33
  }
31
34
  });
@@ -39,6 +42,7 @@ const _chartutilities = require("@fluentui/chart-utilities");
39
42
  const _SVGTooltipText = require("../../utilities/SVGTooltipText.cjs");
40
43
  const _index1 = require("../Legends/index.cjs");
41
44
  const _reacttabster = require("@fluentui/react-tabster");
45
+ const _reactutilities = require("@fluentui/react-utilities");
42
46
  const _ChartPopover = require("../CommonComponents/ChartPopover.cjs");
43
47
  const _hooks = require("../../utilities/hooks.cjs");
44
48
  const GAUGE_MARGIN = 16;
@@ -96,18 +100,32 @@ const getSegmentLabel = (segment, minValue, maxValue, variant, isAriaLabel = fal
96
100
  return minValue === 0 && variant === 'single-segment' ? `${segment.size} (${(segment.size / maxValue * 100).toFixed()}%)` : `${segment.start} - ${segment.end}`;
97
101
  };
98
102
  const getChartValueLabel = (chartValue, minValue, maxValue, chartValueFormat, forCallout = false)=>{
99
- if (forCallout) {
100
- // When displaying the chart value as a percentage, use fractions in the callout, and vice versa.
101
- // This helps clarify the actual value and avoid repetition.
102
- return minValue !== 0 ? chartValue.toString() : chartValueFormat === 'fraction' ? `${(chartValue / maxValue * 100).toFixed()}%` : `${chartValue}/${maxValue}`;
103
+ if (typeof chartValueFormat === 'function') {
104
+ return chartValueFormat([
105
+ chartValue - minValue,
106
+ maxValue - minValue
107
+ ]);
108
+ }
109
+ if (chartValueFormat === 'fraction') {
110
+ return `${chartValue}/${maxValue}`;
103
111
  }
104
- return typeof chartValueFormat === 'function' ? chartValueFormat([
105
- chartValue - minValue,
106
- maxValue - minValue
107
- ]) : minValue !== 0 ? chartValue.toString() : chartValueFormat === 'fraction' ? `${chartValue}/${maxValue}` : `${(chartValue / maxValue * 100).toFixed()}%`;
112
+ return `${(chartValue / maxValue * 100).toFixed()}%`;
113
+ };
114
+ const getGaugeChartSegmentLabel = (segment, minValue, maxValue, variant, chartValueFormat, isAriaLabel = false)=>{
115
+ if (minValue === 0 && variant === 'single-segment' || typeof chartValueFormat === 'function') {
116
+ return getSegmentLabel(segment, minValue, maxValue, variant, isAriaLabel);
117
+ }
118
+ if (!chartValueFormat || chartValueFormat === 'percentage') {
119
+ const startPercentage = (segment.start / maxValue * 100).toFixed();
120
+ const endPercentage = (segment.end / maxValue * 100).toFixed();
121
+ return isAriaLabel ? `${segment.legend}, ${startPercentage}% to ${endPercentage}%` : `${startPercentage}% - ${endPercentage}%`;
122
+ }
123
+ return isAriaLabel ? `${segment.legend}, ${segment.start} to ${segment.end}` : `${segment.start} - ${segment.end}`;
108
124
  };
109
125
  const GaugeChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
126
+ var _ref;
110
127
  var _props_legendProps;
128
+ const _gaugeChartId = (0, _reactutilities.useId)('gauge-chart');
111
129
  const _getMargins = ()=>{
112
130
  const { hideMinMax, chartTitle, sublabel } = props;
113
131
  return {
@@ -231,7 +249,7 @@ const GaugeChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
231
249
  const strokeWidth = 2;
232
250
  const halfStrokeWidth = strokeWidth / 2;
233
251
  const needleLength = _outerRadius - _innerRadius + EXTRA_NEEDLE_LENGTH;
234
- const needleId = `gauge-chart-needle`;
252
+ const needleId = `${_gaugeChartId}-needle`;
235
253
  return /*#__PURE__*/ _react.createElement("g", {
236
254
  transform: `rotate(${rtlSafeNeedleRotation}, 0, 0)`
237
255
  }, /*#__PURE__*/ _react.createElement("path", {
@@ -337,7 +355,7 @@ const GaugeChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
337
355
  const hoverYValues = _segments.filter((segment)=>_noLegendHighlighted() || _legendHighlighted(segment.legend)).map((segment)=>{
338
356
  const yValue = {
339
357
  legend: segment.legend,
340
- y: getSegmentLabel(segment, _minValue, _maxValue, props.variant),
358
+ y: getGaugeChartSegmentLabel(segment, _minValue, _maxValue, props.variant, props.chartValueFormat),
341
359
  color: segment.color
342
360
  };
343
361
  return yValue;
@@ -497,7 +515,6 @@ const GaugeChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
497
515
  circular: true,
498
516
  axis: 'horizontal'
499
517
  });
500
- var _ref;
501
518
  return /*#__PURE__*/ _react.createElement("div", {
502
519
  className: classes.root,
503
520
  ref: (el)=>{
@@ -541,7 +558,7 @@ const GaugeChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
541
558
  "aria-label": `${_segments.length} ${_segments.length === 1 ? 'segment' : 'segments'}`
542
559
  }, arcs.map((arc, index)=>{
543
560
  const segment = _segments[arc.segmentIndex];
544
- const arcId = `gauge-chart-arc-${index}`;
561
+ const arcId = `${_gaugeChartId}-arc-${index}`;
545
562
  return /*#__PURE__*/ _react.createElement(_react.Fragment, {
546
563
  key: index
547
564
  }, /*#__PURE__*/ _react.createElement("path", {
@@ -552,7 +569,7 @@ const GaugeChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
552
569
  fill: segment.color,
553
570
  opacity: _legendHighlighted(segment.legend) || _noLegendHighlighted() ? 1 : 0.1,
554
571
  ...(0, _index.getAccessibleDataObject)({
555
- ariaLabel: getSegmentLabel(segment, _minValue, _maxValue, props.variant, true),
572
+ ariaLabel: getGaugeChartSegmentLabel(segment, _minValue, _maxValue, props.variant, props.chartValueFormat, true),
556
573
  ...segment.accessibilityData
557
574
  }, 'option', true),
558
575
  onFocus: (e)=>_handleFocus(e, segment.legend, arcId),
@@ -598,10 +615,14 @@ const GaugeChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
598
615
  customizedCallout: (_ref = (()=>{
599
616
  const calloutData = {
600
617
  legend: calloutLegend,
618
+ chartTitle: props.chartTitle,
601
619
  chartValue: props.chartValue,
602
620
  minValue: _minValue,
603
621
  maxValue: _maxValue,
604
622
  chartValueLabel: getChartValueLabel(props.chartValue, _minValue, _maxValue, props.chartValueFormat, true),
623
+ segments: _segments.slice(0, props.segments.length).map((segment)=>({
624
+ ...segment
625
+ })),
605
626
  segmentValues: hoverYValues
606
627
  };
607
628
  return props.onRenderCallout ? props.onRenderCallout(calloutData, _renderCallout) : _renderCallout(calloutData);