@fluentui/react-charts 9.1.5 → 9.1.6

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 (129) hide show
  1. package/CHANGELOG.md +15 -2
  2. package/dist/index.d.ts +42 -2
  3. package/lib/components/AreaChart/AreaChart.js +3 -3
  4. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  5. package/lib/components/AreaChart/useAreaChartStyles.styles.js +2 -1
  6. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  7. package/lib/components/CommonComponents/CartesianChart.js +42 -9
  8. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  9. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  10. package/lib/components/CommonComponents/ChartPopover.js +1 -1
  11. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  12. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +37 -9
  13. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  14. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +13 -13
  15. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  16. package/lib/components/DonutChart/useDonutChartStyles.styles.js +7 -6
  17. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  18. package/lib/components/GaugeChart/GaugeChart.js +16 -17
  19. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  20. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  21. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +13 -7
  22. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  23. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +3 -3
  24. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  25. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +2 -1
  26. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  27. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  28. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  29. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +2 -1
  30. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  31. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  32. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +0 -61
  33. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  34. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +6 -31
  35. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  36. package/lib/components/Legends/useLegendsStyles.styles.js +2 -1
  37. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  38. package/lib/components/LineChart/LineChart.js +3 -3
  39. package/lib/components/LineChart/LineChart.js.map +1 -1
  40. package/lib/components/LineChart/useLineChartStyles.styles.js +2 -1
  41. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  42. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +25 -23
  43. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  44. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  45. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +29 -0
  46. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -0
  47. package/lib/components/SankeyChart/SankeyChart.js +11 -13
  48. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  49. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  50. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +13 -7
  51. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  52. package/lib/components/ScatterChart/ScatterChart.js +13 -15
  53. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  54. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +2 -1
  55. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  56. package/lib/components/VerticalBarChart/VerticalBarChart.js +7 -7
  57. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  58. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +2 -1
  59. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  60. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +3 -3
  61. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  62. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +2 -1
  63. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  64. package/lib/utilities/utilities.js +11 -5
  65. package/lib/utilities/utilities.js.map +1 -1
  66. package/lib-commonjs/components/AreaChart/AreaChart.js +2 -2
  67. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  68. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +2 -1
  69. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  70. package/lib-commonjs/components/CommonComponents/CartesianChart.js +41 -8
  71. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  72. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  73. package/lib-commonjs/components/CommonComponents/ChartPopover.js +1 -1
  74. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
  75. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +55 -9
  76. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  77. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +13 -13
  78. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  79. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +8 -7
  80. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  81. package/lib-commonjs/components/GaugeChart/GaugeChart.js +16 -17
  82. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  83. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  84. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +13 -9
  85. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  86. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +2 -2
  87. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  88. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +2 -1
  89. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  90. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  91. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  92. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +2 -1
  93. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  94. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  95. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +0 -61
  96. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  97. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +5 -54
  98. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  99. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +2 -0
  100. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
  101. package/lib-commonjs/components/LineChart/LineChart.js +2 -2
  102. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  103. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +2 -1
  104. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  105. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +25 -23
  106. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  107. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  108. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +49 -0
  109. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -0
  110. package/lib-commonjs/components/SankeyChart/SankeyChart.js +11 -13
  111. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  112. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  113. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +15 -8
  114. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  115. package/lib-commonjs/components/ScatterChart/ScatterChart.js +12 -14
  116. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  117. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +2 -1
  118. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  119. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +6 -6
  120. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  121. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +2 -1
  122. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  123. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +2 -2
  124. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  125. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +2 -1
  126. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  127. package/lib-commonjs/utilities/utilities.js +16 -7
  128. package/lib-commonjs/utilities/utilities.js.map +1 -1
  129. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"sources":["SankeyChart.types.ts"],"sourcesContent":["import { RefObject } from 'react';\nimport { ChartPopoverProps } from '../CommonComponents/ChartPopover.types';\nimport { Chart, ChartProps } from '../../types/DataPoint';\n\nexport type { ChartProps, DataPoint, SankeyChartData } from '../../types/DataPoint';\n\n/**\n * Sankey Chart properties\n * {@docCategory SankeyChart}\n */\nexport interface SankeyChartProps {\n /**\n * Data to render in the chart.\n */\n data: ChartProps;\n\n /**\n * Width of the chart.\n */\n width?: number;\n\n /**\n * Height of the chart.\n */\n height?: number;\n\n /**\n * Additional CSS class(es) to apply to the SankeyChart.\n */\n className?: string;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: SankeyChartStyles;\n\n /**\n * this prop takes its parent as a HTML element to define the width and height of the Sankey chart\n */\n parentRef?: HTMLElement | null;\n\n /**\n * should chart resize when parent resize.\n */\n shouldResize?: number;\n\n /**\n * Color for path\n */\n pathColor?: string;\n\n /**\n * Colors for nodes\n */\n colorsForNodes?: string[];\n\n /**\n * Colors for nodes border\n */\n borderColorsForNodes?: string[];\n\n /**\n * Localized strings to show in the UX.\n */\n strings?: SankeyChartStrings;\n\n /**\n * Localized strings to use for the chart's accessibility features.\n */\n accessibility?: SankeyChartAccessibilityProps;\n\n /**\n * Format node and link values.\n */\n formatNumberOptions?: Intl.NumberFormatOptions;\n\n /**\n * Prop to disable shrinking of the chart beyond a certain limit and enable scrolling when the chart overflows\n * @default true\n */\n enableReflow?: boolean;\n\n /**\n * Optional callback to access the Chart interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: RefObject<Chart>;\n\n /**\n * props for the callout in the chart\n */\n calloutProps?: ChartPopoverProps;\n\n /**\n * The prop used to define the culture to localize the numbers and date\n */\n culture?: string;\n}\n\n/**\n * Sankey Chart styles\n * {@docCategory SankeyChart}\n */\nexport interface SankeyChartStyles {\n /**\n * Style for the root element.\n */\n root?: string;\n\n /**\n * Style for the nodes.\n */\n nodes?: string;\n\n /**\n * Style for the links.\n */\n links?: string;\n\n /**\n * Style for the text inside node.\n */\n nodeTextContainer?: string;\n\n /**\n * Style for the tooltip ,when user hover over the truncated node detail.\n */\n toolTip?: string;\n\n /**\n * Styles for the chart wrapper div\n */\n chartWrapper?: string;\n}\n\n/**\n * Set of strings which are used when rendering the chart.\n */\nexport interface SankeyChartStrings {\n /**\n * A value similar to \"from \\{0\\}\" where \\{0\\} is the name of the source node for a link.\n * This is shown in the `ChartHoverCard` when the user hovers the mouse over a link.\n */\n linkFrom?: string;\n}\n\n/**\n * Set of strings which are used when rendering accessibility information within the chart.\n */\nexport interface SankeyChartAccessibilityProps {\n /**\n * Aria label for when the chart is empty.\n */\n emptyAriaLabel?: string;\n /**\n * A value similar to \"node \\{0\\} with weight \\{1\\}\".\n * \\{0\\} is the name of the node.\n * \\{1\\} is the weight of the node (as computed by the sankey layout engine via the links to or from this node).\n */\n nodeAriaLabel?: string;\n /**\n * A value similar to \"link from \\{0\\} to $\\{1\\} with weight $\\{2\\}\".\n * \\{0\\} is the source node, \\{1\\} is the target node, and \\{2\\} is the value of the link.\n */\n linkAriaLabel?: string;\n}\n"],"names":[],"rangeMappings":";;","mappings":"AAkJA;;CAEC"}
