@fluentui/react-charts 9.0.1 → 9.0.3

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 (235) hide show
  1. package/CHANGELOG.md +58 -2
  2. package/dist/index.d.ts +1432 -238
  3. package/lib/AreaChart.js +1 -0
  4. package/lib/AreaChart.js.map +1 -0
  5. package/lib/GaugeChart.js +1 -0
  6. package/lib/GaugeChart.js.map +1 -0
  7. package/lib/GroupedVerticalBarChart.js +1 -0
  8. package/lib/GroupedVerticalBarChart.js.map +1 -0
  9. package/lib/HeatMapChart.js +1 -0
  10. package/lib/HeatMapChart.js.map +1 -0
  11. package/lib/HorizontalBarChartWithAxis.js +1 -0
  12. package/lib/HorizontalBarChartWithAxis.js.map +1 -0
  13. package/lib/SankeyChart.js +1 -0
  14. package/lib/SankeyChart.js.map +1 -0
  15. package/lib/ScatterChart.js +1 -0
  16. package/lib/ScatterChart.js.map +1 -0
  17. package/lib/VerticalStackedBarChart.js +1 -0
  18. package/lib/VerticalStackedBarChart.js.map +1 -0
  19. package/lib/components/AreaChart/AreaChart.js +775 -0
  20. package/lib/components/AreaChart/AreaChart.js.map +1 -0
  21. package/lib/components/AreaChart/AreaChart.types.js +4 -0
  22. package/lib/components/AreaChart/AreaChart.types.js.map +1 -0
  23. package/lib/components/AreaChart/index.js +3 -0
  24. package/lib/components/AreaChart/index.js.map +1 -0
  25. package/lib/components/AreaChart/useAreaChartStyles.styles.js +64 -0
  26. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -0
  27. package/lib/components/CommonComponents/CartesianChart.js +30 -14
  28. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  29. package/lib/components/CommonComponents/CartesianChart.types.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/GaugeChart/GaugeChart.js +592 -0
  39. package/lib/components/GaugeChart/GaugeChart.js.map +1 -0
  40. package/lib/components/GaugeChart/GaugeChart.types.js +4 -0
  41. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -0
  42. package/lib/components/GaugeChart/index.js +3 -0
  43. package/lib/components/GaugeChart/index.js.map +1 -0
  44. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +174 -0
  45. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -0
  46. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +501 -0
  47. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -0
  48. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +4 -0
  49. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -0
  50. package/lib/components/GroupedVerticalBarChart/index.js +3 -0
  51. package/lib/components/GroupedVerticalBarChart/index.js.map +1 -0
  52. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +90 -0
  53. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -0
  54. package/lib/components/HeatMapChart/HeatMapChart.js +588 -0
  55. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -0
  56. package/lib/components/HeatMapChart/HeatMapChart.types.js +4 -0
  57. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -0
  58. package/lib/components/HeatMapChart/index.js +3 -0
  59. package/lib/components/HeatMapChart/index.js.map +1 -0
  60. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +46 -0
  61. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -0
  62. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +571 -0
  63. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -0
  64. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +4 -0
  65. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -0
  66. package/lib/components/HorizontalBarChartWithAxis/index.js +3 -0
  67. package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -0
  68. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +76 -0
  69. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -0
  70. package/lib/components/Legends/Legends.js +38 -37
  71. package/lib/components/Legends/Legends.js.map +1 -1
  72. package/lib/components/Legends/Legends.types.js.map +1 -1
  73. package/lib/components/LineChart/LineChart.js +43 -35
  74. package/lib/components/LineChart/LineChart.js.map +1 -1
  75. package/lib/components/SankeyChart/SankeyChart.js +1022 -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 +465 -0
  84. package/lib/components/ScatterChart/ScatterChart.js.map +1 -0
  85. package/lib/components/ScatterChart/ScatterChart.types.js +4 -0
  86. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -0
  87. package/lib/components/ScatterChart/index.js +3 -0
  88. package/lib/components/ScatterChart/index.js.map +1 -0
  89. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +65 -0
  90. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -0
  91. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  92. package/lib/components/VerticalBarChart/VerticalBarChart.js +165 -88
  93. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  94. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  95. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +904 -0
  96. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -0
  97. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +1 -0
  98. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -0
  99. package/lib/components/VerticalStackedBarChart/index.js +3 -0
  100. package/lib/components/VerticalStackedBarChart/index.js.map +1 -0
  101. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +73 -0
  102. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -0
  103. package/lib/index.js +8 -0
  104. package/lib/index.js.map +1 -1
  105. package/lib/types/DataPoint.js +1 -3
  106. package/lib/types/DataPoint.js.map +1 -1
  107. package/lib/utilities/SVGTooltipText.js +49 -4
  108. package/lib/utilities/SVGTooltipText.js.map +1 -1
  109. package/lib/utilities/colors.js +20 -0
  110. package/lib/utilities/colors.js.map +1 -1
  111. package/lib/utilities/string.js +32 -0
  112. package/lib/utilities/string.js.map +1 -0
  113. package/lib/utilities/test-data.js +53 -0
  114. package/lib/utilities/test-data.js.map +1 -1
  115. package/lib/utilities/utilities.js +210 -20
  116. package/lib/utilities/utilities.js.map +1 -1
  117. package/lib-commonjs/AreaChart.js +6 -0
  118. package/lib-commonjs/AreaChart.js.map +1 -0
  119. package/lib-commonjs/GaugeChart.js +6 -0
  120. package/lib-commonjs/GaugeChart.js.map +1 -0
  121. package/lib-commonjs/GroupedVerticalBarChart.js +6 -0
  122. package/lib-commonjs/GroupedVerticalBarChart.js.map +1 -0
  123. package/lib-commonjs/HeatMapChart.js +6 -0
  124. package/lib-commonjs/HeatMapChart.js.map +1 -0
  125. package/lib-commonjs/HorizontalBarChartWithAxis.js +6 -0
  126. package/lib-commonjs/HorizontalBarChartWithAxis.js.map +1 -0
  127. package/lib-commonjs/SankeyChart.js +6 -0
  128. package/lib-commonjs/SankeyChart.js.map +1 -0
  129. package/lib-commonjs/ScatterChart.js +6 -0
  130. package/lib-commonjs/ScatterChart.js.map +1 -0
  131. package/lib-commonjs/VerticalStackedBarChart.js +6 -0
  132. package/lib-commonjs/VerticalStackedBarChart.js.map +1 -0
  133. package/lib-commonjs/components/AreaChart/AreaChart.js +781 -0
  134. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -0
  135. package/lib-commonjs/components/AreaChart/AreaChart.types.js +7 -0
  136. package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +1 -0
  137. package/lib-commonjs/components/AreaChart/index.js +8 -0
  138. package/lib-commonjs/components/AreaChart/index.js.map +1 -0
  139. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +104 -0
  140. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -0
  141. package/lib-commonjs/components/CommonComponents/CartesianChart.js +29 -14
  142. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  143. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  144. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +120 -73
  145. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  146. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +592 -178
  147. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  148. package/lib-commonjs/components/DonutChart/Arc/Arc.js +1 -1
  149. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  150. package/lib-commonjs/components/DonutChart/DonutChart.js +1 -1
  151. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  152. package/lib-commonjs/components/GaugeChart/GaugeChart.js +621 -0
  153. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -0
  154. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js +7 -0
  155. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -0
  156. package/lib-commonjs/components/GaugeChart/index.js +8 -0
  157. package/lib-commonjs/components/GaugeChart/index.js.map +1 -0
  158. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +252 -0
  159. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -0
  160. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +507 -0
  161. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -0
  162. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +7 -0
  163. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -0
  164. package/lib-commonjs/components/GroupedVerticalBarChart/index.js +8 -0
  165. package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +1 -0
  166. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +139 -0
  167. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -0
  168. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +599 -0
  169. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -0
  170. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js +7 -0
  171. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -0
  172. package/lib-commonjs/components/HeatMapChart/index.js +8 -0
  173. package/lib-commonjs/components/HeatMapChart/index.js.map +1 -0
  174. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +68 -0
  175. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -0
  176. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +580 -0
  177. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -0
  178. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +7 -0
  179. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -0
  180. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js +8 -0
  181. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +1 -0
  182. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +116 -0
  183. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -0
  184. package/lib-commonjs/components/Legends/Legends.js +37 -37
  185. package/lib-commonjs/components/Legends/Legends.js.map +1 -1
  186. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  187. package/lib-commonjs/components/LineChart/LineChart.js +41 -33
  188. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  189. package/lib-commonjs/components/SankeyChart/SankeyChart.js +1038 -0
  190. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -0
  191. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js +6 -0
  192. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -0
  193. package/lib-commonjs/components/SankeyChart/index.js +8 -0
  194. package/lib-commonjs/components/SankeyChart/index.js.map +1 -0
  195. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +179 -0
  196. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -0
  197. package/lib-commonjs/components/ScatterChart/ScatterChart.js +471 -0
  198. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -0
  199. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +7 -0
  200. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -0
  201. package/lib-commonjs/components/ScatterChart/index.js +8 -0
  202. package/lib-commonjs/components/ScatterChart/index.js.map +1 -0
  203. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +96 -0
  204. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -0
  205. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
  206. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +164 -87
  207. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  208. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  209. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +915 -0
  210. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -0
  211. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +6 -0
  212. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -0
  213. package/lib-commonjs/components/VerticalStackedBarChart/index.js +8 -0
  214. package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +1 -0
  215. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +120 -0
  216. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -0
  217. package/lib-commonjs/index.js +8 -0
  218. package/lib-commonjs/index.js.map +1 -1
  219. package/lib-commonjs/types/DataPoint.js +1 -3
  220. package/lib-commonjs/types/DataPoint.js.map +1 -1
  221. package/lib-commonjs/utilities/SVGTooltipText.js +49 -4
  222. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  223. package/lib-commonjs/utilities/colors.js +23 -0
  224. package/lib-commonjs/utilities/colors.js.map +1 -1
  225. package/lib-commonjs/utilities/string.js +29 -0
  226. package/lib-commonjs/utilities/string.js.map +1 -0
  227. package/lib-commonjs/utilities/test-data.js +59 -0
  228. package/lib-commonjs/utilities/test-data.js.map +1 -1
  229. package/lib-commonjs/utilities/utilities.js +206 -19
  230. package/lib-commonjs/utilities/utilities.js.map +1 -1
  231. package/package.json +11 -8
  232. package/lib/components/DeclarativeChart/PlotlySchema.js +0 -7
  233. package/lib/components/DeclarativeChart/PlotlySchema.js.map +0 -1
  234. package/lib-commonjs/components/DeclarativeChart/PlotlySchema.js +0 -10
  235. package/lib-commonjs/components/DeclarativeChart/PlotlySchema.js.map +0 -1
