@fluentui/react-charts 9.3.21 → 9.74.3-experimental.esm.20260709-49ee7a20cf.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 (767) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/package.json +15 -17
  3. package/dist/index.d.ts +0 -5724
  4. package/lib/AnnotationOnlyChart.js +0 -1
  5. package/lib/AnnotationOnlyChart.js.map +0 -1
  6. package/lib/AreaChart.js +0 -1
  7. package/lib/AreaChart.js.map +0 -1
  8. package/lib/CartesianChart.js +0 -1
  9. package/lib/CartesianChart.js.map +0 -1
  10. package/lib/ChartTable.js +0 -1
  11. package/lib/ChartTable.js.map +0 -1
  12. package/lib/DeclarativeChart.js +0 -1
  13. package/lib/DeclarativeChart.js.map +0 -1
  14. package/lib/DonutChart.js +0 -1
  15. package/lib/DonutChart.js.map +0 -1
  16. package/lib/FunnelChart.js +0 -1
  17. package/lib/FunnelChart.js.map +0 -1
  18. package/lib/GanttChart.js +0 -1
  19. package/lib/GanttChart.js.map +0 -1
  20. package/lib/GaugeChart.js +0 -1
  21. package/lib/GaugeChart.js.map +0 -1
  22. package/lib/GroupedVerticalBarChart.js +0 -1
  23. package/lib/GroupedVerticalBarChart.js.map +0 -1
  24. package/lib/HeatMapChart.js +0 -1
  25. package/lib/HeatMapChart.js.map +0 -1
  26. package/lib/HorizontalBarChart.js +0 -1
  27. package/lib/HorizontalBarChart.js.map +0 -1
  28. package/lib/HorizontalBarChartWithAxis.js +0 -1
  29. package/lib/HorizontalBarChartWithAxis.js.map +0 -1
  30. package/lib/Legends.js +0 -1
  31. package/lib/Legends.js.map +0 -1
  32. package/lib/LineChart.js +0 -1
  33. package/lib/LineChart.js.map +0 -1
  34. package/lib/PolarChart.js +0 -1
  35. package/lib/PolarChart.js.map +0 -1
  36. package/lib/Popover.js +0 -1
  37. package/lib/Popover.js.map +0 -1
  38. package/lib/ResponsiveContainer.js +0 -1
  39. package/lib/ResponsiveContainer.js.map +0 -1
  40. package/lib/SankeyChart.js +0 -1
  41. package/lib/SankeyChart.js.map +0 -1
  42. package/lib/ScatterChart.js +0 -1
  43. package/lib/ScatterChart.js.map +0 -1
  44. package/lib/Sparkline.js +0 -1
  45. package/lib/Sparkline.js.map +0 -1
  46. package/lib/VegaDeclarativeChart.js +0 -1
  47. package/lib/VegaDeclarativeChart.js.map +0 -1
  48. package/lib/VerticalBarChart.js +0 -1
  49. package/lib/VerticalBarChart.js.map +0 -1
  50. package/lib/VerticalStackedBarChart.js +0 -1
  51. package/lib/VerticalStackedBarChart.js.map +0 -1
  52. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +0 -196
  53. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +0 -1
  54. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +0 -3
  55. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +0 -1
  56. package/lib/components/AnnotationOnlyChart/index.js +0 -2
  57. package/lib/components/AnnotationOnlyChart/index.js.map +0 -1
  58. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +0 -33
  59. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +0 -1
  60. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +0 -24
  61. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +0 -1
  62. package/lib/components/AreaChart/AreaChart.js +0 -932
  63. package/lib/components/AreaChart/AreaChart.js.map +0 -1
  64. package/lib/components/AreaChart/AreaChart.types.js +0 -4
  65. package/lib/components/AreaChart/AreaChart.types.js.map +0 -1
  66. package/lib/components/AreaChart/index.js +0 -3
  67. package/lib/components/AreaChart/index.js.map +0 -1
  68. package/lib/components/AreaChart/useAreaChartStyles.styles.js +0 -63
  69. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +0 -1
  70. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +0 -33
  71. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +0 -1
  72. package/lib/components/ChartTable/ChartTable.js +0 -160
  73. package/lib/components/ChartTable/ChartTable.js.map +0 -1
  74. package/lib/components/ChartTable/ChartTable.types.js +0 -4
  75. package/lib/components/ChartTable/ChartTable.types.js.map +0 -1
  76. package/lib/components/ChartTable/index.js +0 -3
  77. package/lib/components/ChartTable/index.js.map +0 -1
  78. package/lib/components/ChartTable/useChartTableStyles.styles.js +0 -136
  79. package/lib/components/ChartTable/useChartTableStyles.styles.js.map +0 -1
  80. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +0 -68
  81. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +0 -1
  82. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +0 -659
  83. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +0 -1
  84. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +0 -1
  85. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +0 -1
  86. package/lib/components/CommonComponents/Annotations/index.js +0 -2
  87. package/lib/components/CommonComponents/Annotations/index.js.map +0 -1
  88. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +0 -223
  89. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +0 -1
  90. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +0 -139
  91. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +0 -1
  92. package/lib/components/CommonComponents/CartesianChart.js +0 -665
  93. package/lib/components/CommonComponents/CartesianChart.js.map +0 -1
  94. package/lib/components/CommonComponents/CartesianChart.types.js +0 -2
  95. package/lib/components/CommonComponents/CartesianChart.types.js.map +0 -1
  96. package/lib/components/CommonComponents/ChartPopover.js +0 -197
  97. package/lib/components/CommonComponents/ChartPopover.js.map +0 -1
  98. package/lib/components/CommonComponents/ChartPopover.types.js +0 -1
  99. package/lib/components/CommonComponents/ChartPopover.types.js.map +0 -1
  100. package/lib/components/CommonComponents/index.js +0 -6
  101. package/lib/components/CommonComponents/index.js.map +0 -1
  102. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +0 -189
  103. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +0 -1
  104. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +0 -131
  105. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +0 -1
  106. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +0 -171
  107. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +0 -1
  108. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -127
  109. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +0 -1
  110. package/lib/components/DeclarativeChart/DeclarativeChart.js +0 -397
  111. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +0 -1
  112. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +0 -163
  113. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +0 -1
  114. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +0 -3490
  115. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +0 -1
  116. package/lib/components/DeclarativeChart/index.js +0 -1
  117. package/lib/components/DeclarativeChart/index.js.map +0 -1
  118. package/lib/components/DonutChart/Arc/Arc.js +0 -118
  119. package/lib/components/DonutChart/Arc/Arc.js.map +0 -1
  120. package/lib/components/DonutChart/Arc/Arc.types.js +0 -1
  121. package/lib/components/DonutChart/Arc/Arc.types.js.map +0 -1
  122. package/lib/components/DonutChart/Arc/index.js +0 -2
  123. package/lib/components/DonutChart/Arc/index.js.map +0 -1
  124. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +0 -80
  125. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +0 -1
  126. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +0 -49
  127. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +0 -1
  128. package/lib/components/DonutChart/DonutChart.js +0 -349
  129. package/lib/components/DonutChart/DonutChart.js.map +0 -1
  130. package/lib/components/DonutChart/DonutChart.types.js +0 -4
  131. package/lib/components/DonutChart/DonutChart.types.js.map +0 -1
  132. package/lib/components/DonutChart/Pie/Pie.js +0 -72
  133. package/lib/components/DonutChart/Pie/Pie.js.map +0 -1
  134. package/lib/components/DonutChart/Pie/Pie.types.js +0 -1
  135. package/lib/components/DonutChart/Pie/Pie.types.js.map +0 -1
  136. package/lib/components/DonutChart/Pie/index.js +0 -2
  137. package/lib/components/DonutChart/Pie/index.js.map +0 -1
  138. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +0 -41
  139. package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +0 -1
  140. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js +0 -30
  141. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +0 -1
  142. package/lib/components/DonutChart/index.js +0 -3
  143. package/lib/components/DonutChart/index.js.map +0 -1
  144. package/lib/components/DonutChart/useDonutChartStyles.styles.js +0 -98
  145. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +0 -1
  146. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +0 -62
  147. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +0 -1
  148. package/lib/components/FunnelChart/FunnelChart.js +0 -401
  149. package/lib/components/FunnelChart/FunnelChart.js.map +0 -1
  150. package/lib/components/FunnelChart/FunnelChart.types.js +0 -4
  151. package/lib/components/FunnelChart/FunnelChart.types.js.map +0 -1
  152. package/lib/components/FunnelChart/funnelGeometry.js +0 -219
  153. package/lib/components/FunnelChart/funnelGeometry.js.map +0 -1
  154. package/lib/components/FunnelChart/index.js +0 -2
  155. package/lib/components/FunnelChart/index.js.map +0 -1
  156. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +0 -83
  157. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +0 -1
  158. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +0 -65
  159. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +0 -1
  160. package/lib/components/GanttChart/GanttChart.js +0 -535
  161. package/lib/components/GanttChart/GanttChart.js.map +0 -1
  162. package/lib/components/GanttChart/GanttChart.types.js +0 -4
  163. package/lib/components/GanttChart/GanttChart.types.js.map +0 -1
  164. package/lib/components/GanttChart/index.js +0 -2
  165. package/lib/components/GanttChart/index.js.map +0 -1
  166. package/lib/components/GanttChart/useGanttChartStyles.styles.js +0 -27
  167. package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +0 -1
  168. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +0 -26
  169. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +0 -1
  170. package/lib/components/GaugeChart/GaugeChart.js +0 -568
  171. package/lib/components/GaugeChart/GaugeChart.js.map +0 -1
  172. package/lib/components/GaugeChart/GaugeChart.types.js +0 -4
  173. package/lib/components/GaugeChart/GaugeChart.types.js.map +0 -1
  174. package/lib/components/GaugeChart/index.js +0 -3
  175. package/lib/components/GaugeChart/index.js.map +0 -1
  176. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +0 -197
  177. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +0 -1
  178. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +0 -149
  179. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +0 -1
  180. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +0 -813
  181. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +0 -1
  182. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +0 -4
  183. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +0 -1
  184. package/lib/components/GroupedVerticalBarChart/index.js +0 -3
  185. package/lib/components/GroupedVerticalBarChart/index.js.map +0 -1
  186. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +0 -77
  187. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +0 -1
  188. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +0 -40
  189. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +0 -1
  190. package/lib/components/HeatMapChart/HeatMapChart.js +0 -677
  191. package/lib/components/HeatMapChart/HeatMapChart.js.map +0 -1
  192. package/lib/components/HeatMapChart/HeatMapChart.types.js +0 -4
  193. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +0 -1
  194. package/lib/components/HeatMapChart/index.js +0 -3
  195. package/lib/components/HeatMapChart/index.js.map +0 -1
  196. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +0 -48
  197. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +0 -1
  198. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +0 -42
  199. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +0 -1
  200. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +0 -411
  201. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +0 -1
  202. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +0 -7
  203. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +0 -1
  204. package/lib/components/HorizontalBarChart/index.js +0 -3
  205. package/lib/components/HorizontalBarChart/index.js.map +0 -1
  206. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +0 -175
  207. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +0 -1
  208. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +0 -125
  209. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +0 -1
  210. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +0 -720
  211. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +0 -1
  212. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +0 -4
  213. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +0 -1
  214. package/lib/components/HorizontalBarChartWithAxis/index.js +0 -3
  215. package/lib/components/HorizontalBarChartWithAxis/index.js.map +0 -1
  216. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +0 -62
  217. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +0 -1
  218. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +0 -54
  219. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +0 -1
  220. package/lib/components/Legends/Legends.js +0 -323
  221. package/lib/components/Legends/Legends.js.map +0 -1
  222. package/lib/components/Legends/Legends.types.js +0 -3
  223. package/lib/components/Legends/Legends.types.js.map +0 -1
  224. package/lib/components/Legends/OverflowMenu.js +0 -33
  225. package/lib/components/Legends/OverflowMenu.js.map +0 -1
  226. package/lib/components/Legends/index.js +0 -3
  227. package/lib/components/Legends/index.js.map +0 -1
  228. package/lib/components/Legends/shape.js +0 -36
  229. package/lib/components/Legends/shape.js.map +0 -1
  230. package/lib/components/Legends/useLegendsStyles.styles.js +0 -262
  231. package/lib/components/Legends/useLegendsStyles.styles.js.map +0 -1
  232. package/lib/components/Legends/useLegendsStyles.styles.raw.js +0 -142
  233. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +0 -1
  234. package/lib/components/LineChart/LineChart.js +0 -1332
  235. package/lib/components/LineChart/LineChart.js.map +0 -1
  236. package/lib/components/LineChart/LineChart.types.js +0 -3
  237. package/lib/components/LineChart/LineChart.types.js.map +0 -1
  238. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +0 -118
  239. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +0 -1
  240. package/lib/components/LineChart/eventAnnotation/LabelLink.js +0 -59
  241. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +0 -1
  242. package/lib/components/LineChart/eventAnnotation/Textbox.js +0 -42
  243. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +0 -1
  244. package/lib/components/LineChart/index.js +0 -4
  245. package/lib/components/LineChart/index.js.map +0 -1
  246. package/lib/components/LineChart/useLineChartStyles.styles.js +0 -93
  247. package/lib/components/LineChart/useLineChartStyles.styles.js.map +0 -1
  248. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +0 -50
  249. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +0 -1
  250. package/lib/components/PolarChart/PolarChart.js +0 -577
  251. package/lib/components/PolarChart/PolarChart.js.map +0 -1
  252. package/lib/components/PolarChart/PolarChart.types.js +0 -4
  253. package/lib/components/PolarChart/PolarChart.types.js.map +0 -1
  254. package/lib/components/PolarChart/PolarChart.utils.js +0 -174
  255. package/lib/components/PolarChart/PolarChart.utils.js.map +0 -1
  256. package/lib/components/PolarChart/index.js +0 -2
  257. package/lib/components/PolarChart/index.js.map +0 -1
  258. package/lib/components/PolarChart/usePolarChartStyles.styles.js +0 -72
  259. package/lib/components/PolarChart/usePolarChartStyles.styles.js.map +0 -1
  260. package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js +0 -61
  261. package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js.map +0 -1
  262. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +0 -99
  263. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +0 -1
  264. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js +0 -4
  265. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +0 -1
  266. package/lib/components/ResponsiveContainer/index.js +0 -3
  267. package/lib/components/ResponsiveContainer/index.js.map +0 -1
  268. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +0 -30
  269. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +0 -1
  270. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +0 -29
  271. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +0 -1
  272. package/lib/components/ResponsiveContainer/withResponsiveContainer.js +0 -20
  273. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +0 -1
  274. package/lib/components/SankeyChart/SankeyChart.js +0 -1026
  275. package/lib/components/SankeyChart/SankeyChart.js.map +0 -1
  276. package/lib/components/SankeyChart/SankeyChart.types.js +0 -3
  277. package/lib/components/SankeyChart/SankeyChart.types.js.map +0 -1
  278. package/lib/components/SankeyChart/index.js +0 -3
  279. package/lib/components/SankeyChart/index.js.map +0 -1
  280. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +0 -123
  281. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +0 -1
  282. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +0 -79
  283. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +0 -1
  284. package/lib/components/ScatterChart/ScatterChart.js +0 -544
  285. package/lib/components/ScatterChart/ScatterChart.js.map +0 -1
  286. package/lib/components/ScatterChart/ScatterChart.types.js +0 -4
  287. package/lib/components/ScatterChart/ScatterChart.types.js.map +0 -1
  288. package/lib/components/ScatterChart/index.js +0 -3
  289. package/lib/components/ScatterChart/index.js.map +0 -1
  290. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +0 -84
  291. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +0 -1
  292. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +0 -41
  293. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +0 -1
  294. package/lib/components/Sparkline/Sparkline.js +0 -123
  295. package/lib/components/Sparkline/Sparkline.js.map +0 -1
  296. package/lib/components/Sparkline/Sparkline.types.js +0 -4
  297. package/lib/components/Sparkline/Sparkline.types.js.map +0 -1
  298. package/lib/components/Sparkline/index.js +0 -3
  299. package/lib/components/Sparkline/index.js.map +0 -1
  300. package/lib/components/Sparkline/useSparklineStyles.styles.js +0 -40
  301. package/lib/components/Sparkline/useSparklineStyles.styles.js.map +0 -1
  302. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js +0 -31
  303. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js.map +0 -1
  304. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js +0 -405
  305. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js.map +0 -1
  306. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js +0 -20
  307. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js.map +0 -1
  308. package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js +0 -415
  309. package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js.map +0 -1
  310. package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js +0 -537
  311. package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js.map +0 -1
  312. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +0 -3279
  313. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +0 -1
  314. package/lib/components/VegaDeclarativeChart/VegaLiteTypes.js +0 -28
  315. package/lib/components/VegaDeclarativeChart/VegaLiteTypes.js.map +0 -1
  316. package/lib/components/VegaDeclarativeChart/index.js +0 -1
  317. package/lib/components/VegaDeclarativeChart/index.js.map +0 -1
  318. package/lib/components/VerticalBarChart/VerticalBarChart.js +0 -930
  319. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +0 -1
  320. package/lib/components/VerticalBarChart/VerticalBarChart.types.js +0 -4
  321. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +0 -1
  322. package/lib/components/VerticalBarChart/index.js +0 -3
  323. package/lib/components/VerticalBarChart/index.js.map +0 -1
  324. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +0 -86
  325. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +0 -1
  326. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +0 -48
  327. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +0 -1
  328. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +0 -1077
  329. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +0 -1
  330. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +0 -4
  331. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +0 -1
  332. package/lib/components/VerticalStackedBarChart/index.js +0 -3
  333. package/lib/components/VerticalStackedBarChart/index.js.map +0 -1
  334. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +0 -74
  335. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +0 -1
  336. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +0 -38
  337. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +0 -1
  338. package/lib/index.js +0 -26
  339. package/lib/index.js.map +0 -1
  340. package/lib/types/ChartAnnotation.js +0 -1
  341. package/lib/types/ChartAnnotation.js.map +0 -1
  342. package/lib/types/DataPoint.js +0 -3
  343. package/lib/types/DataPoint.js.map +0 -1
  344. package/lib/types/EventAnnotation.js +0 -1
  345. package/lib/types/EventAnnotation.js.map +0 -1
  346. package/lib/types/LegendDataItem.js +0 -1
  347. package/lib/types/LegendDataItem.js.map +0 -1
  348. package/lib/types/index.js +0 -3
  349. package/lib/types/index.js.map +0 -1
  350. package/lib/utilities/ChartTitle.js +0 -45
  351. package/lib/utilities/ChartTitle.js.map +0 -1
  352. package/lib/utilities/Common.styles.js +0 -117
  353. package/lib/utilities/Common.styles.js.map +0 -1
  354. package/lib/utilities/Common.styles.raw.js +0 -115
  355. package/lib/utilities/Common.styles.raw.js.map +0 -1
  356. package/lib/utilities/FocusableTooltipText.js +0 -65
  357. package/lib/utilities/FocusableTooltipText.js.map +0 -1
  358. package/lib/utilities/KeyCodes.js +0 -11
  359. package/lib/utilities/KeyCodes.js.map +0 -1
  360. package/lib/utilities/SVGTooltipText.js +0 -179
  361. package/lib/utilities/SVGTooltipText.js.map +0 -1
  362. package/lib/utilities/async-utils.js +0 -380
  363. package/lib/utilities/async-utils.js.map +0 -1
  364. package/lib/utilities/colors.js +0 -281
  365. package/lib/utilities/colors.js.map +0 -1
  366. package/lib/utilities/getWindow.js +0 -25
  367. package/lib/utilities/getWindow.js.map +0 -1
  368. package/lib/utilities/hooks.js +0 -34
  369. package/lib/utilities/hooks.js.map +0 -1
  370. package/lib/utilities/image-export-utils.js +0 -405
  371. package/lib/utilities/image-export-utils.js.map +0 -1
  372. package/lib/utilities/index.js +0 -5
  373. package/lib/utilities/index.js.map +0 -1
  374. package/lib/utilities/overflow-utils.js +0 -27
  375. package/lib/utilities/overflow-utils.js.map +0 -1
  376. package/lib/utilities/scatterpolar-utils.js +0 -52
  377. package/lib/utilities/scatterpolar-utils.js.map +0 -1
  378. package/lib/utilities/string.js +0 -32
  379. package/lib/utilities/string.js.map +0 -1
  380. package/lib/utilities/test-data.js +0 -565
  381. package/lib/utilities/test-data.js.map +0 -1
  382. package/lib/utilities/utilities.js +0 -1990
  383. package/lib/utilities/utilities.js.map +0 -1
  384. package/lib/utilities/vbc-utils.js +0 -51
  385. package/lib/utilities/vbc-utils.js.map +0 -1
  386. package/lib-commonjs/AnnotationOnlyChart.js +0 -6
  387. package/lib-commonjs/AnnotationOnlyChart.js.map +0 -1
  388. package/lib-commonjs/AreaChart.js +0 -6
  389. package/lib-commonjs/AreaChart.js.map +0 -1
  390. package/lib-commonjs/CartesianChart.js +0 -6
  391. package/lib-commonjs/CartesianChart.js.map +0 -1
  392. package/lib-commonjs/ChartTable.js +0 -6
  393. package/lib-commonjs/ChartTable.js.map +0 -1
  394. package/lib-commonjs/DeclarativeChart.js +0 -6
  395. package/lib-commonjs/DeclarativeChart.js.map +0 -1
  396. package/lib-commonjs/DonutChart.js +0 -6
  397. package/lib-commonjs/DonutChart.js.map +0 -1
  398. package/lib-commonjs/FunnelChart.js +0 -6
  399. package/lib-commonjs/FunnelChart.js.map +0 -1
  400. package/lib-commonjs/GanttChart.js +0 -6
  401. package/lib-commonjs/GanttChart.js.map +0 -1
  402. package/lib-commonjs/GaugeChart.js +0 -6
  403. package/lib-commonjs/GaugeChart.js.map +0 -1
  404. package/lib-commonjs/GroupedVerticalBarChart.js +0 -6
  405. package/lib-commonjs/GroupedVerticalBarChart.js.map +0 -1
  406. package/lib-commonjs/HeatMapChart.js +0 -6
  407. package/lib-commonjs/HeatMapChart.js.map +0 -1
  408. package/lib-commonjs/HorizontalBarChart.js +0 -6
  409. package/lib-commonjs/HorizontalBarChart.js.map +0 -1
  410. package/lib-commonjs/HorizontalBarChartWithAxis.js +0 -6
  411. package/lib-commonjs/HorizontalBarChartWithAxis.js.map +0 -1
  412. package/lib-commonjs/Legends.js +0 -6
  413. package/lib-commonjs/Legends.js.map +0 -1
  414. package/lib-commonjs/LineChart.js +0 -6
  415. package/lib-commonjs/LineChart.js.map +0 -1
  416. package/lib-commonjs/PolarChart.js +0 -6
  417. package/lib-commonjs/PolarChart.js.map +0 -1
  418. package/lib-commonjs/Popover.js +0 -6
  419. package/lib-commonjs/Popover.js.map +0 -1
  420. package/lib-commonjs/ResponsiveContainer.js +0 -6
  421. package/lib-commonjs/ResponsiveContainer.js.map +0 -1
  422. package/lib-commonjs/SankeyChart.js +0 -6
  423. package/lib-commonjs/SankeyChart.js.map +0 -1
  424. package/lib-commonjs/ScatterChart.js +0 -6
  425. package/lib-commonjs/ScatterChart.js.map +0 -1
  426. package/lib-commonjs/Sparkline.js +0 -6
  427. package/lib-commonjs/Sparkline.js.map +0 -1
  428. package/lib-commonjs/VegaDeclarativeChart.js +0 -6
  429. package/lib-commonjs/VegaDeclarativeChart.js.map +0 -1
  430. package/lib-commonjs/VerticalBarChart.js +0 -6
  431. package/lib-commonjs/VerticalBarChart.js.map +0 -1
  432. package/lib-commonjs/VerticalStackedBarChart.js +0 -6
  433. package/lib-commonjs/VerticalStackedBarChart.js.map +0 -1
  434. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +0 -207
  435. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +0 -1
  436. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +0 -6
  437. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +0 -1
  438. package/lib-commonjs/components/AnnotationOnlyChart/index.js +0 -7
  439. package/lib-commonjs/components/AnnotationOnlyChart/index.js.map +0 -1
  440. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +0 -57
  441. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +0 -1
  442. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +0 -34
  443. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +0 -1
  444. package/lib-commonjs/components/AreaChart/AreaChart.js +0 -938
  445. package/lib-commonjs/components/AreaChart/AreaChart.js.map +0 -1
  446. package/lib-commonjs/components/AreaChart/AreaChart.types.js +0 -7
  447. package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +0 -1
  448. package/lib-commonjs/components/AreaChart/index.js +0 -8
  449. package/lib-commonjs/components/AreaChart/index.js.map +0 -1
  450. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +0 -96
  451. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +0 -1
  452. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +0 -49
  453. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +0 -1
  454. package/lib-commonjs/components/ChartTable/ChartTable.js +0 -171
  455. package/lib-commonjs/components/ChartTable/ChartTable.js.map +0 -1
  456. package/lib-commonjs/components/ChartTable/ChartTable.types.js +0 -7
  457. package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +0 -1
  458. package/lib-commonjs/components/ChartTable/index.js +0 -8
  459. package/lib-commonjs/components/ChartTable/index.js.map +0 -1
  460. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +0 -200
  461. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +0 -1
  462. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +0 -82
  463. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +0 -1
  464. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +0 -670
  465. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +0 -1
  466. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +0 -4
  467. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +0 -1
  468. package/lib-commonjs/components/CommonComponents/Annotations/index.js +0 -7
  469. package/lib-commonjs/components/CommonComponents/Annotations/index.js.map +0 -1
  470. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +0 -325
  471. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +0 -1
  472. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +0 -174
  473. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +0 -1
  474. package/lib-commonjs/components/CommonComponents/CartesianChart.js +0 -673
  475. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +0 -1
  476. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js +0 -5
  477. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +0 -1
  478. package/lib-commonjs/components/CommonComponents/ChartPopover.js +0 -207
  479. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +0 -1
  480. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js +0 -4
  481. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +0 -1
  482. package/lib-commonjs/components/CommonComponents/index.js +0 -11
  483. package/lib-commonjs/components/CommonComponents/index.js.map +0 -1
  484. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +0 -268
  485. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +0 -1
  486. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +0 -144
  487. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +0 -1
  488. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +0 -238
  489. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +0 -1
  490. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -141
  491. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +0 -1
  492. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +0 -400
  493. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +0 -1
  494. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +0 -195
  495. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +0 -1
  496. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +0 -3577
  497. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +0 -1
  498. package/lib-commonjs/components/DeclarativeChart/index.js +0 -6
  499. package/lib-commonjs/components/DeclarativeChart/index.js.map +0 -1
  500. package/lib-commonjs/components/DonutChart/Arc/Arc.js +0 -125
  501. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +0 -1
  502. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js +0 -4
  503. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +0 -1
  504. package/lib-commonjs/components/DonutChart/Arc/index.js +0 -7
  505. package/lib-commonjs/components/DonutChart/Arc/index.js.map +0 -1
  506. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +0 -110
  507. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +0 -1
  508. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +0 -63
  509. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +0 -1
  510. package/lib-commonjs/components/DonutChart/DonutChart.js +0 -356
  511. package/lib-commonjs/components/DonutChart/DonutChart.js.map +0 -1
  512. package/lib-commonjs/components/DonutChart/DonutChart.types.js +0 -7
  513. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +0 -1
  514. package/lib-commonjs/components/DonutChart/Pie/Pie.js +0 -79
  515. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +0 -1
  516. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js +0 -4
  517. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +0 -1
  518. package/lib-commonjs/components/DonutChart/Pie/index.js +0 -7
  519. package/lib-commonjs/components/DonutChart/Pie/index.js.map +0 -1
  520. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +0 -55
  521. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +0 -1
  522. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js +0 -44
  523. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +0 -1
  524. package/lib-commonjs/components/DonutChart/index.js +0 -8
  525. package/lib-commonjs/components/DonutChart/index.js.map +0 -1
  526. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +0 -145
  527. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +0 -1
  528. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +0 -76
  529. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +0 -1
  530. package/lib-commonjs/components/FunnelChart/FunnelChart.js +0 -412
  531. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +0 -1
  532. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js +0 -7
  533. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +0 -1
  534. package/lib-commonjs/components/FunnelChart/funnelGeometry.js +0 -246
  535. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +0 -1
  536. package/lib-commonjs/components/FunnelChart/index.js +0 -7
  537. package/lib-commonjs/components/FunnelChart/index.js.map +0 -1
  538. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +0 -118
  539. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +0 -1
  540. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +0 -79
  541. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +0 -1
  542. package/lib-commonjs/components/GanttChart/GanttChart.js +0 -546
  543. package/lib-commonjs/components/GanttChart/GanttChart.js.map +0 -1
  544. package/lib-commonjs/components/GanttChart/GanttChart.types.js +0 -7
  545. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +0 -1
  546. package/lib-commonjs/components/GanttChart/index.js +0 -7
  547. package/lib-commonjs/components/GanttChart/index.js.map +0 -1
  548. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +0 -42
  549. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +0 -1
  550. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +0 -42
  551. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +0 -1
  552. package/lib-commonjs/components/GaugeChart/GaugeChart.js +0 -597
  553. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +0 -1
  554. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js +0 -7
  555. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +0 -1
  556. package/lib-commonjs/components/GaugeChart/index.js +0 -8
  557. package/lib-commonjs/components/GaugeChart/index.js.map +0 -1
  558. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +0 -281
  559. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +0 -1
  560. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +0 -167
  561. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +0 -1
  562. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +0 -818
  563. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +0 -1
  564. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +0 -7
  565. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +0 -1
  566. package/lib-commonjs/components/GroupedVerticalBarChart/index.js +0 -8
  567. package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +0 -1
  568. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +0 -116
  569. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +0 -1
  570. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +0 -56
  571. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +0 -1
  572. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +0 -688
  573. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +0 -1
  574. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js +0 -7
  575. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +0 -1
  576. package/lib-commonjs/components/HeatMapChart/index.js +0 -8
  577. package/lib-commonjs/components/HeatMapChart/index.js.map +0 -1
  578. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +0 -71
  579. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +0 -1
  580. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +0 -60
  581. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +0 -1
  582. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +0 -417
  583. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +0 -1
  584. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +0 -17
  585. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +0 -1
  586. package/lib-commonjs/components/HorizontalBarChart/index.js +0 -8
  587. package/lib-commonjs/components/HorizontalBarChart/index.js.map +0 -1
  588. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +0 -264
  589. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +0 -1
  590. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +0 -139
  591. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +0 -1
  592. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +0 -726
  593. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +0 -1
  594. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +0 -7
  595. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +0 -1
  596. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js +0 -8
  597. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +0 -1
  598. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +0 -86
  599. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +0 -1
  600. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +0 -70
  601. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +0 -1
  602. package/lib-commonjs/components/Legends/Legends.js +0 -333
  603. package/lib-commonjs/components/Legends/Legends.js.map +0 -1
  604. package/lib-commonjs/components/Legends/Legends.types.js +0 -6
  605. package/lib-commonjs/components/Legends/Legends.types.js.map +0 -1
  606. package/lib-commonjs/components/Legends/OverflowMenu.js +0 -44
  607. package/lib-commonjs/components/Legends/OverflowMenu.js.map +0 -1
  608. package/lib-commonjs/components/Legends/index.js +0 -8
  609. package/lib-commonjs/components/Legends/index.js.map +0 -1
  610. package/lib-commonjs/components/Legends/shape.js +0 -47
  611. package/lib-commonjs/components/Legends/shape.js.map +0 -1
  612. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +0 -456
  613. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +0 -1
  614. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +0 -178
  615. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +0 -1
  616. package/lib-commonjs/components/LineChart/LineChart.js +0 -1337
  617. package/lib-commonjs/components/LineChart/LineChart.js.map +0 -1
  618. package/lib-commonjs/components/LineChart/LineChart.types.js +0 -6
  619. package/lib-commonjs/components/LineChart/LineChart.types.js.map +0 -1
  620. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +0 -129
  621. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +0 -1
  622. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +0 -70
  623. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +0 -1
  624. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +0 -53
  625. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +0 -1
  626. package/lib-commonjs/components/LineChart/index.js +0 -9
  627. package/lib-commonjs/components/LineChart/index.js.map +0 -1
  628. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +0 -132
  629. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +0 -1
  630. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +0 -63
  631. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +0 -1
  632. package/lib-commonjs/components/PolarChart/PolarChart.js +0 -587
  633. package/lib-commonjs/components/PolarChart/PolarChart.js.map +0 -1
  634. package/lib-commonjs/components/PolarChart/PolarChart.types.js +0 -7
  635. package/lib-commonjs/components/PolarChart/PolarChart.types.js.map +0 -1
  636. package/lib-commonjs/components/PolarChart/PolarChart.utils.js +0 -204
  637. package/lib-commonjs/components/PolarChart/PolarChart.utils.js.map +0 -1
  638. package/lib-commonjs/components/PolarChart/index.js +0 -7
  639. package/lib-commonjs/components/PolarChart/index.js.map +0 -1
  640. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.js +0 -107
  641. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.js.map +0 -1
  642. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.js +0 -75
  643. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.js.map +0 -1
  644. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +0 -107
  645. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +0 -1
  646. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js +0 -7
  647. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +0 -1
  648. package/lib-commonjs/components/ResponsiveContainer/index.js +0 -8
  649. package/lib-commonjs/components/ResponsiveContainer/index.js.map +0 -1
  650. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +0 -50
  651. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +0 -1
  652. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +0 -47
  653. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +0 -1
  654. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js +0 -28
  655. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +0 -1
  656. package/lib-commonjs/components/SankeyChart/SankeyChart.js +0 -1042
  657. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +0 -1
  658. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js +0 -6
  659. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +0 -1
  660. package/lib-commonjs/components/SankeyChart/index.js +0 -8
  661. package/lib-commonjs/components/SankeyChart/index.js.map +0 -1
  662. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +0 -202
  663. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +0 -1
  664. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +0 -97
  665. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +0 -1
  666. package/lib-commonjs/components/ScatterChart/ScatterChart.js +0 -550
  667. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +0 -1
  668. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +0 -7
  669. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +0 -1
  670. package/lib-commonjs/components/ScatterChart/index.js +0 -8
  671. package/lib-commonjs/components/ScatterChart/index.js.map +0 -1
  672. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +0 -120
  673. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +0 -1
  674. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +0 -55
  675. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +0 -1
  676. package/lib-commonjs/components/Sparkline/Sparkline.js +0 -129
  677. package/lib-commonjs/components/Sparkline/Sparkline.js.map +0 -1
  678. package/lib-commonjs/components/Sparkline/Sparkline.types.js +0 -7
  679. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +0 -1
  680. package/lib-commonjs/components/Sparkline/index.js +0 -8
  681. package/lib-commonjs/components/Sparkline/index.js.map +0 -1
  682. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +0 -57
  683. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +0 -1
  684. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js +0 -45
  685. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js.map +0 -1
  686. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChart.js +0 -274
  687. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChart.js.map +0 -1
  688. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js +0 -35
  689. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js.map +0 -1
  690. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteColorAdapter.js +0 -412
  691. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteColorAdapter.js.map +0 -1
  692. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js +0 -533
  693. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js.map +0 -1
  694. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +0 -3214
  695. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +0 -1
  696. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteTypes.js +0 -31
  697. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteTypes.js.map +0 -1
  698. package/lib-commonjs/components/VegaDeclarativeChart/index.js +0 -6
  699. package/lib-commonjs/components/VegaDeclarativeChart/index.js.map +0 -1
  700. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +0 -932
  701. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +0 -1
  702. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js +0 -7
  703. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +0 -1
  704. package/lib-commonjs/components/VerticalBarChart/index.js +0 -8
  705. package/lib-commonjs/components/VerticalBarChart/index.js.map +0 -1
  706. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +0 -128
  707. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +0 -1
  708. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +0 -64
  709. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +0 -1
  710. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +0 -1088
  711. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +0 -1
  712. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +0 -7
  713. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +0 -1
  714. package/lib-commonjs/components/VerticalStackedBarChart/index.js +0 -8
  715. package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +0 -1
  716. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +0 -116
  717. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +0 -1
  718. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +0 -56
  719. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +0 -1
  720. package/lib-commonjs/index.js +0 -31
  721. package/lib-commonjs/index.js.map +0 -1
  722. package/lib-commonjs/types/ChartAnnotation.js +0 -4
  723. package/lib-commonjs/types/ChartAnnotation.js.map +0 -1
  724. package/lib-commonjs/types/DataPoint.js +0 -6
  725. package/lib-commonjs/types/DataPoint.js.map +0 -1
  726. package/lib-commonjs/types/EventAnnotation.js +0 -4
  727. package/lib-commonjs/types/EventAnnotation.js.map +0 -1
  728. package/lib-commonjs/types/LegendDataItem.js +0 -4
  729. package/lib-commonjs/types/LegendDataItem.js.map +0 -1
  730. package/lib-commonjs/types/index.js +0 -8
  731. package/lib-commonjs/types/index.js.map +0 -1
  732. package/lib-commonjs/utilities/ChartTitle.js +0 -53
  733. package/lib-commonjs/utilities/ChartTitle.js.map +0 -1
  734. package/lib-commonjs/utilities/Common.styles.js +0 -138
  735. package/lib-commonjs/utilities/Common.styles.js.map +0 -1
  736. package/lib-commonjs/utilities/Common.styles.raw.js +0 -138
  737. package/lib-commonjs/utilities/Common.styles.raw.js.map +0 -1
  738. package/lib-commonjs/utilities/FocusableTooltipText.js +0 -75
  739. package/lib-commonjs/utilities/FocusableTooltipText.js.map +0 -1
  740. package/lib-commonjs/utilities/KeyCodes.js +0 -21
  741. package/lib-commonjs/utilities/KeyCodes.js.map +0 -1
  742. package/lib-commonjs/utilities/SVGTooltipText.js +0 -189
  743. package/lib-commonjs/utilities/SVGTooltipText.js.map +0 -1
  744. package/lib-commonjs/utilities/async-utils.js +0 -382
  745. package/lib-commonjs/utilities/async-utils.js.map +0 -1
  746. package/lib-commonjs/utilities/colors.js +0 -311
  747. package/lib-commonjs/utilities/colors.js.map +0 -1
  748. package/lib-commonjs/utilities/getWindow.js +0 -28
  749. package/lib-commonjs/utilities/getWindow.js.map +0 -1
  750. package/lib-commonjs/utilities/hooks.js +0 -45
  751. package/lib-commonjs/utilities/hooks.js.map +0 -1
  752. package/lib-commonjs/utilities/image-export-utils.js +0 -423
  753. package/lib-commonjs/utilities/image-export-utils.js.map +0 -1
  754. package/lib-commonjs/utilities/index.js +0 -10
  755. package/lib-commonjs/utilities/index.js.map +0 -1
  756. package/lib-commonjs/utilities/overflow-utils.js +0 -36
  757. package/lib-commonjs/utilities/overflow-utils.js.map +0 -1
  758. package/lib-commonjs/utilities/scatterpolar-utils.js +0 -67
  759. package/lib-commonjs/utilities/scatterpolar-utils.js.map +0 -1
  760. package/lib-commonjs/utilities/string.js +0 -29
  761. package/lib-commonjs/utilities/string.js.map +0 -1
  762. package/lib-commonjs/utilities/test-data.js +0 -628
  763. package/lib-commonjs/utilities/test-data.js.map +0 -1
  764. package/lib-commonjs/utilities/utilities.js +0 -2016
  765. package/lib-commonjs/utilities/utilities.js.map +0 -1
  766. package/lib-commonjs/utilities/vbc-utils.js +0 -72
  767. package/lib-commonjs/utilities/vbc-utils.js.map +0 -1
