@fluentui/react-charts 9.3.28 → 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 (430) hide show
  1. package/CHANGELOG.md +12 -3
  2. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +1 -4
  3. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
  4. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -1
  5. package/lib/components/AnnotationOnlyChart/index.js.map +1 -1
  6. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -1
  7. package/lib/components/AreaChart/AreaChart.js +2 -2
  8. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  9. package/lib/components/AreaChart/AreaChart.types.js.map +1 -1
  10. package/lib/components/AreaChart/index.js.map +1 -1
  11. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  12. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  13. package/lib/components/ChartTable/ChartTable.types.js.map +1 -1
  14. package/lib/components/ChartTable/index.js.map +1 -1
  15. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  16. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +19 -29
  17. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
  18. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -1
  19. package/lib/components/CommonComponents/Annotations/index.js.map +1 -1
  20. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +2 -2
  21. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -1
  22. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +2 -2
  23. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -1
  24. package/lib/components/CommonComponents/CartesianChart.js +11 -15
  25. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  26. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  27. package/lib/components/CommonComponents/ChartPopover.js +1 -1
  28. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  29. package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -1
  30. package/lib/components/CommonComponents/index.js.map +1 -1
  31. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  32. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  33. package/lib/components/DeclarativeChart/DeclarativeChart.js +9 -9
  34. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  35. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +4 -4
  36. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  37. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +92 -110
  38. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  39. package/lib/components/DeclarativeChart/index.js.map +1 -1
  40. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  41. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
  42. package/lib/components/DonutChart/Arc/index.js.map +1 -1
  43. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  44. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  45. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  46. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  47. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
  48. package/lib/components/DonutChart/Pie/index.js.map +1 -1
  49. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -1
  50. package/lib/components/DonutChart/index.js.map +1 -1
  51. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  52. package/lib/components/FunnelChart/FunnelChart.js +5 -5
  53. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  54. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
  55. package/lib/components/FunnelChart/funnelGeometry.js.map +1 -1
  56. package/lib/components/FunnelChart/index.js.map +1 -1
  57. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
  58. package/lib/components/GanttChart/GanttChart.js +3 -3
  59. package/lib/components/GanttChart/GanttChart.js.map +1 -1
  60. package/lib/components/GanttChart/GanttChart.types.js.map +1 -1
  61. package/lib/components/GanttChart/index.js.map +1 -1
  62. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
  63. package/lib/components/GaugeChart/GaugeChart.js +1 -1
  64. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  65. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  66. package/lib/components/GaugeChart/index.js.map +1 -1
  67. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
  68. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +20 -21
  69. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  70. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  71. package/lib/components/GroupedVerticalBarChart/index.js.map +1 -1
  72. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  73. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  74. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  75. package/lib/components/HeatMapChart/index.js.map +1 -1
  76. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
  77. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +5 -6
  78. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  79. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  80. package/lib/components/HorizontalBarChart/index.js.map +1 -1
  81. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  82. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -3
  83. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  84. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  85. package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  86. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  87. package/lib/components/Legends/Legends.js +1 -2
  88. package/lib/components/Legends/Legends.js.map +1 -1
  89. package/lib/components/Legends/Legends.types.js.map +1 -1
  90. package/lib/components/Legends/OverflowMenu.js +1 -1
  91. package/lib/components/Legends/OverflowMenu.js.map +1 -1
  92. package/lib/components/Legends/index.js.map +1 -1
  93. package/lib/components/Legends/shape.js.map +1 -1
  94. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  95. package/lib/components/LineChart/LineChart.js +23 -23
  96. package/lib/components/LineChart/LineChart.js.map +1 -1
  97. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  98. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  99. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  100. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  101. package/lib/components/LineChart/index.js.map +1 -1
  102. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  103. package/lib/components/PolarChart/PolarChart.js +3 -4
  104. package/lib/components/PolarChart/PolarChart.js.map +1 -1
  105. package/lib/components/PolarChart/PolarChart.types.js.map +1 -1
  106. package/lib/components/PolarChart/PolarChart.utils.js +3 -3
  107. package/lib/components/PolarChart/PolarChart.utils.js.map +1 -1
  108. package/lib/components/PolarChart/index.js.map +1 -1
  109. package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js.map +1 -1
  110. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +1 -1
  111. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  112. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  113. package/lib/components/ResponsiveContainer/index.js.map +1 -1
  114. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -1
  115. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  116. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  117. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  118. package/lib/components/SankeyChart/index.js.map +1 -1
  119. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  120. package/lib/components/ScatterChart/ScatterChart.js +1 -2
  121. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  122. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  123. package/lib/components/ScatterChart/index.js.map +1 -1
  124. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  125. package/lib/components/Sparkline/Sparkline.js +1 -3
  126. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  127. package/lib/components/Sparkline/Sparkline.types.js.map +1 -1
  128. package/lib/components/Sparkline/index.js.map +1 -1
  129. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -1
  130. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js.map +1 -1
  131. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js.map +1 -1
  132. package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js +2 -2
  133. package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js.map +1 -1
  134. package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js.map +1 -1
  135. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +37 -45
  136. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +1 -1
  137. package/lib/components/VegaDeclarativeChart/VegaLiteTypes.js.map +1 -1
  138. package/lib/components/VegaDeclarativeChart/index.js.map +1 -1
  139. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  140. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  141. package/lib/components/VerticalBarChart/index.js.map +1 -1
  142. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  143. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +5 -5
  144. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  145. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  146. package/lib/components/VerticalStackedBarChart/index.js.map +1 -1
  147. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  148. package/lib/types/ChartAnnotation.js.map +1 -1
  149. package/lib/types/DataPoint.js.map +1 -1
  150. package/lib/types/EventAnnotation.js.map +1 -1
  151. package/lib/types/LegendDataItem.js.map +1 -1
  152. package/lib/types/index.js.map +1 -1
  153. package/lib/utilities/ChartTitle.js +3 -4
  154. package/lib/utilities/ChartTitle.js.map +1 -1
  155. package/lib/utilities/Common.styles.js +1 -4
  156. package/lib/utilities/Common.styles.js.map +1 -1
  157. package/lib/utilities/Common.styles.raw.js +1 -4
  158. package/lib/utilities/Common.styles.raw.js.map +1 -1
  159. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  160. package/lib/utilities/KeyCodes.js.map +1 -1
  161. package/lib/utilities/SVGTooltipText.js.map +1 -1
  162. package/lib/utilities/async-utils.js.map +1 -1
  163. package/lib/utilities/colors.js.map +1 -1
  164. package/lib/utilities/getWindow.js.map +1 -1
  165. package/lib/utilities/hooks.js.map +1 -1
  166. package/lib/utilities/image-export-utils.js.map +1 -1
  167. package/lib/utilities/index.js.map +1 -1
  168. package/lib/utilities/overflow-utils.js.map +1 -1
  169. package/lib/utilities/scatterpolar-utils.js +3 -4
  170. package/lib/utilities/scatterpolar-utils.js.map +1 -1
  171. package/lib/utilities/string.js.map +1 -1
  172. package/lib/utilities/test-data/specialChartNames.js.map +1 -1
  173. package/lib/utilities/test-data.js.map +1 -1
  174. package/lib/utilities/utilities.js +9 -9
  175. package/lib/utilities/utilities.js.map +1 -1
  176. package/lib/utilities/vbc-utils.js.map +1 -1
  177. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.cjs +1 -4
  178. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.cjs.map +1 -1
  179. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.cjs.map +1 -1
  180. package/lib-commonjs/components/AnnotationOnlyChart/index.cjs.map +1 -1
  181. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.cjs.map +1 -1
  182. package/lib-commonjs/components/AreaChart/AreaChart.cjs +2 -2
  183. package/lib-commonjs/components/AreaChart/AreaChart.cjs.map +1 -1
  184. package/lib-commonjs/components/AreaChart/AreaChart.types.cjs.map +1 -1
  185. package/lib-commonjs/components/AreaChart/index.cjs.map +1 -1
  186. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.cjs +3 -3
  187. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.cjs.map +1 -1
  188. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.cjs +3 -3
  189. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.cjs.map +1 -1
  190. package/lib-commonjs/components/ChartTable/ChartTable.cjs.map +1 -1
  191. package/lib-commonjs/components/ChartTable/ChartTable.types.cjs.map +1 -1
  192. package/lib-commonjs/components/ChartTable/index.cjs.map +1 -1
  193. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.cjs +3 -3
  194. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.cjs.map +1 -1
  195. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.cjs +3 -3
  196. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.cjs.map +1 -1
  197. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.cjs +19 -29
  198. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.cjs.map +1 -1
  199. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.cjs.map +1 -1
  200. package/lib-commonjs/components/CommonComponents/Annotations/index.cjs.map +1 -1
  201. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.cjs +14 -14
  202. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.cjs.map +1 -1
  203. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.cjs +14 -14
  204. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.cjs.map +1 -1
  205. package/lib-commonjs/components/CommonComponents/CartesianChart.cjs +11 -15
  206. package/lib-commonjs/components/CommonComponents/CartesianChart.cjs.map +1 -1
  207. package/lib-commonjs/components/CommonComponents/CartesianChart.types.cjs.map +1 -1
  208. package/lib-commonjs/components/CommonComponents/ChartPopover.cjs +1 -1
  209. package/lib-commonjs/components/CommonComponents/ChartPopover.cjs.map +1 -1
  210. package/lib-commonjs/components/CommonComponents/ChartPopover.types.cjs.map +1 -1
  211. package/lib-commonjs/components/CommonComponents/index.cjs.map +1 -1
  212. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.cjs +3 -3
  213. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.cjs.map +1 -1
  214. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.cjs +3 -3
  215. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.cjs.map +1 -1
  216. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.cjs +3 -3
  217. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.cjs.map +1 -1
  218. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.cjs +3 -3
  219. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.cjs.map +1 -1
  220. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.cjs +9 -9
  221. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.cjs.map +1 -1
  222. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.cjs +13 -13
  223. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.cjs.map +1 -1
  224. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.cjs +122 -140
  225. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.cjs.map +1 -1
  226. package/lib-commonjs/components/DeclarativeChart/index.cjs.map +1 -1
  227. package/lib-commonjs/components/DonutChart/Arc/Arc.cjs.map +1 -1
  228. package/lib-commonjs/components/DonutChart/Arc/Arc.types.cjs.map +1 -1
  229. package/lib-commonjs/components/DonutChart/Arc/index.cjs.map +1 -1
  230. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.cjs +3 -3
  231. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.cjs.map +1 -1
  232. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.cjs +3 -3
  233. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.cjs.map +1 -1
  234. package/lib-commonjs/components/DonutChart/DonutChart.cjs.map +1 -1
  235. package/lib-commonjs/components/DonutChart/DonutChart.types.cjs.map +1 -1
  236. package/lib-commonjs/components/DonutChart/Pie/Pie.cjs.map +1 -1
  237. package/lib-commonjs/components/DonutChart/Pie/Pie.types.cjs.map +1 -1
  238. package/lib-commonjs/components/DonutChart/Pie/index.cjs.map +1 -1
  239. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.cjs +3 -3
  240. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.cjs.map +1 -1
  241. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.cjs +3 -3
  242. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.cjs.map +1 -1
  243. package/lib-commonjs/components/DonutChart/index.cjs.map +1 -1
  244. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.cjs +3 -3
  245. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.cjs.map +1 -1
  246. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.cjs +3 -3
  247. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.cjs.map +1 -1
  248. package/lib-commonjs/components/FunnelChart/FunnelChart.cjs +5 -5
  249. package/lib-commonjs/components/FunnelChart/FunnelChart.cjs.map +1 -1
  250. package/lib-commonjs/components/FunnelChart/FunnelChart.types.cjs.map +1 -1
  251. package/lib-commonjs/components/FunnelChart/funnelGeometry.cjs +6 -6
  252. package/lib-commonjs/components/FunnelChart/funnelGeometry.cjs.map +1 -1
  253. package/lib-commonjs/components/FunnelChart/index.cjs.map +1 -1
  254. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.cjs +3 -3
  255. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.cjs.map +1 -1
  256. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.cjs +3 -3
  257. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.cjs.map +1 -1
  258. package/lib-commonjs/components/GanttChart/GanttChart.cjs +3 -3
  259. package/lib-commonjs/components/GanttChart/GanttChart.cjs.map +1 -1
  260. package/lib-commonjs/components/GanttChart/GanttChart.types.cjs.map +1 -1
  261. package/lib-commonjs/components/GanttChart/index.cjs.map +1 -1
  262. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.cjs +3 -3
  263. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.cjs.map +1 -1
  264. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.cjs +3 -3
  265. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.cjs.map +1 -1
  266. package/lib-commonjs/components/GaugeChart/GaugeChart.cjs +9 -9
  267. package/lib-commonjs/components/GaugeChart/GaugeChart.cjs.map +1 -1
  268. package/lib-commonjs/components/GaugeChart/GaugeChart.types.cjs.map +1 -1
  269. package/lib-commonjs/components/GaugeChart/index.cjs.map +1 -1
  270. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.cjs +3 -3
  271. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.cjs.map +1 -1
  272. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.cjs +3 -3
  273. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.cjs.map +1 -1
  274. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.cjs +20 -21
  275. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.cjs.map +1 -1
  276. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.cjs.map +1 -1
  277. package/lib-commonjs/components/GroupedVerticalBarChart/index.cjs.map +1 -1
  278. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.cjs +3 -3
  279. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.cjs.map +1 -1
  280. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.cjs +3 -3
  281. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.cjs.map +1 -1
  282. package/lib-commonjs/components/HeatMapChart/HeatMapChart.cjs.map +1 -1
  283. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.cjs.map +1 -1
  284. package/lib-commonjs/components/HeatMapChart/index.cjs.map +1 -1
  285. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.cjs +3 -3
  286. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.cjs.map +1 -1
  287. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.cjs +3 -3
  288. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.cjs.map +1 -1
  289. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.cjs +5 -6
  290. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.cjs.map +1 -1
  291. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.cjs.map +1 -1
  292. package/lib-commonjs/components/HorizontalBarChart/index.cjs.map +1 -1
  293. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.cjs +3 -3
  294. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.cjs.map +1 -1
  295. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.cjs +3 -3
  296. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.cjs.map +1 -1
  297. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.cjs +2 -3
  298. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.cjs.map +1 -1
  299. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.cjs.map +1 -1
  300. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.cjs.map +1 -1
  301. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.cjs +3 -3
  302. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.cjs.map +1 -1
  303. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.cjs +3 -3
  304. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.cjs.map +1 -1
  305. package/lib-commonjs/components/Legends/Legends.cjs +1 -2
  306. package/lib-commonjs/components/Legends/Legends.cjs.map +1 -1
  307. package/lib-commonjs/components/Legends/Legends.types.cjs.map +1 -1
  308. package/lib-commonjs/components/Legends/OverflowMenu.cjs +1 -1
  309. package/lib-commonjs/components/Legends/OverflowMenu.cjs.map +1 -1
  310. package/lib-commonjs/components/Legends/index.cjs.map +1 -1
  311. package/lib-commonjs/components/Legends/shape.cjs.map +1 -1
  312. package/lib-commonjs/components/Legends/useLegendsStyles.styles.cjs +11 -11
  313. package/lib-commonjs/components/Legends/useLegendsStyles.styles.cjs.map +1 -1
  314. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.cjs +11 -11
  315. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.cjs.map +1 -1
  316. package/lib-commonjs/components/LineChart/LineChart.cjs +23 -23
  317. package/lib-commonjs/components/LineChart/LineChart.cjs.map +1 -1
  318. package/lib-commonjs/components/LineChart/LineChart.types.cjs.map +1 -1
  319. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.cjs.map +1 -1
  320. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.cjs.map +1 -1
  321. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.cjs.map +1 -1
  322. package/lib-commonjs/components/LineChart/index.cjs.map +1 -1
  323. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.cjs +3 -3
  324. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.cjs.map +1 -1
  325. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.cjs +3 -3
  326. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.cjs.map +1 -1
  327. package/lib-commonjs/components/PolarChart/PolarChart.cjs +3 -4
  328. package/lib-commonjs/components/PolarChart/PolarChart.cjs.map +1 -1
  329. package/lib-commonjs/components/PolarChart/PolarChart.types.cjs.map +1 -1
  330. package/lib-commonjs/components/PolarChart/PolarChart.utils.cjs +10 -10
  331. package/lib-commonjs/components/PolarChart/PolarChart.utils.cjs.map +1 -1
  332. package/lib-commonjs/components/PolarChart/index.cjs.map +1 -1
  333. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.cjs +3 -3
  334. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.cjs.map +1 -1
  335. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.cjs +3 -3
  336. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.cjs.map +1 -1
  337. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.cjs +1 -1
  338. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.cjs.map +1 -1
  339. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.cjs.map +1 -1
  340. package/lib-commonjs/components/ResponsiveContainer/index.cjs.map +1 -1
  341. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.cjs +3 -3
  342. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.cjs.map +1 -1
  343. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.cjs +3 -3
  344. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.cjs.map +1 -1
  345. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.cjs.map +1 -1
  346. package/lib-commonjs/components/SankeyChart/SankeyChart.cjs +5 -5
  347. package/lib-commonjs/components/SankeyChart/SankeyChart.cjs.map +1 -1
  348. package/lib-commonjs/components/SankeyChart/SankeyChart.types.cjs.map +1 -1
  349. package/lib-commonjs/components/SankeyChart/index.cjs.map +1 -1
  350. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.cjs +3 -3
  351. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.cjs.map +1 -1
  352. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.cjs +3 -3
  353. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.cjs.map +1 -1
  354. package/lib-commonjs/components/ScatterChart/ScatterChart.cjs +1 -2
  355. package/lib-commonjs/components/ScatterChart/ScatterChart.cjs.map +1 -1
  356. package/lib-commonjs/components/ScatterChart/ScatterChart.types.cjs.map +1 -1
  357. package/lib-commonjs/components/ScatterChart/index.cjs.map +1 -1
  358. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.cjs +3 -3
  359. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.cjs.map +1 -1
  360. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.cjs +3 -3
  361. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.cjs.map +1 -1
  362. package/lib-commonjs/components/Sparkline/Sparkline.cjs +1 -3
  363. package/lib-commonjs/components/Sparkline/Sparkline.cjs.map +1 -1
  364. package/lib-commonjs/components/Sparkline/Sparkline.types.cjs.map +1 -1
  365. package/lib-commonjs/components/Sparkline/index.cjs.map +1 -1
  366. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.cjs +3 -3
  367. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.cjs.map +1 -1
  368. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.cjs +3 -3
  369. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.cjs.map +1 -1
  370. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChart.cjs.map +1 -1
  371. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.cjs +3 -3
  372. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.cjs.map +1 -1
  373. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteColorAdapter.cjs +7 -7
  374. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteColorAdapter.cjs.map +1 -1
  375. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.cjs.map +1 -1
  376. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.cjs +54 -62
  377. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.cjs.map +1 -1
  378. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteTypes.cjs.map +1 -1
  379. package/lib-commonjs/components/VegaDeclarativeChart/index.cjs.map +1 -1
  380. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.cjs.map +1 -1
  381. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.cjs.map +1 -1
  382. package/lib-commonjs/components/VerticalBarChart/index.cjs.map +1 -1
  383. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.cjs +3 -3
  384. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.cjs.map +1 -1
  385. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.cjs +3 -3
  386. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.cjs.map +1 -1
  387. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.cjs +5 -5
  388. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.cjs.map +1 -1
  389. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.cjs.map +1 -1
  390. package/lib-commonjs/components/VerticalStackedBarChart/index.cjs.map +1 -1
  391. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.cjs +3 -3
  392. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.cjs.map +1 -1
  393. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.cjs +3 -3
  394. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.cjs.map +1 -1
  395. package/lib-commonjs/types/ChartAnnotation.cjs.map +1 -1
  396. package/lib-commonjs/types/DataPoint.cjs.map +1 -1
  397. package/lib-commonjs/types/EventAnnotation.cjs.map +1 -1
  398. package/lib-commonjs/types/LegendDataItem.cjs.map +1 -1
  399. package/lib-commonjs/types/index.cjs.map +1 -1
  400. package/lib-commonjs/utilities/ChartTitle.cjs +3 -4
  401. package/lib-commonjs/utilities/ChartTitle.cjs.map +1 -1
  402. package/lib-commonjs/utilities/Common.styles.cjs +9 -12
  403. package/lib-commonjs/utilities/Common.styles.cjs.map +1 -1
  404. package/lib-commonjs/utilities/Common.styles.raw.cjs +9 -12
  405. package/lib-commonjs/utilities/Common.styles.raw.cjs.map +1 -1
  406. package/lib-commonjs/utilities/FocusableTooltipText.cjs.map +1 -1
  407. package/lib-commonjs/utilities/KeyCodes.cjs.map +1 -1
  408. package/lib-commonjs/utilities/SVGTooltipText.cjs.map +1 -1
  409. package/lib-commonjs/utilities/async-utils.cjs.map +1 -1
  410. package/lib-commonjs/utilities/colors.cjs +7 -7
  411. package/lib-commonjs/utilities/colors.cjs.map +1 -1
  412. package/lib-commonjs/utilities/getWindow.cjs.map +1 -1
  413. package/lib-commonjs/utilities/hooks.cjs.map +1 -1
  414. package/lib-commonjs/utilities/image-export-utils.cjs +3 -3
  415. package/lib-commonjs/utilities/image-export-utils.cjs.map +1 -1
  416. package/lib-commonjs/utilities/index.cjs.map +1 -1
  417. package/lib-commonjs/utilities/overflow-utils.cjs +4 -4
  418. package/lib-commonjs/utilities/overflow-utils.cjs.map +1 -1
  419. package/lib-commonjs/utilities/scatterpolar-utils.cjs +6 -7
  420. package/lib-commonjs/utilities/scatterpolar-utils.cjs.map +1 -1
  421. package/lib-commonjs/utilities/string.cjs +1 -1
  422. package/lib-commonjs/utilities/string.cjs.map +1 -1
  423. package/lib-commonjs/utilities/test-data/specialChartNames.cjs.map +1 -1
  424. package/lib-commonjs/utilities/test-data.cjs +18 -18
  425. package/lib-commonjs/utilities/test-data.cjs.map +1 -1
  426. package/lib-commonjs/utilities/utilities.cjs +92 -92
  427. package/lib-commonjs/utilities/utilities.cjs.map +1 -1
  428. package/lib-commonjs/utilities/vbc-utils.cjs +7 -7
  429. package/lib-commonjs/utilities/vbc-utils.cjs.map +1 -1
  430. package/package.json +2 -2
