@fluentui/react-charts 9.2.3 → 9.3.0

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 (347) hide show
  1. package/CHANGELOG.md +79 -10
  2. package/dist/index.d.ts +98 -5
  3. package/lib/components/AreaChart/AreaChart.js +8 -6
  4. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  5. package/lib/components/AreaChart/useAreaChartStyles.styles.js +4 -2
  6. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  7. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +4 -15
  8. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  9. package/lib/components/ChartTable/ChartTable.js +95 -8
  10. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  11. package/lib/components/ChartTable/useChartTableStyles.styles.js +5 -3
  12. package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  13. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +3 -2
  14. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  15. package/lib/components/CommonComponents/CartesianChart.js +45 -42
  16. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  17. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  18. package/lib/components/CommonComponents/ChartPopover.js +14 -5
  19. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  20. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +19 -14
  21. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  22. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +7 -33
  23. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  24. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +5 -3
  25. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  26. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +3 -2
  27. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  28. package/lib/components/DeclarativeChart/DeclarativeChart.js +56 -16
  29. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  30. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +19 -0
  31. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  32. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +1096 -337
  33. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  34. package/lib/components/DeclarativeChart/imageExporter.js +1 -0
  35. package/lib/components/DeclarativeChart/imageExporter.js.map +1 -1
  36. package/lib/components/DonutChart/Arc/Arc.js +8 -8
  37. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  38. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
  39. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +9 -2
  40. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  41. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +6 -1
  42. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  43. package/lib/components/DonutChart/DonutChart.js +61 -25
  44. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  45. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  46. package/lib/components/DonutChart/Pie/Pie.js +1 -0
  47. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  48. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
  49. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +2 -0
  50. package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
  51. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js +1 -0
  52. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -1
  53. package/lib/components/DonutChart/useDonutChartStyles.styles.js +23 -4
  54. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  55. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +9 -4
  56. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  57. package/lib/components/FunnelChart/FunnelChart.js +11 -5
  58. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  59. package/lib/components/FunnelChart/funnelGeometry.js.map +1 -1
  60. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +2 -0
  61. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
  62. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +1 -0
  63. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
  64. package/lib/components/GanttChart/GanttChart.js +1 -0
  65. package/lib/components/GanttChart/GanttChart.js.map +1 -1
  66. package/lib/components/GaugeChart/GaugeChart.js +2 -2
  67. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  68. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +2 -0
  69. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  70. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +1 -0
  71. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
  72. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +15 -9
  73. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  74. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +6 -17
  75. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  76. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +5 -21
  77. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  78. package/lib/components/HeatMapChart/HeatMapChart.js +2 -1
  79. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  80. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +2 -0
  81. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  82. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +1 -0
  83. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
  84. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +3 -3
  85. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  86. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +8 -2
  87. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  88. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +5 -1
  89. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  90. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -2
  91. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  92. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +2 -0
  93. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  94. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +1 -0
  95. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  96. package/lib/components/Legends/Legends.js +1 -0
  97. package/lib/components/Legends/Legends.js.map +1 -1
  98. package/lib/components/Legends/OverflowMenu.js +1 -0
  99. package/lib/components/Legends/OverflowMenu.js.map +1 -1
  100. package/lib/components/Legends/shape.js +1 -0
  101. package/lib/components/Legends/shape.js.map +1 -1
  102. package/lib/components/Legends/useLegendsStyles.styles.js +2 -0
  103. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  104. package/lib/components/Legends/useLegendsStyles.styles.raw.js +1 -0
  105. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  106. package/lib/components/LineChart/LineChart.js +284 -281
  107. package/lib/components/LineChart/LineChart.js.map +1 -1
  108. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  109. package/lib/components/LineChart/eventAnnotation/LabelLink.js +1 -0
  110. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  111. package/lib/components/LineChart/eventAnnotation/Textbox.js +1 -0
  112. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  113. package/lib/components/LineChart/useLineChartStyles.styles.js +25 -10
  114. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  115. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +5 -21
  116. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  117. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +1 -0
  118. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  119. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +2 -0
  120. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -1
  121. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +1 -0
  122. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -1
  123. package/lib/components/ResponsiveContainer/withResponsiveContainer.js +1 -0
  124. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  125. package/lib/components/SankeyChart/SankeyChart.js +1 -0
  126. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  127. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +14 -25
  128. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  129. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +3 -12
  130. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  131. package/lib/components/ScatterChart/ScatterChart.js +121 -81
  132. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  133. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  134. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +13 -7
  135. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  136. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +5 -22
  137. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  138. package/lib/components/Sparkline/Sparkline.js +1 -0
  139. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  140. package/lib/components/Sparkline/useSparklineStyles.styles.js +2 -0
  141. package/lib/components/Sparkline/useSparklineStyles.styles.js.map +1 -1
  142. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js +1 -0
  143. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -1
  144. package/lib/components/VerticalBarChart/VerticalBarChart.js +17 -12
  145. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  146. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +10 -6
  147. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  148. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +6 -19
  149. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  150. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +30 -25
  151. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  152. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +9 -6
  153. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  154. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +5 -19
  155. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  156. package/lib/types/DataPoint.js +3 -1
  157. package/lib/types/DataPoint.js.map +1 -1
  158. package/lib/utilities/Common.styles.js +47 -0
  159. package/lib/utilities/Common.styles.js.map +1 -0
  160. package/lib/utilities/Common.styles.raw.js +47 -0
  161. package/lib/utilities/Common.styles.raw.js.map +1 -0
  162. package/lib/utilities/FocusableTooltipText.js +1 -0
  163. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  164. package/lib/utilities/SVGTooltipText.js +1 -0
  165. package/lib/utilities/SVGTooltipText.js.map +1 -1
  166. package/lib/utilities/image-export-utils.js +1 -0
  167. package/lib/utilities/image-export-utils.js.map +1 -1
  168. package/lib/utilities/index.js +1 -0
  169. package/lib/utilities/index.js.map +1 -1
  170. package/lib/utilities/scatterpolar-utils.js +52 -0
  171. package/lib/utilities/scatterpolar-utils.js.map +1 -0
  172. package/lib/utilities/utilities.js +314 -146
  173. package/lib/utilities/utilities.js.map +1 -1
  174. package/lib/utilities/vbc-utils.js.map +1 -1
  175. package/lib-commonjs/components/AreaChart/AreaChart.js +7 -5
  176. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  177. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +1 -0
  178. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  179. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -14
  180. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  181. package/lib-commonjs/components/ChartTable/ChartTable.js +95 -8
  182. package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
  183. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +4 -3
  184. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  185. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +3 -2
  186. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  187. package/lib-commonjs/components/CommonComponents/CartesianChart.js +45 -42
  188. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  189. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  190. package/lib-commonjs/components/CommonComponents/ChartPopover.js +14 -5
  191. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
  192. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +16 -13
  193. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  194. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +5 -32
  195. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  196. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +4 -3
  197. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  198. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +3 -2
  199. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  200. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +60 -20
  201. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  202. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +22 -0
  203. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  204. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +1109 -338
  205. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  206. package/lib-commonjs/components/DeclarativeChart/imageExporter.js +1 -0
  207. package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -1
  208. package/lib-commonjs/components/DonutChart/Arc/Arc.js +8 -8
  209. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  210. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -1
  211. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +11 -1
  212. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  213. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +6 -1
  214. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  215. package/lib-commonjs/components/DonutChart/DonutChart.js +61 -25
  216. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  217. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  218. package/lib-commonjs/components/DonutChart/Pie/Pie.js +2 -1
  219. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  220. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -1
  221. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +1 -0
  222. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
  223. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js +1 -0
  224. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -1
  225. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +33 -4
  226. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  227. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +9 -4
  228. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  229. package/lib-commonjs/components/FunnelChart/FunnelChart.js +11 -5
  230. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
  231. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -1
  232. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +1 -0
  233. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
  234. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +1 -0
  235. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
  236. package/lib-commonjs/components/GanttChart/GanttChart.js +1 -0
  237. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
  238. package/lib-commonjs/components/GaugeChart/GaugeChart.js +2 -2
  239. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  240. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +1 -0
  241. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  242. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +1 -0
  243. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
  244. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +15 -9
  245. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  246. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +3 -19
  247. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  248. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +4 -20
  249. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  250. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +2 -1
  251. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  252. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +1 -0
  253. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  254. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +1 -0
  255. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
  256. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +3 -3
  257. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  258. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +10 -2
  259. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  260. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +5 -1
  261. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  262. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -2
  263. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  264. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +1 -0
  265. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  266. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +1 -0
  267. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  268. package/lib-commonjs/components/Legends/Legends.js +1 -0
  269. package/lib-commonjs/components/Legends/Legends.js.map +1 -1
  270. package/lib-commonjs/components/Legends/OverflowMenu.js +1 -0
  271. package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -1
  272. package/lib-commonjs/components/Legends/shape.js +1 -0
  273. package/lib-commonjs/components/Legends/shape.js.map +1 -1
  274. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +1 -0
  275. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
  276. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +1 -0
  277. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  278. package/lib-commonjs/components/LineChart/LineChart.js +282 -279
  279. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  280. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  281. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +1 -0
  282. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  283. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +1 -0
  284. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  285. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +31 -9
  286. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  287. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +3 -20
  288. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  289. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +1 -0
  290. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  291. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +1 -0
  292. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -1
  293. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +1 -0
  294. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -1
  295. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js +2 -1
  296. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  297. package/lib-commonjs/components/SankeyChart/SankeyChart.js +1 -0
  298. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  299. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +24 -33
  300. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  301. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +2 -12
  302. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  303. package/lib-commonjs/components/ScatterChart/ScatterChart.js +118 -78
  304. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  305. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  306. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +14 -7
  307. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  308. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -20
  309. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  310. package/lib-commonjs/components/Sparkline/Sparkline.js +1 -0
  311. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
  312. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +1 -0
  313. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +1 -1
  314. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js +1 -0
  315. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -1
  316. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +16 -11
  317. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  318. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +6 -3
  319. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  320. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +4 -17
  321. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  322. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +29 -24
  323. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  324. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +6 -3
  325. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  326. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +4 -18
  327. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  328. package/lib-commonjs/types/DataPoint.js +3 -1
  329. package/lib-commonjs/types/DataPoint.js.map +1 -1
  330. package/lib-commonjs/utilities/Common.styles.js +71 -0
  331. package/lib-commonjs/utilities/Common.styles.js.map +1 -0
  332. package/lib-commonjs/utilities/Common.styles.raw.js +71 -0
  333. package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -0
  334. package/lib-commonjs/utilities/FocusableTooltipText.js +2 -1
  335. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  336. package/lib-commonjs/utilities/SVGTooltipText.js +1 -0
  337. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  338. package/lib-commonjs/utilities/image-export-utils.js +1 -0
  339. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  340. package/lib-commonjs/utilities/index.js +1 -0
  341. package/lib-commonjs/utilities/index.js.map +1 -1
  342. package/lib-commonjs/utilities/scatterpolar-utils.js +67 -0
  343. package/lib-commonjs/utilities/scatterpolar-utils.js.map +1 -0
  344. package/lib-commonjs/utilities/utilities.js +327 -137
  345. package/lib-commonjs/utilities/utilities.js.map +1 -1
  346. package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
  347. package/package.json +10 -10
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  "use strict";
2
3
  Object.defineProperty(exports, "__esModule", {
3
4
  value: true
@@ -19,6 +20,8 @@ const _index1 = require("../../utilities/index");
19
20
  const _index2 = require("../../index");
20
21
  const _reacttheme = require("@fluentui/react-theme");
21
22
  const _imageexportutils = require("../../utilities/image-export-utils");
23
+ const _scatterpolarutils = require("../../utilities/scatterpolar-utils");
24
+ const _chartutilities = require("@fluentui/chart-utilities");
22
25
  const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
23
26
  var _props_legendProps, _props_legendProps1;
24
27
  const _circleId = (0, _reactutilities.useId)('circle');
@@ -60,6 +63,8 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
60
63
  const [isPopoverOpen, setPopoverOpen] = _react.useState(false);
61
64
  const [selectedLegends, setSelectedLegends] = _react.useState(((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends) || []);
62
65
  const prevSelectedLegendsRef = _react.useRef(undefined);
66
+ const _isTextMode = _react.useRef(false);
67
+ const _isScatterPolarRef = _react.useRef(false);
63
68
  _react.useEffect(()=>{
64
69
  var _props_legendProps, _props_legendProps1;
65
70
  if (prevSelectedLegendsRef.current && !(0, _index1.areArraysEqual)(prevSelectedLegendsRef.current, (_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends)) {
@@ -82,6 +87,8 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
82
87
  };
83
88
  }, []);
84
89
  const _xAxisType = props.data.scatterChartData && props.data.scatterChartData.length > 0 && props.data.scatterChartData[0].data && props.data.scatterChartData[0].data.length > 0 ? (0, _index1.getTypeOfAxis)(props.data.scatterChartData[0].data[0].x, true) : _index1.XAxisTypes.StringAxis;
90
+ // Detect y axis type (numeric or string)
91
+ const _yAxisType = props.data.scatterChartData && props.data.scatterChartData.length > 0 && props.data.scatterChartData[0].data && props.data.scatterChartData[0].data.length > 0 ? typeof props.data.scatterChartData[0].data[0].y === 'string' ? _index1.YAxisType.StringAxis : _index1.YAxisType.NumericAxis : _index1.YAxisType.NumericAxis;
85
92
  const pointsRef = _react.useRef([]);
86
93
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
87
94
  const calloutPointsRef = _react.useRef([]);
@@ -130,19 +137,18 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
130
137
  function _getNumericMinMaxOfY(points, yAxisType) {
131
138
  // eslint-disable-next-line @typescript-eslint/no-shadow
132
139
  const { startValue, endValue } = (0, _index1.findNumericMinMaxOfY)(points, yAxisType);
133
- let yPadding = 0;
134
- yPadding = (endValue - startValue) * 0.1;
140
+ const yPadding = (0, _index1.getDomainPaddingForMarkers)(startValue, endValue, props.yScaleType);
135
141
  return {
136
- startValue: startValue - yPadding,
137
- endValue: endValue + yPadding
142
+ startValue: startValue - yPadding.start,
143
+ endValue: endValue + yPadding.end
138
144
  };
139
145
  }
140
146
  function _getDomainNRangeValues(points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues, shiftX) {
141
147
  let domainNRangeValue;
142
148
  if (xAxisType === _index1.XAxisTypes.NumericAxis) {
143
- domainNRangeValue = (0, _index1.domainRangeOfNumericForScatterChart)(points, margins, width, isRTL);
149
+ domainNRangeValue = (0, _index1.domainRangeOfNumericForAreaLineScatterCharts)(points, margins, width, isRTL, props.xScaleType, true);
144
150
  } else if (xAxisType === _index1.XAxisTypes.DateAxis) {
145
- domainNRangeValue = (0, _index1.domainRangeOfDateForScatterChart)(points, margins, width, isRTL, tickValues);
151
+ domainNRangeValue = (0, _index1.domainRangeOfDateForAreaLineScatterVerticalBarCharts)(points, margins, width, isRTL, tickValues, chartType);
146
152
  } else {
147
153
  domainNRangeValue = (0, _index1.domainRangeOfXStringAxis)(margins, width, isRTL);
148
154
  }
@@ -154,6 +160,8 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
154
160
  function _initializeScatterChartData(xScale, yScale, containerHeight, containerWidth, xElement) {
155
161
  _xAxisScale = xScale;
156
162
  _yAxisScale = yScale;
163
+ _isTextMode.current = (0, _index1.isTextMode)(_points);
164
+ _isScatterPolarRef.current = (0, _index1.isScatterPolarSeries)(_points);
157
165
  renderSeries = _createPlot(xElement, containerHeight);
158
166
  }
159
167
  function _onHoverCardHide() {
@@ -206,6 +214,43 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
206
214
  legendRef: _legendsRef
207
215
  });
208
216
  }
217
+ function _getOrderedYAxisLabels() {
218
+ const shouldOrderYAxisLabelsByCategoryOrder = _yAxisType === _index1.YAxisType.StringAxis && props.yAxisCategoryOrder !== 'default';
219
+ if (!shouldOrderYAxisLabelsByCategoryOrder) {
220
+ // Collect all unique string y values from all data points in all series, in reverse order
221
+ const yLabelsSet = new Set();
222
+ for(let i = _points.length - 1; i >= 0; i--){
223
+ const point = _points[i];
224
+ if (point.data && Array.isArray(point.data)) {
225
+ for (const d of point.data){
226
+ if (typeof d.y === 'string') {
227
+ yLabelsSet.add(d.y);
228
+ }
229
+ }
230
+ }
231
+ }
232
+ return Array.from(yLabelsSet);
233
+ }
234
+ return (0, _index1.sortAxisCategories)(_mapCategoryToValues(), props.yAxisCategoryOrder);
235
+ }
236
+ function _mapCategoryToValues() {
237
+ const categoryToValues = {};
238
+ _points.forEach((point)=>{
239
+ if (point.data && Array.isArray(point.data)) {
240
+ point.data.forEach((d)=>{
241
+ if (typeof d.y === 'string') {
242
+ if (!categoryToValues[d.y]) {
243
+ categoryToValues[d.y] = [];
244
+ }
245
+ if (typeof d.x === 'number') {
246
+ categoryToValues[d.y].push(d.x);
247
+ }
248
+ }
249
+ });
250
+ }
251
+ });
252
+ return categoryToValues;
253
+ }
209
254
  function _onLegendSelectionChange(legendsSelected, event, currentLegend) {
210
255
  var _props_legendProps, _props_legendProps1;
211
256
  if ((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.canSelectMultipleLegends) {
@@ -224,12 +269,6 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
224
269
  return seriesColor;
225
270
  }
226
271
  }
227
- function _getRangeForScatterMarkerSize(yScale, yPadding, xMin, xMax, xPadding) {
228
- const extraXPixels = _isRTL ? _xAxisScale(xMax - xPadding) - _xAxisScale(xMax) : _xAxisScale(xMin + xPadding) - _xAxisScale(xMin);
229
- const yMin = yScale.domain()[0];
230
- const extraYPixels = yScale(yMin) - yScale(yMin + yPadding);
231
- return Math.min(extraXPixels, extraYPixels);
232
- }
233
272
  function _createPlot(xElement, containerHeight) {
234
273
  const series = [];
235
274
  if (isSelectedLegend) {
@@ -237,87 +276,80 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
237
276
  } else {
238
277
  _points = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);
239
278
  }
240
- const yMax = (0, _d3array.max)(points, (point)=>{
241
- return (0, _d3array.max)(point.data, (item)=>item.y);
242
- });
243
- const yMin = (0, _d3array.min)(points, (point)=>{
244
- return (0, _d3array.min)(point.data, (item)=>item.y);
245
- });
246
- const yPadding = (yMax - yMin) * 0.1;
247
- let xPadding = 0;
248
- let xMin = 0;
249
- let xMax = 0;
250
279
  if (_xAxisType === _index1.XAxisTypes.StringAxis) {
251
280
  _xBandwidth = _xAxisScale.bandwidth() / 2;
252
- } else if (_xAxisType === _index1.XAxisTypes.DateAxis) {
253
- xMin = (0, _d3array.min)(_points, (point)=>{
254
- return (0, _d3array.min)(point.data, (item)=>item.x);
255
- }).getTime();
256
- xMax = (0, _d3array.max)(_points, (point)=>{
257
- return (0, _d3array.max)(point.data, (item)=>{
258
- return item.x;
259
- });
260
- }).getTime();
261
- xPadding = (xMax - xMin) * 0.1;
262
- } else {
263
- xMin = (0, _d3array.min)(_points, (point)=>{
264
- return (0, _d3array.min)(point.data, (item)=>item.x);
265
- });
266
- xMax = (0, _d3array.max)(_points, (point)=>{
267
- return (0, _d3array.max)(point.data, (item)=>{
268
- return item.x;
269
- });
270
- });
271
- xPadding = (xMax - xMin) * 0.1;
272
281
  }
273
282
  const maxMarkerSize = (0, _d3array.max)(_points, (point)=>{
274
283
  return (0, _d3array.max)(point.data, (item)=>{
275
284
  return item.markerSize;
276
285
  });
277
286
  });
287
+ const extraMaxPixels = _xAxisType !== _index1.XAxisTypes.StringAxis && _yAxisType !== _index1.YAxisType.StringAxis ? (0, _index1.getRangeForScatterMarkerSize)({
288
+ data: _points,
289
+ xScale: _xAxisScale,
290
+ yScalePrimary: _yAxisScale,
291
+ xScaleType: props.xScaleType,
292
+ yScaleType: props.yScaleType
293
+ }) : 0;
278
294
  for(let i = _points.length - 1; i >= 0; i--){
279
295
  const pointsForSeries = [];
280
296
  const legendVal = _points[i].legend;
281
297
  const seriesColor = _points[i].color;
282
298
  const verticaLineHeight = containerHeight - margins.bottom + 6;
283
299
  for(let j = 0; j < _points[i].data.length; j++){
284
- var _points_i_data_j;
300
+ var _points_i, _points_i_data_j;
301
+ const { x, y, xAxisCalloutData, xAxisCalloutAccessibilityData } = _points === null || _points === void 0 ? void 0 : (_points_i = _points[i]) === null || _points_i === void 0 ? void 0 : _points_i.data[j];
302
+ const xPoint = _xAxisScale === null || _xAxisScale === void 0 ? void 0 : _xAxisScale(x);
303
+ // Use string y axis scale if needed
304
+ const yPoint = _yAxisType === _index1.YAxisType.StringAxis ? (_yAxisScale === null || _yAxisScale === void 0 ? void 0 : _yAxisScale(y)) + ((_yAxisScale === null || _yAxisScale === void 0 ? void 0 : _yAxisScale.bandwidth) ? _yAxisScale.bandwidth() / 2 : 0) : _yAxisScale === null || _yAxisScale === void 0 ? void 0 : _yAxisScale(y);
305
+ if (!(0, _index1.isPlottable)(xPoint, yPoint)) {
306
+ continue;
307
+ }
285
308
  const seriesId = `${_seriesId}_${i}_${j}`;
286
309
  const circleId = `${_circleId}_${i}_${j}`;
287
- const { x, y, xAxisCalloutData, xAxisCalloutAccessibilityData } = _points[i].data[j];
288
310
  const pointMarkerSize = _points[i].data[j].markerSize;
289
- const extraMaxPixels = _xAxisType !== _index1.XAxisTypes.StringAxis ? _getRangeForScatterMarkerSize(_yAxisScale, yPadding, xMin, xMax, xPadding) : 0;
290
311
  const minPixel = 4;
291
312
  const maxPixel = 16;
292
313
  const circleRadius = pointMarkerSize && maxMarkerSize !== 0 ? _xAxisType !== _index1.XAxisTypes.StringAxis ? pointMarkerSize * extraMaxPixels / maxMarkerSize : minPixel + (pointMarkerSize - minPixel) / (maxMarkerSize - minPixel) * (maxPixel - minPixel) : activePoint === circleId ? 6 : 4;
293
314
  const isLegendSelected = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;
294
315
  const currentPointHidden = _points[i].hideNonActiveDots && activePoint !== circleId;
295
316
  const text = _points === null || _points === void 0 ? void 0 : (_points_i_data_j = _points[i].data[j]) === null || _points_i_data_j === void 0 ? void 0 : _points_i_data_j.text;
296
- pointsForSeries.push(/*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement("circle", {
297
- id: circleId,
298
- key: circleId,
299
- r: Math.max(circleRadius, 4),
300
- cx: _xAxisScale(x) + _xBandwidth,
301
- cy: _yAxisScale(y),
302
- "data-is-focusable": isLegendSelected,
303
- onMouseOver: (event)=>_handleHover(x, y, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event),
304
- onMouseMove: (event)=>_handleHover(x, y, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event),
305
- onMouseOut: _handleMouseOut,
306
- onFocus: (event)=>_handleFocus(event, seriesId, x, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData),
307
- onBlur: _handleMouseOut,
308
- ..._getClickHandler(_points[i].data[j].onDataPointClick),
309
- opacity: isLegendSelected && !currentPointHidden ? 1 : 0.1,
310
- fill: _getPointFill(seriesColor, circleId, j, false),
311
- stroke: seriesColor,
312
- role: "img",
313
- "aria-label": _getAriaLabel(i, j),
314
- tabIndex: isLegendSelected ? 0 : undefined
315
- }), ",", text && /*#__PURE__*/ _react.createElement("text", {
316
- key: `${circleId}-label`,
317
- x: _xAxisScale(x) + _xBandwidth,
318
- y: _yAxisScale(y) + Math.max(circleRadius + 12, 16),
319
- className: classes.markerLabel
320
- }, text)));
317
+ if (!_isTextMode.current) {
318
+ pointsForSeries.push(/*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement("circle", {
319
+ id: circleId,
320
+ key: circleId,
321
+ r: Math.max(circleRadius, 4),
322
+ cx: xPoint + _xBandwidth,
323
+ cy: yPoint,
324
+ "data-is-focusable": isLegendSelected,
325
+ onMouseOver: (event)=>_handleHover(x, y, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event),
326
+ onMouseMove: (event)=>_handleHover(x, y, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event),
327
+ onMouseOut: _handleMouseOut,
328
+ onFocus: (event)=>_handleFocus(event, seriesId, x, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData),
329
+ onBlur: _handleMouseOut,
330
+ ..._getClickHandler(_points[i].data[j].onDataPointClick),
331
+ opacity: isLegendSelected && !currentPointHidden ? 1 : 0.1,
332
+ fill: _getPointFill(seriesColor, circleId, j, false),
333
+ stroke: seriesColor,
334
+ role: "img",
335
+ "aria-label": _getAriaLabel(i, j),
336
+ tabIndex: isLegendSelected ? 0 : undefined
337
+ }), ",", text && /*#__PURE__*/ _react.createElement("text", {
338
+ key: `${circleId}-label`,
339
+ x: xPoint + _xBandwidth,
340
+ y: yPoint + Math.max(circleRadius + 12, 16),
341
+ className: classes.markerLabel
342
+ }, text)));
343
+ }
344
+ }
345
+ if (_isScatterPolarRef.current) {
346
+ var _points_i1;
347
+ pointsForSeries.push(...(0, _scatterpolarutils.renderScatterPolarCategoryLabels)({
348
+ xAxisScale: _xAxisScale,
349
+ yAxisScale: _yAxisScale,
350
+ className: classes.markerLabel || '',
351
+ lineOptions: _points === null || _points === void 0 ? void 0 : (_points_i1 = _points[i]) === null || _points_i1 === void 0 ? void 0 : _points_i1.lineOptions
352
+ }));
321
353
  }
322
354
  series.push(/*#__PURE__*/ _react.createElement("g", {
323
355
  key: `series_${i}`,
@@ -356,7 +388,7 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
356
388
  cy = targetRect.top + targetRect.height / 2;
357
389
  updatePosition(cx, cy);
358
390
  _uniqueCallOutID = circleId;
359
- const formattedData = x instanceof Date ? (0, _index1.formatDate)(x, props.useUTC) : x;
391
+ const formattedData = x instanceof Date ? (0, _chartutilities.formatDateToLocaleString)(x, props.culture, props.useUTC) : x;
360
392
  const xVal = x instanceof Date ? x.getTime() : x;
361
393
  const found = (0, _index1.find)(_calloutPoints, (element)=>element.x === xVal);
362
394
  // if no points need to be called out then don't show vertical line and callout card
@@ -377,7 +409,7 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
377
409
  }
378
410
  function _handleHover(x, y, lineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, mouseEvent) {
379
411
  mouseEvent === null || mouseEvent === void 0 ? void 0 : mouseEvent.persist();
380
- const formattedData = x instanceof Date ? (0, _index1.formatDate)(x, props.useUTC) : x;
412
+ const formattedData = x instanceof Date ? (0, _chartutilities.formatDateToLocaleString)(x, props.culture, props.useUTC) : x;
381
413
  const xVal = x instanceof Date ? x.getTime() : x;
382
414
  const found = (0, _index1.find)(_calloutPoints, (element)=>element.x === xVal);
383
415
  // if no points need to be called out then don't show vertical line and callout card
@@ -435,7 +467,7 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
435
467
  var _point_callOutAccessibilityData;
436
468
  const series = _points[seriesIndex];
437
469
  const point = series.data[pointIndex];
438
- const formattedDate = point.x instanceof Date ? (0, _index1.formatDate)(point.x, props.useUTC) : point.x;
470
+ const formattedDate = point.x instanceof Date ? (0, _chartutilities.formatDateToLocaleString)(point.x, props.culture, props.useUTC) : point.x;
439
471
  const xValue = point.xAxisCalloutData || formattedDate;
440
472
  const legend = series.legend;
441
473
  const yValue = point.yAxisCalloutData || point.y;
@@ -444,7 +476,6 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
444
476
  function _isChartEmpty() {
445
477
  return !(props.data && props.data.scatterChartData && props.data.scatterChartData.length > 0 && props.data.scatterChartData.filter((item)=>item.data.length).length > 0);
446
478
  }
447
- const _getMinMaxofXAxis = _react.useCallback((points, yAxisType)=>_getNumericMinMaxOfY(points, yAxisType), []);
448
479
  const { legendProps, tickValues, tickFormat } = props;
449
480
  _points = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);
450
481
  let points = _points;
@@ -456,10 +487,9 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
456
487
  // reduce computation cost by only creating legendBars
457
488
  // if when hideLegend is false.
458
489
  // NOTE: they are rendered only when hideLegend is false in CartesianChart.
459
- if (!props.hideLegend) {
490
+ if (!props.hideLegend && !_isTextMode.current) {
460
491
  legendBars = _createLegends(_points); // ToDo: Memoize legends to improve performance.
461
492
  }
462
- var _props_culture;
463
493
  const calloutProps = {
464
494
  YValueHover,
465
495
  hoverXValue,
@@ -470,7 +500,7 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
470
500
  clickPosition,
471
501
  isPopoverOpen,
472
502
  isCalloutForStack: true,
473
- culture: (_props_culture = props.culture) !== null && _props_culture !== void 0 ? _props_culture : 'en-us',
503
+ culture: props.culture,
474
504
  isCartesian: true
475
505
  };
476
506
  const tickParams = {
@@ -481,6 +511,8 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
481
511
  _xAxisLabels = [
482
512
  ...new Set(xAxisLabels)
483
513
  ];
514
+ // Compute unique y axis labels for string y axis
515
+ const _yAxisLabels = _getOrderedYAxisLabels();
484
516
  return !_isChartEmpty() ? /*#__PURE__*/ _react.createElement(_index2.CartesianChart, {
485
517
  ...props,
486
518
  chartTitle: props.data.chartTitle,
@@ -492,7 +524,11 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
492
524
  getmargins: _getMargins,
493
525
  getGraphData: _initializeScatterChartData,
494
526
  xAxisType: _xAxisType,
495
- getMinMaxOfYAxis: _getMinMaxofXAxis,
527
+ yAxisType: _yAxisType,
528
+ ..._yAxisType === _index1.YAxisType.StringAxis ? {
529
+ stringDatasetForYAxisDomain: _yAxisLabels
530
+ } : {},
531
+ getMinMaxOfYAxis: _getNumericMinMaxOfY,
496
532
  getDomainNRangeValues: _getDomainNRangeValues,
497
533
  createYAxis: _index1.createNumericYAxis,
498
534
  createStringYAxis: _index1.createStringYAxis,
@@ -500,6 +536,10 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
500
536
  enableFirstRenderOptimization: _firstRenderOptimization,
501
537
  datasetForXAxisDomain: _xAxisLabels,
502
538
  componentRef: cartesianChartRef,
539
+ ..._isScatterPolarRef.current ? {
540
+ yMaxValue: 1,
541
+ yMinValue: -1
542
+ } : {},
503
543
  /* eslint-disable react/jsx-no-bind */ // eslint-disable-next-line react/no-children-prop
504
544
  children: (props)=>{
505
545
  _xAxisScale = props.xScale;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ScatterChart/ScatterChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ScatterChartProps } from './ScatterChart.types';\nimport { useScatterChartStyles } 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 type { JSXElement } from '@fluentui/react-utilities';\nimport {\n areArraysEqual,\n createNumericYAxis,\n createStringYAxis,\n domainRangeOfDateForScatterChart,\n domainRangeOfNumericForScatterChart,\n domainRangeOfXStringAxis,\n find,\n findNumericMinMaxOfY,\n IDomainNRange,\n YAxisType,\n useRtl,\n} from '../../utilities/index';\nimport {\n AccessibilityProps,\n CartesianChart,\n ChildProps,\n CustomizedCalloutData,\n Margins,\n RefArrayData,\n ScatterChartDataPoint,\n Chart,\n ImageExportOptions,\n LegendContainer,\n ScatterChartPoints,\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';\nimport { toImage } from '../../utilities/image-export-utils';\nimport { ScaleLinear } from 'd3-scale';\n\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\n\ntype ScatterChartDataWithIndex = ScatterChartPoints & { 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.scatterChartData);\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: JSXElement[];\n let _xAxisLabels: string[] = [];\n let xAxisCalloutAccessibilityData: AccessibilityProps = {};\n let _xBandwidth = 0;\n const cartesianChartRef = React.useRef<Chart>(null);\n const classes = useScatterChartStyles(props);\n const _legendsRef = React.useRef<LegendContainer>(null);\n const _isRTL: boolean = useRtl();\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 toImage: (opts?: ImageExportOptions): Promise<string> => {\n return toImage(cartesianChartRef.current?.chartContainer, _legendsRef.current?.toSVG, _isRTL, opts);\n },\n }),\n [],\n );\n\n const _xAxisType: XAxisTypes =\n props.data.scatterChartData! &&\n props.data.scatterChartData!.length > 0 &&\n props.data.scatterChartData![0].data &&\n props.data.scatterChartData![0].data.length > 0\n ? (getTypeOfAxis(props.data.scatterChartData![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.scatterChartData) || props.data !== _points) {\n pointsRef.current = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);\n calloutPointsRef.current = calloutData(pointsRef.current);\n }\n }, [props.height, props.width, props.data, _points]);\n\n function _injectIndexPropertyInScatterChartData(\n scatterChartData?: ScatterChartPoints[],\n ): ScatterChartDataWithIndex[] | [] {\n return scatterChartData\n ? scatterChartData.map((item: ScatterChartPoints, 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 _getNumericMinMaxOfY(\n points: ScatterChartPoints[],\n yAxisType?: YAxisType,\n ): { startValue: number; endValue: number } {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { startValue, endValue } = findNumericMinMaxOfY(points, yAxisType);\n let yPadding = 0;\n yPadding = (endValue - startValue) * 0.1;\n\n return {\n startValue: startValue - yPadding,\n endValue: endValue + yPadding,\n };\n }\n\n function _getDomainNRangeValues(\n points: any,\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfNumericForScatterChart(points, margins, width, isRTL);\n } else if (xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = domainRangeOfDateForScatterChart(points, margins, width, isRTL, tickValues! as Date[]);\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\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[]): JSXElement {\n const { legendProps } = props;\n const isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);\n const mapLegendToPoints: Record<string, ScatterChartDataWithIndex[]> = {};\n data.forEach((point: ScatterChartDataWithIndex) => {\n if (point.legend) {\n if (!mapLegendToPoints[point.legend]) {\n mapLegendToPoints[point.legend] = [];\n }\n mapLegendToPoints[point.legend].push(point);\n }\n });\n const legendDataItems: Legend[] = Object.entries(mapLegendToPoints).map(([legendTitle, points]) => {\n const representativePoint = points[0];\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: legendTitle,\n color: representativePoint.color!,\n onMouseOutAction: () => {\n setActiveLegend('');\n },\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(legendTitle);\n },\n ...(representativePoint.legendShape && {\n shape: representativePoint.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 legendRef={_legendsRef}\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 _getRangeForScatterMarkerSize(\n yScale: ScaleLinear<number, number>,\n yPadding: number,\n xMin: number,\n xMax: number,\n xPadding: number,\n ): number {\n const extraXPixels = _isRTL\n ? _xAxisScale(xMax - xPadding) - _xAxisScale(xMax)\n : _xAxisScale(xMin + xPadding) - _xAxisScale(xMin);\n\n const yMin = yScale.domain()[0];\n const extraYPixels = yScale(yMin) - yScale(yMin + yPadding);\n return Math.min(extraXPixels, extraYPixels);\n }\n\n function _createPlot(xElement: SVGElement, containerHeight: number): JSXElement[] {\n const series: JSXElement[] = [];\n if (isSelectedLegend) {\n _points = selectedLegendPoints;\n } else {\n _points = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);\n }\n\n const yMax = d3Max(points, (point: ScatterChartPoints) => {\n return d3Max(point.data as ScatterChartDataPoint[], (item: ScatterChartDataPoint) => item.y)!;\n })!;\n const yMin = d3Min(points, (point: ScatterChartPoints) => {\n return d3Min(point.data as ScatterChartDataPoint[], (item: ScatterChartDataPoint) => item.y)!;\n })!;\n const yPadding = (yMax - yMin) * 0.1;\n\n let xPadding = 0;\n let xMin: number = 0;\n let xMax: number = 0;\n if (_xAxisType === XAxisTypes.StringAxis) {\n _xBandwidth = _xAxisScale.bandwidth() / 2;\n } else if (_xAxisType === XAxisTypes.DateAxis) {\n xMin = d3Min(_points, (point: ScatterChartPoints) => {\n return d3Min(point.data as ScatterChartDataPoint[], (item: ScatterChartDataPoint) => item.x as Date)!;\n })!.getTime();\n\n xMax = d3Max(_points, (point: ScatterChartPoints) => {\n return d3Max(point.data as ScatterChartDataPoint[], (item: ScatterChartDataPoint) => {\n return item.x as Date;\n });\n })!.getTime();\n\n xPadding = (xMax - xMin) * 0.1;\n } else {\n xMin = d3Min(_points, (point: ScatterChartPoints) => {\n return d3Min(point.data as ScatterChartDataPoint[], (item: ScatterChartDataPoint) => item.x as number)!;\n })!;\n\n xMax = d3Max(_points, (point: ScatterChartPoints) => {\n return d3Max(point.data as ScatterChartDataPoint[], (item: ScatterChartDataPoint) => {\n return item.x as number;\n });\n })!;\n\n xPadding = (xMax - xMin) * 0.1;\n }\n\n const maxMarkerSize = d3Max(_points, (point: ScatterChartPoints) => {\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: JSXElement[] = [];\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 const pointMarkerSize = (_points[i].data[j] as ScatterChartDataPoint).markerSize;\n const extraMaxPixels =\n _xAxisType !== XAxisTypes.StringAxis\n ? _getRangeForScatterMarkerSize(_yAxisScale, yPadding, xMin, xMax, xPadding)\n : 0;\n const minPixel = 4;\n const maxPixel = 16;\n const circleRadius =\n pointMarkerSize && maxMarkerSize !== 0\n ? _xAxisType !== XAxisTypes.StringAxis\n ? (pointMarkerSize * extraMaxPixels) / maxMarkerSize\n : minPixel + ((pointMarkerSize - minPixel) / (maxMarkerSize - minPixel)) * (maxPixel - minPixel)\n : activePoint === circleId\n ? 6\n : 4;\n\n const isLegendSelected: boolean = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n\n const currentPointHidden = _points[i].hideNonActiveDots && activePoint !== circleId;\n const text = _points?.[i].data[j]?.text;\n pointsForSeries.push(\n <>\n <circle\n id={circleId}\n key={circleId}\n r={Math.max(circleRadius, 4)}\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={event =>\n _handleFocus(event, seriesId, x, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)\n }\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 {text && (\n <text\n key={`${circleId}-label`}\n x={_xAxisScale(x) + _xBandwidth}\n y={_yAxisScale(y) + Math.max(circleRadius + 12, 16)}\n className={classes.markerLabel}\n >\n {text}\n </text>\n )}\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 // 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 event: React.FocusEvent<SVGCircleElement, Element>,\n seriesId: string,\n x: number | Date | string,\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData?: AccessibilityProps,\n ) {\n let cx = 0;\n let cy = 0;\n\n const targetRect = (event.target as SVGCircleElement).getBoundingClientRect();\n cx = targetRect.left + targetRect.width / 2;\n cy = targetRect.top + targetRect.height / 2;\n updatePosition(cx, cy);\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.scatterChartData &&\n props.data.scatterChartData.length > 0 &&\n props.data.scatterChartData.filter((item: ScatterChartPoints) => item.data.length).length > 0\n );\n }\n\n const _getMinMaxofXAxis = React.useCallback(\n (points: ScatterChartPoints[], yAxisType: YAxisType | undefined) =>\n _getNumericMinMaxOfY(points as ScatterChartPoints[], yAxisType),\n [],\n );\n\n const { legendProps, tickValues, tickFormat } = props;\n _points = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);\n\n let points = _points as ScatterChartPoints[];\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 getMinMaxOfYAxis={_getMinMaxofXAxis}\n getDomainNRangeValues={_getDomainNRangeValues}\n createYAxis={createNumericYAxis}\n createStringYAxis={createStringYAxis}\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":["React","useScatterChartStyles","select","d3Select","Legends","max","d3Max","min","d3Min","useId","areArraysEqual","createNumericYAxis","createStringYAxis","domainRangeOfDateForScatterChart","domainRangeOfNumericForScatterChart","domainRangeOfXStringAxis","find","findNumericMinMaxOfY","useRtl","CartesianChart","tokens","calloutData","ChartTypes","XAxisTypes","tooltipOfAxislabels","getTypeOfAxis","getNextColor","getColorFromToken","formatDate","toImage","ScatterChart","forwardRef","props","forwardedRef","_circleId","_seriesId","_verticalLine","_tooltipId","_firstRenderOptimization","_emptyChartId","_points","_injectIndexPropertyInScatterChartData","data","scatterChartData","_calloutPoints","_xAxisScale","_yAxisScale","_uniqueCallOutID","_refArray","margins","renderSeries","_xAxisLabels","xAxisCalloutAccessibilityData","_xBandwidth","cartesianChartRef","useRef","classes","_legendsRef","_isRTL","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","useImperativeHandle","componentRef","chartContainer","opts","toSVG","_xAxisType","length","StringAxis","pointsRef","calloutPointsRef","height","width","map","item","index","color","updatePosition","newX","newY","threshold","distance","Math","sqrt","pow","_getNumericMinMaxOfY","points","yAxisType","startValue","endValue","yPadding","_getDomainNRangeValues","chartType","isRTL","xAxisType","barWidth","tickValues","shiftX","domainNRangeValue","NumericAxis","DateAxis","_getMargins","_margins","_initializeScatterChartData","xScale","yScale","containerHeight","containerWidth","xElement","_createPlot","_onHoverCardHide","_createLegends","isLegendMultiSelectEnabled","canSelectMultipleLegends","mapLegendToPoints","forEach","point","legend","push","legendDataItems","Object","entries","legendTitle","representativePoint","title","onMouseOutAction","hoverAction","_handleChartMouseLeave","legendShape","shape","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onLegendHoverCardLeave","onChange","_onLegendSelectionChange","legendRef","legendsSelected","event","currentLegend","slice","_getPointFill","seriesColor","pointId","pointIndex","isLastPoint","colorNeutralBackground1","_getRangeForScatterMarkerSize","xMin","xMax","xPadding","extraXPixels","yMin","domain","extraYPixels","series","yMax","bandwidth","getTime","maxMarkerSize","markerSize","i","pointsForSeries","legendVal","verticaLineHeight","bottom","j","seriesId","circleId","xAxisCalloutData","pointMarkerSize","extraMaxPixels","minPixel","maxPixel","circleRadius","isLegendSelected","_legendHighlighted","_noLegendHighlighted","currentPointHidden","hideNonActiveDots","text","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","className","markerLabel","g","showXAxisLablesTooltip","document","getElementById","remove","e","wrapXAxisLables","xAxisElement","call","tooltipProps","tooltipCls","tooltip","axis","targetRect","target","getBoundingClientRect","left","top","formattedData","Date","useUTC","xVal","found","element","attr","obj","values","lineHeight","mouseEvent","persist","clientX","clientY","func","onClick","_getHighlightedLegend","includes","seriesIndex","formattedDate","xValue","yValue","yAxisCalloutData","callOutAccessibilityData","ariaLabel","_isChartEmpty","filter","_getMinMaxofXAxis","useCallback","tickFormat","legendBars","hideLegend","calloutProps","descriptionMessage","getCalloutDescriptionMessage","isCalloutForStack","culture","isCartesian","tickParams","xAxisLabels","dp","flat","Set","chartTitle","getmargins","getGraphData","getMinMaxOfYAxis","getDomainNRangeValues","createYAxis","onChartMouseLeave","enableFirstRenderOptimization","datasetForXAxisDomain","children","yScalePrimary","line","x1","y1","x2","y2","visibility","strokeDasharray","div","style","displayName"],"mappings":";;;;+BA0Da8B;;;;;;;iEA1DU,QAAQ;6CAEO,iCAAiC;6BAEpC,eAAe;uBAClB,mBAAmB;yBACR,WAAW;gCAChC,4BAA4B;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;uBAGF,OAAA,aAAA,CAACwQ,OAAAA;QAAIxG,IAAI3K;QAAe8L,MAAM;QAASsF,OAAO;YAAEzF,SAAS;QAAI;QAAGI,cAAY;;AAEhF,GAAG;AACHxM,aAAa8R,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/ScatterChart/ScatterChart.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ScatterChartProps } from './ScatterChart.types';\nimport { useScatterChartStyles } 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 } from 'd3-array';\nimport { useId } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport {\n areArraysEqual,\n createNumericYAxis,\n createStringYAxis,\n getDomainPaddingForMarkers,\n domainRangeOfXStringAxis,\n find,\n findNumericMinMaxOfY,\n IDomainNRange,\n YAxisType,\n useRtl,\n isTextMode,\n isScatterPolarSeries,\n isPlottable,\n getRangeForScatterMarkerSize,\n domainRangeOfDateForAreaLineScatterVerticalBarCharts,\n domainRangeOfNumericForAreaLineScatterCharts,\n sortAxisCategories,\n} from '../../utilities/index';\nimport {\n AccessibilityProps,\n CartesianChart,\n ChildProps,\n CustomizedCalloutData,\n Margins,\n RefArrayData,\n ScatterChartDataPoint,\n Chart,\n ImageExportOptions,\n LegendContainer,\n ScatterChartPoints,\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} from '../../utilities/index';\nimport { LineChartPoints } from '../../types/DataPoint';\nimport { toImage } from '../../utilities/image-export-utils';\nimport { renderScatterPolarCategoryLabels } from '../../utilities/scatterpolar-utils';\nimport { formatDateToLocaleString } from '@fluentui/chart-utilities';\n\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\n\ntype ScatterChartDataWithIndex = ScatterChartPoints & { 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.scatterChartData);\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: JSXElement[];\n let _xAxisLabels: string[] = [];\n let xAxisCalloutAccessibilityData: AccessibilityProps = {};\n let _xBandwidth = 0;\n const cartesianChartRef = React.useRef<Chart>(null);\n const classes = useScatterChartStyles(props);\n const _legendsRef = React.useRef<LegendContainer>(null);\n const _isRTL: boolean = useRtl();\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 const _isTextMode = React.useRef(false);\n const _isScatterPolarRef = React.useRef(false);\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 toImage: (opts?: ImageExportOptions): Promise<string> => {\n return toImage(cartesianChartRef.current?.chartContainer, _legendsRef.current?.toSVG, _isRTL, opts);\n },\n }),\n [],\n );\n\n const _xAxisType: XAxisTypes =\n props.data.scatterChartData! &&\n props.data.scatterChartData!.length > 0 &&\n props.data.scatterChartData![0].data &&\n props.data.scatterChartData![0].data.length > 0\n ? (getTypeOfAxis(props.data.scatterChartData![0].data[0].x, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\n\n // Detect y axis type (numeric or string)\n const _yAxisType: YAxisType =\n props.data.scatterChartData &&\n props.data.scatterChartData.length > 0 &&\n props.data.scatterChartData[0].data &&\n props.data.scatterChartData[0].data.length > 0\n ? typeof props.data.scatterChartData[0].data[0].y === 'string'\n ? YAxisType.StringAxis\n : YAxisType.NumericAxis\n : YAxisType.NumericAxis;\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.scatterChartData) || props.data !== _points) {\n pointsRef.current = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);\n calloutPointsRef.current = calloutData(pointsRef.current);\n }\n }, [props.height, props.width, props.data, _points]);\n\n function _injectIndexPropertyInScatterChartData(\n scatterChartData?: ScatterChartPoints[],\n ): ScatterChartDataWithIndex[] | [] {\n return scatterChartData\n ? scatterChartData.map((item: ScatterChartPoints, 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 _getNumericMinMaxOfY(\n points: ScatterChartPoints[],\n yAxisType?: YAxisType,\n ): { startValue: number; endValue: number } {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { startValue, endValue } = findNumericMinMaxOfY(points, yAxisType);\n const yPadding = getDomainPaddingForMarkers(startValue, endValue, props.yScaleType);\n\n return {\n startValue: startValue - yPadding.start,\n endValue: endValue + yPadding.end,\n };\n }\n\n function _getDomainNRangeValues(\n points: any,\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfNumericForAreaLineScatterCharts(\n points,\n margins,\n width,\n isRTL,\n props.xScaleType,\n true,\n );\n } else if (xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = domainRangeOfDateForAreaLineScatterVerticalBarCharts(\n points,\n margins,\n width,\n isRTL,\n tickValues! as Date[],\n chartType,\n );\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\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 _isTextMode.current = isTextMode(_points);\n _isScatterPolarRef.current = isScatterPolarSeries(_points);\n renderSeries = _createPlot(xElement!, containerHeight!);\n }\n\n function _onHoverCardHide() {\n setSelectedLegendPoints([]);\n setIsSelectedLegend(false);\n }\n\n function _createLegends(data: ScatterChartDataWithIndex[]): JSXElement {\n const { legendProps } = props;\n const isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);\n const mapLegendToPoints: Record<string, ScatterChartDataWithIndex[]> = {};\n data.forEach((point: ScatterChartDataWithIndex) => {\n if (point.legend) {\n if (!mapLegendToPoints[point.legend]) {\n mapLegendToPoints[point.legend] = [];\n }\n mapLegendToPoints[point.legend].push(point);\n }\n });\n const legendDataItems: Legend[] = Object.entries(mapLegendToPoints).map(([legendTitle, points]) => {\n const representativePoint = points[0];\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: legendTitle,\n color: representativePoint.color!,\n onMouseOutAction: () => {\n setActiveLegend('');\n },\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(legendTitle);\n },\n ...(representativePoint.legendShape && {\n shape: representativePoint.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 legendRef={_legendsRef}\n />\n );\n }\n\n function _getOrderedYAxisLabels() {\n const shouldOrderYAxisLabelsByCategoryOrder =\n _yAxisType === YAxisType.StringAxis && props.yAxisCategoryOrder !== 'default';\n if (!shouldOrderYAxisLabelsByCategoryOrder) {\n // Collect all unique string y values from all data points in all series, in reverse order\n const yLabelsSet = new Set<string>();\n for (let i = _points.length - 1; i >= 0; i--) {\n const point = _points[i];\n if (point.data && Array.isArray(point.data)) {\n for (const d of point.data) {\n if (typeof d.y === 'string') {\n yLabelsSet.add(d.y);\n }\n }\n }\n }\n return Array.from(yLabelsSet);\n }\n\n return sortAxisCategories(_mapCategoryToValues(), props.yAxisCategoryOrder);\n }\n\n function _mapCategoryToValues() {\n const categoryToValues: Record<string, number[]> = {};\n _points.forEach(point => {\n if (point.data && Array.isArray(point.data)) {\n point.data.forEach(d => {\n if (typeof d.y === 'string') {\n if (!categoryToValues[d.y]) {\n categoryToValues[d.y] = [];\n }\n if (typeof d.x === 'number') {\n categoryToValues[d.y].push(d.x);\n }\n }\n });\n }\n });\n return categoryToValues;\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): JSXElement[] {\n const series: JSXElement[] = [];\n if (isSelectedLegend) {\n _points = selectedLegendPoints;\n } else {\n _points = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);\n }\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n _xBandwidth = _xAxisScale.bandwidth() / 2;\n }\n\n const maxMarkerSize = d3Max(_points, (point: ScatterChartPoints) => {\n return d3Max(point.data as ScatterChartDataPoint[], (item: ScatterChartDataPoint) => {\n return item.markerSize as number;\n });\n })!;\n\n const extraMaxPixels =\n _xAxisType !== XAxisTypes.StringAxis && _yAxisType !== YAxisType.StringAxis\n ? getRangeForScatterMarkerSize({\n data: _points,\n xScale: _xAxisScale,\n yScalePrimary: _yAxisScale,\n xScaleType: props.xScaleType,\n yScaleType: props.yScaleType,\n })\n : 0;\n\n for (let i = _points.length - 1; i >= 0; i--) {\n const pointsForSeries: JSXElement[] = [];\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 { x, y, xAxisCalloutData, xAxisCalloutAccessibilityData } = _points?.[i]?.data[j];\n const xPoint = _xAxisScale?.(x);\n // Use string y axis scale if needed\n const yPoint =\n _yAxisType === YAxisType.StringAxis\n ? _yAxisScale?.(y) + (_yAxisScale?.bandwidth ? _yAxisScale.bandwidth() / 2 : 0)\n : _yAxisScale?.(y);\n if (!isPlottable(xPoint, yPoint)) {\n continue;\n }\n const seriesId = `${_seriesId}_${i}_${j}`;\n const circleId = `${_circleId}_${i}_${j}`;\n const pointMarkerSize = (_points[i].data[j] as ScatterChartDataPoint).markerSize;\n const minPixel = 4;\n const maxPixel = 16;\n const circleRadius =\n pointMarkerSize && maxMarkerSize !== 0\n ? _xAxisType !== XAxisTypes.StringAxis\n ? (pointMarkerSize * extraMaxPixels) / maxMarkerSize\n : minPixel + ((pointMarkerSize - minPixel) / (maxMarkerSize - minPixel)) * (maxPixel - minPixel)\n : activePoint === circleId\n ? 6\n : 4;\n\n const isLegendSelected: boolean = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n\n const currentPointHidden = _points[i].hideNonActiveDots && activePoint !== circleId;\n const text = _points?.[i].data[j]?.text;\n if (!_isTextMode.current) {\n pointsForSeries.push(\n <>\n <circle\n id={circleId}\n key={circleId}\n r={Math.max(circleRadius, 4)}\n cx={xPoint + _xBandwidth}\n cy={yPoint}\n data-is-focusable={isLegendSelected}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x,\n y,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x,\n y,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={event =>\n _handleFocus(event, seriesId, x, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)\n }\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 {text && (\n <text\n key={`${circleId}-label`}\n x={xPoint + _xBandwidth}\n y={yPoint + Math.max(circleRadius + 12, 16)}\n className={classes.markerLabel}\n >\n {text}\n </text>\n )}\n </>,\n );\n }\n }\n\n if (_isScatterPolarRef.current) {\n pointsForSeries.push(\n ...renderScatterPolarCategoryLabels({\n xAxisScale: _xAxisScale,\n yAxisScale: _yAxisScale,\n className: classes.markerLabel || '',\n lineOptions: (_points?.[i] as Partial<LineChartPoints>)?.lineOptions,\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 // 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 event: React.FocusEvent<SVGCircleElement, Element>,\n seriesId: string,\n x: number | Date | string,\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData?: AccessibilityProps,\n ) {\n let cx = 0;\n let cy = 0;\n\n const targetRect = (event.target as SVGCircleElement).getBoundingClientRect();\n cx = targetRect.left + targetRect.width / 2;\n cy = targetRect.top + targetRect.height / 2;\n updatePosition(cx, cy);\n _uniqueCallOutID = circleId;\n const formattedData = x instanceof Date ? formatDateToLocaleString(x, props.culture, props.useUTC as boolean) : 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 ? formatDateToLocaleString(x, props.culture, props.useUTC as boolean) : 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 =\n point.x instanceof Date ? formatDateToLocaleString(point.x, props.culture, props.useUTC as boolean) : 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.scatterChartData &&\n props.data.scatterChartData.length > 0 &&\n props.data.scatterChartData.filter((item: ScatterChartPoints) => item.data.length).length > 0\n );\n }\n\n const { legendProps, tickValues, tickFormat } = props;\n _points = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);\n\n let points = _points as ScatterChartPoints[];\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 && !_isTextMode.current) {\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,\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 // Compute unique y axis labels for string y axis\n const _yAxisLabels: string[] = _getOrderedYAxisLabels();\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 yAxisType={_yAxisType}\n // Pass stringDatasetForYAxisDomain only if y axis is string\n {...(_yAxisType === YAxisType.StringAxis ? { stringDatasetForYAxisDomain: _yAxisLabels } : {})}\n getMinMaxOfYAxis={_getNumericMinMaxOfY}\n getDomainNRangeValues={_getDomainNRangeValues}\n createYAxis={createNumericYAxis}\n createStringYAxis={createStringYAxis}\n onChartMouseLeave={_handleChartMouseLeave}\n enableFirstRenderOptimization={_firstRenderOptimization}\n datasetForXAxisDomain={_xAxisLabels}\n componentRef={cartesianChartRef}\n {...(_isScatterPolarRef.current ? { yMaxValue: 1, yMinValue: -1 } : {})}\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":["React","useScatterChartStyles","select","d3Select","Legends","max","d3Max","useId","areArraysEqual","createNumericYAxis","createStringYAxis","getDomainPaddingForMarkers","domainRangeOfXStringAxis","find","findNumericMinMaxOfY","YAxisType","useRtl","isTextMode","isScatterPolarSeries","isPlottable","getRangeForScatterMarkerSize","domainRangeOfDateForAreaLineScatterVerticalBarCharts","domainRangeOfNumericForAreaLineScatterCharts","sortAxisCategories","CartesianChart","tokens","calloutData","ChartTypes","XAxisTypes","tooltipOfAxislabels","getTypeOfAxis","getNextColor","getColorFromToken","toImage","renderScatterPolarCategoryLabels","formatDateToLocaleString","ScatterChart","forwardRef","props","forwardedRef","_circleId","_seriesId","_verticalLine","_tooltipId","_firstRenderOptimization","_emptyChartId","_points","_injectIndexPropertyInScatterChartData","data","scatterChartData","_calloutPoints","_xAxisScale","_yAxisScale","_uniqueCallOutID","_refArray","margins","renderSeries","_xAxisLabels","xAxisCalloutAccessibilityData","_xBandwidth","cartesianChartRef","useRef","classes","_legendsRef","_isRTL","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","_isTextMode","_isScatterPolarRef","useEffect","current","useImperativeHandle","componentRef","chartContainer","opts","toSVG","_xAxisType","length","StringAxis","_yAxisType","NumericAxis","pointsRef","calloutPointsRef","height","width","map","item","index","color","updatePosition","newX","newY","threshold","distance","Math","sqrt","pow","_getNumericMinMaxOfY","points","yAxisType","startValue","endValue","yPadding","yScaleType","start","end","_getDomainNRangeValues","chartType","isRTL","xAxisType","barWidth","tickValues","shiftX","domainNRangeValue","xScaleType","DateAxis","_getMargins","_margins","_initializeScatterChartData","xScale","yScale","containerHeight","containerWidth","xElement","_createPlot","_onHoverCardHide","_createLegends","isLegendMultiSelectEnabled","canSelectMultipleLegends","mapLegendToPoints","forEach","point","legend","push","legendDataItems","Object","entries","legendTitle","representativePoint","title","onMouseOutAction","hoverAction","_handleChartMouseLeave","legendShape","shape","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onLegendHoverCardLeave","onChange","_onLegendSelectionChange","legendRef","_getOrderedYAxisLabels","shouldOrderYAxisLabelsByCategoryOrder","yAxisCategoryOrder","yLabelsSet","Set","i","Array","isArray","d","add","from","_mapCategoryToValues","categoryToValues","legendsSelected","event","currentLegend","slice","_getPointFill","seriesColor","pointId","pointIndex","isLastPoint","colorNeutralBackground1","series","bandwidth","maxMarkerSize","markerSize","extraMaxPixels","yScalePrimary","pointsForSeries","legendVal","verticaLineHeight","bottom","j","xAxisCalloutData","xPoint","yPoint","seriesId","circleId","pointMarkerSize","minPixel","maxPixel","circleRadius","isLegendSelected","_legendHighlighted","_noLegendHighlighted","currentPointHidden","hideNonActiveDots","text","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","className","markerLabel","xAxisScale","yAxisScale","lineOptions","g","showXAxisLablesTooltip","document","getElementById","remove","e","wrapXAxisLables","xAxisElement","call","tooltipProps","tooltipCls","tooltip","axis","targetRect","target","getBoundingClientRect","left","top","formattedData","Date","culture","useUTC","xVal","getTime","found","element","attr","obj","values","lineHeight","mouseEvent","persist","clientX","clientY","func","onClick","_getHighlightedLegend","includes","seriesIndex","formattedDate","xValue","yValue","yAxisCalloutData","callOutAccessibilityData","ariaLabel","_isChartEmpty","filter","tickFormat","legendBars","hideLegend","calloutProps","descriptionMessage","getCalloutDescriptionMessage","isCalloutForStack","isCartesian","tickParams","xAxisLabels","dp","flat","_yAxisLabels","chartTitle","getmargins","getGraphData","stringDatasetForYAxisDomain","getMinMaxOfYAxis","getDomainNRangeValues","createYAxis","onChartMouseLeave","enableFirstRenderOptimization","datasetForXAxisDomain","yMaxValue","yMinValue","children","line","x1","y1","x2","y2","visibility","strokeDasharray","div","style","displayName"],"mappings":"AAAA;;;;;+BAmEaoC;;;;;;;iEAjEU,QAAQ;6CAEO,iCAAiC;6BAEpC,eAAe;uBAClB,mBAAmB;yBACtB,WAAW;gCAClB,4BAA4B;wBAoB3C,wBAAwB;wBAaxB,cAAc;4BACE,wBAAwB;kCAWvB,qCAAqC;mCACZ,qCAAqC;gCAC7C,4BAA4B;AAW9D,qBAAMA,WAAAA,GAA2DpC,OAAMqC,UAAU,CAGtF,CAACC,OAAOC;QAoC+DD,oBAanE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MAAA,WAAA,GACE,OAAA,aAAA,CAACkD,KAAAA,MAAAA,WAAAA,GACC,OAAA,aAAA,CAACyE,QAAAA;gBACCC,IAAI;gBACJC,IAAI;gBACJC,IAAI;gBACJC,IAAIvS,MAAM2G,eAAe;gBACzBqG,QAAQ;gBACRlB,IAAI1L;gBACJoS,YAAY;gBACZC,iBAAiB;8BAEnB,OAAA,aAAA,CAAC/E,KAAAA,MAAGxM;QAIZ;uBAGF,OAAA,aAAA,CAACwR,OAAAA;QAAI5G,IAAIvL;QAAe0M,MAAM;QAAS0F,OAAO;YAAE7F,SAAS;QAAI;QAAGI,cAAY;;AAEhF,GAAG;AACHpN,aAAa8S,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ScatterChart/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 * Style for the marker label\n */\n markerLabel?: string;\n}\n\n/**\n * Scatter Chart style properties\n * {@docCategory ScatterChart}\n */\nexport interface ScatterChartStyleProps extends CartesianChartStyleProps {}\n"],"names":[],"mappings":"AAAA,uDAAuD,GA6DvD;;;CAGC,GACD,WAA2E"}
1
+ {"version":3,"sources":["../src/components/ScatterChart/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 * The prop used to define the y axis labels tooltip visibility\n */\n showYAxisLablesTooltip?: boolean;\n}\n\n/**\n * Scatter Chart styles\n * {@docCategory ScatterChart}\n */\nexport interface ScatterChartStyles extends CartesianChartStyles {\n /**\n * Style for the marker label\n */\n markerLabel?: string;\n}\n\n/**\n * Scatter Chart style properties\n * {@docCategory ScatterChart}\n */\nexport interface ScatterChartStyleProps extends CartesianChartStyleProps {}\n"],"names":[],"mappings":"AAAA,uDAAuD,GAkEvD;;;CAGC,GACD,WAA2E"}