1
+ {"version":3,"sources":["SankeyChart.types.ts"],"sourcesContent":["import { RefObject } from 'react';\nimport { ChartPopoverProps } from '../CommonComponents/ChartPopover.types';\nimport { Chart, ChartProps } from '../../types/DataPoint';\n\nexport type { ChartProps, DataPoint, SankeyChartData } from '../../types/DataPoint';\n\n/**\n * Sankey Chart properties\n * {@docCategory SankeyChart}\n */\nexport interface SankeyChartProps {\n /**\n * Data to render in the chart.\n */\n data: ChartProps;\n\n /**\n * Width of the chart.\n */\n width?: number;\n\n /**\n * Height of the chart.\n */\n height?: number;\n\n /**\n * Additional CSS class(es) to apply to the SankeyChart.\n */\n className?: string;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: SankeyChartStyles;\n\n /**\n * this prop takes its parent as a HTML element to define the width and height of the Sankey chart\n */\n parentRef?: HTMLElement | null;\n\n /**\n * should chart resize when parent resize.\n */\n shouldResize?: number;\n\n /**\n * Color for path\n */\n pathColor?: string;\n\n /**\n * Colors for nodes\n */\n colorsForNodes?: string[];\n\n /**\n * Colors for nodes border\n */\n borderColorsForNodes?: string[];\n\n /**\n * Localized strings to show in the UX.\n */\n strings?: SankeyChartStrings;\n\n /**\n * Localized strings to use for the chart's accessibility features.\n */\n accessibility?: SankeyChartAccessibilityProps;\n\n /**\n * Format node and link values.\n */\n formatNumberOptions?: Intl.NumberFormatOptions;\n\n /**\n * Prop to disable shrinking of the chart beyond a certain limit and enable scrolling when the chart overflows\n * @deprecated Use `reflowProps` instead.\n */\n enableReflow?: boolean;\n\n /**\n * Optional callback to access the Chart interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: RefObject<Chart>;\n\n /**\n * props for the callout in the chart\n */\n calloutProps?: ChartPopoverProps;\n\n /**\n * The prop used to define the culture to localize the numbers and date\n */\n culture?: string;\n\n /**\n * Props related to reflow behavior of the chart\n */\n reflowProps?: {\n /**\n * Determines the reflow behavior of the chart.\n * When set to `'min-width'`, the chart will not shrink below a certain width and will enable scrolling if it overflows.\n * @default 'none'\n */\n mode: 'none' | 'min-width';\n };\n}\n\n/**\n * Sankey Chart styles\n * {@docCategory SankeyChart}\n */\nexport interface SankeyChartStyles {\n /**\n * Style for the root element.\n */\n root?: string;\n\n /**\n * Style for the nodes.\n */\n nodes?: string;\n\n /**\n * Style for the links.\n */\n links?: string;\n\n /**\n * Style for the text inside node.\n */\n nodeTextContainer?: string;\n\n /**\n * Style for the tooltip ,when user hover over the truncated node detail.\n */\n toolTip?: string;\n\n /**\n * Styles for the chart wrapper div\n */\n chartWrapper?: string;\n\n /**\n * Styles for the chart svg element\n */\n chart?: string;\n}\n\n/**\n * Set of strings which are used when rendering the chart.\n */\nexport interface SankeyChartStrings {\n /**\n * A value similar to \"from \\{0\\}\" where \\{0\\} is the name of the source node for a link.\n * This is shown in the `ChartHoverCard` when the user hovers the mouse over a link.\n */\n linkFrom?: string;\n}\n\n/**\n * Set of strings which are used when rendering accessibility information within the chart.\n */\nexport interface SankeyChartAccessibilityProps {\n /**\n * Aria label for when the chart is empty.\n */\n emptyAriaLabel?: string;\n /**\n * A value similar to \"node \\{0\\} with weight \\{1\\}\".\n * \\{0\\} is the name of the node.\n * \\{1\\} is the weight of the node (as computed by the sankey layout engine via the links to or from this node).\n */\n nodeAriaLabel?: string;\n /**\n * A value similar to \"link from \\{0\\} to $\\{1\\} with weight $\\{2\\}\".\n * \\{0\\} is the source node, \\{1\\} is the target node, and \\{2\\} is the value of the link.\n */\n linkAriaLabel?: string;\n}\n"],"names":[],"rangeMappings":";;","mappings":"AAmKA;;CAEC"}
@@ -23,7 +23,8 @@ const sankeyChartClassNames = {
23
23
  links: 'fui-sc__links',
24
24
  nodeTextContainer: 'fui-sc__nodeTextContainer',
25
25
  toolTip: 'fui-sc__toolTip',
26
- chartWrapper: 'fui-sc__chartWrapper'
26
+ chartWrapper: 'fui-sc__chartWrapper',
27
+ chart: 'fui-sc__chart'
27
28
  };
