@fluentui/react-charts 9.3.4 → 9.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) hide show
  1. package/CHANGELOG.md +41 -2
  2. package/dist/index.d.ts +225 -46
  3. package/lib/AnnotationOnlyChart.js +1 -0
  4. package/lib/AnnotationOnlyChart.js.map +1 -0
  5. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +208 -0
  6. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
  7. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +1 -0
  8. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
  9. package/lib/components/AnnotationOnlyChart/index.js +2 -0
  10. package/lib/components/AnnotationOnlyChart/index.js.map +1 -0
  11. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +31 -0
  12. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -0
  13. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +23 -0
  14. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -0
  15. package/lib/components/AreaChart/useAreaChartStyles.styles.js +11 -6
  16. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  17. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -1
  18. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  19. package/lib/components/ChartTable/ChartTable.js +3 -1
  20. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  21. package/lib/components/ChartTable/useChartTableStyles.styles.js +59 -39
  22. package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  23. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +5 -5
  24. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  25. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +617 -0
  26. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
  27. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +1 -0
  28. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
  29. package/lib/components/CommonComponents/Annotations/index.js +2 -0
  30. package/lib/components/CommonComponents/Annotations/index.js.map +1 -0
  31. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +173 -0
  32. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -0
  33. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +126 -0
  34. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -0
  35. package/lib/components/CommonComponents/CartesianChart.js +182 -153
  36. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  37. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  38. package/lib/components/CommonComponents/index.js +2 -0
  39. package/lib/components/CommonComponents/index.js.map +1 -1
  40. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +29 -13
  41. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  42. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +14 -1
  43. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  44. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +2 -6
  45. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  46. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +3 -2
  47. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  48. package/lib/components/DeclarativeChart/DeclarativeChart.js +42 -25
  49. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  50. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  51. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +635 -38
  52. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  53. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +23 -8
  54. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  55. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +2 -2
  56. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  57. package/lib/components/DonutChart/DonutChart.js +12 -7
  58. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  59. package/lib/components/DonutChart/useDonutChartStyles.styles.js +2 -2
  60. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  61. package/lib/components/FunnelChart/FunnelChart.js +5 -5
  62. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  63. package/lib/components/GanttChart/GanttChart.js +3 -3
  64. package/lib/components/GanttChart/GanttChart.js.map +1 -1
  65. package/lib/components/GanttChart/GanttChart.types.js.map +1 -1
  66. package/lib/components/GanttChart/useGanttChartStyles.styles.js +3 -1
  67. package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +1 -1
  68. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +3 -1
  69. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
  70. package/lib/components/GaugeChart/GaugeChart.js +3 -1
  71. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  72. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +1 -1
  73. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  74. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +11 -6
  75. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  76. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -1
  77. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  78. package/lib/components/HeatMapChart/HeatMapChart.js +6 -6
  79. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  80. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  81. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +3 -1
  82. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  83. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +3 -1
  84. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
  85. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +3 -1
  86. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  87. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +25 -12
  88. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  89. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +4 -4
  90. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  91. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -2
  92. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  93. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  94. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +3 -1
  95. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  96. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +3 -1
  97. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  98. package/lib/components/Legends/Legends.js +3 -1
  99. package/lib/components/Legends/Legends.js.map +1 -1
  100. package/lib/components/Legends/Legends.types.js.map +1 -1
  101. package/lib/components/Legends/useLegendsStyles.styles.js +97 -37
  102. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  103. package/lib/components/Legends/useLegendsStyles.styles.raw.js +10 -11
  104. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  105. package/lib/components/LineChart/LineChart.js +6 -5
  106. package/lib/components/LineChart/LineChart.js.map +1 -1
  107. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  108. package/lib/components/LineChart/useLineChartStyles.styles.js +15 -10
  109. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  110. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +3 -1
  111. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  112. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +1 -1
  113. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  114. package/lib/components/SankeyChart/SankeyChart.js +1 -1
  115. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  116. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +13 -10
  117. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  118. package/lib/components/ScatterChart/ScatterChart.js +1 -1
  119. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  120. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  121. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +13 -8
  122. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  123. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -1
  124. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  125. package/lib/components/VerticalBarChart/VerticalBarChart.js +4 -2
  126. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  127. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +13 -8
  128. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  129. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -1
  130. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  131. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +13 -5
  132. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  133. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  134. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +11 -6
  135. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  136. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -1
  137. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  138. package/lib/index.js +1 -0
  139. package/lib/index.js.map +1 -1
  140. package/lib/types/ChartAnnotation.js +1 -0
  141. package/lib/types/ChartAnnotation.js.map +1 -0
  142. package/lib/types/index.js +1 -0
  143. package/lib/types/index.js.map +1 -1
  144. package/lib/utilities/Common.styles.js +1 -2
  145. package/lib/utilities/Common.styles.js.map +1 -1
  146. package/lib/utilities/Common.styles.raw.js +1 -2
  147. package/lib/utilities/Common.styles.raw.js.map +1 -1
  148. package/lib/utilities/FocusableTooltipText.js +1 -1
  149. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  150. package/lib/utilities/SVGTooltipText.js +8 -8
  151. package/lib/utilities/SVGTooltipText.js.map +1 -1
  152. package/lib/utilities/image-export-utils.js +108 -0
  153. package/lib/utilities/image-export-utils.js.map +1 -1
  154. package/lib/utilities/utilities.js +16 -13
  155. package/lib/utilities/utilities.js.map +1 -1
  156. package/lib-commonjs/AnnotationOnlyChart.js +6 -0
  157. package/lib-commonjs/AnnotationOnlyChart.js.map +1 -0
  158. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +219 -0
  159. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
  160. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +6 -0
  161. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
  162. package/lib-commonjs/components/AnnotationOnlyChart/index.js +7 -0
  163. package/lib-commonjs/components/AnnotationOnlyChart/index.js.map +1 -0
  164. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +56 -0
  165. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -0
  166. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +33 -0
  167. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -0
  168. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +14 -15
  169. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  170. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -1
  171. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  172. package/lib-commonjs/components/ChartTable/ChartTable.js +3 -1
  173. package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
  174. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +74 -102
  175. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  176. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +4 -4
  177. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  178. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +628 -0
  179. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
  180. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +4 -0
  181. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
  182. package/lib-commonjs/components/CommonComponents/Annotations/index.js +7 -0
  183. package/lib-commonjs/components/CommonComponents/Annotations/index.js.map +1 -0
  184. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +265 -0
  185. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -0
  186. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +161 -0
  187. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -0
  188. package/lib-commonjs/components/CommonComponents/CartesianChart.js +182 -152
  189. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  190. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  191. package/lib-commonjs/components/CommonComponents/index.js +2 -0
  192. package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
  193. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +32 -21
  194. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  195. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +14 -1
  196. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  197. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +0 -14
  198. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  199. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +2 -1
  200. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  201. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +41 -24
  202. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  203. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  204. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +638 -38
  205. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  206. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +25 -16
  207. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  208. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +1 -1
  209. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  210. package/lib-commonjs/components/DonutChart/DonutChart.js +12 -7
  211. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  212. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +2 -2
  213. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  214. package/lib-commonjs/components/FunnelChart/FunnelChart.js +5 -5
  215. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
  216. package/lib-commonjs/components/GanttChart/GanttChart.js +3 -3
  217. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
  218. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -1
  219. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +3 -1
  220. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +1 -1
  221. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +3 -1
  222. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
  223. package/lib-commonjs/components/GaugeChart/GaugeChart.js +3 -1
  224. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  225. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +1 -1
  226. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  227. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +14 -15
  228. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  229. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -1
  230. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  231. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +6 -6
  232. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  233. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  234. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +3 -1
  235. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  236. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +3 -1
  237. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
  238. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +3 -1
  239. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  240. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +47 -34
  241. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  242. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +3 -3
  243. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  244. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -2
  245. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  246. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  247. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +3 -1
  248. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  249. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +3 -1
  250. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  251. package/lib-commonjs/components/Legends/Legends.js +3 -1
  252. package/lib-commonjs/components/Legends/Legends.js.map +1 -1
  253. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  254. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +144 -86
  255. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
  256. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +9 -10
  257. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  258. package/lib-commonjs/components/LineChart/LineChart.js +6 -5
  259. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  260. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  261. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +18 -19
  262. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  263. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +3 -1
  264. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  265. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +1 -1
  266. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  267. package/lib-commonjs/components/SankeyChart/SankeyChart.js +1 -1
  268. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  269. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +16 -19
  270. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  271. package/lib-commonjs/components/ScatterChart/ScatterChart.js +1 -1
  272. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  273. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  274. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +16 -17
  275. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  276. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -1
  277. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  278. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +4 -2
  279. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  280. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +16 -17
  281. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  282. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -1
  283. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  284. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +13 -5
  285. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  286. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  287. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +14 -15
  288. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  289. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -1
  290. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  291. package/lib-commonjs/index.js +1 -0
  292. package/lib-commonjs/index.js.map +1 -1
  293. package/lib-commonjs/types/ChartAnnotation.js +6 -0
  294. package/lib-commonjs/types/ChartAnnotation.js.map +1 -0
  295. package/lib-commonjs/types/index.js +1 -0
  296. package/lib-commonjs/types/index.js.map +1 -1
  297. package/lib-commonjs/utilities/Common.styles.js +1 -2
  298. package/lib-commonjs/utilities/Common.styles.js.map +1 -1
  299. package/lib-commonjs/utilities/Common.styles.raw.js +1 -2
  300. package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -1
  301. package/lib-commonjs/utilities/FocusableTooltipText.js +1 -1
  302. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  303. package/lib-commonjs/utilities/SVGTooltipText.js +8 -8
  304. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  305. package/lib-commonjs/utilities/image-export-utils.js +108 -0
  306. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  307. package/lib-commonjs/utilities/utilities.js +16 -13
  308. package/lib-commonjs/utilities/utilities.js.map +1 -1
  309. package/package.json +11 -11
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/LineChart/eventAnnotation/Textbox.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { select } from 'd3-selection';\nimport { getSecureProps } from '../../../utilities/utilities';\n\ninterface TextboxProps {\n text: string;\n width: number;\n x: number;\n y: number;\n lineHeight: number;\n textAnchor?: 'start' | 'middle' | 'end';\n fontSize?: string;\n fill?: string;\n}\n\nexport const Textbox: React.FunctionComponent<TextboxProps> = props => {\n const textElementRef: React.RefObject<SVGTextElement> = React.useRef(null);\n\n const wrapWords = () => {\n if (!textElementRef.current) {\n return;\n }\n const text = select(textElementRef.current);\n const words = props.text.split(/\\s+/);\n let line: string[] = [];\n let tspan = text.append<SVGTSpanElement>('tspan');\n let numLines = 0;\n\n words.forEach(word => {\n line.push(word);\n tspan.text(line.join(' '));\n const node = tspan.node();\n if (node && node.getComputedTextLength() > props.width && line.length > 1) {\n numLines++;\n line.pop();\n tspan.text(line.join(' '));\n line = [word];\n tspan = text.append<SVGTSpanElement>('tspan').text(word).attr('dy', props.lineHeight).attr('x', props.x);\n }\n });\n // bottom aligns text\n text.attr('dy', -numLines * props.lineHeight);\n\n return () => {\n text.selectAll('tspan').remove();\n };\n };\n React.useEffect(wrapWords);\n\n const { lineHeight, ...rest } = props;\n\n return <text ref={textElementRef} {...getSecureProps(rest)} />;\n};\n"],"names":["React","select","getSecureProps","Textbox","props","textElementRef","useRef","wrapWords","current","text","words","split","line","tspan","append","numLines","forEach","word","push","join","node","getComputedTextLength","width","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H,yBAAAA,EAAe6B,KAAK;;AAC5D,EAAE"}
1
+ {"version":3,"sources":["../src/components/LineChart/eventAnnotation/Textbox.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { select } from 'd3-selection';\nimport { getSecureProps } from '../../../utilities/utilities';\n\ninterface TextboxProps {\n text: string;\n width: number;\n x: number;\n y: number;\n lineHeight: number;\n textAnchor?: 'start' | 'middle' | 'end';\n fontSize?: string;\n fill?: string;\n}\n\nexport const Textbox: React.FunctionComponent<TextboxProps> = props => {\n const textElementRef: React.RefObject<SVGTextElement | null> = React.useRef(null);\n\n const wrapWords = () => {\n if (!textElementRef.current) {\n return;\n }\n const text = select(textElementRef.current);\n const words = props.text.split(/\\s+/);\n let line: string[] = [];\n let tspan = text.append<SVGTSpanElement>('tspan');\n let numLines = 0;\n\n words.forEach(word => {\n line.push(word);\n tspan.text(line.join(' '));\n const node = tspan.node();\n if (node && node.getComputedTextLength() > props.width && line.length > 1) {\n numLines++;\n line.pop();\n tspan.text(line.join(' '));\n line = [word];\n tspan = text.append<SVGTSpanElement>('tspan').text(word).attr('dy', props.lineHeight).attr('x', props.x);\n }\n });\n // bottom aligns text\n text.attr('dy', -numLines * props.lineHeight);\n\n return () => {\n text.selectAll('tspan').remove();\n };\n };\n React.useEffect(wrapWords);\n\n const { lineHeight, ...rest } = props;\n\n return <text ref={textElementRef} {...getSecureProps(rest)} />;\n};\n"],"names":["React","select","getSecureProps","Textbox","props","textElementRef","useRef","wrapWords","current","text","words","split","line","tspan","append","numLines","forEach","word","push","join","node","getComputedTextLength","width","length","pop","attr","lineHeight","x","selectAll","remove","useEffect","rest","ref"],"mappings":"AAAA;;;;;+BAiBaG;;;;;;;iEAfU,QAAQ;6BACR,eAAe;2BACP,+BAA+B;AAavD,gBAAuDC,CAAAA;IAC5D,MAAMC,iBAAyDL,OAAMM,MAAM,CAAC;IAE5E,MAAMC,YAAY;QAChB,IAAI,CAACF,eAAeG,OAAO,EAAE;YAC3B;QACF;QACA,MAAMC,WAAOR,mBAAAA,EAAOI,eAAeG,OAAO;QAC1C,MAAME,QAAQN,MAAMK,IAAI,CAACE,KAAK,CAAC;QAC/B,IAAIC,OAAiB,EAAE;QACvB,IAAIC,QAAQJ,KAAKK,MAAM,CAAkB;QACzC,IAAIC,WAAW;QAEfL,MAAMM,OAAO,CAACC,CAAAA;YACZL,KAAKM,IAAI,CAACD;YACVJ,MAAMJ,IAAI,CAACG,KAAKO,IAAI,CAAC;YACrB,MAAMC,OAAOP,MAAMO,IAAI;YACvB,IAAIA,QAAQA,KAAKC,qBAAqB,KAAKjB,MAAMkB,KAAK,IAAIV,KAAKW,MAAM,GAAG,GAAG;gBACzER;gBACAH,KAAKY,GAAG;gBACRX,MAAMJ,IAAI,CAACG,KAAKO,IAAI,CAAC;gBACrBP,OAAO;oBAACK;iBAAK;gBACbJ,QAAQJ,KAAKK,MAAM,CAAkB,SAASL,IAAI,CAACQ,MAAMQ,IAAI,CAAC,MAAMrB,MAAMsB,UAAU,EAAED,IAAI,CAAC,KAAKrB,MAAMuB,CAAC;YACzG;QACF;QACA,qBAAqB;QACrBlB,KAAKgB,IAAI,CAAC,MAAM,CAACV,WAAWX,MAAMsB,UAAU;QAE5C,OAAO;YACLjB,KAAKmB,SAAS,CAAC,SAASC,MAAM;QAChC;IACF;IACA7B,OAAM8B,SAAS,CAACvB;IAEhB,MAAM,EAAEmB,UAAU,EAAE,GAAGK,MAAM,GAAG3B;IAEhC,OAAA,WAAA,GAAO,OAAA,aAAA,CAACK,QAAAA;QAAKuB,KAAK3B;QAAiB,OAAGH,yBAAAA,EAAe6B,KAAK;;AAC5D,EAAE"}
@@ -35,7 +35,9 @@ const linechartClassNames = {
35
35
  chartWrapper: 'fui-line__chartWrapper',
36
36
  svgTooltip: '',
37
37
  chart: '',
38
- axisAnnotation: ''
38
+ axisAnnotation: '',
39
+ plotContainer: '',
40
+ annotationLayer: ''
39
41
  };
40
42
  /**
41
43
  * Base Styles
@@ -47,16 +49,11 @@ const linechartClassNames = {
47
49
  Bg96gwp: "f1i3iumi",
48
50
  mc9l5x: "f22iagw",
49
51
  Beiy3e4: "f1vx9l62",
50
- z8tnut: "f17mpqex",
51
- z189sj: [
52
- "f1vdfbxk",
53
- "f1f5gg8d"
54
- ],
55
- Byoj8tv: "fdvome7",
56
- uwmqm3: [
57
- "f1f5gg8d",
58
- "f1vdfbxk"
59
- ],
52
+ Byoj8tv: 0,
53
+ uwmqm3: 0,
54
+ z189sj: 0,
55
+ z8tnut: 0,
56
+ B0ocmuz: "f1bnz8pu",
60
57
  qhf8xq: "f1euv43f",
61
58
  fsow6f: "f17mccla",
62
59
  Bhzewxz: "fr6rvge",
@@ -76,11 +73,11 @@ const linechartClassNames = {
76
73
  Bg96gwp: "f1i3iumi",
77
74
  Bkfmm31: "fhuob2q",
78
75
  jzqdnp: "fdxigdc",
79
- a6j6cd: "folz2wl"
76
+ Bxms50k: "f1yn2ez9"
80
77
  },
81
78
  lineBorder: {
82
79
  ojy3ng: "f1yuyku4",
83
- Bpvj6i6: "fdvt8h6"
80
+ Bj7tp1g: "f1s33jy0"
84
81
  }
85
82
  }, {
86
83
  d: [
@@ -90,10 +87,12 @@ const linechartClassNames = {
90
87
  ".f1i3iumi{line-height:var(--lineHeightBase300);}",
91
88
  ".f22iagw{display:flex;}",
92
89
  ".f1vx9l62{flex-direction:column;}",
93
- ".f17mpqex{padding-top:var(--spacingHorizontalS);}",
94
- ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}",
95
- ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}",
96
- ".fdvome7{padding-bottom:var(--spacingHorizontalS);}",
90
+ [
91
+ ".f1bnz8pu{padding:var(--spacingHorizontalS);}",
92
+ {
93
+ p: -1
94
+ }
95
+ ],
97
96
  ".f1euv43f{position:absolute;}",
98
97
  ".f17mccla{text-align:center;}",
99
98
  ".fr6rvge{top:var(--spacingVerticalNone);}",
@@ -112,13 +111,13 @@ const linechartClassNames = {
112
111
  ],
113
112
  m: [
114
113
  [
115
- "@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.folz2wl{fill:CanvasText;}}",
114
+ "@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.f1yn2ez9{fill:CanvasText;}}",
116
115
  {
117
116
  m: "screen and (-ms-high-contrast: active), screen and (forced-colors: active)"
118
117
  }
119
118
  ],
120
119
  [
121
- "@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.fdvt8h6{stroke:Canvas;}}",
120
+ "@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.f1s33jy0{stroke:Canvas;}}",
122
121
  {
123
122
  m: "screen and (-ms-high-contrast: active), screen and (forced-colors: active)"
124
123
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["useLineChartStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/index';\nimport { getMarkerLabelStyle, getTooltipStyle } from '../../utilities/index';\n/**\n * @internal\n */ export const linechartClassNames = {\n tooltip: 'fui-line__tooltip',\n lineBorder: 'fui-line_lineBorder',\n markerLabel: 'fui-line__markerLabel',\n root: 'fui-line__root',\n xAxis: 'fui-line__xAxis',\n yAxis: 'fui-line__yAxis',\n legendContainer: 'fui-line__legendContainer',\n hover: 'fui-line__hover',\n descriptionMessage: 'fui-line__descriptionMessage',\n axisTitle: 'fui-line__axisTitle',\n chartTitle: 'fui-line__chartTitle',\n opacityChangeOnHover: 'fui-line__opacityChangeOnHover',\n shapeStyles: 'fui-line__shapeStyles',\n chartWrapper: 'fui-line__chartWrapper',\n svgTooltip: '',\n chart: '',\n axisAnnotation: ''\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n tooltip: getTooltipStyle(),\n markerLabel: getMarkerLabelStyle(),\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas'\n }\n }\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const useLineChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(linechartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ ),\n lineBorder: mergeClasses(linechartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/ ),\n markerLabel: mergeClasses(linechartClassNames.markerLabel, baseStyles.markerLabel /*props.styles?.markerLabel*/ )\n };\n};\n"],"names":["__styles","mergeClasses","tokens","HighContrastSelector","getMarkerLabelStyle","getTooltipStyle","linechartClassNames","tooltip","lineBorder","markerLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","sj55zd","Bkfmm31","jzqdnp","a6j6cd","ojy3ng","Bpvj6i6","d","p","m","useLineChartStyles","props","baseStyles"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAOKM,mBAAmB;;;sBAiCD;eAAlBgD;;;uBAvCwB,gBAAgB;AAM9C,4BAA4B;IACnC/C,OAAO,EAAE,mBAAmB;IAC5BC,UAAU,EAAE,qBAAqB;IACjCC,WAAW,EAAE,uBAAuB;IACpCC,IAAI,EAAE,gBAAgB;IACtBC,KAAK,EAAE,iBAAiB;IACxBC,KAAK,EAAE,iBAAiB;IACxBC,eAAe,EAAE,2BAA2B;IAC5CC,KAAK,EAAE,iBAAiB;IACxBC,kBAAkB,EAAE,8BAA8B;IAClDC,SAAS,EAAE,qBAAqB;IAChCC,UAAU,EAAE,sBAAsB;IAClCC,oBAAoB,EAAE,gCAAgC;IACtDC,WAAW,EAAE,uBAAuB;IACpCC,YAAY,EAAE,wBAAwB;IACtCC,UAAU,EAAE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AS,CAAC,CAAC;IAC9B,OAAO;QACHjB,OAAO,MAAEN,mBAAY,EAACK,mBAAmB,CAACC,OAAO,EAAEiD,UAAU,CAACjD,OAAO,CAAC,uBAAA,EAA0B,CAAC;QACjGC,UAAU,MAAEP,mBAAY,EAACK,mBAAmB,CAACE,UAAU,EAAEgD,UAAU,CAAChD,UAAU,CAAC,0BAAA,EAA6B,CAAC;QAC7GC,WAAW,MAAER,mBAAY,EAACK,mBAAmB,CAACG,WAAW,EAAE+C,UAAU,CAAC/C,WAAW,CAAC,2BAAA,EAA8B;IACpH,CAAC;AACL,CAAC"}
1
+ {"version":3,"sources":["useLineChartStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/index';\nimport { getMarkerLabelStyle, getTooltipStyle } from '../../utilities/index';\n/**\n * @internal\n */ export const linechartClassNames = {\n tooltip: 'fui-line__tooltip',\n lineBorder: 'fui-line_lineBorder',\n markerLabel: 'fui-line__markerLabel',\n root: 'fui-line__root',\n xAxis: 'fui-line__xAxis',\n yAxis: 'fui-line__yAxis',\n legendContainer: 'fui-line__legendContainer',\n hover: 'fui-line__hover',\n descriptionMessage: 'fui-line__descriptionMessage',\n axisTitle: 'fui-line__axisTitle',\n chartTitle: 'fui-line__chartTitle',\n opacityChangeOnHover: 'fui-line__opacityChangeOnHover',\n shapeStyles: 'fui-line__shapeStyles',\n chartWrapper: 'fui-line__chartWrapper',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n plotContainer: '',\n annotationLayer: ''\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n tooltip: getTooltipStyle(),\n markerLabel: getMarkerLabelStyle(),\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas'\n }\n }\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const useLineChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(linechartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ ),\n lineBorder: mergeClasses(linechartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/ ),\n markerLabel: mergeClasses(linechartClassNames.markerLabel, baseStyles.markerLabel /*props.styles?.markerLabel*/ )\n };\n};\n"],"names":["__styles","mergeClasses","tokens","HighContrastSelector","getMarkerLabelStyle","getTooltipStyle","linechartClassNames","tooltip","lineBorder","markerLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","plotContainer","annotationLayer","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","qhf8xq","fsow6f","Bhzewxz","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","sj55zd","Bkfmm31","jzqdnp","Bxms50k","ojy3ng","Bj7tp1g","d","p","m","useLineChartStyles","props","baseStyles"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAOKM,mBAAmB;;;IAmCnBmD,kBAAkB;;;;uBAzCM,gBAAgB;AAM9C,4BAA4B;IACnClD,OAAO,EAAE,mBAAmB;IAC5BC,UAAU,EAAE,qBAAqB;IACjCC,WAAW,EAAE,uBAAuB;IACpCC,IAAI,EAAE,gBAAgB;IACtBC,KAAK,EAAE,iBAAiB;IACxBC,KAAK,EAAE,iBAAiB;IACxBC,eAAe,EAAE,2BAA2B;IAC5CC,KAAK,EAAE,iBAAiB;IACxBC,kBAAkB,EAAE,8BAA8B;IAClDC,SAAS,EAAE,qBAAqB;IAChCC,UAAU,EAAE,sBAAsB;IAClCC,oBAAoB,EAAE,gCAAgC;IACtDC,WAAW,EAAE,uBAAuB;IACpCC,YAAY,EAAE,wBAAwB;IACtCC,UAAU,EAAE,EAAE;IACdC,K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4BAA4BE,KAAK,IAAG;IAC3C,MAAMC,UAAU,GAAGjC,SAAS,CAAC,CAAC;IAC9B,OAAO;QACHnB,OAAO,MAAEN,mBAAY,EAACK,mBAAmB,CAACC,OAAO,EAAEoD,UAAU,CAACpD,OAAO,CAAC,uBAAA,EAA0B,CAAC;QACjGC,UAAU,MAAEP,mBAAY,EAACK,mBAAmB,CAACE,UAAU,EAAEmD,UAAU,CAACnD,UAAU,CAAC,0BAAA,EAA6B,CAAC;QAC7GC,WAAW,MAAER,mBAAY,EAACK,mBAAmB,CAACG,WAAW,EAAEkD,UAAU,CAAClD,WAAW,CAAC,2BAAA,EAA8B;IACpH,CAAC;AACL,CAAC"}
@@ -37,7 +37,9 @@ const linechartClassNames = {
37
37
  chartWrapper: 'fui-line__chartWrapper',
38
38
  svgTooltip: '',
39
39
  chart: '',
40
- axisAnnotation: ''
40
+ axisAnnotation: '',
41
+ plotContainer: '',
42
+ annotationLayer: ''
41
43
  };
42
44
  /**
43
45
  * Base Styles
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/LineChart/useLineChartStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { GriffelStyle, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { LineChartProps, LineChartStyles } from './LineChart.types';\nimport { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { HighContrastSelector } from '../../utilities/index';\nimport { getMarkerLabelStyle, getTooltipStyle } from '../../utilities/index';\n\n/**\n * @internal\n */\nexport const linechartClassNames: SlotClassNames<LineChartStyles> = {\n tooltip: 'fui-line__tooltip',\n lineBorder: 'fui-line_lineBorder',\n markerLabel: 'fui-line__markerLabel',\n root: 'fui-line__root',\n xAxis: 'fui-line__xAxis',\n yAxis: 'fui-line__yAxis',\n legendContainer: 'fui-line__legendContainer',\n hover: 'fui-line__hover',\n descriptionMessage: 'fui-line__descriptionMessage',\n axisTitle: 'fui-line__axisTitle',\n chartTitle: 'fui-line__chartTitle',\n opacityChangeOnHover: 'fui-line__opacityChangeOnHover',\n shapeStyles: 'fui-line__shapeStyles',\n chartWrapper: 'fui-line__chartWrapper',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n};\n\n/**\n * Base Styles\n */\nconst useStyles = makeStyles({\n tooltip: getTooltipStyle() as GriffelStyle,\n markerLabel: getMarkerLabelStyle() as GriffelStyle,\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas',\n },\n },\n});\n\n/**\n * Apply styling to the Carousel slots based on the state\n */\nexport const useLineChartStyles = (props: LineChartProps): LineChartStyles => {\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(linechartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/),\n lineBorder: mergeClasses(linechartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/),\n markerLabel: mergeClasses(linechartClassNames.markerLabel, baseStyles.markerLabel /*props.styles?.markerLabel*/),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","HighContrastSelector","getMarkerLabelStyle","getTooltipStyle","linechartClassNames","tooltip","lineBorder","markerLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","stroke","colorNeutralBackground1","useLineChartStyles","props","baseStyles"],"mappings":"AAAA;;;;;;;;;;;;IAYaM,mBAAAA;;;IAqCAqB,kBAAAA;;;;uBA/C0C,iBAAiB;4BACjD,wBAAwB;uBAGV,wBAAwB;AAMtD,4BAA6D;IAClEpB,SAAS;IACTC,YAAY;IACZC,aAAa;IACbC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,sBAAsB;IACtBC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;IACPC,gBAAgB;AAClB,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYxB,iBAAAA,EAAW;IAC3BO,aAASF,sBAAAA;IACTI,iBAAaL,0BAAAA;IACbI,YAAY;QACViB,QAAQvB,kBAAAA,CAAOwB,uBAAuB;QACtC,CAACvB,2BAAAA,CAAqB,EAAE;YACtBsB,QAAQ;QACV;IACF;AACF;AAKO,2BAA2B,CAACG;IACjC,MAAMC,aAAaL;IACnB,OAAO;QACLjB,aAASN,mBAAAA,EAAaK,oBAAoBC,OAAO,EAAEsB,WAAWtB,OAAO,CAAC,uBAAuB;QAC7FC,gBAAYP,mBAAAA,EAAaK,oBAAoBE,UAAU,EAAEqB,WAAWrB,UAAU,CAAC,0BAA0B;QACzGC,iBAAaR,mBAAAA,EAAaK,oBAAoBG,WAAW,EAAEoB,WAAWpB,WAAW,CAAC,2BAA2B;IAC/G;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/LineChart/useLineChartStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { GriffelStyle, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { LineChartProps, LineChartStyles } from './LineChart.types';\nimport { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { HighContrastSelector } from '../../utilities/index';\nimport { getMarkerLabelStyle, getTooltipStyle } from '../../utilities/index';\n\n/**\n * @internal\n */\nexport const linechartClassNames: SlotClassNames<LineChartStyles> = {\n tooltip: 'fui-line__tooltip',\n lineBorder: 'fui-line_lineBorder',\n markerLabel: 'fui-line__markerLabel',\n root: 'fui-line__root',\n xAxis: 'fui-line__xAxis',\n yAxis: 'fui-line__yAxis',\n legendContainer: 'fui-line__legendContainer',\n hover: 'fui-line__hover',\n descriptionMessage: 'fui-line__descriptionMessage',\n axisTitle: 'fui-line__axisTitle',\n chartTitle: 'fui-line__chartTitle',\n opacityChangeOnHover: 'fui-line__opacityChangeOnHover',\n shapeStyles: 'fui-line__shapeStyles',\n chartWrapper: 'fui-line__chartWrapper',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n plotContainer: '',\n annotationLayer: '',\n};\n\n/**\n * Base Styles\n */\nconst useStyles = makeStyles({\n tooltip: getTooltipStyle() as GriffelStyle,\n markerLabel: getMarkerLabelStyle() as GriffelStyle,\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas',\n },\n },\n});\n\n/**\n * Apply styling to the Carousel slots based on the state\n */\nexport const useLineChartStyles = (props: LineChartProps): LineChartStyles => {\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(linechartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/),\n lineBorder: mergeClasses(linechartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/),\n markerLabel: mergeClasses(linechartClassNames.markerLabel, baseStyles.markerLabel /*props.styles?.markerLabel*/),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","HighContrastSelector","getMarkerLabelStyle","getTooltipStyle","linechartClassNames","tooltip","lineBorder","markerLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","plotContainer","annotationLayer","useStyles","stroke","colorNeutralBackground1","useLineChartStyles","props","baseStyles"],"mappings":"AAAA;;;;;;;;;;;;IAYaM,mBAAAA;;;IAuCAuB,kBAAAA;;;;uBAjD0C,iBAAiB;4BACjD,wBAAwB;uBAGV,wBAAwB;AAMtD,4BAA6D;IAClEtB,SAAS;IACTC,YAAY;IACZC,aAAa;IACbC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,sBAAsB;IACtBC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;IACPC,gBAAgB;IAChBC,eAAe;IACfC,iBAAiB;AACnB,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAY1B,iBAAAA,EAAW;IAC3BO,aAASF,sBAAAA;IACTI,iBAAaL,0BAAAA;IACbI,YAAY;QACVmB,QAAQzB,kBAAAA,CAAO0B,uBAAuB;QACtC,CAACzB,2BAAAA,CAAqB,EAAE;YACtBwB,QAAQ;QACV;IACF;AACF;AAKO,2BAA2B,CAACG;IACjC,MAAMC,aAAaL;IACnB,OAAO;QACLnB,aAASN,mBAAAA,EAAaK,oBAAoBC,OAAO,EAAEwB,WAAWxB,OAAO,CAAC,uBAAuB;QAC7FC,gBAAYP,mBAAAA,EAAaK,oBAAoBE,UAAU,EAAEuB,WAAWvB,UAAU,CAAC,0BAA0B;QACzGC,iBAAaR,mBAAAA,EAAaK,oBAAoBG,WAAW,EAAEsB,WAAWtB,WAAW,CAAC,2BAA2B;IAC/G;AACF,EAAE"}
@@ -16,7 +16,7 @@ const _useResponsiveChildStylesstyles = require("./useResponsiveChildStyles.styl
16
16
  const _react1 = require("@griffel/react");
17
17
  const ResponsiveContainer = (props)=>{
18
18
  const containerRef = _react.useRef(null);
19
- const onResizeRef = _react.useRef();
19
+ const onResizeRef = _react.useRef(undefined);
20
20
  const childClasses = (0, _useResponsiveChildStylesstyles.useResponsiveChildStyles)();
21
21
  const [size, setSize] = _react.useState({});
22
22
  onResizeRef.current = props.onResize;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ResponsiveContainer/ResponsiveContainer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getWindow } from '../../utilities/getWindow';\nimport { ResponsiveChildProps, ResponsiveContainerProps } from './ResponsiveContainer.types';\nimport { useResponsiveChildStyles } from './useResponsiveChildStyles.styles';\nimport { mergeClasses } from '@griffel/react';\n\n/**\n * Responsive Container component\n * {@docCategory ResponsiveContainer}\n */\nexport const ResponsiveContainer: React.FC<ResponsiveContainerProps> = props => {\n const containerRef = React.useRef<HTMLDivElement>(null);\n const onResizeRef = React.useRef<ResponsiveContainerProps['onResize']>();\n const childClasses = useResponsiveChildStyles();\n\n const [size, setSize] = React.useState<{ containerWidth?: number; containerHeight?: number }>({});\n\n onResizeRef.current = props.onResize;\n\n React.useEffect(() => {\n const _window = getWindow(containerRef.current) as (Window & typeof globalThis) | undefined;\n let animationFrameId: number | undefined;\n let resizeObserver: ResizeObserver | undefined;\n\n const resizeCallback = (entries: ResizeObserverEntry[]) => {\n const { width: containerWidth, height: containerHeight } = entries[0].contentRect;\n // rAF is an alternative to the throttle function. For more info, see:\n // https://css-tricks.com/debouncing-throttling-explained-examples/#aa-requestanimationframe-raf\n animationFrameId = _window?.requestAnimationFrame(() => {\n setSize(prevSize => {\n const roundedWidth = Math.floor(containerWidth);\n const roundedHeight = Math.floor(containerHeight);\n if (prevSize.containerWidth === roundedWidth && prevSize.containerHeight === roundedHeight) {\n return prevSize;\n }\n\n return { containerWidth: roundedWidth, containerHeight: roundedHeight };\n });\n });\n onResizeRef.current?.(containerWidth, containerHeight);\n };\n\n if (_window && _window.ResizeObserver) {\n resizeObserver = new _window.ResizeObserver(resizeCallback);\n if (containerRef.current) {\n resizeObserver.observe(containerRef.current);\n }\n }\n\n return () => {\n if (animationFrameId) {\n _window?.cancelAnimationFrame(animationFrameId);\n }\n\n resizeObserver?.disconnect();\n };\n }, []);\n\n const chartContent = React.useMemo(() => {\n let calculatedWidth = size.containerWidth;\n let calculatedHeight = size.containerHeight;\n\n if (typeof props.aspect === 'number' && props.aspect > 0) {\n if (calculatedWidth) {\n calculatedHeight = calculatedWidth / props.aspect;\n } else if (calculatedHeight) {\n calculatedWidth = calculatedHeight * props.aspect;\n }\n\n if (typeof props.maxHeight === 'number' && calculatedHeight && calculatedHeight > props.maxHeight) {\n calculatedHeight = props.maxHeight;\n }\n }\n\n return React.Children.map(props.children, child => {\n return React.cloneElement<ResponsiveChildProps>(child, {\n width: calculatedWidth,\n height: calculatedHeight,\n // For SankeyChart\n shouldResize: (calculatedWidth ?? 0) + (calculatedHeight ?? 0),\n styles: {\n root: mergeClasses(child.props.styles?.root, childClasses.root),\n chartWrapper: mergeClasses(child.props.styles?.chartWrapper, childClasses.chartWrapper),\n chart: mergeClasses(child.props.styles?.chart, childClasses.chart),\n },\n });\n });\n }, [size, props.aspect, props.maxHeight, props.children]);\n\n return (\n <div\n ref={containerRef}\n style={{\n width: props.width ?? '100%',\n height: props.height ?? '100%',\n minWidth: props.minWidth,\n minHeight: props.minHeight,\n maxHeight: props.maxHeight,\n }}\n >\n {chartContent}\n </div>\n );\n};\nResponsiveContainer.displayName = 'ResponsiveContainer';\n"],"names":["React","getWindow","useResponsiveChildStyles","mergeClasses","ResponsiveContainer","props","containerRef","useRef","onResizeRef","childClasses","size","setSize","useState","current","onResize","useEffect","_window","animationFrameId","resizeObserver","resizeCallback","entries","width","containerWidth","height","containerHeight","contentRect","requestAnimationFrame","prevSize","roundedWidth","Math","floor","roundedHeight","ResizeObserver","observe","cancelAnimationFrame","disconnect","chartContent","useMemo","calculatedWidth","calculatedHeight","aspect","maxHeight","Children","map","children","child","cloneElement","shouldResize","styles","root","chartWrapper","chart","div","ref","style","minWidth","minHeight","displayName"],"mappings":"AAAA;;;;;+BAYaI;;;;;;;iEAVU,QAAQ;2BACL,4BAA4B;gDAEb,oCAAoC;wBAChD,iBAAiB;AAMvC,4BAAgEC,CAAAA;IACrE,MAAMC,eAAeN,OAAMO,MAAM,CAAiB;IAClD,MAAMC,cAAcR,OAAMO,MAAM;IAChC,MAAME,mBAAeP,wDAAAA;IAErB,MAAM,CAACQ,MAAMC,QAAQ,GAAGX,OAAMY,QAAQ,CAAwD,CAAC;IAE/FJ,YAAYK,OAAO,GAAGR,MAAMS,QAAQ;IAEpCd,OAAMe,SAAS,CAAC;QACd,MAAMC,cAAUf,oBAAAA,EAAUK,aAAaO,OAAO;QAC9C,IAAII;QACJ,IAAIC;QAEJ,MAAMC,iBAAiB,CAACC;gBAetBZ;YAdA,MAAM,EAAEa,OAAOC,cAAc,EAAEC,QAAQC,eAAe,EAAE,GAAGJ,OAAO,CAAC,EAAE,CAACK,WAAW;YACjF,sEAAsE;YACtE,g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AA,eAAAA,MAAMgB,KAAAA,AAAK,MAAA,QAAXhB,iBAAAA,KAAAA,IAAAA,eAAe;YACtBkB,QAAQlB,CAAAA,gBAAAA,MAAMkB,MAAAA,AAAM,MAAA,QAAZlB,kBAAAA,KAAAA,IAAAA,gBAAgB;YACxBkD,UAAUlD,MAAMkD,QAAQ;YACxBC,WAAWnD,MAAMmD,SAAS;YAC1Bf,WAAWpC,MAAMoC,SAAS;QAC5B;OAECL;AAGP,EAAE;AACFhC,oBAAoBqD,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/ResponsiveContainer/ResponsiveContainer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getWindow } from '../../utilities/getWindow';\nimport { ResponsiveChildProps, ResponsiveContainerProps } from './ResponsiveContainer.types';\nimport { useResponsiveChildStyles } from './useResponsiveChildStyles.styles';\nimport { mergeClasses } from '@griffel/react';\n\n/**\n * Responsive Container component\n * {@docCategory ResponsiveContainer}\n */\nexport const ResponsiveContainer: React.FC<ResponsiveContainerProps> = props => {\n const containerRef = React.useRef<HTMLDivElement>(null);\n const onResizeRef = React.useRef<ResponsiveContainerProps['onResize'] | undefined>(undefined);\n const childClasses = useResponsiveChildStyles();\n\n const [size, setSize] = React.useState<{ containerWidth?: number; containerHeight?: number }>({});\n\n onResizeRef.current = props.onResize;\n\n React.useEffect(() => {\n const _window = getWindow(containerRef.current) as (Window & typeof globalThis) | undefined;\n let animationFrameId: number | undefined;\n let resizeObserver: ResizeObserver | undefined;\n\n const resizeCallback = (entries: ResizeObserverEntry[]) => {\n const { width: containerWidth, height: containerHeight } = entries[0].contentRect;\n // rAF is an alternative to the throttle function. For more info, see:\n // https://css-tricks.com/debouncing-throttling-explained-examples/#aa-requestanimationframe-raf\n animationFrameId = _window?.requestAnimationFrame(() => {\n setSize(prevSize => {\n const roundedWidth = Math.floor(containerWidth);\n const roundedHeight = Math.floor(containerHeight);\n if (prevSize.containerWidth === roundedWidth && prevSize.containerHeight === roundedHeight) {\n return prevSize;\n }\n\n return { containerWidth: roundedWidth, containerHeight: roundedHeight };\n });\n });\n onResizeRef.current?.(containerWidth, containerHeight);\n };\n\n if (_window && _window.ResizeObserver) {\n resizeObserver = new _window.ResizeObserver(resizeCallback);\n if (containerRef.current) {\n resizeObserver.observe(containerRef.current);\n }\n }\n\n return () => {\n if (animationFrameId) {\n _window?.cancelAnimationFrame(animationFrameId);\n }\n\n resizeObserver?.disconnect();\n };\n }, []);\n\n const chartContent = React.useMemo(() => {\n let calculatedWidth = size.containerWidth;\n let calculatedHeight = size.containerHeight;\n\n if (typeof props.aspect === 'number' && props.aspect > 0) {\n if (calculatedWidth) {\n calculatedHeight = calculatedWidth / props.aspect;\n } else if (calculatedHeight) {\n calculatedWidth = calculatedHeight * props.aspect;\n }\n\n if (typeof props.maxHeight === 'number' && calculatedHeight && calculatedHeight > props.maxHeight) {\n calculatedHeight = props.maxHeight;\n }\n }\n\n return React.Children.map(props.children, child => {\n return React.cloneElement<ResponsiveChildProps>(child, {\n width: calculatedWidth,\n height: calculatedHeight,\n // For SankeyChart\n shouldResize: (calculatedWidth ?? 0) + (calculatedHeight ?? 0),\n styles: {\n root: mergeClasses(child.props.styles?.root, childClasses.root),\n chartWrapper: mergeClasses(child.props.styles?.chartWrapper, childClasses.chartWrapper),\n chart: mergeClasses(child.props.styles?.chart, childClasses.chart),\n },\n });\n });\n }, [size, props.aspect, props.maxHeight, props.children]);\n\n return (\n <div\n ref={containerRef}\n style={{\n width: props.width ?? '100%',\n height: props.height ?? '100%',\n minWidth: props.minWidth,\n minHeight: props.minHeight,\n maxHeight: props.maxHeight,\n }}\n >\n {chartContent}\n </div>\n );\n};\nResponsiveContainer.displayName = 'ResponsiveContainer';\n"],"names":["React","getWindow","useResponsiveChildStyles","mergeClasses","ResponsiveContainer","props","containerRef","useRef","onResizeRef","undefined","childClasses","size","setSize","useState","current","onResize","useEffect","_window","animationFrameId","resizeObserver","resizeCallback","entries","width","containerWidth","height","containerHeight","contentRect","requestAnimationFrame","prevSize","roundedWidth","Math","floor","roundedHeight","ResizeObserver","observe","cancelAnimationFrame","disconnect","chartContent","useMemo","calculatedWidth","calculatedHeight","aspect","maxHeight","Children","map","children","child","cloneElement","shouldResize","styles","root","chartWrapper","chart","div","ref","style","minWidth","minHeight","displayName"],"mappings":"AAAA;;;;;+BAYaI;;;;;;;iEAVU,QAAQ;2BACL,4BAA4B;gDAEb,oCAAoC;wBAChD,iBAAiB;AAMvC,4BAAgEC,CAAAA;IACrE,MAAMC,eAAeN,OAAMO,MAAM,CAAiB;IAClD,MAAMC,cAAcR,OAAMO,MAAM,CAAmDE;IACnF,MAAMC,mBAAeR,wDAAAA;IAErB,MAAM,CAACS,MAAMC,QAAQ,GAAGZ,OAAMa,QAAQ,CAAwD,CAAC;IAE/FL,YAAYM,OAAO,GAAGT,MAAMU,QAAQ;IAEpCf,OAAMgB,SAAS,CAAC;QACd,MAAMC,UAAUhB,wBAAAA,EAAUK,aAAaQ,OAAO;QAC9C,IAAII;QACJ,IAAIC;QAEJ,MAAMC,iBAAiB,CAACC;gBAetBb;YAdA,MAAM,EAAEc,OAAOC,cAAc,EAAEC,QAAQC,eAAe,EAAE,GAAGJ,OAAO,CAAC,EAAE,CAACK,WAAW;YACjF,sEAAsE;YACtE,gGAAgG;YAChGR,mBAAmBD,YAAAA,QAAAA,YAAAA,KAAAA,IAAAA,KAAAA,IAAAA,QAASU,qBAAqB,CAAC;gBAChDf,QAAQgB,CAAAA;oBACN,MAAMC,eAAeC,KAAKC,KAAK,CAACR;oBAChC,MAAMS,gBAAgBF,KAAKC,KAAK,CAACN;oBACjC,IAAIG,SAASL,cAAc,KAAKM,gBAAgBD,SAASH,eAAe,KAAKO,eAAe;wBAC1F,OAAOJ;oBACT;oBAEA,OAAO;wBAAEL,gBAAgBM;wBAAcJ,iBAAiBO;oBAAc;gBACxE;YACF;aACAxB,uBAAAA,YAAYM,OAAAA,AAAO,MAAA,QAAnBN,yBAAAA,KAAAA,IAAAA,K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AAA,KAAAA,IAAAA,oBAAoB,CAAA;gBAC5DS,QAAQ;oBACNC,UAAM/C,oBAAAA,EAAAA,AAAa2C,uBAAAA,MAAMzC,KAAK,CAAC4C,MAAAA,AAAM,MAAA,QAAlBH,wBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,oBAAoBI,IAAI,EAAExC,aAAawC,IAAI;oBAC9DC,kBAAchD,oBAAAA,EAAAA,AAAa2C,wBAAAA,MAAMzC,KAAK,CAAC4C,MAAAA,AAAM,MAAA,QAAlBH,yBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,qBAAoBK,YAAY,EAAEzC,aAAayC,YAAY;oBACtFC,WAAOjD,oBAAAA,EAAAA,CAAa2C,uBAAAA,MAAMzC,KAAK,CAAC4C,MAAM,AAANA,MAAM,QAAlBH,yBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,qBAAoBM,KAAK,EAAE1C,aAAa0C,KAAK;gBACnE;YACF;QACF;IACF,GAAG;QAACzC;QAAMN,MAAMoC,MAAM;QAAEpC,MAAMqC,SAAS;QAAErC,MAAMwC,QAAQ;KAAC;QAM3CxC,cACCA;IALd,OAAA,WAAA,GACE,OAAA,aAAA,CAACgD,OAAAA;QACCC,KAAKhD;QACLiD,OAAO;YACLjC,OAAOjB,gBAAAA,MAAMiB,KAAK,AAALA,MAAK,QAAXjB,iBAAAA,KAAAA,IAAAA,eAAe;YACtBmB,QAAQnB,CAAAA,gBAAAA,MAAMmB,MAAAA,AAAM,MAAA,QAAZnB,kBAAAA,KAAAA,IAAAA,gBAAgB;YACxBmD,UAAUnD,MAAMmD,QAAQ;YACxBC,WAAWpD,MAAMoD,SAAS;YAC1Bf,WAAWrC,MAAMqC,SAAS;QAC5B;OAECL;AAGP,EAAE;AACFjC,oBAAoBsD,WAAW,GAAG"}
@@ -447,7 +447,7 @@ const SankeyChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
447
447
  var _props_reflowProps;
448
448
  const classes = (0, _useSankeyChartStylesstyles.useSankeyChartStyles)(props);
449
449
  const chartContainer = _react.useRef(null);
450
- const _reqID = _react.useRef();
450
+ const _reqID = _react.useRef(undefined);
451
451
  const _linkId = (0, _reactutilities.useId)('link');
452
452
  const _chartId = (0, _reactutilities.useId)('sankeyChart');
453
453
  const _emptyChartId = (0, _reactutilities.useId)('_SankeyChart_empty');