@@ -10,6 +10,7 @@ export const DEFAULT_CONNECTOR_END_PADDING = 0;
10
10
  export const DEFAULT_CONNECTOR_STROKE_WIDTH = 2;
11
11
  export const DEFAULT_CONNECTOR_ARROW = 'end';
12
12
  export const applyOpacityToColor = (color, opacity, options) => {
13
+ var _ref;
13
14
  if (!color) {
14
15
  return undefined;
15
16
  }
@@ -18,8 +19,7 @@ export const applyOpacityToColor = (color, opacity, options) => {
18
19
  return color;
19
20
  }
20
21
  const originalOpacity = typeof parsed.opacity === 'number' ? parsed.opacity : 1;
21
- var _options_preserveOriginalOpacity;
22
- const preserveOriginalOpacity = (_options_preserveOriginalOpacity = options === null || options === void 0 ? void 0 : options.preserveOriginalOpacity) !== null && _options_preserveOriginalOpacity !== void 0 ? _options_preserveOriginalOpacity : true;
22
+ const preserveOriginalOpacity = (_ref = options === null || options === void 0 ? void 0 : options.preserveOriginalOpacity) !== null && _ref !== void 0 ? _ref : true;
23
23
  if (preserveOriginalOpacity && originalOpacity < 1) {
24
24
  return parsed.toString();
25
25
  }
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","tokens","typographyStyles","color","d3Color","DEFAULT_ANNOTATION_BACKGROUND_OPACITY","DEFAULT_ANNOTATION_PADDING","DEFAULT_CONNECTOR_START_PADDING","DEFAULT_CONNECTOR_END_PADDING","DEFAULT_CONNECTOR_STROKE_WIDTH","DEFAULT_CONNECTOR_ARROW","applyOpacityToColor","opacity","options","undefined","parsed","originalOpacity","_options_preserveOriginalOpacity","preserveOriginalOpacity","toString","Math","max","min","getDefaultAnnotationBackgroundColor","colorNeutralBackground1","getDefaultConnectorStrokeColor","colorNeutralForeground1","chartAnnotationLayerClassNames","root","annotation","annotationNoDefaults","connectorLayer","measurement","annotationContent","annotationForeignObject","annotationContentInteractive","annotationForeignObjectInteractive","connectorGroup","annotationBaseStyles","caption1","position","pointerEvents","display","alignItems","justifyContent","textAlign","paddingTop","paddingBottom","paddingLeft","paddingRight","borderRadius","borderRadiusMedium","whiteSpace","zIndex","useStyles","qhf8xq","Bhzewxz","oyh7mz","j35jbq","B5kzvoi","a9b677","Bqenvij","Bkecrkj","B68tc82","Bmxbyg5","Bpg54ce","Bj3rh1h","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Bt984gj","Brf1p80","fsow6f","sj55zd","z8tnut","Byoj8tv","uwmqm3","z189sj","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Huce71","E5pizo","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","Bcdw1i0","d","p","useChartAnnotationLayerStyles","props","_props_styles","_props_styles1","_props_styles2","_props_styles3","_props_styles4","_props_styles5","_props_styles6","_props_styles7","_props_styles8","baseStyles","className","styles"],"sources":["useChartAnnotationLayer.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from \"@griffel/react\";\nimport { tokens, typographyStyles } from \"@fluentui/react-theme\";\nimport { color as d3Color } from \"d3-color\";\nexport const DEFAULT_ANNOTATION_BACKGROUND_OPACITY = 0.8;\nexport const DEFAULT_ANNOTATION_PADDING = '4px 8px';\nexport const DEFAULT_CONNECTOR_START_PADDING = 12;\nexport const DEFAULT_CONNECTOR_END_PADDING = 0;\nexport const DEFAULT_CONNECTOR_STROKE_WIDTH = 2;\nexport const DEFAULT_CONNECTOR_ARROW = 'end';\nexport const applyOpacityToColor = (color, opacity, options)=>{\n if (!color) {\n return undefined;\n }\n const parsed = d3Color(color);\n if (!parsed) {\n return color;\n }\n const originalOpacity = typeof parsed.opacity === 'number' ? parsed.opacity : 1;\n var _options_preserveOriginalOpacity;\n const preserveOriginalOpacity = (_options_preserveOriginalOpacity = options === null || options === void 0 ? void 0 : options.preserveOriginalOpacity) !== null && _options_preserveOriginalOpacity !== void 0 ? _options_preserveOriginalOpacity : true;\n if (preserveOriginalOpacity && originalOpacity < 1) {\n return parsed.toString();\n }\n parsed.opacity = Math.max(0, Math.min(1, opacity));\n return parsed.toString();\n};\n/**\n * Get default annotation background color with opacity applied\n * Updated for v9 - uses tokens instead of theme\n */ export const getDefaultAnnotationBackgroundColor = ()=>applyOpacityToColor(tokens.colorNeutralBackground1, DEFAULT_ANNOTATION_BACKGROUND_OPACITY);\n/**\n * Get default connector stroke color\n * Updated for v9 - uses tokens instead of theme\n */ export const getDefaultConnectorStrokeColor = ()=>tokens.colorNeutralForeground1;\n/**\n * @internal\n */ export const chartAnnotationLayerClassNames = {\n root: 'fui-chartAnnotationLayer__root',\n annotation: 'fui-chartAnnotationLayer__annotation',\n annotationNoDefaults: 'fui-chartAnnotationLayer__annotationNoDefaults',\n connectorLayer: 'fui-chartAnnotationLayer__connectorLayer',\n measurement: 'fui-chartAnnotationLayer__measurement',\n annotationContent: 'fui-chartAnnotationLayer__annotationContent',\n annotationForeignObject: 'fui-chartAnnotationLayer__annotationForeignObject',\n annotationContentInteractive: 'fui-chartAnnotationLayer__annotationContentInteractive',\n annotationForeignObjectInteractive: 'fui-chartAnnotationLayer__annotationForeignObjectInteractive',\n connectorGroup: 'fui-chartAnnotationLayer__connectorGroup'\n};\n/**\n * Base Styles\n */ const annotationBaseStyles = {\n ...typographyStyles.caption1,\n position: 'absolute',\n pointerEvents: 'none',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n color: tokens.colorNeutralForeground1,\n paddingTop: '4px',\n paddingBottom: '4px',\n paddingLeft: '8px',\n paddingRight: '8px',\n borderRadius: tokens.borderRadiusMedium,\n whiteSpace: 'pre-wrap',\n zIndex: 2\n};\nconst useStyles = makeStyles({\n root: {\n position: 'absolute',\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n overflow: 'visible',\n zIndex: 1\n },\n annotation: {\n ...annotationBaseStyles,\n boxShadow: tokens.shadow16,\n border: `1px solid ${tokens.colorNeutralStroke1}`\n },\n annotationNoDefaults: {\n ...annotationBaseStyles\n },\n connectorLayer: {\n position: 'absolute',\n top: '0',\n left: '0',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n overflow: 'visible'\n },\n measurement: {\n position: 'absolute',\n visibility: 'hidden',\n pointerEvents: 'none'\n },\n annotationContent: {\n width: '100%',\n height: '100%',\n pointerEvents: 'none'\n },\n annotationForeignObject: {\n overflow: 'visible',\n pointerEvents: 'none'\n },\n annotationContentInteractive: {\n pointerEvents: 'auto'\n },\n annotationForeignObjectInteractive: {\n pointerEvents: 'auto'\n },\n connectorGroup: {\n pointerEvents: 'none'\n }\n});\n/**\n * Apply styling to the ChartAnnotationLayer slots based on the state\n */ export const useChartAnnotationLayerStyles = (props)=>{\n var _props_styles, _props_styles1, _props_styles2, _props_styles3, _props_styles4, _props_styles5, _props_styles6, _props_styles7, _props_styles8;\n const baseStyles = useStyles();\n return {\n root: mergeClasses(chartAnnotationLayerClassNames.root, baseStyles.root, props.className, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),\n annotation: mergeClasses(chartAnnotationLayerClassNames.annotation, baseStyles.annotation, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.annotation),\n connectorLayer: mergeClasses(chartAnnotationLayerClassNames.connectorLayer, baseStyles.connectorLayer, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.connectorLayer),\n measurement: mergeClasses(chartAnnotationLayerClassNames.measurement, baseStyles.measurement, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.measurement),\n annotationContent: mergeClasses(chartAnnotationLayerClassNames.annotationContent, baseStyles.annotationContent, (_props_styles4 = props.styles) === null || _props_styles4 === void 0 ? void 0 : _props_styles4.annotationContent),\n annotationForeignObject: mergeClasses(chartAnnotationLayerClassNames.annotationForeignObject, baseStyles.annotationForeignObject, (_props_styles5 = props.styles) === null || _props_styles5 === void 0 ? void 0 : _props_styles5.annotationForeignObject),\n annotationContentInteractive: mergeClasses(chartAnnotationLayerClassNames.annotationContentInteractive, baseStyles.annotationContentInteractive, (_props_styles6 = props.styles) === null || _props_styles6 === void 0 ? void 0 : _props_styles6.annotationContentInteractive),\n annotationForeignObjectInteractive: mergeClasses(chartAnnotationLayerClassNames.annotationForeignObjectInteractive, baseStyles.annotationForeignObjectInteractive, (_props_styles7 = props.styles) === null || _props_styles7 === void 0 ? void 0 : _props_styles7.annotationForeignObjectInteractive),\n connectorGroup: mergeClasses(chartAnnotationLayerClassNames.connectorGroup, baseStyles.connectorGroup, (_props_styles8 = props.styles) === null || _props_styles8 === void 0 ? void 0 : _props_styles8.connectorGroup)\n };\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,SAASC,KAAK,IAAIC,OAAO,QAAQ,UAAU;AAC3C,OAAO,MAAMC,qCAAqC,GAAG,GAAG;AACxD,OAAO,MAAMC,0BAA0B,GAAG,SAAS;AACnD,OAAO,MAAMC,+BAA+B,GAAG,EAAE;AACjD,OAAO,MAAMC,6BAA6B,GAAG,CAAC;AAC9C,OAAO,MAAMC,8BAA8B,GAAG,CAAC;AAC/C,OAAO,MAAMC,uBAAuB,GAAG,KAAK;AAC5C,OAAO,MAAMC,mBAAmB,GAAGA,CAACR,KAAK,EAAES,OAAO,EAAEC,OAAO,KAAG;EAC1D,IAAI,CAACV,KAAK,EAAE;IACR,OAAOW,SAAS;EACpB;EACA,MAAMC,MAAM,GAAGX,OAAO,CAACD,KAAK,CAAC;EAC7B,IAAI,CAACY,MAAM,EAAE;IACT,OAAOZ,KAAK;EAChB;EACA,MAAMa,eAAe,GAAG,OAAOD,MAAM,CAACH,OAAO,KAAK,QAAQ,GAAGG,MAAM,CAACH,OAAO,GAAG,CAAC;EAC/E,IAAIK,gCAAgC;EACpC,MAAMC,uBAAuB,GAAG,CAACD,gCAAgC,GAAGJ,OAAO,KAAK,IAAI,IAAIA,OAAO,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,OAAO,CAACK,uBAAuB,MAAM,IAAI,IAAID,gCAAgC,KAAK,KAAK,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C,kCAAkC,EAAEpC,YAAY,CAAC2B,8BAA8B,CAACS,kCAAkC,EAAEkF,UAAU,CAAClF,kCAAkC,EAAE,CAACgF,cAAc,GAAGR,KAAK,CAACY,MAAM,MAAM,IAAI,IAAIJ,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAAChF,kCAAkC,CAAC;IACtSC,cAAc,EAAErC,YAAY,CAAC2B,8BAA8B,CAACU,cAAc,EAAEiF,UAAU,CAACjF,cAAc,EAAE,CAACgF,cAAc,GAAGT,KAAK,CAACY,MAAM,MAAM,IAAI,IAAIH,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAAChF,cAAc;EACzN,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__styles","mergeClasses","tokens","typographyStyles","color","d3Color","DEFAULT_ANNOTATION_BACKGROUND_OPACITY","DEFAULT_ANNOTATION_PADDING","DEFAULT_CONNECTOR_START_PADDING","DEFAULT_CONNECTOR_END_PADDING","DEFAULT_CONNECTOR_STROKE_WIDTH","DEFAULT_CONNECTOR_ARROW","applyOpacityToColor","opacity","options","_ref","undefined","parsed","originalOpacity","preserveOriginalOpacity","toString","Math","max","min","getDefaultAnnotationBackgroundColor","colorNeutralBackground1","getDefaultConnectorStrokeColor","colorNeutralForeground1","chartAnnotationLayerClassNames","root","annotation","annotationNoDefaults","connectorLayer","measurement","annotationContent","annotationForeignObject","annotationContentInteractive","annotationForeignObjectInteractive","connectorGroup","annotationBaseStyles","caption1","position","pointerEvents","display","alignItems","justifyContent","textAlign","paddingTop","paddingBottom","paddingLeft","paddingRight","borderRadius","borderRadiusMedium","whiteSpace","zIndex","useStyles","qhf8xq","Bhzewxz","oyh7mz","j35jbq","B5kzvoi","a9b677","Bqenvij","Bkecrkj","B68tc82","Bmxbyg5","Bpg54ce","Bj3rh1h","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Bt984gj","Brf1p80","fsow6f","sj55zd","z8tnut","Byoj8tv","uwmqm3","z189sj","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Huce71","E5pizo","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","Bcdw1i0","d","p","useChartAnnotationLayerStyles","props","_props_styles","_props_styles1","_props_styles2","_props_styles3","_props_styles4","_props_styles5","_props_styles6","_props_styles7","_props_styles8","baseStyles","className","styles"],"sources":["useChartAnnotationLayer.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from \"@griffel/react\";\nimport { tokens, typographyStyles } from \"@fluentui/react-theme\";\nimport { color as d3Color } from \"d3-color\";\nexport const DEFAULT_ANNOTATION_BACKGROUND_OPACITY = 0.8;\nexport const DEFAULT_ANNOTATION_PADDING = '4px 8px';\nexport const DEFAULT_CONNECTOR_START_PADDING = 12;\nexport const DEFAULT_CONNECTOR_END_PADDING = 0;\nexport const DEFAULT_CONNECTOR_STROKE_WIDTH = 2;\nexport const DEFAULT_CONNECTOR_ARROW = 'end';\nexport const applyOpacityToColor = (color, opacity, options)=>{\n var _ref;\n if (!color) {\n return undefined;\n }\n const parsed = d3Color(color);\n if (!parsed) {\n return color;\n }\n const originalOpacity = typeof parsed.opacity === 'number' ? parsed.opacity : 1;\n const preserveOriginalOpacity = (_ref = options === null || options === void 0 ? void 0 : options.preserveOriginalOpacity) !== null && _ref !== void 0 ? _ref : true;\n if (preserveOriginalOpacity && originalOpacity < 1) {\n return parsed.toString();\n }\n parsed.opacity = Math.max(0, Math.min(1, opacity));\n return parsed.toString();\n};\n/**\n * Get default annotation background color with opacity applied\n * Updated for v9 - uses tokens instead of theme\n */ export const getDefaultAnnotationBackgroundColor = ()=>applyOpacityToColor(tokens.colorNeutralBackground1, DEFAULT_ANNOTATION_BACKGROUND_OPACITY);\n/**\n * Get default connector stroke color\n * Updated for v9 - uses tokens instead of theme\n */ export const getDefaultConnectorStrokeColor = ()=>tokens.colorNeutralForeground1;\n/**\n * @internal\n */ export const chartAnnotationLayerClassNames = {\n root: 'fui-chartAnnotationLayer__root',\n annotation: 'fui-chartAnnotationLayer__annotation',\n annotationNoDefaults: 'fui-chartAnnotationLayer__annotationNoDefaults',\n connectorLayer: 'fui-chartAnnotationLayer__connectorLayer',\n measurement: 'fui-chartAnnotationLayer__measurement',\n annotationContent: 'fui-chartAnnotationLayer__annotationContent',\n annotationForeignObject: 'fui-chartAnnotationLayer__annotationForeignObject',\n annotationContentInteractive: 'fui-chartAnnotationLayer__annotationContentInteractive',\n annotationForeignObjectInteractive: 'fui-chartAnnotationLayer__annotationForeignObjectInteractive',\n connectorGroup: 'fui-chartAnnotationLayer__connectorGroup'\n};\n/**\n * Base Styles\n */ const annotationBaseStyles = {\n ...typographyStyles.caption1,\n position: 'absolute',\n pointerEvents: 'none',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n color: tokens.colorNeutralForeground1,\n paddingTop: '4px',\n paddingBottom: '4px',\n paddingLeft: '8px',\n paddingRight: '8px',\n borderRadius: tokens.borderRadiusMedium,\n whiteSpace: 'pre-wrap',\n zIndex: 2\n};\nconst useStyles = makeStyles({\n root: {\n position: 'absolute',\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n overflow: 'visible',\n zIndex: 1\n },\n annotation: {\n ...annotationBaseStyles,\n boxShadow: tokens.shadow16,\n border: `1px solid ${tokens.colorNeutralStroke1}`\n },\n annotationNoDefaults: {\n ...annotationBaseStyles\n },\n connectorLayer: {\n position: 'absolute',\n top: '0',\n left: '0',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n overflow: 'visible'\n },\n measurement: {\n position: 'absolute',\n visibility: 'hidden',\n pointerEvents: 'none'\n },\n annotationContent: {\n width: '100%',\n height: '100%',\n pointerEvents: 'none'\n },\n annotationForeignObject: {\n overflow: 'visible',\n pointerEvents: 'none'\n },\n annotationContentInteractive: {\n pointerEvents: 'auto'\n },\n annotationForeignObjectInteractive: {\n pointerEvents: 'auto'\n },\n connectorGroup: {\n pointerEvents: 'none'\n }\n});\n/**\n * Apply styling to the ChartAnnotationLayer slots based on the state\n */ export const useChartAnnotationLayerStyles = (props)=>{\n var _props_styles, _props_styles1, _props_styles2, _props_styles3, _props_styles4, _props_styles5, _props_styles6, _props_styles7, _props_styles8;\n const baseStyles = useStyles();\n return {\n root: mergeClasses(chartAnnotationLayerClassNames.root, baseStyles.root, props.className, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),\n annotation: mergeClasses(chartAnnotationLayerClassNames.annotation, baseStyles.annotation, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.annotation),\n connectorLayer: mergeClasses(chartAnnotationLayerClassNames.connectorLayer, baseStyles.connectorLayer, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.connectorLayer),\n measurement: mergeClasses(chartAnnotationLayerClassNames.measurement, baseStyles.measurement, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.measurement),\n annotationContent: mergeClasses(chartAnnotationLayerClassNames.annotationContent, baseStyles.annotationContent, (_props_styles4 = props.styles) === null || _props_styles4 === void 0 ? void 0 : _props_styles4.annotationContent),\n annotationForeignObject: mergeClasses(chartAnnotationLayerClassNames.annotationForeignObject, baseStyles.annotationForeignObject, (_props_styles5 = props.styles) === null || _props_styles5 === void 0 ? void 0 : _props_styles5.annotationForeignObject),\n annotationContentInteractive: mergeClasses(chartAnnotationLayerClassNames.annotationContentInteractive, baseStyles.annotationContentInteractive, (_props_styles6 = props.styles) === null || _props_styles6 === void 0 ? void 0 : _props_styles6.annotationContentInteractive),\n annotationForeignObjectInteractive: mergeClasses(chartAnnotationLayerClassNames.annotationForeignObjectInteractive, baseStyles.annotationForeignObjectInteractive, (_props_styles7 = props.styles) === null || _props_styles7 === void 0 ? void 0 : _props_styles7.annotationForeignObjectInteractive),\n connectorGroup: mergeClasses(chartAnnotationLayerClassNames.connectorGroup, baseStyles.connectorGroup, (_props_styles8 = props.styles) === null || _props_styles8 === void 0 ? void 0 : _props_styles8.connectorGroup)\n };\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,SAASC,KAAK,IAAIC,OAAO,QAAQ,UAAU;AAC3C,OAAO,MAAMC,qCAAqC,GAAG,GAAG;AACxD,OAAO,MAAMC,0BAA0B,GAAG,SAAS;AACnD,OAAO,MAAMC,+BAA+B,GAAG,EAAE;AACjD,OAAO,MAAMC,6BAA6B,GAAG,CAAC;AAC9C,OAAO,MAAMC,8BAA8B,GAAG,CAAC;AAC/C,OAAO,MAAMC,uBAAuB,GAAG,KAAK;AAC5C,OAAO,MAAMC,mBAAmB,GAAGA,CAACR,KAAK,EAAES,OAAO,EAAEC,OAAO,KAAG;EAC1D,IAAIC,IAAI;EACR,IAAI,CAACX,KAAK,EAAE;IACR,OAAOY,SAAS;EACpB;EACA,MAAMC,MAAM,GAAGZ,OAAO,CAACD,KAAK,CAAC;EAC7B,IAAI,CAACa,MAAM,EAAE;IACT,OAAOb,KAAK;EAChB;EACA,MAAMc,eAAe,GAAG,OAAOD,MAAM,CAACJ,OAAO,KAAK,QAAQ,GAAGI,MAAM,CAACJ,OAAO,GAAG,CAAC;EAC/E,MAAMM,uBAAuB,GAAG,CAACJ,IAAI,GAAGD,OAAO,KAAK,IAAI,IAAIA,OAAO,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,OAAO,CAACK,uBAAuB,MAAM,IAAI,IAAIJ,IAAI,KAAK,KAAK,CAAC,GAAGA,IAAI,GAAG,IAAI;EACpK,IAAII,uBAAuB,IAAID,eAAe,GAAG,CAAC,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AAkC,EAAE,CAACgF,cAAc,GAAGR,KAAK,CAACY,MAAM,MAAM,IAAI,IAAIJ,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAAChF,kCAAkC,CAAC;IACtSC,cAAc,EAAErC,YAAY,CAAC2B,8BAA8B,CAACU,cAAc,EAAEiF,UAAU,CAACjF,cAAc,EAAE,CAACgF,cAAc,GAAGT,KAAK,CAACY,MAAM,MAAM,IAAI,IAAIH,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAAChF,cAAc;EACzN,CAAC;AACL,CAAC","ignoreList":[]}
@@ -9,6 +9,7 @@ export const DEFAULT_CONNECTOR_END_PADDING = 0;
9
9
  export const DEFAULT_CONNECTOR_STROKE_WIDTH = 2;