@@ -0,0 +1,592 @@
1
+ import * as React from 'react';
2
+ import { useGaugeChartStyles } from './useGaugeChartStyles.styles';
3
+ import { select as d3Select } from 'd3-selection';
4
+ import { arc as d3Arc } from 'd3-shape';
5
+ import { Points, areArraysEqual, formatValueWithSIPrefix, getAccessibleDataObject, getColorFromToken, getNextColor, pointTypes, useRtl } from '../../utilities/index';
6
+ import { convertToLocaleString } from '../../utilities/locale-util';
7
+ import { SVGTooltipText } from '../../utilities/SVGTooltipText';
8
+ import { Legends, Shape } from '../Legends/index';
9
+ import { useFocusableGroup } from '@fluentui/react-tabster';
10
+ import { ChartPopover } from '../CommonComponents/ChartPopover';
11
+ const GAUGE_MARGIN = 16;
12
+ const LABEL_WIDTH = 36;
13
+ const LABEL_HEIGHT = 16;
14
+ const LABEL_OFFSET = 4;
15
+ const TITLE_OFFSET = 11;
16
+ const EXTRA_NEEDLE_LENGTH = 4;
17
+ export const ARC_PADDING = 2;
18
+ export const BREAKPOINTS = [
19
+ {
20
+ minRadius: 52,
21
+ arcWidth: 12,
22
+ fontSize: 20
23
+ },
24
+ {
25
+ minRadius: 70,
26
+ arcWidth: 16,
27
+ fontSize: 24
28
+ },
29
+ {
30
+ minRadius: 88,
31
+ arcWidth: 20,
32
+ fontSize: 32
33
+ },
34
+ {
35
+ minRadius: 106,
36
+ arcWidth: 24,
37
+ fontSize: 32
38
+ },
39
+ {
40
+ minRadius: 124,
41
+ arcWidth: 28,
42
+ fontSize: 40
43
+ },
44
+ {
45
+ minRadius: 142,
46
+ arcWidth: 32,
47
+ fontSize: 40
48
+ }
49
+ ];
50
+ export const calcNeedleRotation = (chartValue, minValue, maxValue)=>{
51
+ let needleRotation = (chartValue - minValue) / (maxValue - minValue) * 180;
52
+ if (needleRotation < 0) {
53
+ needleRotation = 0;
54
+ } else if (needleRotation > 180) {
55
+ needleRotation = 180;
56
+ }
57
+ return needleRotation;
58
+ };
59
+ export const getSegmentLabel = (segment, minValue, maxValue, variant, isAriaLabel = false)=>{
60
+ if (isAriaLabel) {
61
+ return minValue === 0 && variant === 'single-segment' ? `${segment.legend}, ${segment.size} out of ${maxValue} or ${(segment.size / maxValue * 100).toFixed()}%` : `${segment.legend}, ${segment.start} to ${segment.end}`;
62
+ }
63
+ return minValue === 0 && variant === 'single-segment' ? `${segment.size} (${(segment.size / maxValue * 100).toFixed()}%)` : `${segment.start} - ${segment.end}`;
64
+ };
65
+ export const getChartValueLabel = (chartValue, minValue, maxValue, chartValueFormat, forCallout = false)=>{
66
+ if (forCallout) {
67
+ // When displaying the chart value as a percentage, use fractions in the callout, and vice versa.
68
+ // This helps clarify the actual value and avoid repetition.
69
+ return minValue !== 0 ? chartValue.toString() : chartValueFormat === 'fraction' ? `${(chartValue / maxValue * 100).toFixed()}%` : `${chartValue}/${maxValue}`;
70
+ }
71
+ return typeof chartValueFormat === 'function' ? chartValueFormat([
72
+ chartValue - minValue,
73
+ maxValue - minValue
74
+ ]) : minValue !== 0 ? chartValue.toString() : chartValueFormat === 'fraction' ? `${chartValue}/${maxValue}` : `${(chartValue / maxValue * 100).toFixed()}%`;
75
+ };
76
+ export const GaugeChart = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
77
+ var _props_legendProps;
78
+ const _getMargins = ()=>{
79
+ const { hideMinMax, chartTitle, sublabel } = props;
80
+ return {
81
+ left: (!hideMinMax ? LABEL_OFFSET + LABEL_WIDTH : 0) + GAUGE_MARGIN,
82
+ right: (!hideMinMax ? LABEL_OFFSET + LABEL_WIDTH : 0) + GAUGE_MARGIN,
83
+ top: (chartTitle ? TITLE_OFFSET + LABEL_HEIGHT : EXTRA_NEEDLE_LENGTH / 2) + GAUGE_MARGIN,
84
+ bottom: (sublabel ? LABEL_OFFSET + LABEL_HEIGHT : 0) + GAUGE_MARGIN
85
+ };
86
+ };
87
+ const _margins = _getMargins();
88
+ const _legendsHeight = !props.hideLegend ? 24 : 0;
89
+ const _rootElem = React.useRef(null);
90
+ const _isRTL = useRtl();
91
+ const [width, setWidth] = React.useState(140 + _getMargins().left + _getMargins().right);
92
+ const [height, setHeight] = React.useState(70 + _getMargins().top + _getMargins().bottom + _legendsHeight);
93
+ const [hoveredLegend, setHoveredLegend] = React.useState('');
94
+ const [selectedLegends, setSelectedLegends] = React.useState(((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends) || []);
95
+ const [focusedElement, setFocusedElement] = React.useState('');
96
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
97
+ const [clickPosition, setClickPosition] = React.useState({
98
+ x: 0,
99
+ y: 0
100
+ });
101
+ const [isPopoverOpen, setPopoverOpen] = React.useState(false);
102
+ const [hoverXValue, setHoverXValue] = React.useState('');
103
+ const [hoverYValues, setHoverYValues] = React.useState([]);
104
+ const prevPropsRef = React.useRef(null);
105
+ const _width = props.width || width;
106
+ const _height = props.height || height;
107
+ const _outerRadius = Math.min((_width - (_margins.left + _margins.right)) / 2, _height - (_margins.top + _margins.bottom + _legendsHeight));
108
+ const { arcWidth, chartValueSize } = _getStylesBasedOnBreakpoint();
109
+ const _innerRadius = _outerRadius - arcWidth;
110
+ let _minValue;
111
+ let _maxValue;
112
+ let _segments;
113
+ let _calloutAnchor = '';
114
+ React.useEffect(()=>{
115
+ if (prevPropsRef.current) {
116
+ var _prevProps_legendProps, _props_legendProps;
117
+ const prevProps = prevPropsRef.current;
118
+ if (!areArraysEqual((_prevProps_legendProps = prevProps.legendProps) === null || _prevProps_legendProps === void 0 ? void 0 : _prevProps_legendProps.selectedLegends, (_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends)) {
119
+ var _props_legendProps1;
120
+ setSelectedLegends(((_props_legendProps1 = props.legendProps) === null || _props_legendProps1 === void 0 ? void 0 : _props_legendProps1.selectedLegends) || []);
121
+ }
122
+ if (prevProps.height !== props.height || prevProps.width !== props.width) {
123
+ setWidth(props.width);
124
+ setHeight(props.height);
125
+ }
126
+ }
127
+ prevPropsRef.current = props;
128
+ }, [
129
+ props
130
+ ]);
131
+ React.useImperativeHandle(props.componentRef, ()=>({
132
+ chartContainer: _rootElem.current
133
+ }), []);
134
+ const classes = useGaugeChartStyles(props);
135
+ function _getStylesBasedOnBreakpoint() {
136
+ for(let index = BREAKPOINTS.length - 1; index >= 0; index -= 1){
137
+ if (_outerRadius >= BREAKPOINTS[index].minRadius) {
138
+ return {
139
+ arcWidth: BREAKPOINTS[index].arcWidth,
140
+ chartValueSize: BREAKPOINTS[index].fontSize
141
+ };
142
+ }
143
+ }
144
+ return {
145
+ arcWidth: BREAKPOINTS[0].arcWidth,
146
+ chartValueSize: BREAKPOINTS[0].fontSize
147
+ };
148
+ }
149
+ function _processProps() {
150
+ const { minValue = 0, maxValue, segments, roundCorners } = props;
151
+ let total = minValue;
152
+ const processedSegments = segments.map(// eslint-disable-next-line @typescript-eslint/no-explicit-any
153
+ (segment, index)=>{
154
+ const size = Math.max(segment.size, 0);
155
+ total += size;
156
+ return {
157
+ legend: segment.legend,
158
+ size,
159
+ color: typeof segment.color !== 'undefined' ? getColorFromToken(segment.color, false) : getNextColor(index, 0, false),
160
+ accessibilityData: segment.accessibilityData,
161
+ start: total - size,
162
+ end: total
163
+ };
164
+ });
165
+ if (typeof maxValue !== 'undefined' && total < maxValue) {
166
+ processedSegments.push({
167
+ legend: 'Unknown',
168
+ size: maxValue - total,
169
+ color: 'neutralLight',
170
+ start: total,
171
+ end: maxValue
172
+ });
173
+ total = maxValue;
174
+ }
175
+ const arcGenerator = d3Arc().cornerRadius(roundCorners ? 3 : 0).padAngle(ARC_PADDING / _outerRadius).padRadius(_outerRadius);
176
+ const rtlSafeSegments = _isRTL ? Array.from(processedSegments).reverse() : processedSegments;
177
+ let prevAngle = -Math.PI / 2;
178
+ // eslint-disable-next-line @typescript-eslint/no-shadow
179
+ const arcs = rtlSafeSegments.map((segment, index)=>{
180
+ const endAngle = prevAngle + segment.size / (total - minValue) * Math.PI;
181
+ const d = arcGenerator({
182
+ innerRadius: _innerRadius,
183
+ outerRadius: _outerRadius,
184
+ startAngle: prevAngle,
185
+ endAngle
186
+ });
187
+ prevAngle = endAngle;
188
+ return {
189
+ d,
190
+ segmentIndex: _isRTL ? processedSegments.length - 1 - index : index,
191
+ startAngle: prevAngle - segment.size / (total - minValue) * Math.PI,
192
+ endAngle
193
+ };
194
+ });
195
+ _minValue = minValue;
196
+ _maxValue = total;
197
+ _segments = processedSegments;
198
+ return {
199
+ arcs
200
+ };
201
+ }
202
+ function _renderNeedle() {
203
+ const needleRotation = calcNeedleRotation(props.chartValue, _minValue, _maxValue);
204
+ const rtlSafeNeedleRotation = _isRTL ? 180 - needleRotation : needleRotation;
205
+ const strokeWidth = 2;
206
+ const halfStrokeWidth = strokeWidth / 2;
207
+ const needleLength = _outerRadius - _innerRadius + EXTRA_NEEDLE_LENGTH;
208
+ return /*#__PURE__*/ React.createElement("g", {
209
+ transform: `rotate(${rtlSafeNeedleRotation}, 0, 0)`
210
+ }, /*#__PURE__*/ React.createElement("path", {
211
+ d: `
212
+ M 0,${-halfStrokeWidth - 3}
213
+ L ${-needleLength},${-halfStrokeWidth - 1}
214
+ A ${halfStrokeWidth + 1},${halfStrokeWidth + 1},0,0,0,${-needleLength},${halfStrokeWidth + 1}
215
+ L 0,${halfStrokeWidth + 3}
216
+ A ${halfStrokeWidth + 3},${halfStrokeWidth + 3},0,0,0,0,${-halfStrokeWidth - 3}
217
+ `,
218
+ strokeWidth: strokeWidth,
219
+ className: classes.needle,
220
+ transform: `translate(${-_innerRadius + EXTRA_NEEDLE_LENGTH / 2})`,
221
+ "data-is-focusable": true,
222
+ onFocus: (e)=>_handleFocus(e, 'Needle'),
223
+ onBlur: _handleBlur,
224
+ onMouseEnter: (e)=>_handleMouseOver(e, 'Needle'),
225
+ onMouseMove: (e)=>_handleMouseOver(e, 'Needle'),
226
+ role: "img",
227
+ "aria-label": 'Current value: ' + getChartValueLabel(props.chartValue, _minValue, _maxValue, props.chartValueFormat)
228
+ }));
229
+ }
230
+ function _renderLegends() {
231
+ if (props.hideLegend) {
232
+ return null;
233
+ }
234
+ const legends = _segments.map((segment, index)=>{
235
+ const color = segment.color || getNextColor(index, 0, false);
236
+ return {
237
+ title: segment.legend,
238
+ color,
239
+ hoverAction: ()=>{
240
+ setHoveredLegend(segment.legend);
241
+ },
242
+ onMouseOutAction: ()=>{
243
+ setHoveredLegend('');
244
+ }
245
+ };
246
+ });
247
+ return /*#__PURE__*/ React.createElement("div", {
248
+ className: classes.legendsContainer,
249
+ style: {
250
+ width: props.width
251
+ }
252
+ }, /*#__PURE__*/ React.createElement(Legends, {
253
+ legends: legends,
254
+ centerLegends: true,
255
+ ...props.legendProps,
256
+ // eslint-disable-next-line react/jsx-no-bind
257
+ onChange: _onLegendSelectionChange
258
+ }));
259
+ }
260
+ function _onLegendSelectionChange(// eslint-disable-next-line @typescript-eslint/no-shadow
261
+ selectedLegends, event, currentLegend) {
262
+ var _props_legendProps, _props_legendProps1;
263
+ if ((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.canSelectMultipleLegends) {
264
+ setSelectedLegends(selectedLegends);
265
+ } else {
266
+ setSelectedLegends(selectedLegends.slice(-1));
267
+ }
268
+ if ((_props_legendProps1 = props.legendProps) === null || _props_legendProps1 === void 0 ? void 0 : _props_legendProps1.onChange) {
269
+ props.legendProps.onChange(selectedLegends, event, currentLegend);
270
+ }
271
+ }
272
+ /**
273
+ * This function checks if the given legend is highlighted or not.
274
+ * A legend can be highlighted in 2 ways:
275
+ * 1. selection: if the user clicks on it
276
+ * 2. hovering: if there is no selected legend and the user hovers over it
277
+ */ function _legendHighlighted(legend) {
278
+ return _getHighlightedLegend().includes(legend);
279
+ }
280
+ /**
281
+ * This function checks if none of the legends is selected or hovered.
282
+ */ function _noLegendHighlighted() {
283
+ return _getHighlightedLegend().length === 0;
284
+ }
285
+ function _getHighlightedLegend() {
286
+ return selectedLegends.length > 0 ? selectedLegends : hoveredLegend ? [
287
+ hoveredLegend
288
+ ] : [];
289
+ }
290
+ // eslint-disable-next-line @typescript-eslint/no-shadow
291
+ function _handleFocus(focusEvent, focusedElement) {
292
+ _showCallout(focusEvent, focusedElement, true);
293
+ }
294
+ function _handleBlur() {
295
+ _hideCallout(true);
296
+ }
297
+ function _handleMouseOver(mouseEvent, hoveredElement) {
298
+ _showCallout(mouseEvent, hoveredElement, false);
299
+ }
300
+ function _handleMouseOut() {
301
+ _hideCallout(false);
302
+ }
303
+ function _handleCalloutDismiss() {
304
+ _hideCallout(false);
305
+ }
306
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
307
+ function _showCallout(event, legend, isFocusEvent) {
308
+ if (_calloutAnchor === legend) {
309
+ return;
310
+ }
311
+ let clientX = 0;
312
+ let clientY = 0;
313
+ if ('clientX' in event) {
314
+ clientX = event.clientX;
315
+ clientY = event.clientY;
316
+ } else {
317
+ // eslint-disable-next-line @typescript-eslint/no-shadow
318
+ const target = event.currentTarget;
319
+ if (target && 'getBoundingClientRect' in target) {
320
+ const boundingRect = target.getBoundingClientRect();
321
+ clientX = boundingRect.left + boundingRect.width / 2;
322
+ clientY = boundingRect.top + boundingRect.height / 2;
323
+ }
324
+ }
325
+ _calloutAnchor = legend;
326
+ // eslint-disable-next-line @typescript-eslint/no-shadow
327
+ const hoverXValue = 'Current value is ' + getChartValueLabel(props.chartValue, _minValue, _maxValue, props.chartValueFormat, true);
328
+ // eslint-disable-next-line @typescript-eslint/no-shadow
329
+ const hoverYValues = _segments.map((segment)=>{
330
+ const yValue = {
331
+ legend: segment.legend,
332
+ y: getSegmentLabel(segment, _minValue, _maxValue, props.variant),
333
+ color: segment.color
334
+ };
335
+ return yValue;
336
+ });
337
+ _updatePosition(clientX, clientY);
338
+ setPopoverOpen([
339
+ 'Needle',
340
+ 'Chart value'
341
+ ].includes(legend) || _noLegendHighlighted() || _legendHighlighted(legend));
342
+ setHoverXValue(hoverXValue);
343
+ setHoverYValues(hoverYValues);
344
+ if (isFocusEvent) {
345
+ setFocusedElement(legend);
346
+ }
347
+ }
348
+ function _hideCallout(isBlurEvent) {
349
+ _calloutAnchor = '';
350
+ setPopoverOpen(false);
351
+ setHoverXValue('');
352
+ setHoverYValues([]);
353
+ if (isBlurEvent) {
354
+ setFocusedElement('');
355
+ }
356
+ }
357
+ function _wrapContent(content, id, maxWidth) {
358
+ const textElement = d3Select(`#${id}`);
359
+ textElement.text(content);
360
+ if (!textElement.node()) {
361
+ return false;
362
+ }
363
+ let isOverflowing = false;
364
+ let textLength = textElement.node().getComputedTextLength();
365
+ while(textLength > maxWidth && content.length > 0){
366
+ content = content.slice(0, -1);
367
+ textElement.text(content + '...');
368
+ isOverflowing = true;
369
+ textLength = textElement.node().getComputedTextLength();
370
+ }
371
+ return isOverflowing;
372
+ }
373
+ // TO DO: Write a common functional component for Multi value callout and divide sub count method
374
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
375
+ function _multiValueCallout(calloutProps) {
376
+ const yValueHoverSubCountsExists = _yValueHoverSubCountsExists(calloutProps.YValueHover);
377
+ return /*#__PURE__*/ React.createElement("div", {
378
+ className: classes.calloutContentRoot
379
+ }, /*#__PURE__*/ React.createElement("div", {
380
+ className: classes.calloutDateTimeContainer,
381
+ style: yValueHoverSubCountsExists ? {
382
+ marginBottom: '11px'
383
+ } : {}
384
+ }, /*#__PURE__*/ React.createElement("div", {
385
+ className: classes.calloutContentX,
386
+ ...getAccessibleDataObject(calloutProps.xAxisCalloutAccessibilityData, 'text', false)
387
+ }, convertToLocaleString(calloutProps.hoverXValue, props.culture))), /*#__PURE__*/ React.createElement("div", {
388
+ className: classes.calloutInfoContainer,
389
+ style: yValueHoverSubCountsExists ? {
390
+ display: 'flex'
391
+ } : {}
392
+ }, calloutProps.YValueHover && calloutProps.YValueHover.map((yValue, index, yValues)=>{
393
+ const isLast = index + 1 === yValues.length;
394
+ const { shouldDrawBorderBottom = false } = yValue;
395
+ return /*#__PURE__*/ React.createElement("div", {
396
+ ...getAccessibleDataObject(yValue.callOutAccessibilityData, 'text', false),
397
+ key: `callout-content-${index}`,
398
+ style: yValueHoverSubCountsExists ? {
399
+ display: 'inline-block',
400
+ ...shouldDrawBorderBottom && {
401
+ paddingBottom: '10px'
402
+ }
403
+ } : {
404
+ ...shouldDrawBorderBottom && {
405
+ paddingBottom: '10px'
406
+ }
407
+ }
408
+ }, _getCalloutContent(yValue, index, yValueHoverSubCountsExists, isLast));
409
+ }), !!calloutProps.descriptionMessage && /*#__PURE__*/ React.createElement("div", {
410
+ className: classes.descriptionMessage
411
+ }, calloutProps.descriptionMessage)));
412
+ }
413
+ function _yValueHoverSubCountsExists(yValueHover) {
414
+ if (yValueHover) {
415
+ return yValueHover.some((yValue)=>yValue.yAxisCalloutData && typeof yValue.yAxisCalloutData !== 'string');
416
+ }
417
+ return false;
418
+ }
419
+ function _getCalloutContent(xValue, index, yValueHoverSubCountsExists, isLast) {
420
+ const marginStyle = isLast ? {} : {
421
+ marginRight: '16px'
422
+ };
423
+ const toDrawShape = xValue.index !== undefined && xValue.index !== -1;
424
+ const { culture } = props;
425
+ const yValue = convertToLocaleString(xValue.y, culture);
426
+ if (!xValue.yAxisCalloutData || typeof xValue.yAxisCalloutData === 'string') {
427
+ return /*#__PURE__*/ React.createElement("div", {
428
+ style: yValueHoverSubCountsExists ? marginStyle : {}
429
+ }, yValueHoverSubCountsExists && /*#__PURE__*/ React.createElement("div", {
430
+ className: "ms-fontWeight-semibold",
431
+ style: {
432
+ fontSize: '12pt'
433
+ }
434
+ }, xValue.legend, " (", yValue, ")"), /*#__PURE__*/ React.createElement("div", {
435
+ id: `${index}_${xValue.y}`,
436
+ className: classes.calloutBlockContainer,
437
+ style: {
438
+ borderLeft: `4px solid ${xValue.color}`
439
+ }
440
+ }, toDrawShape && /*#__PURE__*/ React.createElement(Shape, {
441
+ svgProps: {
442
+ className: classes.shapeStyles
443
+ },
444
+ pathProps: {
445
+ fill: xValue.color
446
+ },
447
+ shape: Points[xValue.index % Object.keys(pointTypes).length],
448
+ style: {
449
+ display: 'flex'
450
+ }
451
+ }), /*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/ React.createElement("div", {
452
+ className: classes.calloutlegendText
453
+ }, " ", xValue.legend), /*#__PURE__*/ React.createElement("div", {
454
+ className: classes.calloutContentY
455
+ }, convertToLocaleString(xValue.yAxisCalloutData ? xValue.yAxisCalloutData : xValue.y || xValue.data, culture)))));
456
+ } else {
457
+ const subcounts = xValue.yAxisCalloutData;
458
+ return /*#__PURE__*/ React.createElement("div", {
459
+ style: marginStyle
460
+ }, /*#__PURE__*/ React.createElement("div", {
461
+ className: "ms-fontWeight-semibold",
462
+ style: {
463
+ fontSize: '12pt'
464
+ }
465
+ }, xValue.legend, " (", yValue, ")"), Object.keys(subcounts).map((subcountName)=>{
466
+ return /*#__PURE__*/ React.createElement("div", {
467
+ key: subcountName,
468
+ className: classes.calloutBlockContainer
469
+ }, /*#__PURE__*/ React.createElement("div", {
470
+ className: classes.calloutlegendText
471
+ }, " ", convertToLocaleString(subcountName, culture)), /*#__PURE__*/ React.createElement("div", {
472
+ className: classes.calloutContentY
473
+ }, convertToLocaleString(subcounts[subcountName], culture)));
474
+ }));
475
+ }
476
+ }
477
+ function _updatePosition(newX, newY) {
478
+ const threshold = 1; // Set a threshold for movement
479
+ const { x, y } = clickPosition;
480
+ // Calculate the distance moved
481
+ const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));
482
+ // Update the position only if the distance moved is greater than the threshold
483
+ if (distance > threshold) {
484
+ setClickPosition({
485
+ x: newX,
486
+ y: newY
487
+ });
488
+ setPopoverOpen(true);
489
+ }
490
+ }
491
+ function _getChartTitle() {
492
+ const { chartTitle } = props;
493
+ return (chartTitle ? `${chartTitle}. ` : '') + `Gauge chart with ${_segments.length} segments. `;
494
+ }
495
+ const { arcs } = _processProps();
496
+ const focusAttributes = useFocusableGroup();
497
+ return /*#__PURE__*/ React.createElement("div", {
498
+ className: classes.root,
499
+ ref: (el)=>_rootElem.current = el,
500
+ ...focusAttributes
501
+ }, /*#__PURE__*/ React.createElement("svg", {
502
+ className: classes.chart,
503
+ style: {
504
+ width: props.width,
505
+ height: props.height - _legendsHeight
506
+ },
507
+ role: "region",
508
+ "aria-label": _getChartTitle(),
509
+ onMouseLeave: _handleMouseOut
510
+ }, /*#__PURE__*/ React.createElement("g", {
511
+ transform: `translate(${width / 2}, ${height - (_margins.bottom + _legendsHeight)})`
512
+ }, props.chartTitle && /*#__PURE__*/ React.createElement("text", {
513
+ x: 0,
514
+ y: -(_outerRadius + TITLE_OFFSET),
515
+ textAnchor: "middle",
516
+ className: classes.chartTitle,
517
+ "aria-hidden": true
518
+ }, props.chartTitle), !props.hideMinMax && /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("text", {
519
+ x: (_isRTL ? 1 : -1) * (_outerRadius + LABEL_OFFSET),
520
+ y: 0,
521
+ textAnchor: "end",
522
+ className: classes.limits,
523
+ role: "img",
524
+ "aria-label": `Min value: ${_minValue}`
525
+ }, formatValueWithSIPrefix(_minValue)), /*#__PURE__*/ React.createElement("text", {
526
+ x: (_isRTL ? -1 : 1) * (_outerRadius + LABEL_OFFSET),
527
+ y: 0,
528
+ textAnchor: "start",
529
+ className: classes.limits,
530
+ role: "img",
531
+ "aria-label": `Max value: ${_maxValue}`
532
+ }, formatValueWithSIPrefix(_maxValue))), arcs.map((arc, index)=>{
533
+ const segment = _segments[arc.segmentIndex];
534
+ return /*#__PURE__*/ React.createElement(React.Fragment, {
535
+ key: index
536
+ }, /*#__PURE__*/ React.createElement("path", {
537
+ d: arc.d,
538
+ strokeWidth: focusedElement === segment.legend ? ARC_PADDING : 0,
539
+ className: classes.segment,
540
+ fill: segment.color,
541
+ opacity: _legendHighlighted(segment.legend) || _noLegendHighlighted() ? 1 : 0.1,
542
+ ...getAccessibleDataObject({
543
+ ariaLabel: getSegmentLabel(segment, _minValue, _maxValue, props.variant, true),
544
+ ...segment.accessibilityData
545
+ }, 'img', true),
546
+ onFocus: (e)=>_handleFocus(e, segment.legend),
547
+ onBlur: _handleBlur,
548
+ onMouseEnter: (e)=>_handleMouseOver(e, segment.legend),
549
+ onMouseLeave: (e)=>_handleCalloutDismiss(),
550
+ onMouseMove: (e)=>_handleMouseOver(e, segment.legend),
551
+ "data-is-focusable": _legendHighlighted(segment.legend) || _noLegendHighlighted(),
552
+ tabIndex: segment.legend !== '' ? 0 : undefined
553
+ }));
554
+ }), _renderNeedle(), /*#__PURE__*/ React.createElement("g", {
555
+ onMouseEnter: (e)=>_handleMouseOver(e, 'Chart value'),
556
+ onMouseMove: (e)=>_handleMouseOver(e, 'Chart value')
557
+ }, /*#__PURE__*/ React.createElement(SVGTooltipText, {
558
+ content: getChartValueLabel(props.chartValue, _minValue, _maxValue, props.chartValueFormat),
559
+ textProps: {
560
+ x: 0,
561
+ y: 0,
562
+ textAnchor: 'middle',
563
+ className: classes.chartValue,
564
+ fontSize: chartValueSize,
565
+ 'aria-hidden': 'true'
566
+ },
567
+ maxWidth: _innerRadius * 2 - 24,
568
+ wrapContent: _wrapContent
569
+ })), props.sublabel && /*#__PURE__*/ React.createElement(SVGTooltipText, {
570
+ content: props.sublabel,
571
+ textProps: {
572
+ x: 0,
573
+ y: 4,
574
+ textAnchor: 'middle',
575
+ dominantBaseline: 'hanging',
576
+ className: classes.sublabel
577
+ },
578
+ maxWidth: _innerRadius * 2,
579
+ wrapContent: _wrapContent
580
+ }))), _renderLegends(), !props.hideTooltip && isPopoverOpen && /*#__PURE__*/ React.createElement(ChartPopover, {
581
+ ...props.calloutProps,
582
+ clickPosition: clickPosition,
583
+ isPopoverOpen: isPopoverOpen,
584
+ customCallout: {
585
+ customizedCallout: _multiValueCallout({
586
+ hoverXValue: hoverXValue,
587
+ YValueHover: hoverYValues
588
+ })
589
+ }
590
+ }));
591
+ });
592
+ GaugeChart.displayName = 'GaugeChart';