@fluentui/react-charts 9.1.9 → 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 (451) hide show
  1. package/CHANGELOG.md +47 -2
  2. package/dist/index.d.ts +348 -11
  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 +1 -0
  8. package/lib/FunnelChart.js.map +1 -0
  9. package/lib/GanttChart.js +1 -0
  10. package/lib/GanttChart.js.map +1 -0
  11. package/lib/GaugeChart.js.map +1 -1
  12. package/lib/GroupedVerticalBarChart.js.map +1 -1
  13. package/lib/HeatMapChart.js.map +1 -1
  14. package/lib/HorizontalBarChart.js.map +1 -1
  15. package/lib/HorizontalBarChartWithAxis.js.map +1 -1
  16. package/lib/Legends.js.map +1 -1
  17. package/lib/LineChart.js.map +1 -1
  18. package/lib/Popover.js.map +1 -1
  19. package/lib/ResponsiveContainer.js.map +1 -1
  20. package/lib/SankeyChart.js.map +1 -1
  21. package/lib/ScatterChart.js.map +1 -1
  22. package/lib/Sparkline.js.map +1 -1
  23. package/lib/VerticalBarChart.js.map +1 -1
  24. package/lib/VerticalStackedBarChart.js.map +1 -1
  25. package/lib/components/AreaChart/AreaChart.js +24 -8
  26. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  27. package/lib/components/AreaChart/AreaChart.types.js.map +1 -1
  28. package/lib/components/AreaChart/index.js.map +1 -1
  29. package/lib/components/AreaChart/useAreaChartStyles.styles.js +1 -2
  30. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +41 -0
  31. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -0
  32. package/lib/components/CommonComponents/CartesianChart.js +12 -8
  33. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  34. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  35. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  36. package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -1
  37. package/lib/components/CommonComponents/index.js.map +1 -1
  38. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +1 -2
  39. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +128 -0
  40. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -0
  41. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +1 -2
  42. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +126 -0
  43. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -0
  44. package/lib/components/DeclarativeChart/DeclarativeChart.js +15 -7
  45. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  46. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +44 -13
  47. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  48. package/lib/components/DeclarativeChart/imageExporter.js +1 -0
  49. package/lib/components/DeclarativeChart/imageExporter.js.map +1 -1
  50. package/lib/components/DeclarativeChart/index.js.map +1 -1
  51. package/lib/components/DonutChart/Arc/Arc.js +5 -5
  52. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  53. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
  54. package/lib/components/DonutChart/Arc/index.js.map +1 -1
  55. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +1 -2
  56. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +44 -0
  57. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -0
  58. package/lib/components/DonutChart/DonutChart.js +18 -4
  59. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  60. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  61. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  62. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
  63. package/lib/components/DonutChart/Pie/index.js.map +1 -1
  64. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +1 -2
  65. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js +29 -0
  66. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -0
  67. package/lib/components/DonutChart/index.js.map +1 -1
  68. package/lib/components/DonutChart/useDonutChartStyles.styles.js +1 -2
  69. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +45 -0
  70. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -0
  71. package/lib/components/FunnelChart/FunnelChart.js +400 -0
  72. package/lib/components/FunnelChart/FunnelChart.js.map +1 -0
  73. package/lib/components/FunnelChart/FunnelChart.types.js +1 -0
  74. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -0
  75. package/lib/components/FunnelChart/funnelGeometry.js +220 -0
  76. package/lib/components/FunnelChart/funnelGeometry.js.map +1 -0
  77. package/lib/components/FunnelChart/index.js +2 -0
  78. package/lib/components/FunnelChart/index.js.map +1 -0
  79. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +58 -0
  80. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -0
  81. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +51 -0
  82. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -0
  83. package/lib/components/GanttChart/GanttChart.js +547 -0
  84. package/lib/components/GanttChart/GanttChart.js.map +1 -0
  85. package/lib/components/GanttChart/GanttChart.types.js +4 -0
  86. package/lib/components/GanttChart/GanttChart.types.js.map +1 -0
  87. package/lib/components/GanttChart/index.js +2 -0
  88. package/lib/components/GanttChart/index.js.map +1 -0
  89. package/lib/components/GanttChart/useGanttChartStyles.styles.js +24 -0
  90. package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +1 -0
  91. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +23 -0
  92. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -0
  93. package/lib/components/GaugeChart/GaugeChart.js +9 -2
  94. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  95. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  96. package/lib/components/GaugeChart/index.js.map +1 -1
  97. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +1 -2
  98. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +142 -0
  99. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -0
  100. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +77 -60
  101. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  102. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  103. package/lib/components/GroupedVerticalBarChart/index.js.map +1 -1
  104. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +1 -2
  105. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +53 -0
  106. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -0
  107. package/lib/components/HeatMapChart/HeatMapChart.js +11 -3
  108. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  109. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  110. package/lib/components/HeatMapChart/index.js.map +1 -1
  111. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +1 -2
  112. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +38 -0
  113. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -0
  114. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +23 -26
  115. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  116. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +5 -3
  117. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  118. package/lib/components/HorizontalBarChart/index.js.map +1 -1
  119. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +1 -2
  120. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +120 -0
  121. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -0
  122. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +18 -5
  123. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  124. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  125. package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  126. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +1 -2
  127. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +39 -0
  128. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -0
  129. package/lib/components/Legends/Legends.js +28 -10
  130. package/lib/components/Legends/Legends.js.map +1 -1
  131. package/lib/components/Legends/Legends.types.js.map +1 -1
  132. package/lib/components/Legends/OverflowMenu.js.map +1 -1
  133. package/lib/components/Legends/index.js.map +1 -1
  134. package/lib/components/Legends/shape.js +3 -3
  135. package/lib/components/Legends/shape.js.map +1 -1
  136. package/lib/components/Legends/useLegendsStyles.styles.js +57 -14
  137. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  138. package/lib/components/Legends/useLegendsStyles.styles.raw.js +138 -0
  139. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -0
  140. package/lib/components/LineChart/LineChart.js +23 -9
  141. package/lib/components/LineChart/LineChart.js.map +1 -1
  142. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  143. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  144. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  145. package/lib/components/LineChart/eventAnnotation/Textbox.js +2 -1
  146. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  147. package/lib/components/LineChart/index.js.map +1 -1
  148. package/lib/components/LineChart/useLineChartStyles.styles.js +1 -2
  149. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +52 -0
  150. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -0
  151. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  152. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  153. package/lib/components/ResponsiveContainer/index.js.map +1 -1
  154. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +1 -2
  155. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +28 -0
  156. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -0
  157. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  158. package/lib/components/SankeyChart/SankeyChart.js +5 -1
  159. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  160. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  161. package/lib/components/SankeyChart/index.js.map +1 -1
  162. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +1 -2
  163. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +77 -0
  164. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -0
  165. package/lib/components/ScatterChart/ScatterChart.js +19 -5
  166. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  167. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  168. package/lib/components/ScatterChart/index.js.map +1 -1
  169. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +1 -2
  170. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +43 -0
  171. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -0
  172. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  173. package/lib/components/Sparkline/Sparkline.types.js.map +1 -1
  174. package/lib/components/Sparkline/index.js.map +1 -1
  175. package/lib/components/Sparkline/useSparklineStyles.styles.js +1 -2
  176. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js +30 -0
  177. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -0
  178. package/lib/components/VerticalBarChart/VerticalBarChart.js +71 -31
  179. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  180. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  181. package/lib/components/VerticalBarChart/index.js.map +1 -1
  182. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +1 -2
  183. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +58 -0
  184. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -0
  185. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +26 -12
  186. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  187. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  188. package/lib/components/VerticalStackedBarChart/index.js.map +1 -1
  189. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +1 -2
  190. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +49 -0
  191. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -0
  192. package/lib/index.js +2 -0
  193. package/lib/index.js.map +1 -1
  194. package/lib/types/DataPoint.js +3 -1
  195. package/lib/types/DataPoint.js.map +1 -1
  196. package/lib/types/EventAnnotation.js.map +1 -1
  197. package/lib/types/LegendDataItem.js.map +1 -1
  198. package/lib/types/index.js.map +1 -1
  199. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  200. package/lib/utilities/KeyCodes.js.map +1 -1
  201. package/lib/utilities/SVGTooltipText.js +2 -0
  202. package/lib/utilities/SVGTooltipText.js.map +1 -1
  203. package/lib/utilities/async-utils.js.map +1 -1
  204. package/lib/utilities/colors.js +12 -0
  205. package/lib/utilities/colors.js.map +1 -1
  206. package/lib/utilities/getWindow.js.map +1 -1
  207. package/lib/utilities/image-export-utils.js +256 -0
  208. package/lib/utilities/image-export-utils.js.map +1 -0
  209. package/lib/utilities/index.js.map +1 -1
  210. package/lib/utilities/overflow-utils.js.map +1 -1
  211. package/lib/utilities/string.js.map +1 -1
  212. package/lib/utilities/test-data.js +236 -0
  213. package/lib/utilities/test-data.js.map +1 -1
  214. package/lib/utilities/utilities.js +140 -27
  215. package/lib/utilities/utilities.js.map +1 -1
  216. package/lib/utilities/vbc-utils.js +2 -2
  217. package/lib/utilities/vbc-utils.js.map +1 -1
  218. package/lib-commonjs/AreaChart.js.map +1 -1
  219. package/lib-commonjs/CartesianChart.js.map +1 -1
  220. package/lib-commonjs/DeclarativeChart.js.map +1 -1
  221. package/lib-commonjs/DonutChart.js.map +1 -1
  222. package/lib-commonjs/FunnelChart.js +6 -0
  223. package/lib-commonjs/FunnelChart.js.map +1 -0
  224. package/lib-commonjs/GanttChart.js +6 -0
  225. package/lib-commonjs/GanttChart.js.map +1 -0
  226. package/lib-commonjs/GaugeChart.js.map +1 -1
  227. package/lib-commonjs/GroupedVerticalBarChart.js.map +1 -1
  228. package/lib-commonjs/HeatMapChart.js.map +1 -1
  229. package/lib-commonjs/HorizontalBarChart.js.map +1 -1
  230. package/lib-commonjs/HorizontalBarChartWithAxis.js.map +1 -1
  231. package/lib-commonjs/Legends.js.map +1 -1
  232. package/lib-commonjs/LineChart.js.map +1 -1
  233. package/lib-commonjs/Popover.js.map +1 -1
  234. package/lib-commonjs/ResponsiveContainer.js.map +1 -1
  235. package/lib-commonjs/SankeyChart.js.map +1 -1
  236. package/lib-commonjs/ScatterChart.js.map +1 -1
  237. package/lib-commonjs/Sparkline.js.map +1 -1
  238. package/lib-commonjs/VerticalBarChart.js.map +1 -1
  239. package/lib-commonjs/VerticalStackedBarChart.js.map +1 -1
  240. package/lib-commonjs/components/AreaChart/AreaChart.js +23 -7
  241. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  242. package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +1 -1
  243. package/lib-commonjs/components/AreaChart/index.js.map +1 -1
  244. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +1 -1
  245. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  246. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +57 -0
  247. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -0
  248. package/lib-commonjs/components/CommonComponents/CartesianChart.js +11 -7
  249. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  250. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  251. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
  252. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +1 -1
  253. package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
  254. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +1 -1
  255. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  256. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +142 -0
  257. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -0
  258. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +1 -1
  259. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  260. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +140 -0
  261. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -0
  262. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +14 -6
  263. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  264. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +47 -13
  265. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  266. package/lib-commonjs/components/DeclarativeChart/imageExporter.js +1 -0
  267. package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -1
  268. package/lib-commonjs/components/DeclarativeChart/index.js.map +1 -1
  269. package/lib-commonjs/components/DonutChart/Arc/Arc.js +5 -5
  270. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  271. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -1
  272. package/lib-commonjs/components/DonutChart/Arc/index.js.map +1 -1
  273. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +1 -1
  274. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  275. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +58 -0
  276. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -0
  277. package/lib-commonjs/components/DonutChart/DonutChart.js +17 -3
  278. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  279. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  280. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  281. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -1
  282. package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -1
  283. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +1 -1
  284. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
  285. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js +43 -0
  286. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -0
  287. package/lib-commonjs/components/DonutChart/index.js.map +1 -1
  288. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +1 -1
  289. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  290. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +59 -0
  291. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -0
  292. package/lib-commonjs/components/FunnelChart/FunnelChart.js +411 -0
  293. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -0
  294. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js +6 -0
  295. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -0
  296. package/lib-commonjs/components/FunnelChart/funnelGeometry.js +248 -0
  297. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -0
  298. package/lib-commonjs/components/FunnelChart/index.js +7 -0
  299. package/lib-commonjs/components/FunnelChart/index.js.map +1 -0
  300. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +79 -0
  301. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -0
  302. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +65 -0
  303. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -0
  304. package/lib-commonjs/components/GanttChart/GanttChart.js +558 -0
  305. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -0
  306. package/lib-commonjs/components/GanttChart/GanttChart.types.js +7 -0
  307. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -0
  308. package/lib-commonjs/components/GanttChart/index.js +7 -0
  309. package/lib-commonjs/components/GanttChart/index.js.map +1 -0
  310. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +39 -0
  311. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +1 -0
  312. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +39 -0
  313. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -0
  314. package/lib-commonjs/components/GaugeChart/GaugeChart.js +9 -2
  315. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  316. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  317. package/lib-commonjs/components/GaugeChart/index.js.map +1 -1
  318. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +1 -1
  319. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  320. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +160 -0
  321. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -0
  322. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +77 -60
  323. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  324. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  325. package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +1 -1
  326. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +1 -1
  327. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  328. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +69 -0
  329. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -0
  330. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +10 -2
  331. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  332. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  333. package/lib-commonjs/components/HeatMapChart/index.js.map +1 -1
  334. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +1 -1
  335. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  336. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +56 -0
  337. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -0
  338. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +23 -26
  339. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  340. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +3 -3
  341. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  342. package/lib-commonjs/components/HorizontalBarChart/index.js.map +1 -1
  343. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +1 -1
  344. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  345. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +134 -0
  346. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -0
  347. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +18 -5
  348. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  349. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  350. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  351. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +1 -1
  352. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  353. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +55 -0
  354. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -0
  355. package/lib-commonjs/components/Legends/Legends.js +28 -10
  356. package/lib-commonjs/components/Legends/Legends.js.map +1 -1
  357. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  358. package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -1
  359. package/lib-commonjs/components/Legends/index.js.map +1 -1
  360. package/lib-commonjs/components/Legends/shape.js +2 -2
  361. package/lib-commonjs/components/Legends/shape.js.map +1 -1
  362. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +101 -28
  363. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
  364. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +174 -0
  365. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -0
  366. package/lib-commonjs/components/LineChart/LineChart.js +23 -9
  367. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  368. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  369. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  370. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  371. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +2 -1
  372. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  373. package/lib-commonjs/components/LineChart/index.js.map +1 -1
  374. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +1 -1
  375. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  376. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +66 -0
  377. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -0
  378. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  379. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  380. package/lib-commonjs/components/ResponsiveContainer/index.js.map +1 -1
  381. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +1 -1
  382. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -1
  383. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +46 -0
  384. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -0
  385. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  386. package/lib-commonjs/components/SankeyChart/SankeyChart.js +5 -1
  387. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  388. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  389. package/lib-commonjs/components/SankeyChart/index.js.map +1 -1
  390. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +1 -1
  391. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  392. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +95 -0
  393. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -0
  394. package/lib-commonjs/components/ScatterChart/ScatterChart.js +18 -4
  395. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  396. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  397. package/lib-commonjs/components/ScatterChart/index.js.map +1 -1
  398. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +1 -1
  399. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  400. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +57 -0
  401. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -0
  402. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
  403. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -1
  404. package/lib-commonjs/components/Sparkline/index.js.map +1 -1
  405. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +1 -1
  406. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +1 -1
  407. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js +44 -0
  408. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -0
  409. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +71 -31
  410. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  411. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  412. package/lib-commonjs/components/VerticalBarChart/index.js.map +1 -1
  413. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +1 -1
  414. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  415. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +74 -0
  416. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -0
  417. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +26 -12
  418. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  419. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  420. package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +1 -1
  421. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +1 -1
  422. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  423. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +67 -0
  424. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -0
  425. package/lib-commonjs/index.js +2 -0
  426. package/lib-commonjs/index.js.map +1 -1
  427. package/lib-commonjs/types/DataPoint.js +3 -1
  428. package/lib-commonjs/types/DataPoint.js.map +1 -1
  429. package/lib-commonjs/types/EventAnnotation.js.map +1 -1
  430. package/lib-commonjs/types/LegendDataItem.js.map +1 -1
  431. package/lib-commonjs/types/index.js.map +1 -1
  432. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  433. package/lib-commonjs/utilities/KeyCodes.js.map +1 -1
  434. package/lib-commonjs/utilities/SVGTooltipText.js +2 -0
  435. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  436. package/lib-commonjs/utilities/async-utils.js.map +1 -1
  437. package/lib-commonjs/utilities/colors.js +18 -0
  438. package/lib-commonjs/utilities/colors.js.map +1 -1
  439. package/lib-commonjs/utilities/getWindow.js.map +1 -1
  440. package/lib-commonjs/utilities/image-export-utils.js +274 -0
  441. package/lib-commonjs/utilities/image-export-utils.js.map +1 -0
  442. package/lib-commonjs/utilities/index.js.map +1 -1
  443. package/lib-commonjs/utilities/overflow-utils.js.map +1 -1
  444. package/lib-commonjs/utilities/string.js.map +1 -1
  445. package/lib-commonjs/utilities/test-data.js +245 -0
  446. package/lib-commonjs/utilities/test-data.js.map +1 -1
  447. package/lib-commonjs/utilities/utilities.js +142 -22
  448. package/lib-commonjs/utilities/utilities.js.map +1 -1
  449. package/lib-commonjs/utilities/vbc-utils.js +2 -2
  450. package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
  451. package/package.json +12 -22
