@fluentui/react-charts 9.1.10 → 9.2.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 (405) hide show
  1. package/CHANGELOG.md +28 -2
  2. package/dist/index.d.ts +39 -3
  3. package/lib/AreaChart.js.map +1 -1
  4. package/lib/CartesianChart.js.map +1 -1
  5. package/lib/DeclarativeChart.js.map +1 -1
  6. package/lib/DonutChart.js.map +1 -1
  7. package/lib/FunnelChart.js.map +1 -1
  8. package/lib/GanttChart.js.map +1 -1
  9. package/lib/GaugeChart.js.map +1 -1
  10. package/lib/GroupedVerticalBarChart.js.map +1 -1
  11. package/lib/HeatMapChart.js.map +1 -1
  12. package/lib/HorizontalBarChart.js.map +1 -1
  13. package/lib/HorizontalBarChartWithAxis.js.map +1 -1
  14. package/lib/Legends.js.map +1 -1
  15. package/lib/LineChart.js.map +1 -1
  16. package/lib/Popover.js.map +1 -1
  17. package/lib/ResponsiveContainer.js.map +1 -1
  18. package/lib/SankeyChart.js.map +1 -1
  19. package/lib/ScatterChart.js.map +1 -1
  20. package/lib/Sparkline.js.map +1 -1
  21. package/lib/VerticalBarChart.js.map +1 -1
  22. package/lib/VerticalStackedBarChart.js.map +1 -1
  23. package/lib/components/AreaChart/AreaChart.js +11 -3
  24. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  25. package/lib/components/AreaChart/AreaChart.types.js.map +1 -1
  26. package/lib/components/AreaChart/index.js.map +1 -1
  27. package/lib/components/AreaChart/useAreaChartStyles.styles.js +1 -2
  28. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +41 -0
  29. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -0
  30. package/lib/components/CommonComponents/CartesianChart.js +2 -1
  31. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  32. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  33. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  34. package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -1
  35. package/lib/components/CommonComponents/index.js.map +1 -1
  36. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +1 -2
  37. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +128 -0
  38. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -0
  39. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +1 -2
  40. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +126 -0
  41. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -0
  42. package/lib/components/DeclarativeChart/DeclarativeChart.js +15 -7
  43. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  44. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +44 -13
  45. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  46. package/lib/components/DeclarativeChart/imageExporter.js +1 -0
  47. package/lib/components/DeclarativeChart/imageExporter.js.map +1 -1
  48. package/lib/components/DeclarativeChart/index.js.map +1 -1
  49. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  50. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
  51. package/lib/components/DonutChart/Arc/index.js.map +1 -1
  52. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +1 -2
  53. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +44 -0
  54. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -0
  55. package/lib/components/DonutChart/DonutChart.js +11 -3
  56. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  57. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  58. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  59. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
  60. package/lib/components/DonutChart/Pie/index.js.map +1 -1
  61. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +1 -2
  62. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js +29 -0
  63. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -0
  64. package/lib/components/DonutChart/index.js.map +1 -1
  65. package/lib/components/DonutChart/useDonutChartStyles.styles.js +1 -2
  66. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +45 -0
  67. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -0
  68. package/lib/components/FunnelChart/FunnelChart.js +10 -1
  69. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  70. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
  71. package/lib/components/FunnelChart/funnelGeometry.js.map +1 -1
  72. package/lib/components/FunnelChart/index.js.map +1 -1
  73. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +1 -2
  74. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +51 -0
  75. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -0
  76. package/lib/components/GanttChart/GanttChart.js +19 -2
  77. package/lib/components/GanttChart/GanttChart.js.map +1 -1
  78. package/lib/components/GanttChart/GanttChart.types.js.map +1 -1
  79. package/lib/components/GanttChart/index.js.map +1 -1
  80. package/lib/components/GanttChart/useGanttChartStyles.styles.js +1 -2
  81. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +23 -0
  82. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -0
  83. package/lib/components/GaugeChart/GaugeChart.js +9 -2
  84. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  85. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  86. package/lib/components/GaugeChart/index.js.map +1 -1
  87. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +1 -2
  88. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +142 -0
  89. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -0
  90. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +70 -58
  91. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  92. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  93. package/lib/components/GroupedVerticalBarChart/index.js.map +1 -1
  94. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +1 -2
  95. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +53 -0
  96. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -0
  97. package/lib/components/HeatMapChart/HeatMapChart.js +11 -3
  98. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  99. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  100. package/lib/components/HeatMapChart/index.js.map +1 -1
  101. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +1 -2
  102. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +38 -0
  103. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -0
  104. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +23 -26
  105. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  106. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  107. package/lib/components/HorizontalBarChart/index.js.map +1 -1
  108. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +1 -2
  109. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +120 -0
  110. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -0
  111. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +9 -2
  112. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  113. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  114. package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  115. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +1 -2
  116. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +39 -0
  117. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -0
  118. package/lib/components/Legends/Legends.js +28 -10
  119. package/lib/components/Legends/Legends.js.map +1 -1
  120. package/lib/components/Legends/Legends.types.js.map +1 -1
  121. package/lib/components/Legends/OverflowMenu.js.map +1 -1
  122. package/lib/components/Legends/index.js.map +1 -1
  123. package/lib/components/Legends/shape.js.map +1 -1
  124. package/lib/components/Legends/useLegendsStyles.styles.js +57 -14
  125. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  126. package/lib/components/Legends/useLegendsStyles.styles.raw.js +138 -0
  127. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -0
  128. package/lib/components/LineChart/LineChart.js +9 -2
  129. package/lib/components/LineChart/LineChart.js.map +1 -1
  130. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  131. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  132. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  133. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  134. package/lib/components/LineChart/index.js.map +1 -1
  135. package/lib/components/LineChart/useLineChartStyles.styles.js +1 -2
  136. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +52 -0
  137. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -0
  138. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  139. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  140. package/lib/components/ResponsiveContainer/index.js.map +1 -1
  141. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +1 -2
  142. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +28 -0
  143. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -0
  144. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  145. package/lib/components/SankeyChart/SankeyChart.js +5 -1
  146. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  147. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  148. package/lib/components/SankeyChart/index.js.map +1 -1
  149. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +1 -2
  150. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +77 -0
  151. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -0
  152. package/lib/components/ScatterChart/ScatterChart.js +11 -3
  153. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  154. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  155. package/lib/components/ScatterChart/index.js.map +1 -1
  156. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +1 -2
  157. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +43 -0
  158. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -0
  159. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  160. package/lib/components/Sparkline/Sparkline.types.js.map +1 -1
  161. package/lib/components/Sparkline/index.js.map +1 -1
  162. package/lib/components/Sparkline/useSparklineStyles.styles.js +1 -2
  163. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js +30 -0
  164. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -0
  165. package/lib/components/VerticalBarChart/VerticalBarChart.js +62 -28
  166. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  167. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  168. package/lib/components/VerticalBarChart/index.js.map +1 -1
  169. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +1 -2
  170. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +58 -0
  171. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -0
  172. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +22 -8
  173. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  174. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  175. package/lib/components/VerticalStackedBarChart/index.js.map +1 -1
  176. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +1 -2
  177. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +49 -0
  178. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -0
  179. package/lib/index.js.map +1 -1
  180. package/lib/types/DataPoint.js.map +1 -1
  181. package/lib/types/EventAnnotation.js.map +1 -1
  182. package/lib/types/LegendDataItem.js.map +1 -1
  183. package/lib/types/index.js.map +1 -1
  184. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  185. package/lib/utilities/KeyCodes.js.map +1 -1
  186. package/lib/utilities/SVGTooltipText.js +2 -0
  187. package/lib/utilities/SVGTooltipText.js.map +1 -1
  188. package/lib/utilities/async-utils.js.map +1 -1
  189. package/lib/utilities/colors.js.map +1 -1
  190. package/lib/utilities/getWindow.js.map +1 -1
  191. package/lib/utilities/image-export-utils.js +256 -0
  192. package/lib/utilities/image-export-utils.js.map +1 -0
  193. package/lib/utilities/index.js.map +1 -1
  194. package/lib/utilities/overflow-utils.js.map +1 -1
  195. package/lib/utilities/string.js.map +1 -1
  196. package/lib/utilities/test-data.js.map +1 -1
  197. package/lib/utilities/utilities.js +50 -5
  198. package/lib/utilities/utilities.js.map +1 -1
  199. package/lib/utilities/vbc-utils.js.map +1 -1
  200. package/lib-commonjs/AreaChart.js.map +1 -1
  201. package/lib-commonjs/CartesianChart.js.map +1 -1
  202. package/lib-commonjs/DeclarativeChart.js.map +1 -1
  203. package/lib-commonjs/DonutChart.js.map +1 -1
  204. package/lib-commonjs/FunnelChart.js.map +1 -1
  205. package/lib-commonjs/GanttChart.js.map +1 -1
  206. package/lib-commonjs/GaugeChart.js.map +1 -1
  207. package/lib-commonjs/GroupedVerticalBarChart.js.map +1 -1
  208. package/lib-commonjs/HeatMapChart.js.map +1 -1
  209. package/lib-commonjs/HorizontalBarChart.js.map +1 -1
  210. package/lib-commonjs/HorizontalBarChartWithAxis.js.map +1 -1
  211. package/lib-commonjs/Legends.js.map +1 -1
  212. package/lib-commonjs/LineChart.js.map +1 -1
  213. package/lib-commonjs/Popover.js.map +1 -1
  214. package/lib-commonjs/ResponsiveContainer.js.map +1 -1
  215. package/lib-commonjs/SankeyChart.js.map +1 -1
  216. package/lib-commonjs/ScatterChart.js.map +1 -1
  217. package/lib-commonjs/Sparkline.js.map +1 -1
  218. package/lib-commonjs/VerticalBarChart.js.map +1 -1
  219. package/lib-commonjs/VerticalStackedBarChart.js.map +1 -1
  220. package/lib-commonjs/components/AreaChart/AreaChart.js +10 -2
  221. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  222. package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +1 -1
  223. package/lib-commonjs/components/AreaChart/index.js.map +1 -1
  224. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +1 -1
  225. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  226. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +57 -0
  227. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -0
  228. package/lib-commonjs/components/CommonComponents/CartesianChart.js +2 -1
  229. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  230. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  231. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
  232. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +1 -1
  233. package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
  234. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +1 -1
  235. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  236. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +142 -0
  237. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -0
  238. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +1 -1
  239. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  240. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +140 -0
  241. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -0
  242. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +14 -6
  243. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  244. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +47 -13
  245. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  246. package/lib-commonjs/components/DeclarativeChart/imageExporter.js +1 -0
  247. package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -1
  248. package/lib-commonjs/components/DeclarativeChart/index.js.map +1 -1
  249. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  250. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -1
  251. package/lib-commonjs/components/DonutChart/Arc/index.js.map +1 -1
  252. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +1 -1
  253. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  254. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +58 -0
  255. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -0
  256. package/lib-commonjs/components/DonutChart/DonutChart.js +10 -2
  257. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  258. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  259. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  260. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -1
  261. package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -1
  262. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +1 -1
  263. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js +43 -0
  264. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -0
  265. package/lib-commonjs/components/DonutChart/index.js.map +1 -1
  266. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +1 -1
  267. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +59 -0
  268. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -0
  269. package/lib-commonjs/components/FunnelChart/FunnelChart.js +10 -1
  270. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
  271. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -1
  272. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -1
  273. package/lib-commonjs/components/FunnelChart/index.js.map +1 -1
  274. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +1 -1
  275. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
  276. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +65 -0
  277. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -0
  278. package/lib-commonjs/components/GanttChart/GanttChart.js +18 -1
  279. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
  280. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -1
  281. package/lib-commonjs/components/GanttChart/index.js.map +1 -1
  282. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +1 -1
  283. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +39 -0
  284. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -0
  285. package/lib-commonjs/components/GaugeChart/GaugeChart.js +9 -2
  286. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  287. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  288. package/lib-commonjs/components/GaugeChart/index.js.map +1 -1
  289. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +1 -1
  290. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  291. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +160 -0
  292. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -0
  293. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +70 -58
  294. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  295. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  296. package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +1 -1
  297. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +1 -1
  298. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +69 -0
  299. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -0
  300. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +10 -2
  301. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  302. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  303. package/lib-commonjs/components/HeatMapChart/index.js.map +1 -1
  304. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +1 -1
  305. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +56 -0
  306. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -0
  307. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +23 -26
  308. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  309. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  310. package/lib-commonjs/components/HorizontalBarChart/index.js.map +1 -1
  311. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +1 -1
  312. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +134 -0
  313. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -0
  314. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +9 -2
  315. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  316. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  317. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  318. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +1 -1
  319. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +55 -0
  320. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -0
  321. package/lib-commonjs/components/Legends/Legends.js +28 -10
  322. package/lib-commonjs/components/Legends/Legends.js.map +1 -1
  323. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  324. package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -1
  325. package/lib-commonjs/components/Legends/index.js.map +1 -1
  326. package/lib-commonjs/components/Legends/shape.js.map +1 -1
  327. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +101 -28
  328. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
  329. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +174 -0
  330. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -0
  331. package/lib-commonjs/components/LineChart/LineChart.js +9 -2
  332. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  333. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  334. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  335. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  336. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  337. package/lib-commonjs/components/LineChart/index.js.map +1 -1
  338. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +1 -1
  339. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +66 -0
  340. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -0
  341. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  342. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  343. package/lib-commonjs/components/ResponsiveContainer/index.js.map +1 -1
  344. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +1 -1
  345. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +46 -0
  346. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -0
  347. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  348. package/lib-commonjs/components/SankeyChart/SankeyChart.js +5 -1
  349. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  350. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  351. package/lib-commonjs/components/SankeyChart/index.js.map +1 -1
  352. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +1 -1
  353. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  354. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +95 -0
  355. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -0
  356. package/lib-commonjs/components/ScatterChart/ScatterChart.js +10 -2
  357. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  358. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  359. package/lib-commonjs/components/ScatterChart/index.js.map +1 -1
  360. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +1 -1
  361. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +57 -0
  362. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -0
  363. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
  364. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -1
  365. package/lib-commonjs/components/Sparkline/index.js.map +1 -1
  366. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +1 -1
  367. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js +44 -0
  368. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -0
  369. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +62 -28
  370. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  371. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  372. package/lib-commonjs/components/VerticalBarChart/index.js.map +1 -1
  373. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +1 -1
  374. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +74 -0
  375. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -0
  376. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +22 -8
  377. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  378. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  379. package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +1 -1
  380. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +1 -1
  381. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  382. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +67 -0
  383. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -0
  384. package/lib-commonjs/index.js.map +1 -1
  385. package/lib-commonjs/types/DataPoint.js.map +1 -1
  386. package/lib-commonjs/types/EventAnnotation.js.map +1 -1
  387. package/lib-commonjs/types/LegendDataItem.js.map +1 -1
  388. package/lib-commonjs/types/index.js.map +1 -1
  389. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  390. package/lib-commonjs/utilities/KeyCodes.js.map +1 -1
  391. package/lib-commonjs/utilities/SVGTooltipText.js +2 -0
  392. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  393. package/lib-commonjs/utilities/async-utils.js.map +1 -1
  394. package/lib-commonjs/utilities/colors.js.map +1 -1
  395. package/lib-commonjs/utilities/getWindow.js.map +1 -1
  396. package/lib-commonjs/utilities/image-export-utils.js +274 -0
  397. package/lib-commonjs/utilities/image-export-utils.js.map +1 -0
  398. package/lib-commonjs/utilities/index.js.map +1 -1
  399. package/lib-commonjs/utilities/overflow-utils.js.map +1 -1
  400. package/lib-commonjs/utilities/string.js.map +1 -1
  401. package/lib-commonjs/utilities/test-data.js.map +1 -1
  402. package/lib-commonjs/utilities/utilities.js +56 -5
  403. package/lib-commonjs/utilities/utilities.js.map +1 -1
  404. package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
  405. package/package.json +12 -22