28
29
  const useStyles = /*#__PURE__*/ (0, _react.__styles)({
29
30
  root: {
@@ -32,8 +33,8 @@ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
32
33
  Bhrd7zp: "figsok6",
33
34
  Bg96gwp: "f1i3iumi",
34
35
  mc9l5x: "f22iagw",
35
- a9b677: "fsr8r2d",
36
- Bqenvij: "f50j5g9",
36
+ a9b677: "fly5x3f",
37
+ Bqenvij: "f1l02sjl",
37
38
  Beiy3e4: "f1vx9l62",
38
39
  B68tc82: 0,
39
40
  Bmxbyg5: 0,
@@ -98,6 +99,9 @@ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
98
99
  B68tc82: 0,
99
100
  Bmxbyg5: 0,
100
101
  Bpg54ce: "f1enuhaj"
102
+ },
103
+ chart: {
104
+ mc9l5x: "ftgm304"
101
105
  }
102
106
  }, {
103
107
  d: [
@@ -106,8 +110,8 @@ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
106
110
  ".figsok6{font-weight:var(--fontWeightRegular);}",
107
111
  ".f1i3iumi{line-height:var(--lineHeightBase300);}",
108
112
  ".f22iagw{display:flex;}",
109
- ".fsr8r2d{width:var(--root-width, 100%);}",
110
- ".f50j5g9{height:var(--root-height, 100%);}",
113
+ ".fly5x3f{width:100%;}",
114
+ ".f1l02sjl{height:100%;}",
111
115
  ".f1vx9l62{flex-direction:column;}",
112
116
  [
113
117
  ".f1a3p1vp{overflow:hidden;}",
@@ -149,7 +153,8 @@ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
149
153
  {
150
154
  p: -1
151
155
  }
152
- ]
156
+ ],
157
+ ".ftgm304{display:block;}"
153
158
  ],
154
159
  m: [
155
160
  [
@@ -167,13 +172,15 @@ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
167
172
  ]
168
173
  });