10
10
  export const DEFAULT_CONNECTOR_ARROW = 'end';
11
11
  export const applyOpacityToColor = (color, opacity, options)=>{
12
+ var _ref;
12
13
  if (!color) {
13
14
  return undefined;
14
15
  }
@@ -17,8 +18,7 @@ export const applyOpacityToColor = (color, opacity, options)=>{
17
18
  return color;
18
19
  }
19
20
  const originalOpacity = typeof parsed.opacity === 'number' ? parsed.opacity : 1;
20
- var _options_preserveOriginalOpacity;
21
- const preserveOriginalOpacity = (_options_preserveOriginalOpacity = options === null || options === void 0 ? void 0 : options.preserveOriginalOpacity) !== null && _options_preserveOriginalOpacity !== void 0 ? _options_preserveOriginalOpacity : true;
21
+ const preserveOriginalOpacity = (_ref = options === null || options === void 0 ? void 0 : options.preserveOriginalOpacity) !== null && _ref !== void 0 ? _ref : true;
22
22
  if (preserveOriginalOpacity && originalOpacity < 1) {
23
23
  return parsed.toString();
24
24
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { color as d3Color } from 'd3-color';\nimport type { ChartAnnotationArrowHead } from '../../../types/ChartAnnotation';\n\nexport interface ChartAnnotationLayerStyles {\n root?: string;\n annotation?: string;\n annotationNoDefaults?: string;\n connectorLayer?: string;\n measurement?: string;\n annotationContent?: string;\n annotationForeignObject?: string;\n annotationContentInteractive?: string;\n annotationForeignObjectInteractive?: string;\n connectorGroup?: string;\n}\n\nexport interface ChartAnnotationLayerStyleProps {\n className?: string;\n styles?: Partial<ChartAnnotationLayerStyles>;\n}\n\nexport const DEFAULT_ANNOTATION_BACKGROUND_OPACITY = 0.8;\nexport const DEFAULT_ANNOTATION_PADDING = '4px 8px';\nexport const DEFAULT_CONNECTOR_START_PADDING = 12;\nexport const DEFAULT_CONNECTOR_END_PADDING = 0;\nexport const DEFAULT_CONNECTOR_STROKE_WIDTH = 2;\nexport const DEFAULT_CONNECTOR_ARROW: ChartAnnotationArrowHead = 'end';\n\nexport const applyOpacityToColor = (\n color: string | undefined,\n opacity: number,\n options?: {\n preserveOriginalOpacity?: boolean;\n },\n): string | undefined => {\n if (!color) {\n return undefined;\n }\n\n const parsed = d3Color(color);\n if (!parsed) {\n return color;\n }\n\n const originalOpacity = typeof parsed.opacity === 'number' ? parsed.opacity : 1;\n const preserveOriginalOpacity = options?.preserveOriginalOpacity ?? true;\n\n if (preserveOriginalOpacity && originalOpacity < 1) {\n return parsed.toString();\n }\n\n parsed.opacity = Math.max(0, Math.min(1, opacity));\n return parsed.toString();\n};\n\n/**\n * Get default annotation background color with opacity applied\n * Updated for v9 - uses tokens instead of theme\n */\nexport const getDefaultAnnotationBackgroundColor = (): string | undefined =>\n applyOpacityToColor(tokens.colorNeutralBackground1, DEFAULT_ANNOTATION_BACKGROUND_OPACITY);\n\n/**\n * Get default connector stroke color\n * Updated for v9 - uses tokens instead of theme\n */\nexport const getDefaultConnectorStrokeColor = (): string => tokens.colorNeutralForeground1;\n\n/**\n * @internal\n */\nexport const chartAnnotationLayerClassNames: SlotClassNames<ChartAnnotationLayerStyles> = {\n root: 'fui-chartAnnotationLayer__root',\n annotation: 'fui-chartAnnotationLayer__annotation',\n annotationNoDefaults: 'fui-chartAnnotationLayer__annotationNoDefaults',\n connectorLayer: 'fui-chartAnnotationLayer__connectorLayer',\n measurement: 'fui-chartAnnotationLayer__measurement',\n annotationContent: 'fui-chartAnnotationLayer__annotationContent',\n annotationForeignObject: 'fui-chartAnnotationLayer__annotationForeignObject',\n annotationContentInteractive: 'fui-chartAnnotationLayer__annotationContentInteractive',\n annotationForeignObjectInteractive: 'fui-chartAnnotationLayer__annotationForeignObjectInteractive',\n connectorGroup: 'fui-chartAnnotationLayer__connectorGroup',\n};\n\n/**\n * Base Styles\n */\nconst annotationBaseStyles = {\n ...typographyStyles.caption1,\n position: 'absolute',\n pointerEvents: 'none',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n color: tokens.colorNeutralForeground1,\n paddingTop: '4px',\n paddingBottom: '4px',\n paddingLeft: '8px',\n paddingRight: '8px',\n borderRadius: tokens.borderRadiusMedium,\n whiteSpace: 'pre-wrap',\n zIndex: 2,\n} as const;\n\nconst useStyles = makeStyles({\n root: {\n position: 'absolute',\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n overflow: 'visible',\n zIndex: 1,\n },\n annotation: {\n ...annotationBaseStyles,\n boxShadow: tokens.shadow16,\n border: `1px solid ${tokens.colorNeutralStroke1}`,\n },\n annotationNoDefaults: {\n ...annotationBaseStyles,\n },\n connectorLayer: {\n position: 'absolute',\n top: '0',\n left: '0',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n overflow: 'visible',\n },\n measurement: {\n position: 'absolute',\n visibility: 'hidden',\n pointerEvents: 'none',\n },\n annotationContent: {\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n },\n annotationForeignObject: {\n overflow: 'visible',\n pointerEvents: 'none',\n },\n annotationContentInteractive: {\n pointerEvents: 'auto',\n },\n annotationForeignObjectInteractive: {\n pointerEvents: 'auto',\n },\n connectorGroup: {\n pointerEvents: 'none',\n },\n});\n\n/**\n * Apply styling to the ChartAnnotationLayer slots based on the state\n */\nexport const useChartAnnotationLayerStyles = (props: ChartAnnotationLayerStyleProps): ChartAnnotationLayerStyles => {\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(chartAnnotationLayerClassNames.root, baseStyles.root, props.className, props.styles?.root),\n annotation: mergeClasses(\n chartAnnotationLayerClassNames.annotation,\n baseStyles.annotation,\n props.styles?.annotation,\n ),\n connectorLayer: mergeClasses(\n chartAnnotationLayerClassNames.connectorLayer,\n baseStyles.connectorLayer,\n props.styles?.connectorLayer,\n ),\n measurement: mergeClasses(\n chartAnnotationLayerClassNames.measurement,\n baseStyles.measurement,\n props.styles?.measurement,\n ),\n annotationContent: mergeClasses(\n chartAnnotationLayerClassNames.annotationContent,\n baseStyles.annotationContent,\n props.styles?.annotationContent,\n ),\n annotationForeignObject: mergeClasses(\n chartAnnotationLayerClassNames.annotationForeignObject,\n baseStyles.annotationForeignObject,\n props.styles?.annotationForeignObject,\n ),\n annotationContentInteractive: mergeClasses(\n chartAnnotationLayerClassNames.annotationContentInteractive,\n baseStyles.annotationContentInteractive,\n props.styles?.annotationContentInteractive,\n ),\n annotationForeignObjectInteractive: mergeClasses(\n chartAnnotationLayerClassNames.annotationForeignObjectInteractive,\n baseStyles.annotationForeignObjectInteractive,\n props.styles?.annotationForeignObjectInteractive,\n ),\n connectorGroup: mergeClasses(\n chartAnnotationLayerClassNames.connectorGroup,\n baseStyles.connectorGroup,\n props.styles?.connectorGroup,\n ),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","typographyStyles","color","d3Color","DEFAULT_ANNOTATION_BACKGROUND_OPACITY","DEFAULT_ANNOTATION_PADDING","DEFAULT_CONNECTOR_START_PADDING","DEFAULT_CONNECTOR_END_PADDING","DEFAULT_CONNECTOR_STROKE_WIDTH","DEFAULT_CONNECTOR_ARROW","applyOpacityToColor","opacity","options","undefined","parsed","originalOpacity","preserveOriginalOpacity","toString","Math","max","min","getDefaultAnnotationBackgroundColor","colorNeutralBackground1","getDefaultConnectorStrokeColor","colorNeutralForeground1","chartAnnotationLayerClassNames","root","annotation","annotationNoDefaults","connectorLayer","measurement","annotationContent","annotationForeignObject","annotationContentInteractive","annotationForeignObjectInteractive","connectorGroup","annotationBaseStyles","caption1","position","pointerEvents","display","alignItems","justifyContent","textAlign","paddingTop","paddingBottom","paddingLeft","paddingRight","borderRadius","borderRadiusMedium","whiteSpace","zIndex","useStyles","top","left","right","bottom","width","height","overflow","boxShadow","shadow16","border","colorNeutralStroke1","visibility","useChartAnnotationLayerStyles","props","baseStyles","className","styles"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAE1D,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AACjE,SAASC,SAASC,OAAO,QAAQ,WAAW;AAqB5C,OAAO,MAAMC,wCAAwC,IAAI;AACzD,OAAO,MAAMC,6BAA6B,UAAU;AACpD,OAAO,MAAMC,kCAAkC,GAAG;AAClD,OAAO,MAAMC,gCAAgC,EAAE;AAC/C,OAAO,MAAMC,iCAAiC,EAAE;AAChD,OAAO,MAAMC,0BAAoD,MAAM;AAEvE,OAAO,MAAMC,sBAAsB,CACjCR,OACAS,SACAC;IAIA,IAAI,CAACV,OAAO;QACV,OAAOW;IACT;IAEA,MAAMC,SAASX,QAAQD;IACvB,IAAI,CAACY,QAAQ;QACX,OAAOZ;IACT;IAEA,MAAMa,kBAAkB,OAAOD,OAAOH,OAAO,KAAK,WAAWG,OAAOH,OAAO,GAAG;QAC9CC;IAAhC,MAAMI,0BAA0BJ,CAAAA,mCAAAA,oBAAAA,8BAAAA,QAASI,uBAAuB,cAAhCJ,8CAAAA,mCAAoC;IAEpE,IAAII,2BAA2BD,kBAAkB,GAAG;QAClD,OAAOD,OAAOG,QAAQ;IACxB;IAEAH,OAAOH,OA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A+BQ,4BAA4B,EAC3DkC,WAAWlC,4BAA4B,GACvCiC,iBAAAA,MAAMG,MAAM,cAAZH,qCAAAA,eAAcjC,4BAA4B;QAE5CC,oCAAoCnC,aAClC0B,+BAA+BS,kCAAkC,EACjEiC,WAAWjC,kCAAkC,GAC7CgC,iBAAAA,MAAMG,MAAM,cAAZH,qCAAAA,eAAchC,kCAAkC;QAElDC,gBAAgBpC,aACd0B,+BAA+BU,cAAc,EAC7CgC,WAAWhC,cAAc,GACzB+B,iBAAAA,MAAMG,MAAM,cAAZH,qCAAAA,eAAc/B,cAAc;IAEhC;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../../src/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { color as d3Color } from 'd3-color';\nimport type { ChartAnnotationArrowHead } from '../../../types/ChartAnnotation';\n\nexport interface ChartAnnotationLayerStyles {\n root?: string;\n annotation?: string;\n annotationNoDefaults?: string;\n connectorLayer?: string;\n measurement?: string;\n annotationContent?: string;\n annotationForeignObject?: string;\n annotationContentInteractive?: string;\n annotationForeignObjectInteractive?: string;\n connectorGroup?: string;\n}\n\nexport interface ChartAnnotationLayerStyleProps {\n className?: string;\n styles?: Partial<ChartAnnotationLayerStyles>;\n}\n\nexport const DEFAULT_ANNOTATION_BACKGROUND_OPACITY = 0.8;\nexport const DEFAULT_ANNOTATION_PADDING = '4px 8px';\nexport const DEFAULT_CONNECTOR_START_PADDING = 12;\nexport const DEFAULT_CONNECTOR_END_PADDING = 0;\nexport const DEFAULT_CONNECTOR_STROKE_WIDTH = 2;\nexport const DEFAULT_CONNECTOR_ARROW: ChartAnnotationArrowHead = 'end';\n\nexport const applyOpacityToColor = (\n color: string | undefined,\n opacity: number,\n options?: {\n preserveOriginalOpacity?: boolean;\n },\n): string | undefined => {\n if (!color) {\n return undefined;\n }\n\n const parsed = d3Color(color);\n if (!parsed) {\n return color;\n }\n\n const originalOpacity = typeof parsed.opacity === 'number' ? parsed.opacity : 1;\n const preserveOriginalOpacity = options?.preserveOriginalOpacity ?? true;\n\n if (preserveOriginalOpacity && originalOpacity < 1) {\n return parsed.toString();\n }\n\n parsed.opacity = Math.max(0, Math.min(1, opacity));\n return parsed.toString();\n};\n\n/**\n * Get default annotation background color with opacity applied\n * Updated for v9 - uses tokens instead of theme\n */\nexport const getDefaultAnnotationBackgroundColor = (): string | undefined =>\n applyOpacityToColor(tokens.colorNeutralBackground1, DEFAULT_ANNOTATION_BACKGROUND_OPACITY);\n\n/**\n * Get default connector stroke color\n * Updated for v9 - uses tokens instead of theme\n */\nexport const getDefaultConnectorStrokeColor = (): string => tokens.colorNeutralForeground1;\n\n/**\n * @internal\n */\nexport const chartAnnotationLayerClassNames: SlotClassNames<ChartAnnotationLayerStyles> = {\n root: 'fui-chartAnnotationLayer__root',\n annotation: 'fui-chartAnnotationLayer__annotation',\n annotationNoDefaults: 'fui-chartAnnotationLayer__annotationNoDefaults',\n connectorLayer: 'fui-chartAnnotationLayer__connectorLayer',\n measurement: 'fui-chartAnnotationLayer__measurement',\n annotationContent: 'fui-chartAnnotationLayer__annotationContent',\n annotationForeignObject: 'fui-chartAnnotationLayer__annotationForeignObject',\n annotationContentInteractive: 'fui-chartAnnotationLayer__annotationContentInteractive',\n annotationForeignObjectInteractive: 'fui-chartAnnotationLayer__annotationForeignObjectInteractive',\n connectorGroup: 'fui-chartAnnotationLayer__connectorGroup',\n};\n\n/**\n * Base Styles\n */\nconst annotationBaseStyles = {\n ...typographyStyles.caption1,\n position: 'absolute',\n pointerEvents: 'none',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n color: tokens.colorNeutralForeground1,\n paddingTop: '4px',\n paddingBottom: '4px',\n paddingLeft: '8px',\n paddingRight: '8px',\n borderRadius: tokens.borderRadiusMedium,\n whiteSpace: 'pre-wrap',\n zIndex: 2,\n} as const;\n\nconst useStyles = makeStyles({\n root: {\n position: 'absolute',\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n overflow: 'visible',\n zIndex: 1,\n },\n annotation: {\n ...annotationBaseStyles,\n boxShadow: tokens.shadow16,\n border: `1px solid ${tokens.colorNeutralStroke1}`,\n },\n annotationNoDefaults: {\n ...annotationBaseStyles,\n },\n connectorLayer: {\n position: 'absolute',\n top: '0',\n left: '0',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n overflow: 'visible',\n },\n measurement: {\n position: 'absolute',\n visibility: 'hidden',\n pointerEvents: 'none',\n },\n annotationContent: {\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n },\n annotationForeignObject: {\n overflow: 'visible',\n pointerEvents: 'none',\n },\n annotationContentInteractive: {\n pointerEvents: 'auto',\n },\n annotationForeignObjectInteractive: {\n pointerEvents: 'auto',\n },\n connectorGroup: {\n pointerEvents: 'none',\n },\n});\n\n/**\n * Apply styling to the ChartAnnotationLayer slots based on the state\n */\nexport const useChartAnnotationLayerStyles = (props: ChartAnnotationLayerStyleProps): ChartAnnotationLayerStyles => {\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(chartAnnotationLayerClassNames.root, baseStyles.root, props.className, props.styles?.root),\n annotation: mergeClasses(\n chartAnnotationLayerClassNames.annotation,\n baseStyles.annotation,\n props.styles?.annotation,\n ),\n connectorLayer: mergeClasses(\n chartAnnotationLayerClassNames.connectorLayer,\n baseStyles.connectorLayer,\n props.styles?.connectorLayer,\n ),\n measurement: mergeClasses(\n chartAnnotationLayerClassNames.measurement,\n baseStyles.measurement,\n props.styles?.measurement,\n ),\n annotationContent: mergeClasses(\n chartAnnotationLayerClassNames.annotationContent,\n baseStyles.annotationContent,\n props.styles?.annotationContent,\n ),\n annotationForeignObject: mergeClasses(\n chartAnnotationLayerClassNames.annotationForeignObject,\n baseStyles.annotationForeignObject,\n props.styles?.annotationForeignObject,\n ),\n annotationContentInteractive: mergeClasses(\n chartAnnotationLayerClassNames.annotationContentInteractive,\n baseStyles.annotationContentInteractive,\n props.styles?.annotationContentInteractive,\n ),\n annotationForeignObjectInteractive: mergeClasses(\n chartAnnotationLayerClassNames.annotationForeignObjectInteractive,\n baseStyles.annotationForeignObjectInteractive,\n props.styles?.annotationForeignObjectInteractive,\n ),\n connectorGroup: mergeClasses(\n chartAnnotationLayerClassNames.connectorGroup,\n baseStyles.connectorGroup,\n props.styles?.connectorGroup,\n ),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","typographyStyles","color","d3Color","DEFAULT_ANNOTATION_BACKGROUND_OPACITY","DEFAULT_ANNOTATION_PADDING","DEFAULT_CONNECTOR_START_PADDING","DEFAULT_CONNECTOR_END_PADDING","DEFAULT_CONNECTOR_STROKE_WIDTH","DEFAULT_CONNECTOR_ARROW","applyOpacityToColor","opacity","options","undefined","parsed","originalOpacity","preserveOriginalOpacity","toString","Math","max","min","getDefaultAnnotationBackgroundColor","colorNeutralBackground1","getDefaultConnectorStrokeColor","colorNeutralForeground1","chartAnnotationLayerClassNames","root","annotation","annotationNoDefaults","connectorLayer","measurement","annotationContent","annotationForeignObject","annotationContentInteractive","annotationForeignObjectInteractive","connectorGroup","annotationBaseStyles","caption1","position","pointerEvents","display","alignItems","justifyContent","textAlign","paddingTop","paddingBottom","paddingLeft","paddingRight","borderRadius","borderRadiusMedium","whiteSpace","zIndex","useStyles","top","left","right","bottom","width","height","overflow","boxShadow","shadow16","border","colorNeutralStroke1","visibility","useChartAnnotationLayerStyles","props","baseStyles","className","styles"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAE1D,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AACjE,SAASC,SAASC,OAAO,QAAQ,WAAW;AAqB5C,OAAO,MAAMC,wCAAwC,IAAI;AACzD,OAAO,MAAMC,6BAA6B,UAAU;A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BAA+BI,cAAc,EAC7CsC,WAAWtC,cAAc,GACzBqC,iBAAAA,MAAMG,MAAM,cAAZH,qCAAAA,eAAcrC,cAAc;QAE9BC,aAAa/B,aACX0B,+BAA+BK,WAAW,EAC1CqC,WAAWrC,WAAW,GACtBoC,iBAAAA,MAAMG,MAAM,cAAZH,qCAAAA,eAAcpC,WAAW;QAE3BC,mBAAmBhC,aACjB0B,+BAA+BM,iBAAiB,EAChDoC,WAAWpC,iBAAiB,GAC5BmC,iBAAAA,MAAMG,MAAM,cAAZH,qCAAAA,eAAcnC,iBAAiB;QAEjCC,yBAAyBjC,aACvB0B,+BAA+BO,uBAAuB,EACtDmC,WAAWnC,uBAAuB,GAClCkC,iBAAAA,MAAMG,MAAM,cAAZH,qCAAAA,eAAclC,uBAAuB;QAEvCC,8BAA8BlC,aAC5B0B,+BAA+BQ,4BAA4B,EAC3DkC,WAAWlC,4BAA4B,GACvCiC,iBAAAA,MAAMG,MAAM,cAAZH,qCAAAA,eAAcjC,4BAA4B;QAE5CC,oCAAoCnC,aAClC0B,+BAA+BS,kCAAkC,EACjEiC,WAAWjC,kCAAkC,GAC7CgC,iBAAAA,MAAMG,MAAM,cAAZH,qCAAAA,eAAchC,kCAAkC;QAElDC,gBAAgBpC,aACd0B,+BAA+BU,cAAc,EAC7CgC,WAAWhC,cAAc,GACzB+B,iBAAAA,MAAMG,MAAM,cAAZH,qCAAAA,eAAc/B,cAAc;IAEhC;AACF,EAAE"}
@@ -17,6 +17,7 @@ const DEFAULT_MARGIN_NO_TICKS = 20;
17
17
  * Cartesian Chart component
18
18
  * {@docCategory CartesianChart}
19
19
  */ export const CartesianChart = /*#__PURE__*/ React.forwardRef(({ hideTickOverlap = true, ...props }, forwardedRef)=>{
20
+ var _props_annotations;
20
21
  const chartContainer = React.useRef(null);
21
22
  let legendContainer;
22
23
  const minLegendContainerHeight = 40;
@@ -137,9 +138,9 @@ const DEFAULT_MARGIN_NO_TICKS = 20;
137
138
  let yScaleSecondary;
138
139
  let children = null;
139
140
  if (props.enableFirstRenderOptimization && chartContainer.current || !props.enableFirstRenderOptimization) {
141
+ var _props_showRoundOffXTickValues;
140
142
  var _props_xAxis, _props_xAxis1, _props_xAxis2;
141
143
  _isFirstRender.current = false;
142
- var _props_showRoundOffXTickValues;
143
144
  const XAxisParams = {
144
145
  domainNRangeValues: props.getDomainNRangeValues(points, props.getDomainMargins ? props.getDomainMargins(containerWidth) : margins, containerWidth, chartType, _useRtl, props.xAxisType, props.barwidth, props.tickValues),
145
146
  // FIXME: In XAxisParams, containerHeight is used by HBWA to generate vertical gridlines.
@@ -231,8 +232,8 @@ const DEFAULT_MARGIN_NO_TICKS = 20;
231
232
  // prop to determine whether to create a secondary y-axis, it's more appropriate to check if any
232
233
  // data points are assigned to use the secondary y-scale.
233
234
  if (props === null || props === void 0 ? void 0 : props.secondaryYScaleOptions) {
235
+ var _ref;
234
236
  var _props_secondaryYScaleOptions, _props_secondaryYScaleOptions1;
235
- var _props_secondaryYScaleOptions_yMaxValue;
236
237
  const YAxisParamsSecondary = {
237
238
  margins,
238
239
  containerWidth,
@@ -241,7 +242,7 @@ const DEFAULT_MARGIN_NO_TICKS = 20;
241
242
  yAxisTickFormat: props.yAxisTickFormat,
242
243
  yAxisTickCount: props.yAxisTickCount,
243
244
  yMinValue: ((_props_secondaryYScaleOptions = props.secondaryYScaleOptions) === null || _props_secondaryYScaleOptions === void 0 ? void 0 : _props_secondaryYScaleOptions.yMinValue) || 0,
244
- yMaxValue: (_props_secondaryYScaleOptions_yMaxValue = (_props_secondaryYScaleOptions1 = props.secondaryYScaleOptions) === null || _props_secondaryYScaleOptions1 === void 0 ? void 0 : _props_secondaryYScaleOptions1.yMaxValue) !== null && _props_secondaryYScaleOptions_yMaxValue !== void 0 ? _props_secondaryYScaleOptions_yMaxValue : 100,
245
+ yMaxValue: (_ref = (_props_secondaryYScaleOptions1 = props.secondaryYScaleOptions) === null || _props_secondaryYScaleOptions1 === void 0 ? void 0 : _props_secondaryYScaleOptions1.yMaxValue) !== null && _ref !== void 0 ? _ref : 100,
245
246
  tickPadding: 10,
246
247
  yMinMaxValues: props.getMinMaxOfYAxis(points, props.yAxisType, true),
247
248
  yAxisPadding: props.yAxisPadding
@@ -313,7 +314,6 @@ const DEFAULT_MARGIN_NO_TICKS = 20;
313
314
  width: plotWidth,
314
315
  height: plotHeight
315
316
  };
316
- var _props_annotations;
317
317
  const annotations = (_props_annotations = props.annotations) !== null && _props_annotations !== void 0 ? _props_annotations : [];
318
318
  const hasAnnotations = annotations.length > 0;
319
319
  const annotationContext = hasAnnotations ? {
@@ -429,6 +429,7 @@ const DEFAULT_MARGIN_NO_TICKS = 20;
429
429
  * No need to re-calculate every time the chart renders and same time need to get an update. So using setState.
430
430
  * Required space will be calculated first time chart rendering and if any width/height of chart updated.
431
431
  * */ if (props.wrapXAxisLables || props.showXAxisLablesTooltip) {
432
+ var _createWrapOfXLabels;
432
433
  let maxXAxisLabelWidth;
433
434
  if (props.xAxisType === XAxisTypes.StringAxis) {
434
435
  var _props_datasetForXAxisDomain;
@@ -446,15 +447,14 @@ const DEFAULT_MARGIN_NO_TICKS = 20;
446
447
  width: maxXAxisLabelWidth,
447
448
  container: chartContainer.current
448
449
  };
449
- var _createWrapOfXLabels;
450
450
  _removalValueForTextTuncate = (_createWrapOfXLabels = createWrapOfXLabels(wrapLabelProps)) !== null && _createWrapOfXLabels !== void 0 ? _createWrapOfXLabels : 0;
451
451
  }
452
452
  if (!props.wrapXAxisLables && props.rotateXAxisLables && props.xAxisType === XAxisTypes.StringAxis) {
453
+ var _rotateXAxisLabels;
453
454
  const rotateLabelProps = {
454
455
  node: xAxisElement.current,
455
456
  xAxis: _xScale
456
457
  };
457
- var _rotateXAxisLabels;
458
458
  const rotatedHeight = (_rotateXAxisLabels = rotateXAxisLabels(rotateLabelProps)) !== null && _rotateXAxisLabels !== void 0 ? _rotateXAxisLabels : 0;
459
459
  // margins.bottom is used as padding here
460
460
  _removalValueForTextTuncate = rotatedHeight + margins.bottom;
@@ -578,17 +578,13 @@ const DEFAULT_MARGIN_NO_TICKS = 20;
578
578
  },
579
579
  maxWidth: xAxisTitleMaxWidth
580
580
  }), props.xAxisAnnotation !== undefined && props.xAxisAnnotation !== '' && (()=>{
581
- var _props_titleStyles;
581
+ var _props_titleStyles, _ref, _ref1, _ref2, _ref3;
582
582
  const { titleFont, titleXAnchor, titleYAnchor, titlePad } = (_props_titleStyles = props.titleStyles) !== null && _props_titleStyles !== void 0 ? _props_titleStyles : {};
583
583
  const fontSize = typeof (titleFont === null || titleFont === void 0 ? void 0 : titleFont.size) === 'number' ? titleFont.size : 13;
584
- var _titlePad_l;
585
- const padL = (_titlePad_l = titlePad === null || titlePad === void 0 ? void 0 : titlePad.l) !== null && _titlePad_l !== void 0 ? _titlePad_l : 0;
586
- var _titlePad_r;
587
- const padR = (_titlePad_r = titlePad === null || titlePad === void 0 ? void 0 : titlePad.r) !== null && _titlePad_r !== void 0 ? _titlePad_r : 0;
588
- var _titlePad_t;
589
- const padT = (_titlePad_t = titlePad === null || titlePad === void 0 ? void 0 : titlePad.t) !== null && _titlePad_t !== void 0 ? _titlePad_t : 0;
590
- var _titlePad_b;
591
- const padB = (_titlePad_b = titlePad === null || titlePad === void 0 ? void 0 : titlePad.b) !== null && _titlePad_b !== void 0 ? _titlePad_b : 0;
584
+ const padL = (_ref = titlePad === null || titlePad === void 0 ? void 0 : titlePad.l) !== null && _ref !== void 0 ? _ref : 0;
585
+ const padR = (_ref1 = titlePad === null || titlePad === void 0 ? void 0 : titlePad.r) !== null && _ref1 !== void 0 ? _ref1 : 0;
586
+ const padT = (_ref2 = titlePad === null || titlePad === void 0 ? void 0 : titlePad.t) !== null && _ref2 !== void 0 ? _ref2 : 0;
587
+ const padB = (_ref3 = titlePad === null || titlePad === void 0 ? void 0 : titlePad.b) !== null && _ref3 !== void 0 ? _ref3 : 0;
592
588
  const xPos = (titleXAnchor === 'left' ? margins.left + AXIS_TITLE_PADDING : titleXAnchor === 'right' ? margins.left + AXIS_TITLE_PADDING + xAxisTitleMaxWidth : margins.left + AXIS_TITLE_PADDING + xAxisTitleMaxWidth / 2) + padL - padR;
593
589
  const yPos = Math.max(fontSize + AXIS_TITLE_PADDING, VERTICAL_MARGIN_FOR_XAXIS_TITLE - AXIS_TITLE_PADDING) + padT - padB;
594
590
  const textAnchor = titleXAnchor === 'left' ? 'start' : titleXAnchor === 'right' ? 'end' : 'middle';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CommonComponents/CartesianChart.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport type { ModifiedCartesianChartProps } from '../../index';\nimport { useCartesianChartStyles } from './useCartesianChartStyles.styles';\nimport { select as d3Select } from 'd3-selection';\nimport type { IAxisData, IMargins } from '../../utilities/index';\nimport {\n createNumericXAxis,\n createStringXAxis,\n createDateXAxis,\n XAxisTypes,\n YAxisType,\n createWrapOfXLabels,\n rotateXAxisLabels,\n calculateLongestLabelWidth,\n createYAxisLabels,\n ChartTypes,\n wrapContent,\n useRtl,\n truncateString,\n tooltipOfAxislabels,\n getSecureProps,\n DEFAULT_WRAP_WIDTH,\n autoLayoutXAxisLabels,\n getChartTitleInlineStyles,\n} from '../../utilities/index';\nimport { useId } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { SVGTooltipTextProps } from '../../utilities/SVGTooltipText';\nimport { SVGTooltipText } from '../../utilities/SVGTooltipText';\nimport { ChartAnnotationLayer } from './Annotations/ChartAnnotationLayer';\nimport type { ChartAnnotationContext } from './Annotations/ChartAnnotationLayer.types';\nimport { ChartPopover } from './ChartPopover';\nimport { useFocusableGroup, useArrowNavigationGroup } from '@fluentui/react-tabster';\n\nconst HORIZONTAL_MARGIN_FOR_YAXIS_TITLE = 24;\nconst VERTICAL_MARGIN_FOR_XAXIS_TITLE = 20;\nconst AXIS_TITLE_PADDING = 8;\nconst DEFAULT_MARGIN_WITH_TICKS = 40;\nconst DEFAULT_MARGIN_NO_TICKS = 20;\n\n/**\n * Cartesian Chart component\n * {@docCategory CartesianChart}\n */\nexport const CartesianChart: React.FunctionComponent<ModifiedCartesianChartProps> = React.forwardRef<\n HTMLDivElement,\n ModifiedCartesianChartProps\n>(({ hideTickOverlap = true, ...props }, forwardedRef) => {\n const chartContainer = React.useRef<HTMLDivElement | null>(null);\n let legendContainer: HTMLDivElement;\n const minLegendContainerHeight: number = 40;\n const xAxisElement = React.useRef<SVGSVGElement | null>(null);\n const yAxisElement = React.useRef<SVGSVGElement | null>(null);\n const yAxisElementSecondary = React.useRef<SVGSVGElement | null>(null);\n let margins: IMargins;\n const idForGraph: string = 'chart_';\n let _reqID: number | undefined;\n const _useRtl: boolean = useRtl();\n let _tickLabels: string[];\n const _isFirstRender = React.useRef<boolean>(true);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _xScale: any;\n const isIntegralDataset = React.useMemo(() => {\n return !props.points.some((point: { y: number }) => point.y % 1 !== 0);\n }, [props.points]);\n const _tooltipId: string = useId('tooltip_');\n /* Used for when WrapXAxisLabels props appeared.\n * To display the total word (space separated words), Need to have more space than usual.\n * This height will get total height need to disaply total word.\n * These value need to be removed from actual svg height/graph height.\n * Defalut value is 0. And this values calculted when 'wrapXAxisLables' or 'showXAxisLablesTooltip' is true.\n */\n let _removalValueForTextTuncate: number = 0;\n const _yAxisTickText = React.useRef<string[]>([]);\n\n const [containerWidth, setContainerWidth] = React.useState<number>(0);\n const [containerHeight, setContainerHeight] = React.useState<number>(0);\n const [startFromX, setStartFromX] = React.useState<number>(0);\n const prevWidthRef = React.useRef<number | undefined>(undefined);\n const prevHeightRef = React.useRef<number | undefined>(undefined);\n\n const classes = useCartesianChartStyles(props);\n const focusAttributes = useFocusableGroup();\n const arrowAttributes = useArrowNavigationGroup({ circular: true, axis: 'horizontal' });\n // ComponentdidMount and Componentwillunmount logic\n React.useEffect(() => {\n _fitParentContainer();\n if (props.showYAxisLables) {\n const maxYAxisLabelLength = calculateMaxYAxisLabelLength(classes.yAxis!);\n if (startFromX !== maxYAxisLabelLength) {\n setStartFromX(maxYAxisLabelLength);\n }\n } else if (startFromX !== 0) {\n setStartFromX(0);\n }\n return () => {\n if (_reqID !== undefined) {\n cancelAnimationFrame(_reqID);\n }\n };\n }, [props]);\n\n // ComponentDidUpdate logic\n React.useEffect(() => {\n // Check if height or width changed\n if (\n prevWidthRef.current !== undefined &&\n prevHeightRef.current !== undefined &&\n (prevWidthRef.current !== props.width || prevHeightRef.current !== props.height)\n ) {\n _fitParentContainer();\n }\n // Update refs with current values\n prevWidthRef.current = props.width;\n prevHeightRef.current = props.height;\n\n if (props.showYAxisLables) {\n const maxYAxisLabelLength = calculateMaxYAxisLabelLength(classes.yAxis!);\n if (startFromX !== maxYAxisLabelLength) {\n setStartFromX(maxYAxisLabelLength);\n }\n } else if (startFromX !== 0) {\n setStartFromX(0);\n }\n }, [props.width, props.height, props.chartType, props.showYAxisLables, props.yAxisType]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: chartContainer.current ?? null,\n }),\n [],\n );\n\n /**\n * Dedicated function to return the Callout JSX Element , which can further be used to only call this when\n * only the calloutprops and charthover props changes.\n * @param calloutProps\n * @param chartHoverProps\n * @returns\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _generateCallout(calloutProps: any): JSXElement {\n return <ChartPopover {...calloutProps} />;\n }\n\n function calculateMaxYAxisLabelLength(className: string): number {\n const formatTickLabel = (str: string) => {\n if (props.showYAxisLablesTooltip) {\n return truncateString(str, props.noOfCharsToTruncate || 4);\n }\n\n return str;\n };\n return calculateLongestLabelWidth(\n _yAxisTickText.current.map(label => formatTickLabel(label)),\n `.${className} text`,\n );\n }\n\n const {\n calloutProps,\n points,\n chartType,\n svgProps,\n culture,\n dateLocalizeOptions,\n timeFormatLocale,\n customDateTimeFormatter,\n } = props;\n if (props.parentRef) {\n _fitParentContainer();\n }\n\n margins = _calcMargins();\n // Callback for margins to the chart\n props.getmargins && props.getmargins(margins);\n\n let callout: JSXElement | null = null;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let yScalePrimary: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let yScaleSecondary: any;\n\n let children = null;\n if ((props.enableFirstRenderOptimization && chartContainer.current) || !props.enableFirstRenderOptimization) {\n _isFirstRender.current = false;\n const XAxisParams = {\n domainNRangeValues: props.getDomainNRangeValues(\n points,\n props.getDomainMargins ? props.getDomainMargins(containerWidth) : margins,\n containerWidth,\n chartType,\n _useRtl,\n props.xAxisType,\n props.barwidth!,\n props.tickValues!,\n ),\n // FIXME: In XAxisParams, containerHeight is used by HBWA to generate vertical gridlines.\n // Since the x-axis in HBWA is numeric, it typically doesn't require transformation.\n // However, if transformation props are enabled, the updated _removalValueForTextTuncate\n // will only be available in the next render, as it's set after the axis is created.\n // Solution: Delay the creation of gridlines until after the transformation has been applied,\n // or precompute the required height for transformed labels (_removalValueForTextTuncate).\n containerHeight: containerHeight - _removalValueForTextTuncate,\n margins,\n xAxisElement: xAxisElement.current!,\n showRoundOffXTickValues: props.showRoundOffXTickValues ?? true,\n xAxisCount: props.xAxisTickCount,\n xAxistickSize: props.xAxistickSize,\n tickPadding: props.tickPadding || props.showXAxisLablesTooltip ? 5 : 10,\n xAxisPadding: props.xAxisPadding,\n xAxisInnerPadding: props.xAxisInnerPadding,\n xAxisOuterPadding: props.xAxisOuterPadding,\n containerWidth,\n hideTickOverlap: props.rotateXAxisLables || props.xAxis?.tickLayout === 'auto' ? false : hideTickOverlap,\n calcMaxLabelWidth: _calcMaxLabelWidthWithTransform,\n xMinValue: props.xMinValue,\n xMaxValue: props.xMaxValue,\n ...props.xAxis,\n };\n\n /**\n * These scales used for 2 purposes.\n * 1. To create x and y axis\n * 2. To draw the graph.\n * For area/line chart using same scales. For other charts, creating their own scales to draw the graph.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let xScale: any;\n let tickValues: number[] | Date[] | string[];\n let tickLabels: string[];\n switch (props.xAxisType!) {\n case XAxisTypes.NumericAxis:\n ({ xScale, tickValues, tickLabels } = createNumericXAxis(\n XAxisParams,\n props.tickParams!,\n props.chartType,\n culture,\n props.xScaleType,\n _useRtl,\n ));\n break;\n case XAxisTypes.DateAxis:\n ({ xScale, tickValues, tickLabels } = createDateXAxis(\n XAxisParams,\n props.tickParams!,\n culture,\n dateLocalizeOptions,\n timeFormatLocale,\n customDateTimeFormatter,\n props.useUTC,\n props.chartType,\n ));\n break;\n case XAxisTypes.StringAxis:\n ({ xScale, tickValues, tickLabels } = createStringXAxis(\n XAxisParams,\n props.tickParams!,\n props.datasetForXAxisDomain!,\n culture,\n _useRtl,\n ));\n break;\n default:\n ({ xScale, tickValues, tickLabels } = createNumericXAxis(\n XAxisParams,\n props.tickParams!,\n props.chartType,\n culture,\n props.xScaleType,\n _useRtl,\n ));\n }\n _xScale = xScale;\n _tickLabels = tickLabels;\n\n if (props.xAxis?.tickLayout === 'auto') {\n _removalValueForTextTuncate = autoLayoutXAxisLabels(\n tickValues,\n _tickLabels,\n _xScale,\n xAxisElement.current,\n containerWidth,\n chartContainer.current,\n );\n } else {\n _transformXAxisLabels();\n }\n\n const YAxisParams = {\n margins: props.getYDomainMargins ? props.getYDomainMargins(containerHeight) : margins,\n containerWidth,\n containerHeight: containerHeight - _removalValueForTextTuncate,\n yAxisElement: yAxisElement.current!,\n yAxisTickFormat: props.yAxisTickFormat!,\n yAxisTickCount: props.yAxisTickCount!,\n yMinValue: props.yMinValue || 0,\n yMaxValue: props.yMaxValue || 0,\n tickPadding: 10,\n maxOfYVal: props.maxOfYVal,\n yMinMaxValues: props.getMinMaxOfYAxis(points, props.yAxisType),\n // please note these padding default values must be consistent in here\n // and the parent chart(HBWA/Vertical etc..) for more details refer example\n // http://using-d3js.com/04_07_ordinal_scales.html\n yAxisPadding: props.yAxisPadding || 0,\n tickValues: props.yAxisTickValues,\n ...props.yAxis,\n };\n /**\n * These scales used for 2 purposes.\n * 1. To create x and y axis\n * 2. To draw the graph.\n * For area/line chart using same scales. For other charts, creating their own scales to draw the graph.\n */\n const axisData: IAxisData = { yAxisDomainValues: [], yAxisTickText: [] };\n if (props.yAxisType && props.yAxisType === YAxisType.StringAxis) {\n yScalePrimary = props.createStringYAxis(\n YAxisParams,\n props.stringDatasetForYAxisDomain!,\n _useRtl,\n axisData,\n props.barwidth,\n props.chartType,\n );\n } else {\n // TODO: Since the scale domain values are now computed independently for both the primary and\n // secondary y-axes, the yMinValue and yMaxValue props are no longer necessary for accurately\n // rendering the secondary y-axis. Therefore, rather than checking the secondaryYScaleOptions\n // prop to determine whether to create a secondary y-axis, it's more appropriate to check if any\n // data points are assigned to use the secondary y-scale.\n if (props?.secondaryYScaleOptions) {\n const YAxisParamsSecondary = {\n margins,\n containerWidth,\n containerHeight: containerHeight - _removalValueForTextTuncate!,\n yAxisElement: yAxisElementSecondary.current,\n yAxisTickFormat: props.yAxisTickFormat!,\n yAxisTickCount: props.yAxisTickCount!,\n yMinValue: props.secondaryYScaleOptions?.yMinValue || 0,\n yMaxValue: props.secondaryYScaleOptions?.yMaxValue ?? 100,\n tickPadding: 10,\n yMinMaxValues: props.getMinMaxOfYAxis(points, props.yAxisType, true),\n yAxisPadding: props.yAxisPadding,\n };\n\n yScaleSecondary = props.createYAxis(\n YAxisParamsSecondary,\n _useRtl,\n axisData,\n isIntegralDataset,\n chartType,\n true,\n props.roundedTicks!,\n props.secondaryYScaleType,\n _useRtl,\n );\n }\n yScalePrimary = props.createYAxis(\n YAxisParams,\n _useRtl,\n axisData,\n isIntegralDataset,\n chartType,\n false,\n props.roundedTicks!,\n props.yScaleType,\n _useRtl,\n );\n }\n _yAxisTickText.current = axisData.yAxisTickText;\n props.getAxisData && props.getAxisData(axisData);\n\n // Removing previously created tooltips.\n try {\n // eslint-disable-next-line @nx/workspace-no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n // Used to display tooltip at x axis labels.\n if (props.showXAxisLablesTooltip || props.xAxis?.tickLayout === 'auto') {\n const _xAxisElement = xAxisElement.current ? d3Select(xAxisElement.current).call(xScale) : null;\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: _xAxisElement,\n container: chartContainer.current,\n };\n _xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n // Used to display tooltip at y axis labels.\n if (props.showYAxisLablesTooltip) {\n // To create y axis tick values by if specified truncating the rest of the text\n // and showing elipsis or showing the whole string,\n yScalePrimary &&\n createYAxisLabels(\n yAxisElement.current!,\n yScalePrimary,\n props.noOfCharsToTruncate || 4,\n props.showYAxisLablesTooltip || false,\n _useRtl,\n );\n\n const _yAxisElement = yAxisElement.current ? d3Select(yAxisElement.current).call(yScalePrimary) : null;\n const ytooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: _yAxisElement,\n container: chartContainer.current,\n };\n _yAxisElement && tooltipOfAxislabels(ytooltipProps);\n }\n\n // Call back to the chart.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _getData = (xScale: any, yScalePrimary: any, yScaleSecondary: any) => {\n props.getGraphData &&\n props.getGraphData(\n xScale,\n yScalePrimary,\n containerHeight - _removalValueForTextTuncate!,\n containerWidth,\n xAxisElement.current,\n yAxisElement.current,\n yScaleSecondary,\n );\n };\n\n // Callback function for chart, returns axis\n _getData(xScale, yScalePrimary, yScaleSecondary);\n\n children = props.children({\n xScale,\n yScalePrimary,\n yScaleSecondary,\n containerHeight,\n containerWidth,\n });\n\n if (!props.hideTooltip && calloutProps!.isPopoverOpen) {\n callout = _generateCallout(calloutProps);\n }\n }\n const svgDimensions = {\n width: containerWidth,\n height: containerHeight,\n };\n\n const plotWidth = Math.max(0, svgDimensions.width - margins.left! - margins.right!);\n const plotHeight = Math.max(0, svgDimensions.height - margins.top! - margins.bottom! - _removalValueForTextTuncate);\n\n const plotRect = {\n x: margins.left!,\n y: margins.top!,\n width: plotWidth,\n height: plotHeight,\n };\n\n const annotations = props.annotations ?? [];\n const hasAnnotations = annotations.length > 0;\n const annotationContext: ChartAnnotationContext | undefined = hasAnnotations\n ? {\n plotRect,\n svgRect: svgDimensions,\n isRtl: _useRtl,\n xScale: _xScale,\n yScalePrimary,\n yScaleSecondary,\n }\n : undefined;\n\n const xAxisTitleMaxWidth = svgDimensions.width - margins.left! - margins.right! - AXIS_TITLE_PADDING * 2;\n const yAxisTitleMaxHeight =\n svgDimensions.height - margins.bottom! - margins.top! - _removalValueForTextTuncate! - AXIS_TITLE_PADDING * 2;\n const yAxisTitleCenterY = margins.top! + AXIS_TITLE_PADDING + yAxisTitleMaxHeight / 2;\n const yAxisTitleCenterX = _useRtl\n ? svgDimensions.width - AXIS_TITLE_PADDING\n : HORIZONTAL_MARGIN_FOR_YAXIS_TITLE - AXIS_TITLE_PADDING;\n const secondaryYAxisTitleCenterX = _useRtl\n ? HORIZONTAL_MARGIN_FOR_YAXIS_TITLE - AXIS_TITLE_PADDING\n : svgDimensions.width - AXIS_TITLE_PADDING;\n\n const commonSvgToolTipProps: SVGTooltipTextProps = {\n wrapContent,\n showBackground: true,\n className: classes.svgTooltip,\n content: '',\n };\n /**\n * When screen resizes, along with screen, chart also auto adjusted.\n * This method used to adjust height and width of the charts.\n */\n function _fitParentContainer(): void {\n //_reqID = requestAnimationFrame(() => {\n let legendContainerHeight;\n if (props.hideLegend) {\n // If there is no legend, need not to allocate some space from total chart space.\n legendContainerHeight = 0;\n } else {\n const legendContainerComputedStyles = legendContainer && getComputedStyle(legendContainer);\n legendContainerHeight =\n ((legendContainer && legendContainer.getBoundingClientRect().height) || minLegendContainerHeight) +\n parseFloat((legendContainerComputedStyles && legendContainerComputedStyles.marginTop) || '0') +\n parseFloat((legendContainerComputedStyles && legendContainerComputedStyles.marginBottom) || '0');\n }\n if (props.parentRef || chartContainer.current) {\n const container = props.parentRef ? props.parentRef : chartContainer.current!;\n const currentContainerWidth =\n props.reflowProps?.mode === 'min-width' && !_isFirstRender.current\n ? Math.max(container.getBoundingClientRect().width, _calculateChartMinWidth())\n : container.getBoundingClientRect().width;\n const currentContainerHeight =\n container.getBoundingClientRect().height > legendContainerHeight\n ? container.getBoundingClientRect().height\n : 350;\n const shouldResize =\n containerWidth !== currentContainerWidth || containerHeight !== currentContainerHeight - legendContainerHeight;\n if (shouldResize) {\n setContainerWidth(currentContainerWidth);\n setContainerHeight(currentContainerHeight - legendContainerHeight);\n }\n }\n //});\n }\n\n function _onChartLeave(): void {\n props.onChartMouseLeave && props.onChartMouseLeave();\n }\n\n function _onChartBlur(event: React.FocusEvent<HTMLDivElement>): void {\n if (!event.relatedTarget || !event.currentTarget.contains(event.relatedTarget as Node)) {\n props.onChartBlur && props.onChartBlur();\n }\n }\n\n function _calculateChartMinWidth(): number {\n // Adding 10px for padding on both sides\n const labelWidth = _calcMaxLabelWidthWithTransform(_tickLabels) + 10;\n\n let minChartWidth = margins.left! + margins.right! + labelWidth * (_tickLabels.length - 1);\n\n if (\n [ChartTypes.GroupedVerticalBarChart, ChartTypes.VerticalBarChart, ChartTypes.VerticalStackedBarChart].includes(\n props.chartType,\n )\n ) {\n const minDomainMargin = 8;\n minChartWidth += minDomainMargin * 2;\n }\n\n return minChartWidth;\n }\n\n function _getChartDescription(): string {\n return (\n (props.chartTitle || 'Chart. ') +\n _getAxisTitle('X', props.xAxisTitle, props.xAxisType) +\n _getAxisTitle('Y', props.yAxisTitle, props.yAxisType || YAxisType.NumericAxis) +\n (props.secondaryYScaleOptions\n ? _getAxisTitle('secondary Y', props.secondaryYAxistitle, YAxisType.NumericAxis)\n : '')\n );\n }\n\n function _getAxisTitle(axisLabel: string, axisTitle: string | undefined, axisType: XAxisTypes | YAxisType): string {\n return (\n `The ${axisLabel} axis displays ` +\n (axisTitle ||\n (axisType === XAxisTypes.StringAxis || axisType === YAxisType.StringAxis\n ? 'categories'\n : axisType === XAxisTypes.DateAxis || axisType === YAxisType.DateAxis\n ? 'time'\n : 'values')) +\n '. '\n );\n }\n\n function _calcMaxLabelWidthWithTransform(x: (string | number)[]) {\n // Case: rotated labels\n if (!props.wrapXAxisLables && props.rotateXAxisLables && props.xAxisType! === XAxisTypes.StringAxis) {\n const longestLabelWidth = calculateLongestLabelWidth(x, `.${classes.xAxis} text`);\n return Math.ceil(longestLabelWidth * Math.cos(Math.PI / 4));\n }\n\n // Case: truncated labels\n if (props.showXAxisLablesTooltip) {\n const tickLabels = x.map(val => {\n const numChars = props.noOfCharsToTruncate || 4;\n return val.toString().length > numChars ? `${val.toString().slice(0, numChars)}...` : val;\n });\n\n const longestLabelWidth = calculateLongestLabelWidth(tickLabels, `.${classes.xAxis} text`);\n return Math.ceil(longestLabelWidth);\n }\n\n // Case: wrapped labels\n if (props.wrapXAxisLables) {\n // FIXME: Calculate the max width of lines instead of words. This requires applying\n // the wrapping transformation earlier to obtain the actual rendered lines.\n const words: string[] = [];\n x.forEach((val: string) => {\n words.push(...val.toString().split(/\\s+/));\n });\n\n // This approach works well in most cases, since overflow typically occurs only when\n // a single word exceeds the specified width — otherwise, the text will wrap as expected.\n const longestLabelWidth = calculateLongestLabelWidth(words, `.${classes.xAxis} text`);\n return Math.max(Math.ceil(longestLabelWidth), DEFAULT_WRAP_WIDTH);\n }\n\n // Default case\n const longestLabelWidth = calculateLongestLabelWidth(x, `.${classes.xAxis} text`);\n return Math.ceil(longestLabelWidth);\n }\n\n function _transformXAxisLabels() {\n _removalValueForTextTuncate = 0;\n\n /*\n * To enable wrapping of x axis tick values or to display complete x axis tick values,\n * we need to calculate how much space it needed to render the text.\n * No need to re-calculate every time the chart renders and same time need to get an update. So using setState.\n * Required space will be calculated first time chart rendering and if any width/height of chart updated.\n * */\n if (props.wrapXAxisLables || props.showXAxisLablesTooltip) {\n let maxXAxisLabelWidth: number | undefined;\n if (props.xAxisType === XAxisTypes.StringAxis) {\n if ((props.datasetForXAxisDomain?.length || 0) > 1) {\n maxXAxisLabelWidth = _xScale.step();\n } else {\n maxXAxisLabelWidth = containerWidth;\n }\n }\n\n const wrapLabelProps = {\n node: xAxisElement.current!,\n xAxis: _xScale,\n showXAxisLablesTooltip: props.showXAxisLablesTooltip || false,\n noOfCharsToTruncate: props.noOfCharsToTruncate || 4,\n width: maxXAxisLabelWidth,\n container: chartContainer.current,\n };\n _removalValueForTextTuncate = createWrapOfXLabels(wrapLabelProps) ?? 0;\n }\n\n if (!props.wrapXAxisLables && props.rotateXAxisLables && props.xAxisType! === XAxisTypes.StringAxis) {\n const rotateLabelProps = {\n node: xAxisElement.current!,\n xAxis: _xScale,\n };\n const rotatedHeight = rotateXAxisLabels(rotateLabelProps) ?? 0;\n // margins.bottom is used as padding here\n _removalValueForTextTuncate = rotatedHeight + margins.bottom!;\n }\n }\n\n function _calcMargins(): IMargins {\n let _margins = _getDefaultMargins();\n\n _margins = _applyTitleMargins(_margins);\n _margins = _applyAnnotationMargins(_margins);\n\n if (_useRtl) {\n _margins = _swapRtlMargins(_margins);\n }\n\n return {\n ..._margins,\n ...props.margins,\n };\n }\n\n function _getDefaultMargins(): IMargins {\n return {\n top: DEFAULT_MARGIN_NO_TICKS,\n // Smaller than the default because it is based on the line height rather than\n // the length of the tick labels.\n bottom: DEFAULT_MARGIN_WITH_TICKS - 5,\n // For the actual margin, add the tick size, tick padding, and some extra space to\n // the width of the longest yaxis tick label (startFromX).\n left: Math.max(DEFAULT_MARGIN_WITH_TICKS, startFromX + 20),\n right: props.secondaryYScaleOptions ? DEFAULT_MARGIN_WITH_TICKS : DEFAULT_MARGIN_NO_TICKS,\n };\n }\n\n function _applyTitleMargins(_margins: IMargins): IMargins {\n const updated = { ..._margins };\n if (props.xAxisTitle !== undefined && props.xAxisTitle !== '') {\n updated.bottom! += VERTICAL_MARGIN_FOR_XAXIS_TITLE;\n }\n if (props.yAxisTitle !== undefined && props.yAxisTitle !== '') {\n updated.left! += HORIZONTAL_MARGIN_FOR_YAXIS_TITLE;\n }\n if (props.secondaryYAxistitle !== undefined && props.secondaryYAxistitle !== '') {\n updated.right! += HORIZONTAL_MARGIN_FOR_YAXIS_TITLE;\n }\n return updated;\n }\n\n function _applyAnnotationMargins(_margins: IMargins): IMargins {\n const updated = { ..._margins };\n if (props.xAxisAnnotation !== undefined && props.xAxisAnnotation !== '') {\n updated.top! += VERTICAL_MARGIN_FOR_XAXIS_TITLE;\n }\n if (\n props.yAxisAnnotation !== undefined &&\n props.yAxisAnnotation !== '' &&\n (props.secondaryYAxistitle === undefined || props.secondaryYAxistitle === '')\n ) {\n updated.right! += HORIZONTAL_MARGIN_FOR_YAXIS_TITLE;\n }\n return updated;\n }\n\n function _swapRtlMargins(_margins: IMargins): IMargins {\n return {\n ..._margins,\n left: _margins.right,\n right: _margins.left,\n };\n }\n\n /**\n * We have use the {@link defaultTabbableElement } to fix\n * the Focus not landing on chart while tabbing, instead goes to legend.\n * This issue is observed in Area, line chart after performance optimization done in the PR {@link https://github.com/microsoft/fluentui/pull/27721 }\n * This issue is observed in Bar charts after the changes done by FocusZone team in the PR: {@link https://github.com/microsoft/fluentui/pull/24175 }\n * The issue in Bar Charts(VB and VSB) is due to a {@link FocusZone } update where previously an event listener was\n * attached on keydown to the window, so that whenever the tab key is pressed all outer FocusZone's\n * tab-indexes are updated (an outer FocusZone is a FocusZone that is not within another one).\n * But now after the above PR : they are attaching the\n * listeners to the FocusZone elements instead of the window. So in the first render cycle in Bar charts\n * bars are not created as in the first render cycle the size of the chart container is not known( or is 0)\n * which creates bars of height 0 so instead we do not create any bars and instead return empty fragments.\n *\n * We have tried 2 Approaches to fix the issue:\n * 1. Using the {@link elementRef} property of FocusZone where we dispatch event for tab keydown\n * after the second render cycle which triggers an update of the tab index in FocusZone.\n * But this is a hacky solution and not a proper fix and also elementRef is deprecated.\n * 2. Using the default tabbable element to fix the issue.\n */\n\n return (\n <div\n id={idForGraph}\n className={classes.root}\n role={'presentation'}\n ref={(rootElem: HTMLDivElement) => {\n chartContainer.current = rootElem;\n }}\n onBlur={_onChartBlur}\n onMouseLeave={_onChartLeave}\n >\n <div className={classes.chartWrapper} {...focusAttributes} {...arrowAttributes}>\n {_isFirstRender.current}\n <svg\n width={svgDimensions.width}\n height={svgDimensions.height}\n role=\"region\"\n aria-label={_getChartDescription()}\n style={{ display: 'block' }}\n className={classes.chart}\n {...getSecureProps(svgProps)}\n >\n <g\n ref={(e: SVGSVGElement | null) => {\n xAxisElement.current = e!;\n }}\n id={`xAxisGElement${idForGraph}`}\n // To add wrap of x axis lables feature, need to remove word height from svg height.\n transform={`translate(0, ${svgDimensions.height - margins.bottom! - _removalValueForTextTuncate!})`}\n className={classes.xAxis}\n />\n {props.xAxisTitle !== undefined && props.xAxisTitle !== '' && (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.xAxisTitle}\n textProps={{\n x: margins.left! + AXIS_TITLE_PADDING + xAxisTitleMaxWidth / 2,\n y: svgDimensions.height - AXIS_TITLE_PADDING,\n className: classes.axisTitle!,\n textAnchor: 'middle',\n }}\n maxWidth={xAxisTitleMaxWidth}\n />\n )}\n {props.xAxisAnnotation !== undefined &&\n props.xAxisAnnotation !== '' &&\n (() => {\n const { titleFont, titleXAnchor, titleYAnchor, titlePad } = props.titleStyles ?? {};\n const fontSize = typeof titleFont?.size === 'number' ? titleFont.size : 13;\n const padL = titlePad?.l ?? 0;\n const padR = titlePad?.r ?? 0;\n const padT = titlePad?.t ?? 0;\n const padB = titlePad?.b ?? 0;\n\n const xPos =\n (titleXAnchor === 'left'\n ? margins.left! + AXIS_TITLE_PADDING\n : titleXAnchor === 'right'\n ? margins.left! + AXIS_TITLE_PADDING + xAxisTitleMaxWidth\n : margins.left! + AXIS_TITLE_PADDING + xAxisTitleMaxWidth / 2) +\n padL -\n padR;\n\n const yPos =\n Math.max(fontSize + AXIS_TITLE_PADDING, VERTICAL_MARGIN_FOR_XAXIS_TITLE - AXIS_TITLE_PADDING) +\n padT -\n padB;\n\n const textAnchor = titleXAnchor === 'left' ? 'start' : titleXAnchor === 'right' ? 'end' : 'middle';\n\n const dominantBaseline =\n titleYAnchor === 'top'\n ? 'hanging'\n : titleYAnchor === 'bottom'\n ? 'alphabetic'\n : titleYAnchor === 'middle'\n ? 'central'\n : 'auto';\n\n return (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.xAxisAnnotation}\n textProps={{\n x: xPos,\n y: yPos,\n className: classes.axisAnnotation!,\n textAnchor,\n dominantBaseline,\n 'aria-hidden': true,\n style: getChartTitleInlineStyles(titleFont),\n }}\n maxWidth={xAxisTitleMaxWidth}\n />\n );\n })()}\n <g\n ref={(e: SVGSVGElement | null) => {\n yAxisElement.current = e!;\n }}\n id={`yAxisGElement${idForGraph}`}\n transform={`translate(${_useRtl ? svgDimensions.width - margins.right! : margins.left!}, 0)`}\n className={classes.yAxis}\n />\n {props.secondaryYScaleOptions && (\n <g>\n <g\n ref={(e: SVGSVGElement | null) => {\n yAxisElementSecondary.current = e!;\n }}\n id={`yAxisGElementSecondary${idForGraph}`}\n transform={`translate(${_useRtl ? margins.left! : svgDimensions.width - margins.right!}, 0)`}\n className={classes.yAxis}\n />\n {props.secondaryYAxistitle !== undefined && props.secondaryYAxistitle !== '' && (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.secondaryYAxistitle}\n textProps={{\n x: secondaryYAxisTitleCenterX,\n y: yAxisTitleCenterY,\n textAnchor: 'middle',\n transform: `rotate(-90, ${secondaryYAxisTitleCenterX}, ${yAxisTitleCenterY})`,\n className: classes.axisTitle!,\n }}\n maxWidth={yAxisTitleMaxHeight}\n />\n )}\n </g>\n )}\n {children}\n {props.yAxisTitle !== undefined && props.yAxisTitle !== '' && (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.yAxisTitle}\n textProps={{\n x: yAxisTitleCenterX,\n y: yAxisTitleCenterY,\n textAnchor: 'middle',\n transform: `rotate(-90, ${yAxisTitleCenterX}, ${yAxisTitleCenterY})`,\n className: classes.axisTitle!,\n }}\n maxWidth={yAxisTitleMaxHeight}\n />\n )}\n {props.yAxisAnnotation !== undefined &&\n props.yAxisAnnotation !== '' &&\n (props.secondaryYAxistitle === undefined || props.secondaryYAxistitle === '') && (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.yAxisAnnotation}\n textProps={{\n x: secondaryYAxisTitleCenterX,\n y: yAxisTitleCenterY,\n textAnchor: 'middle',\n transform: `rotate(-90, ${secondaryYAxisTitleCenterX}, ${yAxisTitleCenterY})`,\n className: classes.axisAnnotation!,\n 'aria-hidden': true,\n }}\n maxWidth={yAxisTitleMaxHeight}\n />\n )}\n </svg>\n {hasAnnotations && annotationContext && (\n <ChartAnnotationLayer\n annotations={annotations}\n context={annotationContext}\n className={classes.annotationLayer}\n />\n )}\n </div>\n\n {!props.hideLegend && (\n <div\n ref={(e: HTMLDivElement) => {\n legendContainer = e;\n }}\n className={classes.legendContainer}\n >\n {props.legendBars}\n </div>\n )}\n {/** The callout is used for narration, so keep it mounted on the DOM */}\n {callout && <React.Suspense fallback={<div>Loading...</div>}>{callout}</React.Suspense>}\n </div>\n );\n});\nCartesianChart.displayName = 'CartesianChart';\n"],"names":["React","useCartesianChartStyles","select","d3Select","createNumericXAxis","createStringXAxis","createDateXAxis","XAxisTypes","YAxisType","createWrapOfXLabels","rotateXAxisLabels","calculateLongestLabelWidth","createYAxisLabels","ChartTypes","wrapContent","useRtl","truncateString","tooltipOfAxislabels","getSecureProps","DEFAULT_WRAP_WIDTH","autoLayoutXAxisLabels","getChartTitleInlineStyles","useId","SVGTooltipText","ChartAnnotationLayer","ChartPopover","useFocusableGroup","useArrowNavigationGroup","HORIZONTAL_MARGIN_FOR_YAXIS_TITLE","VERTICAL_MARGIN_FOR_XAXIS_TITLE","AXIS_TITLE_PADDING","DEFAULT_MARGIN_WITH_TICKS","DEFAULT_MARGIN_NO_TICKS","CartesianChart","forwardRef","hideTickOverlap","props","forwardedRef","chartContainer","useRef","legendContainer","minLegendContainerHeight","xAxisElement","yAxisElement","yAxisElementSecondary","margins","idForGraph","_reqID","_useRtl","_tickLabels","_isFirstRender","_xScale","isIntegralDataset","useMemo","points","some","point","y","_tooltipId","_removalValueForTextTuncate","_yAxisTickText","containerWidth","setContainerWidth","useState","containerHeight","setContainerHeight","startFromX","setStartFromX","prevWidthRef","undefined","prevHeightRef","classes","focusAttributes","arrowAttributes","circular","axis","useEffect","_fitParentContainer","showYAxisLables","maxYAxisLabelLength","calculateMaxYAxisLabelLength","yAxis","cancelAnimationFrame","current","width","height","chartType","yAxisType","useImperativeHandle","componentRef","_generateCallout","calloutProps","className","formatTickLabel","str","showYAxisLablesTooltip","noOfCharsToTruncate","map","label","svgProps","culture","dateLocalizeOptions","timeFormatLocale","customDateTimeFormatter","parentRef","_calcMargins","getmargins","callout","yScalePrimary","yScaleSecondary","children","enableFirstRenderOptimization","XAxisParams","domainNRangeValues","getDomainNRangeValues","getDomainMargins","xAxisType","barwidth","tickValues","showRoundOffXTickValues","xAxisCount","xAxisTickCount","xAxistickSize","tickPadding","showXAxisLablesTooltip","xAxisPadding","xAxisInnerPadding","xAxisOuterPadding","rotateXAxisLables","xAxis","tickLayout","calcMaxLabelWidth","_calcMaxLabelWidthWithTransform","xMinValue","xMaxValue","xScale","tickLabels","NumericAxis","tickParams","xScaleType","DateAxis","useUTC","StringAxis","datasetForXAxisDomain","_transformXAxisLabels","YAxisParams","getYDomainMargins","yAxisTickFormat","yAxisTickCount","yMinValue","yMaxValue","maxOfYVal","yMinMaxValues","getMinMaxOfYAxis","yAxisPadding","yAxisTickValues","axisData","yAxisDomainValues","yAxisTickText","createStringYAxis","stringDatasetForYAxisDomain","secondaryYScaleOptions","YAxisParamsSecondary","createYAxis","roundedTicks","secondaryYScaleType","yScaleType","getAxisData","document","getElementById","remove","e","_xAxisElement","call","tooltipProps","tooltipCls","tooltip","id","container","_yAxisElement","ytooltipProps","_getData","getGraphData","hideTooltip","isPopoverOpen","svgDimensions","plotWidth","Math","max","left","right","plotHeight","top","bottom","plotRect","x","annotations","hasAnnotations","length","annotationContext","svgRect","isRtl","xAxisTitleMaxWidth","yAxisTitleMaxHeight","yAxisTitleCenterY","yAxisTitleCenterX","secondaryYAxisTitleCenterX","commonSvgToolTipProps","showBackground","svgTooltip","content","legendContainerHeight","hideLegend","legendContainerComputedStyles","getComputedStyle","getBoundingClientRect","parseFloat","marginTop","marginBottom","currentContainerWidth","reflowProps","mode","_calculateChartMinWidth","currentContainerHeight","shouldResize","_onChartLeave","onChartMouseLeave","_onChartBlur","event","relatedTarget","currentTarget","contains","onChartBlur","labelWidth","minChartWidth","GroupedVerticalBarChart","VerticalBarChart","VerticalStackedBarChart","includes","minDomainMargin","_getChartDescription","chartTitle","_getAxisTitle","xAxisTitle","yAxisTitle","secondaryYAxistitle","axisLabel","axisTitle","axisType","wrapXAxisLables","longestLabelWidth","ceil","cos","PI","val","numChars","toString","slice","words","forEach","push","split","maxXAxisLabelWidth","step","wrapLabelProps","node","rotateLabelProps","rotatedHeight","_margins","_getDefaultMargins","_applyTitleMargins","_applyAnnotationMargins","_swapRtlMargins","updated","xAxisAnnotation","yAxisAnnotation","div","root","role","ref","rootElem","onBlur","onMouseLeave","chartWrapper","svg","aria-label","style","display","chart","g","transform","textProps","textAnchor","maxWidth","titleFont","titleXAnchor","titleYAnchor","titlePad","titleStyles","fontSize","size","padL","l","padR","r","padT","t","padB","b","xPos","yPos","dominantBaseline","axisAnnotation","context","annotationLayer","legendBars","Suspense","fallback","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B,SAASC,uBAAuB,QAAQ,sCAAmC;AAC3E,SAASC,UAAUC,QAAQ,QAAQ,eAAe;AAElD,SACEC,kBAAkB,EAClBC,iBAAiB,EACjBC,eAAe,EACfC,UAAU,EACVC,SAAS,EACTC,mBAAmB,EACnBC,iBAAiB,EACjBC,0BAA0B,EAC1BC,iBAAiB,EACjBC,UAAU,EACVC,WAAW,EACXC,MAAM,EACNC,cAAc,EACdC,mBAAmB,EACnBC,cAAc,EACdC,kBAAkB,EAClBC,qBAAqB,EACrBC,yBAAyB,QACpB,2BAAwB;AAC/B,SAASC,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ACHwF,YAAY;YACZF,WAAW,CAAC,YAAY,EAAErF,kBAAkB,EAAE,EAAED,kBAAkB,CAAC,CAAC;YACpEhH,WAAWrB,QAAQgL,SAAS;QAC9B;QACA8C,UAAU1F;QAGbvK,MAAM+O,eAAe,KAAK9M,aACzBjC,MAAM+O,eAAe,KAAK,MACzB/O,CAAAA,MAAMiN,mBAAmB,KAAKhL,aAAajC,MAAMiN,mBAAmB,KAAK,EAAC,mBACzE,oBAAC9N;QACE,GAAGwL,qBAAqB;QACzBG,SAAS9K,MAAM+O,eAAe;QAC9BgB,WAAW;YACThG,GAAGW;YACHrJ,GAAGmJ;YACHwF,YAAY;YACZF,WAAW,CAAC,YAAY,EAAEpF,2BAA2B,EAAE,EAAEF,kBAAkB,CAAC,CAAC;YAC7EhH,WAAWrB,QAAQiP,cAAc;YACjC,eAAe;QACjB;QACAnB,UAAU1F;SAIjBN,kBAAkBE,mCACjB,oBAAC/K;QACC4K,aAAaA;QACbqH,SAASlH;QACT3G,WAAWrB,QAAQmP,eAAe;SAKvC,CAACtR,MAAMgL,UAAU,kBAChB,oBAACgE;QACCG,KAAK,CAAC5G;YACJnI,kBAAkBmI;QACpB;QACA/E,WAAWrB,QAAQ/B,eAAe;OAEjCJ,MAAMuR,UAAU,GAIpBhN,yBAAW,oBAAC3G,MAAM4T,QAAQ;QAACC,wBAAU,oBAACzC,aAAI;OAAmBzK;AAGpE,GAAG;AACH1E,eAAe6R,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/CommonComponents/CartesianChart.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport type { ModifiedCartesianChartProps } from '../../index';\nimport { useCartesianChartStyles } from './useCartesianChartStyles.styles';\nimport { select as d3Select } from 'd3-selection';\nimport type { IAxisData, IMargins } from '../../utilities/index';\nimport {\n createNumericXAxis,\n createStringXAxis,\n createDateXAxis,\n XAxisTypes,\n YAxisType,\n createWrapOfXLabels,\n rotateXAxisLabels,\n calculateLongestLabelWidth,\n createYAxisLabels,\n ChartTypes,\n wrapContent,\n useRtl,\n truncateString,\n tooltipOfAxislabels,\n getSecureProps,\n DEFAULT_WRAP_WIDTH,\n autoLayoutXAxisLabels,\n getChartTitleInlineStyles,\n} from '../../utilities/index';\nimport { useId } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { SVGTooltipTextProps } from '../../utilities/SVGTooltipText';\nimport { SVGTooltipText } from '../../utilities/SVGTooltipText';\nimport { ChartAnnotationLayer } from './Annotations/ChartAnnotationLayer';\nimport type { ChartAnnotationContext } from './Annotations/ChartAnnotationLayer.types';\nimport { ChartPopover } from './ChartPopover';\nimport { useFocusableGroup, useArrowNavigationGroup } from '@fluentui/react-tabster';\n\nconst HORIZONTAL_MARGIN_FOR_YAXIS_TITLE = 24;\nconst VERTICAL_MARGIN_FOR_XAXIS_TITLE = 20;\nconst AXIS_TITLE_PADDING = 8;\nconst DEFAULT_MARGIN_WITH_TICKS = 40;\nconst DEFAULT_MARGIN_NO_TICKS = 20;\n\n/**\n * Cartesian Chart component\n * {@docCategory CartesianChart}\n */\nexport const CartesianChart: React.FunctionComponent<ModifiedCartesianChartProps> = React.forwardRef<\n HTMLDivElement,\n ModifiedCartesianChartProps\n>(({ hideTickOverlap = true, ...props }, forwardedRef) => {\n const chartContainer = React.useRef<HTMLDivElement | null>(null);\n let legendContainer: HTMLDivElement;\n const minLegendContainerHeight: number = 40;\n const xAxisElement = React.useRef<SVGSVGElement | null>(null);\n const yAxisElement = React.useRef<SVGSVGElement | null>(null);\n const yAxisElementSecondary = React.useRef<SVGSVGElement | null>(null);\n let margins: IMargins;\n const idForGraph: string = 'chart_';\n let _reqID: number | undefined;\n const _useRtl: boolean = useRtl();\n let _tickLabels: string[];\n const _isFirstRender = React.useRef<boolean>(true);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _xScale: any;\n const isIntegralDataset = React.useMemo(() => {\n return !props.points.some((point: { y: number }) => point.y % 1 !== 0);\n }, [props.points]);\n const _tooltipId: string = useId('tooltip_');\n /* Used for when WrapXAxisLabels props appeared.\n * To display the total word (space separated words), Need to have more space than usual.\n * This height will get total height need to disaply total word.\n * These value need to be removed from actual svg height/graph height.\n * Defalut value is 0. And this values calculted when 'wrapXAxisLables' or 'showXAxisLablesTooltip' is true.\n */\n let _removalValueForTextTuncate: number = 0;\n const _yAxisTickText = React.useRef<string[]>([]);\n\n const [containerWidth, setContainerWidth] = React.useState<number>(0);\n const [containerHeight, setContainerHeight] = React.useState<number>(0);\n const [startFromX, setStartFromX] = React.useState<number>(0);\n const prevWidthRef = React.useRef<number | undefined>(undefined);\n const prevHeightRef = React.useRef<number | undefined>(undefined);\n\n const classes = useCartesianChartStyles(props);\n const focusAttributes = useFocusableGroup();\n const arrowAttributes = useArrowNavigationGroup({ circular: true, axis: 'horizontal' });\n // ComponentdidMount and Componentwillunmount logic\n React.useEffect(() => {\n _fitParentContainer();\n if (props.showYAxisLables) {\n const maxYAxisLabelLength = calculateMaxYAxisLabelLength(classes.yAxis!);\n if (startFromX !== maxYAxisLabelLength) {\n setStartFromX(maxYAxisLabelLength);\n }\n } else if (startFromX !== 0) {\n setStartFromX(0);\n }\n return () => {\n if (_reqID !== undefined) {\n cancelAnimationFrame(_reqID);\n }\n };\n }, [props]);\n\n // ComponentDidUpdate logic\n React.useEffect(() => {\n // Check if height or width changed\n if (\n prevWidthRef.current !== undefined &&\n prevHeightRef.current !== undefined &&\n (prevWidthRef.current !== props.width || prevHeightRef.current !== props.height)\n ) {\n _fitParentContainer();\n }\n // Update refs with current values\n prevWidthRef.current = props.width;\n prevHeightRef.current = props.height;\n\n if (props.showYAxisLables) {\n const maxYAxisLabelLength = calculateMaxYAxisLabelLength(classes.yAxis!);\n if (startFromX !== maxYAxisLabelLength) {\n setStartFromX(maxYAxisLabelLength);\n }\n } else if (startFromX !== 0) {\n setStartFromX(0);\n }\n }, [props.width, props.height, props.chartType, props.showYAxisLables, props.yAxisType]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: chartContainer.current ?? null,\n }),\n [],\n );\n\n /**\n * Dedicated function to return the Callout JSX Element , which can further be used to only call this when\n * only the calloutprops and charthover props changes.\n * @param calloutProps\n * @param chartHoverProps\n * @returns\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _generateCallout(calloutProps: any): JSXElement {\n return <ChartPopover {...calloutProps} />;\n }\n\n function calculateMaxYAxisLabelLength(className: string): number {\n const formatTickLabel = (str: string) => {\n if (props.showYAxisLablesTooltip) {\n return truncateString(str, props.noOfCharsToTruncate || 4);\n }\n\n return str;\n };\n return calculateLongestLabelWidth(\n _yAxisTickText.current.map(label => formatTickLabel(label)),\n `.${className} text`,\n );\n }\n\n const {\n calloutProps,\n points,\n chartType,\n svgProps,\n culture,\n dateLocalizeOptions,\n timeFormatLocale,\n customDateTimeFormatter,\n } = props;\n if (props.parentRef) {\n _fitParentContainer();\n }\n\n margins = _calcMargins();\n // Callback for margins to the chart\n props.getmargins && props.getmargins(margins);\n\n let callout: JSXElement | null = null;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let yScalePrimary: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let yScaleSecondary: any;\n\n let children = null;\n if ((props.enableFirstRenderOptimization && chartContainer.current) || !props.enableFirstRenderOptimization) {\n _isFirstRender.current = false;\n const XAxisParams = {\n domainNRangeValues: props.getDomainNRangeValues(\n points,\n props.getDomainMargins ? props.getDomainMargins(containerWidth) : margins,\n containerWidth,\n chartType,\n _useRtl,\n props.xAxisType,\n props.barwidth!,\n props.tickValues!,\n ),\n // FIXME: In XAxisParams, containerHeight is used by HBWA to generate vertical gridlines.\n // Since the x-axis in HBWA is numeric, it typically doesn't require transformation.\n // However, if transformation props are enabled, the updated _removalValueForTextTuncate\n // will only be available in the next render, as it's set after the axis is created.\n // Solution: Delay the creation of gridlines until after the transformation has been applied,\n // or precompute the required height for transformed labels (_removalValueForTextTuncate).\n containerHeight: containerHeight - _removalValueForTextTuncate,\n margins,\n xAxisElement: xAxisElement.current!,\n showRoundOffXTickValues: props.showRoundOffXTickValues ?? true,\n xAxisCount: props.xAxisTickCount,\n xAxistickSize: props.xAxistickSize,\n tickPadding: props.tickPadding || props.showXAxisLablesTooltip ? 5 : 10,\n xAxisPadding: props.xAxisPadding,\n xAxisInnerPadding: props.xAxisInnerPadding,\n xAxisOuterPadding: props.xAxisOuterPadding,\n containerWidth,\n hideTickOverlap: props.rotateXAxisLables || props.xAxis?.tickLayout === 'auto' ? false : hideTickOverlap,\n calcMaxLabelWidth: _calcMaxLabelWidthWithTransform,\n xMinValue: props.xMinValue,\n xMaxValue: props.xMaxValue,\n ...props.xAxis,\n };\n\n /**\n * These scales used for 2 purposes.\n * 1. To create x and y axis\n * 2. To draw the graph.\n * For area/line chart using same scales. For other charts, creating their own scales to draw the graph.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let xScale: any;\n let tickValues: number[] | Date[] | string[];\n let tickLabels: string[];\n switch (props.xAxisType!) {\n case XAxisTypes.NumericAxis:\n ({ xScale, tickValues, tickLabels } = createNumericXAxis(\n XAxisParams,\n props.tickParams!,\n props.chartType,\n culture,\n props.xScaleType,\n _useRtl,\n ));\n break;\n case XAxisTypes.DateAxis:\n ({ xScale, tickValues, tickLabels } = createDateXAxis(\n XAxisParams,\n props.tickParams!,\n culture,\n dateLocalizeOptions,\n timeFormatLocale,\n customDateTimeFormatter,\n props.useUTC,\n props.chartType,\n ));\n break;\n case XAxisTypes.StringAxis:\n ({ xScale, tickValues, tickLabels } = createStringXAxis(\n XAxisParams,\n props.tickParams!,\n props.datasetForXAxisDomain!,\n culture,\n _useRtl,\n ));\n break;\n default:\n ({ xScale, tickValues, tickLabels } = createNumericXAxis(\n XAxisParams,\n props.tickParams!,\n props.chartType,\n culture,\n props.xScaleType,\n _useRtl,\n ));\n }\n _xScale = xScale;\n _tickLabels = tickLabels;\n\n if (props.xAxis?.tickLayout === 'auto') {\n _removalValueForTextTuncate = autoLayoutXAxisLabels(\n tickValues,\n _tickLabels,\n _xScale,\n xAxisElement.current,\n containerWidth,\n chartContainer.current,\n );\n } else {\n _transformXAxisLabels();\n }\n\n const YAxisParams = {\n margins: props.getYDomainMargins ? props.getYDomainMargins(containerHeight) : margins,\n containerWidth,\n containerHeight: containerHeight - _removalValueForTextTuncate,\n yAxisElement: yAxisElement.current!,\n yAxisTickFormat: props.yAxisTickFormat!,\n yAxisTickCount: props.yAxisTickCount!,\n yMinValue: props.yMinValue || 0,\n yMaxValue: props.yMaxValue || 0,\n tickPadding: 10,\n maxOfYVal: props.maxOfYVal,\n yMinMaxValues: props.getMinMaxOfYAxis(points, props.yAxisType),\n // please note these padding default values must be consistent in here\n // and the parent chart(HBWA/Vertical etc..) for more details refer example\n // http://using-d3js.com/04_07_ordinal_scales.html\n yAxisPadding: props.yAxisPadding || 0,\n tickValues: props.yAxisTickValues,\n ...props.yAxis,\n };\n /**\n * These scales used for 2 purposes.\n * 1. To create x and y axis\n * 2. To draw the graph.\n * For area/line chart using same scales. For other charts, creating their own scales to draw the graph.\n */\n const axisData: IAxisData = { yAxisDomainValues: [], yAxisTickText: [] };\n if (props.yAxisType && props.yAxisType === YAxisType.StringAxis) {\n yScalePrimary = props.createStringYAxis(\n YAxisParams,\n props.stringDatasetForYAxisDomain!,\n _useRtl,\n axisData,\n props.barwidth,\n props.chartType,\n );\n } else {\n // TODO: Since the scale domain values are now computed independently for both the primary and\n // secondary y-axes, the yMinValue and yMaxValue props are no longer necessary for accurately\n // rendering the secondary y-axis. Therefore, rather than checking the secondaryYScaleOptions\n // prop to determine whether to create a secondary y-axis, it's more appropriate to check if any\n // data points are assigned to use the secondary y-scale.\n if (props?.secondaryYScaleOptions) {\n const YAxisParamsSecondary = {\n margins,\n containerWidth,\n containerHeight: containerHeight - _removalValueForTextTuncate!,\n yAxisElement: yAxisElementSecondary.current,\n yAxisTickFormat: props.yAxisTickFormat!,\n yAxisTickCount: props.yAxisTickCount!,\n yMinValue: props.secondaryYScaleOptions?.yMinValue || 0,\n yMaxValue: props.secondaryYScaleOptions?.yMaxValue ?? 100,\n tickPadding: 10,\n yMinMaxValues: props.getMinMaxOfYAxis(points, props.yAxisType, true),\n yAxisPadding: props.yAxisPadding,\n };\n\n yScaleSecondary = props.createYAxis(\n YAxisParamsSecondary,\n _useRtl,\n axisData,\n isIntegralDataset,\n chartType,\n true,\n props.roundedTicks!,\n props.secondaryYScaleType,\n _useRtl,\n );\n }\n yScalePrimary = props.createYAxis(\n YAxisParams,\n _useRtl,\n axisData,\n isIntegralDataset,\n chartType,\n false,\n props.roundedTicks!,\n props.yScaleType,\n _useRtl,\n );\n }\n _yAxisTickText.current = axisData.yAxisTickText;\n props.getAxisData && props.getAxisData(axisData);\n\n // Removing previously created tooltips.\n try {\n // eslint-disable-next-line @nx/workspace-no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n // Used to display tooltip at x axis labels.\n if (props.showXAxisLablesTooltip || props.xAxis?.tickLayout === 'auto') {\n const _xAxisElement = xAxisElement.current ? d3Select(xAxisElement.current).call(xScale) : null;\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: _xAxisElement,\n container: chartContainer.current,\n };\n _xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n // Used to display tooltip at y axis labels.\n if (props.showYAxisLablesTooltip) {\n // To create y axis tick values by if specified truncating the rest of the text\n // and showing elipsis or showing the whole string,\n yScalePrimary &&\n createYAxisLabels(\n yAxisElement.current!,\n yScalePrimary,\n props.noOfCharsToTruncate || 4,\n props.showYAxisLablesTooltip || false,\n _useRtl,\n );\n\n const _yAxisElement = yAxisElement.current ? d3Select(yAxisElement.current).call(yScalePrimary) : null;\n const ytooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: _yAxisElement,\n container: chartContainer.current,\n };\n _yAxisElement && tooltipOfAxislabels(ytooltipProps);\n }\n\n // Call back to the chart.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _getData = (xScale: any, yScalePrimary: any, yScaleSecondary: any) => {\n props.getGraphData &&\n props.getGraphData(\n xScale,\n yScalePrimary,\n containerHeight - _removalValueForTextTuncate!,\n containerWidth,\n xAxisElement.current,\n yAxisElement.current,\n yScaleSecondary,\n );\n };\n\n // Callback function for chart, returns axis\n _getData(xScale, yScalePrimary, yScaleSecondary);\n\n children = props.children({\n xScale,\n yScalePrimary,\n yScaleSecondary,\n containerHeight,\n containerWidth,\n });\n\n if (!props.hideTooltip && calloutProps!.isPopoverOpen) {\n callout = _generateCallout(calloutProps);\n }\n }\n const svgDimensions = {\n width: containerWidth,\n height: containerHeight,\n };\n\n const plotWidth = Math.max(0, svgDimensions.width - margins.left! - margins.right!);\n const plotHeight = Math.max(0, svgDimensions.height - margins.top! - margins.bottom! - _removalValueForTextTuncate);\n\n const plotRect = {\n x: margins.left!,\n y: margins.top!,\n width: plotWidth,\n height: plotHeight,\n };\n\n const annotations = props.annotations ?? [];\n const hasAnnotations = annotations.length > 0;\n const annotationContext: ChartAnnotationContext | undefined = hasAnnotations\n ? {\n plotRect,\n svgRect: svgDimensions,\n isRtl: _useRtl,\n xScale: _xScale,\n yScalePrimary,\n yScaleSecondary,\n }\n : undefined;\n\n const xAxisTitleMaxWidth = svgDimensions.width - margins.left! - margins.right! - AXIS_TITLE_PADDING * 2;\n const yAxisTitleMaxHeight =\n svgDimensions.height - margins.bottom! - margins.top! - _removalValueForTextTuncate! - AXIS_TITLE_PADDING * 2;\n const yAxisTitleCenterY = margins.top! + AXIS_TITLE_PADDING + yAxisTitleMaxHeight / 2;\n const yAxisTitleCenterX = _useRtl\n ? svgDimensions.width - AXIS_TITLE_PADDING\n : HORIZONTAL_MARGIN_FOR_YAXIS_TITLE - AXIS_TITLE_PADDING;\n const secondaryYAxisTitleCenterX = _useRtl\n ? HORIZONTAL_MARGIN_FOR_YAXIS_TITLE - AXIS_TITLE_PADDING\n : svgDimensions.width - AXIS_TITLE_PADDING;\n\n const commonSvgToolTipProps: SVGTooltipTextProps = {\n wrapContent,\n showBackground: true,\n className: classes.svgTooltip,\n content: '',\n };\n /**\n * When screen resizes, along with screen, chart also auto adjusted.\n * This method used to adjust height and width of the charts.\n */\n function _fitParentContainer(): void {\n //_reqID = requestAnimationFrame(() => {\n let legendContainerHeight;\n if (props.hideLegend) {\n // If there is no legend, need not to allocate some space from total chart space.\n legendContainerHeight = 0;\n } else {\n const legendContainerComputedStyles = legendContainer && getComputedStyle(legendContainer);\n legendContainerHeight =\n ((legendContainer && legendContainer.getBoundingClientRect().height) || minLegendContainerHeight) +\n parseFloat((legendContainerComputedStyles && legendContainerComputedStyles.marginTop) || '0') +\n parseFloat((legendContainerComputedStyles && legendContainerComputedStyles.marginBottom) || '0');\n }\n if (props.parentRef || chartContainer.current) {\n const container = props.parentRef ? props.parentRef : chartContainer.current!;\n const currentContainerWidth =\n props.reflowProps?.mode === 'min-width' && !_isFirstRender.current\n ? Math.max(container.getBoundingClientRect().width, _calculateChartMinWidth())\n : container.getBoundingClientRect().width;\n const currentContainerHeight =\n container.getBoundingClientRect().height > legendContainerHeight\n ? container.getBoundingClientRect().height\n : 350;\n const shouldResize =\n containerWidth !== currentContainerWidth || containerHeight !== currentContainerHeight - legendContainerHeight;\n if (shouldResize) {\n setContainerWidth(currentContainerWidth);\n setContainerHeight(currentContainerHeight - legendContainerHeight);\n }\n }\n //});\n }\n\n function _onChartLeave(): void {\n props.onChartMouseLeave && props.onChartMouseLeave();\n }\n\n function _onChartBlur(event: React.FocusEvent<HTMLDivElement>): void {\n if (!event.relatedTarget || !event.currentTarget.contains(event.relatedTarget as Node)) {\n props.onChartBlur && props.onChartBlur();\n }\n }\n\n function _calculateChartMinWidth(): number {\n // Adding 10px for padding on both sides\n const labelWidth = _calcMaxLabelWidthWithTransform(_tickLabels) + 10;\n\n let minChartWidth = margins.left! + margins.right! + labelWidth * (_tickLabels.length - 1);\n\n if (\n [ChartTypes.GroupedVerticalBarChart, ChartTypes.VerticalBarChart, ChartTypes.VerticalStackedBarChart].includes(\n props.chartType,\n )\n ) {\n const minDomainMargin = 8;\n minChartWidth += minDomainMargin * 2;\n }\n\n return minChartWidth;\n }\n\n function _getChartDescription(): string {\n return (\n (props.chartTitle || 'Chart. ') +\n _getAxisTitle('X', props.xAxisTitle, props.xAxisType) +\n _getAxisTitle('Y', props.yAxisTitle, props.yAxisType || YAxisType.NumericAxis) +\n (props.secondaryYScaleOptions\n ? _getAxisTitle('secondary Y', props.secondaryYAxistitle, YAxisType.NumericAxis)\n : '')\n );\n }\n\n function _getAxisTitle(axisLabel: string, axisTitle: string | undefined, axisType: XAxisTypes | YAxisType): string {\n return (\n `The ${axisLabel} axis displays ` +\n (axisTitle ||\n (axisType === XAxisTypes.StringAxis || axisType === YAxisType.StringAxis\n ? 'categories'\n : axisType === XAxisTypes.DateAxis || axisType === YAxisType.DateAxis\n ? 'time'\n : 'values')) +\n '. '\n );\n }\n\n function _calcMaxLabelWidthWithTransform(x: (string | number)[]) {\n // Case: rotated labels\n if (!props.wrapXAxisLables && props.rotateXAxisLables && props.xAxisType! === XAxisTypes.StringAxis) {\n const longestLabelWidth = calculateLongestLabelWidth(x, `.${classes.xAxis} text`);\n return Math.ceil(longestLabelWidth * Math.cos(Math.PI / 4));\n }\n\n // Case: truncated labels\n if (props.showXAxisLablesTooltip) {\n const tickLabels = x.map(val => {\n const numChars = props.noOfCharsToTruncate || 4;\n return val.toString().length > numChars ? `${val.toString().slice(0, numChars)}...` : val;\n });\n\n const longestLabelWidth = calculateLongestLabelWidth(tickLabels, `.${classes.xAxis} text`);\n return Math.ceil(longestLabelWidth);\n }\n\n // Case: wrapped labels\n if (props.wrapXAxisLables) {\n // FIXME: Calculate the max width of lines instead of words. This requires applying\n // the wrapping transformation earlier to obtain the actual rendered lines.\n const words: string[] = [];\n x.forEach((val: string) => {\n words.push(...val.toString().split(/\\s+/));\n });\n\n // This approach works well in most cases, since overflow typically occurs only when\n // a single word exceeds the specified width — otherwise, the text will wrap as expected.\n const longestLabelWidth = calculateLongestLabelWidth(words, `.${classes.xAxis} text`);\n return Math.max(Math.ceil(longestLabelWidth), DEFAULT_WRAP_WIDTH);\n }\n\n // Default case\n const longestLabelWidth = calculateLongestLabelWidth(x, `.${classes.xAxis} text`);\n return Math.ceil(longestLabelWidth);\n }\n\n function _transformXAxisLabels() {\n _removalValueForTextTuncate = 0;\n\n /*\n * To enable wrapping of x axis tick values or to display complete x axis tick values,\n * we need to calculate how much space it needed to render the text.\n * No need to re-calculate every time the chart renders and same time need to get an update. So using setState.\n * Required space will be calculated first time chart rendering and if any width/height of chart updated.\n * */\n if (props.wrapXAxisLables || props.showXAxisLablesTooltip) {\n let maxXAxisLabelWidth: number | undefined;\n if (props.xAxisType === XAxisTypes.StringAxis) {\n if ((props.datasetForXAxisDomain?.length || 0) > 1) {\n maxXAxisLabelWidth = _xScale.step();\n } else {\n maxXAxisLabelWidth = containerWidth;\n }\n }\n\n const wrapLabelProps = {\n node: xAxisElement.current!,\n xAxis: _xScale,\n showXAxisLablesTooltip: props.showXAxisLablesTooltip || false,\n noOfCharsToTruncate: props.noOfCharsToTruncate || 4,\n width: maxXAxisLabelWidth,\n container: chartContainer.current,\n };\n _removalValueForTextTuncate = createWrapOfXLabels(wrapLabelProps) ?? 0;\n }\n\n if (!props.wrapXAxisLables && props.rotateXAxisLables && props.xAxisType! === XAxisTypes.StringAxis) {\n const rotateLabelProps = {\n node: xAxisElement.current!,\n xAxis: _xScale,\n };\n const rotatedHeight = rotateXAxisLabels(rotateLabelProps) ?? 0;\n // margins.bottom is used as padding here\n _removalValueForTextTuncate = rotatedHeight + margins.bottom!;\n }\n }\n\n function _calcMargins(): IMargins {\n let _margins = _getDefaultMargins();\n\n _margins = _applyTitleMargins(_margins);\n _margins = _applyAnnotationMargins(_margins);\n\n if (_useRtl) {\n _margins = _swapRtlMargins(_margins);\n }\n\n return {\n ..._margins,\n ...props.margins,\n };\n }\n\n function _getDefaultMargins(): IMargins {\n return {\n top: DEFAULT_MARGIN_NO_TICKS,\n // Smaller than the default because it is based on the line height rather than\n // the length of the tick labels.\n bottom: DEFAULT_MARGIN_WITH_TICKS - 5,\n // For the actual margin, add the tick size, tick padding, and some extra space to\n // the width of the longest yaxis tick label (startFromX).\n left: Math.max(DEFAULT_MARGIN_WITH_TICKS, startFromX + 20),\n right: props.secondaryYScaleOptions ? DEFAULT_MARGIN_WITH_TICKS : DEFAULT_MARGIN_NO_TICKS,\n };\n }\n\n function _applyTitleMargins(_margins: IMargins): IMargins {\n const updated = { ..._margins };\n if (props.xAxisTitle !== undefined && props.xAxisTitle !== '') {\n updated.bottom! += VERTICAL_MARGIN_FOR_XAXIS_TITLE;\n }\n if (props.yAxisTitle !== undefined && props.yAxisTitle !== '') {\n updated.left! += HORIZONTAL_MARGIN_FOR_YAXIS_TITLE;\n }\n if (props.secondaryYAxistitle !== undefined && props.secondaryYAxistitle !== '') {\n updated.right! += HORIZONTAL_MARGIN_FOR_YAXIS_TITLE;\n }\n return updated;\n }\n\n function _applyAnnotationMargins(_margins: IMargins): IMargins {\n const updated = { ..._margins };\n if (props.xAxisAnnotation !== undefined && props.xAxisAnnotation !== '') {\n updated.top! += VERTICAL_MARGIN_FOR_XAXIS_TITLE;\n }\n if (\n props.yAxisAnnotation !== undefined &&\n props.yAxisAnnotation !== '' &&\n (props.secondaryYAxistitle === undefined || props.secondaryYAxistitle === '')\n ) {\n updated.right! += HORIZONTAL_MARGIN_FOR_YAXIS_TITLE;\n }\n return updated;\n }\n\n function _swapRtlMargins(_margins: IMargins): IMargins {\n return {\n ..._margins,\n left: _margins.right,\n right: _margins.left,\n };\n }\n\n /**\n * We have use the {@link defaultTabbableElement } to fix\n * the Focus not landing on chart while tabbing, instead goes to legend.\n * This issue is observed in Area, line chart after performance optimization done in the PR {@link https://github.com/microsoft/fluentui/pull/27721 }\n * This issue is observed in Bar charts after the changes done by FocusZone team in the PR: {@link https://github.com/microsoft/fluentui/pull/24175 }\n * The issue in Bar Charts(VB and VSB) is due to a {@link FocusZone } update where previously an event listener was\n * attached on keydown to the window, so that whenever the tab key is pressed all outer FocusZone's\n * tab-indexes are updated (an outer FocusZone is a FocusZone that is not within another one).\n * But now after the above PR : they are attaching the\n * listeners to the FocusZone elements instead of the window. So in the first render cycle in Bar charts\n * bars are not created as in the first render cycle the size of the chart container is not known( or is 0)\n * which creates bars of height 0 so instead we do not create any bars and instead return empty fragments.\n *\n * We have tried 2 Approaches to fix the issue:\n * 1. Using the {@link elementRef} property of FocusZone where we dispatch event for tab keydown\n * after the second render cycle which triggers an update of the tab index in FocusZone.\n * But this is a hacky solution and not a proper fix and also elementRef is deprecated.\n * 2. Using the default tabbable element to fix the issue.\n */\n\n return (\n <div\n id={idForGraph}\n className={classes.root}\n role={'presentation'}\n ref={(rootElem: HTMLDivElement) => {\n chartContainer.current = rootElem;\n }}\n onBlur={_onChartBlur}\n onMouseLeave={_onChartLeave}\n >\n <div className={classes.chartWrapper} {...focusAttributes} {...arrowAttributes}>\n {_isFirstRender.current}\n <svg\n width={svgDimensions.width}\n height={svgDimensions.height}\n role=\"region\"\n aria-label={_getChartDescription()}\n style={{ display: 'block' }}\n className={classes.chart}\n {...getSecureProps(svgProps)}\n >\n <g\n ref={(e: SVGSVGElement | null) => {\n xAxisElement.current = e!;\n }}\n id={`xAxisGElement${idForGraph}`}\n // To add wrap of x axis lables feature, need to remove word height from svg height.\n transform={`translate(0, ${svgDimensions.height - margins.bottom! - _removalValueForTextTuncate!})`}\n className={classes.xAxis}\n />\n {props.xAxisTitle !== undefined && props.xAxisTitle !== '' && (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.xAxisTitle}\n textProps={{\n x: margins.left! + AXIS_TITLE_PADDING + xAxisTitleMaxWidth / 2,\n y: svgDimensions.height - AXIS_TITLE_PADDING,\n className: classes.axisTitle!,\n textAnchor: 'middle',\n }}\n maxWidth={xAxisTitleMaxWidth}\n />\n )}\n {props.xAxisAnnotation !== undefined &&\n props.xAxisAnnotation !== '' &&\n (() => {\n const { titleFont, titleXAnchor, titleYAnchor, titlePad } = props.titleStyles ?? {};\n const fontSize = typeof titleFont?.size === 'number' ? titleFont.size : 13;\n const padL = titlePad?.l ?? 0;\n const padR = titlePad?.r ?? 0;\n const padT = titlePad?.t ?? 0;\n const padB = titlePad?.b ?? 0;\n\n const xPos =\n (titleXAnchor === 'left'\n ? margins.left! + AXIS_TITLE_PADDING\n : titleXAnchor === 'right'\n ? margins.left! + AXIS_TITLE_PADDING + xAxisTitleMaxWidth\n : margins.left! + AXIS_TITLE_PADDING + xAxisTitleMaxWidth / 2) +\n padL -\n padR;\n\n const yPos =\n Math.max(fontSize + AXIS_TITLE_PADDING, VERTICAL_MARGIN_FOR_XAXIS_TITLE - AXIS_TITLE_PADDING) +\n padT -\n padB;\n\n const textAnchor = titleXAnchor === 'left' ? 'start' : titleXAnchor === 'right' ? 'end' : 'middle';\n\n const dominantBaseline =\n titleYAnchor === 'top'\n ? 'hanging'\n : titleYAnchor === 'bottom'\n ? 'alphabetic'\n : titleYAnchor === 'middle'\n ? 'central'\n : 'auto';\n\n return (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.xAxisAnnotation}\n textProps={{\n x: xPos,\n y: yPos,\n className: classes.axisAnnotation!,\n textAnchor,\n dominantBaseline,\n 'aria-hidden': true,\n style: getChartTitleInlineStyles(titleFont),\n }}\n maxWidth={xAxisTitleMaxWidth}\n />\n );\n })()}\n <g\n ref={(e: SVGSVGElement | null) => {\n yAxisElement.current = e!;\n }}\n id={`yAxisGElement${idForGraph}`}\n transform={`translate(${_useRtl ? svgDimensions.width - margins.right! : margins.left!}, 0)`}\n className={classes.yAxis}\n />\n {props.secondaryYScaleOptions && (\n <g>\n <g\n ref={(e: SVGSVGElement | null) => {\n yAxisElementSecondary.current = e!;\n }}\n id={`yAxisGElementSecondary${idForGraph}`}\n transform={`translate(${_useRtl ? margins.left! : svgDimensions.width - margins.right!}, 0)`}\n className={classes.yAxis}\n />\n {props.secondaryYAxistitle !== undefined && props.secondaryYAxistitle !== '' && (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.secondaryYAxistitle}\n textProps={{\n x: secondaryYAxisTitleCenterX,\n y: yAxisTitleCenterY,\n textAnchor: 'middle',\n transform: `rotate(-90, ${secondaryYAxisTitleCenterX}, ${yAxisTitleCenterY})`,\n className: classes.axisTitle!,\n }}\n maxWidth={yAxisTitleMaxHeight}\n />\n )}\n </g>\n )}\n {children}\n {props.yAxisTitle !== undefined && props.yAxisTitle !== '' && (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.yAxisTitle}\n textProps={{\n x: yAxisTitleCenterX,\n y: yAxisTitleCenterY,\n textAnchor: 'middle',\n transform: `rotate(-90, ${yAxisTitleCenterX}, ${yAxisTitleCenterY})`,\n className: classes.axisTitle!,\n }}\n maxWidth={yAxisTitleMaxHeight}\n />\n )}\n {props.yAxisAnnotation !== undefined &&\n props.yAxisAnnotation !== '' &&\n (props.secondaryYAxistitle === undefined || props.secondaryYAxistitle === '') && (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.yAxisAnnotation}\n textProps={{\n x: secondaryYAxisTitleCenterX,\n y: yAxisTitleCenterY,\n textAnchor: 'middle',\n transform: `rotate(-90, ${secondaryYAxisTitleCenterX}, ${yAxisTitleCenterY})`,\n className: classes.axisAnnotation!,\n 'aria-hidden': true,\n }}\n maxWidth={yAxisTitleMaxHeight}\n />\n )}\n </svg>\n {hasAnnotations && annotationContext && (\n <ChartAnnotationLayer\n annotations={annotations}\n context={annotationContext}\n className={classes.annotationLayer}\n />\n )}\n </div>\n\n {!props.hideLegend && (\n <div\n ref={(e: HTMLDivElement) => {\n legendContainer = e;\n }}\n className={classes.legendContainer}\n >\n {props.legendBars}\n </div>\n )}\n {/** The callout is used for narration, so keep it mounted on the DOM */}\n {callout && <React.Suspense fallback={<div>Loading...</div>}>{callout}</React.Suspense>}\n </div>\n );\n});\nCartesianChart.displayName = 'CartesianChart';\n"],"names":["React","useCartesianChartStyles","select","d3Select","createNumericXAxis","createStringXAxis","createDateXAxis","XAxisTypes","YAxisType","createWrapOfXLabels","rotateXAxisLabels","calculateLongestLabelWidth","createYAxisLabels","ChartTypes","wrapContent","useRtl","truncateString","tooltipOfAxislabels","getSecureProps","DEFAULT_WRAP_WIDTH","autoLayoutXAxisLabels","getChartTitleInlineStyles","useId","SVGTooltipText","ChartAnnotationLayer","ChartPopover","useFocusableGroup","useArrowNavigationGroup","HORIZONTAL_MARGIN_FOR_YAXIS_TITLE","VERTICAL_MARGIN_FOR_XAXIS_TITLE","AXIS_TITLE_PADDING","DEFAULT_MARGIN_WITH_TICKS","DEFAULT_MARGIN_NO_TICKS","CartesianChart","forwardRef","hideTickOverlap","props","forwardedRef","chartContainer","useRef","legendContainer","minLegendContainerHeight","xAxisElement","yAxisElement","yAxisElementSecondary","margins","idForGraph","_reqID","_useRtl","_tickLabels","_isFirstRender","_xScale","isIntegralDataset","useMemo","points","some","point","y","_tooltipId","_removalValueForTextTuncate","_yAxisTickText","containerWidth","setContainerWidth","useState","containerHeight","setContainerHeight","startFromX","setStartFromX","prevWidthRef","undefined","prevHeightRef","classes","focusAttributes","arrowAttributes","circular","axis","useEffect","_fitParentContainer","showYAxisLables","maxYAxisLabelLength","calculateMaxYAxisLabelLength","yAxis","cancelAnimationFrame","current","width","height","chartType","yAxisType","useImperativeHandle","componentRef","_generateCallout","calloutProps","className","formatTickLabel","str","showYAxisLablesTooltip","noOfCharsToTruncate","map","label","svgProps","culture","dateLocalizeOptions","timeFormatLocale","customDateTimeFormatter","parentRef","_calcMargins","getmargins","callout","yScalePrimary","yScaleSecondary","children","enableFirstRenderOptimization","XAxisParams","domainNRangeValues","getDomainNRangeValues","getDomainMargins","xAxisType","barwidth","tickValues","showRoundOffXTickValues","xAxisCount","xAxisTickCount","xAxistickSize","tickPadding","showXAxisLablesTooltip","xAxisPadding","xAxisInnerPadding","xAxisOuterPadding","rotateXAxisLables","xAxis","tickLayout","calcMaxLabelWidth","_calcMaxLabelWidthWithTransform","xMinValue","xMaxValue","xScale","tickLabels","NumericAxis","tickParams","xScaleType","DateAxis","useUTC","StringAxis","datasetForXAxisDomain","_transformXAxisLabels","YAxisParams","getYDomainMargins","yAxisTickFormat","yAxisTickCount","yMinValue","yMaxValue","maxOfYVal","yMinMaxValues","getMinMaxOfYAxis","yAxisPadding","yAxisTickValues","axisData","yAxisDomainValues","yAxisTickText","createStringYAxis","stringDatasetForYAxisDomain","secondaryYScaleOptions","YAxisParamsSecondary","createYAxis","roundedTicks","secondaryYScaleType","yScaleType","getAxisData","document","getElementById","remove","e","_xAxisElement","call","tooltipProps","tooltipCls","tooltip","id","container","_yAxisElement","ytooltipProps","_getData","getGraphData","hideTooltip","isPopoverOpen","svgDimensions","plotWidth","Math","max","left","right","plotHeight","top","bottom","plotRect","x","annotations","hasAnnotations","length","annotationContext","svgRect","isRtl","xAxisTitleMaxWidth","yAxisTitleMaxHeight","yAxisTitleCenterY","yAxisTitleCenterX","secondaryYAxisTitleCenterX","commonSvgToolTipProps","showBackground","svgTooltip","content","legendContainerHeight","hideLegend","legendContainerComputedStyles","getComputedStyle","getBoundingClientRect","parseFloat","marginTop","marginBottom","currentContainerWidth","reflowProps","mode","_calculateChartMinWidth","currentContainerHeight","shouldResize","_onChartLeave","onChartMouseLeave","_onChartBlur","event","relatedTarget","currentTarget","contains","onChartBlur","labelWidth","minChartWidth","GroupedVerticalBarChart","VerticalBarChart","VerticalStackedBarChart","includes","minDomainMargin","_getChartDescription","chartTitle","_getAxisTitle","xAxisTitle","yAxisTitle","secondaryYAxistitle","axisLabel","axisTitle","axisType","wrapXAxisLables","longestLabelWidth","ceil","cos","PI","val","numChars","toString","slice","words","forEach","push","split","maxXAxisLabelWidth","step","wrapLabelProps","node","rotateLabelProps","rotatedHeight","_margins","_getDefaultMargins","_applyTitleMargins","_applyAnnotationMargins","_swapRtlMargins","updated","xAxisAnnotation","yAxisAnnotation","div","root","role","ref","rootElem","onBlur","onMouseLeave","chartWrapper","svg","aria-label","style","display","chart","g","transform","textProps","textAnchor","maxWidth","titleFont","titleXAnchor","titleYAnchor","titlePad","titleStyles","fontSize","size","padL","l","padR","r","padT","t","padB","b","xPos","yPos","dominantBaseline","axisAnnotation","context","annotationLayer","legendBars","Suspense","fallback","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B,SAASC,uBAAuB,QAAQ,sCAAmC;AAC3E,SAASC,UAAUC,QAAQ,QAAQ,eAAe;AAElD,SACEC,kBAAkB,EAClBC,iBAAiB,EACjBC,eAAe,EACfC,UAAU,EACVC,SAAS,EACTC,mBAAmB,EACnBC,iBAAiB,EACjBC,0BAA0B,EAC1BC,iBAAiB,EACjBC,UAAU,EACVC,WAAW,EACXC,MAAM,EACNC,cAAc,EACdC,mBAAmB,EACnBC,cAAc,EACdC,kBAAkB,EAClBC,qBAAqB,EACrBC,yBAAyB,QACpB,2BAAwB;AAC/B,SAASC,KAAK,QAAQ,4BAA4B;AAGlD,SAASC,cAAc,QAAQ,oCAAiC;AAChE,SAASC,oBAAoB,QAAQ,wCAAqC;AAE1E,SAASC,YAAY,QAAQ,oBAAiB;AAC9C,SAASC,iBAAiB,EAAEC,uBAAuB,QAAQ,0BAA0B;AAErF,MAAMC,oCAAoC;AAC1C,MAAMC,kCAAkC;AACxC,MAAMC,qBAAqB;AAC3B,MAAMC,4BAA4B;AAClC,MAAMC,0BAA0B;AAEhC;;;CAGC,GACD,OAAO,MAAMC,+BAAuEjC,MAAMkC,UAAU,CAGlG,CAAC,EAAEC,kBAAkB,IAAI,EAAE,GAAGC,OAAO,EAAEC;QA4ZnBD;IA3ZpB,MAAME,iBAAiBtC,MAAMuC,MAAM,CAAwB;IAC3D,IAAIC;IACJ,MAAMC,2BAAmC;IACzC,MAAMC,eAAe1C,MAAMuC,MAAM,CAAuB;IACxD,MAAMI,eAAe3C,MAAMuC,MAAM,CAAuB;IACxD,MA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