@@ -0,0 +1,138 @@
1
+ import { makeStyles, mergeClasses, shorthands } from '@griffel/react';
2
+ import { tokens, typographyStyles } from '@fluentui/react-theme';
3
+ import { HighContrastSelector } from '../../utilities/index';
4
+ // Constants needed to create legends using SVG for image export
5
+ export const LEGEND_CONTAINER_MARGIN_TOP = 8;
6
+ export const LEGEND_CONTAINER_MARGIN_START = 12;
7
+ export const LEGEND_PADDING = 8;
8
+ export const LEGEND_HEIGHT = 32;
9
+ export const LEGEND_SHAPE_BORDER = 1;
10
+ const LEGEND_SHAPE_SIZE_WITHOUT_BORDER = 12;
11
+ // SVG strokes are drawn centered around the path, with half of the stroke width extending inward
12
+ // (overlapping the fill area) and half outward. To ensure the filled area maintains its intended size,
13
+ // expand the shape accordingly.
14
+ export const LEGEND_SHAPE_SIZE = LEGEND_SHAPE_SIZE_WITHOUT_BORDER + LEGEND_SHAPE_BORDER;
15
+ export const LEGEND_SHAPE_MARGIN_END = 8;
16
+ export const INACTIVE_LEGEND_TEXT_OPACITY = 0.67;
17
+ /**
18
+ * @internal
19
+ */ export const legendClassNames = {
20
+ root: 'fui-legend__root',
21
+ legend: 'fui-legend__legend',
22
+ rect: 'fui-legend__rect',
23
+ shape: 'fui-legend__shape',
24
+ triangle: 'fui-legend__triangle',
25
+ text: 'fui-legend__text',
26
+ hoverChange: 'fui-legend__hoverChange',
27
+ resizableArea: 'fui-legend__resizableArea',
28
+ legendContainer: 'fui-legend__legendContainer',
29
+ annotation: 'fui-legend__annotation'
30
+ };
31
+ const useStyles = makeStyles({
32
+ root: {
33
+ // FIXME: Removing this style allows the legend container in responsive donut chart to resize
34
+ // properly (horizontally) within a flexbox or grid layout. But it causes vertical resizing issues
35
+ // in responsive charts where legends consist of multiple words.
36
+ whiteSpace: 'nowrap',
37
+ width: '100%',
38
+ alignItems: 'center',
39
+ ...shorthands.margin('-8px 0 0 -8px')
40
+ },
41
+ legend: {
42
+ // setting display to flex does not work
43
+ // display: 'flex',
44
+ alignItems: 'center',
45
+ justifyContent: 'left',
46
+ cursor: 'pointer',
47
+ ...shorthands.border('none'),
48
+ padding: `${LEGEND_PADDING}px`,
49
+ textTransform: 'capitalize',
50
+ // The default min-width is 64px. Setting it to 0 allows the legend container in responsive
51
+ // cartesian charts to resize properly within a flexbox or grid layout.
52
+ minWidth: 0,
53
+ [HighContrastSelector]: {
54
+ color: 'WindowText',
55
+ forcedColorAdjust: 'none'
56
+ },
57
+ '&:hover': {
58
+ [HighContrastSelector]: {
59
+ color: 'HighlightText',
60
+ forcedColorAdjust: 'none'
61
+ }
62
+ }
63
+ },
64
+ rect: {
65
+ [HighContrastSelector]: {
66
+ content: 'var(--rect-content-high-contrast)',
67
+ opacity: 'var(--rect-opacity-high-contrast)'
68
+ },
69
+ width: `${LEGEND_SHAPE_SIZE_WITHOUT_BORDER}px`,
70
+ marginRight: `${LEGEND_SHAPE_MARGIN_END}px`,
71
+ border: `${LEGEND_SHAPE_BORDER}px solid`
72
+ },
73
+ shape: {
74
+ marginRight: `${LEGEND_SHAPE_MARGIN_END}px`
75
+ },
76
+ // TO DO Add props when these styles are used in the component
77
+ triangle: {
78
+ width: '0',
79
+ height: '0',
80
+ ...shorthands.borderLeft('6px solid transparent'),
81
+ ...shorthands.borderRight('6px solid transparent'),
82
+ ...shorthands.borderTop('10.4px solid'),
83
+ marginRight: tokens.spacingHorizontalS
84
+ },
85
+ // TO DO Add props when these styles are used in the component
86
+ text: {
87
+ ...typographyStyles.caption1,
88
+ color: tokens.colorNeutralForeground1,
89
+ forcedColorAdjust: 'auto'
90
+ },
91
+ // TO DO Add props when these styles are used in the component
92
+ hoverChange: {
93
+ width: '12px',
94
+ height: '12px',
95
+ marginRight: tokens.spacingHorizontalS,
96
+ ...shorthands.border('1px solid')
97
+ },
98
+ resizableArea: {
99
+ position: 'relative',
100
+ textAlign: 'left',
101
+ transform: 'translate(-50%, 0)',
102
+ top: 'auto',
103
+ left: '50%',
104
+ minWidth: '200px',
105
+ maxWidth: '800px',
106
+ '::after': {
107
+ ...shorthands.padding('1px 4px 1px'),
108
+ ...shorthands.borderTop('-2px'),
109
+ ...shorthands.borderLeft('-2px')
110
+ }
111
+ },
112
+ legendContainer: {
113
+ flex: '0 1 auto',
114
+ margin: '4px'
115
+ },
116
+ annotation: {
117
+ display: 'flex',
118
+ alignItems: 'center',
119
+ gap: '4px'
120
+ }
121
+ });
122
+ export const useLegendStyles = (props)=>{
123
+ var _props_styles, _props_styles1, _props_styles2, _props_styles3, _props_styles4, _props_styles5, _props_styles6, _props_styles7, _props_styles8, _props_styles9;
124
+ const { className } = props; // ToDo - width, barHeight is non enumerable. Need to be used inline.
125
+ const baseStyles = useStyles();
126
+ return {
127
+ root: mergeClasses(legendClassNames.root, baseStyles.root, className, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),
128
+ legend: mergeClasses(legendClassNames.legend, baseStyles.legend, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.legend),
129
+ rect: mergeClasses(legendClassNames.rect, baseStyles.rect, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.rect),
130
+ shape: mergeClasses(legendClassNames.shape, baseStyles.shape, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.shape),
131
+ triangle: mergeClasses(legendClassNames.triangle, baseStyles.triangle, (_props_styles4 = props.styles) === null || _props_styles4 === void 0 ? void 0 : _props_styles4.triangle),
132
+ text: mergeClasses(legendClassNames.text, baseStyles.text, (_props_styles5 = props.styles) === null || _props_styles5 === void 0 ? void 0 : _props_styles5.text),
133
+ hoverChange: mergeClasses(legendClassNames.hoverChange, baseStyles.hoverChange, (_props_styles6 = props.styles) === null || _props_styles6 === void 0 ? void 0 : _props_styles6.hoverChange),
134
+ resizableArea: mergeClasses(legendClassNames.resizableArea, baseStyles.resizableArea, (_props_styles7 = props.styles) === null || _props_styles7 === void 0 ? void 0 : _props_styles7.resizableArea),
135
+ legendContainer: mergeClasses(legendClassNames.legendContainer, baseStyles.legendContainer, (_props_styles8 = props.styles) === null || _props_styles8 === void 0 ? void 0 : _props_styles8.legendContainer),
136
+ annotation: mergeClasses(legendClassNames.annotation, baseStyles.annotation, (_props_styles9 = props.styles) === null || _props_styles9 === void 0 ? void 0 : _props_styles9.annotation)
137
+ };
138
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Legends/useLegendsStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { LegendsProps, LegendsStyles } from './Legends.types';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/index';\n\n// Constants needed to create legends using SVG for image export\nexport const LEGEND_CONTAINER_MARGIN_TOP = 8;\nexport const LEGEND_CONTAINER_MARGIN_START = 12;\nexport const LEGEND_PADDING = 8;\nexport const LEGEND_HEIGHT = 32;\nexport const LEGEND_SHAPE_BORDER = 1;\nconst LEGEND_SHAPE_SIZE_WITHOUT_BORDER = 12;\n// SVG strokes are drawn centered around the path, with half of the stroke width extending inward\n// (overlapping the fill area) and half outward. To ensure the filled area maintains its intended size,\n// expand the shape accordingly.\nexport const LEGEND_SHAPE_SIZE = LEGEND_SHAPE_SIZE_WITHOUT_BORDER + LEGEND_SHAPE_BORDER;\nexport const LEGEND_SHAPE_MARGIN_END = 8;\nexport const INACTIVE_LEGEND_TEXT_OPACITY = 0.67;\n\n/**\n * @internal\n */\nexport const legendClassNames: SlotClassNames<LegendsStyles> = {\n root: 'fui-legend__root',\n legend: 'fui-legend__legend',\n rect: 'fui-legend__rect',\n shape: 'fui-legend__shape',\n triangle: 'fui-legend__triangle',\n text: 'fui-legend__text',\n hoverChange: 'fui-legend__hoverChange',\n resizableArea: 'fui-legend__resizableArea',\n legendContainer: 'fui-legend__legendContainer',\n annotation: 'fui-legend__annotation',\n};\n\nconst useStyles = makeStyles({\n root: {\n // FIXME: Removing this style allows the legend container in responsive donut chart to resize\n // properly (horizontally) within a flexbox or grid layout. But it causes vertical resizing issues\n // in responsive charts where legends consist of multiple words.\n whiteSpace: 'nowrap',\n width: '100%',\n alignItems: 'center',\n ...shorthands.margin('-8px 0 0 -8px'),\n },\n legend: {\n // setting display to flex does not work\n // display: 'flex',\n alignItems: 'center',\n justifyContent: 'left',\n cursor: 'pointer',\n ...shorthands.border('none'),\n padding: `${LEGEND_PADDING}px`,\n textTransform: 'capitalize',\n // The default min-width is 64px. Setting it to 0 allows the legend container in responsive\n // cartesian charts to resize properly within a flexbox or grid layout.\n minWidth: 0,\n [HighContrastSelector]: {\n color: 'WindowText',\n forcedColorAdjust: 'none',\n },\n '&:hover': {\n [HighContrastSelector]: {\n color: 'HighlightText',\n forcedColorAdjust: 'none',\n },\n },\n },\n rect: {\n [HighContrastSelector]: {\n content: 'var(--rect-content-high-contrast)',\n opacity: 'var(--rect-opacity-high-contrast)',\n },\n width: `${LEGEND_SHAPE_SIZE_WITHOUT_BORDER}px`,\n marginRight: `${LEGEND_SHAPE_MARGIN_END}px`,\n border: `${LEGEND_SHAPE_BORDER}px solid`,\n },\n shape: {\n marginRight: `${LEGEND_SHAPE_MARGIN_END}px`,\n },\n // TO DO Add props when these styles are used in the component\n triangle: {\n width: '0',\n height: '0',\n ...shorthands.borderLeft('6px solid transparent'),\n ...shorthands.borderRight('6px solid transparent'),\n ...shorthands.borderTop('10.4px solid'),\n marginRight: tokens.spacingHorizontalS,\n },\n // TO DO Add props when these styles are used in the component\n text: {\n ...typographyStyles.caption1,\n color: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto',\n },\n // TO DO Add props when these styles are used in the component\n hoverChange: {\n width: '12px',\n height: '12px',\n marginRight: tokens.spacingHorizontalS,\n ...shorthands.border('1px solid'),\n },\n resizableArea: {\n position: 'relative',\n textAlign: 'left',\n transform: 'translate(-50%, 0)',\n top: 'auto',\n left: '50%',\n minWidth: '200px',\n maxWidth: '800px',\n '::after': {\n ...shorthands.padding('1px 4px 1px'),\n ...shorthands.borderTop('-2px'),\n ...shorthands.borderLeft('-2px'),\n },\n },\n legendContainer: {\n flex: '0 1 auto',\n margin: '4px',\n },\n annotation: {\n display: 'flex',\n alignItems: 'center',\n gap: '4px',\n },\n});\n\nexport const useLegendStyles = (props: LegendsProps): LegendsStyles => {\n const { className } = props; // ToDo - width, barHeight is non enumerable. Need to be used inline.\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(legendClassNames.root, baseStyles.root, className, props.styles?.root),\n legend: mergeClasses(legendClassNames.legend, baseStyles.legend, props.styles?.legend),\n rect: mergeClasses(legendClassNames.rect, baseStyles.rect, props.styles?.rect),\n shape: mergeClasses(legendClassNames.shape, baseStyles.shape, props.styles?.shape),\n triangle: mergeClasses(legendClassNames.triangle, baseStyles.triangle, props.styles?.triangle),\n text: mergeClasses(legendClassNames.text, baseStyles.text, props.styles?.text),\n hoverChange: mergeClasses(legendClassNames.hoverChange, baseStyles.hoverChange, props.styles?.hoverChange),\n resizableArea: mergeClasses(legendClassNames.resizableArea, baseStyles.resizableArea, props.styles?.resizableArea),\n legendContainer: mergeClasses(\n legendClassNames.legendContainer,\n baseStyles.legendContainer,\n props.styles?.legendContainer,\n ),\n annotation: mergeClasses(legendClassNames.annotation, baseStyles.annotation, props.styles?.annotation),\n };\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","typographyStyles","HighContrastSelector","LEGEND_CONTAINER_MARGIN_TOP","LEGEND_CONTAINER_MARGIN_START","LEGEND_PADDING","LEGEND_HEIGHT","LEGEND_SHAPE_BORDER","LEGEND_SHAPE_SIZE_WITHOUT_BORDER","LEGEND_SHAPE_SIZE","LEGEND_SHAPE_MARGIN_END","INACTIVE_LEGEND_TEXT_OPACITY","legendClassNames","root","legend","rect","shape","triangle","text","hoverChange","resizableArea","legendContainer","annotation","useStyles","whiteSpace","width","alignItems","margin","justifyContent","cursor","border","padding","textTransform","minWidth","color","forcedColorAdjust","content","opacity","marginRight","height","borderLeft","borderRight","borderTop","spacingHorizontalS","caption1","colorNeutralForeground1","position","textAlign","transform","top","left","maxWidth","flex","display","gap","useLegendStyles","props","className","baseStyles","styles"],"mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAGtE,SAASC,MAAM,EA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 import { CartesianChart } from '../../index';
10
10
  import { EventsAnnotation } from './eventAnnotation/EventAnnotation';