169
174
  const useSankeyChartStyles = (props)=>{
175
+ var _props_styles, _props_reflowProps, _props_styles1, _props_styles2;
170
176
  const baseStyles = useStyles();
171
177
  return {
172
- root: (0, _react.mergeClasses)(sankeyChartClassNames.root, baseStyles.root /*, props.styles?.root*/ ),
178
+ root: (0, _react.mergeClasses)(sankeyChartClassNames.root, baseStyles.root, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),
173
179
  nodes: (0, _react.mergeClasses)(sankeyChartClassNames.nodes, baseStyles.nodes /*, props.styles?.nodes*/ ),
174
180
  links: (0, _react.mergeClasses)(sankeyChartClassNames.links, baseStyles.links /*, props.styles?.links*/ ),
175
181
  nodeTextContainer: (0, _react.mergeClasses)(sankeyChartClassNames.nodeTextContainer, baseStyles.nodeTextContainer /*, props.styles?.nodeTextContainer*/ ),
176
182
  toolTip: (0, _react.mergeClasses)(sankeyChartClassNames.toolTip, baseStyles.toolTip /*, props.styles?.toolTip*/ ),
177
- chartWrapper: (0, _react.mergeClasses)(sankeyChartClassNames.chartWrapper, props.enableReflow ? baseStyles.chartWrapper : '' /*, props.styles?.chartWrapper*/ )
183
+ chartWrapper: (0, _react.mergeClasses)(sankeyChartClassNames.chartWrapper, ((_props_reflowProps = props.reflowProps) === null || _props_reflowProps === void 0 ? void 0 : _props_reflowProps.mode) === 'min-width' ? baseStyles.chartWrapper : '', (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.chartWrapper),
184
+ chart: (0, _react.mergeClasses)(sankeyChartClassNames.chart, baseStyles.chart, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.chart)
178
185
  };
179
186
  }; //# sourceMappingURL=useSankeyChartStyles.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["useSankeyChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/index';\nexport const sankeyChartClassNames = {\n root: 'fui-sc__root',\n nodes: 'fui-sc__nodes',\n links: 'fui-sc__links',\n nodeTextContainer: 'fui-sc__nodeTextContainer',\n toolTip: 'fui-sc__toolTip',\n chartWrapper: 'fui-sc__chartWrapper'\n};\nconst useStyles = makeStyles({\n root: {\n ...typographyStyles.body1,\n display: 'flex',\n width: 'var(--root-width, 100%)',\n height: 'var(--root-height, 100%)',\n flexDirection: 'column',\n overflow: 'hidden'\n },\n links: {\n fill: tokens.colorNeutralBackground1,\n strokeWidth: '3px',\n [HighContrastSelector]: {\n fill: 'Canvas'\n }\n },\n nodes: {\n fill: '#F5F5F5',\n [HighContrastSelector]: {\n fill: 'Canvas'\n }\n },\n toolTip: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n padding: '8px',\n position: 'absolute',\n textAlign: 'center',\n top: '0px',\n background: tokens.colorNeutralBackground1,\n borderRadius: '2px',\n pointerEvents: 'none'\n },\n nodeTextContainer: {\n '& text': {\n [HighContrastSelector]: {\n fill: 'CanvasText'\n }\n },\n marginTop: '4px',\n marginLeft: '8px',\n marginBottom: '4px',\n marginRight: '8px'\n },\n chartWrapper: {\n overflow: 'auto'\n }\n});\nexport const useSankeyChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n root: mergeClasses(sankeyChartClassNames.root, baseStyles.root /*, props.styles?.root*/ ),\n nodes: mergeClasses(sankeyChartClassNames.nodes, baseStyles.nodes /*, props.styles?.nodes*/ ),\n links: mergeClasses(sankeyChartClassNames.links, baseStyles.links /*, props.styles?.links*/ ),\n nodeTextContainer: mergeClasses(sankeyChartClassNames.nodeTextContainer, baseStyles.nodeTextContainer /*, props.styles?.nodeTextContainer*/ ),\n toolTip: mergeClasses(sankeyChartClassNames.toolTip, baseStyles.toolTip /*, props.styles?.toolTip*/ ),\n chartWrapper: mergeClasses(sankeyChartClassNames.chartWrapper, props.enableReflow ? baseStyles.chartWrapper : '' /*, props.styles?.chartWrapper*/ )\n };\n};\n"],"names":["sankeyChartClassNames","useSankeyChartStyles","root","nodes","links","nodeTextContainer","toolTip","chartWrapper","useStyles","__styles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","a9b677","Bqenvij","Beiy3e4","B68tc82","Bmxbyg5","Bpg54ce","Bkfmm31","Be5yapy","a6j6cd","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","qhf8xq","fsow6f","Bhzewxz","Bgh53k4","B2eet1l","De3pzq","Bcmaq0h","gk0gix","B20660r","B8a6bjv","Bpptf2m","e5kdtc","Bkjc3bi","ayd6f0","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","B3gqxw3","B6of3ja","Frg6f3","jrapky","t21cq0","d","p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,YAAY,EAAEkD,MAAMG,YAAY,GAAGF,WAAWnD,YAAY,GAAG,GAAG,8BAAA;IACrH;AACJ"}
1
+ {"version":3,"sources":["useSankeyChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/index';\nexport const sankeyChartClassNames = {\n root: 'fui-sc__root',\n nodes: 'fui-sc__nodes',\n links: 'fui-sc__links',\n nodeTextContainer: 'fui-sc__nodeTextContainer',\n toolTip: 'fui-sc__toolTip',\n chartWrapper: 'fui-sc__chartWrapper',\n chart: 'fui-sc__chart'\n};\nconst useStyles = makeStyles({\n root: {\n ...typographyStyles.body1,\n display: 'flex',\n width: '100%',\n height: '100%',\n flexDirection: 'column',\n overflow: 'hidden'\n },\n links: {\n fill: tokens.colorNeutralBackground1,\n strokeWidth: '3px',\n [HighContrastSelector]: {\n fill: 'Canvas'\n }\n },\n nodes: {\n fill: '#F5F5F5',\n [HighContrastSelector]: {\n fill: 'Canvas'\n }\n },\n toolTip: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n padding: '8px',\n position: 'absolute',\n textAlign: 'center',\n top: '0px',\n background: tokens.colorNeutralBackground1,\n borderRadius: '2px',\n pointerEvents: 'none'\n },\n nodeTextContainer: {\n '& text': {\n [HighContrastSelector]: {\n fill: 'CanvasText'\n }\n },\n marginTop: '4px',\n marginLeft: '8px',\n marginBottom: '4px',\n marginRight: '8px'\n },\n chartWrapper: {\n overflow: 'auto'\n },\n chart: {\n display: 'block'\n }\n});\nexport const useSankeyChartStyles = (props)=>{\n var _props_styles, _props_reflowProps, _props_styles1, _props_styles2;\n const baseStyles = useStyles();\n return {\n root: mergeClasses(sankeyChartClassNames.root, baseStyles.root, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),\n nodes: mergeClasses(sankeyChartClassNames.nodes, baseStyles.nodes /*, props.styles?.nodes*/ ),\n links: mergeClasses(sankeyChartClassNames.links, baseStyles.links /*, props.styles?.links*/ ),\n nodeTextContainer: mergeClasses(sankeyChartClassNames.nodeTextContainer, baseStyles.nodeTextContainer /*, props.styles?.nodeTextContainer*/ ),\n toolTip: mergeClasses(sankeyChartClassNames.toolTip, baseStyles.toolTip /*, props.styles?.toolTip*/ ),\n chartWrapper: mergeClasses(sankeyChartClassNames.chartWrapper, ((_props_reflowProps = props.reflowProps) === null || _props_reflowProps === void 0 ? void 0 : _props_reflowProps.mode) === 'min-width' ? baseStyles.chartWrapper : '', (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.chartWrapper),\n chart: mergeClasses(sankeyChartClassNames.chart, baseStyles.chart, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.chart)\n };\n};\n"],"names":["sankeyChartClassNames","useSankeyChartStyles","root","nodes","links","nodeTextContainer","toolTip","chartWrapper","chart","useStyles","__styles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","a9b677","Bqenvij","Beiy3e4","B68tc82","Bmxbyg5","Bpg54ce","Bkfmm31","Be5yapy","a6j6cd","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","qhf8xq","fsow6f","Bhzewxz","Bgh53k4","B2eet1l","De3pzq","Bcmaq0h","gk0gix","B20660r","B8a6bjv","Bpptf2m","e5kdtc","Bkjc3bi","ayd6f0","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","B3gqxw3","B6of3ja","Frg6f3","jrapky","t21cq0","d","p","m","props","_props_styles","_props_reflowProps","_props_styles1","_props_styles2","baseStyles","mergeClasses","styles","reflowProps","mode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,AAACqD,CAAAA,qBAAqBF,MAAMQ,WAAW,AAAXA,MAAiB,QAAQN,uBAAuB,KAAK,IAAI,KAAK,IAAIA,mBAAmBO,IAAI,AAAJA,MAAU,cAAcJ,WAAWxD,YAAY,GAAG,IAAI,AAACsD,CAAAA,iBAAiBH,MAAMO,MAAM,AAANA,MAAY,QAAQJ,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAetD,YAAY;QACnVC,OAAOwD,IAAAA,mBAAY,EAAChE,sBAAsBQ,KAAK,EAAEuD,WAAWvD,KAAK,EAAE,AAACsD,CAAAA,iBAAiBJ,MAAMO,MAAM,AAANA,MAAY,QAAQH,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAetD,KAAK;IAC5K;AACJ"}
@@ -19,6 +19,7 @@ const _index1 = require("../../utilities/index");
19
19
  const _index2 = require("../../index");
20
20
  const _reacttheme = require("@fluentui/react-theme");
21
21
  const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
22
+ var _props_legendProps, _props_legendProps1;
22
23
  const _circleId = (0, _reactutilities.useId)('circle');
23
24
  const _seriesId = (0, _reactutilities.useId)('seriesID');
24
25
  const _verticalLine = (0, _reactutilities.useId)('verticalLine');
@@ -53,20 +54,17 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
53
54
  y: 0
54
55
  });
