@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,465 @@
1
+ import * as React from 'react';
2
+ import { useScatterChartStyles_unstable } from './useScatterChartStyles.styles';
3
+ import { select as d3Select } from 'd3-selection';
4
+ import { Legends } from '../Legends/index';
5
+ import { max as d3Max, min as d3Min } from 'd3-array';
6
+ import { useId } from '@fluentui/react-utilities';
7
+ import { areArraysEqual, find } from '../../utilities/index';
8
+ import { CartesianChart } from '../../index';
9
+ import { tokens } from '@fluentui/react-theme';
10
+ import { calloutData, ChartTypes, XAxisTypes, tooltipOfXAxislabels, getTypeOfAxis, getNextColor, getColorFromToken, formatDate } from '../../utilities/index';
11
+ // Create a ScatterChart variant which uses these default styles and this styled subcomponent.
12
+ /**
13
+ * ScatterChart component
14
+ * {@docCategory ScatterChart}
15
+ */ export const ScatterChart = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
16
+ const _circleId = useId('circle');
17
+ const _seriesId = useId('seriesID');
18
+ const _verticalLine = useId('verticalLine');
19
+ const _tooltipId = useId('ScatterChartTooltipId_');
20
+ const _firstRenderOptimization = true;
21
+ const _emptyChartId = useId('_ScatterChart_empty');
22
+ let _points = _injectIndexPropertyInScatterChartData(props.data.lineChartData);
23
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
24
+ let _calloutPoints = calloutData(_points) || [];
25
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
26
+ let _xAxisScale = '';
27
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
+ let _yAxisScale = '';
29
+ let _uniqueCallOutID = '';
30
+ let _refArray = [];
31
+ let margins;
32
+ let renderSeries;
33
+ let _xAxisLabels = [];
34
+ let xAxisCalloutAccessibilityData = {};
35
+ let _xBandwidth = 0;
36
+ const cartesianChartRef = React.useRef(null);
37
+ const [hoverXValue, setHoverXValue] = React.useState('');
38
+ const [activeLegend, setActiveLegend] = React.useState('');
39
+ const [YValueHover, setYValueHover] = React.useState([]);
40
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
41
+ const [selectedLegendPoints, setSelectedLegendPoints] = React.useState([]);
42
+ const [isSelectedLegend, setIsSelectedLegend] = React.useState(false);
43
+ const [activePoint, setActivePoint] = React.useState('');
44
+ const [stackCalloutProps, setStackCalloutProps] = React.useState();
45
+ const [clickPosition, setClickPosition] = React.useState({
46
+ x: 0,
47
+ y: 0
48
+ });
49
+ const [isPopoverOpen, setPopoverOpen] = React.useState(false);
50
+ const [selectedLegends, setSelectedLegends] = React.useState([]);
51
+ const prevPropsRef = React.useRef(null);
52
+ React.useEffect(()=>{
53
+ if (prevPropsRef.current) {
54
+ var _prevProps_legendProps, _props_legendProps;
55
+ const prevProps = prevPropsRef.current;
56
+ 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)) {
57
+ var _props_legendProps1;
58
+ setSelectedLegends(((_props_legendProps1 = props.legendProps) === null || _props_legendProps1 === void 0 ? void 0 : _props_legendProps1.selectedLegends) || []);
59
+ }
60
+ }
61
+ prevPropsRef.current = props;
62
+ }, [
63
+ props
64
+ ]);
65
+ React.useImperativeHandle(props.componentRef, ()=>{
66
+ var _cartesianChartRef_current;
67
+ var _cartesianChartRef_current_chartContainer;
68
+ return {
69
+ chartContainer: (_cartesianChartRef_current_chartContainer = (_cartesianChartRef_current = cartesianChartRef.current) === null || _cartesianChartRef_current === void 0 ? void 0 : _cartesianChartRef_current.chartContainer) !== null && _cartesianChartRef_current_chartContainer !== void 0 ? _cartesianChartRef_current_chartContainer : null
70
+ };
71
+ }, []);
72
+ const _xAxisType = props.data.lineChartData && props.data.lineChartData.length > 0 && props.data.lineChartData[0].data && props.data.lineChartData[0].data.length > 0 ? getTypeOfAxis(props.data.lineChartData[0].data[0].x, true) : XAxisTypes.StringAxis;
73
+ const pointsRef = React.useRef([]);
74
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
75
+ const calloutPointsRef = React.useRef([]);
76
+ React.useEffect(()=>{
77
+ /** note that height and width are not used to resize or set as dimesions of the chart,
78
+ * fitParentContainer is responisble for setting the height and width or resizing of the svg/chart
79
+ */ if (_points !== _injectIndexPropertyInScatterChartData(props.data.lineChartData) || props.data !== _points) {
80
+ pointsRef.current = _injectIndexPropertyInScatterChartData(props.data.lineChartData);
81
+ calloutPointsRef.current = calloutData(pointsRef.current);
82
+ }
83
+ }, [
84
+ props.height,
85
+ props.width,
86
+ props.data,
87
+ _points
88
+ ]);
89
+ function _injectIndexPropertyInScatterChartData(scatterChartData) {
90
+ return scatterChartData ? scatterChartData.map((item, index)=>{
91
+ let color;
92
+ if (typeof item.color === 'undefined') {
93
+ color = getNextColor(index, 0);
94
+ } else {
95
+ color = getColorFromToken(item.color);
96
+ }
97
+ return {
98
+ ...item,
99
+ index: -1,
100
+ color
101
+ };
102
+ }) : [];
103
+ }
104
+ function updatePosition(newX, newY) {
105
+ const threshold = 1; // Set a threshold for movement
106
+ const { x, y } = clickPosition;
107
+ // Calculate the distance moved
108
+ const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));
109
+ // Update the position only if the distance moved is greater than the threshold
110
+ if (distance > threshold) {
111
+ setClickPosition({
112
+ x: newX,
113
+ y: newY
114
+ });
115
+ setPopoverOpen(true);
116
+ }
117
+ }
118
+ function _getMargins(_margins) {
119
+ margins = _margins;
120
+ }
121
+ function _initializeScatterChartData(xScale, yScale, containerHeight, containerWidth, xElement) {
122
+ _xAxisScale = xScale;
123
+ _yAxisScale = yScale;
124
+ renderSeries = _createPlot(xElement, containerHeight);
125
+ }
126
+ function _onHoverCardHide() {
127
+ setSelectedLegendPoints([]);
128
+ setIsSelectedLegend(false);
129
+ }
130
+ function _createLegends(data) {
131
+ const { legendProps } = props;
132
+ const isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);
133
+ const legendDataItems = data.map((point)=>{
134
+ const color = point.color;
135
+ // mapping data to the format Legends component needs
136
+ const legend = {
137
+ title: point.legend,
138
+ color,
139
+ onMouseOutAction: ()=>{
140
+ setActiveLegend('');
141
+ },
142
+ hoverAction: ()=>{
143
+ _handleChartMouseLeave();
144
+ setActiveLegend(point.legend);
145
+ },
146
+ ...point.legendShape && {
147
+ shape: point.legendShape
148
+ }
149
+ };
150
+ return legend;
151
+ });
152
+ return /*#__PURE__*/ React.createElement(Legends, {
153
+ legends: [
154
+ ...legendDataItems
155
+ ],
156
+ enabledWrapLines: props.enabledLegendsWrapLines,
157
+ overflowText: props.legendsOverflowText,
158
+ ...isLegendMultiSelectEnabled && {
159
+ onLegendHoverCardLeave: _onHoverCardHide
160
+ },
161
+ ...props.legendProps,
162
+ selectedLegends: selectedLegends,
163
+ onChange: _onLegendSelectionChange
164
+ });
165
+ }
166
+ function _onLegendSelectionChange(legendsSelected, event, currentLegend) {
167
+ var _props_legendProps, _props_legendProps1;
168
+ if ((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.canSelectMultipleLegends) {
169
+ setSelectedLegends(legendsSelected);
170
+ } else {
171
+ setSelectedLegends(legendsSelected.slice(-1));
172
+ }
173
+ if ((_props_legendProps1 = props.legendProps) === null || _props_legendProps1 === void 0 ? void 0 : _props_legendProps1.onChange) {
174
+ props.legendProps.onChange(legendsSelected, event, currentLegend);
175
+ }
176
+ }
177
+ function _getPointFill(seriesColor, pointId, pointIndex, isLastPoint) {
178
+ if (activePoint === pointId) {
179
+ return tokens.colorNeutralBackground1;
180
+ } else {
181
+ return seriesColor;
182
+ }
183
+ }
184
+ function _createPlot(xElement, containerHeight) {
185
+ const series = [];
186
+ if (isSelectedLegend) {
187
+ _points = selectedLegendPoints;
188
+ } else {
189
+ _points = _injectIndexPropertyInScatterChartData(props.data.lineChartData);
190
+ }
191
+ const yMax = d3Max(points, (point)=>{
192
+ return d3Max(point.data, (item)=>item.y);
193
+ });
194
+ const yMin = d3Min(points, (point)=>{
195
+ return d3Min(point.data, (item)=>item.y);
196
+ });
197
+ const yPadding = (yMax - yMin) * 0.1;
198
+ const yPaddingRange = Math.abs(_yAxisScale(yMin + yPadding) - _yAxisScale(yMin));
199
+ let maxMarkerRange = 40;
200
+ let xPaddingRange = 0;
201
+ if (_xAxisType === XAxisTypes.StringAxis) {
202
+ _xBandwidth = _xAxisScale.bandwidth() / 2;
203
+ xPaddingRange = _xBandwidth;
204
+ } else if (_xAxisType === XAxisTypes.DateAxis) {
205
+ const xMin = d3Min(points, (point)=>{
206
+ return d3Min(point.data, (item)=>item.x);
207
+ });
208
+ const xMax = d3Max(points, (point)=>{
209
+ return d3Max(point.data, (item)=>{
210
+ return item.x;
211
+ });
212
+ });
213
+ const xPadding = (xMax.getTime() - xMin.getTime()) * 0.1;
214
+ xPaddingRange = Math.abs(_xAxisScale(new Date(xMin.getTime() + xPadding)) - _xAxisScale(xMin));
215
+ } else {
216
+ const xMin = d3Min(points, (point)=>{
217
+ return d3Min(point.data, (item)=>item.x);
218
+ });
219
+ const xMax = d3Max(points, (point)=>{
220
+ return d3Max(point.data, (item)=>{
221
+ return item.x;
222
+ });
223
+ });
224
+ const xPadding = (xMax - xMin) * 0.1;
225
+ xPaddingRange = Math.abs(_xAxisScale(xMin + xPadding) - _xAxisScale(xMin));
226
+ }
227
+ maxMarkerRange = Math.min(maxMarkerRange, Math.min(xPaddingRange, yPaddingRange));
228
+ const maxMarkerSize = d3Max(_points, (point)=>{
229
+ return d3Max(point.data, (item)=>{
230
+ return item.markerSize;
231
+ });
232
+ });
233
+ for(let i = _points.length - 1; i >= 0; i--){
234
+ const pointsForSeries = [];
235
+ const legendVal = _points[i].legend;
236
+ const seriesColor = _points[i].color;
237
+ const verticaLineHeight = containerHeight - margins.bottom + 6;
238
+ for(let j = 0; j < _points[i].data.length; j++){
239
+ const seriesId = `${_seriesId}_${i}_${j}`;
240
+ const circleId = `${_circleId}_${i}_${j}`;
241
+ const { x, y, xAxisCalloutData, xAxisCalloutAccessibilityData } = _points[i].data[j];
242
+ let circleRadius = 3.5;
243
+ const pointMarkerSize = _points[i].data[j].markerSize;
244
+ if (pointMarkerSize !== undefined) {
245
+ circleRadius = Math.min(pointMarkerSize * maxMarkerRange / maxMarkerSize, pointMarkerSize);
246
+ }
247
+ const isLegendSelected = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;
248
+ const currentPointHidden = _points[i].hideNonActiveDots && activePoint !== circleId;
249
+ pointsForSeries.push(/*#__PURE__*/ React.createElement("circle", {
250
+ id: circleId,
251
+ key: circleId,
252
+ r: circleRadius,
253
+ cx: _xAxisScale(x) + _xBandwidth,
254
+ cy: _yAxisScale(y),
255
+ "data-is-focusable": isLegendSelected,
256
+ onMouseOver: (event)=>_handleHover(x, y, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event),
257
+ onMouseMove: (event)=>_handleHover(x, y, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event),
258
+ onMouseOut: _handleMouseOut,
259
+ onFocus: ()=>_handleFocus(seriesId, x, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData),
260
+ onBlur: _handleMouseOut,
261
+ ..._getClickHandler(_points[i].data[j].onDataPointClick),
262
+ opacity: isLegendSelected && !currentPointHidden ? 1 : 0.1,
263
+ fill: _getPointFill(seriesColor, circleId, j, false),
264
+ stroke: seriesColor,
265
+ role: "img",
266
+ "aria-label": _getAriaLabel(i, j),
267
+ tabIndex: _points[i].legend !== '' ? 0 : undefined
268
+ }));
269
+ }
270
+ series.push(/*#__PURE__*/ React.createElement("g", {
271
+ key: `series_${i}`,
272
+ role: "region",
273
+ "aria-label": `${legendVal}, series ${i + 1} of ${_points.length} with ${_points[i].data.length} data points.`
274
+ }, pointsForSeries));
275
+ }
276
+ const classes = useScatterChartStyles_unstable(props);
277
+ // Removing un wanted tooltip div from DOM, when prop not provided.
278
+ if (!props.showXAxisLablesTooltip) {
279
+ try {
280
+ document.getElementById(_tooltipId) && document.getElementById(_tooltipId).remove();
281
+ // eslint-disable-next-line no-empty
282
+ } catch (e) {}
283
+ }
284
+ // Used to display tooltip at x axis labels.
285
+ if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {
286
+ const xAxisElement = d3Select(xElement).call(_xAxisScale);
287
+ try {
288
+ document.getElementById(_tooltipId) && document.getElementById(_tooltipId).remove();
289
+ // eslint-disable-next-line no-empty
290
+ } catch (e) {}
291
+ const tooltipProps = {
292
+ tooltipCls: classes.tooltip,
293
+ id: _tooltipId,
294
+ xAxis: xAxisElement
295
+ };
296
+ xAxisElement && tooltipOfXAxislabels(tooltipProps);
297
+ }
298
+ return series;
299
+ }
300
+ function _handleFocus(seriesId, x, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData) {
301
+ _uniqueCallOutID = circleId;
302
+ const formattedData = x instanceof Date ? formatDate(x, props.useUTC) : x;
303
+ const xVal = x instanceof Date ? x.getTime() : x;
304
+ const found = find(_calloutPoints, (element)=>element.x === xVal);
305
+ // if no points need to be called out then don't show vertical line and callout card
306
+ if (found) {
307
+ d3Select(`#${_verticalLine}`).attr('transform', ()=>`translate(${_xAxisScale(x) + _xBandwidth}, 0)`).attr('visibility', 'visibility');
308
+ _refArray.forEach((obj)=>{
309
+ if (obj.index === seriesId) {
310
+ setPopoverOpen(true);
311
+ xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);
312
+ setYValueHover(found.values);
313
+ setStackCalloutProps(found);
314
+ setActivePoint(circleId);
315
+ }
316
+ });
317
+ } else {
318
+ setActivePoint(circleId);
319
+ }
320
+ }
321
+ function _handleHover(x, y, lineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, mouseEvent) {
322
+ mouseEvent === null || mouseEvent === void 0 ? void 0 : mouseEvent.persist();
323
+ const formattedData = x instanceof Date ? formatDate(x, props.useUTC) : x;
324
+ const xVal = x instanceof Date ? x.getTime() : x;
325
+ const found = find(_calloutPoints, (element)=>element.x === xVal);
326
+ // if no points need to be called out then don't show vertical line and callout card
327
+ if (found) {
328
+ d3Select(`#${_verticalLine}`).attr('transform', ()=>`translate(${_xAxisScale(x) + _xBandwidth}, ${_yAxisScale(y)})`).attr('visibility', 'visibility').attr('y2', `${lineHeight - _yAxisScale(y)}`);
329
+ if (_uniqueCallOutID !== circleId) {
330
+ _uniqueCallOutID = circleId;
331
+ updatePosition(mouseEvent.clientX, mouseEvent.clientY);
332
+ xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);
333
+ setYValueHover(found.values);
334
+ setStackCalloutProps(found);
335
+ setActivePoint(circleId);
336
+ }
337
+ } else {
338
+ setActivePoint(circleId);
339
+ }
340
+ }
341
+ /**
342
+ * Screen readers announce an element as clickable if the onClick attribute is set.
343
+ * This function sets the attribute only when a click event handler is provided.*/ function _getClickHandler(func) {
344
+ if (func) {
345
+ return {
346
+ onClick: func
347
+ };
348
+ }
349
+ return {};
350
+ }
351
+ function _handleMouseOut() {
352
+ d3Select(`#${_verticalLine}`).attr('visibility', 'hidden');
353
+ }
354
+ function _handleChartMouseLeave() {
355
+ _uniqueCallOutID = null;
356
+ setActivePoint('');
357
+ if (isPopoverOpen) {
358
+ setPopoverOpen(false);
359
+ }
360
+ }
361
+ /**
362
+ * This function checks if the given legend is highlighted or not.
363
+ * A legend can be highlighted in 2 ways:
364
+ * 1. selection: if the user clicks on it
365
+ * 2. hovering: if there is no selected legend and the user hovers over it*/ function _legendHighlighted(legend) {
366
+ return _getHighlightedLegend().includes(legend);
367
+ }
368
+ /**
369
+ * This function checks if none of the legends is selected or hovered.*/ function _noLegendHighlighted() {
370
+ return selectedLegends.length === 0;
371
+ }
372
+ function _getHighlightedLegend() {
373
+ return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [
374
+ activeLegend
375
+ ] : [];
376
+ }
377
+ function _getAriaLabel(seriesIndex, pointIndex) {
378
+ var _point_callOutAccessibilityData;
379
+ const series = _points[seriesIndex];
380
+ const point = series.data[pointIndex];
381
+ const formattedDate = point.x instanceof Date ? formatDate(point.x, props.useUTC) : point.x;
382
+ const xValue = point.xAxisCalloutData || formattedDate;
383
+ const legend = series.legend;
384
+ const yValue = point.yAxisCalloutData || point.y;
385
+ return ((_point_callOutAccessibilityData = point.callOutAccessibilityData) === null || _point_callOutAccessibilityData === void 0 ? void 0 : _point_callOutAccessibilityData.ariaLabel) || `${xValue}. ${legend}, ${yValue}.`;
386
+ }
387
+ function _isChartEmpty() {
388
+ return !(props.data && props.data.lineChartData && props.data.lineChartData.length > 0 && props.data.lineChartData.filter((item)=>item.data.length).length > 0);
389
+ }
390
+ const { legendProps, tickValues, tickFormat } = props;
391
+ _points = _injectIndexPropertyInScatterChartData(props.data.lineChartData);
392
+ let points = _points;
393
+ if (legendProps && !!legendProps.canSelectMultipleLegends) {
394
+ points = selectedLegendPoints.length >= 1 ? selectedLegendPoints : _points;
395
+ _calloutPoints = calloutData(points);
396
+ }
397
+ let legendBars = null;
398
+ // reduce computation cost by only creating legendBars
399
+ // if when hideLegend is false.
400
+ // NOTE: they are rendered only when hideLegend is false in CartesianChart.
401
+ if (!props.hideLegend) {
402
+ legendBars = _createLegends(_points); // ToDo: Memoize legends to improve performance.
403
+ }
404
+ var _props_culture;
405
+ const calloutProps = {
406
+ YValueHover,
407
+ hoverXValue,
408
+ descriptionMessage: props.getCalloutDescriptionMessage && stackCalloutProps ? props.getCalloutDescriptionMessage(stackCalloutProps) : undefined,
409
+ 'data-is-focusable': true,
410
+ xAxisCalloutAccessibilityData,
411
+ ...props.calloutProps,
412
+ clickPosition,
413
+ isPopoverOpen,
414
+ isCalloutForStack: true,
415
+ culture: (_props_culture = props.culture) !== null && _props_culture !== void 0 ? _props_culture : 'en-us',
416
+ isCartesian: true
417
+ };
418
+ const tickParams = {
419
+ tickValues,
420
+ tickFormat
421
+ };
422
+ const xAxisLabels = _points.map((point)=>point.data.map((dp)=>dp.x)).flat();
423
+ _xAxisLabels = [
424
+ ...new Set(xAxisLabels)
425
+ ];
426
+ return !_isChartEmpty() ? /*#__PURE__*/ React.createElement(CartesianChart, {
427
+ ...props,
428
+ chartTitle: props.data.chartTitle,
429
+ points: points,
430
+ chartType: ChartTypes.ScatterChart,
431
+ calloutProps: calloutProps,
432
+ tickParams: tickParams,
433
+ legendBars: legendBars,
434
+ getmargins: _getMargins,
435
+ getGraphData: _initializeScatterChartData,
436
+ xAxisType: _xAxisType,
437
+ onChartMouseLeave: _handleChartMouseLeave,
438
+ enableFirstRenderOptimization: _firstRenderOptimization,
439
+ datasetForXAxisDomain: _xAxisLabels,
440
+ componentRef: cartesianChartRef,
441
+ /* eslint-disable react/jsx-no-bind */ // eslint-disable-next-line react/no-children-prop
442
+ children: (props)=>{
443
+ _xAxisScale = props.xScale;
444
+ _yAxisScale = props.yScale;
445
+ return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("g", null, /*#__PURE__*/ React.createElement("line", {
446
+ x1: 0,
447
+ y1: 0,
448
+ x2: 0,
449
+ y2: props.containerHeight,
450
+ stroke: '#323130',
451
+ id: _verticalLine,
452
+ visibility: 'hidden',
453
+ strokeDasharray: '5,5'
454
+ }), /*#__PURE__*/ React.createElement("g", null, renderSeries)));
455
+ }
456
+ }) : /*#__PURE__*/ React.createElement("div", {
457
+ id: _emptyChartId,
458
+ role: 'alert',
459
+ style: {
460
+ opacity: '0'
461
+ },
462
+ "aria-label": 'Graph has no data to display'
463
+ });
464
+ });
465
+ ScatterChart.displayName = 'ScatterChart';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ScatterChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ScatterChartProps } from './ScatterChart.types';\nimport { useScatterChartStyles_unstable } from './useScatterChartStyles.styles';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select } from 'd3-selection';\nimport { Legend, Legends } from '../Legends/index';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { useId } from '@fluentui/react-utilities';\nimport { areArraysEqual, find } from '../../utilities/index';\nimport {\n AccessibilityProps,\n CartesianChart,\n ChildProps,\n LineChartPoints,\n CustomizedCalloutData,\n Margins,\n RefArrayData,\n ScatterChartDataPoint,\n Chart,\n} from '../../index';\nimport { tokens } from '@fluentui/react-theme';\nimport {\n calloutData,\n ChartTypes,\n XAxisTypes,\n tooltipOfXAxislabels,\n getTypeOfAxis,\n getNextColor,\n getColorFromToken,\n formatDate,\n} from '../../utilities/index';\n\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\n\ntype ScatterChartDataWithIndex = LineChartPoints & { index: number };\n\n// Create a ScatterChart variant which uses these default styles and this styled subcomponent.\n/**\n * ScatterChart component\n * {@docCategory ScatterChart}\n */\nexport const ScatterChart: React.FunctionComponent<ScatterChartProps> = React.forwardRef<\n HTMLDivElement,\n ScatterChartProps\n>((props, forwardedRef) => {\n const _circleId: string = useId('circle');\n const _seriesId: string = useId('seriesID');\n const _verticalLine: string = useId('verticalLine');\n const _tooltipId: string = useId('ScatterChartTooltipId_');\n const _firstRenderOptimization = true;\n const _emptyChartId: string = useId('_ScatterChart_empty');\n let _points: ScatterChartDataWithIndex[] = _injectIndexPropertyInScatterChartData(props.data.lineChartData);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _calloutPoints: any[] = calloutData(_points) || [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _xAxisScale: any = '';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _yAxisScale: any = '';\n let _uniqueCallOutID: string | null = '';\n let _refArray: RefArrayData[] = [];\n let margins: Margins;\n let renderSeries: JSX.Element[];\n let _xAxisLabels: string[] = [];\n let xAxisCalloutAccessibilityData: AccessibilityProps = {};\n let _xBandwidth = 0;\n const cartesianChartRef = React.useRef<Chart>(null);\n\n const [hoverXValue, setHoverXValue] = React.useState<string | number>('');\n const [activeLegend, setActiveLegend] = React.useState<string>('');\n const [YValueHover, setYValueHover] = React.useState<[]>([]);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const [selectedLegendPoints, setSelectedLegendPoints] = React.useState<any[]>([]);\n const [isSelectedLegend, setIsSelectedLegend] = React.useState<boolean>(false);\n const [activePoint, setActivePoint] = React.useState<string>('');\n const [stackCalloutProps, setStackCalloutProps] = React.useState<CustomizedCalloutData>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>([]);\n const prevPropsRef = React.useRef<ScatterChartProps | 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 _xAxisType: XAxisTypes =\n props.data.lineChartData! &&\n props.data.lineChartData!.length > 0 &&\n props.data.lineChartData![0].data &&\n props.data.lineChartData![0].data.length > 0\n ? (getTypeOfAxis(props.data.lineChartData![0].data[0].x, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\n\n const pointsRef = React.useRef<ScatterChartDataWithIndex[] | []>([]);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const calloutPointsRef = React.useRef<any[]>([]);\n React.useEffect(() => {\n /** note that height and width are not used to resize or set as dimesions of the chart,\n * fitParentContainer is responisble for setting the height and width or resizing of the svg/chart\n */\n\n if (_points !== _injectIndexPropertyInScatterChartData(props.data.lineChartData) || props.data !== _points) {\n pointsRef.current = _injectIndexPropertyInScatterChartData(props.data.lineChartData);\n calloutPointsRef.current = calloutData(pointsRef.current);\n }\n }, [props.height, props.width, props.data, _points]);\n\n function _injectIndexPropertyInScatterChartData(\n scatterChartData?: LineChartPoints[],\n ): ScatterChartDataWithIndex[] | [] {\n return scatterChartData\n ? scatterChartData.map((item: LineChartPoints, index: number) => {\n let color: string;\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0);\n } else {\n color = getColorFromToken(item.color);\n }\n return {\n ...item,\n index: -1,\n color,\n };\n })\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 _getMargins(_margins: Margins) {\n margins = _margins;\n }\n\n function _initializeScatterChartData(\n xScale: NumericAxis,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) {\n _xAxisScale = xScale;\n _yAxisScale = yScale;\n renderSeries = _createPlot(xElement!, containerHeight!);\n }\n\n function _onHoverCardHide() {\n setSelectedLegendPoints([]);\n setIsSelectedLegend(false);\n }\n\n function _createLegends(data: ScatterChartDataWithIndex[]): JSX.Element {\n const { legendProps } = props;\n const isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);\n const legendDataItems = data.map((point: ScatterChartDataWithIndex) => {\n const color: string = point.color!;\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: point.legend!,\n color,\n onMouseOutAction: () => {\n setActiveLegend('');\n },\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(point.legend);\n },\n ...(point.legendShape && {\n shape: point.legendShape,\n }),\n };\n return legend;\n });\n\n return (\n <Legends\n legends={[...legendDataItems]}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...(isLegendMultiSelectEnabled && { onLegendHoverCardLeave: _onHoverCardHide })}\n {...props.legendProps}\n selectedLegends={selectedLegends}\n onChange={_onLegendSelectionChange}\n />\n );\n }\n\n function _onLegendSelectionChange(\n legendsSelected: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(legendsSelected);\n } else {\n setSelectedLegends(legendsSelected.slice(-1));\n }\n\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(legendsSelected, event, currentLegend);\n }\n }\n\n function _getPointFill(seriesColor: string, pointId: string, pointIndex: number, isLastPoint: boolean) {\n if (activePoint === pointId) {\n return tokens.colorNeutralBackground1;\n } else {\n return seriesColor;\n }\n }\n\n function _createPlot(xElement: SVGElement, containerHeight: number): JSX.Element[] {\n const series: JSX.Element[] = [];\n if (isSelectedLegend) {\n _points = selectedLegendPoints;\n } else {\n _points = _injectIndexPropertyInScatterChartData(props.data.lineChartData);\n }\n\n const yMax = d3Max(points, (point: LineChartPoints) => {\n return d3Max(point.data as ScatterChartDataPoint[], (item: ScatterChartDataPoint) => item.y)!;\n })!;\n const yMin = d3Min(points, (point: LineChartPoints) => {\n return d3Min(point.data as ScatterChartDataPoint[], (item: ScatterChartDataPoint) => item.y)!;\n })!;\n const yPadding = (yMax - yMin) * 0.1;\n const yPaddingRange = Math.abs(_yAxisScale(yMin + yPadding) - _yAxisScale(yMin));\n\n let maxMarkerRange = 40;\n let xPaddingRange = 0;\n if (_xAxisType === XAxisTypes.StringAxis) {\n _xBandwidth = _xAxisScale.bandwidth() / 2;\n xPaddingRange = _xBandwidth;\n } else if (_xAxisType === XAxisTypes.DateAxis) {\n const xMin = d3Min(points, (point: LineChartPoints) => {\n return d3Min(point.data as ScatterChartDataPoint[], (item: ScatterChartDataPoint) => item.x as Date)!;\n })!;\n\n const xMax = d3Max(points, (point: LineChartPoints) => {\n return d3Max(point.data as ScatterChartDataPoint[], (item: ScatterChartDataPoint) => {\n return item.x as Date;\n });\n })!;\n\n const xPadding = (xMax.getTime() - xMin.getTime()) * 0.1;\n xPaddingRange = Math.abs(_xAxisScale(new Date(xMin.getTime() + xPadding)) - _xAxisScale(xMin));\n } else {\n const xMin = d3Min(points, (point: LineChartPoints) => {\n return d3Min(point.data as ScatterChartDataPoint[], (item: ScatterChartDataPoint) => item.x as number)!;\n })!;\n\n const xMax = d3Max(points, (point: LineChartPoints) => {\n return d3Max(point.data as ScatterChartDataPoint[], (item: ScatterChartDataPoint) => {\n return item.x as number;\n });\n })!;\n\n const xPadding = (xMax - xMin) * 0.1;\n xPaddingRange = Math.abs(_xAxisScale(xMin + xPadding) - _xAxisScale(xMin));\n }\n maxMarkerRange = Math.min(maxMarkerRange, Math.min(xPaddingRange, yPaddingRange));\n\n const maxMarkerSize = d3Max(_points, (point: LineChartPoints) => {\n return d3Max(point.data as ScatterChartDataPoint[], (item: ScatterChartDataPoint) => {\n return item.markerSize as number;\n });\n })!;\n\n for (let i = _points.length - 1; i >= 0; i--) {\n const pointsForSeries: JSX.Element[] = [];\n\n const legendVal: string = _points[i].legend;\n const seriesColor: string = _points[i].color!;\n const verticaLineHeight = containerHeight - margins.bottom! + 6;\n\n for (let j = 0; j < _points[i].data.length; j++) {\n const seriesId = `${_seriesId}_${i}_${j}`;\n const circleId = `${_circleId}_${i}_${j}`;\n const { x, y, xAxisCalloutData, xAxisCalloutAccessibilityData } = _points[i].data[j];\n let circleRadius = 3.5;\n const pointMarkerSize = (_points[i].data[j] as ScatterChartDataPoint).markerSize;\n if ((pointMarkerSize as number) !== undefined) {\n circleRadius = Math.min((pointMarkerSize! * maxMarkerRange) / maxMarkerSize, pointMarkerSize!);\n }\n\n const isLegendSelected: boolean = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n\n const currentPointHidden = _points[i].hideNonActiveDots && activePoint !== circleId;\n pointsForSeries.push(\n <circle\n id={circleId}\n key={circleId}\n r={circleRadius}\n cx={_xAxisScale(x) + _xBandwidth}\n cy={_yAxisScale(y)}\n data-is-focusable={isLegendSelected}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(x, y, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event)\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(x, y, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event)\n }\n onMouseOut={_handleMouseOut}\n onFocus={() => _handleFocus(seriesId, x, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[j].onDataPointClick)}\n opacity={isLegendSelected && !currentPointHidden ? 1 : 0.1}\n fill={_getPointFill(seriesColor, circleId, j, false)}\n stroke={seriesColor}\n role=\"img\"\n aria-label={_getAriaLabel(i, j)}\n tabIndex={_points[i].legend !== '' ? 0 : undefined}\n />,\n );\n }\n\n series.push(\n <g\n key={`series_${i}`}\n role=\"region\"\n aria-label={`${legendVal}, series ${i + 1} of ${_points.length} with ${_points[i].data.length} data points.`}\n >\n {pointsForSeries}\n </g>,\n );\n }\n const classes = useScatterChartStyles_unstable(props);\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\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(_xAxisScale);\n try {\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 series;\n }\n\n function _handleFocus(\n seriesId: string,\n x: number | Date | string,\n\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData?: AccessibilityProps,\n ) {\n _uniqueCallOutID = circleId;\n const formattedData = x instanceof Date ? formatDate(x, props.useUTC) : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const found = find(_calloutPoints, (element: { x: string | number }) => element.x === xVal);\n // if no points need to be called out then don't show vertical line and callout card\n\n if (found) {\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(x) + _xBandwidth}, 0)`)\n .attr('visibility', 'visibility');\n _refArray.forEach((obj: RefArrayData) => {\n if (obj.index === seriesId) {\n setPopoverOpen(true);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);\n setYValueHover(found.values);\n setStackCalloutProps(found!);\n setActivePoint(circleId);\n }\n });\n } else {\n setActivePoint(circleId);\n }\n }\n\n function _handleHover(\n x: number | Date | string,\n y: number | Date,\n lineHeight: number,\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData: AccessibilityProps | undefined,\n mouseEvent: React.MouseEvent<SVGElement>,\n ) {\n mouseEvent?.persist();\n const formattedData = x instanceof Date ? formatDate(x, props.useUTC) : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const found = find(_calloutPoints, (element: { x: string | number }) => element.x === xVal);\n // if no points need to be called out then don't show vertical line and callout card\n\n if (found) {\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(x) + _xBandwidth}, ${_yAxisScale(y)})`)\n .attr('visibility', 'visibility')\n .attr('y2', `${lineHeight - _yAxisScale(y)}`);\n\n if (_uniqueCallOutID !== circleId) {\n _uniqueCallOutID = circleId;\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);\n setYValueHover(found.values);\n setStackCalloutProps(found!);\n setActivePoint(circleId);\n }\n } else {\n setActivePoint(circleId);\n }\n }\n\n /**\n * Screen readers announce an element as clickable if the onClick attribute is set.\n * This function sets the attribute only when a click event handler is provided.*/\n\n function _getClickHandler(func?: () => void): { onClick?: () => void } {\n if (func) {\n return {\n onClick: func,\n };\n }\n\n return {};\n }\n\n function _handleMouseOut() {\n d3Select(`#${_verticalLine}`).attr('visibility', 'hidden');\n }\n\n function _handleChartMouseLeave() {\n _uniqueCallOutID = null;\n setActivePoint('');\n if (isPopoverOpen) {\n setPopoverOpen(false);\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): boolean {\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(): boolean {\n return selectedLegends.length === 0;\n }\n\n function _getHighlightedLegend(): string[] {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n }\n\n function _getAriaLabel(seriesIndex: number, pointIndex: number): string {\n const series = _points[seriesIndex];\n const point = series.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 = series.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 props.data &&\n props.data.lineChartData &&\n props.data.lineChartData.length > 0 &&\n props.data.lineChartData.filter((item: LineChartPoints) => item.data.length).length > 0\n );\n }\n\n const { legendProps, tickValues, tickFormat } = props;\n _points = _injectIndexPropertyInScatterChartData(props.data.lineChartData);\n\n let points = _points;\n if (legendProps && !!legendProps.canSelectMultipleLegends) {\n points = selectedLegendPoints.length >= 1 ? selectedLegendPoints : _points;\n _calloutPoints = calloutData(points);\n }\n\n let legendBars = null;\n // reduce computation cost by only creating legendBars\n // if when hideLegend is false.\n // NOTE: they are rendered only when hideLegend is false in CartesianChart.\n if (!props.hideLegend) {\n legendBars = _createLegends(_points!); // ToDo: Memoize legends to improve performance.\n }\n const calloutProps = {\n YValueHover,\n hoverXValue,\n descriptionMessage:\n props.getCalloutDescriptionMessage && stackCalloutProps\n ? props.getCalloutDescriptionMessage(stackCalloutProps)\n : undefined,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData,\n ...props.calloutProps,\n clickPosition,\n isPopoverOpen,\n isCalloutForStack: true,\n culture: props.culture ?? 'en-us',\n isCartesian: true,\n };\n const tickParams = {\n tickValues,\n tickFormat,\n };\n\n const xAxisLabels: string[] = _points\n .map((point: ScatterChartDataWithIndex) => point.data.map((dp: ScatterChartDataPoint) => dp.x as string))\n .flat();\n\n _xAxisLabels = [...new Set(xAxisLabels)];\n\n return !_isChartEmpty() ? (\n <CartesianChart\n {...props}\n chartTitle={props.data.chartTitle}\n points={points}\n chartType={ChartTypes.ScatterChart}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n getmargins={_getMargins}\n getGraphData={_initializeScatterChartData}\n xAxisType={_xAxisType}\n onChartMouseLeave={_handleChartMouseLeave}\n enableFirstRenderOptimization={_firstRenderOptimization}\n datasetForXAxisDomain={_xAxisLabels}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: ChildProps) => {\n _xAxisScale = props.xScale!;\n _yAxisScale = props.yScale!;\n return (\n <>\n <g>\n <line\n x1={0}\n y1={0}\n x2={0}\n y2={props.containerHeight}\n stroke={'#323130'}\n id={_verticalLine}\n visibility={'hidden'}\n strokeDasharray={'5,5'}\n />\n <g>{renderSeries}</g>\n </g>\n </>\n );\n }}\n />\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n});\nScatterChart.displayName = 'ScatterChart';\n"],"names":["React","useScatterChartStyles_unstable","select","d3Select","Legends","max","d3Max","min","d3Min","useId","areArraysEqual","find","CartesianChart","tokens","calloutData","ChartTypes","XAxisTypes","tooltipOfXAxislabels","getTypeOfAxis","getNextColor","getColorFromToken","formatDate","ScatterChart","forwardRef","props","forwardedRef","_circleId","_seriesId","_verticalLine","_tooltipId","_firstRenderOptimization","_emptyChartId","_points","_injectIndexPropertyInScatterChartData","data","lineChartData","_calloutPoints","_xAxisScale","_yAxisScale","_uniqueCallOutID","_refArray","margins","renderSeries","_xAxisLabels","xAxisCalloutAccessibilityData","_xBandwidth","cartesianChartRef","useRef","hoverXValue","setHoverXValue","useState","activeLegend","setActiveLegend","YValueHover","setYValueHover","selectedLegendPoints","setSelectedLegendPoints","isSelectedLegend","setIsSelectedLegend","activePoint","setActivePoint","stackCalloutProps","setStackCalloutProps","clickPosition","setClickPosition","x","y","isPopoverOpen","setPopoverOpen","selectedLegends","setSelectedLegends","prevPropsRef","useEffect","current","prevProps","legendProps","useImperativeHandle","componentRef","chartContainer","_xAxisType","length","StringAxis","pointsRef","calloutPointsRef","height","width","scatterChartData","map","item","index","color","updatePosition","newX","newY","threshold","distance","Math","sqrt","pow","_getMargins","_margins","_initializeScatterChartData","xScale","yScale","containerHeight","containerWidth","xElement","_createPlot","_onHoverCardHide","_createLegends","isLegendMultiSelectEnabled","canSelectMultipleLegends","legendDataItems","point","legend","title","onMouseOutAction","hoverAction","_handleChartMouseLeave","legendShape","shape","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onLegendHoverCardLeave","onChange","_onLegendSelectionChange","legendsSelected","event","currentLegend","slice","_getPointFill","seriesColor","pointId","pointIndex","isLastPoint","colorNeutralBackground1","series","yMax","points","yMin","yPadding","yPaddingRange","abs","maxMarkerRange","xPaddingRange","bandwidth","DateAxis","xMin","xMax","xPadding","getTime","Date","maxMarkerSize","markerSize","i","pointsForSeries","legendVal","verticaLineHeight","bottom","j","seriesId","circleId","xAxisCalloutData","circleRadius","pointMarkerSize","undefined","isLegendSelected","_legendHighlighted","_noLegendHighlighted","currentPointHidden","hideNonActiveDots","push","circle","id","key","r","cx","cy","data-is-focusable","onMouseOver","_handleHover","onMouseMove","onMouseOut","_handleMouseOut","onFocus","_handleFocus","onBlur","_getClickHandler","onDataPointClick","opacity","fill","stroke","role","aria-label","_getAriaLabel","tabIndex","g","classes","showXAxisLablesTooltip","document","getElementById","remove","e","wrapXAxisLables","xAxisElement","call","tooltipProps","tooltipCls","tooltip","xAxis","formattedData","useUTC","xVal","found","element","attr","forEach","obj","values","lineHeight","mouseEvent","persist","clientX","clientY","func","onClick","_getHighlightedLegend","includes","seriesIndex","formattedDate","xValue","yValue","yAxisCalloutData","callOutAccessibilityData","ariaLabel","_isChartEmpty","filter","tickValues","tickFormat","legendBars","hideLegend","calloutProps","descriptionMessage","getCalloutDescriptionMessage","isCalloutForStack","culture","isCartesian","tickParams","xAxisLabels","dp","flat","Set","chartTitle","chartType","getmargins","getGraphData","xAxisType","onChartMouseLeave","enableFirstRenderOptimization","datasetForXAxisDomain","children","line","x1","y1","x2","y2","visibility","strokeDasharray","div","style","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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yN,UAAU,CAAC/O;YACTa,cAAcb,MAAM8E,MAAM;YAC1BhE,cAAcd,MAAM+E,MAAM;YAC1B,qBACE,wDACE,oBAACgG,yBACC,oBAACiE;gBACCC,IAAI;gBACJC,IAAI;gBACJC,IAAI;gBACJC,IAAIpP,MAAMgF,eAAe;gBACzB0F,QAAQ;gBACRlB,IAAIpJ;gBACJiP,YAAY;gBACZC,iBAAiB;8BAEnB,oBAACvE,WAAG7J;QAIZ;uBAGF,oBAACqO;QAAI/F,IAAIjJ;QAAeoK,MAAM;QAAS6E,OAAO;YAAEhF,SAAS;QAAI;QAAGI,cAAY;;AAEhF,GAAG;AACH9K,aAAa2P,WAAW,GAAG"}
@@ -0,0 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/naming-convention */ /**
2
+ * Scatter Chart style properties
3
+ * {@docCategory ScatterChart}
4
+ */ export { };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ScatterChart.types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport { RenderFunction } from '../../utilities/index';\nimport {\n ChartProps,\n LineChartPoints,\n Margins,\n Basestate,\n RefArrayData,\n CustomizedCalloutData,\n} from '../../types/index';\nimport {\n CartesianChartProps,\n CartesianChartStyleProps,\n CartesianChartStyles,\n ChildProps,\n} from '../CommonComponents/index';\n\nexport type { ChildProps, LineChartPoints, Margins, Basestate, RefArrayData };\n\n/**\n * Line Chart properties\n * {@docCategory LineChart}\n */\nexport interface ScatterChartProps 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?: ScatterChartStyles;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: RenderFunction<CustomizedCalloutData>;\n\n /**\n * Callback for getting callout description message\n */\n getCalloutDescriptionMessage?: (calloutDataProps: CustomizedCalloutData) => string | undefined;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n}\n\n/**\n * Scatter Chart styles\n * {@docCategory ScatterChart}\n */\nexport interface ScatterChartStyles extends CartesianChartStyles {}\n\n/**\n * Scatter Chart style properties\n * {@docCategory ScatterChart}\n */\nexport interface ScatterChartStyleProps extends CartesianChartStyleProps {}\n"],"names":[],"rangeMappings":";;;","mappings":"AAAA,uDAAuD,GAwDvD;;;CAGC,GACD,WAA2E"}
@@ -0,0 +1,3 @@
1
+ export * from './ScatterChart';
2
+ export * from './ScatterChart.types';
3
+ export * from '../../types/index';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './ScatterChart';\nexport * from './ScatterChart.types';\nexport * from '../../types/index';\n"],"names":[],"rangeMappings":";;","mappings":"AAAA,cAAc,iBAAiB;AAC/B,cAAc,uBAAuB;AACrC,cAAc,oBAAoB"}
@@ -0,0 +1,65 @@
1
+ import { __styles, mergeClasses, shorthands } from '@griffel/react';
2
+ import { tokens } from '@fluentui/react-theme';
3
+ /**
4
+ * @internal
5
+ */
6
+ export const scatterChartClassNames = {
7
+ tooltip: 'fui-line__tooltip',
8
+ root: 'fui-line__root',
9
+ xAxis: 'fui-line__xAxis',
10
+ yAxis: 'fui-line__yAxis',
11
+ legendContainer: 'fui-line__legendContainer',
12
+ hover: 'fui-line__hover',
13
+ calloutContentRoot: 'fui-line__calloutContentRoot',
14
+ calloutContentX: 'fui-line__calloutContentX',
15
+ calloutContentY: 'fui-line__calloutContentY',
16
+ descriptionMessage: 'fui-line__descriptionMessage',
17
+ calloutDateTimeContainer: 'fui-line__calloutDateTimeContainer',
18
+ calloutInfoContainer: 'fui-line__calloutInfoContainer',
19
+ calloutBlockContainer: 'fui-line__calloutBlockContainer',
20
+ calloutlegendText: 'fui-line__calloutLegendText',
21
+ axisTitle: 'fui-line__axisTitle',
22
+ chartTitle: 'fui-line__chartTitle',
23
+ opacityChangeOnHover: 'fui-line__opacityChangeOnHover',
24
+ shapeStyles: 'fui-line__shapeStyles',
25
+ chartWrapper: 'fui-line__chartWrapper',
26
+ calloutBlockContainertoDrawShapefalse: '',
27
+ calloutBlockContainertoDrawShapetrue: ''
28
+ };
29
+ /**
30
+ * Base Styles
31
+ */
32
+ const useStyles = /*#__PURE__*/__styles({
33
+ tooltip: {
34
+ mc9l5x: "f22iagw",
35
+ Beiy3e4: "f1vx9l62",
36
+ z8tnut: "f17mpqex",
37
+ z189sj: ["f1vdfbxk", "f1f5gg8d"],
38
+ Byoj8tv: "fdvome7",
39
+ uwmqm3: ["f1f5gg8d", "f1vdfbxk"],
40
+ qhf8xq: "f1euv43f",
41
+ fsow6f: "f17mccla",
42
+ Bhzewxz: "fr6rvge",
43
+ Bkfmm31: "f5q6cfr",
44
+ Beyfa6y: 0,
45
+ Bbmb7ep: 0,
46
+ Btl43ni: 0,
47
+ B7oj6ja: 0,
48
+ Dimara: "fq9zq91",
49
+ Bkecrkj: "f1aehjj5"
50
+ }
51
+ }, {
52
+ d: [".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);}", ".f5q6cfr{fill:var(--colorNeutralBackground1);}", [".fq9zq91{border-radius:var(--borderRadiusSmall);}", {
53
+ p: -1
54
+ }], ".f1aehjj5{pointer-events:none;}"]
55
+ });
56
+ /**
57
+ * Apply styling to the Carousel slots based on the state
58
+ */
59
+ export const useScatterChartStyles_unstable = props => {
60
+ const baseStyles = useStyles();
61
+ return {
62
+ tooltip: mergeClasses(scatterChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/)
63
+ };
64
+ };
65
+ //# sourceMappingURL=useScatterChartStyles.styles.js.map