@@ -1,1042 +0,0 @@
1
- 'use client';
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- function _export(target, all) {
7
- for(var name in all)Object.defineProperty(target, name, {
8
- enumerable: true,
9
- get: all[name]
10
- });
11
- }
12
- _export(exports, {
13
- SankeyChart: function() {
14
- return SankeyChart;
15
- },
16
- adjustPadding: function() {
17
- return adjustPadding;
18
- },
19
- groupNodesByColumn: function() {
20
- return groupNodesByColumn;
21
- },
22
- preRenderLayout: function() {
23
- return preRenderLayout;
24
- }
25
- });
26
- const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
27
- const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
28
- const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
29
- const _reacttheme = require("@fluentui/react-theme");
30
- const _reactutilities = require("@fluentui/react-utilities");
31
- const _d3array = require("d3-array");
32
- const _d3sankey = require("d3-sankey");
33
- const _d3selection = require("d3-selection");
34
- const _d3shape = require("d3-shape");
35
- const _useSankeyChartStylesstyles = require("./useSankeyChartStyles.styles");
36
- const _index = require("../CommonComponents/index");
37
- const _reacttabster = require("@fluentui/react-tabster");
38
- const _string = require("../../utilities/string");
39
- const _hooks = require("../../utilities/hooks");
40
- const _index1 = require("../../utilities/index");
41
- const PADDING_PERCENTAGE = 0.3;
42
- const NON_SELECTED_NODE_AND_STREAM_COLOR = '#757575';
43
- const DEFAULT_NODE_COLORS = [
44
- {
45
- fillColor: '#00758F',
46
- borderColor: '#002E39'
47
- },
48
- {
49
- fillColor: '#77004D',
50
- borderColor: '#43002C'
51
- },
52
- {
53
- fillColor: '#4F6BED',
54
- borderColor: '#3B52B4'
55
- },
56
- {
57
- fillColor: '#937600',
58
- borderColor: '#6D5700'
59
- },
60
- {
61
- fillColor: '#286EA8',
62
- borderColor: '#00457E'
63
- },
64
- {
65
- fillColor: '#A43FB1',
66
- borderColor: '#7C158A'
67
- },
68
- {
69
- fillColor: '#CC3595',
70
- borderColor: '#7F215D'
71
- },
72
- {
73
- fillColor: '#0E7878',
74
- borderColor: '#004E4E'
75
- },
76
- {
77
- fillColor: '#8764B8',
78
- borderColor: '#4B3867'
79
- },
80
- {
81
- fillColor: '#9C663F',
82
- borderColor: '#6D4123'
83
- }
84
- ];
85
- const MIN_HEIGHT_FOR_DOUBLINE_TYPE = 36;
86
- const MIN_HEIGHT_FOR_TYPE = 24;
87
- const REST_STREAM_OPACITY = 1;
88
- const NON_SELECTED_OPACITY = 1;
89
- const SELECTED_STREAM_OPACITY = 0.3;
90
- const NON_SELECTED_STREAM_BORDER_OPACITY = 0.5;
91
- const DEFAULT_TEXT_COLOR = '#323130';
92
- const NON_SELECTED_TEXT_COLOR = '#FFFFFF';
93
- const NODE_WIDTH = 124;
94
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
95
- function getSelectedNodes(selectedLinks) {
96
- const nodes = [];
97
- selectedLinks.forEach((link)=>{
98
- nodes.push(link.target);
99
- if (nodes.indexOf(link.source) === -1) {
100
- nodes.push(link.source);
101
- }
102
- });
103
- return nodes;
104
- }
105
- function getSelectedLinks(singleNode) {
106
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
107
- const q = new Array();
108
- const finalLinks = new Set();
109
- singleNode.sourceLinks.forEach((link)=>{
110
- q.push(link);
111
- finalLinks.add(link);
112
- });
113
- while(q.length > 0){
114
- const poppedLink = q.shift();
115
- const node = poppedLink.target;
116
- if (node && node.sourceLinks) {
117
- node.sourceLinks.forEach((link)=>{
118
- finalLinks.add(link);
119
- q.push(link);
120
- });
121
- }
122
- }
123
- if (singleNode.targetLinks) {
124
- singleNode.targetLinks.forEach((link)=>{
125
- q.push(link);
126
- finalLinks.add(link);
127
- });
128
- }
129
- while(q.length > 0){
130
- const poppedLink = q.shift();
131
- const node = poppedLink.source;
132
- if (node && node.targetLinks) {
133
- node.targetLinks.forEach((link)=>{
134
- finalLinks.add(link);
135
- q.push(link);
136
- });
137
- }
138
- }
139
- return finalLinks;
140
- }
141
- function getSelectedLinksforStreamHover(singleLink) {
142
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
143
- const q = new Array();
144
- const finalLinks = new Set();
145
- const finalNodes = new Set();
146
- q.push(singleLink.source);
147
- finalLinks.add(singleLink);
148
- while(q.length > 0){
149
- const poppedNode = q.shift();
150
- finalNodes.add(poppedNode);
151
- if (poppedNode.targetLinks && poppedNode.targetLinks.length > 0) {
152
- poppedNode.targetLinks.forEach((link)=>{
153
- q.push(link.source);
154
- finalLinks.add(link);
155
- });
156
- }
157
- }
158
- q.push(singleLink.target);
159
- while(q.length > 0){
160
- const poppedNode = q.shift();
161
- finalNodes.add(poppedNode);
162
- if (poppedNode.sourceLinks && poppedNode.sourceLinks.length > 0) {
163
- poppedNode.sourceLinks.forEach((link)=>{
164
- q.push(link.target);
165
- finalLinks.add(link);
166
- });
167
- }
168
- }
169
- return {
170
- selectedLinks: finalLinks,
171
- selectedNodes: finalNodes
172
- };
173
- }
174
- function groupNodesByColumn(graph) {
175
- const nodesInColumn = {};
176
- graph.nodes.forEach((node)=>{
177
- const columnId = node.layer;
178
- if (nodesInColumn[columnId]) {
179
- nodesInColumn[columnId].push(node);
180
- } else {
181
- nodesInColumn[columnId] = [
182
- node
183
- ];
184
- }
185
- });
186
- return nodesInColumn;
187
- }
188
- /**
189
- * This is used to normalize the nodes value whose value is less than 1% of the total column value.
190
- */ function adjustOnePercentHeightNodes(nodesInColumn, computedNodes, originalLinks) {
191
- const totalColumnValue = Object.values(nodesInColumn).map((column)=>{
192
- return (0, _d3array.sum)(column, (node)=>node.value);
193
- });
194
- totalColumnValue.forEach((columnValue, index)=>{
195
- let totalPercentage = 0;
196
- const onePercent = 0.01 * columnValue;
197
- const columnNodes = nodesInColumn[index];
198
- columnNodes.forEach((node)=>{
199
- const value = computedNodes[node.nodeId];
200
- const nodePercentage = value / columnValue * 100;
201
- node.actualValue = value;
202
- //if the value is less than 1% then we are making it as 1% of total .
203
- if (nodePercentage < 1) {
204
- node.value = onePercent;
205
- totalPercentage = totalPercentage + 1;
206
- } else {
207
- totalPercentage = totalPercentage + nodePercentage;
208
- }
209
- });
210
- //since we have adjusted the value to be 1% but we need to keep the sum of the percentage value under 100.
211
- const scalingRatio = totalPercentage !== 0 ? totalPercentage / 100 : 1;
212
- if (scalingRatio > 1) {
213
- // Loop through each node in that column and scale that node--and its incoming and outgoing links--by the
214
- // scaling ratio. We need the sankey diagram to re-layout the nodes and links after we do this.
215
- columnNodes.forEach((node)=>{
216
- const normalized = node.value = node.value / scalingRatio;
217
- // Which Original Value? and Which Normalized Value is needed, here? The Node? The Link? Both?
218
- changeColumnValue(node, computedNodes[node.nodeId], normalized, originalLinks);
219
- });
220
- }
221
- });
222
- }
223
- /**
224
- * This is used for normalizing each link's value to reflect the normalized node value.
225
- */ function changeColumnValue(node, originalNodeValue, normalizedNodeValue, linkValues) {
226
- // For each link in the source and target, compute the proportion that this link contributes to the total
227
- // then adjust the link's value to reflect its proportion of the normalized node value.
228
- const updateLinkValue = (link)=>{
229
- const value = linkValue(linkValues, link);
230
- link.unnormalizedValue = value;
231
- const linkRatio = value / originalNodeValue;
232
- link.value = Math.max(normalizedNodeValue * linkRatio, link.value);
233
- };
234
- node.sourceLinks.forEach(updateLinkValue);
235
- node.targetLinks.forEach(updateLinkValue);
236
- }
237
- /**
238
- * This is used for calculating the node non normalized value based on link non normalized value.
239
- * The links have the original weights. Computed nodes have the total weight of all incoming and outgoing links.
240
- */ function populateNodeActualValue(data, computedNodes, originalLinks) {
241
- data.links.forEach((link)=>{
242
- if (!link.unnormalizedValue) {
243
- link.unnormalizedValue = linkValue(originalLinks, link);
244
- }
245
- });
246
- data.nodes.forEach((node)=>{
247
- node.actualValue = computedNodes[node.nodeId];
248
- });
249
- }
250
- function adjustPadding(sankey, height, nodesInColumn) {
251
- let padding = sankey.nodePadding();
252
- const minPadding = PADDING_PERCENTAGE * height;
253
- Object.values(nodesInColumn).forEach((column)=>{
254
- const totalPaddingInColumn = height - (0, _d3array.sum)(column, (node)=>node.y1 - node.y0);
255
- if (minPadding < totalPaddingInColumn) {
256
- // Here we are calculating the min of default and calculated padding, we will not increase the padding
257
- // in any scenario.
258
- padding = Math.min(padding, minPadding / (column.length - 1));
259
- }
260
- });
261
- sankey.nodePadding(padding);
262
- }
263
- function idFromNumberOrSNode(node) {
264
- if (typeof node === 'number') {
265
- return node;
266
- }
267
- return node.nodeId;
268
- }
269
- /**
270
- * Duplicates the supplied chart data so that we do not alter the original.
271
- * @param data The data to duplicate.
272
- * @returns The duplicated data.
273
- */ function duplicateData(data) {
274
- return {
275
- nodes: data.nodes.map((node)=>({
276
- ...node
277
- })),
278
- links: data.links.map((link)=>({
279
- ...link
280
- }))
281
- };
282
- }
283
- function valuesOfNodes(nodes) {
284
- const result = {};
285
- nodes.forEach((node)=>{
286
- result[node.nodeId] = node.value;
287
- });
288
- return result;
289
- }
290
- function valuesOfLinks(links) {
291
- const result = {};
292
- links.forEach((link)=>{
293
- const sourceId = idFromNumberOrSNode(link.source);
294
- let sourceToTarget = result[sourceId];
295
- if (!sourceToTarget) {
296
- sourceToTarget = {};
297
- result[sourceId] = sourceToTarget;
298
- }
299
- sourceToTarget[idFromNumberOrSNode(link.target)] = link.value;
300
- });
301
- return result;
302
- }
303
- function linkValue(originalLinks, link) {
304
- return originalLinks[idFromNumberOrSNode(link.source)][idFromNumberOrSNode(link.target)];
305
- }
306
- function preRenderLayout(margins, containerWidth, containerHeight, isRtl) {
307
- const { left, right, top, bottom } = margins;
308
- const sankey = (0, _d3sankey.sankey)().nodeWidth(NODE_WIDTH).extent([
309
- [
310
- left,
311
- top
312
- ],
313
- [
314
- containerWidth - right,
315
- containerHeight - bottom
316
- ]
317
- ]).nodeAlign(isRtl ? _d3sankey.sankeyRight : _d3sankey.sankeyJustify);
318
- return {
319
- sankey,
320
- height: containerHeight,
321
- width: containerWidth
322
- };
323
- }
324
- const elipsis = '...';
325
- /**
326
- * This is used to assign node fillcolors and borderColor cyclically when the user doesnt
327
- * provide color to individual node.
328
- */ function assignNodeColors(nodes, colorsForNodes, borderColorsForNodes) {
329
- let colors;
330
- let borders;
331
- if (colorsForNodes && borderColorsForNodes) {
332
- colors = colorsForNodes;
333
- borders = borderColorsForNodes;
334
- } else {
335
- colors = DEFAULT_NODE_COLORS.map((color)=>color.fillColor);
336
- borders = DEFAULT_NODE_COLORS.map((color)=>color.borderColor);
337
- }
338
- let currentIndex = 0;
339
- nodes.forEach((node)=>{
340
- if (!node.color && !node.borderColor) {
341
- node.color = colors[currentIndex];
342
- node.borderColor = borders[currentIndex];
343
- } else if (node.color && !node.borderColor) {
344
- node.borderColor = '#757575';
345
- } else if (node.borderColor && !node.color) {
346
- node.color = '#F5F5F5';
347
- }
348
- currentIndex = (currentIndex + 1) % colors.length;
349
- });
350
- }
351
- /**
352
- * Takes in the display name for the node and potentially returns a trimmed version of the name.
353
- * @param tspan the `tspan` element to use for text visual length measurement
354
- * @param text is the text which we will potentially truncate
355
- * @param rectangleWidth is the width of the rectangle which will contain the text
356
- * @param padding is the space we need to leave between the rect lines and other text
357
- * @returns the name to show on the node which might be the truncated `text` if the `text` is too long
358
- */ function truncateText(tspan, text, rectangleWidth, padding) {
359
- // NOTE: This method is the most-expensive in terms of rerendering components.
360
- const textLengthForNodeName = rectangleWidth - padding; // This can likely be computed once and passed in.
361
- // The following `select` statement injects a `tempText` element into the DOM. This injection
362
- // (and subsequent removal) is causing a layout recalculation. This is a performance issue.
363
- // Note that this code will always inject a `tempText` element, but doesn't always remove it. This is a bug.
364
- if (fitsWithinNode(tspan, text, textLengthForNodeName)) {
365
- return text;
366
- }
367
- // Computing the size of elipsis is performed with each node. This should be computed once and used everywhere.
368
- // TODO: Compute the size of the elipsis once and use it everywhere.
369
- const elipsisLength = computeElipsisLength(tspan);
370
- let line = '';
371
- // Calculate how much of the original text to show.
372
- // TODO: The folllowing is O(n). We could use a binary search to make this faster: O(log(n)).
373
- for(let i = 0; i < text.length; i++){
374
- line += text[i];
375
- tspan.text(line);
376
- const currentNode = tspan.node();
377
- if (currentNode !== null) {
378
- const w = currentNode.getComputedTextLength();
379
- if (w >= textLengthForNodeName - elipsisLength) {
380
- line = line.slice(0, -1);
381
- line += elipsis;
382
- break;
383
- }
384
- }
385
- }
386
- tspan.text(null);
387
- return line;
388
- }
389
- function fitsWithinNode(tspan, text, textLengthForNodeName) {
390
- const measurement = measureText(tspan, text);
391
- if (measurement === undefined) {
392
- return false;
393
- }
394
- return measurement <= textLengthForNodeName;
395
- }
396
- function measureText(tspan, text) {
397
- try {
398
- var _tspan_node;
399
- tspan.text(text);
400
- return (_tspan_node = tspan.node()) === null || _tspan_node === void 0 ? void 0 : _tspan_node.getComputedTextLength();
401
- } finally{
402
- tspan.text(null);
403
- }
404
- }
405
- function computeElipsisLength(tspan) {
406
- const measurement = measureText(tspan, elipsis);
407
- return measurement === undefined ? 0 : measurement;
408
- }
409
- function computeLinkAttributes(links, linkFrom, linkAriaLabel, linkId) {
410
- const result = {};
411
- links.forEach((link, index)=>{
412
- const sourceId = idFromNumberOrSNode(link.source);
413
- let sourceToTarget = result[sourceId];
414
- if (!sourceToTarget) {
415
- sourceToTarget = {};
416
- result[sourceId] = sourceToTarget;
417
- }
418
- sourceToTarget[idFromNumberOrSNode(link.target)] = {
419
- reactId: `${linkId}-${index}`,
420
- from: linkFrom(link.source),
421
- aria: linkAriaLabel(link)
422
- };
423
- });
424
- return result;
425
- }
426
- const linkToDataPoints = (d)=>{
427
- const halfWidth = d.width * 0.5;
428
- const y0 = d.y0;
429
- const y1 = d.y1;
430
- return [
431
- {
432
- x: d.source.x1,
433
- y0: y0 + halfWidth,
434
- y1: y0 - halfWidth
435
- },
436
- {
437
- x: d.target.x0,
438
- y0: y1 + halfWidth,
439
- y1: y1 - halfWidth
440
- }
441
- ];
442
- };
443
- const linkArea = (0, _d3shape.area)().x((p)=>p.x).y0((p)=>p.y0).y1((p)=>p.y1).curve(_d3shape.curveBumpX);
444
- function nodeTextColor(state, singleNode) {
445
- return !(!state.selectedState || state.selectedNodes.has(singleNode.index) && state.selectedNode || !state.selectedNode) ? DEFAULT_TEXT_COLOR : NON_SELECTED_TEXT_COLOR;
446
- }
447
- const SankeyChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
448
- var _props_data, _props_titleStyles_titleFont, _props_titleStyles, _props_reflowProps;
449
- const classes = (0, _useSankeyChartStylesstyles.useSankeyChartStyles)(props);
450
- const { chartContainerRef: chartContainer } = (0, _hooks.useImageExport)(props.componentRef, true, false);
451
- const _reqID = _react.useRef(undefined);
452
- const _linkId = (0, _reactutilities.useId)('link');
453
- const _chartId = (0, _reactutilities.useId)('sankeyChart');
454
- const _emptyChartId = (0, _reactutilities.useId)('_SankeyChart_empty');
455
- const _labelTooltipId = (0, _reactutilities.useId)('tooltip');
456
- const titleHeight = ((_props_data = props.data) === null || _props_data === void 0 ? void 0 : _props_data.chartTitle) ? Math.max((typeof ((_props_titleStyles = props.titleStyles) === null || _props_titleStyles === void 0 ? void 0 : (_props_titleStyles_titleFont = _props_titleStyles.titleFont) === null || _props_titleStyles_titleFont === void 0 ? void 0 : _props_titleStyles_titleFont.size) === 'number' ? props.titleStyles.titleFont.size : 13) + _index1.CHART_TITLE_PADDING, 36) : 36;
457
- const _margins = _react.useRef({
458
- top: titleHeight,
459
- right: 48,
460
- bottom: 32,
461
- left: 48
462
- });
463
- const { targetDocument, dir } = (0, _reactsharedcontexts.useFluent_unstable)();
464
- const _window = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView;
465
- const _isRtl = dir === 'rtl';
466
- const _numColumns = _react.useRef(0);
467
- const _nodeBarId = (0, _reactutilities.useId)('nodeBar');
468
- const _nodeGElementId = (0, _reactutilities.useId)('nodeGElement');
469
- const _arrowNavigationAttributes = (0, _reacttabster.useArrowNavigationGroup)({
470
- axis: 'grid'
471
- });
472
- const _tooltip = _react.useRef(null);
473
- const [containerHeight, setContainerHeight] = _react.useState(468);
474
- const [containerWidth, setContainerWidth] = _react.useState(912);
475
- const [selectedState, setSelectedState] = _react.useState(false);
476
- const [selectedLinks, setSelectedLinks] = _react.useState(new Set());
477
- const [selectedNodes, setSelectedNodes] = _react.useState(new Set());
478
- const [isCalloutVisible, setCalloutVisible] = _react.useState(false);
479
- const [selectedNode, setSelectedNode] = _react.useState();
480
- const [color, setColor] = _react.useState();
481
- const [xCalloutValue, setXCalloutValue] = _react.useState();
482
- const [yCalloutValue, setYCalloutValue] = _react.useState();
483
- const [descriptionMessage, setDescriptionMessage] = _react.useState();
484
- const [clickPosition, setClickPosition] = _react.useState({
485
- x: 0,
486
- y: 0
487
- });
488
- const _fitParentContainer = _react.useCallback(()=>{
489
- _reqID.current = _window === null || _window === void 0 ? void 0 : _window.requestAnimationFrame(()=>{
490
- // NOTE: Calls to this method trigger a re-render.
491
- const container = props.parentRef ? props.parentRef : chartContainer.current;
492
- if (container) {
493
- var _props_reflowProps;
494
- const currentContainerWidth = ((_props_reflowProps = props.reflowProps) === null || _props_reflowProps === void 0 ? void 0 : _props_reflowProps.mode) === 'min-width' ? Math.max(container.getBoundingClientRect().width, _calculateChartMinWidth()) : container.getBoundingClientRect().width;
495
- const currentContainerHeight = container.getBoundingClientRect().height;
496
- setContainerWidth(currentContainerWidth);
497
- setContainerHeight(currentContainerHeight);
498
- }
499
- });
500
- }, [
501
- _window,
502
- (_props_reflowProps = props.reflowProps) === null || _props_reflowProps === void 0 ? void 0 : _props_reflowProps.mode,
503
- props.parentRef
504
- ]);
505
- _react.useEffect(()=>{
506
- _fitParentContainer();
507
- return ()=>{
508
- if (typeof _reqID.current === 'number') {
509
- _window === null || _window === void 0 ? void 0 : _window.cancelAnimationFrame(_reqID.current);
510
- }
511
- };
512
- }, [
513
- _fitParentContainer,
514
- _window,
515
- props.shouldResize
516
- ]);
517
- const _formatNumber = _react.useCallback((value)=>{
518
- return props.formatNumberOptions ? value.toLocaleString(props.culture, props.formatNumberOptions) : value.toString();
519
- }, [
520
- props.formatNumberOptions,
521
- props.culture
522
- ]);
523
- const _computeNodeAttributes = _react.useCallback((nodes, nodeAriaLabel)=>{
524
- const result = {};
525
- const weightSpan = (0, _d3selection.select)('.nodeName').append('text').attr('class', 'tempText').append('tspan').text(null);
526
- const nameSpan = (0, _d3selection.select)('.nodeName').append('text').attr('class', 'tempText').attr('font-size', '10').append('tspan').text(null);
527
- nodes.forEach((singleNode, index)=>{
528
- const height = Math.max(singleNode.y1 - singleNode.y0, 0);
529
- let padding = 8;
530
- let textLengthForNodeWeight = 0;
531
- const nodeValue = singleNode.actualValue;
532
- // If the nodeWeight is in the same line as node description an extra padding
533
- // of 6 px is required between node description and node weight.
534
- if (height < MIN_HEIGHT_FOR_DOUBLINE_TYPE) {
535
- padding = padding + 6;
536
- // The following `select` statement injects a `tempText` element into the DOM. This injection
537
- // (and subsequent removal) is causing a layout recalculation. This is a performance issue.
538
- const measurement = measureText(weightSpan, _formatNumber(nodeValue));
539
- if (measurement !== undefined) {
540
- textLengthForNodeWeight = measurement;
541
- padding = padding + textLengthForNodeWeight;
542
- }
543
- }
544
- // Since the total width of the node is 124 and we are giving margin of 8px from the left .
545
- // So the actual value on which it will be truncated is 124-8=116.
546
- const truncatedname = truncateText(nameSpan, singleNode.name, NODE_WIDTH - 8, padding);
547
- const isTruncated = truncatedname.slice(-3) === elipsis;
548
- result[singleNode.nodeId] = {
549
- reactId: `${_nodeBarId}-${index}`,
550
- gElementId: `${_nodeGElementId}-${index}`,
551
- name: truncatedname,
552
- aria: nodeAriaLabel(singleNode, nodeValue),
553
- trimmed: isTruncated,
554
- height,
555
- weightOffset: textLengthForNodeWeight
556
- };
557
- });
558
- (0, _d3selection.selectAll)('.tempText').remove();
559
- return result;
560
- }, [
561
- _formatNumber,
562
- _nodeBarId,
563
- _nodeGElementId
564
- ]);
565
- const _linkCalloutAttributes = (singleLink, from)=>{
566
- setCalloutVisible(true);
567
- setColor(singleLink.source.color);
568
- setXCalloutValue(singleLink.target.name);
569
- setYCalloutValue(_formatNumber(singleLink.unnormalizedValue));
570
- setDescriptionMessage(from);
571
- };
572
- const _isChartEmpty = _react.useCallback(()=>{
573
- var _props_data;
574
- const sankeyChartData = (_props_data = props.data) === null || _props_data === void 0 ? void 0 : _props_data.SankeyChartData;
575
- return !(sankeyChartData && sankeyChartData.nodes.length > 0 && sankeyChartData.links.length > 0);
576
- }, [
577
- props.data
578
- ]);
579
- const _normalizeSankeyData = _react.useCallback((data, _containerWidth, _containerHeight, colorsForNodes, borderColorsForNodes)=>{
580
- if (_isChartEmpty()) {
581
- return {
582
- width: 0,
583
- height: 0,
584
- nodes: [],
585
- links: []
586
- };
587
- }
588
- const { sankey, height, width } = preRenderLayout(_margins.current, _containerWidth, _containerHeight, _isRtl);
589
- // Clone the data before mutating it (via the SankeyLayoutGenerator) so that we don't mutate the original data.
590
- const transformed = duplicateData(data);
591
- sankey(transformed);
592
- // NOTE: After the prior line, `transformed` is now a more-complex object than the incoming `ISankeyChartData`.
593
- // `transformed` should be cast to a more-specific type. This is a breaking change because we would be eliminating
594
- // fields from `ISankeyChartData` and putting those fields on a now-local type. But doing so makes it clearer what
595
- // the caller needs to supply and why. For example, the `actualValue` and `layer` fields of `ISNodeExtra` should
596
- // both be moved. Similarly for `unnormalizedValue` in `ISLinkExtra`.
597
- // `SankeyNodeMinimal` and `SankeyLinkMinimal` are both the types after `sankey(transformed)`, but have almost no
598
- // bearing on the data before `sankey(transformed)` (which is basically nodes with ids and names along with links
599
- // with source index, target index, and value).
600
- const nodesInColumn = groupNodesByColumn(transformed);
601
- _numColumns.current = Object.keys(nodesInColumn).length;
602
- // Keep track of the original values of the links and their acccumulated values in the nodes
603
- // Setting these in external objects so they cannot be mutated by other code.
604
- // The IDs of nodes can be numbers or strings. But, the IDs of links are always the index into the "nodes" array.
605
- // After the sankey layout is computed, the each link's `source` and `target` will have the ID of the node in the
606
- // type originally specified in the Nodes array. Consequently, we get the values of those links after the sankey
607
- // transformation.
608
- const nodeValues = valuesOfNodes(transformed.nodes);
609
- const linkValues = valuesOfLinks(transformed.links);
610
- adjustOnePercentHeightNodes(nodesInColumn, nodeValues, linkValues);
611
- adjustPadding(sankey, containerHeight - _margins.current.top - _margins.current.bottom, nodesInColumn);
612
- // `sankey` is called a second time, probably to re-layout the nodes with the one-percent adjusted weights.
613
- // NOTE: The second call to `sankey` is required to allow links to be hoverable.
614
- // Without the second call, the links are not hoverable.
615
- sankey(transformed);
616
- populateNodeActualValue(transformed, nodeValues, linkValues);
617
- assignNodeColors(transformed.nodes, colorsForNodes, borderColorsForNodes);
618
- return {
619
- width,
620
- height,
621
- nodes: transformed.nodes,
622
- links: transformed.links
623
- };
624
- }, [
625
- _isChartEmpty,
626
- _isRtl
627
- ]);
628
- const _createLinks = (dataLinks, linkAttributes)=>{
629
- if (dataLinks) {
630
- const linkId = _linkId;
631
- return dataLinks.map((singleLink, index)=>{
632
- const onMouseOut = ()=>{
633
- _onStreamLeave(singleLink);
634
- };
635
- const { reactId, from, aria } = linkValue(linkAttributes, singleLink);
636
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
637
- const dataPoints = linkToDataPoints(singleLink);
638
- const key = `${linkId}-${index}`;
639
- const gradientId = `gradient-${key}`;
640
- const gradientUrl = `url(#${gradientId})`;
641
- const source = singleLink.source;
642
- const target = singleLink.target;
643
- // TODO: localize the aria-label string
644
- return /*#__PURE__*/ _react.createElement("g", {
645
- key: key
646
- }, /*#__PURE__*/ _react.createElement("defs", null, /*#__PURE__*/ _react.createElement("linearGradient", {
647
- id: gradientId,
648
- x1: "0%",
649
- y1: "0%",
650
- x2: "100%",
651
- y2: "0%"
652
- }, /*#__PURE__*/ _react.createElement("stop", {
653
- offset: "0",
654
- stopColor: source.color
655
- }), /*#__PURE__*/ _react.createElement("stop", {
656
- offset: "100%",
657
- stopColor: target.color
658
- }))), /*#__PURE__*/ _react.createElement("path", {
659
- d: linkArea(dataPoints),
660
- id: reactId,
661
- fill: _fillStreamColors(singleLink, gradientUrl),
662
- stroke: _fillStreamBorder(singleLink, gradientUrl),
663
- strokeWidth: "2",
664
- strokeOpacity: _getOpacityStreamBorder(singleLink),
665
- onMouseOver: (event)=>_onStreamHover(event, singleLink, from),
666
- onMouseOut: onMouseOut,
667
- onFocus: (event)=>_onFocusLink(event, singleLink, from),
668
- onBlur: _onBlur,
669
- fillOpacity: _getOpacityStream(singleLink),
670
- tabIndex: 0,
671
- "aria-label": aria,
672
- role: "img"
673
- }));
674
- });
675
- }
676
- return [];
677
- };
678
- const _createNodes = (dataNodes, nodeAttributes)=>{
679
- if (dataNodes) {
680
- const textAnchor = _isRtl ? 'end' : 'start';
681
- return dataNodes.map((singleNode, index)=>{
682
- const onMouseOut = ()=>{
683
- _onLeave(singleNode);
684
- };
685
- const { reactId: nodeId, gElementId, height, trimmed: isTruncated, name: truncatedName, weightOffset: textLengthForNodeWeight, aria } = nodeAttributes[singleNode.nodeId];
686
- const tooTall = height > MIN_HEIGHT_FOR_DOUBLINE_TYPE;
687
- const { name, actualValue, x0, x1, y0 } = singleNode;
688
- const textColor = nodeTextColor({
689
- selectedState,
690
- selectedNodes,
691
- selectedNode
692
- }, singleNode);
693
- return /*#__PURE__*/ _react.createElement("g", {
694
- key: index,
695
- id: gElementId
696
- }, /*#__PURE__*/ _react.createElement("rect", {
697
- x: x0,
698
- y: y0,
699
- height: height,
700
- width: x1 - x0,
701
- fill: _fillNodeColors(singleNode),
702
- id: nodeId,
703
- onMouseOver: (e)=>_onHover(singleNode, e),
704
- onMouseOut: onMouseOut,
705
- onFocus: _onCloseCallout,
706
- stroke: _fillNodeBorder(singleNode),
707
- strokeWidth: "2",
708
- opacity: "1",
709
- tabIndex: 0,
710
- "aria-label": aria,
711
- role: "img"
712
- }), height > MIN_HEIGHT_FOR_TYPE && /*#__PURE__*/ _react.createElement("g", {
713
- className: classes.nodeTextContainer
714
- }, /*#__PURE__*/ _react.createElement("g", {
715
- className: "nodeName"
716
- }, /*#__PURE__*/ _react.createElement("text", {
717
- id: `${nodeId}-name`,
718
- x: x0,
719
- y: y0,
720
- dy: '1.2em',
721
- dx: '0.4em',
722
- textAnchor: textAnchor,
723
- fontWeight: "regular",
724
- "aria-hidden": "true",
725
- fill: textColor,
726
- fontSize: 10,
727
- onMouseOver: (e)=>_showTooltip(name, isTruncated, e),
728
- onMouseOut: ()=>_hideTooltip()
729
- }, truncatedName)), /*#__PURE__*/ _react.createElement("text", {
730
- x: tooTall ? x0 : x1 - textLengthForNodeWeight - 8,
731
- y: y0,
732
- dy: tooTall ? '2em' : '1em',
733
- dx: tooTall ? '0.4em' : '0em',
734
- textAnchor: textAnchor,
735
- fontWeight: "bold",
736
- "aria-hidden": "true",
737
- fill: textColor,
738
- fontSize: 14
739
- }, actualValue ? _formatNumber(actualValue) : actualValue)));
740
- });
741
- }
742
- };
743
- const _onLeave = (singleNode)=>{
744
- if (selectedState) {
745
- setSelectedState(false);
746
- setSelectedNodes(new Set());
747
- setSelectedLinks(new Set());
748
- setSelectedNode(undefined);
749
- }
750
- };
751
- const _onHover = (singleNode, mouseEvent)=>{
752
- mouseEvent.persist();
753
- _onCloseCallout();
754
- const _selectedLinks = getSelectedLinks(singleNode);
755
- const _selectedNodes = getSelectedNodes(_selectedLinks);
756
- _selectedNodes.push(singleNode);
757
- setSelectedState(true);
758
- setSelectedNodes(new Set(Array.from(_selectedNodes).map((node)=>node.index)));
759
- setSelectedLinks(new Set(Array.from(_selectedLinks).map((link)=>link.index)));
760
- setSelectedNode(singleNode);
761
- updatePosition(mouseEvent.clientX, mouseEvent.clientY);
762
- setCalloutVisible(singleNode.y1 - singleNode.y0 < MIN_HEIGHT_FOR_TYPE);
763
- setColor(singleNode.color);
764
- setXCalloutValue(singleNode.name);
765
- setYCalloutValue(_formatNumber(singleNode.actualValue));
766
- };
767
- const _onStreamHover = (mouseEvent, singleLink, from)=>{
768
- mouseEvent.persist();
769
- _onCloseCallout();
770
- const { selectedLinks: _selectedLinks, selectedNodes: _selectedNodes } = getSelectedLinksforStreamHover(singleLink);
771
- setSelectedState(true);
772
- setSelectedNodes(new Set(Array.from(_selectedNodes).map((node)=>node.index)));
773
- setSelectedLinks(new Set(Array.from(_selectedLinks).map((link)=>link.index)));
774
- updatePosition(mouseEvent.clientX, mouseEvent.clientY);
775
- _linkCalloutAttributes(singleLink, from);
776
- };
777
- const _onStreamLeave = (singleLink)=>{
778
- if (selectedState) {
779
- setSelectedState(false);
780
- setSelectedNodes(new Set());
781
- setSelectedLinks(new Set());
782
- }
783
- };
784
- const _onFocusLink = (focusEvent, singleLink, from)=>{
785
- // There is a big difference in how "Tab" and the "Arrow keys" are handled in this diagram.
786
- // In particular, I would expect the "Down" key to be like "Tab", but it jumps a little wildly. I'm not sure
787
- // if this behavior is an accessiblity violation, but it we might want to investigate it.
788
- focusEvent.persist();
789
- _onCloseCallout();
790
- const boundingRect = focusEvent.currentTarget.getBoundingClientRect();
791
- const clientX = boundingRect.left + boundingRect.width / 2;
792
- const clientY = boundingRect.top + boundingRect.height / 2;
793
- updatePosition(clientX, clientY);
794
- _linkCalloutAttributes(singleLink, from);
795
- };
796
- const _onCloseCallout = ()=>{
797
- setCalloutVisible(false);
798
- updatePosition(0, 0);
799
- setDescriptionMessage('');
800
- };
801
- const _onBlur = ()=>{
802
- /**/ };
803
- const _fillNodeColors = (singleNode)=>{
804
- if (!selectedState) {
805
- return singleNode.color;
806
- } else {
807
- if (selectedNode && selectedNodes.has(singleNode.index)) {
808
- return selectedNode.color;
809
- } else if (!selectedNode) {
810
- return singleNode.color;
811
- }
812
- return NON_SELECTED_NODE_AND_STREAM_COLOR;
813
- }
814
- };
815
- const _fillStreamColors = (singleLink, gradientUrl)=>{
816
- if (selectedState && selectedLinks.has(singleLink.index)) {
817
- return singleLink ? singleLink.color : selectedNode ? selectedNode.color : gradientUrl;
818
- }
819
- };
820
- const _fillStreamBorder = (singleLink, gradientUrl)=>{
821
- if (!selectedState) {
822
- return NON_SELECTED_NODE_AND_STREAM_COLOR;
823
- } else {
824
- if (selectedLinks.has(singleLink.index)) {
825
- return selectedNode ? selectedNode.borderColor : gradientUrl;
826
- }
827
- return NON_SELECTED_NODE_AND_STREAM_COLOR;
828
- }
829
- };
830
- const _fillNodeBorder = (singleNode)=>{
831
- if (!selectedState) {
832
- return singleNode.borderColor;
833
- } else {
834
- if (selectedNodes.has(singleNode.index)) {
835
- return selectedNode ? selectedNode.borderColor : singleNode.borderColor;
836
- }
837
- return singleNode.borderColor;
838
- }
839
- };
840
- const _getOpacityStream = (singleLink)=>{
841
- if (selectedState) {
842
- if (!selectedLinks.has(singleLink.index)) {
843
- return NON_SELECTED_OPACITY;
844
- } else if (!selectedNode) {
845
- return SELECTED_STREAM_OPACITY;
846
- }
847
- }
848
- return REST_STREAM_OPACITY;
849
- };
850
- const _getOpacityStreamBorder = (singleLink)=>{
851
- if (selectedState && !selectedLinks.has(singleLink.index) && !selectedNode) {
852
- return NON_SELECTED_STREAM_BORDER_OPACITY;
853
- }
854
- return NON_SELECTED_OPACITY;
855
- };
856
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
857
- const _showTooltip = (text, checkTrcuncated, evt)=>{
858
- if (_tooltip.current && checkTrcuncated) {
859
- //Fixing tooltip position by attaching it to the element rather than page
860
- (0, _d3selection.select)(_tooltip.current).style('opacity', 0.9).style('color', _reacttheme.tokens.colorNeutralForeground1).style('left', evt.pageX + 'px').style('top', evt.pageY - 28 + 'px').text(text);
861
- }
862
- };
863
- const _hideTooltip = ()=>{
864
- if (_tooltip.current) {
865
- (0, _d3selection.select)(_tooltip.current).style('opacity', 0);
866
- }
867
- };
868
- const _calculateChartMinWidth = ()=>{
869
- return _margins.current.left + _margins.current.right + // total width of all node columns
870
- _numColumns.current * NODE_WIDTH + // minimum total width of all column gaps
871
- (_numColumns.current - 1) * (NODE_WIDTH / 2);
872
- };
873
- const updatePosition = (newX, newY)=>{
874
- const threshold = 1; // Set a threshold for movement
875
- const { x, y } = clickPosition;
876
- // Calculate the distance moved
877
- const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));
878
- // Update the position only if the distance moved is greater than the threshold
879
- if (distance > threshold) {
880
- setClickPosition({
881
- x: newX,
882
- y: newY
883
- });
884
- }
885
- };
886
- // Prepare the localization utilities
887
- const _strings = _react.useMemo(()=>{
888
- var _props_strings;
889
- const fromString = ((_props_strings = props.strings) === null || _props_strings === void 0 ? void 0 : _props_strings.linkFrom) || 'From {0}';
890
- // NOTE: The `node` parameter is the sankey-generated node on the link, and not the original `node` supplied
891
- // by the caller.
892
- return {
893
- linkFrom: (node)=>(0, _string.format)(fromString, node.name)
894
- };
895
- }, [
896
- props.strings
897
- ]);
898
- const _accessibility = _react.useMemo(()=>{
899
- var _props_accessibility, _props_accessibility1, _props_accessibility2;
900
- const linkString = ((_props_accessibility = props.accessibility) === null || _props_accessibility === void 0 ? void 0 : _props_accessibility.linkAriaLabel) || 'link from {0} to {1} with weight {2}';
901
- const nodeString = ((_props_accessibility1 = props.accessibility) === null || _props_accessibility1 === void 0 ? void 0 : _props_accessibility1.nodeAriaLabel) || 'node {0} with weight {1}';
902
- return {
903
- emptyAriaLabel: ((_props_accessibility2 = props.accessibility) === null || _props_accessibility2 === void 0 ? void 0 : _props_accessibility2.emptyAriaLabel) || 'Graph has no data to display',
904
- linkAriaLabel: (link)=>(0, _string.format)(linkString, link.source.name, link.target.name, link.unnormalizedValue ? _formatNumber(link.unnormalizedValue) : link.unnormalizedValue),
905
- nodeAriaLabel: (node, weight)=>(0, _string.format)(nodeString, node.name, _formatNumber(weight))
906
- };
907
- }, [
908
- _formatNumber,
909
- props.accessibility
910
- ]);
911
- // Compute the position of each node and link
912
- const { nodes, links, width, height } = _react.useMemo(()=>_normalizeSankeyData(props.data.SankeyChartData, containerWidth, containerHeight, props.colorsForNodes, props.borderColorsForNodes), [
913
- _normalizeSankeyData,
914
- containerHeight,
915
- containerWidth,
916
- props.borderColorsForNodes,
917
- props.colorsForNodes,
918
- props.data
919
- ]);
920
- // Pre-compute some important attributes about nodes, specifically text
921
- const nodeAttributes = _react.useMemo(()=>_computeNodeAttributes(nodes, _accessibility.nodeAriaLabel), [
922
- _accessibility,
923
- _computeNodeAttributes,
924
- nodes
925
- ]);
926
- const linkAttributes = _react.useMemo(()=>computeLinkAttributes(links, _strings.linkFrom, _accessibility.linkAriaLabel, _linkId), [
927
- _accessibility,
928
- _linkId,
929
- _strings,
930
- links
931
- ]);
932
- if (!_isChartEmpty()) {
933
- // In FocusZone, the focus order is determined by the rendering order of the elements. We need to find
934
- // a rendering order such that the focus moves through the nodes and links in a logical sequence.
935
- // Rendering the nodes and links layer by layer in a vertical order seems to be the most effective solution
936
- // with FocusZone. Although this focus order may not be entirely logical, it ensures that the focus moves
937
- // sequentially and prevents links (especially skip layer links) from being rendered over the nodes.
938
- const nodeLinkDomOrderArray = [];
939
- nodes.sort((a, b)=>{
940
- if (a.x0 !== b.x0) {
941
- return a.x0 - b.x0;
942
- }
943
- return a.y0 - b.y0;
944
- });
945
- nodes.forEach((item, index)=>{
946
- nodeLinkDomOrderArray.push({
947
- layer: item.layer,
948
- type: 'node',
949
- index
950
- });
951
- });
952
- links.sort((a, b)=>{
953
- const asx0 = a.source.x0;
954
- const bsx0 = b.source.x0;
955
- if (asx0 !== bsx0) {
956
- return asx0 - bsx0;
957
- }
958
- return a.y0 - b.y0;
959
- });
960
- links.forEach((item, index)=>{
961
- nodeLinkDomOrderArray.push({
962
- layer: item.source.layer,
963
- type: 'link',
964
- index
965
- });
966
- });
967
- nodeLinkDomOrderArray.sort((a, b)=>{
968
- if (a.layer !== b.layer) {
969
- return a.layer - b.layer;
970
- }
971
- if (a.type > b.type) {
972
- return -1;
973
- }
974
- if (a.type < b.type) {
975
- return 1;
976
- }
977
- return 0;
978
- });
979
- // Build the nodes and links as rendered in the UX.
980
- const nodeData = _createNodes(nodes, nodeAttributes);
981
- const linkData = _createLinks(links, linkAttributes);
982
- const calloutProps = {
983
- isPopoverOpen: isCalloutVisible,
984
- clickPosition,
985
- color,
986
- XValue: xCalloutValue,
987
- YValue: yCalloutValue,
988
- descriptionMessage,
989
- ...props.calloutProps
990
- };
991
- return /*#__PURE__*/ _react.createElement("div", {
992
- className: classes.root,
993
- ref: chartContainer,
994
- onMouseLeave: _onCloseCallout
995
- }, /*#__PURE__*/ _react.createElement("div", {
996
- className: classes.chartWrapper,
997
- ..._arrowNavigationAttributes
998
- }, /*#__PURE__*/ _react.createElement("svg", {
999
- width: width,
1000
- height: height,
1001
- id: _chartId,
1002
- className: classes.chart
1003
- }, !props.hideLegend && props.data.chartTitle && /*#__PURE__*/ _react.createElement(_index1.ChartTitle, {
1004
- title: props.data.chartTitle,
1005
- x: width / 2,
1006
- maxWidth: width - 20,
1007
- className: classes.chartTitle,
1008
- titleStyles: props.titleStyles,
1009
- tooltipClassName: classes.svgTooltip
1010
- }), nodeLinkDomOrderArray.map((item)=>{
1011
- if (item.type === 'node') {
1012
- return /*#__PURE__*/ _react.createElement("g", {
1013
- key: nodes[item.index].nodeId,
1014
- className: classes.nodes
1015
- }, nodeData[item.index]);
1016
- } else {
1017
- return /*#__PURE__*/ _react.createElement("g", {
1018
- key: `${links[item.index].source.nodeId}-${links[item.index].target.nodeId}`,
1019
- className: classes.links,
1020
- stroke: props.pathColor ? props.pathColor : _reacttheme.tokens.colorStrokeFocus2,
1021
- strokeOpacity: 1
1022
- }, linkData[item.index]);
1023
- }
1024
- }))), calloutProps.isPopoverOpen && /*#__PURE__*/ _react.createElement(_index.ChartPopover, calloutProps), /*#__PURE__*/ _react.createElement("div", {
1025
- id: _labelTooltipId,
1026
- className: classes.toolTip,
1027
- style: {
1028
- opacity: 0
1029
- },
1030
- ref: _tooltip
1031
- }));
1032
- }
1033
- return /*#__PURE__*/ _react.createElement("div", {
1034
- id: _emptyChartId,
1035
- role: 'alert',
1036
- style: {
1037
- opacity: '0'
1038
- },
1039
- "aria-label": _accessibility.emptyAriaLabel
1040
- });
1041
- });
1042
- SankeyChart.displayName = 'SankeyChart';