@@ -0,0 +1,160 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ gaugeChartClassNames: function() {
13
+ return gaugeChartClassNames;
14
+ },
15
+ useGaugeChartStyles: function() {
16
+ return useGaugeChartStyles;
17
+ }
18
+ });
19
+ const _reacttheme = require("@fluentui/react-theme");
20
+ const _react = require("@griffel/react");
21
+ const gaugeChartClassNames = {
22
+ root: 'fui-gc__root',
23
+ chart: 'fui-gc__chart',
24
+ limits: 'fui-gc__limits',
25
+ chartValue: 'fui-gc__chartValue',
26
+ sublabel: 'fui-gc__sublabel',
27
+ needle: 'fui-gc__needle',
28
+ chartTitle: 'fui-gc__chartTitle',
29
+ segment: 'fui-gc__segment',
30
+ gradientSegment: 'fui-gc__gradientSegment',
31
+ calloutContentRoot: 'fui-gc__calloutContentRoot',
32
+ calloutDateTimeContainer: 'fui-gc__calloutDateTimeContainer',
33
+ calloutContentX: 'fui-gc__calloutContentX',
34
+ calloutBlockContainer: 'fui-gc__calloutBlockContainer',
35
+ shapeStyles: 'fui-gc__shapeStyles',
36
+ calloutlegendText: 'fui-gc__calloutlegendText',
37
+ calloutContentY: 'fui-gc__calloutContentY',
38
+ descriptionMessage: 'fui-gc__descriptionMessage',
39
+ calloutInfoContainer: '',
40
+ legendsContainer: 'fui-gc__legendsContainer',
41
+ chartWrapper: 'fui-gc__chartWrapper'
42
+ };
43
+ const useStyles = (0, _react.makeStyles)({
44
+ root: {
45
+ ..._reacttheme.typographyStyles.body1,
46
+ display: 'flex',
47
+ flexDirection: 'column',
48
+ alignItems: 'center',
49
+ width: '100%',
50
+ height: '100%'
51
+ },
52
+ chart: {
53
+ display: 'block'
54
+ },
55
+ limits: {
56
+ ..._reacttheme.typographyStyles.caption1Strong,
57
+ fill: _reacttheme.tokens.colorNeutralForeground1,
58
+ forcedColorAdjust: 'auto'
59
+ },
60
+ chartValue: {
61
+ fontWeight: _reacttheme.tokens.fontWeightSemibold,
62
+ fill: _reacttheme.tokens.colorNeutralForeground1,
63
+ forcedColorAdjust: 'auto'
64
+ },
65
+ sublabel: {
66
+ ..._reacttheme.typographyStyles.caption1Strong,
67
+ fill: _reacttheme.tokens.colorNeutralForeground1,
68
+ forcedColorAdjust: 'auto'
69
+ },
70
+ needle: {
71
+ fill: _reacttheme.tokens.colorNeutralForeground1,
72
+ stroke: _reacttheme.tokens.colorNeutralBackground1
73
+ },
74
+ chartTitle: {
75
+ ..._reacttheme.typographyStyles.caption1,
76
+ fill: _reacttheme.tokens.colorNeutralForeground1,
77
+ forcedColorAdjust: 'auto'
78
+ },
79
+ segment: {
80
+ outline: 'none',
81
+ stroke: _reacttheme.tokens.colorNeutralStroke1
82
+ },
83
+ gradientSegment: {
84
+ width: '100%',
85
+ height: '100%'
86
+ },
87
+ calloutContentRoot: {
88
+ display: 'grid',
89
+ overflow: 'hidden',
90
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground1,
91
+ backgroundBlendMode: 'normal, luminosity'
92
+ },
93
+ calloutDateTimeContainer: {
94
+ display: 'flex',
95
+ flexDirection: 'row',
96
+ justifyContent: 'space-between'
97
+ },
98
+ calloutContentX: {
99
+ ..._reacttheme.typographyStyles.caption1,
100
+ lineHeight: '16px',
101
+ opacity: '0.85'
102
+ },
103
+ calloutBlockContainer: {
104
+ ..._reacttheme.typographyStyles.body1Strong,
105
+ marginTop: '13px',
106
+ color: _reacttheme.tokens.colorNeutralForeground1,
107
+ paddingLeft: '8px',
108
+ display: 'block',
109
+ forcedColorAdjust: 'none'
110
+ },
111
+ shapeStyles: {
112
+ marginRight: '8px'
113
+ },
114
+ calloutlegendText: {
115
+ ..._reacttheme.typographyStyles.caption1,
116
+ lineHeight: '16px',
117
+ color: _reacttheme.tokens.colorNeutralForeground2,
118
+ forcedColorAdjust: 'auto'
119
+ },
120
+ calloutContentY: {
121
+ ..._reacttheme.typographyStyles.body1Strong,
122
+ lineHeight: '22px',
123
+ forcedColorAdjust: 'auto'
124
+ },
125
+ descriptionMessage: {
126
+ ..._reacttheme.typographyStyles.caption1,
127
+ color: _reacttheme.tokens.colorNeutralForeground1,
128
+ marginTop: '10px',
129
+ paddingTop: '10px',
130
+ borderTop: `1px solid ${_reacttheme.tokens.colorNeutralStroke1}`
131
+ },
132
+ legendsContainer: {
133
+ width: '100%'
134
+ }
135
+ });
136
+ const useGaugeChartStyles = (props)=>{
137
+ var _props_styles, _props_styles1, _props_styles2, _props_styles3, _props_styles4, _props_styles5, _props_styles6, _props_styles7, _props_styles8, _props_styles9, _props_styles10, _props_styles11, _props_styles12, _props_styles13, _props_styles14, _props_styles15, _props_styles16, _props_styles17, _props_styles18;
138
+ const baseStyles = useStyles();
139
+ return {
140
+ root: (0, _react.mergeClasses)(gaugeChartClassNames.root, baseStyles.root, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),
141
+ chart: (0, _react.mergeClasses)(gaugeChartClassNames.chart, baseStyles.chart, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.chart),
142
+ limits: (0, _react.mergeClasses)(gaugeChartClassNames.limits, baseStyles.limits, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.limits),
143
+ chartValue: (0, _react.mergeClasses)(gaugeChartClassNames.chartValue, baseStyles.chartValue, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.chartValue),
144
+ sublabel: (0, _react.mergeClasses)(gaugeChartClassNames.sublabel, baseStyles.sublabel, (_props_styles4 = props.styles) === null || _props_styles4 === void 0 ? void 0 : _props_styles4.sublabel),
145
+ needle: (0, _react.mergeClasses)(gaugeChartClassNames.needle, baseStyles.needle, (_props_styles5 = props.styles) === null || _props_styles5 === void 0 ? void 0 : _props_styles5.needle),
146
+ chartTitle: (0, _react.mergeClasses)(gaugeChartClassNames.chartTitle, baseStyles.chartTitle, (_props_styles6 = props.styles) === null || _props_styles6 === void 0 ? void 0 : _props_styles6.chartTitle),
147
+ segment: (0, _react.mergeClasses)(gaugeChartClassNames.segment, baseStyles.segment, (_props_styles7 = props.styles) === null || _props_styles7 === void 0 ? void 0 : _props_styles7.segment),
148
+ gradientSegment: (0, _react.mergeClasses)(gaugeChartClassNames.gradientSegment, baseStyles.gradientSegment, (_props_styles8 = props.styles) === null || _props_styles8 === void 0 ? void 0 : _props_styles8.gradientSegment),
149
+ calloutContentRoot: (0, _react.mergeClasses)(gaugeChartClassNames.calloutContentRoot, baseStyles.calloutContentRoot, (_props_styles9 = props.styles) === null || _props_styles9 === void 0 ? void 0 : _props_styles9.calloutContentRoot),
150
+ calloutDateTimeContainer: (0, _react.mergeClasses)(gaugeChartClassNames.calloutDateTimeContainer, baseStyles.calloutDateTimeContainer, (_props_styles10 = props.styles) === null || _props_styles10 === void 0 ? void 0 : _props_styles10.calloutDateTimeContainer),
151
+ calloutContentX: (0, _react.mergeClasses)(gaugeChartClassNames.calloutContentX, baseStyles.calloutContentX, (_props_styles11 = props.styles) === null || _props_styles11 === void 0 ? void 0 : _props_styles11.calloutContentX),
152
+ calloutBlockContainer: (0, _react.mergeClasses)(gaugeChartClassNames.calloutBlockContainer, baseStyles.calloutBlockContainer, (_props_styles12 = props.styles) === null || _props_styles12 === void 0 ? void 0 : _props_styles12.calloutBlockContainer),
153
+ shapeStyles: (0, _react.mergeClasses)(gaugeChartClassNames.shapeStyles, baseStyles.shapeStyles, (_props_styles13 = props.styles) === null || _props_styles13 === void 0 ? void 0 : _props_styles13.shapeStyles),
154
+ calloutlegendText: (0, _react.mergeClasses)(gaugeChartClassNames.calloutlegendText, baseStyles.calloutlegendText, (_props_styles14 = props.styles) === null || _props_styles14 === void 0 ? void 0 : _props_styles14.calloutlegendText),
155
+ calloutContentY: (0, _react.mergeClasses)(gaugeChartClassNames.calloutContentY, baseStyles.calloutContentY, (_props_styles15 = props.styles) === null || _props_styles15 === void 0 ? void 0 : _props_styles15.calloutContentY),
156
+ descriptionMessage: (0, _react.mergeClasses)(gaugeChartClassNames.descriptionMessage, baseStyles.descriptionMessage, (_props_styles16 = props.styles) === null || _props_styles16 === void 0 ? void 0 : _props_styles16.descriptionMessage),
157
+ chartWrapper: (0, _react.mergeClasses)(gaugeChartClassNames.chartWrapper, (_props_styles17 = props.styles) === null || _props_styles17 === void 0 ? void 0 : _props_styles17.chartWrapper),
158
+ legendsContainer: (0, _react.mergeClasses)(gaugeChartClassNames.legendsContainer, baseStyles.legendsContainer, (_props_styles18 = props.styles) === null || _props_styles18 === void 0 ? void 0 : _props_styles18.legendsContainer)
159
+ };
160
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/GaugeChart/useGaugeChartStyles.styles.ts"],"sourcesContent":["import { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { GaugeChartProps, GaugeChartStyles } from './GaugeChart.types';\n\nexport const gaugeChartClassNames: SlotClassNames<GaugeChartStyles> = {\n root: 'fui-gc__root',\n chart: 'fui-gc__chart',\n limits: 'fui-gc__limits',\n chartValue: 'fui-gc__chartValue',\n sublabel: 'fui-gc__sublabel',\n needle: 'fui-gc__needle',\n chartTitle: 'fui-gc__chartTitle',\n segment: 'fui-gc__segment',\n gradientSegment: 'fui-gc__gradientSegment',\n calloutContentRoot: 'fui-gc__calloutContentRoot',\n calloutDateTimeContainer: 'fui-gc__calloutDateTimeContainer',\n calloutContentX: 'fui-gc__calloutContentX',\n calloutBlockContainer: 'fui-gc__calloutBlockContainer',\n shapeStyles: 'fui-gc__shapeStyles',\n calloutlegendText: 'fui-gc__calloutlegendText',\n calloutContentY: 'fui-gc__calloutContentY',\n descriptionMessage: 'fui-gc__descriptionMessage',\n calloutInfoContainer: '',\n legendsContainer: 'fui-gc__legendsContainer',\n chartWrapper: 'fui-gc__chartWrapper',\n};\n\nconst useStyles = makeStyles({\n root: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n width: '100%',\n height: '100%',\n },\n chart: {\n display: 'block',\n },\n limits: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto',\n },\n chartValue: {\n fontWeight: tokens.fontWeightSemibold,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto',\n },\n sublabel: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto',\n },\n needle: {\n fill: tokens.colorNeutralForeground1,\n stroke: tokens.colorNeutralBackground1,\n },\n chartTitle: {\n ...typographyStyles.caption1,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto',\n },\n segment: {\n outline: 'none',\n stroke: tokens.colorNeutralStroke1,\n },\n gradientSegment: {\n width: '100%',\n height: '100%',\n },\n calloutContentRoot: {\n display: 'grid',\n overflow: 'hidden',\n backgroundColor: tokens.colorNeutralBackground1,\n backgroundBlendMode: 'normal, luminosity',\n },\n calloutDateTimeContainer: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n calloutContentX: {\n ...typographyStyles.caption1,\n lineHeight: '16px',\n opacity: '0.85',\n },\n calloutBlockContainer: {\n ...typographyStyles.body1Strong,\n marginTop: '13px',\n color: tokens.colorNeutralForeground1,\n paddingLeft: '8px',\n display: 'block',\n forcedColorAdjust: 'none',\n },\n shapeStyles: {\n marginRight: '8px',\n },\n calloutlegendText: {\n ...typographyStyles.caption1,\n lineHeight: '16px',\n color: tokens.colorNeutralForeground2,\n forcedColorAdjust: 'auto',\n },\n calloutContentY: {\n ...typographyStyles.body1Strong,\n lineHeight: '22px',\n forcedColorAdjust: 'auto',\n },\n descriptionMessage: {\n ...typographyStyles.caption1,\n color: tokens.colorNeutralForeground1,\n marginTop: '10px',\n paddingTop: '10px',\n borderTop: `1px solid ${tokens.colorNeutralStroke1}`,\n },\n legendsContainer: {\n width: '100%',\n },\n});\nexport const useGaugeChartStyles = (props: GaugeChartProps): GaugeChartStyles => {\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(gaugeChartClassNames.root, baseStyles.root, props.styles?.root),\n chart: mergeClasses(gaugeChartClassNames.chart, baseStyles.chart, props.styles?.chart),\n limits: mergeClasses(gaugeChartClassNames.limits, baseStyles.limits, props.styles?.limits),\n chartValue: mergeClasses(gaugeChartClassNames.chartValue, baseStyles.chartValue, props.styles?.chartValue),\n sublabel: mergeClasses(gaugeChartClassNames.sublabel, baseStyles.sublabel, props.styles?.sublabel),\n needle: mergeClasses(gaugeChartClassNames.needle, baseStyles.needle, props.styles?.needle),\n chartTitle: mergeClasses(gaugeChartClassNames.chartTitle, baseStyles.chartTitle, props.styles?.chartTitle),\n segment: mergeClasses(gaugeChartClassNames.segment, baseStyles.segment, props.styles?.segment),\n gradientSegment: mergeClasses(\n gaugeChartClassNames.gradientSegment,\n baseStyles.gradientSegment,\n props.styles?.gradientSegment,\n ),\n calloutContentRoot: mergeClasses(\n gaugeChartClassNames.calloutContentRoot,\n baseStyles.calloutContentRoot,\n props.styles?.calloutContentRoot,\n ),\n calloutDateTimeContainer: mergeClasses(\n gaugeChartClassNames.calloutDateTimeContainer,\n baseStyles.calloutDateTimeContainer,\n props.styles?.calloutDateTimeContainer,\n ),\n calloutContentX: mergeClasses(\n gaugeChartClassNames.calloutContentX,\n baseStyles.calloutContentX,\n props.styles?.calloutContentX,\n ),\n calloutBlockContainer: mergeClasses(\n gaugeChartClassNames.calloutBlockContainer,\n baseStyles.calloutBlockContainer,\n props.styles?.calloutBlockContainer,\n ),\n shapeStyles: mergeClasses(gaugeChartClassNames.shapeStyles, baseStyles.shapeStyles, props.styles?.shapeStyles),\n calloutlegendText: mergeClasses(\n gaugeChartClassNames.calloutlegendText,\n baseStyles.calloutlegendText,\n props.styles?.calloutlegendText,\n ),\n calloutContentY: mergeClasses(\n gaugeChartClassNames.calloutContentY,\n baseStyles.calloutContentY,\n props.styles?.calloutContentY,\n ),\n descriptionMessage: mergeClasses(\n gaugeChartClassNames.descriptionMessage,\n baseStyles.descriptionMessage,\n props.styles?.descriptionMessage,\n ),\n chartWrapper: mergeClasses(gaugeChartClassNames.chartWrapper, props.styles?.chartWrapper),\n legendsContainer: mergeClasses(\n gaugeChartClassNames.legendsContainer,\n baseStyles.legendsContainer,\n props.styles?.legendsContainer,\n ),\n };\n};\n"],"names":["tokens","typographyStyles","makeStyles","mergeClasses","gaugeChartClassNames","root","chart","limits","chartValue","sublabel","needle","chartTitle","segment","gradientSegment","calloutContentRoot","calloutDateTimeContainer","calloutContentX","calloutBlockContainer","shapeStyles","calloutlegendText","calloutContentY","descriptionMessage","calloutInfoContainer","legendsContainer","chartWrapper","useStyles","body1","display","flexDirection","alignItems","width","height","caption1Strong","fill","colorNeutralForeground1","forcedColorAdjust","fontWeight","fontWeightSemibold","stroke","colorNeutralBackground1","caption1","outline","colorNeutralStroke1","overflow","backgroundColor","backgroundBlendMode","justifyContent","lineHeight","opacity","body1Strong","marginTop","color","paddingLeft","marginRight","colorNeutralForeground2","paddingTop","borderTop","useGaugeChartSt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,EACjBC,qBAAqBe,iBAAiB,EACtCwC,WAAWxC,iBAAiB,EAAA,CAC5BuC,kBAAAA,MAAME,MAAAA,AAAM,MAAA,QAAZF,oBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,gBAAcvC,iBAAiB;QAEjCC,qBAAiBjB,mBAAAA,EACfC,qBAAqBgB,eAAe,EACpCuC,WAAWvC,eAAe,EAAA,CAC1BsC,kBAAAA,MAAME,MAAAA,AAAM,MAAA,QAAZF,oBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,gBAActC,eAAe;QAE/BC,wBAAoBlB,mBAAAA,EAClBC,qBAAqBiB,kBAAkB,EACvCsC,WAAWtC,kBAAkB,EAAA,CAC7BqC,kBAAAA,MAAME,MAAAA,AAAM,MAAA,QAAZF,oBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,gBAAcrC,kBAAkB;QAElCG,cAAcrB,uBAAAA,EAAaC,qBAAqBoB,YAAY,EAAA,CAAEkC,kBAAAA,MAAME,MAAAA,AAAM,MAAA,QAAZF,oBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,gBAAclC,YAAY;QACxFD,sBAAkBpB,mBAAAA,EAChBC,qBAAqBmB,gBAAgB,EACrCoC,WAAWpC,gBAAgB,EAAA,CAC3BmC,kBAAAA,MAAME,MAAAA,AAAM,MAAA,QAAZF,oBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,gBAAcnC,gBAAgB;IAElC;AACF,EAAE"}
@@ -17,6 +17,7 @@ const _d3scale = require("d3-scale");
17
17
  const _reactutilities = require("@fluentui/react-utilities");