11
11
  import { tokens } from '@fluentui/react-theme';
12
12
  import { calloutData, ChartTypes, getXAxisType, XAxisTypes, tooltipOfAxislabels, Points, pointTypes, getTypeOfAxis, getNextColor, getColorFromToken, findNumericMinMaxOfY, createNumericYAxis, domainRangeOfDateForAreaLineVerticalBarChart, domainRangeOfNumericForAreaChart, createStringYAxis, useRtl, formatDate, getCurveFactory } from '../../utilities/index';
13
+ import { toImage } from '../../utilities/image-export-utils';
13
14
  var PointSize = /*#__PURE__*/ function(PointSize) {
14
15
  PointSize[PointSize["hoverSize"] = 11] = "hoverSize";
15
16
  PointSize[PointSize["invisibleSize"] = 1] = "invisibleSize";
@@ -117,6 +118,7 @@ const PATH_MULTIPLY_SIZE = 2.5;
117
118
  let xAxisCalloutAccessibilityData = {};
118
119
  const cartesianChartRef = React.useRef(null);
119
120
  let _yScaleSecondary;
121
+ const _legendsRef = React.useRef(null);
120
122
  props.eventAnnotationProps && props.eventAnnotationProps.labelHeight && (eventLabelHeight = props.eventAnnotationProps.labelHeight);
121
123
  const [hoverXValue, setHoverXValue] = React.useState('');
122
124
  const [activeLegend, setActiveLegend] = React.useState('');
@@ -154,7 +156,11 @@ const PATH_MULTIPLY_SIZE = 2.5;
154
156
  var _cartesianChartRef_current;
155
157
  var _cartesianChartRef_current_chartContainer;
156
158
  return {
157
- chartContainer: (_cartesianChartRef_current_chartContainer = (_cartesianChartRef_current = cartesianChartRef.current) === null || _cartesianChartRef_current === void 0 ? void 0 : _cartesianChartRef_current.chartContainer) !== null && _cartesianChartRef_current_chartContainer !== void 0 ? _cartesianChartRef_current_chartContainer : null
159
+ chartContainer: (_cartesianChartRef_current_chartContainer = (_cartesianChartRef_current = cartesianChartRef.current) === null || _cartesianChartRef_current === void 0 ? void 0 : _cartesianChartRef_current.chartContainer) !== null && _cartesianChartRef_current_chartContainer !== void 0 ? _cartesianChartRef_current_chartContainer : null,
160
+ toImage: (opts)=>{
161
+ var _cartesianChartRef_current, _legendsRef_current;
162
+ return toImage((_cartesianChartRef_current = cartesianChartRef.current) === null || _cartesianChartRef_current === void 0 ? void 0 : _cartesianChartRef_current.chartContainer, (_legendsRef_current = _legendsRef.current) === null || _legendsRef_current === void 0 ? void 0 : _legendsRef_current.toSVG, _isRTL, opts);
163
+ }
158
164
  };
159
165
  }, []);
160
166
  function _getDomainNRangeValues(points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues, shiftX) {
@@ -307,7 +313,8 @@ const PATH_MULTIPLY_SIZE = 2.5;
307
313
  ...isLegendMultiSelectEnabled && {
308
314
  onLegendHoverCardLeave: _onHoverCardHide
309
315
  },
310
- ...props.legendProps
316
+ ...props.legendProps,
317
+ legendRef: _legendsRef
311
318
  });
312
319
  }
313
320
  function _getBoxWidthOfShape(pointId, pointIndex, isLastPoint) {