@fluentui/react-charts 9.0.2 → 9.0.4

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 (229) hide show
  1. package/CHANGELOG.md +64 -7
  2. package/dist/index.d.ts +829 -94
  3. package/lib/AreaChart.js +1 -0
  4. package/lib/AreaChart.js.map +1 -0
  5. package/lib/HeatMapChart.js +1 -0
  6. package/lib/HeatMapChart.js.map +1 -0
  7. package/lib/HorizontalBarChartWithAxis.js +1 -0
  8. package/lib/HorizontalBarChartWithAxis.js.map +1 -0
  9. package/lib/SankeyChart.js +1 -0
  10. package/lib/SankeyChart.js.map +1 -0
  11. package/lib/VerticalStackedBarChart.js +1 -0
  12. package/lib/VerticalStackedBarChart.js.map +1 -0
  13. package/lib/components/AreaChart/AreaChart.js +775 -0
  14. package/lib/components/AreaChart/AreaChart.js.map +1 -0
  15. package/lib/components/AreaChart/AreaChart.types.js +4 -0
  16. package/lib/components/AreaChart/AreaChart.types.js.map +1 -0
  17. package/lib/components/AreaChart/index.js +3 -0
  18. package/lib/components/AreaChart/index.js.map +1 -0
  19. package/lib/components/AreaChart/useAreaChartStyles.styles.js +55 -0
  20. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -0
  21. package/lib/components/CommonComponents/CartesianChart.js +30 -14
  22. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  23. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  24. package/lib/components/CommonComponents/ChartPopover.js +2 -2
  25. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  26. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +7 -123
  27. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  28. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +11 -22
  29. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  30. package/lib/components/DeclarativeChart/DeclarativeChart.js +112 -65
  31. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  32. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +570 -159
  33. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  34. package/lib/components/DonutChart/Arc/Arc.js +1 -1
  35. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  36. package/lib/components/DonutChart/DonutChart.js +1 -1
  37. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  38. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +2 -6
  39. package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
  40. package/lib/components/GaugeChart/GaugeChart.js +4 -1
  41. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  42. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  43. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +13 -9
  44. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  45. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +9 -0
  46. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  47. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +0 -9
  48. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  49. package/lib/components/HeatMapChart/HeatMapChart.js +588 -0
  50. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -0
  51. package/lib/components/HeatMapChart/HeatMapChart.types.js +4 -0
  52. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -0
  53. package/lib/components/HeatMapChart/index.js +3 -0
  54. package/lib/components/HeatMapChart/index.js.map +1 -0
  55. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +37 -0
  56. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -0
  57. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +2 -9
  58. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  59. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +571 -0
  60. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -0
  61. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +4 -0
  62. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -0
  63. package/lib/components/HorizontalBarChartWithAxis/index.js +3 -0
  64. package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -0
  65. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +67 -0
  66. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -0
  67. package/lib/components/Legends/Legends.js +38 -37
  68. package/lib/components/Legends/Legends.js.map +1 -1
  69. package/lib/components/Legends/useLegendsStyles.styles.js +2 -3
  70. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  71. package/lib/components/LineChart/LineChart.js +43 -35
  72. package/lib/components/LineChart/LineChart.js.map +1 -1
  73. package/lib/components/LineChart/useLineChartStyles.styles.js +1 -10
  74. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  75. package/lib/components/SankeyChart/SankeyChart.js +1023 -0
  76. package/lib/components/SankeyChart/SankeyChart.js.map +1 -0
  77. package/lib/components/SankeyChart/SankeyChart.types.js +3 -0
  78. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -0
  79. package/lib/components/SankeyChart/index.js +3 -0
  80. package/lib/components/SankeyChart/index.js.map +1 -0
  81. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +109 -0
  82. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -0
  83. package/lib/components/ScatterChart/ScatterChart.js +46 -59
  84. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  85. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +1 -10
  86. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  87. package/lib/components/VerticalBarChart/VerticalBarChart.js +165 -88
  88. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  89. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  90. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +3 -11
  91. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  92. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +904 -0
  93. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -0
  94. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +1 -0
  95. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -0
  96. package/lib/components/VerticalStackedBarChart/index.js +3 -0
  97. package/lib/components/VerticalStackedBarChart/index.js.map +1 -0
  98. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +65 -0
  99. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -0
  100. package/lib/index.js +5 -0
  101. package/lib/index.js.map +1 -1
  102. package/lib/types/DataPoint.js +1 -3
  103. package/lib/types/DataPoint.js.map +1 -1
  104. package/lib/utilities/SVGTooltipText.js +49 -4
  105. package/lib/utilities/SVGTooltipText.js.map +1 -1
  106. package/lib/utilities/colors.js +20 -0
  107. package/lib/utilities/colors.js.map +1 -1
  108. package/lib/utilities/string.js +32 -0
  109. package/lib/utilities/string.js.map +1 -0
  110. package/lib/utilities/test-data.js +53 -0
  111. package/lib/utilities/test-data.js.map +1 -1
  112. package/lib/utilities/utilities.js +90 -18
  113. package/lib/utilities/utilities.js.map +1 -1
  114. package/lib-commonjs/AreaChart.js +6 -0
  115. package/lib-commonjs/AreaChart.js.map +1 -0
  116. package/lib-commonjs/HeatMapChart.js +6 -0
  117. package/lib-commonjs/HeatMapChart.js.map +1 -0
  118. package/lib-commonjs/HorizontalBarChartWithAxis.js +6 -0
  119. package/lib-commonjs/HorizontalBarChartWithAxis.js.map +1 -0
  120. package/lib-commonjs/SankeyChart.js +6 -0
  121. package/lib-commonjs/SankeyChart.js.map +1 -0
  122. package/lib-commonjs/VerticalStackedBarChart.js +6 -0
  123. package/lib-commonjs/VerticalStackedBarChart.js.map +1 -0
  124. package/lib-commonjs/components/AreaChart/AreaChart.js +781 -0
  125. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -0
  126. package/lib-commonjs/components/AreaChart/AreaChart.types.js +7 -0
  127. package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +1 -0
  128. package/lib-commonjs/components/AreaChart/index.js +8 -0
  129. package/lib-commonjs/components/AreaChart/index.js.map +1 -0
  130. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +95 -0
  131. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -0
  132. package/lib-commonjs/components/CommonComponents/CartesianChart.js +29 -14
  133. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  134. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  135. package/lib-commonjs/components/CommonComponents/ChartPopover.js +2 -2
  136. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
  137. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +8 -198
  138. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  139. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +12 -37
  140. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  141. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +120 -73
  142. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  143. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +592 -178
  144. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  145. package/lib-commonjs/components/DonutChart/Arc/Arc.js +1 -1
  146. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  147. package/lib-commonjs/components/DonutChart/DonutChart.js +1 -1
  148. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  149. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +3 -10
  150. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
  151. package/lib-commonjs/components/GaugeChart/GaugeChart.js +4 -1
  152. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  153. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  154. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +14 -8
  155. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  156. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +9 -0
  157. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  158. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +0 -9
  159. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  160. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +599 -0
  161. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -0
  162. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js +7 -0
  163. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -0
  164. package/lib-commonjs/components/HeatMapChart/index.js +8 -0
  165. package/lib-commonjs/components/HeatMapChart/index.js.map +1 -0
  166. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +59 -0
  167. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -0
  168. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +2 -16
  169. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  170. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +580 -0
  171. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -0
  172. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +7 -0
  173. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -0
  174. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js +8 -0
  175. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +1 -0
  176. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +107 -0
  177. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -0
  178. package/lib-commonjs/components/Legends/Legends.js +37 -37
  179. package/lib-commonjs/components/Legends/Legends.js.map +1 -1
  180. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +2 -2
  181. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
  182. package/lib-commonjs/components/LineChart/LineChart.js +41 -33
  183. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  184. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +1 -10
  185. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  186. package/lib-commonjs/components/SankeyChart/SankeyChart.js +1039 -0
  187. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -0
  188. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js +6 -0
  189. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -0
  190. package/lib-commonjs/components/SankeyChart/index.js +8 -0
  191. package/lib-commonjs/components/SankeyChart/index.js.map +1 -0
  192. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +179 -0
  193. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -0
  194. package/lib-commonjs/components/ScatterChart/ScatterChart.js +45 -58
  195. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  196. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +1 -10
  197. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  198. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +164 -87
  199. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  200. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  201. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +4 -11
  202. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  203. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +915 -0
  204. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -0
  205. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +6 -0
  206. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -0
  207. package/lib-commonjs/components/VerticalStackedBarChart/index.js +8 -0
  208. package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +1 -0
  209. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +113 -0
  210. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -0
  211. package/lib-commonjs/index.js +5 -0
  212. package/lib-commonjs/index.js.map +1 -1
  213. package/lib-commonjs/types/DataPoint.js +1 -3
  214. package/lib-commonjs/types/DataPoint.js.map +1 -1
  215. package/lib-commonjs/utilities/SVGTooltipText.js +49 -4
  216. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  217. package/lib-commonjs/utilities/colors.js +23 -0
  218. package/lib-commonjs/utilities/colors.js.map +1 -1
  219. package/lib-commonjs/utilities/string.js +29 -0
  220. package/lib-commonjs/utilities/string.js.map +1 -0
  221. package/lib-commonjs/utilities/test-data.js +59 -0
  222. package/lib-commonjs/utilities/test-data.js.map +1 -1
  223. package/lib-commonjs/utilities/utilities.js +94 -17
  224. package/lib-commonjs/utilities/utilities.js.map +1 -1
  225. package/package.json +11 -8
  226. package/lib/components/DeclarativeChart/PlotlySchema.js +0 -7
  227. package/lib/components/DeclarativeChart/PlotlySchema.js.map +0 -1
  228. package/lib-commonjs/components/DeclarativeChart/PlotlySchema.js +0 -10
  229. package/lib-commonjs/components/DeclarativeChart/PlotlySchema.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AreaChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAreaChartStyles } from './useAreaChartStyles.styles';\nimport { max as d3Max, bisector } from 'd3-array';\nimport { pointer } from 'd3-selection';\nimport { select as d3Select } from 'd3-selection';\nimport { tokens } from '@fluentui/react-theme';\nimport { area as d3Area, stack as d3Stack, curveMonotoneX as d3CurveBasis, line as d3Line } from 'd3-shape';\nimport {\n AccessibilityProps,\n CartesianChart,\n CustomizedCalloutData,\n AreaChartProps,\n LineChartDataPoint,\n LineChartPoints,\n ChildProps,\n Margins,\n YValueHover,\n ChartPopoverProps,\n Chart,\n} from '../../index';\nimport {\n calloutData,\n getXAxisType,\n ChartTypes,\n XAxisTypes,\n getTypeOfAxis,\n tooltipOfXAxislabels,\n getNextColor,\n getColorFromToken,\n formatDate,\n getSecureProps,\n areArraysEqual,\n getCurveFactory,\n find,\n} from '../../utilities/index';\nimport { useId } from '@fluentui/react-utilities';\nimport { Legend, Legends } from '../Legends/index';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst bisect = bisector((d: any) => d.x).left;\n\nenum InterceptVisibility {\n show = 'visibility',\n hide = 'hidden',\n}\n\nexport interface AreaChartAreaPoint {\n xVal: string | number;\n values: AreaChartDataSetPoint;\n}\nexport interface AreaChartDataSetPoint {\n [key: string]: number | string | number[];\n}\nexport interface DPointType {\n values: { 0: number; 1: number; data: {} };\n xVal: number | Date;\n}\nexport interface MapXToDataSet {\n [key: string]: LineChartDataPoint[];\n [key: number]: LineChartDataPoint[];\n}\n\n//by default d3-shape 3.2.0 limits the< path> data point precision to 3 digits(d3/d3-path#10)\n\nexport const AreaChart: React.FunctionComponent<AreaChartProps> = React.forwardRef<HTMLDivElement, AreaChartProps>(\n (props, forwardedRef) => {\n const _uniqueIdForGraph: string = useId('areaChart_');\n const _verticalLineId: string = useId('verticalLine_');\n const _circleId: string = useId('circle');\n const _rectId: string = useId('rectangle');\n const _tooltipId: string = useId('AreaChartTooltipID');\n //enableComputationOptimization is used for optimized code to group data points by x value\n //from O(n^2) to O(n) using a map.\n const _enableComputationOptimization: boolean = true;\n const _firstRenderOptimization: boolean = true;\n const _emptyChartId: string = useId('_AreaChart_empty');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _calloutPoints: any;\n let _createSet: (data: LineChartPoints[]) => {\n colors: string[];\n opacity: number[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n calloutPoints: any;\n };\n let _colors: string[];\n let _opacity: number[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _data: any;\n let _chart: JSX.Element[];\n let _margins: Margins;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _xAxisRectScale: any;\n // determines if the given area chart has multiple stacked bar charts\n let _isMultiStackChart: boolean;\n const cartesianChartRef = React.useRef<Chart>(null);\n\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const [activeLegend, setActiveLegend] = React.useState<string | undefined>(undefined);\n const [hoverXValue, setHoverXValue] = React.useState<string | number | undefined | null>('');\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const [YValueHover, setYValueHover] = React.useState<YValueHover[]>([]);\n const [lineXValue, setLineXValue] = React.useState<number>(0);\n const [displayOfLine, setDisplayOfLine] = React.useState<InterceptVisibility>(InterceptVisibility.hide);\n const [isCircleClicked, setIsCircleClicked] = React.useState<boolean>(false);\n const [nearestCircleToHighlight, setNearestCircleToHighlight] = React.useState<number | string | Date | null>(null);\n const [activePoint, setActivePoint] = React.useState<string>('');\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<CustomizedCalloutData>();\n const [stackCalloutProps, setStackCalloutProps] = React.useState<CustomizedCalloutData>();\n const [xAxisCalloutAccessibilityData, setXAxisCalloutAccessibilityData] = React.useState<AccessibilityProps>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n const prevPropsRef = React.useRef<AreaChartProps | null>(null);\n\n React.useEffect(() => {\n if (prevPropsRef.current) {\n const prevProps = prevPropsRef.current;\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, props.legendProps?.selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n }\n prevPropsRef.current = props;\n }, [props]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n }),\n [],\n );\n\n const classes = useAreaChartStyles(props);\n\n function _getMargins(margins: Margins) {\n _margins = margins;\n }\n\n function _onRectMouseMove(mouseEvent: React.MouseEvent<SVGRectElement | SVGPathElement | SVGCircleElement>) {\n mouseEvent.persist();\n const { data } = props;\n const { lineChartData } = data;\n _updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n // This will get the value of the X when mouse is on the chart\n // eslint-disable-next-line @nx/workspace-no-restricted-globals\n const xOffset = _xAxisRectScale.invert(pointer(mouseEvent)[0], document.getElementById(_rectId)!);\n const i = bisect(lineChartData![0].data, xOffset);\n const d0 = lineChartData![0].data[i - 1] as LineChartDataPoint;\n const d1 = lineChartData![0].data[i] as LineChartDataPoint;\n let pointToHighlight: string | Date | number | null = null;\n let index: null | number = null;\n const axisType =\n lineChartData![0].data.length > 0 ? (getTypeOfAxis(lineChartData![0].data[0].x, true) as XAxisTypes) : null;\n if (d0 === undefined && d1 !== undefined) {\n pointToHighlight = d1.x;\n index = i;\n } else if (d0 !== undefined && d1 === undefined) {\n pointToHighlight = d0.x;\n index = i - 1;\n } else {\n let x0;\n let point0;\n let point1;\n switch (axisType) {\n case XAxisTypes.DateAxis:\n x0 = new Date(xOffset).getTime();\n point0 = (d0.x as Date).getTime();\n point1 = (d1.x as Date).getTime();\n pointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n case XAxisTypes.NumericAxis:\n x0 = xOffset as number;\n point0 = d0.x as number;\n point1 = d1.x as number;\n pointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n default:\n break;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { xAxisCalloutData, xAxisCalloutAccessibilityData } = lineChartData![0].data[index as number];\n const formattedDate =\n pointToHighlight instanceof Date ? formatDate(pointToHighlight, props.useUTC) : pointToHighlight;\n const modifiedXVal = pointToHighlight instanceof Date ? pointToHighlight.getTime() : pointToHighlight;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = find(_calloutPoints, (element: { x: string | number }) => {\n return element.x === modifiedXVal;\n });\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const _nearestCircleToHighlight =\n axisType === XAxisTypes.DateAxis ? (pointToHighlight as Date).getTime() : pointToHighlight;\n // if no points need to be called out then don't show vertical line and callout card\n if (found) {\n const filteredValues = _getFilteredLegendValues(found.values);\n setNearestCircleToHighlight(_nearestCircleToHighlight);\n setLineXValue(_xAxisRectScale(pointToHighlight));\n setDisplayOfLine(InterceptVisibility.show);\n setIsCircleClicked(false);\n setStackCalloutProps({ ...found, values: filteredValues });\n setYValueHover(filteredValues);\n setDataPointCalloutProps({ ...found, values: filteredValues });\n setHoverXValue(xAxisCalloutData ? xAxisCalloutData : formattedDate);\n setXAxisCalloutAccessibilityData(xAxisCalloutAccessibilityData);\n setActivePoint('');\n } else {\n setPopoverOpen(false);\n setNearestCircleToHighlight(nearestCircleToHighlight);\n setDisplayOfLine(InterceptVisibility.hide);\n setIsCircleClicked(false);\n }\n }\n /**\n * just cleaning up the state which we have set in the mouse move event\n */\n function _onRectMouseOut() {\n /**/\n }\n\n function _updatePosition(newX: number, newY: number) {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n function _handleChartMouseLeave() {\n setPopoverOpen(false);\n setNearestCircleToHighlight(null);\n setLineXValue(0);\n setDisplayOfLine(InterceptVisibility.hide);\n setIsCircleClicked(false);\n setStackCalloutProps(undefined);\n setDataPointCalloutProps(undefined);\n setHoverXValue(undefined);\n setYValueHover([]);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _getDataPoints(keys: string[], dataSet: any) {\n const renderPoints: Array<AreaChartDataSetPoint[]> = [];\n let maxOfYVal = 0;\n\n if (props.mode === 'tozeroy') {\n keys.forEach((key, index) => {\n const currentLayer: AreaChartDataSetPoint[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n dataSet.forEach((d: any) => {\n currentLayer.push({\n values: [0, d[key]], // Start from zero for \"tozeroy\" mode\n xVal: d.xVal,\n });\n if (d[key] > maxOfYVal) {\n maxOfYVal = d[key];\n }\n });\n renderPoints.push(currentLayer);\n });\n } else {\n const dataValues = d3Stack().keys(keys)(dataSet);\n maxOfYVal = d3Max(dataValues[dataValues.length - 1], dp => dp[1])!;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n dataValues.forEach((layer: any) => {\n const currentLayer: AreaChartDataSetPoint[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n layer.forEach((d: any) => {\n currentLayer.push({\n values: d,\n xVal: d.data.xVal,\n });\n });\n renderPoints.push(currentLayer);\n });\n }\n\n _isMultiStackChart = !!(props.legendProps?.selectedLegends\n ? renderPoints?.length >= 1\n : renderPoints?.length > 1);\n return {\n renderData: renderPoints,\n maxOfYVal,\n };\n }\n\n function _createDataSet(points: LineChartPoints[]) {\n if (props.enablePerfOptimization && _enableComputationOptimization) {\n const allChartPoints: LineChartDataPoint[] = [];\n const dataSet: AreaChartDataSetPoint[] = [];\n const colors: string[] = [];\n const opacity: number[] = [];\n const calloutPoints = calloutData(points!);\n\n points &&\n points.length &&\n points.forEach((singleChartPoint: LineChartPoints) => {\n colors.push(singleChartPoint.color!);\n opacity.push(singleChartPoint.opacity || 1);\n allChartPoints.push(...(singleChartPoint.data as LineChartDataPoint[]));\n });\n\n const mapOfXvalToListOfDataPoints: MapXToDataSet = {};\n allChartPoints.forEach((dataPoint: LineChartDataPoint) => {\n const xValue = dataPoint.x instanceof Date ? dataPoint.x.toLocaleString() : dataPoint.x;\n // map of x value to the list of data points which share the same x value .\n if (mapOfXvalToListOfDataPoints[xValue]) {\n mapOfXvalToListOfDataPoints[xValue].push(dataPoint);\n } else {\n mapOfXvalToListOfDataPoints[xValue] = [dataPoint];\n }\n });\n\n Object.keys(mapOfXvalToListOfDataPoints).forEach((key: number | string) => {\n const value: LineChartDataPoint[] = mapOfXvalToListOfDataPoints[key];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDataset: any = {};\n value.forEach((singleDataPoint: LineChartDataPoint, index: number) => {\n singleDataset.xVal = singleDataPoint.x;\n singleDataset[`chart${index}`] = singleDataPoint.y;\n });\n dataSet.push(singleDataset);\n });\n\n // get keys from dataset, used to render data\n const keysLength: number = dataSet && Object.keys(dataSet[0])!.length;\n const keys: string[] = [];\n for (let i = 0; i < keysLength - 1; i++) {\n const keyVal = `chart${i}`;\n keys.push(keyVal);\n }\n\n // Data used to draw graph\n const data = _getDataPoints(keys, dataSet);\n\n return {\n colors,\n opacity,\n keys,\n data,\n calloutPoints,\n };\n } else {\n const allChartPoints: LineChartDataPoint[] = [];\n const dataSet: AreaChartDataSetPoint[] = [];\n const colors: string[] = [];\n const opacity: number[] = [];\n const calloutPoints = calloutData(points!);\n\n points &&\n points.length &&\n points.forEach((singleChartPoint: LineChartPoints) => {\n colors.push(singleChartPoint.color!);\n opacity.push(singleChartPoint.opacity || 1);\n allChartPoints.push(...(singleChartPoint.data as LineChartDataPoint[]));\n });\n\n let tempArr = allChartPoints;\n while (tempArr.length) {\n const valToCheck = tempArr[0].x instanceof Date ? tempArr[0].x.toLocaleString() : tempArr[0].x;\n const filteredChartPoints: LineChartDataPoint[] = tempArr.filter(\n (point: LineChartDataPoint) =>\n (point.x instanceof Date ? point.x.toLocaleString() : point.x) === valToCheck,\n );\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDataset: any = {};\n filteredChartPoints.forEach((singleDataPoint: LineChartDataPoint, index: number) => {\n singleDataset.xVal = singleDataPoint.x;\n singleDataset[`chart${index}`] = singleDataPoint.y;\n });\n dataSet.push(singleDataset);\n // removing compared objects from array\n const val = tempArr[0].x instanceof Date ? tempArr[0].x.toLocaleString() : tempArr[0].x;\n tempArr = tempArr.filter(\n (point: LineChartDataPoint) => (point.x instanceof Date ? point.x.toLocaleString() : point.x) !== val,\n );\n }\n\n // get keys from dataset, used to create stacked data\n const keysLength: number = dataSet && Object.keys(dataSet[0])!.length;\n const keys: string[] = [];\n for (let i = 0; i < keysLength - 1; i++) {\n const keyVal = `chart${i}`;\n keys.push(keyVal);\n }\n\n // Data used to draw graph\n const data = _getDataPoints(keys, dataSet);\n\n return {\n colors,\n opacity,\n keys,\n data,\n calloutPoints,\n };\n }\n }\n\n function _getCustomizedCallout() {\n return props.onRenderCalloutPerStack\n ? props.onRenderCalloutPerStack(stackCalloutProps)\n : props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps)\n : null;\n }\n\n function _getGraphData(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xAxis: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yAxis: any,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) {\n _chart = _drawGraph(containerHeight, xAxis, yAxis, xElement!);\n }\n\n function _onLegendHover(legend: string): void {\n setActiveLegend(legend);\n }\n\n function _onLegendLeave(): void {\n setActiveLegend(undefined);\n }\n\n function _getLegendData(points: LineChartPoints[]): JSX.Element {\n const data = points;\n const actions: Legend[] = [];\n\n data.forEach((singleChartData: LineChartPoints) => {\n const color: string = singleChartData.color!;\n const checkSimilarLegends = actions.filter(\n (leg: Legend) => leg.title === singleChartData.legend && leg.color === color,\n );\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n\n const legend: Legend = {\n title: singleChartData.legend,\n color,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(singleChartData.legend);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n };\n\n actions.push(legend);\n });\n return (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n {...props.legendProps}\n onChange={_onLegendSelectionChange}\n />\n );\n }\n\n function _onLegendSelectionChange(\n // eslint-disable-next-line @typescript-eslint/no-shadow\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(selectedLegends);\n } else {\n setSelectedLegends(selectedLegends.slice(-1));\n }\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n function _onDataPointClick(func: (() => void) | undefined) {\n if (func) {\n func();\n }\n setIsCircleClicked(true);\n }\n\n function _getOpacity(legend: string): number {\n if (!_isMultiStackChart) {\n return 0.7;\n } else {\n const opacity = _legendHighlighted(legend) || _noLegendHighlighted() ? 0.7 : 0.1;\n return opacity;\n }\n }\n\n function _getLineOpacity(legend: string): number {\n if (!_isMultiStackChart) {\n return 1;\n } else {\n let opacity = 0.3;\n if (isPopoverOpen) {\n opacity = 1;\n }\n if (!_noLegendHighlighted()) {\n opacity = _legendHighlighted(legend) ? 0 : 0.1;\n }\n return opacity;\n }\n }\n\n function _updateCircleFillColor(xDataPoint: number | Date, lineColor: string, circleId: string): string {\n let fillColor = lineColor;\n if (nearestCircleToHighlight === xDataPoint || activePoint === circleId) {\n if (!isCircleClicked) {\n fillColor = tokens.colorNeutralBackground1;\n }\n }\n\n return fillColor;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _drawGraph(containerHeight: number, xScale: any, yScale: any, xElement: SVGElement): JSX.Element[] {\n const points = _addDefaultColors(props.data.lineChartData);\n const { pointOptions, pointLineOptions } = props.data;\n\n const graph: JSX.Element[] = [];\n let lineColor: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _data.forEach((singleStackedData: Array<any>, index: number) => {\n const curveFactory = getCurveFactory(points[index].lineOptions?.curve, d3CurveBasis);\n const area = d3Area()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => xScale(d.xVal))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y0((d: any) => yScale(d.values[0]))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y1((d: any) => yScale(d.values[1]))\n .curve(curveFactory);\n const line = d3Line()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => xScale(d.xVal))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => yScale(d.values[1]))\n .curve(curveFactory);\n const layerOpacity = props.mode === 'tozeroy' ? 0.8 : _opacity[index];\n graph.push(\n <React.Fragment key={`${index}-graph-${_uniqueIdForGraph}`}>\n {props.enableGradient && (\n <defs>\n <linearGradient id={`gradient_${index}`} x1=\"0%\" x2=\"0%\" y1=\"0%\" y2=\"100%\">\n <stop offset=\"0\" stopColor={_colors[index]} />\n <stop offset=\"100%\" stopColor=\"transparent\" />\n </linearGradient>\n </defs>\n )}\n <path\n id={`${index}-line-${_uniqueIdForGraph}`}\n d={line(singleStackedData)!}\n fill={'transparent'}\n strokeWidth={points[index].lineOptions?.strokeWidth ?? 3}\n stroke={_colors[index]}\n opacity={_getLineOpacity(points[index]!.legend)}\n onMouseMove={event => _onRectMouseMove(event)}\n onMouseOut={_onRectMouseOut}\n onMouseOver={event => _onRectMouseMove(event)}\n strokeDasharray={points[index].lineOptions?.strokeDasharray}\n strokeDashoffset={points[index].lineOptions?.strokeDashoffset}\n strokeLinecap={points[index].lineOptions?.strokeLinecap}\n />\n {singleStackedData.length === 1 ? (\n <circle\n id={`${index}-graph-${_uniqueIdForGraph}`}\n cx={xScale(singleStackedData[0].xVal)}\n cy={yScale(singleStackedData[0].values[1])}\n r={6}\n stroke={_colors[index]}\n strokeWidth={3}\n fill={_colors[index]}\n opacity={layerOpacity}\n fillOpacity={_getOpacity(points[index]!.legend)}\n onMouseMove={event => _onRectMouseMove(event)}\n onMouseOut={_onRectMouseOut}\n onMouseOver={event => _onRectMouseMove(event)}\n />\n ) : (\n <path\n id={`${index}-graph-${_uniqueIdForGraph}`}\n d={area(singleStackedData)!}\n fill={props.enableGradient ? `url(#gradient_${index})` : _colors[index]}\n opacity={layerOpacity}\n fillOpacity={_getOpacity(points[index]!.legend)}\n onMouseMove={event => _onRectMouseMove(event)}\n onMouseOut={_onRectMouseOut}\n onMouseOver={event => _onRectMouseMove(event)}\n {...(props.optimizeLargeData && {\n tabIndex: _legendHighlighted(points[index]!.legend) || _noLegendHighlighted() ? 0 : undefined,\n role: 'img',\n 'aria-label': `${points[index].legend}, series ${index + 1} of ${points.length} with ${\n points[index].data.length\n } data points.`,\n })}\n />\n )}\n </React.Fragment>,\n );\n });\n\n const circleRadius = pointOptions && pointOptions.r ? Number(pointOptions.r) : 8;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _data.forEach((singleStackedData: Array<any>, index: number) => {\n if (points.length === index) {\n return;\n }\n\n if (!props.optimizeLargeData || singleStackedData.length === 1) {\n // Render circles for all data points\n graph.push(\n <g\n key={`${index}-dots-${_uniqueIdForGraph}`}\n clipPath=\"url(#clip)\"\n role=\"region\"\n aria-label={`${points[index].legend}, series ${index + 1} of ${points.length} with ${\n points[index].data.length\n } data points.`}\n >\n {singleStackedData.map((singlePoint: DPointType, pointIndex: number) => {\n const circleId = `${_circleId}_${index * _data[0].length + pointIndex}`;\n const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal;\n lineColor = points[index]!.color!;\n const legend = points[index]!.legend;\n return (\n <circle\n key={circleId}\n id={circleId}\n tabIndex={_legendHighlighted(points[index]!.legend) || _noLegendHighlighted() ? 0 : undefined}\n cx={xScale(singlePoint.xVal)}\n cy={yScale(singlePoint.values[1])}\n stroke={lineColor}\n strokeWidth={3}\n fill={_updateCircleFillColor(xDataPoint, lineColor, circleId)}\n onMouseOut={_onRectMouseOut}\n onMouseOver={event => _onRectMouseMove(event)}\n onClick={() => _onDataPointClick(points[index]!.data[pointIndex].onDataPointClick!)}\n onFocus={() => _handleFocus(index, pointIndex, circleId)}\n onBlur={_handleBlur}\n {...getSecureProps(pointOptions)}\n r={_getCircleRadius(xDataPoint, circleRadius, circleId, legend)}\n role=\"img\"\n aria-label={_getAriaLabel(index, pointIndex)}\n />\n );\n })}\n </g>,\n );\n } else {\n // Render circles for data points close to the mouse pointer only\n singleStackedData.forEach((singlePoint: DPointType, pointIndex: number) => {\n const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal;\n if (nearestCircleToHighlight === xDataPoint) {\n const circleId = `${_circleId}_${index * _data[0].length + pointIndex}`;\n lineColor = points[index]!.color!;\n const legend = points[index]!.legend;\n graph.push(\n <circle\n key={circleId}\n id={circleId}\n cx={xScale(singlePoint.xVal)}\n cy={yScale(singlePoint.values[1])}\n stroke={lineColor}\n strokeWidth={3}\n fill={_updateCircleFillColor(xDataPoint, lineColor, circleId)}\n onMouseOut={_onRectMouseOut}\n onMouseOver={event => _onRectMouseMove(event)}\n onClick={() => _onDataPointClick(points[index]!.data[pointIndex].onDataPointClick!)}\n {...getSecureProps(pointOptions)}\n r={_getCircleRadius(xDataPoint, circleRadius, circleId, legend)}\n />,\n );\n }\n });\n }\n });\n graph.push(\n <line\n id={_verticalLineId}\n key={_verticalLineId}\n x1={lineXValue}\n y1={0}\n x2={lineXValue}\n y2={containerHeight}\n strokeWidth={1}\n strokeDasharray={5.5}\n stroke={lineColor!}\n opacity={0.5}\n visibility={displayOfLine}\n {...getSecureProps(pointLineOptions)}\n />,\n );\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n // eslint-disable-next-line @nx/workspace-no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xScale);\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 const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return graph;\n }\n\n function _getCircleRadius(xDataPoint: number, circleRadius: number, circleId: string, legend: string): number {\n // Show the circle if no legends are selected or if the point's legend is in the selected legends\n if (!_noLegendHighlighted() && !_legendHighlighted(legend)) {\n return 0;\n }\n\n if (isCircleClicked && nearestCircleToHighlight === xDataPoint) {\n return 1;\n } else if (nearestCircleToHighlight === xDataPoint || activePoint === circleId) {\n return circleRadius;\n } else {\n return 0;\n }\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n function _legendHighlighted(legend: string) {\n return _getHighlightedLegend().includes(legend!);\n }\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n function _noLegendHighlighted() {\n return _getHighlightedLegend().length === 0;\n }\n\n function _getHighlightedLegend() {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n }\n\n function _addDefaultColors(lineChartData?: LineChartPoints[]): LineChartPoints[] {\n return lineChartData\n ? lineChartData.map((item, index) => {\n let color: string;\n // isInverted property is applicable to v8 themes only\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0);\n } else {\n color = getColorFromToken(item.color);\n }\n\n return { ...item, color };\n })\n : [];\n }\n\n function _handleFocus(lineIndex: number, pointIndex: number, circleId: string) {\n const { x, y, xAxisCalloutData } = props.data.lineChartData![lineIndex].data[pointIndex];\n const formattedDate = x instanceof Date ? formatDate(x, props.useUTC) : x;\n const modifiedXVal = x instanceof Date ? x.getTime() : x;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = _calloutPoints.find((e: { x: string | number }) => e.x === modifiedXVal);\n // Show details in the callout for the focused point only\n found.values = found.values.filter((e: { y: number }) => e.y === y);\n const filteredValues = _getFilteredLegendValues(found.values);\n\n setPopoverOpen(true);\n setHoverXValue(xAxisCalloutData ? xAxisCalloutData : formattedDate);\n setYValueHover(filteredValues!);\n setStackCalloutProps({ ...found, values: filteredValues });\n setDataPointCalloutProps({ ...found, values: filteredValues });\n setActivePoint(circleId);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _getFilteredLegendValues(values: any) {\n return !_noLegendHighlighted()\n ? values.filter((value: { legend: string }) => _legendHighlighted(value.legend))\n : values;\n }\n\n function _handleBlur() {\n setPopoverOpen(false);\n setHoverXValue(undefined);\n setYValueHover([]);\n setStackCalloutProps(undefined);\n setDataPointCalloutProps(undefined);\n setActivePoint('');\n }\n\n function _getAriaLabel(lineIndex: number, pointIndex: number): string {\n const line = props.data.lineChartData![lineIndex];\n const point = line.data[pointIndex];\n const formattedDate = point.x instanceof Date ? formatDate(point.x, props.useUTC) : point.x;\n const xValue = point.xAxisCalloutData || formattedDate;\n const legend = line.legend;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n function _isChartEmpty(): boolean {\n return !(\n (\n props.data &&\n props.data.lineChartData &&\n props.data.lineChartData.length > 0 &&\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props.data.lineChartData.filter((item: { data: string | any[] }) => item.data.length === 0).length === 0\n )\n // if all the data sets have no data\n // filtering all items which have no data and checking if the length of the filtered array is 0\n // which means chart is not empty\n );\n }\n\n function _getChartTitle(): string {\n const { chartTitle, lineChartData } = props.data;\n return (chartTitle ? `${chartTitle}. ` : '') + `Area chart with ${lineChartData?.length || 0} data series. `;\n }\n\n if (!_isChartEmpty()) {\n const { lineChartData } = props.data;\n const points = _addDefaultColors(lineChartData);\n _createSet = _createDataSet;\n const { colors, opacity, data, calloutPoints } = _createSet(points);\n _calloutPoints = calloutPoints;\n const isXAxisDateType = getXAxisType(points);\n _colors = colors;\n _opacity = opacity;\n _data = data.renderData;\n const legends: JSX.Element = _getLegendData(points);\n\n const tickParams = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n\n const calloutProps: ChartPopoverProps = {\n YValueHover: YValueHover!,\n hoverXValue: hoverXValue!,\n xAxisCalloutAccessibilityData,\n ...props.calloutProps,\n clickPosition,\n isPopoverOpen,\n isCartesian: true,\n customCallout: {\n customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n isCalloutForStack: true,\n };\n return (\n <CartesianChart\n {...props}\n chartTitle={_getChartTitle()}\n points={points}\n chartType={ChartTypes.AreaChart}\n calloutProps={calloutProps}\n legendBars={legends}\n xAxisType={isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n tickParams={tickParams}\n maxOfYVal={data.maxOfYVal}\n getGraphData={_getGraphData}\n getmargins={_getMargins}\n onChartMouseLeave={_handleChartMouseLeave}\n enableFirstRenderOptimization={props.enablePerfOptimization && _firstRenderOptimization}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop, @typescript-eslint/no-shadow\n children={(props: ChildProps) => {\n _xAxisRectScale = props.xScale;\n const ticks = _xAxisRectScale.ticks();\n const width1 = _xAxisRectScale(ticks[ticks.length - 1]);\n const rectHeight = props.containerHeight! - _margins.top!;\n return (\n <>\n <g>\n <rect\n id={_rectId}\n width={width1}\n height={rectHeight}\n fill={'transparent'}\n onMouseMove={event => _onRectMouseMove(event)}\n onMouseOut={_onRectMouseOut}\n onMouseOver={event => _onRectMouseMove(event)}\n />\n </g>\n <g>{_chart}</g>\n </>\n );\n }}\n />\n );\n }\n return (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n },\n);\nAreaChart.displayName = 'AreaChart';\n"],"names":["React","useAreaChartStyles","max","d3Max","bisector","pointer","select","d3Select","tokens","area","d3Area","stack","d3Stack","curveMonotoneX","d3CurveBasis","line","d3Line","CartesianChart","calloutData","getXAxisType","ChartTypes","XAxisTypes","getTypeOfAxis","tooltipOfXAxislabels","getNextColor","getColorFromToken","formatDate","getSecureProps","areArraysEqual","getCurveFactory","find","useId","Legends","bisect","d","x","left","InterceptVisibility","AreaChart","forwardRef","props","forwardedRef","_uniqueIdForGraph","_verticalLineId","_circleId","_rectId","_tooltipId","_enableComputationOptimization","_firstRenderOptimization","_emptyChartId","_calloutPoints","_createSet","_colors","_opacity","_data","_chart","_margins","_xAxisRectScale","_isMultiStackChart","cartesianChartRef","useRef","selectedLegends","setSelectedLegends","useState","legendProps","activeLegend","setActiveLegend","undefined","hoverXValue","setHoverXValue","YValueHover","setYValueHover","lineXValue","setLineXValue","displayOfLine","setDisplayOfLine","isCircleClicked","setIsCircleClicked","nearestCircleToHighlight","setNearestCircleToHighlight","activePoint","setActivePoint","dataPointCalloutProps","setDataPointCalloutProps","stackCalloutProps","setStackCalloutProps","xAxisCalloutAccessibilityData","setXAxisCalloutAccessibilityData","clickPosition","setClickPosition","y","isPopoverOpen","setPopoverOpen","prevPropsRef","useEffect","current","prevProps","useImperativeHandle","componentRef","chartContainer","classes","_getMargins","margins","_onRectMouseMove","mouseEvent","persist","data","lineChartData","_updatePosition","clientX","clientY","xOffset","invert","document","getElementById","i","d0","d1","pointToHighlight","index","axisType","length","x0","point0","point1","DateAxis","Date","getTime","Math","abs","NumericAxis","xAxisCalloutData","formattedDate","useUTC","modifiedXVal","found","element","_nearestCircleToHighlight","filteredValues","_getFilteredLegendValues","values","_onRectMouseOut","newX","newY","threshold","distance","sqrt","pow","_handleChartMouseLeave","_getDataPoints","keys","dataSet","renderPoints","maxOfYVal","mode","forEach","key","currentLayer","push","xVal","dataValues","dp","layer","renderData","_createDataSet","points","enablePerfOptimization","allChartPoints","colors","opacity","calloutPoints","singleChartPoint","color","mapOfXvalToListOfDataPoints","dataPoint","xValue","toLocaleString","Object","value","singleDataset","singleDataPoint","keysLength","keyVal","tempArr","valToCheck","filteredChartPoints","filter","point","val","_getCustomizedCallout","onRenderCalloutPerStack","onRenderCalloutPerDataPoint","_getGraphData","xAxis","yAxis","containerHeight","containerWidth","xElement","_drawGraph","_onLegendHover","legend","_onLegendLeave","_getLegendData","actions","singleChartData","checkSimilarLegends","leg","title","hoverAction","onMouseOutAction","legends","enabledWrapLines","enabledLegendsWrapLines","onChange","_onLegendSelectionChange","event","currentLegend","canSelectMultipleLegends","slice","_onDataPointClick","func","_getOpacity","_legendHighlighted","_noLegendHighlighted","_getLineOpacity","_updateCircleFillColor","xDataPoint","lineColor","circleId","fillColor","colorNeutralBackground1","xScale","yScale","_addDefaultColors","pointOptions","pointLineOptions","graph","singleStackedData","curveFactory","lineOptions","curve","y0","y1","layerOpacity","Fragment","enableGradient","defs","linearGradient","id","x1","x2","y2","stop","offset","stopColor","path","fill","strokeWidth","stroke","onMouseMove","onMouseOut","onMouseOver","strokeDasharray","strokeDashoffset","strokeLinecap","circle","cx","cy","r","fillOpacity","optimizeLargeData","tabIndex","role","circleRadius","Number","g","clipPath","aria-label","map","singlePoint","pointIndex","onClick","onDataPointClick","onFocus","_handleFocus","onBlur","_handleBlur","_getCircleRadius","_getAriaLabel","visibility","showXAxisLablesTooltip","remove","e","wrapXAxisLables","xAxisElement","call","tooltipProps","tooltipCls","tooltip","_getHighlightedLegend","includes","item","lineIndex","yValue","yAxisCalloutData","callOutAccessibilityData","ariaLabel","_isChartEmpty","_getChartTitle","chartTitle","isXAxisDateType","tickParams","tickValues","tickFormat","calloutProps","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","isCalloutForStack","chartType","legendBars","xAxisType","getGraphData","getmargins","onChartMouseLeave","enableFirstRenderOptimization","children","ticks","width1","rectHeight","top","rect","width","height","div","style","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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MAAM8H,sBAAsB,IAAItH;YAC/DkD,cAAcvC;YACd,oCAAoC,GACpC,gFAAgF;YAChF6Q,UAAU,CAAChS;gBACTiB,kBAAkBjB,MAAM+L,MAAM;gBAC9B,MAAMkG,QAAQhR,gBAAgBgR,KAAK;gBACnC,MAAMC,SAASjR,gBAAgBgR,KAAK,CAACA,MAAMhN,MAAM,GAAG,EAAE;gBACtD,MAAMkN,aAAanS,MAAM2J,eAAe,GAAI3I,SAASoR,GAAG;gBACxD,qBACE,wDACE,oBAACzD,yBACC,oBAAC0D;oBACCrF,IAAI3M;oBACJiS,OAAOJ;oBACPK,QAAQJ;oBACR3E,MAAM;oBACNG,aAAa5C,CAAAA,QAAShH,iBAAiBgH;oBACvC6C,YAAYvH;oBACZwH,aAAa9C,CAAAA,QAAShH,iBAAiBgH;mCAG3C,oBAAC4D,WAAG5N;YAGV;;IAGN;IACA,qBACE,oBAACyR;QAAIxF,IAAIvM;QAAe+N,MAAM;QAASiE,OAAO;YAAExK,SAAS;QAAI;QAAG4G,cAAY;;AAEhF,GACA;AACF/O,UAAU4S,WAAW,GAAG"}
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Area Chart style properties
3
+ * {@docCategory AreaChart}
4
+ */ export { };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AreaChart.types.ts"],"sourcesContent":["import { RenderFunction } from '../../utilities/index';\nimport {\n ChartProps,\n RefArrayData,\n Basestate,\n LineChartDataPoint,\n LineChartPoints,\n CustomizedCalloutData,\n Margins,\n} from '../../types/index';\nimport {\n CartesianChartStyles,\n CartesianChartStyleProps,\n CartesianChartProps,\n ChildProps,\n} from '../CommonComponents/CartesianChart.types';\n\nexport type { ChildProps, RefArrayData, Basestate, LineChartDataPoint, LineChartPoints, Margins };\n\n/**\n * Area Chart properties.\n * {@docCategory AreaChart}\n */\nexport interface AreaChartProps extends CartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data: ChartProps;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: CartesianChartStyles;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: RenderFunction<CustomizedCalloutData>;\n\n /**\n * Define a custom callout renderer for a stack; default is to render per data point\n */\n onRenderCalloutPerStack?: RenderFunction<CustomizedCalloutData>;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * @default false\n * The prop used to enable the perf optimization\n */\n enablePerfOptimization?: boolean;\n\n /*\n * Optimize area chart rendering for large data set.\n */\n optimizeLargeData?: boolean;\n\n /**\n * @default false\n * The prop used to enable gradient fill color for the chart.\n */\n enableGradient?: boolean;\n\n /**\n * @default tonexty\n * The prop used to define the Y axis mode (tonexty or tozeroy)\n */\n mode?: 'tozeroy' | 'tonexty';\n}\n\n/**\n * Area Chart styles\n * {@docCategory AreaChart}\n */\nexport interface AreaChartStyles extends CartesianChartStyles {}\n\n/**\n * Area Chart style properties\n * {@docCategory AreaChart}\n */\nexport interface AreaChartStyleProps extends CartesianChartStyleProps {}\n"],"names":[],"rangeMappings":";;;","mappings":"AA+EA;;;CAGC,GACD,WAAwE"}
@@ -0,0 +1,3 @@
1
+ export * from './AreaChart';
2
+ export * from './AreaChart.types';
3
+ export * from '../../types/index';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AreaChart';\nexport * from './AreaChart.types';\nexport * from '../../types/index';\n"],"names":[],"rangeMappings":";;","mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,oBAAoB;AAClC,cAAc,oBAAoB"}
@@ -0,0 +1,55 @@
1
+ import { __styles, mergeClasses, shorthands } from '@griffel/react';
2
+ import { tokens, typographyStyles } from '@fluentui/react-theme';
3
+ export const areaChartClassNames = {
4
+ tooltip: 'fui-ac__tooltip',
5
+ root: '',
6
+ xAxis: '',
7
+ yAxis: '',
8
+ legendContainer: '',
9
+ hover: '',
10
+ descriptionMessage: '',
11
+ axisTitle: '',
12
+ chartTitle: '',
13
+ opacityChangeOnHover: '',
14
+ shapeStyles: '',
15
+ chartWrapper: ''
16
+ };
17
+ const useStyles = /*#__PURE__*/__styles({
18
+ tooltip: {
19
+ Bahqtrf: "fk6fouc",
20
+ Be2twd7: "fkhj508",
21
+ Bhrd7zp: "figsok6",
22
+ Bg96gwp: "f1i3iumi",
23
+ mc9l5x: "f22iagw",
24
+ Beiy3e4: "f1vx9l62",
25
+ z8tnut: "f17mpqex",
26
+ z189sj: ["f1vdfbxk", "f1f5gg8d"],
27
+ Byoj8tv: "fdvome7",
28
+ uwmqm3: ["f1f5gg8d", "f1vdfbxk"],
29
+ qhf8xq: "f1euv43f",
30
+ fsow6f: "f17mccla",
31
+ Bhzewxz: "fr6rvge",
32
+ De3pzq: "fxugw4r",
33
+ Beyfa6y: 0,
34
+ Bbmb7ep: 0,
35
+ Btl43ni: 0,
36
+ B7oj6ja: 0,
37
+ Dimara: "fq9zq91",
38
+ Bkecrkj: "f1aehjj5",
39
+ sj55zd: "f19n0e5"
40
+ }
41
+ }, {
42
+ d: [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f22iagw{display:flex;}", ".f1vx9l62{flex-direction:column;}", ".f17mpqex{padding-top:var(--spacingHorizontalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".fdvome7{padding-bottom:var(--spacingHorizontalS);}", ".f1euv43f{position:absolute;}", ".f17mccla{text-align:center;}", ".fr6rvge{top:var(--spacingVerticalNone);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", [".fq9zq91{border-radius:var(--borderRadiusSmall);}", {
43
+ p: -1
44
+ }], ".f1aehjj5{pointer-events:none;}", ".f19n0e5{color:var(--colorNeutralForeground1);}"]
45
+ });
46
+ /**
47
+ * Apply styling to the AreaChart slots based on the state
48
+ */
49
+ export const useAreaChartStyles = props => {
50
+ const baseStyles = useStyles();
51
+ return {
52
+ tooltip: mergeClasses(areaChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/)
53
+ };
54
+ };
55
+ //# sourceMappingURL=useAreaChartStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","areaChartClassNames","tooltip","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","sj55zd","d","p","useAreaChartStyles","props","baseStyles"],"sources":["useAreaChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const areaChartClassNames = {\n tooltip: 'fui-ac__tooltip',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n opacityChangeOnHover: '',\n shapeStyles: '',\n chartWrapper: ''\n};\nconst useStyles = makeStyles({\n tooltip: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.padding(tokens.spacingHorizontalS),\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n backgroundColor: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none',\n color: tokens.colorNeutralForeground1\n }\n});\n/**\n * Apply styling to the AreaChart slots based on the state\n */ export const useAreaChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(areaChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ )\n };\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,OAAO,MAAMC,mBAAmB,GAAG;EAC/BC,OAAO,EAAE,iBAAiB;EAC1BC,IAAI,EAAE,EAAE;EACRC,KAAK,EAAE,EAAE;EACTC,KAAK,EAAE,EAAE;EACTC,eAAe,EAAE,EAAE;EACnBC,KAAK,EAAE,EAAE;EACTC,kBAAkB,EAAE,EAAE;EACtBC,SAAS,EAAE,EAAE;EACbC,UAAU,EAAE,EAAE;EACdC,oBAAoB,EAAE,EAAE;EACxBC,WAAW,EAAE,EAAE;EACfC,YAAY,EAAE;AAClB,CAAC;AACD,MAAMC,SAAS,gBAAGlB,QAAA;EAAAM,OAAA;IAAAa,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;AAAA;EAAAC,CAAA;IAAAC,CAAA;EAAA;AAAA,CAcjB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,kBAAkB,GAAIC,KAAK,IAAG;EAC3C,MAAMC,UAAU,GAAG1B,SAAS,CAAC,CAAC;EAC9B,OAAO;IACHZ,OAAO,EAAEL,YAAY,CAACI,mBAAmB,CAACC,OAAO,EAAEsC,UAAU,CAACtC,OAAO,CAAC,yBAA0B;EACpG,CAAC;AACL,CAAC","ignoreList":[]}
@@ -31,6 +31,10 @@ import { useFocusableGroup, useArrowNavigationGroup } from '@fluentui/react-tabs
31
31
  const [removalValueForTextTuncate, setRemovalValueForTextTuncate] = React.useState(0);
32
32
  const [startFromX, setStartFromX] = React.useState(0);
33
33
  const [prevProps, setPrevProps] = React.useState(null);
34
+ const chartTypesToCheck = [
35
+ ChartTypes.HorizontalBarChartWithAxis,
36
+ ChartTypes.HeatMapChart
37
+ ];
34
38
  var _props_margins_top, _props_margins_bottom, _props_margins_left, _props_margins_right, _props_margins_right1, _props_margins_left1;
35
39
  /**
36
40
  * In RTL mode, Only graph will be rendered left/right. We need to provide left and right margins manually.
@@ -52,9 +56,9 @@ import { useFocusableGroup, useArrowNavigationGroup } from '@fluentui/react-tabs
52
56
  if (props.yAxisTitle !== undefined && props.yAxisTitle !== '') {
53
57
  var _props_margins7, _props_margins8, _props_margins9, _props_margins10;
54
58
  var _props_margins_right2, _props_margins_left2;
55
- margins.left = _useRtl ? ((_props_margins_right2 = (_props_margins7 = props.margins) === null || _props_margins7 === void 0 ? void 0 : _props_margins7.right) !== null && _props_margins_right2 !== void 0 ? _props_margins_right2 : props === null || props === void 0 ? void 0 : props.secondaryYAxistitle) ? 60 : 40 : (_props_margins_left2 = (_props_margins8 = props.margins) === null || _props_margins8 === void 0 ? void 0 : _props_margins8.left) !== null && _props_margins_left2 !== void 0 ? _props_margins_left2 : 60;
59
+ margins.left = _useRtl ? ((_props_margins_right2 = (_props_margins7 = props.margins) === null || _props_margins7 === void 0 ? void 0 : _props_margins7.right) !== null && _props_margins_right2 !== void 0 ? _props_margins_right2 : props === null || props === void 0 ? void 0 : props.secondaryYAxistitle) ? 80 : 40 : (_props_margins_left2 = (_props_margins8 = props.margins) === null || _props_margins8 === void 0 ? void 0 : _props_margins8.left) !== null && _props_margins_left2 !== void 0 ? _props_margins_left2 : 60;
56
60
  var _props_margins_left3, _props_margins_right3;
57
- margins.right = _useRtl ? (_props_margins_left3 = (_props_margins9 = props.margins) === null || _props_margins9 === void 0 ? void 0 : _props_margins9.left) !== null && _props_margins_left3 !== void 0 ? _props_margins_left3 : 60 : ((_props_margins_right3 = (_props_margins10 = props.margins) === null || _props_margins10 === void 0 ? void 0 : _props_margins10.right) !== null && _props_margins_right3 !== void 0 ? _props_margins_right3 : props === null || props === void 0 ? void 0 : props.secondaryYAxistitle) ? 60 : 40;
61
+ margins.right = _useRtl ? (_props_margins_left3 = (_props_margins9 = props.margins) === null || _props_margins9 === void 0 ? void 0 : _props_margins9.left) !== null && _props_margins_left3 !== void 0 ? _props_margins_left3 : 60 : ((_props_margins_right3 = (_props_margins10 = props.margins) === null || _props_margins10 === void 0 ? void 0 : _props_margins10.right) !== null && _props_margins_right3 !== void 0 ? _props_margins_right3 : props === null || props === void 0 ? void 0 : props.secondaryYAxistitle) ? 80 : 40;
58
62
  }
59
63
  const classes = useCartesianChartStyles(props);
60
64
  const focusAttributes = useFocusableGroup();
@@ -67,8 +71,8 @@ import { useFocusableGroup, useArrowNavigationGroup } from '@fluentui/react-tabs
67
71
  if (props !== null) {
68
72
  setPrevProps(props);
69
73
  }
70
- if (props.chartType === ChartTypes.HorizontalBarChartWithAxis && props.showYAxisLables && yAxisElement.current) {
71
- const maxYAxisLabelLength = calculateLongestLabelWidth(props.points.map((point)=>point.y), `.${classes.yAxis} text`);
74
+ if (chartTypesToCheck.includes(props.chartType) && props.showYAxisLables && yAxisElement) {
75
+ const maxYAxisLabelLength = calculateMaxYAxisLabelLength(props.chartType, props.points, classes.yAxis);
72
76
  if (startFromX !== maxYAxisLabelLength) {
73
77
  setStartFromX(maxYAxisLabelLength);
74
78
  }
@@ -90,8 +94,8 @@ import { useFocusableGroup, useArrowNavigationGroup } from '@fluentui/react-tabs
90
94
  _fitParentContainer();
91
95
  }
92
96
  }
93
- if (props.chartType === ChartTypes.HorizontalBarChartWithAxis && props.showYAxisLables && yAxisElement.current) {
94
- const maxYAxisLabelLength = calculateLongestLabelWidth(props.points.map((point)=>point.y), `.${classes.yAxis} text`);
97
+ if (chartTypesToCheck.includes(props.chartType) && props.showYAxisLables && yAxisElement) {
98
+ const maxYAxisLabelLength = calculateMaxYAxisLabelLength(props.chartType, props.points, classes.yAxis);
95
99
  if (startFromX !== maxYAxisLabelLength) {
96
100
  setStartFromX(maxYAxisLabelLength);
97
101
  }
@@ -135,6 +139,15 @@ import { useFocusableGroup, useArrowNavigationGroup } from '@fluentui/react-tabs
135
139
  function _generateCallout(calloutProps) {
136
140
  return /*#__PURE__*/ React.createElement(ChartPopover, calloutProps);
137
141
  }
142
+ function calculateMaxYAxisLabelLength(chartType, // eslint-disable-next-line @typescript-eslint/no-explicit-any
143
+ points, className) {
144
+ if (chartType === ChartTypes.HeatMapChart) {
145
+ var _points__data, _points_;
146
+ return calculateLongestLabelWidth((_points_ = points[0]) === null || _points_ === void 0 ? void 0 : (_points__data = _points_.data) === null || _points__data === void 0 ? void 0 : _points__data.map((point)=>point.y), `.${className} text`);
147
+ } else {
148
+ return calculateLongestLabelWidth(points === null || points === void 0 ? void 0 : points.map((point)=>point.y), `.${className} text`);
149
+ }
150
+ }
138
151
  const { calloutProps, points, chartType, svgProps, culture, dateLocalizeOptions, timeFormatLocale, customDateTimeFormatter } = props;
139
152
  if (props.parentRef) {
140
153
  _fitParentContainer();
@@ -142,7 +155,7 @@ import { useFocusableGroup, useArrowNavigationGroup } from '@fluentui/react-tabs
142
155
  const margin = {
143
156
  ...margins
144
157
  };
145
- if (props.chartType === ChartTypes.HorizontalBarChartWithAxis) {
158
+ if (chartTypesToCheck.includes(props.chartType)) {
146
159
  if (!_useRtl) {
147
160
  margin.left += startFromX;
148
161
  } else {
@@ -262,15 +275,15 @@ import { useFocusableGroup, useArrowNavigationGroup } from '@fluentui/react-tabs
262
275
  yMinMaxValues: getMinMaxOfYAxis(points, chartType),
263
276
  yAxisPadding: props.yAxisPadding
264
277
  };
265
- yScaleSecondary = createYAxis(YAxisParamsSecondary, _useRtl, axisData, chartType, props.barwidth, isIntegralDataset, true);
278
+ yScaleSecondary = createYAxis(YAxisParamsSecondary, _useRtl, axisData, chartType, props.barwidth, isIntegralDataset, true, props.roundedTicks);
266
279
  }
267
- yScale = createYAxis(YAxisParams, _useRtl, axisData, chartType, props.barwidth, isIntegralDataset);
280
+ yScale = createYAxis(YAxisParams, _useRtl, axisData, chartType, props.barwidth, isIntegralDataset, false, props.roundedTicks);
268
281
  }
269
282
  /*
270
283
  * To create y axis tick values by if specified
271
284
  truncating the rest of the text and showing elipsis
272
285
  or showing the whole string,
273
- * */ props.chartType === ChartTypes.HorizontalBarChartWithAxis && yScale && createYAxisLabels(yAxisElement.current, yScale, props.noOfCharsToTruncate || 4, props.showYAxisLablesTooltip || false, startFromX, _useRtl);
286
+ * */ chartTypesToCheck.includes(props.chartType) && yScale && createYAxisLabels(yAxisElement.current, yScale, props.noOfCharsToTruncate || 4, props.showYAxisLablesTooltip || false, startFromX, _useRtl);
274
287
  // Call back to the chart.
275
288
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
276
289
  const _getData = (xScale, yScale)=>{
@@ -413,7 +426,8 @@ import { useFocusableGroup, useArrowNavigationGroup } from '@fluentui/react-tabs
413
426
  textAnchor: 'middle'
414
427
  },
415
428
  maxWidth: xAxisTitleMaximumAllowedWidth,
416
- wrapContent: wrapContent
429
+ wrapContent: wrapContent,
430
+ showBackground: true
417
431
  }), /*#__PURE__*/ React.createElement("g", {
418
432
  ref: (e)=>{
419
433
  yAxisElement.current = e;
@@ -426,7 +440,7 @@ import { useFocusableGroup, useArrowNavigationGroup } from '@fluentui/react-tabs
426
440
  yAxisElementSecondary.current = e;
427
441
  },
428
442
  id: `yAxisGElementSecondary${idForGraph}`,
429
- transform: `translate(${_useRtl ? margins.left : svgDimensions.width - margins.right}, 0)`,
443
+ transform: `translate(${_useRtl ? margins.left + startFromX : svgDimensions.width - margins.right - startFromX}, 0)`,
430
444
  className: classes.yAxis
431
445
  }), props.secondaryYAxistitle !== undefined && props.secondaryYAxistitle !== '' && /*#__PURE__*/ React.createElement(SVGTooltipText, {
432
446
  content: props.secondaryYAxistitle,
@@ -439,7 +453,8 @@ import { useFocusableGroup, useArrowNavigationGroup } from '@fluentui/react-tabs
439
453
  className: classes.axisTitle
440
454
  },
441
455
  maxWidth: yAxisTitleMaximumAllowedHeight,
442
- wrapContent: wrapContent
456
+ wrapContent: wrapContent,
457
+ showBackground: true
443
458
  })), children, props.yAxisTitle !== undefined && props.yAxisTitle !== '' && /*#__PURE__*/ React.createElement(SVGTooltipText, {
444
459
  content: props.yAxisTitle,
445
460
  textProps: {
@@ -451,7 +466,8 @@ import { useFocusableGroup, useArrowNavigationGroup } from '@fluentui/react-tabs
451
466
  className: classes.axisTitle
452
467
  },
453
468
  maxWidth: yAxisTitleMaximumAllowedHeight,
454
- wrapContent: wrapContent
469
+ wrapContent: wrapContent,
470
+ showBackground: true
455
471
  }))), !props.hideLegend && /*#__PURE__*/ React.createElement("div", {
456
472
  ref: (e)=>legendContainer = e,
457
473
  className: classes.legendContainer
@@ -1 +1 @@
1
- {"version":3,"sources":["CartesianChart.tsx"],"sourcesContent":["import * as React from 'react';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { ModifiedCartesianChartProps, HorizontalBarChartWithAxisDataPoint } from '../../index';\nimport { useCartesianChartStyles } from './useCartesianChartStyles.styles';\nimport {\n createNumericXAxis,\n createStringXAxis,\n IAxisData,\n getDomainNRangeValues,\n createDateXAxis,\n createYAxis,\n createStringYAxis,\n IMargins,\n getMinMaxOfYAxis,\n XAxisTypes,\n YAxisType,\n createWrapOfXLabels,\n rotateXAxisLabels,\n calculateLongestLabelWidth,\n createYAxisLabels,\n ChartTypes,\n wrapContent,\n useRtl,\n} from '../../utilities/index';\nimport { SVGTooltipText } from '../../utilities/SVGTooltipText';\nimport { ChartPopover } from './ChartPopover';\nimport { useFocusableGroup, useArrowNavigationGroup } from '@fluentui/react-tabster';\n\n/**\n * Cartesian Chart component\n * {@docCategory CartesianChart}\n */\nexport const CartesianChart: React.FunctionComponent<ModifiedCartesianChartProps> = React.forwardRef<\n HTMLDivElement,\n ModifiedCartesianChartProps\n>((props, forwardedRef) => {\n const chartContainer = React.useRef<HTMLDivElement>();\n let legendContainer: HTMLDivElement;\n const minLegendContainerHeight: number = 40;\n const xAxisElement = React.useRef<SVGSVGElement>();\n const yAxisElement = React.useRef<SVGSVGElement>();\n const yAxisElementSecondary = React.useRef<SVGSVGElement>();\n let margins: IMargins;\n const idForGraph: string = 'chart_';\n let _reqID: number;\n const _useRtl: boolean = useRtl();\n let _tickValues: (string | number)[];\n const titleMargin: number = 8;\n const _isFirstRender = React.useRef<boolean>(true);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _xScale: any;\n let isIntegralDataset: boolean = true;\n\n const [containerWidth, setContainerWidth] = React.useState<number>(0);\n const [containerHeight, setContainerHeight] = React.useState<number>(0);\n const [isRemoveValCalculated, setIsRemoveValCalculated] = React.useState<boolean>(true);\n const [removalValueForTextTuncate, setRemovalValueForTextTuncate] = React.useState<number>(0);\n const [startFromX, setStartFromX] = React.useState<number>(0);\n const [prevProps, setPrevProps] = React.useState<ModifiedCartesianChartProps | null>(null);\n\n /**\n * In RTL mode, Only graph will be rendered left/right. We need to provide left and right margins manually.\n * So that, in RTL, left margins becomes right margins and viceversa.\n * As graph needs to be drawn perfecty, these values consider as default values.\n * Same margins using for all other cartesian charts. Can be accessible through 'getMargins' call back method.\n */\n // eslint-disable-next-line prefer-const\n margins = {\n top: props.margins?.top ?? 20,\n bottom: props.margins?.bottom ?? 35,\n right: _useRtl ? props.margins?.left ?? 40 : props.margins?.right ?? props?.secondaryYScaleOptions ? 40 : 20,\n left: _useRtl ? (props.margins?.right ?? props?.secondaryYScaleOptions ? 40 : 20) : props.margins?.left ?? 40,\n };\n if (props.xAxisTitle !== undefined && props.xAxisTitle !== '') {\n margins.bottom! = props.margins?.bottom ?? 55;\n }\n if (props.yAxisTitle !== undefined && props.yAxisTitle !== '') {\n margins.left! = _useRtl\n ? props.margins?.right ?? props?.secondaryYAxistitle\n ? 60\n : 40\n : props.margins?.left ?? 60;\n margins.right! = _useRtl ? props.margins?.left ?? 60 : props.margins?.right ?? props?.secondaryYAxistitle ? 60 : 40;\n }\n\n const classes = useCartesianChartStyles(props);\n const focusAttributes = useFocusableGroup();\n const arrowAttributes = useArrowNavigationGroup({ axis: 'horizontal' });\n // ComponentdidMount and Componentwillunmount logic\n React.useEffect(() => {\n _fitParentContainer();\n if (props !== null) {\n setPrevProps(props);\n }\n if (props.chartType === ChartTypes.HorizontalBarChartWithAxis && props.showYAxisLables && yAxisElement.current) {\n const maxYAxisLabelLength = calculateLongestLabelWidth(\n props.points.map((point: HorizontalBarChartWithAxisDataPoint) => point.y),\n `.${classes.yAxis} text`,\n );\n if (startFromX !== maxYAxisLabelLength) {\n setStartFromX(maxYAxisLabelLength);\n }\n } else if (startFromX !== 0) {\n setStartFromX(0);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n isIntegralDataset = !props.points.some((point: { y: number }) => point.y % 1 !== 0);\n return () => {\n cancelAnimationFrame(_reqID);\n };\n }, [props]);\n\n // ComponentDidUpdate logic\n React.useEffect(() => {\n if (prevProps) {\n if (prevProps.height !== props.height || prevProps.width !== props.width) {\n _fitParentContainer();\n }\n }\n if (props.chartType === ChartTypes.HorizontalBarChartWithAxis && props.showYAxisLables && yAxisElement.current) {\n const maxYAxisLabelLength = calculateLongestLabelWidth(\n props.points.map((point: HorizontalBarChartWithAxisDataPoint) => point.y),\n `.${classes.yAxis} text`,\n );\n if (startFromX !== maxYAxisLabelLength) {\n setStartFromX(maxYAxisLabelLength);\n }\n } else if (startFromX !== 0) {\n setStartFromX(0);\n }\n if (prevProps !== null && prevProps.points !== props.points) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n isIntegralDataset = !props.points.some((point: { y: number }) => point.y % 1 !== 0);\n }\n }, [props, prevProps]);\n\n React.useEffect(() => {\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);\n\n if (\n isRemoveValCalculated &&\n removalValueForTextTuncate !== rotatedHeight! + margins.bottom! &&\n rotatedHeight! > 0\n ) {\n setRemovalValueForTextTuncate(rotatedHeight! + margins.bottom!);\n setIsRemoveValCalculated(false);\n }\n }\n });\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): JSX.Element {\n return <ChartPopover {...calloutProps} />;\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 const margin = { ...margins };\n if (props.chartType === ChartTypes.HorizontalBarChartWithAxis) {\n if (!_useRtl) {\n margin.left! += startFromX;\n } else {\n margin.right! += startFromX;\n }\n }\n // Callback for margins to the chart\n props.getmargins && props.getmargins(margin);\n\n let callout: JSX.Element | null = null;\n\n let children = null;\n if ((props.enableFirstRenderOptimization && chartContainer.current) || !props.enableFirstRenderOptimization) {\n _isFirstRender.current = false;\n const XAxisParams = {\n domainNRangeValues: 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 // This is only used for Horizontal Bar Chart with Axis for y as string axis\n startFromX,\n ),\n containerHeight: containerHeight - removalValueForTextTuncate!,\n margins: margins,\n xAxisElement: xAxisElement.current!,\n 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: containerWidth,\n hideTickOverlap:\n props.hideTickOverlap && !props.rotateXAxisLables && !props.showXAxisLablesTooltip && !props.wrapXAxisLables,\n };\n\n const YAxisParams = {\n margins: margins,\n containerWidth: 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: getMinMaxOfYAxis(points, chartType, 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 };\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: (string | number)[];\n switch (props.xAxisType!) {\n case XAxisTypes.NumericAxis:\n ({ xScale, tickValues } = createNumericXAxis(XAxisParams, props.tickParams!, props.chartType, culture));\n break;\n case XAxisTypes.DateAxis:\n ({ xScale, tickValues } = createDateXAxis(\n XAxisParams,\n props.tickParams!,\n culture,\n dateLocalizeOptions,\n timeFormatLocale,\n customDateTimeFormatter,\n props.useUTC,\n ));\n break;\n case XAxisTypes.StringAxis:\n ({ xScale, tickValues } = createStringXAxis(\n XAxisParams,\n props.tickParams!,\n props.datasetForXAxisDomain!,\n culture,\n ));\n break;\n default:\n ({ xScale, tickValues } = createNumericXAxis(XAxisParams, props.tickParams!, props.chartType, culture));\n }\n _xScale = xScale;\n _tickValues = tickValues;\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 set\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 const wrapLabelProps = {\n node: xAxisElement.current!,\n xAxis: xScale,\n showXAxisLablesTooltip: props.showXAxisLablesTooltip || false,\n noOfCharsToTruncate: props.noOfCharsToTruncate || 4,\n };\n const temp = xScale && (createWrapOfXLabels(wrapLabelProps) as number);\n // this value need to be updated for draw graph updated. So instead of using private value, using set\n if (isRemoveValCalculated && removalValueForTextTuncate !== temp) {\n setRemovalValueForTextTuncate(temp);\n setIsRemoveValCalculated(false);\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 yScale: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let yScaleSecondary: any;\n const axisData: IAxisData = { yAxisDomainValues: [] };\n if (props.yAxisType && props.yAxisType === YAxisType.StringAxis) {\n yScale = createStringYAxis(\n YAxisParams,\n props.stringDatasetForYAxisDomain!,\n _useRtl,\n props.chartType,\n props.barwidth,\n culture,\n );\n } else {\n if (props?.secondaryYScaleOptions) {\n const YAxisParamsSecondary = {\n margins: margins,\n containerWidth: 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 maxOfYVal: props.secondaryYScaleOptions?.yMaxValue ?? 100,\n yMinMaxValues: getMinMaxOfYAxis(points, chartType),\n yAxisPadding: props.yAxisPadding,\n };\n\n yScaleSecondary = createYAxis(\n YAxisParamsSecondary,\n _useRtl,\n axisData,\n chartType,\n props.barwidth!,\n isIntegralDataset,\n true,\n );\n }\n yScale = createYAxis(YAxisParams, _useRtl, axisData, chartType, props.barwidth!, isIntegralDataset);\n }\n\n /*\n * To create y axis tick values by if specified\n truncating the rest of the text and showing elipsis\n or showing the whole string,\n * */\n props.chartType === ChartTypes.HorizontalBarChartWithAxis &&\n yScale &&\n createYAxisLabels(\n yAxisElement.current!,\n yScale,\n props.noOfCharsToTruncate || 4,\n props.showYAxisLablesTooltip || false,\n startFromX,\n _useRtl,\n );\n\n // Call back to the chart.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _getData = (xScale: any, yScale: any) => {\n props.getGraphData &&\n props.getGraphData(\n xScale,\n yScale,\n containerHeight - removalValueForTextTuncate!,\n containerWidth,\n xAxisElement.current,\n yAxisElement.current,\n );\n };\n\n props.getAxisData && props.getAxisData(axisData);\n // Callback function for chart, returns axis\n _getData(xScale, yScale);\n\n children = props.children({\n xScale,\n yScale,\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 xAxisTitleMaximumAllowedWidth = svgDimensions.width - margins.left! - margins.right! - startFromX!;\n const yAxisTitleMaximumAllowedHeight =\n svgDimensions.height - margins.bottom! - margins.top! - removalValueForTextTuncate! - titleMargin;\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 _calculateChartMinWidth(): number {\n let labelWidth = 10; // Total padding on the left and right sides of the label\n\n // Case: rotated labels\n if (!props.wrapXAxisLables && props.rotateXAxisLables && props.xAxisType! === XAxisTypes.StringAxis) {\n const longestLabelWidth = calculateLongestLabelWidth(_tickValues, `.${classes.xAxis} text`);\n labelWidth += Math.ceil(longestLabelWidth * Math.cos(Math.PI / 4));\n }\n // Case: truncated labels\n else if (props.showXAxisLablesTooltip) {\n const tickValues = _tickValues.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(tickValues, `.${classes.xAxis} text`);\n labelWidth += Math.ceil(longestLabelWidth);\n }\n // Case: wrapped labels\n else if (props.wrapXAxisLables) {\n const words: string[] = [];\n _tickValues.forEach((val: string) => {\n words.push(...val.toString().split(/\\s+/));\n });\n\n const longestLabelWidth = calculateLongestLabelWidth(words, `.${classes.xAxis} text`);\n labelWidth += Math.max(Math.ceil(longestLabelWidth), 10);\n }\n // Default case\n else {\n const longestLabelWidth = calculateLongestLabelWidth(_tickValues, `.${classes.xAxis} text`);\n labelWidth += Math.ceil(longestLabelWidth);\n }\n\n let minChartWidth = margins.left! + margins.right! + labelWidth * (_tickValues.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 /**\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) => (chartContainer.current = rootElem)}\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 aria-label={props.chartTitle}\n style={{ display: 'block' }}\n {...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 content={props.xAxisTitle}\n textProps={{\n x: margins.left! + startFromX + xAxisTitleMaximumAllowedWidth / 2,\n y: svgDimensions.height - titleMargin,\n className: classes.axisTitle!,\n textAnchor: 'middle',\n }}\n maxWidth={xAxisTitleMaximumAllowedWidth}\n wrapContent={wrapContent}\n />\n )}\n <g\n ref={(e: SVGSVGElement | null) => {\n yAxisElement.current = e!;\n }}\n id={`yAxisGElement${idForGraph}`}\n transform={`translate(${\n _useRtl ? svgDimensions.width - margins.right! - startFromX : margins.left! + startFromX\n }, 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 content={props.secondaryYAxistitle}\n textProps={{\n x: (yAxisTitleMaximumAllowedHeight - margins.bottom!) / 2 + removalValueForTextTuncate!,\n y: _useRtl ? startFromX - titleMargin : svgDimensions.width - margins.right!,\n textAnchor: 'middle',\n transform: `translate(${\n _useRtl ? margins.right! / 2 - titleMargin : margins.right! / 2 + titleMargin\n },\n ${svgDimensions.height - margins.bottom! - margins.top! - titleMargin})rotate(-90)`,\n className: classes.axisTitle!,\n }}\n maxWidth={yAxisTitleMaximumAllowedHeight}\n wrapContent={wrapContent}\n />\n )}\n </g>\n )}\n {children}\n {props.yAxisTitle !== undefined && props.yAxisTitle !== '' && (\n <SVGTooltipText\n content={props.yAxisTitle}\n textProps={{\n x: (yAxisTitleMaximumAllowedHeight - margins.bottom!) / 2 + removalValueForTextTuncate!,\n y: _useRtl\n ? svgDimensions.width - margins.right! / 2 + titleMargin\n : margins.left! / 2 + startFromX - titleMargin,\n textAnchor: 'middle',\n transform: `translate(0,\n ${svgDimensions.height - margins.bottom! - margins.top! - titleMargin})rotate(-90)`,\n className: classes.axisTitle!,\n }}\n maxWidth={yAxisTitleMaximumAllowedHeight}\n wrapContent={wrapContent}\n />\n )}\n </svg>\n </div>\n\n {!props.hideLegend && (\n <div ref={(e: HTMLDivElement) => (legendContainer = e)} className={classes.legendContainer}>\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","createNumericXAxis","createStringXAxis","getDomainNRangeValues","createDateXAxis","createYAxis","createStringYAxis","getMinMaxOfYAxis","XAxisTypes","YAxisType","createWrapOfXLabels","rotateXAxisLabels","calculateLongestLabelWidth","createYAxisLabels","ChartTypes","wrapContent","useRtl","SVGTooltipText","ChartPopover","useFocusableGroup","useArrowNavigationGroup","CartesianChart","forwardRef","props","forwardedRef","chartContainer","useRef","legendContainer","minLegendContainerHeight","xAxisElement","yAxisElement","yAxisElementSecondary","margins","idForGraph","_reqID","_useRtl","_tickValues","titleMargin","_isFirstRender","_xScale","isIntegralDataset","containerWidth","setContainerWidth","useState","containerHeight","setContainerHeight","isRemoveValCalculated","setIsRemoveValCalculated","removalValueForTextTuncate","setRemovalValueForTextTuncate","startFromX","setStartFromX","prevProps","setPrevProps","top","bottom","right","left","secondaryYScaleOptions","xAxisTitle","undefined","yAxisTitle","secondaryYAxistitle","classes","focusAttributes","arrowAttributes","axis","useEffect","_fitParentContainer","chartType","HorizontalBarChartWithAxis","showYAxisLables","current","maxYAxisLabelLength","points","map","point","y","yAxis","some","cancelAnimationFrame","height","width","wrapXAxisLables","rotateXAxisLables","xAxisType","StringAxis","rotateLabelProps","node","xAxis","rotatedHeight","useImperativeHandle","componentRef","_generateCallout","calloutProps","svgProps","culture","dateLocalizeOptions","timeFormatLocale","customDateTimeFormatter","parentRef","margin","getmargins","callout","children","enableFirstRenderOptimization","XAxisParams","domainNRangeValues","getDomainMargins","barwidth","tickValues","showRoundOffXTickValues","xAxisCount","xAxisTickCount","xAxistickSize","tickPadding","showXAxisLablesTooltip","xAxisPadding","xAxisInnerPadding","xAxisOuterPadding","hideTickOverlap","YAxisParams","yAxisTickFormat","yAxisTickCount","yMinValue","yMaxValue","maxOfYVal","yMinMaxValues","yAxisType","yAxisPadding","xScale","NumericAxis","tickParams","DateAxis","useUTC","datasetForXAxisDomain","wrapLabelProps","noOfCharsToTruncate","temp","yScale","yScaleSecondary","axisData","yAxisDomainValues","stringDatasetForYAxisDomain","YAxisParamsSecondary","showYAxisLablesTooltip","_getData","getGraphData","getAxisData","hideTooltip","isPopoverOpen","svgDimensions","xAxisTitleMaximumAllowedWidth","yAxisTitleMaximumAllowedHeight","legendContainerHeight","hideLegend","legendContainerComputedStyles","getComputedStyle","getBoundingClientRect","parseFloat","marginTop","marginBottom","container","currentContainerWidth","reflowProps","mode","Math","max","_calculateChartMinWidth","currentContainerHeight","shouldResize","_onChartLeave","onChartMouseLeave","labelWidth","longestLabelWidth","ceil","cos","PI","val","numChars","toString","length","slice","words","forEach","push","split","minChartWidth","GroupedVerticalBarChart","VerticalBarChart","VerticalStackedBarChart","includes","minDomainMargin","div","id","className","root","role","ref","rootElem","onMouseLeave","chartWrapper","svg","aria-label","chartTitle","style","display","g","e","transform","content","textProps","x","axisTitle","textAnchor","maxWidth","legendBars","Suspense","fallback","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,oBAACsC;QAAIK,KAAK,CAACU,IAAuBrL,kBAAkBqL;QAAIb,WAAWpI,QAAQpC,eAAe;OACvFJ,MAAMiM,UAAU,GAIpBjH,yBAAW,oBAACxG,MAAM0N,QAAQ;QAACC,wBAAU,oBAACzB,aAAI;OAAmB1F;AAGpE,GAAG;AACHlF,eAAesM,WAAW,GAAG"}
1
+ {"version":3,"sources":["CartesianChart.tsx"],"sourcesContent":["import * as React from 'react';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { ModifiedCartesianChartProps, HorizontalBarChartWithAxisDataPoint, HeatMapChartDataPoint } from '../../index';\nimport { useCartesianChartStyles } from './useCartesianChartStyles.styles';\nimport {\n createNumericXAxis,\n createStringXAxis,\n IAxisData,\n getDomainNRangeValues,\n createDateXAxis,\n createYAxis,\n createStringYAxis,\n IMargins,\n getMinMaxOfYAxis,\n XAxisTypes,\n YAxisType,\n createWrapOfXLabels,\n rotateXAxisLabels,\n calculateLongestLabelWidth,\n createYAxisLabels,\n ChartTypes,\n wrapContent,\n useRtl,\n} from '../../utilities/index';\nimport { SVGTooltipText } from '../../utilities/SVGTooltipText';\nimport { ChartPopover } from './ChartPopover';\nimport { useFocusableGroup, useArrowNavigationGroup } from '@fluentui/react-tabster';\n\n/**\n * Cartesian Chart component\n * {@docCategory CartesianChart}\n */\nexport const CartesianChart: React.FunctionComponent<ModifiedCartesianChartProps> = React.forwardRef<\n HTMLDivElement,\n ModifiedCartesianChartProps\n>((props, forwardedRef) => {\n const chartContainer = React.useRef<HTMLDivElement>();\n let legendContainer: HTMLDivElement;\n const minLegendContainerHeight: number = 40;\n const xAxisElement = React.useRef<SVGSVGElement>();\n const yAxisElement = React.useRef<SVGSVGElement>();\n const yAxisElementSecondary = React.useRef<SVGSVGElement>();\n let margins: IMargins;\n const idForGraph: string = 'chart_';\n let _reqID: number;\n const _useRtl: boolean = useRtl();\n let _tickValues: (string | number)[];\n const titleMargin: number = 8;\n const _isFirstRender = React.useRef<boolean>(true);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _xScale: any;\n let isIntegralDataset: boolean = true;\n\n const [containerWidth, setContainerWidth] = React.useState<number>(0);\n const [containerHeight, setContainerHeight] = React.useState<number>(0);\n const [isRemoveValCalculated, setIsRemoveValCalculated] = React.useState<boolean>(true);\n const [removalValueForTextTuncate, setRemovalValueForTextTuncate] = React.useState<number>(0);\n const [startFromX, setStartFromX] = React.useState<number>(0);\n const [prevProps, setPrevProps] = React.useState<ModifiedCartesianChartProps | null>(null);\n\n const chartTypesToCheck = [ChartTypes.HorizontalBarChartWithAxis, ChartTypes.HeatMapChart];\n /**\n * In RTL mode, Only graph will be rendered left/right. We need to provide left and right margins manually.\n * So that, in RTL, left margins becomes right margins and viceversa.\n * As graph needs to be drawn perfecty, these values consider as default values.\n * Same margins using for all other cartesian charts. Can be accessible through 'getMargins' call back method.\n */\n // eslint-disable-next-line prefer-const\n margins = {\n top: props.margins?.top ?? 20,\n bottom: props.margins?.bottom ?? 35,\n right: _useRtl ? props.margins?.left ?? 40 : props.margins?.right ?? props?.secondaryYScaleOptions ? 40 : 20,\n left: _useRtl ? (props.margins?.right ?? props?.secondaryYScaleOptions ? 40 : 20) : props.margins?.left ?? 40,\n };\n if (props.xAxisTitle !== undefined && props.xAxisTitle !== '') {\n margins.bottom! = props.margins?.bottom ?? 55;\n }\n if (props.yAxisTitle !== undefined && props.yAxisTitle !== '') {\n margins.left! = _useRtl\n ? props.margins?.right ?? props?.secondaryYAxistitle\n ? 80\n : 40\n : props.margins?.left ?? 60;\n margins.right! = _useRtl ? props.margins?.left ?? 60 : props.margins?.right ?? props?.secondaryYAxistitle ? 80 : 40;\n }\n\n const classes = useCartesianChartStyles(props);\n const focusAttributes = useFocusableGroup();\n const arrowAttributes = useArrowNavigationGroup({ axis: 'horizontal' });\n // ComponentdidMount and Componentwillunmount logic\n React.useEffect(() => {\n _fitParentContainer();\n if (props !== null) {\n setPrevProps(props);\n }\n if (chartTypesToCheck.includes(props.chartType) && props.showYAxisLables && yAxisElement) {\n const maxYAxisLabelLength = calculateMaxYAxisLabelLength(props.chartType, props.points, classes.yAxis!);\n if (startFromX !== maxYAxisLabelLength) {\n setStartFromX(maxYAxisLabelLength);\n }\n } else if (startFromX !== 0) {\n setStartFromX(0);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n isIntegralDataset = !props.points.some((point: { y: number }) => point.y % 1 !== 0);\n return () => {\n cancelAnimationFrame(_reqID);\n };\n }, [props]);\n\n // ComponentDidUpdate logic\n React.useEffect(() => {\n if (prevProps) {\n if (prevProps.height !== props.height || prevProps.width !== props.width) {\n _fitParentContainer();\n }\n }\n if (chartTypesToCheck.includes(props.chartType) && props.showYAxisLables && yAxisElement) {\n const maxYAxisLabelLength = calculateMaxYAxisLabelLength(props.chartType, props.points, classes.yAxis!);\n if (startFromX !== maxYAxisLabelLength) {\n setStartFromX(maxYAxisLabelLength);\n }\n } else if (startFromX !== 0) {\n setStartFromX(0);\n }\n if (prevProps !== null && prevProps.points !== props.points) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n isIntegralDataset = !props.points.some((point: { y: number }) => point.y % 1 !== 0);\n }\n }, [props, prevProps]);\n\n React.useEffect(() => {\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);\n\n if (\n isRemoveValCalculated &&\n removalValueForTextTuncate !== rotatedHeight! + margins.bottom! &&\n rotatedHeight! > 0\n ) {\n setRemovalValueForTextTuncate(rotatedHeight! + margins.bottom!);\n setIsRemoveValCalculated(false);\n }\n }\n });\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): JSX.Element {\n return <ChartPopover {...calloutProps} />;\n }\n\n function calculateMaxYAxisLabelLength(\n chartType: ChartTypes,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n points: any[],\n className: string,\n ): number {\n if (chartType === ChartTypes.HeatMapChart) {\n return calculateLongestLabelWidth(\n points[0]?.data?.map((point: HeatMapChartDataPoint) => point.y),\n `.${className} text`,\n );\n } else {\n return calculateLongestLabelWidth(\n points?.map((point: HorizontalBarChartWithAxisDataPoint) => point.y),\n `.${className} text`,\n );\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 const margin = { ...margins };\n if (chartTypesToCheck.includes(props.chartType)) {\n if (!_useRtl) {\n margin.left! += startFromX;\n } else {\n margin.right! += startFromX;\n }\n }\n // Callback for margins to the chart\n props.getmargins && props.getmargins(margin);\n\n let callout: JSX.Element | null = null;\n\n let children = null;\n if ((props.enableFirstRenderOptimization && chartContainer.current) || !props.enableFirstRenderOptimization) {\n _isFirstRender.current = false;\n const XAxisParams = {\n domainNRangeValues: 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 // This is only used for Horizontal Bar Chart with Axis for y as string axis\n startFromX,\n ),\n containerHeight: containerHeight - removalValueForTextTuncate!,\n margins: margins,\n xAxisElement: xAxisElement.current!,\n 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: containerWidth,\n hideTickOverlap:\n props.hideTickOverlap && !props.rotateXAxisLables && !props.showXAxisLablesTooltip && !props.wrapXAxisLables,\n };\n\n const YAxisParams = {\n margins: margins,\n containerWidth: 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: getMinMaxOfYAxis(points, chartType, 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 };\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: (string | number)[];\n switch (props.xAxisType!) {\n case XAxisTypes.NumericAxis:\n ({ xScale, tickValues } = createNumericXAxis(XAxisParams, props.tickParams!, props.chartType, culture));\n break;\n case XAxisTypes.DateAxis:\n ({ xScale, tickValues } = createDateXAxis(\n XAxisParams,\n props.tickParams!,\n culture,\n dateLocalizeOptions,\n timeFormatLocale,\n customDateTimeFormatter,\n props.useUTC,\n ));\n break;\n case XAxisTypes.StringAxis:\n ({ xScale, tickValues } = createStringXAxis(\n XAxisParams,\n props.tickParams!,\n props.datasetForXAxisDomain!,\n culture,\n ));\n break;\n default:\n ({ xScale, tickValues } = createNumericXAxis(XAxisParams, props.tickParams!, props.chartType, culture));\n }\n _xScale = xScale;\n _tickValues = tickValues;\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 set\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 const wrapLabelProps = {\n node: xAxisElement.current!,\n xAxis: xScale,\n showXAxisLablesTooltip: props.showXAxisLablesTooltip || false,\n noOfCharsToTruncate: props.noOfCharsToTruncate || 4,\n };\n const temp = xScale && (createWrapOfXLabels(wrapLabelProps) as number);\n // this value need to be updated for draw graph updated. So instead of using private value, using set\n if (isRemoveValCalculated && removalValueForTextTuncate !== temp) {\n setRemovalValueForTextTuncate(temp);\n setIsRemoveValCalculated(false);\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 yScale: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let yScaleSecondary: any;\n const axisData: IAxisData = { yAxisDomainValues: [] };\n if (props.yAxisType && props.yAxisType === YAxisType.StringAxis) {\n yScale = createStringYAxis(\n YAxisParams,\n props.stringDatasetForYAxisDomain!,\n _useRtl,\n props.chartType,\n props.barwidth,\n culture,\n );\n } else {\n if (props?.secondaryYScaleOptions) {\n const YAxisParamsSecondary = {\n margins: margins,\n containerWidth: 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 maxOfYVal: props.secondaryYScaleOptions?.yMaxValue ?? 100,\n yMinMaxValues: getMinMaxOfYAxis(points, chartType),\n yAxisPadding: props.yAxisPadding,\n };\n\n yScaleSecondary = createYAxis(\n YAxisParamsSecondary,\n _useRtl,\n axisData,\n chartType,\n props.barwidth!,\n isIntegralDataset,\n true,\n props.roundedTicks!,\n );\n }\n yScale = createYAxis(\n YAxisParams,\n _useRtl,\n axisData,\n chartType,\n props.barwidth!,\n isIntegralDataset,\n false,\n props.roundedTicks!,\n );\n }\n\n /*\n * To create y axis tick values by if specified\n truncating the rest of the text and showing elipsis\n or showing the whole string,\n * */\n chartTypesToCheck.includes(props.chartType) &&\n yScale &&\n createYAxisLabels(\n yAxisElement.current!,\n yScale,\n props.noOfCharsToTruncate || 4,\n props.showYAxisLablesTooltip || false,\n startFromX,\n _useRtl,\n );\n\n // Call back to the chart.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _getData = (xScale: any, yScale: any) => {\n props.getGraphData &&\n props.getGraphData(\n xScale,\n yScale,\n containerHeight - removalValueForTextTuncate!,\n containerWidth,\n xAxisElement.current,\n yAxisElement.current,\n );\n };\n\n props.getAxisData && props.getAxisData(axisData);\n // Callback function for chart, returns axis\n _getData(xScale, yScale);\n\n children = props.children({\n xScale,\n yScale,\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 xAxisTitleMaximumAllowedWidth = svgDimensions.width - margins.left! - margins.right! - startFromX!;\n const yAxisTitleMaximumAllowedHeight =\n svgDimensions.height - margins.bottom! - margins.top! - removalValueForTextTuncate! - titleMargin;\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 _calculateChartMinWidth(): number {\n let labelWidth = 10; // Total padding on the left and right sides of the label\n\n // Case: rotated labels\n if (!props.wrapXAxisLables && props.rotateXAxisLables && props.xAxisType! === XAxisTypes.StringAxis) {\n const longestLabelWidth = calculateLongestLabelWidth(_tickValues, `.${classes.xAxis} text`);\n labelWidth += Math.ceil(longestLabelWidth * Math.cos(Math.PI / 4));\n }\n // Case: truncated labels\n else if (props.showXAxisLablesTooltip) {\n const tickValues = _tickValues.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(tickValues, `.${classes.xAxis} text`);\n labelWidth += Math.ceil(longestLabelWidth);\n }\n // Case: wrapped labels\n else if (props.wrapXAxisLables) {\n const words: string[] = [];\n _tickValues.forEach((val: string) => {\n words.push(...val.toString().split(/\\s+/));\n });\n\n const longestLabelWidth = calculateLongestLabelWidth(words, `.${classes.xAxis} text`);\n labelWidth += Math.max(Math.ceil(longestLabelWidth), 10);\n }\n // Default case\n else {\n const longestLabelWidth = calculateLongestLabelWidth(_tickValues, `.${classes.xAxis} text`);\n labelWidth += Math.ceil(longestLabelWidth);\n }\n\n let minChartWidth = margins.left! + margins.right! + labelWidth * (_tickValues.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 /**\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) => (chartContainer.current = rootElem)}\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 aria-label={props.chartTitle}\n style={{ display: 'block' }}\n {...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 content={props.xAxisTitle}\n textProps={{\n x: margins.left! + startFromX + xAxisTitleMaximumAllowedWidth / 2,\n y: svgDimensions.height - titleMargin,\n className: classes.axisTitle!,\n textAnchor: 'middle',\n }}\n maxWidth={xAxisTitleMaximumAllowedWidth}\n wrapContent={wrapContent}\n showBackground={true}\n />\n )}\n <g\n ref={(e: SVGSVGElement | null) => {\n yAxisElement.current = e!;\n }}\n id={`yAxisGElement${idForGraph}`}\n transform={`translate(${\n _useRtl ? svgDimensions.width - margins.right! - startFromX : margins.left! + startFromX\n }, 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(${\n _useRtl ? margins.left! + startFromX : svgDimensions.width - margins.right! - startFromX\n }, 0)`}\n className={classes.yAxis}\n />\n {props.secondaryYAxistitle !== undefined && props.secondaryYAxistitle !== '' && (\n <SVGTooltipText\n content={props.secondaryYAxistitle}\n textProps={{\n x: (yAxisTitleMaximumAllowedHeight - margins.bottom!) / 2 + removalValueForTextTuncate!,\n y: _useRtl ? startFromX - titleMargin : svgDimensions.width - margins.right!,\n textAnchor: 'middle',\n transform: `translate(${\n _useRtl ? margins.right! / 2 - titleMargin : margins.right! / 2 + titleMargin\n },\n ${svgDimensions.height - margins.bottom! - margins.top! - titleMargin})rotate(-90)`,\n className: classes.axisTitle!,\n }}\n maxWidth={yAxisTitleMaximumAllowedHeight}\n wrapContent={wrapContent}\n showBackground={true}\n />\n )}\n </g>\n )}\n {children}\n {props.yAxisTitle !== undefined && props.yAxisTitle !== '' && (\n <SVGTooltipText\n content={props.yAxisTitle}\n textProps={{\n x: (yAxisTitleMaximumAllowedHeight - margins.bottom!) / 2 + removalValueForTextTuncate!,\n y: _useRtl\n ? svgDimensions.width - margins.right! / 2 + titleMargin\n : margins.left! / 2 + startFromX - titleMargin,\n textAnchor: 'middle',\n transform: `translate(0,\n ${svgDimensions.height - margins.bottom! - margins.top! - titleMargin})rotate(-90)`,\n className: classes.axisTitle!,\n }}\n maxWidth={yAxisTitleMaximumAllowedHeight}\n wrapContent={wrapContent}\n showBackground={true}\n />\n )}\n </svg>\n </div>\n\n {!props.hideLegend && (\n <div ref={(e: HTMLDivElement) => (legendContainer = e)} className={classes.legendContainer}>\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","createNumericXAxis","createStringXAxis","getDomainNRangeValues","createDateXAxis","createYAxis","createStringYAxis","getMinMaxOfYAxis","XAxisTypes","YAxisType","createWrapOfXLabels","rotateXAxisLabels","calculateLongestLabelWidth","createYAxisLabels","ChartTypes","wrapContent","useRtl","SVGTooltipText","ChartPopover","useFocusableGroup","useArrowNavigationGroup","CartesianChart","forwardRef","props","forwardedRef","chartContainer","useRef","legendContainer","minLegendContainerHeight","xAxisElement","yAxisElement","yAxisElementSecondary","margins","idForGraph","_reqID","_useRtl","_tickValues","titleMargin","_isFirstRender","_xScale","isIntegralDataset","containerWidth","setContainerWidth","useState","containerHeight","setContainerHeight","isRemoveValCalculated","setIsRemoveValCalculated","removalValueForTextTuncate","setRemovalValueForTextTuncate","startFromX","setStartFromX","prevProps","setPrevProps","chartTypesToCheck","HorizontalBarChartWithAxis","HeatMapChart","top","bottom","right","left","secondaryYScaleOptions","xAxisTitle","undefined","yAxisTitle","secondaryYAxistitle","classes","focusAttributes","arrowAttributes","axis","useEffect","_fitParentContainer","includes","chartType","showYAxisLables","maxYAxisLabelLength","calculateMaxYAxisLabelLength","points","yAxis","some","point","y","cancelAnimationFrame","height","width","wrapXAxisLables","rotateXAxisLables","xAxisType","StringAxis","rotateLabelProps","node","current","xAxis","rotatedHeight","useImperativeHandle","componentRef","_generateCallout","calloutProps","className","data","map","svgProps","culture","dateLocalizeOptions","timeFormatLocale","customDateTimeFormatter","parentRef","margin","getmargins","callout","children","enableFirstRenderOptimization","XAxisParams","domainNRangeValues","getDomainMargins","barwidth","tickValues","showRoundOffXTickValues","xAxisCount","xAxisTickCount","xAxistickSize","tickPadding","showXAxisLablesTooltip","xAxisPadding","xAxisInnerPadding","xAxisOuterPadding","hideTickOverlap","YAxisParams","yAxisTickFormat","yAxisTickCount","yMinValue","yMaxValue","maxOfYVal","yMinMaxValues","yAxisType","yAxisPadding","xScale","NumericAxis","tickParams","DateAxis","useUTC","datasetForXAxisDomain","wrapLabelProps","noOfCharsToTruncate","temp","yScale","yScaleSecondary","axisData","yAxisDomainValues","stringDatasetForYAxisDomain","YAxisParamsSecondary","roundedTicks","showYAxisLablesTooltip","_getData","getGraphData","getAxisData","hideTooltip","isPopoverOpen","svgDimensions","xAxisTitleMaximumAllowedWidth","yAxisTitleMaximumAllowedHeight","legendContainerHeight","hideLegend","legendContainerComputedStyles","getComputedStyle","getBoundingClientRect","parseFloat","marginTop","marginBottom","container","currentContainerWidth","reflowProps","mode","Math","max","_calculateChartMinWidth","currentContainerHeight","shouldResize","_onChartLeave","onChartMouseLeave","labelWidth","longestLabelWidth","ceil","cos","PI","val","numChars","toString","length","slice","words","forEach","push","split","minChartWidth","GroupedVerticalBarChart","VerticalBarChart","VerticalStackedBarChart","minDomainMargin","div","id","root","role","ref","rootElem","onMouseLeave","chartWrapper","svg","aria-label","chartTitle","style","display","g","e","transform","content","textProps","x","axisTitle","textAnchor","maxWidth","showBackground","legendBars","Suspense","fallback","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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