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