55
56
  const [isPopoverOpen, setPopoverOpen] = _react.useState(false);
56
- const [selectedLegends, setSelectedLegends] = _react.useState([]);
57
- const prevPropsRef = _react.useRef(null);
57
+ const [selectedLegends, setSelectedLegends] = _react.useState(((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends) || []);
58
+ const prevSelectedLegendsRef = _react.useRef(undefined);
58
59
  _react.useEffect(()=>{
59
- if (prevPropsRef.current) {
60
- var _prevProps_legendProps, _props_legendProps;
61
- const prevProps = prevPropsRef.current;
62
- if (!(0, _index1.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)) {
63
- var _props_legendProps1;
64
- setSelectedLegends(((_props_legendProps1 = props.legendProps) === null || _props_legendProps1 === void 0 ? void 0 : _props_legendProps1.selectedLegends) || []);
65
- }
60
+ var _props_legendProps, _props_legendProps1;
61
+ if (prevSelectedLegendsRef.current && !(0, _index1.areArraysEqual)(prevSelectedLegendsRef.current, (_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends)) {
62
+ var _props_legendProps2;
63
+ setSelectedLegends(((_props_legendProps2 = props.legendProps) === null || _props_legendProps2 === void 0 ? void 0 : _props_legendProps2.selectedLegends) || []);
66
64
  }
67
- prevPropsRef.current = props;
65
+ prevSelectedLegendsRef.current = (_props_legendProps1 = props.legendProps) === null || _props_legendProps1 === void 0 ? void 0 : _props_legendProps1.selectedLegends;
68
66
  }, [
69
- props
67
+ (_props_legendProps1 = props.legendProps) === null || _props_legendProps1 === void 0 ? void 0 : _props_legendProps1.selectedLegends
70
68
  ]);
71
69
  _react.useImperativeHandle(props.componentRef, ()=>{
72
70
  var _cartesianChartRef_current;
@@ -297,9 +295,9 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
297
295
  const tooltipProps = {
298
296
  tooltipCls: classes.tooltip,
299
297
  id: _tooltipId,
300
- xAxis: xAxisElement
298
+ axis: xAxisElement
301
299
  };
302
- xAxisElement && (0, _index1.tooltipOfXAxislabels)(tooltipProps);
300
+ xAxisElement && (0, _index1.tooltipOfAxislabels)(tooltipProps);
303
301
  }
304
302
  return series;
305
303
  }
@@ -373,7 +371,7 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
373
371
  }
374
372
  /**
375
373
  * This function checks if none of the legends is selected or hovered.*/ function _noLegendHighlighted() {
376
- return selectedLegends.length === 0;
374
+ return _getHighlightedLegend().length === 0;
377
375
  }
378
376
  function _getHighlightedLegend() {
379
377
  return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [
@@ -1 +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={isLegendSelected ? 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.yScalePrimary!;\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":["ScatterChart","React","forwardRef","props","forwardedRef","_circleId","useId","_seriesId","_verticalLine","_tooltipId","_firstRenderOptimization","_emptyChartId","_points","_injectIndexPropertyInScatterChartData","data","lineChartData","_calloutPoints","calloutData","_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","areArraysEqual","legendProps","useImperativeHandle","componentRef","chartContainer","_xAxisType","length","getTypeOfAxis","XAxisTypes","StringAxis","pointsRef","calloutPointsRef","height","width","scatterChartData","map","item","index","color","getNextColor","getColorFromToken","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","createElement","Legends","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onLegendHoverCardLeave","onChange","_onLegendSelectionChange","legendsSelected","event","currentLegend","slice","_getPointFill","seriesColor","pointId","pointIndex","isLastPoint","tokens","colorNeutralBackground1","series","yMax","d3Max","points","yMin","d3Min","yPadding","yPaddingRange","abs","maxMarkerRange","xPaddingRange","bandwidth","DateAxis","xMin","xMax","xPadding","getTime","Date","min","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","useScatterChartStyles_unstable","showXAxisLablesTooltip","document","getElementById","remove","e","wrapXAxisLables","xAxisElement","d3Select","call","tooltipProps","tooltipCls","tooltip","xAxis","tooltipOfXAxislabels","formattedData","formatDate","useUTC","xVal","found","find","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","CartesianChart","chartTitle","chartType","ChartTypes","getmargins","getGraphData","xAxisType","onChartMouseLeave","enableFirstRenderOptimization","datasetForXAxisDomain","children","yScalePrimary","Fragment","line","x1","y1","x2","y2","visibility","strokeDasharray","div","style","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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sQ,YAAY;gBACZC,iBAAiB;8BAEnB9Q,OAAA0G,aAAA,CAACoF,KAAAA,MAAGxK;QAIZ;uBAGFtB,OAAA0G,aAAA,CAACqK,OAAAA;QAAIxG,IAAI7J;QAAegL,MAAM;QAASsF,OAAO;YAAEzF,SAAS;QAAI;QAAGI,cAAY;;AAEhF;AACA5L,aAAakR,WAAW,GAAG"}
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 tooltipOfAxislabels,\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[]>(props.legendProps?.selectedLegends || []);\n const prevSelectedLegendsRef = React.useRef<string[] | undefined>(undefined);\n\n React.useEffect(() => {\n if (\n prevSelectedLegendsRef.current &&\n !areArraysEqual(prevSelectedLegendsRef.current, props.legendProps?.selectedLegends)\n ) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n prevSelectedLegendsRef.current = props.legendProps?.selectedLegends;\n }, [props.legendProps?.selectedLegends]);\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={isLegendSelected ? 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 axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(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 _getHighlightedLegend().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.yScalePrimary!;\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":["ScatterChart","React","forwardRef","props","forwardedRef","_circleId","useId","_seriesId","_verticalLine","_tooltipId","_firstRenderOptimization","_emptyChartId","_points","_injectIndexPropertyInScatterChartData","data","lineChartData","_calloutPoints","calloutData","_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","legendProps","prevSelectedLegendsRef","undefined","useEffect","current","areArraysEqual","useImperativeHandle","componentRef","chartContainer","_xAxisType","length","getTypeOfAxis","XAxisTypes","StringAxis","pointsRef","calloutPointsRef","height","width","scatterChartData","map","item","index","color","getNextColor","getColorFromToken","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","createElement","Legends","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onLegendHoverCardLeave","onChange","_onLegendSelectionChange","legendsSelected","event","currentLegend","slice","_getPointFill","seriesColor","pointId","pointIndex","isLastPoint","tokens","colorNeutralBackground1","series","yMax","d3Max","points","yMin","d3Min","yPadding","yPaddingRange","abs","maxMarkerRange","xPaddingRange","bandwidth","DateAxis","xMin","xMax","xPadding","getTime","Date","min","maxMarkerSize","markerSize","i","pointsForSeries","legendVal","verticaLineHeight","bottom","j","seriesId","circleId","xAxisCalloutData","circleRadius","pointMarkerSize","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","useScatterChartStyles_unstable","showXAxisLablesTooltip","document","getElementById","remove","e","wrapXAxisLables","xAxisElement","d3Select","call","tooltipProps","tooltipCls","tooltip","axis","tooltipOfAxislabels","formattedData","formatDate","useUTC","xVal","found","find","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","CartesianChart","chartTitle","chartType","ChartTypes","getmargins","getGraphData","xAxisType","onChartMouseLeave","enableFirstRenderOptimization","datasetForXAxisDomain","children","yScalePrimary","Fragment","line","x1","y1","x2","y2","visibility","strokeDasharray","div","style","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;QACd,oCAAoC,GACpC,kDAAkD;QAClD0O,UAAU,CAAClQ;YACTe,cAAcf,MAAMqF,MAAM;YAC1BrE,cAAchB,MAAMmQ,aAAa;YACjC,OAAA,WAAA,GACErQ,OAAA0G,aAAA,CAAA1G,OAAAsQ,QAAA,EAAA,MAAA,WAAA,GACEtQ,OAAA0G,aAAA,CAACmF,KAAAA,MAAAA,WAAAA,GACC7L,OAAA0G,aAAA,CAAC6J,QAAAA;gBACCC,IAAI;gBACJC,IAAI;gBACJC,IAAI;gBACJC,IAAIzQ,MAAMuF,eAAe;gBACzB+F,QAAQ;gBACRlB,IAAI/J;gBACJqQ,YAAY;gBACZC,iBAAiB;8BAEnB7Q,OAAA0G,aAAA,CAACmF,KAAAA,MAAGvK;QAIZ;uBAGFtB,OAAA0G,aAAA,CAACoK,OAAAA;QAAIxG,IAAI5J;QAAe+K,MAAM;QAASsF,OAAO;YAAEzF,SAAS;QAAI;QAAGI,cAAY;;AAEhF;AACA3L,aAAaiR,WAAW,GAAG"}
@@ -30,7 +30,8 @@ const scatterChartClassNames = {
30
30
  opacityChangeOnHover: 'fui-line__opacityChangeOnHover',
31
31
  shapeStyles: 'fui-line__shapeStyles',
32
32
  chartWrapper: 'fui-line__chartWrapper',
33
- svgTooltip: ''
33
+ svgTooltip: '',
34
+ chart: ''
34
35
  };
35
36
  /**
36
37
  * Base Styles
@@ -1 +1 @@
1
- {"version":3,"sources":["useScatterChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\n/**\n * @internal\n */ export const scatterChartClassNames = {\n tooltip: 'fui-line__tooltip',\n root: 'fui-line__root',\n xAxis: 'fui-line__xAxis',\n yAxis: 'fui-line__yAxis',\n legendContainer: 'fui-line__legendContainer',\n hover: 'fui-line__hover',\n descriptionMessage: 'fui-line__descriptionMessage',\n axisTitle: 'fui-line__axisTitle',\n chartTitle: 'fui-line__chartTitle',\n opacityChangeOnHover: 'fui-line__opacityChangeOnHover',\n shapeStyles: 'fui-line__shapeStyles',\n chartWrapper: 'fui-line__chartWrapper',\n svgTooltip: ''\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n tooltip: {\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.padding(tokens.spacingHorizontalS),\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n fill: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none'\n }\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const useScatterChartStyles_unstable = (props)=>{\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(scatterChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ )\n };\n};\n"],"names":["scatterChartClassNames","useScatterChartStyles_unstable","tooltip","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","useStyles","__styles","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","Bkfmm31","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","d","p","props","baseStyles","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIiBA,sBAAsB;eAAtBA;;IAgCAC,8BAA8B;eAA9BA;;;uBApCoC;AAI1C,MAAMD,yBAAyB;IACtCE,SAAS;IACTC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,sBAAsB;IACtBC,aAAa;IACbC,cAAc;IACdC,YAAY;AAChB;AACA;;CAEA,GAAI,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAd,SAAA;QAAAe,QAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,SAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAAC,GAAA,CAAA;YAAA;SAAA;QAAA;KAAA;AAAA;AAeX,MAAMjC,iCAAkCkC,CAAAA;IAC/C,MAAMC,aAAarB;IACnB,OAAO;QACHb,SAASmC,IAAAA,mBAAY,EAACrC,uBAAuBE,OAAO,EAAEkC,WAAWlC,OAAO,CAAC,uBAAA;IAC7E;AACJ"}
1
+ {"version":3,"sources":["useScatterChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\n/**\n * @internal\n */ export const scatterChartClassNames = {\n tooltip: 'fui-line__tooltip',\n root: 'fui-line__root',\n xAxis: 'fui-line__xAxis',\n yAxis: 'fui-line__yAxis',\n legendContainer: 'fui-line__legendContainer',\n hover: 'fui-line__hover',\n descriptionMessage: 'fui-line__descriptionMessage',\n axisTitle: 'fui-line__axisTitle',\n chartTitle: 'fui-line__chartTitle',\n opacityChangeOnHover: 'fui-line__opacityChangeOnHover',\n shapeStyles: 'fui-line__shapeStyles',\n chartWrapper: 'fui-line__chartWrapper',\n svgTooltip: '',\n chart: ''\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n tooltip: {\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.padding(tokens.spacingHorizontalS),\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n fill: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none'\n }\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const useScatterChartStyles_unstable = (props)=>{\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(scatterChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ )\n };\n};\n"],"names":["scatterChartClassNames","useScatterChartStyles_unstable","tooltip","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","useStyles","__styles","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","Bkfmm31","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","d","p","props","baseStyles","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIiBA,sBAAsB;eAAtBA;;IAiCAC,8BAA8B;eAA9BA;;;uBArCoC;AAI1C,MAAMD,yBAAyB;IACtCE,SAAS;IACTC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,sBAAsB;IACtBC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;AACX;AACA;;CAEA,GAAI,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAf,SAAA;QAAAgB,QAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,SAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAAC,GAAA,CAAA;YAAA;SAAA;QAAA;KAAA;AAAA;AAeX,MAAMlC,iCAAkCmC,CAAAA;IAC/C,MAAMC,aAAarB;IACnB,OAAO;QACHd,SAASoC,IAAAA,mBAAY,EAACtC,uBAAuBE,OAAO,EAAEmC,WAAWnC,OAAO,CAAC,uBAAA;IAC7E;AACJ"}
@@ -521,9 +521,9 @@ const VerticalBarChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>
521
521
  const tooltipProps = {
522
522
  tooltipCls: classes.tooltip,
523
523
  id: _tooltipId,
524
- xAxis: xAxisElement
524
+ axis: xAxisElement
525
525
  };
526
- xAxisElement && (0, _index1.tooltipOfXAxislabels)(tooltipProps);
526
+ xAxisElement && (0, _index1.tooltipOfAxislabels)(tooltipProps);
527
527
  }
528
528
  return bars;
529
529
  }
@@ -597,10 +597,10 @@ const VerticalBarChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>
597
597
  const tooltipProps = {
598
598
  tooltipCls: classes.tooltip,
599
599
  id: _tooltipId,
600
- xAxis: xAxisElement,
600
+ axis: xAxisElement,
601
601
  showTooltip: props.showXAxisLablesTooltip
602
602
  };
603
- xAxisElement && (0, _index1.tooltipOfXAxislabels)(tooltipProps);
603
+ xAxisElement && (0, _index1.tooltipOfAxislabels)(tooltipProps);
604
604
  }
605
605
  return bars;
606
606
  }
@@ -672,9 +672,9 @@ const VerticalBarChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>
672
672
  const tooltipProps = {
673
673
  tooltipCls: classes.tooltip,
674
674
  id: _tooltipId,
675
- xAxis: xAxisElement
675
+ axis: xAxisElement
676
676
  };
677
- xAxisElement && (0, _index1.tooltipOfXAxislabels)(tooltipProps);
677
+ xAxisElement && (0, _index1.tooltipOfAxislabels)(tooltipProps);
678
678
  }
679
679
  return bars;
680
680
  }