18
18
  const _index = require("../../utilities/index");
19
19
  const _index1 = require("../../index");
20
+ const _imageexportutils = require("../../utilities/image-export-utils");
20
21
  const MIN_DOMAIN_MARGIN = 8;
21
22
  const X1_INNER_PADDING = 0.1;
22
23
  // x1_inner_padding = space_between_bars / (space_between_bars + bar_width)
@@ -51,6 +52,7 @@ const GroupedVerticalBarChart = /*#__PURE__*/ _react.forwardRef((props = {
51
52
  let _xAxisOuterPadding = 0;
52
53
  const cartesianChartRef = _react.useRef(null);
53
54
  const Y_ORIGIN = 0;
55
+ const _legendsRef = _react.useRef(null);
54
56
  const [color, setColor] = _react.useState('');
55
57
  const [dataForHoverCard, setDataForHoverCard] = _react.useState(0);
56
58
  const [selectedLegends, setSelectedLegends] = _react.useState(((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends) || []);
@@ -80,7 +82,11 @@ const GroupedVerticalBarChart = /*#__PURE__*/ _react.forwardRef((props = {
80
82
  var _cartesianChartRef_current;
81
83
  var _cartesianChartRef_current_chartContainer;
82
84
  return {
83
- 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
85
+ 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,
86
+ toImage: (opts)=>{
87
+ var _cartesianChartRef_current, _legendsRef_current;
88
+ return (0, _imageexportutils.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, _useRtl, opts);
89
+ }
84
90
  };
85
91
  }, []);
86
92
  const _adjustProps = ()=>{
@@ -176,7 +182,8 @@ const GroupedVerticalBarChart = /*#__PURE__*/ _react.forwardRef((props = {
176
182
  enabledWrapLines: props.enabledLegendsWrapLines,
177
183
  overflowText: props.legendsOverflowText,
178
184
  ...props.legendProps,
179
- onChange: onLegendSelectionChange
185
+ onChange: onLegendSelectionChange,
186
+ legendRef: _legendsRef
180
187
  });
181
188
  };
182
189
  const points = props.data;
@@ -187,7 +194,7 @@ const GroupedVerticalBarChart = /*#__PURE__*/ _react.forwardRef((props = {
187
194
  const _xAxisType = (0, _index.getTypeOfAxis)(points[0].name, true);
188
195
  const legends = _getLegendData(points);
189
196
  _adjustProps();
190
- // eslint-disable-next-line @typescript-eslint/no-explicit-anyAdd commentMore actions
197
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- Add commentMore actions
191
198
  function _getMinMaxOfYAxis(datasetForBars, yAxisType, useSecondaryYScale) {
192
199
  const values = [];
193
200
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -297,7 +304,13 @@ const GroupedVerticalBarChart = /*#__PURE__*/ _react.forwardRef((props = {
297
304
  _calloutAnchorPoint = null;
298
305
  setPopoverOpen(false);
299
306
  };
300
- const onBarFocus = (pointData, groupData, refArrayIndexNumber)=>{
307
+ const onBarFocus = (event, pointData, groupData, refArrayIndexNumber)=>{
308
+ let x = 0;
309
+ let y = 0;
310
+ const targetRect = event.target.getBoundingClientRect();
311
+ x = targetRect.left + targetRect.width / 2;
312
+ y = targetRect.top + targetRect.height / 2;
313
+ updatePosition(x, y);
301
314
  _refArray.forEach((obj, index)=>{
302
315
  if (obj.index === pointData.legend && refArrayIndexNumber === index) {
303
316
  setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(pointData.legend));
@@ -326,58 +339,59 @@ const GroupedVerticalBarChart = /*#__PURE__*/ _react.forwardRef((props = {
326
339
  const refIndexNumber = singleSet.indexNum * tempDataSet.length + index;
327
340
  const pointData = singleSet[datasetKey];
328
341
  const yBarScale = pointData.useSecondaryYScale && yScaleSecondary ? yScaleSecondary : yScalePrimary;
329
- // To align the centers of the generated bandwidth and the calculated one when they differ,
330
- // use the following addend.
331
- const xPoint = xScale1(datasetKey) + (xScale1.bandwidth() - _barWidth) / 2;
332
- const startColor = pointData.color ? pointData.color : (0, _index.getNextColor)(index, 0);
333
- const yBaseline = yBarScale(Y_ORIGIN);
334
- let yPositiveStart = yBaseline;
335
- let yNegativeStart = yBaseline;
336
- let yPoint = Y_ORIGIN;
337
- const barGap = VERTICAL_BAR_GAP / 2 * (index > 0 ? 2 : 0);
338
- const height = Math.max(yBarScale(Y_ORIGIN) - yBarScale(Math.abs(pointData.data)), MIN_BAR_HEIGHT);
339
- if (pointData.data >= Y_ORIGIN) {
340
- yPositiveStart -= height + barGap;
341
- yPoint = yPositiveStart;
342
- } else {
343
- yPoint = yNegativeStart + barGap;
344
- yNegativeStart = yPoint + height;
345
- }
346
- // Not rendering data with 0.
347
- pointData.data && singleGroup.push(/*#__PURE__*/ _react.createElement(_react.Fragment, {
348
- key: `${singleSet.indexNum}-${index}`
349
- }, /*#__PURE__*/ _react.createElement("rect", {
350
- className: classes.opacityChangeOnHover,
351
- height: height,
352
- width: _barWidth,
353
- x: xPoint,
354
- y: yPoint,
355
- "data-is-focusable": !props.hideTooltip && (_legendHighlighted(pointData.legend) || _noLegendHighlighted()),
356
- opacity: _getOpacity(pointData.legend),
357
- ref: (e)=>{
358
- _refCallback(e, pointData.legend, refIndexNumber);
359
- },
360
- fill: startColor,
361
- rx: 0,
362
- onMouseOver: onBarHover.bind(null, pointData, singleSet),
363
- onMouseMove: onBarHover.bind(null, pointData, singleSet),
364
- onMouseOut: _onBarLeave,
365
- onFocus: onBarFocus.bind(null, pointData, singleSet, refIndexNumber),
366
- onBlur: _onBarLeave,
367
- onClick: pointData.onClick,
368
- "aria-label": getAriaLabel(pointData, singleSet.xAxisPoint),
369
- tabIndex: _legendHighlighted(pointData.legend) || _noLegendHighlighted() ? 0 : undefined,
370
- role: "img"
371
- })));
372
- if (pointData.data && !props.hideLabels && _barWidth >= 16 && (_legendHighlighted(pointData.legend) || _noLegendHighlighted())) {
373
- barLabelsForGroup.push(/*#__PURE__*/ _react.createElement("text", {
374
- key: `${singleSet.indexNum}-${index}`,
375
- x: xPoint + _barWidth / 2,
376
- y: pointData.data >= Y_ORIGIN ? yPositiveStart - 6 : yNegativeStart + 12,
377
- textAnchor: "middle",
378
- className: classes.barLabel,
379
- "aria-hidden": true
380
- }, typeof props.yAxisTickFormat === 'function' ? props.yAxisTickFormat(pointData.data) : (0, _index.formatScientificLimitWidth)(pointData.data)));
342
+ if (pointData) {
343
+ // To align the centers of the generated bandwidth and the calculated one when they differ,
344
+ // use the following addend.
345
+ const xPoint = xScale1(datasetKey) + (xScale1.bandwidth() - _barWidth) / 2;
346
+ const startColor = pointData.color ? pointData.color : (0, _index.getNextColor)(index, 0);
347
+ const yBaseline = yBarScale(Y_ORIGIN);
348
+ let yPositiveStart = yBaseline;
349
+ let yNegativeStart = yBaseline;
350
+ let yPoint = Y_ORIGIN;
351
+ const barGap = VERTICAL_BAR_GAP / 2 * (index > 0 ? 2 : 0);
352
+ const height = Math.max(yBarScale(Y_ORIGIN) - yBarScale(Math.abs(pointData.data)), MIN_BAR_HEIGHT);
353
+ if (pointData.data >= Y_ORIGIN) {
354
+ yPositiveStart -= height + barGap;
355
+ yPoint = yPositiveStart;
356
+ } else {
357
+ yPoint = yNegativeStart + barGap;
358
+ yNegativeStart = yPoint + height;
359
+ }
360
+ // Not rendering data with 0.
361
+ pointData.data && singleGroup.push(/*#__PURE__*/ _react.createElement(_react.Fragment, {
362
+ key: `${singleSet.indexNum}-${index}`
363
+ }, /*#__PURE__*/ _react.createElement("rect", {
364
+ className: classes.opacityChangeOnHover,
365
+ height: height,
366
+ width: _barWidth,
367
+ x: xPoint,
368
+ y: yPoint,
369
+ opacity: _getOpacity(pointData.legend),
370
+ ref: (e)=>{
371
+ _refCallback(e, pointData.legend, refIndexNumber);
372
+ },
373
+ fill: startColor,
374
+ rx: 0,
375
+ onMouseOver: (event)=>onBarHover(pointData, singleSet, event),
376
+ onMouseMove: (event)=>onBarHover(pointData, singleSet, event),
377
+ onMouseOut: _onBarLeave,
378
+ onFocus: (event)=>onBarFocus(event, pointData, singleSet, refIndexNumber),
379
+ onBlur: _onBarLeave,
380
+ onClick: pointData.onClick,
381
+ "aria-label": getAriaLabel(pointData, singleSet.xAxisPoint),
382
+ tabIndex: _legendHighlighted(pointData.legend) || _noLegendHighlighted() ? 0 : undefined,
383
+ role: "img"
384
+ })));
385
+ if (pointData.data && !props.hideLabels && _barWidth >= 16 && (_legendHighlighted(pointData.legend) || _noLegendHighlighted())) {
386
+ barLabelsForGroup.push(/*#__PURE__*/ _react.createElement("text", {
387
+ key: `${singleSet.indexNum}-${index}`,
388
+ x: xPoint + _barWidth / 2,
389
+ y: pointData.data >= Y_ORIGIN ? yPositiveStart - 6 : yNegativeStart + 12,
390
+ textAnchor: "middle",
391
+ className: classes.barLabel,
392
+ "aria-hidden": true
393
+ }, typeof props.yAxisTickFormat === 'function' ? props.yAxisTickFormat(pointData.data) : (0, _index.formatScientificLimitWidth)(pointData.data)));
394
+ }
381
395
  }
382
396
  });
383
397
  // Used to display tooltip at x axis labels.
@@ -489,10 +503,13 @@ const GroupedVerticalBarChart = /*#__PURE__*/ _react.forwardRef((props = {
489
503
  const groupWidth = (keys.length + (keys.length - 1) * BAR_GAP_RATE) * barWidth;
490
504
  let reqWidth = (xAxisLabels.length + (xAxisLabels.length - 1) * groupGapRate) * groupWidth;
491
505
  const margin1 = (totalWidth - reqWidth) / 2;
492
- // Calculate the remaining width after accounting for the space required to render x-axis labels
493
- const step = (0, _index.calculateLongestLabelWidth)(xAxisLabels) + 20;
494
- reqWidth = (xAxisLabels.length - _xAxisInnerPadding) * step;
495
- const margin2 = (totalWidth - reqWidth) / 2;
506
+ let margin2 = Number.POSITIVE_INFINITY;
507
+ if (!props.hideTickOverlap) {
508
+ // Calculate the remaining width after accounting for the space required to render x-axis labels
509
+ const step = (0, _index.calculateLongestLabelWidth)(_xAxisLabels) + 20;
510
+ reqWidth = (_xAxisLabels.length - _xAxisInnerPadding) * step;
511
+ margin2 = (totalWidth - reqWidth) / 2;
512
+ }
496
513
  _domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));
497
514
  }
498
515
  }