@fluentui/react-charting 5.21.28 → 5.21.29

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 (742) hide show
  1. package/CHANGELOG.json +22 -1
  2. package/CHANGELOG.md +12 -2
  3. package/dist/react-charting.js +1 -0
  4. package/dist/react-charting.min.js +1 -0
  5. package/lib/AreaChart.js.map +1 -1
  6. package/lib/CartesianChart.js.map +1 -1
  7. package/lib/DonutChart.js.map +1 -1
  8. package/lib/GaugeChart.js.map +1 -1
  9. package/lib/GroupedVerticalBarChart.js.map +1 -1
  10. package/lib/HeatMapChart.js.map +1 -1
  11. package/lib/HorizontalBarChart.js.map +1 -1
  12. package/lib/HorizontalBarChartWithAxis.js.map +1 -1
  13. package/lib/Legends.js.map +1 -1
  14. package/lib/LineChart.js.map +1 -1
  15. package/lib/PieChart.js.map +1 -1
  16. package/lib/SankeyChart.js.map +1 -1
  17. package/lib/Sparkline.js.map +1 -1
  18. package/lib/StackedBarChart.js.map +1 -1
  19. package/lib/Styling.js.map +1 -1
  20. package/lib/TreeChart.js.map +1 -1
  21. package/lib/Utilities.js.map +1 -1
  22. package/lib/VerticalBarChart.js.map +1 -1
  23. package/lib/VerticalStackedBarChart.js.map +1 -1
  24. package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
  25. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  26. package/lib/components/AreaChart/AreaChart.styles.js.map +1 -1
  27. package/lib/components/AreaChart/AreaChart.types.js.map +1 -1
  28. package/lib/components/AreaChart/index.js.map +1 -1
  29. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  30. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  31. package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  32. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  33. package/lib/components/CommonComponents/index.js.map +1 -1
  34. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  35. package/lib/components/DonutChart/Arc/Arc.styles.js.map +1 -1
  36. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
  37. package/lib/components/DonutChart/Arc/index.js.map +1 -1
  38. package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
  39. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  40. package/lib/components/DonutChart/DonutChart.styles.js.map +1 -1
  41. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  42. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  43. package/lib/components/DonutChart/Pie/Pie.styles.js.map +1 -1
  44. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
  45. package/lib/components/DonutChart/Pie/index.js.map +1 -1
  46. package/lib/components/DonutChart/index.js.map +1 -1
  47. package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
  48. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  49. package/lib/components/GaugeChart/GaugeChart.styles.js.map +1 -1
  50. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  51. package/lib/components/GaugeChart/index.js.map +1 -1
  52. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  53. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  54. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js.map +1 -1
  55. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  56. package/lib/components/GroupedVerticalBarChart/index.js.map +1 -1
  57. package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  58. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  59. package/lib/components/HeatMapChart/HeatMapChart.styles.js.map +1 -1
  60. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  61. package/lib/components/HeatMapChart/index.js.map +1 -1
  62. package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  63. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  64. package/lib/components/HorizontalBarChart/HorizontalBarChart.styles.js.map +1 -1
  65. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  66. package/lib/components/HorizontalBarChart/index.js.map +1 -1
  67. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  68. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  69. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -1
  70. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  71. package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  72. package/lib/components/Legends/Legends.base.js.map +1 -1
  73. package/lib/components/Legends/Legends.js.map +1 -1
  74. package/lib/components/Legends/Legends.styles.js.map +1 -1
  75. package/lib/components/Legends/Legends.types.js.map +1 -1
  76. package/lib/components/Legends/index.js.map +1 -1
  77. package/lib/components/Legends/shape.js.map +1 -1
  78. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  79. package/lib/components/LineChart/LineChart.js.map +1 -1
  80. package/lib/components/LineChart/LineChart.styles.js.map +1 -1
  81. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  82. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  83. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  84. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  85. package/lib/components/LineChart/index.js.map +1 -1
  86. package/lib/components/PieChart/Arc/Arc.js.map +1 -1
  87. package/lib/components/PieChart/Arc/Arc.styles.js.map +1 -1
  88. package/lib/components/PieChart/Arc/Arc.types.js.map +1 -1
  89. package/lib/components/PieChart/Arc/index.js.map +1 -1
  90. package/lib/components/PieChart/Pie/Pie.js.map +1 -1
  91. package/lib/components/PieChart/Pie/Pie.styles.js.map +1 -1
  92. package/lib/components/PieChart/Pie/Pie.types.js.map +1 -1
  93. package/lib/components/PieChart/Pie/index.js.map +1 -1
  94. package/lib/components/PieChart/PieChart.base.js.map +1 -1
  95. package/lib/components/PieChart/PieChart.js.map +1 -1
  96. package/lib/components/PieChart/PieChart.styles.js.map +1 -1
  97. package/lib/components/PieChart/PieChart.types.js.map +1 -1
  98. package/lib/components/PieChart/index.js.map +1 -1
  99. package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
  100. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  101. package/lib/components/SankeyChart/SankeyChart.styles.js.map +1 -1
  102. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  103. package/lib/components/SankeyChart/index.js.map +1 -1
  104. package/lib/components/Sparkline/Sparkline.base.js.map +1 -1
  105. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  106. package/lib/components/Sparkline/Sparkline.styles.js.map +1 -1
  107. package/lib/components/Sparkline/Sparkline.types.js.map +1 -1
  108. package/lib/components/Sparkline/index.js.map +1 -1
  109. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  110. package/lib/components/StackedBarChart/MultiStackedBarChart.js.map +1 -1
  111. package/lib/components/StackedBarChart/MultiStackedBarChart.styles.js.map +1 -1
  112. package/lib/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -1
  113. package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  114. package/lib/components/StackedBarChart/StackedBarChart.js.map +1 -1
  115. package/lib/components/StackedBarChart/StackedBarChart.styles.js.map +1 -1
  116. package/lib/components/StackedBarChart/StackedBarChart.types.js.map +1 -1
  117. package/lib/components/StackedBarChart/index.js.map +1 -1
  118. package/lib/components/TreeChart/TreeChart.base.js.map +1 -1
  119. package/lib/components/TreeChart/TreeChart.js.map +1 -1
  120. package/lib/components/TreeChart/TreeChart.styles.js.map +1 -1
  121. package/lib/components/TreeChart/TreeChart.types.js.map +1 -1
  122. package/lib/components/TreeChart/index.js.map +1 -1
  123. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  124. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  125. package/lib/components/VerticalBarChart/VerticalBarChart.styles.js.map +1 -1
  126. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  127. package/lib/components/VerticalBarChart/index.js.map +1 -1
  128. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  129. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  130. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js.map +1 -1
  131. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  132. package/lib/components/VerticalStackedBarChart/index.js.map +1 -1
  133. package/lib/index.js.map +1 -1
  134. package/lib/types/IDataPoint.js.map +1 -1
  135. package/lib/types/IEventAnnotation.js.map +1 -1
  136. package/lib/types/ILegendDataItem.js.map +1 -1
  137. package/lib/types/index.js.map +1 -1
  138. package/lib/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -1
  139. package/lib/utilities/ChartHoverCard/ChartHoverCard.js.map +1 -1
  140. package/lib/utilities/ChartHoverCard/ChartHoverCard.styles.js.map +1 -1
  141. package/lib/utilities/ChartHoverCard/ChartHoverCard.types.js.map +1 -1
  142. package/lib/utilities/ChartHoverCard/index.js.map +1 -1
  143. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  144. package/lib/utilities/SVGTooltipText.js.map +1 -1
  145. package/lib/utilities/colors.js.map +1 -1
  146. package/lib/utilities/index.js.map +1 -1
  147. package/lib/utilities/locale-util.js.map +1 -1
  148. package/lib/utilities/test-data.js.map +1 -1
  149. package/lib/utilities/utilities.js.map +1 -1
  150. package/lib/utilities/vbc-utils.js.map +1 -1
  151. package/lib/version.js +1 -1
  152. package/lib/version.js.map +1 -1
  153. package/lib-amd/AreaChart.d.ts +1 -0
  154. package/lib-amd/AreaChart.js +6 -0
  155. package/lib-amd/AreaChart.js.map +1 -0
  156. package/lib-amd/CartesianChart.d.ts +1 -0
  157. package/lib-amd/CartesianChart.js +6 -0
  158. package/lib-amd/CartesianChart.js.map +1 -0
  159. package/lib-amd/DonutChart.d.ts +1 -0
  160. package/lib-amd/DonutChart.js +6 -0
  161. package/lib-amd/DonutChart.js.map +1 -0
  162. package/lib-amd/GaugeChart.d.ts +1 -0
  163. package/lib-amd/GaugeChart.js +6 -0
  164. package/lib-amd/GaugeChart.js.map +1 -0
  165. package/lib-amd/GroupedVerticalBarChart.d.ts +1 -0
  166. package/lib-amd/GroupedVerticalBarChart.js +6 -0
  167. package/lib-amd/GroupedVerticalBarChart.js.map +1 -0
  168. package/lib-amd/HeatMapChart.d.ts +1 -0
  169. package/lib-amd/HeatMapChart.js +6 -0
  170. package/lib-amd/HeatMapChart.js.map +1 -0
  171. package/lib-amd/HorizontalBarChart.d.ts +1 -0
  172. package/lib-amd/HorizontalBarChart.js +6 -0
  173. package/lib-amd/HorizontalBarChart.js.map +1 -0
  174. package/lib-amd/HorizontalBarChartWithAxis.d.ts +1 -0
  175. package/lib-amd/HorizontalBarChartWithAxis.js +6 -0
  176. package/lib-amd/HorizontalBarChartWithAxis.js.map +1 -0
  177. package/lib-amd/Legends.d.ts +1 -0
  178. package/lib-amd/Legends.js +6 -0
  179. package/lib-amd/Legends.js.map +1 -0
  180. package/lib-amd/LineChart.d.ts +1 -0
  181. package/lib-amd/LineChart.js +6 -0
  182. package/lib-amd/LineChart.js.map +1 -0
  183. package/lib-amd/PieChart.d.ts +1 -0
  184. package/lib-amd/PieChart.js +6 -0
  185. package/lib-amd/PieChart.js.map +1 -0
  186. package/lib-amd/SankeyChart.d.ts +1 -0
  187. package/lib-amd/SankeyChart.js +6 -0
  188. package/lib-amd/SankeyChart.js.map +1 -0
  189. package/lib-amd/Sparkline.d.ts +1 -0
  190. package/lib-amd/Sparkline.js +6 -0
  191. package/lib-amd/Sparkline.js.map +1 -0
  192. package/lib-amd/StackedBarChart.d.ts +1 -0
  193. package/lib-amd/StackedBarChart.js +6 -0
  194. package/lib-amd/StackedBarChart.js.map +1 -0
  195. package/lib-amd/Styling.d.ts +2 -0
  196. package/lib-amd/Styling.js +75 -0
  197. package/lib-amd/Styling.js.map +1 -0
  198. package/lib-amd/TreeChart.d.ts +1 -0
  199. package/lib-amd/TreeChart.js +6 -0
  200. package/lib-amd/TreeChart.js.map +1 -0
  201. package/lib-amd/Utilities.d.ts +2 -0
  202. package/lib-amd/Utilities.js +183 -0
  203. package/lib-amd/Utilities.js.map +1 -0
  204. package/lib-amd/VerticalBarChart.d.ts +1 -0
  205. package/lib-amd/VerticalBarChart.js +6 -0
  206. package/lib-amd/VerticalBarChart.js.map +1 -0
  207. package/lib-amd/VerticalStackedBarChart.d.ts +1 -0
  208. package/lib-amd/VerticalStackedBarChart.js +6 -0
  209. package/lib-amd/VerticalStackedBarChart.js.map +1 -0
  210. package/lib-amd/components/AreaChart/AreaChart.base.d.ts +103 -0
  211. package/lib-amd/components/AreaChart/AreaChart.base.js +652 -0
  212. package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -0
  213. package/lib-amd/components/AreaChart/AreaChart.d.ts +7 -0
  214. package/lib-amd/components/AreaChart/AreaChart.js +12 -0
  215. package/lib-amd/components/AreaChart/AreaChart.js.map +1 -0
  216. package/lib-amd/components/AreaChart/AreaChart.styles.d.ts +2 -0
  217. package/lib-amd/components/AreaChart/AreaChart.styles.js +12 -0
  218. package/lib-amd/components/AreaChart/AreaChart.styles.js.map +1 -0
  219. package/lib-amd/components/AreaChart/AreaChart.types.d.ts +59 -0
  220. package/lib-amd/components/AreaChart/AreaChart.types.js +5 -0
  221. package/lib-amd/components/AreaChart/AreaChart.types.js.map +1 -0
  222. package/lib-amd/components/AreaChart/index.d.ts +2 -0
  223. package/lib-amd/components/AreaChart/index.js +7 -0
  224. package/lib-amd/components/AreaChart/index.js.map +1 -0
  225. package/lib-amd/components/CommonComponents/CartesianChart.base.d.ts +62 -0
  226. package/lib-amd/components/CommonComponents/CartesianChart.base.js +593 -0
  227. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -0
  228. package/lib-amd/components/CommonComponents/CartesianChart.d.ts +7 -0
  229. package/lib-amd/components/CommonComponents/CartesianChart.js +11 -0
  230. package/lib-amd/components/CommonComponents/CartesianChart.js.map +1 -0
  231. package/lib-amd/components/CommonComponents/CartesianChart.styles.d.ts +2 -0
  232. package/lib-amd/components/CommonComponents/CartesianChart.styles.js +180 -0
  233. package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -0
  234. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +528 -0
  235. package/lib-amd/components/CommonComponents/CartesianChart.types.js +5 -0
  236. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -0
  237. package/lib-amd/components/CommonComponents/index.d.ts +2 -0
  238. package/lib-amd/components/CommonComponents/index.js +7 -0
  239. package/lib-amd/components/CommonComponents/index.js.map +1 -0
  240. package/lib-amd/components/DonutChart/Arc/Arc.d.ts +21 -0
  241. package/lib-amd/components/DonutChart/Arc/Arc.js +88 -0
  242. package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -0
  243. package/lib-amd/components/DonutChart/Arc/Arc.styles.d.ts +2 -0
  244. package/lib-amd/components/DonutChart/Arc/Arc.styles.js +33 -0
  245. package/lib-amd/components/DonutChart/Arc/Arc.styles.js.map +1 -0
  246. package/lib-amd/components/DonutChart/Arc/Arc.types.d.ts +124 -0
  247. package/lib-amd/components/DonutChart/Arc/Arc.types.js +5 -0
  248. package/lib-amd/components/DonutChart/Arc/Arc.types.js.map +1 -0
  249. package/lib-amd/components/DonutChart/Arc/index.d.ts +2 -0
  250. package/lib-amd/components/DonutChart/Arc/index.js +7 -0
  251. package/lib-amd/components/DonutChart/Arc/index.js.map +1 -0
  252. package/lib-amd/components/DonutChart/DonutChart.base.d.ts +54 -0
  253. package/lib-amd/components/DonutChart/DonutChart.base.js +241 -0
  254. package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -0
  255. package/lib-amd/components/DonutChart/DonutChart.d.ts +7 -0
  256. package/lib-amd/components/DonutChart/DonutChart.js +12 -0
  257. package/lib-amd/components/DonutChart/DonutChart.js.map +1 -0
  258. package/lib-amd/components/DonutChart/DonutChart.styles.d.ts +2 -0
  259. package/lib-amd/components/DonutChart/DonutChart.styles.js +36 -0
  260. package/lib-amd/components/DonutChart/DonutChart.styles.js.map +1 -0
  261. package/lib-amd/components/DonutChart/DonutChart.types.d.ts +75 -0
  262. package/lib-amd/components/DonutChart/DonutChart.types.js +5 -0
  263. package/lib-amd/components/DonutChart/DonutChart.types.js.map +1 -0
  264. package/lib-amd/components/DonutChart/Pie/Pie.d.ts +15 -0
  265. package/lib-amd/components/DonutChart/Pie/Pie.js +67 -0
  266. package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -0
  267. package/lib-amd/components/DonutChart/Pie/Pie.styles.d.ts +2 -0
  268. package/lib-amd/components/DonutChart/Pie/Pie.styles.js +24 -0
  269. package/lib-amd/components/DonutChart/Pie/Pie.styles.js.map +1 -0
  270. package/lib-amd/components/DonutChart/Pie/Pie.types.d.ts +96 -0
  271. package/lib-amd/components/DonutChart/Pie/Pie.types.js +5 -0
  272. package/lib-amd/components/DonutChart/Pie/Pie.types.js.map +1 -0
  273. package/lib-amd/components/DonutChart/Pie/index.d.ts +2 -0
  274. package/lib-amd/components/DonutChart/Pie/index.js +7 -0
  275. package/lib-amd/components/DonutChart/Pie/index.js.map +1 -0
  276. package/lib-amd/components/DonutChart/index.d.ts +3 -0
  277. package/lib-amd/components/DonutChart/index.js +8 -0
  278. package/lib-amd/components/DonutChart/index.js.map +1 -0
  279. package/lib-amd/components/GaugeChart/GaugeChart.base.d.ts +75 -0
  280. package/lib-amd/components/GaugeChart/GaugeChart.base.js +410 -0
  281. package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -0
  282. package/lib-amd/components/GaugeChart/GaugeChart.d.ts +7 -0
  283. package/lib-amd/components/GaugeChart/GaugeChart.js +11 -0
  284. package/lib-amd/components/GaugeChart/GaugeChart.js.map +1 -0
  285. package/lib-amd/components/GaugeChart/GaugeChart.styles.d.ts +2 -0
  286. package/lib-amd/components/GaugeChart/GaugeChart.styles.js +122 -0
  287. package/lib-amd/components/GaugeChart/GaugeChart.styles.js.map +1 -0
  288. package/lib-amd/components/GaugeChart/GaugeChart.types.d.ts +238 -0
  289. package/lib-amd/components/GaugeChart/GaugeChart.types.js +22 -0
  290. package/lib-amd/components/GaugeChart/GaugeChart.types.js.map +1 -0
  291. package/lib-amd/components/GaugeChart/index.d.ts +2 -0
  292. package/lib-amd/components/GaugeChart/index.js +7 -0
  293. package/lib-amd/components/GaugeChart/index.js.map +1 -0
  294. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +72 -0
  295. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +425 -0
  296. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -0
  297. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.d.ts +7 -0
  298. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +12 -0
  299. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -0
  300. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.d.ts +2 -0
  301. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js +21 -0
  302. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js.map +1 -0
  303. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +111 -0
  304. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +5 -0
  305. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -0
  306. package/lib-amd/components/GroupedVerticalBarChart/index.d.ts +2 -0
  307. package/lib-amd/components/GroupedVerticalBarChart/index.js +7 -0
  308. package/lib-amd/components/GroupedVerticalBarChart/index.js.map +1 -0
  309. package/lib-amd/components/HeatMapChart/HeatMapChart.base.d.ts +152 -0
  310. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +538 -0
  311. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -0
  312. package/lib-amd/components/HeatMapChart/HeatMapChart.d.ts +7 -0
  313. package/lib-amd/components/HeatMapChart/HeatMapChart.js +11 -0
  314. package/lib-amd/components/HeatMapChart/HeatMapChart.js.map +1 -0
  315. package/lib-amd/components/HeatMapChart/HeatMapChart.styles.d.ts +2 -0
  316. package/lib-amd/components/HeatMapChart/HeatMapChart.styles.js +29 -0
  317. package/lib-amd/components/HeatMapChart/HeatMapChart.styles.js.map +1 -0
  318. package/lib-amd/components/HeatMapChart/HeatMapChart.types.d.ts +122 -0
  319. package/lib-amd/components/HeatMapChart/HeatMapChart.types.js +5 -0
  320. package/lib-amd/components/HeatMapChart/HeatMapChart.types.js.map +1 -0
  321. package/lib-amd/components/HeatMapChart/index.d.ts +2 -0
  322. package/lib-amd/components/HeatMapChart/index.js +7 -0
  323. package/lib-amd/components/HeatMapChart/index.js.map +1 -0
  324. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.d.ts +47 -0
  325. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js +270 -0
  326. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -0
  327. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.d.ts +7 -0
  328. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.js +12 -0
  329. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
  330. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.styles.d.ts +2 -0
  331. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.styles.js +69 -0
  332. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.styles.js.map +1 -0
  333. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.d.ts +188 -0
  334. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.js +14 -0
  335. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -0
  336. package/lib-amd/components/HorizontalBarChart/index.d.ts +3 -0
  337. package/lib-amd/components/HorizontalBarChart/index.js +8 -0
  338. package/lib-amd/components/HorizontalBarChart/index.js.map +1 -0
  339. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +61 -0
  340. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +499 -0
  341. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -0
  342. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.d.ts +7 -0
  343. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +12 -0
  344. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -0
  345. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.d.ts +2 -0
  346. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js +17 -0
  347. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -0
  348. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +112 -0
  349. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +5 -0
  350. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -0
  351. package/lib-amd/components/HorizontalBarChartWithAxis/index.d.ts +2 -0
  352. package/lib-amd/components/HorizontalBarChartWithAxis/index.js +7 -0
  353. package/lib-amd/components/HorizontalBarChartWithAxis/index.js.map +1 -0
  354. package/lib-amd/components/Legends/Legends.base.d.ts +43 -0
  355. package/lib-amd/components/Legends/Legends.base.js +308 -0
  356. package/lib-amd/components/Legends/Legends.base.js.map +1 -0
  357. package/lib-amd/components/Legends/Legends.d.ts +7 -0
  358. package/lib-amd/components/Legends/Legends.js +11 -0
  359. package/lib-amd/components/Legends/Legends.js.map +1 -0
  360. package/lib-amd/components/Legends/Legends.styles.d.ts +2 -0
  361. package/lib-amd/components/Legends/Legends.styles.js +111 -0
  362. package/lib-amd/components/Legends/Legends.styles.js.map +1 -0
  363. package/lib-amd/components/Legends/Legends.types.d.ts +210 -0
  364. package/lib-amd/components/Legends/Legends.types.js +5 -0
  365. package/lib-amd/components/Legends/Legends.types.js.map +1 -0
  366. package/lib-amd/components/Legends/index.d.ts +3 -0
  367. package/lib-amd/components/Legends/index.js +8 -0
  368. package/lib-amd/components/Legends/index.js.map +1 -0
  369. package/lib-amd/components/Legends/shape.d.ts +9 -0
  370. package/lib-amd/components/Legends/shape.js +27 -0
  371. package/lib-amd/components/Legends/shape.js.map +1 -0
  372. package/lib-amd/components/LineChart/LineChart.base.d.ts +92 -0
  373. package/lib-amd/components/LineChart/LineChart.base.js +861 -0
  374. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -0
  375. package/lib-amd/components/LineChart/LineChart.d.ts +7 -0
  376. package/lib-amd/components/LineChart/LineChart.js +12 -0
  377. package/lib-amd/components/LineChart/LineChart.js.map +1 -0
  378. package/lib-amd/components/LineChart/LineChart.styles.d.ts +2 -0
  379. package/lib-amd/components/LineChart/LineChart.styles.js +12 -0
  380. package/lib-amd/components/LineChart/LineChart.styles.js.map +1 -0
  381. package/lib-amd/components/LineChart/LineChart.types.d.ts +98 -0
  382. package/lib-amd/components/LineChart/LineChart.types.js +5 -0
  383. package/lib-amd/components/LineChart/LineChart.types.js.map +1 -0
  384. package/lib-amd/components/LineChart/eventAnnotation/EventAnnotation.d.ts +12 -0
  385. package/lib-amd/components/LineChart/eventAnnotation/EventAnnotation.js +97 -0
  386. package/lib-amd/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -0
  387. package/lib-amd/components/LineChart/eventAnnotation/LabelLink.d.ts +24 -0
  388. package/lib-amd/components/LineChart/eventAnnotation/LabelLink.js +42 -0
  389. package/lib-amd/components/LineChart/eventAnnotation/LabelLink.js.map +1 -0
  390. package/lib-amd/components/LineChart/eventAnnotation/Textbox.d.ts +13 -0
  391. package/lib-amd/components/LineChart/eventAnnotation/Textbox.js +40 -0
  392. package/lib-amd/components/LineChart/eventAnnotation/Textbox.js.map +1 -0
  393. package/lib-amd/components/LineChart/index.d.ts +3 -0
  394. package/lib-amd/components/LineChart/index.js +8 -0
  395. package/lib-amd/components/LineChart/index.js.map +1 -0
  396. package/lib-amd/components/PieChart/Arc/Arc.d.ts +17 -0
  397. package/lib-amd/components/PieChart/Arc/Arc.js +85 -0
  398. package/lib-amd/components/PieChart/Arc/Arc.js.map +1 -0
  399. package/lib-amd/components/PieChart/Arc/Arc.styles.d.ts +3 -0
  400. package/lib-amd/components/PieChart/Arc/Arc.styles.js +16 -0
  401. package/lib-amd/components/PieChart/Arc/Arc.styles.js.map +1 -0
  402. package/lib-amd/components/PieChart/Arc/Arc.types.d.ts +73 -0
  403. package/lib-amd/components/PieChart/Arc/Arc.types.js +5 -0
  404. package/lib-amd/components/PieChart/Arc/Arc.types.js.map +1 -0
  405. package/lib-amd/components/PieChart/Arc/index.d.ts +2 -0
  406. package/lib-amd/components/PieChart/Arc/index.js +7 -0
  407. package/lib-amd/components/PieChart/Arc/index.js.map +1 -0
  408. package/lib-amd/components/PieChart/Pie/Pie.d.ts +10 -0
  409. package/lib-amd/components/PieChart/Pie/Pie.js +43 -0
  410. package/lib-amd/components/PieChart/Pie/Pie.js.map +1 -0
  411. package/lib-amd/components/PieChart/Pie/Pie.styles.d.ts +2 -0
  412. package/lib-amd/components/PieChart/Pie/Pie.styles.js +12 -0
  413. package/lib-amd/components/PieChart/Pie/Pie.styles.js.map +1 -0
  414. package/lib-amd/components/PieChart/Pie/Pie.types.d.ts +47 -0
  415. package/lib-amd/components/PieChart/Pie/Pie.types.js +5 -0
  416. package/lib-amd/components/PieChart/Pie/Pie.types.js.map +1 -0
  417. package/lib-amd/components/PieChart/Pie/index.d.ts +2 -0
  418. package/lib-amd/components/PieChart/Pie/index.js +7 -0
  419. package/lib-amd/components/PieChart/Pie/index.js.map +1 -0
  420. package/lib-amd/components/PieChart/PieChart.base.d.ts +10 -0
  421. package/lib-amd/components/PieChart/PieChart.base.js +46 -0
  422. package/lib-amd/components/PieChart/PieChart.base.js.map +1 -0
  423. package/lib-amd/components/PieChart/PieChart.d.ts +7 -0
  424. package/lib-amd/components/PieChart/PieChart.js +12 -0
  425. package/lib-amd/components/PieChart/PieChart.js.map +1 -0
  426. package/lib-amd/components/PieChart/PieChart.styles.d.ts +2 -0
  427. package/lib-amd/components/PieChart/PieChart.styles.js +34 -0
  428. package/lib-amd/components/PieChart/PieChart.styles.js.map +1 -0
  429. package/lib-amd/components/PieChart/PieChart.types.d.ts +75 -0
  430. package/lib-amd/components/PieChart/PieChart.types.js +5 -0
  431. package/lib-amd/components/PieChart/PieChart.types.js.map +1 -0
  432. package/lib-amd/components/PieChart/index.d.ts +2 -0
  433. package/lib-amd/components/PieChart/index.js +7 -0
  434. package/lib-amd/components/PieChart/index.js.map +1 -0
  435. package/lib-amd/components/SankeyChart/SankeyChart.base.d.ts +90 -0
  436. package/lib-amd/components/SankeyChart/SankeyChart.base.js +930 -0
  437. package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -0
  438. package/lib-amd/components/SankeyChart/SankeyChart.d.ts +7 -0
  439. package/lib-amd/components/SankeyChart/SankeyChart.js +12 -0
  440. package/lib-amd/components/SankeyChart/SankeyChart.js.map +1 -0
  441. package/lib-amd/components/SankeyChart/SankeyChart.styles.d.ts +2 -0
  442. package/lib-amd/components/SankeyChart/SankeyChart.styles.js +65 -0
  443. package/lib-amd/components/SankeyChart/SankeyChart.styles.js.map +1 -0
  444. package/lib-amd/components/SankeyChart/SankeyChart.types.d.ts +146 -0
  445. package/lib-amd/components/SankeyChart/SankeyChart.types.js +5 -0
  446. package/lib-amd/components/SankeyChart/SankeyChart.types.js.map +1 -0
  447. package/lib-amd/components/SankeyChart/index.d.ts +2 -0
  448. package/lib-amd/components/SankeyChart/index.js +7 -0
  449. package/lib-amd/components/SankeyChart/index.js.map +1 -0
  450. package/lib-amd/components/Sparkline/Sparkline.base.d.ts +23 -0
  451. package/lib-amd/components/Sparkline/Sparkline.base.js +84 -0
  452. package/lib-amd/components/Sparkline/Sparkline.base.js.map +1 -0
  453. package/lib-amd/components/Sparkline/Sparkline.d.ts +7 -0
  454. package/lib-amd/components/Sparkline/Sparkline.js +12 -0
  455. package/lib-amd/components/Sparkline/Sparkline.js.map +1 -0
  456. package/lib-amd/components/Sparkline/Sparkline.styles.d.ts +2 -0
  457. package/lib-amd/components/Sparkline/Sparkline.styles.js +15 -0
  458. package/lib-amd/components/Sparkline/Sparkline.styles.js.map +1 -0
  459. package/lib-amd/components/Sparkline/Sparkline.types.d.ts +59 -0
  460. package/lib-amd/components/Sparkline/Sparkline.types.js +5 -0
  461. package/lib-amd/components/Sparkline/Sparkline.types.js.map +1 -0
  462. package/lib-amd/components/Sparkline/index.d.ts +2 -0
  463. package/lib-amd/components/Sparkline/index.js +7 -0
  464. package/lib-amd/components/Sparkline/index.js.map +1 -0
  465. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.d.ts +70 -0
  466. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +412 -0
  467. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -0
  468. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.d.ts +7 -0
  469. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.js +12 -0
  470. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.js.map +1 -0
  471. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.styles.d.ts +2 -0
  472. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.styles.js +89 -0
  473. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.styles.js.map +1 -0
  474. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.d.ts +213 -0
  475. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.js +14 -0
  476. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -0
  477. package/lib-amd/components/StackedBarChart/StackedBarChart.base.d.ts +63 -0
  478. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +349 -0
  479. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -0
  480. package/lib-amd/components/StackedBarChart/StackedBarChart.d.ts +7 -0
  481. package/lib-amd/components/StackedBarChart/StackedBarChart.js +12 -0
  482. package/lib-amd/components/StackedBarChart/StackedBarChart.js.map +1 -0
  483. package/lib-amd/components/StackedBarChart/StackedBarChart.styles.d.ts +2 -0
  484. package/lib-amd/components/StackedBarChart/StackedBarChart.styles.js +107 -0
  485. package/lib-amd/components/StackedBarChart/StackedBarChart.styles.js.map +1 -0
  486. package/lib-amd/components/StackedBarChart/StackedBarChart.types.d.ts +222 -0
  487. package/lib-amd/components/StackedBarChart/StackedBarChart.types.js +5 -0
  488. package/lib-amd/components/StackedBarChart/StackedBarChart.types.js.map +1 -0
  489. package/lib-amd/components/StackedBarChart/index.d.ts +5 -0
  490. package/lib-amd/components/StackedBarChart/index.js +10 -0
  491. package/lib-amd/components/StackedBarChart/index.js.map +1 -0
  492. package/lib-amd/components/TreeChart/TreeChart.base.d.ts +18 -0
  493. package/lib-amd/components/TreeChart/TreeChart.base.js +320 -0
  494. package/lib-amd/components/TreeChart/TreeChart.base.js.map +1 -0
  495. package/lib-amd/components/TreeChart/TreeChart.d.ts +7 -0
  496. package/lib-amd/components/TreeChart/TreeChart.js +11 -0
  497. package/lib-amd/components/TreeChart/TreeChart.js.map +1 -0
  498. package/lib-amd/components/TreeChart/TreeChart.styles.d.ts +2 -0
  499. package/lib-amd/components/TreeChart/TreeChart.styles.js +34 -0
  500. package/lib-amd/components/TreeChart/TreeChart.styles.js.map +1 -0
  501. package/lib-amd/components/TreeChart/TreeChart.types.d.ts +216 -0
  502. package/lib-amd/components/TreeChart/TreeChart.types.js +34 -0
  503. package/lib-amd/components/TreeChart/TreeChart.types.js.map +1 -0
  504. package/lib-amd/components/TreeChart/index.d.ts +2 -0
  505. package/lib-amd/components/TreeChart/index.js +7 -0
  506. package/lib-amd/components/TreeChart/index.js.map +1 -0
  507. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.d.ts +84 -0
  508. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +738 -0
  509. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -0
  510. package/lib-amd/components/VerticalBarChart/VerticalBarChart.d.ts +7 -0
  511. package/lib-amd/components/VerticalBarChart/VerticalBarChart.js +12 -0
  512. package/lib-amd/components/VerticalBarChart/VerticalBarChart.js.map +1 -0
  513. package/lib-amd/components/VerticalBarChart/VerticalBarChart.styles.d.ts +2 -0
  514. package/lib-amd/components/VerticalBarChart/VerticalBarChart.styles.js +32 -0
  515. package/lib-amd/components/VerticalBarChart/VerticalBarChart.styles.js.map +1 -0
  516. package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.d.ts +145 -0
  517. package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.js +5 -0
  518. package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -0
  519. package/lib-amd/components/VerticalBarChart/index.d.ts +2 -0
  520. package/lib-amd/components/VerticalBarChart/index.js +7 -0
  521. package/lib-amd/components/VerticalBarChart/index.js.map +1 -0
  522. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +92 -0
  523. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +754 -0
  524. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -0
  525. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.d.ts +7 -0
  526. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.js +12 -0
  527. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -0
  528. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.d.ts +2 -0
  529. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js +22 -0
  530. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js.map +1 -0
  531. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +172 -0
  532. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +5 -0
  533. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -0
  534. package/lib-amd/components/VerticalStackedBarChart/index.d.ts +2 -0
  535. package/lib-amd/components/VerticalStackedBarChart/index.js +7 -0
  536. package/lib-amd/components/VerticalStackedBarChart/index.js.map +1 -0
  537. package/lib-amd/index.d.ts +21 -0
  538. package/lib-amd/index.js +25 -0
  539. package/lib-amd/index.js.map +1 -0
  540. package/lib-amd/types/IDataPoint.d.ts +687 -0
  541. package/lib-amd/types/IDataPoint.js +5 -0
  542. package/lib-amd/types/IDataPoint.js.map +1 -0
  543. package/lib-amd/types/IEventAnnotation.d.ts +6 -0
  544. package/lib-amd/types/IEventAnnotation.js +5 -0
  545. package/lib-amd/types/IEventAnnotation.js.map +1 -0
  546. package/lib-amd/types/ILegendDataItem.d.ts +10 -0
  547. package/lib-amd/types/ILegendDataItem.js +5 -0
  548. package/lib-amd/types/ILegendDataItem.js.map +1 -0
  549. package/lib-amd/types/index.d.ts +2 -0
  550. package/lib-amd/types/index.js +7 -0
  551. package/lib-amd/types/index.js.map +1 -0
  552. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.base.d.ts +6 -0
  553. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.base.js +39 -0
  554. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -0
  555. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.d.ts +3 -0
  556. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.js +8 -0
  557. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.js.map +1 -0
  558. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.styles.d.ts +2 -0
  559. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.styles.js +103 -0
  560. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.styles.js.map +1 -0
  561. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.types.d.ts +105 -0
  562. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.types.js +5 -0
  563. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.types.js.map +1 -0
  564. package/lib-amd/utilities/ChartHoverCard/index.d.ts +3 -0
  565. package/lib-amd/utilities/ChartHoverCard/index.js +8 -0
  566. package/lib-amd/utilities/ChartHoverCard/index.js.map +1 -0
  567. package/lib-amd/utilities/FocusableTooltipText.d.ts +27 -0
  568. package/lib-amd/utilities/FocusableTooltipText.js +54 -0
  569. package/lib-amd/utilities/FocusableTooltipText.js.map +1 -0
  570. package/lib-amd/utilities/SVGTooltipText.d.ts +95 -0
  571. package/lib-amd/utilities/SVGTooltipText.js +175 -0
  572. package/lib-amd/utilities/SVGTooltipText.js.map +1 -0
  573. package/lib-amd/utilities/colors.d.ts +51 -0
  574. package/lib-amd/utilities/colors.js +139 -0
  575. package/lib-amd/utilities/colors.js.map +1 -0
  576. package/lib-amd/utilities/index.d.ts +4 -0
  577. package/lib-amd/utilities/index.js +9 -0
  578. package/lib-amd/utilities/index.js.map +1 -0
  579. package/lib-amd/utilities/locale-util.d.ts +3 -0
  580. package/lib-amd/utilities/locale-util.js +24 -0
  581. package/lib-amd/utilities/locale-util.js.map +1 -0
  582. package/lib-amd/utilities/test-data.d.ts +27 -0
  583. package/lib-amd/utilities/test-data.js +214 -0
  584. package/lib-amd/utilities/test-data.js.map +1 -0
  585. package/lib-amd/utilities/utilities.d.ts +411 -0
  586. package/lib-amd/utilities/utilities.js +1085 -0
  587. package/lib-amd/utilities/utilities.js.map +1 -0
  588. package/lib-amd/utilities/vbc-utils.d.ts +2 -0
  589. package/lib-amd/utilities/vbc-utils.js +38 -0
  590. package/lib-amd/utilities/vbc-utils.js.map +1 -0
  591. package/lib-amd/version.d.ts +1 -0
  592. package/lib-amd/version.js +6 -0
  593. package/lib-amd/version.js.map +1 -0
  594. package/lib-commonjs/AreaChart.js.map +1 -1
  595. package/lib-commonjs/CartesianChart.js.map +1 -1
  596. package/lib-commonjs/DonutChart.js.map +1 -1
  597. package/lib-commonjs/GaugeChart.js.map +1 -1
  598. package/lib-commonjs/GroupedVerticalBarChart.js.map +1 -1
  599. package/lib-commonjs/HeatMapChart.js.map +1 -1
  600. package/lib-commonjs/HorizontalBarChart.js.map +1 -1
  601. package/lib-commonjs/HorizontalBarChartWithAxis.js.map +1 -1
  602. package/lib-commonjs/Legends.js.map +1 -1
  603. package/lib-commonjs/LineChart.js.map +1 -1
  604. package/lib-commonjs/PieChart.js.map +1 -1
  605. package/lib-commonjs/SankeyChart.js.map +1 -1
  606. package/lib-commonjs/Sparkline.js.map +1 -1
  607. package/lib-commonjs/StackedBarChart.js.map +1 -1
  608. package/lib-commonjs/Styling.js.map +1 -1
  609. package/lib-commonjs/TreeChart.js.map +1 -1
  610. package/lib-commonjs/Utilities.js.map +1 -1
  611. package/lib-commonjs/VerticalBarChart.js.map +1 -1
  612. package/lib-commonjs/VerticalStackedBarChart.js.map +1 -1
  613. package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
  614. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  615. package/lib-commonjs/components/AreaChart/AreaChart.styles.js.map +1 -1
  616. package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +1 -1
  617. package/lib-commonjs/components/AreaChart/index.js.map +1 -1
  618. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  619. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  620. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  621. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  622. package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
  623. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  624. package/lib-commonjs/components/DonutChart/Arc/Arc.styles.js.map +1 -1
  625. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -1
  626. package/lib-commonjs/components/DonutChart/Arc/index.js.map +1 -1
  627. package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
  628. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  629. package/lib-commonjs/components/DonutChart/DonutChart.styles.js.map +1 -1
  630. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  631. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  632. package/lib-commonjs/components/DonutChart/Pie/Pie.styles.js.map +1 -1
  633. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -1
  634. package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -1
  635. package/lib-commonjs/components/DonutChart/index.js.map +1 -1
  636. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
  637. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  638. package/lib-commonjs/components/GaugeChart/GaugeChart.styles.js.map +1 -1
  639. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  640. package/lib-commonjs/components/GaugeChart/index.js.map +1 -1
  641. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  642. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  643. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js.map +1 -1
  644. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  645. package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +1 -1
  646. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  647. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  648. package/lib-commonjs/components/HeatMapChart/HeatMapChart.styles.js.map +1 -1
  649. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  650. package/lib-commonjs/components/HeatMapChart/index.js.map +1 -1
  651. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  652. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  653. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.styles.js.map +1 -1
  654. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  655. package/lib-commonjs/components/HorizontalBarChart/index.js.map +1 -1
  656. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  657. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  658. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -1
  659. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  660. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  661. package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
  662. package/lib-commonjs/components/Legends/Legends.js.map +1 -1
  663. package/lib-commonjs/components/Legends/Legends.styles.js.map +1 -1
  664. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  665. package/lib-commonjs/components/Legends/index.js.map +1 -1
  666. package/lib-commonjs/components/Legends/shape.js.map +1 -1
  667. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  668. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  669. package/lib-commonjs/components/LineChart/LineChart.styles.js.map +1 -1
  670. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  671. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  672. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  673. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  674. package/lib-commonjs/components/LineChart/index.js.map +1 -1
  675. package/lib-commonjs/components/PieChart/Arc/Arc.js.map +1 -1
  676. package/lib-commonjs/components/PieChart/Arc/Arc.styles.js.map +1 -1
  677. package/lib-commonjs/components/PieChart/Arc/Arc.types.js.map +1 -1
  678. package/lib-commonjs/components/PieChart/Arc/index.js.map +1 -1
  679. package/lib-commonjs/components/PieChart/Pie/Pie.js.map +1 -1
  680. package/lib-commonjs/components/PieChart/Pie/Pie.styles.js.map +1 -1
  681. package/lib-commonjs/components/PieChart/Pie/Pie.types.js.map +1 -1
  682. package/lib-commonjs/components/PieChart/Pie/index.js.map +1 -1
  683. package/lib-commonjs/components/PieChart/PieChart.base.js.map +1 -1
  684. package/lib-commonjs/components/PieChart/PieChart.js.map +1 -1
  685. package/lib-commonjs/components/PieChart/PieChart.styles.js.map +1 -1
  686. package/lib-commonjs/components/PieChart/PieChart.types.js.map +1 -1
  687. package/lib-commonjs/components/PieChart/index.js.map +1 -1
  688. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
  689. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  690. package/lib-commonjs/components/SankeyChart/SankeyChart.styles.js.map +1 -1
  691. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  692. package/lib-commonjs/components/SankeyChart/index.js.map +1 -1
  693. package/lib-commonjs/components/Sparkline/Sparkline.base.js.map +1 -1
  694. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
  695. package/lib-commonjs/components/Sparkline/Sparkline.styles.js.map +1 -1
  696. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -1
  697. package/lib-commonjs/components/Sparkline/index.js.map +1 -1
  698. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  699. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.js.map +1 -1
  700. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.styles.js.map +1 -1
  701. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -1
  702. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  703. package/lib-commonjs/components/StackedBarChart/StackedBarChart.js.map +1 -1
  704. package/lib-commonjs/components/StackedBarChart/StackedBarChart.styles.js.map +1 -1
  705. package/lib-commonjs/components/StackedBarChart/StackedBarChart.types.js.map +1 -1
  706. package/lib-commonjs/components/StackedBarChart/index.js.map +1 -1
  707. package/lib-commonjs/components/TreeChart/TreeChart.base.js.map +1 -1
  708. package/lib-commonjs/components/TreeChart/TreeChart.js.map +1 -1
  709. package/lib-commonjs/components/TreeChart/TreeChart.styles.js.map +1 -1
  710. package/lib-commonjs/components/TreeChart/TreeChart.types.js.map +1 -1
  711. package/lib-commonjs/components/TreeChart/index.js.map +1 -1
  712. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  713. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  714. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.styles.js.map +1 -1
  715. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  716. package/lib-commonjs/components/VerticalBarChart/index.js.map +1 -1
  717. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  718. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  719. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js.map +1 -1
  720. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  721. package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +1 -1
  722. package/lib-commonjs/index.js.map +1 -1
  723. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  724. package/lib-commonjs/types/IEventAnnotation.js.map +1 -1
  725. package/lib-commonjs/types/ILegendDataItem.js.map +1 -1
  726. package/lib-commonjs/types/index.js.map +1 -1
  727. package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -1
  728. package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.js.map +1 -1
  729. package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.styles.js.map +1 -1
  730. package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.types.js.map +1 -1
  731. package/lib-commonjs/utilities/ChartHoverCard/index.js.map +1 -1
  732. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  733. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  734. package/lib-commonjs/utilities/colors.js.map +1 -1
  735. package/lib-commonjs/utilities/index.js.map +1 -1
  736. package/lib-commonjs/utilities/locale-util.js.map +1 -1
  737. package/lib-commonjs/utilities/test-data.js.map +1 -1
  738. package/lib-commonjs/utilities/utilities.js.map +1 -1
  739. package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
  740. package/lib-commonjs/version.js +1 -1
  741. package/lib-commonjs/version.js.map +1 -1
  742. package/package.json +3 -3
@@ -0,0 +1,930 @@
1
+ define(["require", "exports", "tslib", "@fluentui/react-focus", "@fluentui/react/lib/Callout", "@fluentui/react/lib/Utilities", "d3-array", "d3-sankey", "d3-selection", "d3-shape", "react", "../../utilities/ChartHoverCard/ChartHoverCard"], function (require, exports, tslib_1, react_focus_1, Callout_1, Utilities_1, d3_array_1, d3_sankey_1, d3_selection_1, d3_shape_1, React, ChartHoverCard_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.SankeyChartBase = exports.preRenderLayout = exports.adjustPadding = exports.groupNodesByColumn = void 0;
5
+ var getClassNames = (0, Utilities_1.classNamesFunction)();
6
+ var PADDING_PERCENTAGE = 0.3;
7
+ var NON_SELECTED_NODE_AND_STREAM_COLOR = '#757575';
8
+ var DEFAULT_NODE_COLORS = [
9
+ { fillColor: '#00758F', borderColor: '#002E39' },
10
+ { fillColor: '#77004D', borderColor: '#43002C' },
11
+ { fillColor: '#4F6BED', borderColor: '#3B52B4' },
12
+ { fillColor: '#937600', borderColor: '#6D5700' },
13
+ { fillColor: '#286EA8', borderColor: '#00457E' },
14
+ { fillColor: '#A43FB1', borderColor: '#7C158A' },
15
+ { fillColor: '#CC3595', borderColor: '#7F215D' },
16
+ { fillColor: '#0E7878', borderColor: '#004E4E' },
17
+ { fillColor: '#8764B8', borderColor: '#4B3867' },
18
+ { fillColor: '#9C663F', borderColor: '#6D4123' },
19
+ ];
20
+ var MIN_HEIGHT_FOR_DOUBLINE_TYPE = 36;
21
+ var MIN_HEIGHT_FOR_TYPE = 24;
22
+ var REST_STREAM_OPACITY = 1;
23
+ var NON_SELECTED_OPACITY = 1;
24
+ var SELECTED_STREAM_OPACITY = 0.3;
25
+ var NON_SELECTED_STREAM_BORDER_OPACITY = 0.5;
26
+ var DEFAULT_TEXT_COLOR = '#323130';
27
+ var NON_SELECTED_TEXT_COLOR = '#FFFFFF';
28
+ var NODE_WIDTH = 124;
29
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
30
+ function getSelectedNodes(selectedLinks) {
31
+ var nodes = [];
32
+ selectedLinks.forEach(function (link) {
33
+ nodes.push(link.target);
34
+ if (nodes.indexOf(link.source) === -1) {
35
+ nodes.push(link.source);
36
+ }
37
+ });
38
+ return nodes;
39
+ }
40
+ function getSelectedLinks(singleNode) {
41
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, no-array-constructor
42
+ var q = new Array();
43
+ var finalLinks = new Set();
44
+ singleNode.sourceLinks.forEach(function (link) {
45
+ q.push(link);
46
+ finalLinks.add(link);
47
+ });
48
+ while (q.length > 0) {
49
+ var poppedLink = q.shift();
50
+ var node = poppedLink.target;
51
+ if (node && node.sourceLinks) {
52
+ node.sourceLinks.forEach(function (link) {
53
+ finalLinks.add(link);
54
+ q.push(link);
55
+ });
56
+ }
57
+ }
58
+ if (singleNode.targetLinks) {
59
+ singleNode.targetLinks.forEach(function (link) {
60
+ q.push(link);
61
+ finalLinks.add(link);
62
+ });
63
+ }
64
+ while (q.length > 0) {
65
+ var poppedLink = q.shift();
66
+ var node = poppedLink.source;
67
+ if (node && node.targetLinks) {
68
+ node.targetLinks.forEach(function (link) {
69
+ finalLinks.add(link);
70
+ q.push(link);
71
+ });
72
+ }
73
+ }
74
+ return finalLinks;
75
+ }
76
+ function getSelectedLinksforStreamHover(singleLink) {
77
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, no-array-constructor
78
+ var q = new Array();
79
+ var finalLinks = new Set();
80
+ var finalNodes = new Set();
81
+ q.push(singleLink.source);
82
+ finalLinks.add(singleLink);
83
+ while (q.length > 0) {
84
+ var poppedNode = q.shift();
85
+ finalNodes.add(poppedNode);
86
+ if (poppedNode.targetLinks && poppedNode.targetLinks.length > 0) {
87
+ poppedNode.targetLinks.forEach(function (link) {
88
+ q.push(link.source);
89
+ finalLinks.add(link);
90
+ });
91
+ }
92
+ }
93
+ q.push(singleLink.target);
94
+ while (q.length > 0) {
95
+ var poppedNode = q.shift();
96
+ finalNodes.add(poppedNode);
97
+ if (poppedNode.sourceLinks && poppedNode.sourceLinks.length > 0) {
98
+ poppedNode.sourceLinks.forEach(function (link) {
99
+ q.push(link.target);
100
+ finalLinks.add(link);
101
+ });
102
+ }
103
+ }
104
+ return {
105
+ selectedLinks: finalLinks,
106
+ selectedNodes: finalNodes,
107
+ };
108
+ }
109
+ /**
110
+ * This is used to group nodes by column index.
111
+ */
112
+ // This is exported for unit tests.
113
+ function groupNodesByColumn(graph) {
114
+ var nodesInColumn = {};
115
+ graph.nodes.forEach(function (node) {
116
+ var columnId = node.layer;
117
+ if (nodesInColumn[columnId]) {
118
+ nodesInColumn[columnId].push(node);
119
+ }
120
+ else {
121
+ nodesInColumn[columnId] = [node];
122
+ }
123
+ });
124
+ return nodesInColumn;
125
+ }
126
+ exports.groupNodesByColumn = groupNodesByColumn;
127
+ /**
128
+ * This is used to normalize the nodes value whose value is less than 1% of the total column value.
129
+ */
130
+ function adjustOnePercentHeightNodes(nodesInColumn, computedNodes, originalLinks) {
131
+ var totalColumnValue = Object.values(nodesInColumn).map(function (column) {
132
+ return (0, d3_array_1.sum)(column, function (node) { return node.value; });
133
+ });
134
+ totalColumnValue.forEach(function (columnValue, index) {
135
+ var totalPercentage = 0;
136
+ var onePercent = 0.01 * columnValue;
137
+ var columnNodes = nodesInColumn[index];
138
+ columnNodes.forEach(function (node) {
139
+ var value = computedNodes[node.nodeId];
140
+ var nodePercentage = (value / columnValue) * 100;
141
+ node.actualValue = value;
142
+ //if the value is less than 1% then we are making it as 1% of total .
143
+ if (nodePercentage < 1) {
144
+ node.value = onePercent;
145
+ totalPercentage = totalPercentage + 1;
146
+ }
147
+ else {
148
+ totalPercentage = totalPercentage + nodePercentage;
149
+ }
150
+ });
151
+ //since we have adjusted the value to be 1% but we need to keep the sum of the percentage value under 100.
152
+ var scalingRatio = totalPercentage !== 0 ? totalPercentage / 100 : 1;
153
+ if (scalingRatio > 1) {
154
+ // Loop through each node in that column and scale that node--and its incoming and outgoing links--by the
155
+ // scaling ratio. We need the sankey diagram to re-layout the nodes and links after we do this.
156
+ columnNodes.forEach(function (node) {
157
+ var normalized = (node.value = node.value / scalingRatio);
158
+ // Which Original Value? and Which Normalized Value is needed, here? The Node? The Link? Both?
159
+ changeColumnValue(node, computedNodes[node.nodeId], normalized, originalLinks);
160
+ });
161
+ }
162
+ });
163
+ }
164
+ /**
165
+ * This is used for normalizing each link's value to reflect the normalized node value.
166
+ */
167
+ function changeColumnValue(node, originalNodeValue, normalizedNodeValue, linkValues) {
168
+ // For each link in the source and target, compute the proportion that this link contributes to the total
169
+ // then adjust the link's value to reflect its proportion of the normalized node value.
170
+ var updateLinkValue = function (link) {
171
+ var value = linkValue(linkValues, link);
172
+ link.unnormalizedValue = value;
173
+ var linkRatio = value / originalNodeValue;
174
+ link.value = Math.max(normalizedNodeValue * linkRatio, link.value);
175
+ };
176
+ node.sourceLinks.forEach(updateLinkValue);
177
+ node.targetLinks.forEach(updateLinkValue);
178
+ }
179
+ /**
180
+ * This is used for calculating the node non normalized value based on link non normalized value.
181
+ * The links have the original weights. Computed nodes have the total weight of all incoming and outgoing links.
182
+ */
183
+ function populateNodeActualValue(data, computedNodes, originalLinks) {
184
+ data.links.forEach(function (link) {
185
+ if (!link.unnormalizedValue) {
186
+ link.unnormalizedValue = linkValue(originalLinks, link);
187
+ }
188
+ });
189
+ data.nodes.forEach(function (node) {
190
+ node.actualValue = computedNodes[node.nodeId];
191
+ });
192
+ }
193
+ /**
194
+ * This is used to introduce dynamic padding for cases where the number of nodes in a column is huge
195
+ * so that we maintain a node to space ratio for such columns as if we fail to do so the
196
+ * chart is devoid of nodes and only shows links.
197
+ */
198
+ // This is exported for unit tests
199
+ function adjustPadding(sankey, height, nodesInColumn) {
200
+ var padding = sankey.nodePadding();
201
+ var minPadding = PADDING_PERCENTAGE * height;
202
+ Object.values(nodesInColumn).forEach(function (column) {
203
+ var totalPaddingInColumn = height - (0, d3_array_1.sum)(column, function (node) { return node.y1 - node.y0; });
204
+ if (minPadding < totalPaddingInColumn) {
205
+ // Here we are calculating the min of default and calculated padding, we will not increase the padding
206
+ // in any scenario.
207
+ padding = Math.min(padding, minPadding / (column.length - 1));
208
+ }
209
+ });
210
+ sankey.nodePadding(padding);
211
+ }
212
+ exports.adjustPadding = adjustPadding;
213
+ function idFromNumberOrSNode(node) {
214
+ if (typeof node === 'number') {
215
+ return node;
216
+ }
217
+ return node.nodeId;
218
+ }
219
+ /**
220
+ * Duplicates the supplied chart data so that we do not alter the original.
221
+ * @param data The data to duplicate.
222
+ * @returns The duplicated data.
223
+ */
224
+ function duplicateData(data) {
225
+ return {
226
+ nodes: data.nodes.map(function (node) { return (tslib_1.__assign({}, node)); }),
227
+ links: data.links.map(function (link) { return (tslib_1.__assign({}, link)); }),
228
+ };
229
+ }
230
+ function valuesOfNodes(nodes) {
231
+ var result = {};
232
+ nodes.forEach(function (node) {
233
+ result[node.nodeId] = node.value;
234
+ });
235
+ return result;
236
+ }
237
+ function valuesOfLinks(links) {
238
+ var result = {};
239
+ links.forEach(function (link) {
240
+ var sourceId = idFromNumberOrSNode(link.source);
241
+ var sourceToTarget = result[sourceId];
242
+ if (!sourceToTarget) {
243
+ sourceToTarget = {};
244
+ result[sourceId] = sourceToTarget;
245
+ }
246
+ sourceToTarget[idFromNumberOrSNode(link.target)] = link.value;
247
+ });
248
+ return result;
249
+ }
250
+ function linkValue(originalLinks, link) {
251
+ return originalLinks[idFromNumberOrSNode(link.source)][idFromNumberOrSNode(link.target)];
252
+ }
253
+ // This is exported for unit tests.
254
+ function preRenderLayout(margins, containerWidth, containerHeight, isRtl) {
255
+ var left = margins.left, right = margins.right, top = margins.top, bottom = margins.bottom;
256
+ var width = containerWidth - right;
257
+ var height = containerHeight - bottom > 0 ? containerHeight - bottom : 0;
258
+ var sankey = (0, d3_sankey_1.sankey)()
259
+ .nodeWidth(NODE_WIDTH)
260
+ .extent([
261
+ [left, top],
262
+ [width - 1, height - 6],
263
+ ])
264
+ .nodeAlign(isRtl ? d3_sankey_1.sankeyRight : d3_sankey_1.sankeyJustify);
265
+ return { sankey: sankey, height: height, width: width };
266
+ }
267
+ exports.preRenderLayout = preRenderLayout;
268
+ var elipsis = '...';
269
+ /**
270
+ * This is used to assign node fillcolors and borderColor cyclically when the user doesnt
271
+ * provide color to individual node.
272
+ */
273
+ function assignNodeColors(nodes, colorsForNodes, borderColorsForNodes) {
274
+ var colors;
275
+ var borders;
276
+ if (colorsForNodes && borderColorsForNodes) {
277
+ colors = colorsForNodes;
278
+ borders = borderColorsForNodes;
279
+ }
280
+ else {
281
+ colors = DEFAULT_NODE_COLORS.map(function (color) { return color.fillColor; });
282
+ borders = DEFAULT_NODE_COLORS.map(function (color) { return color.borderColor; });
283
+ }
284
+ var currentIndex = 0;
285
+ nodes.forEach(function (node) {
286
+ if (!node.color && !node.borderColor) {
287
+ node.color = colors[currentIndex];
288
+ node.borderColor = borders[currentIndex];
289
+ }
290
+ else if (node.color && !node.borderColor) {
291
+ node.borderColor = '#757575';
292
+ }
293
+ else if (node.borderColor && !node.color) {
294
+ node.color = '#F5F5F5';
295
+ }
296
+ currentIndex = (currentIndex + 1) % colors.length;
297
+ });
298
+ }
299
+ /**
300
+ * Takes in the display name for the node and potentially returns a trimmed version of the name.
301
+ * @param tspan the `tspan` element to use for text visual length measurement
302
+ * @param text is the text which we will potentially truncate
303
+ * @param rectangleWidth is the width of the rectangle which will contain the text
304
+ * @param padding is the space we need to leave between the rect lines and other text
305
+ * @returns the name to show on the node which might be the truncated `text` if the `text` is too long
306
+ */
307
+ function truncateText(tspan, text, rectangleWidth, padding) {
308
+ // NOTE: This method is the most-expensive in terms of rerendering components.
309
+ var textLengthForNodeName = rectangleWidth - padding; // This can likely be computed once and passed in.
310
+ // The following `select` statement injects a `tempText` element into the DOM. This injection
311
+ // (and subsequent removal) is causing a layout recalculation. This is a performance issue.
312
+ // Note that this code will always inject a `tempText` element, but doesn't always remove it. This is a bug.
313
+ if (fitsWithinNode(tspan, text, textLengthForNodeName)) {
314
+ return text;
315
+ }
316
+ // Computing the size of elipsis is performed with each node. This should be computed once and used everywhere.
317
+ // TODO: Compute the size of the elipsis once and use it everywhere.
318
+ var elipsisLength = computeElipsisLength(tspan);
319
+ var line = '';
320
+ // Calculate how much of the original text to show.
321
+ // TODO: The folllowing is O(n). We could use a binary search to make this faster: O(log(n)).
322
+ for (var i = 0; i < text.length; i++) {
323
+ line += text[i];
324
+ tspan.text(line);
325
+ var currentNode = tspan.node();
326
+ if (currentNode !== null) {
327
+ var w = currentNode.getComputedTextLength();
328
+ if (w >= textLengthForNodeName - elipsisLength) {
329
+ line = line.slice(0, -1);
330
+ line += elipsis;
331
+ break;
332
+ }
333
+ }
334
+ }
335
+ tspan.text(null);
336
+ return line;
337
+ }
338
+ function fitsWithinNode(tspan, text, textLengthForNodeName) {
339
+ var measurement = measureText(tspan, text);
340
+ if (measurement === undefined) {
341
+ return false;
342
+ }
343
+ return measurement <= textLengthForNodeName;
344
+ }
345
+ function measureText(tspan, text) {
346
+ var _a;
347
+ try {
348
+ tspan.text(text);
349
+ return (_a = tspan.node()) === null || _a === void 0 ? void 0 : _a.getComputedTextLength();
350
+ }
351
+ finally {
352
+ tspan.text(null);
353
+ }
354
+ }
355
+ function computeElipsisLength(tspan) {
356
+ var measurement = measureText(tspan, elipsis);
357
+ return measurement === undefined ? 0 : measurement;
358
+ }
359
+ function computeLinkAttributes(links, linkFrom, linkAriaLabel) {
360
+ var result = {};
361
+ links.forEach(function (link) {
362
+ var sourceId = idFromNumberOrSNode(link.source);
363
+ var sourceToTarget = result[sourceId];
364
+ if (!sourceToTarget) {
365
+ sourceToTarget = {};
366
+ result[sourceId] = sourceToTarget;
367
+ }
368
+ sourceToTarget[idFromNumberOrSNode(link.target)] = {
369
+ reactId: (0, Utilities_1.getId)('link'),
370
+ from: linkFrom(link.source),
371
+ aria: linkAriaLabel(link),
372
+ };
373
+ });
374
+ return result;
375
+ }
376
+ var linkToDataPoints = function (d) {
377
+ var halfWidth = d.width * 0.5;
378
+ var y0 = d.y0;
379
+ var y1 = d.y1;
380
+ return [
381
+ { x: d.source.x1, y0: y0 + halfWidth, y1: y0 - halfWidth },
382
+ { x: d.target.x0, y0: y1 + halfWidth, y1: y1 - halfWidth },
383
+ ];
384
+ };
385
+ var linkArea = (0, d3_shape_1.area)()
386
+ .x(function (p) { return p.x; })
387
+ .y0(function (p) { return p.y0; })
388
+ .y1(function (p) { return p.y1; })
389
+ .curve(d3_shape_1.curveBumpX);
390
+ function nodeTextColor(state, singleNode) {
391
+ return !(!state.selectedState ||
392
+ (state.selectedNodes.has(singleNode.index) && state.selectedNode) ||
393
+ !state.selectedNode)
394
+ ? DEFAULT_TEXT_COLOR
395
+ : NON_SELECTED_TEXT_COLOR;
396
+ }
397
+ // NOTE: To start employing React.useMemo properly, we need to convert this code from a React.Component
398
+ // to a function component. This will require a significant refactor of the code in this file.
399
+ // https://stackoverflow.com/questions/60223362/fast-way-to-convert-react-class-component-to-functional-component
400
+ // I am concerned that doing so would break this contract, making it difficult for consuming code.
401
+ var SankeyChartBase = exports.SankeyChartBase = /** @class */ (function (_super) {
402
+ tslib_1.__extends(SankeyChartBase, _super);
403
+ function SankeyChartBase(props) {
404
+ var _this = _super.call(this, props) || this;
405
+ _this._isRtl = (0, Utilities_1.getRTL)();
406
+ _this._numColumns = 0;
407
+ _this._onCloseCallout = function () {
408
+ _this.setState({
409
+ isCalloutVisible: false,
410
+ refSelected: undefined,
411
+ descriptionMessage: '',
412
+ });
413
+ };
414
+ _this._onBlur = function () {
415
+ /**/
416
+ };
417
+ _this._fillNodeColors = function (singleNode) {
418
+ var state = _this.state;
419
+ if (!state.selectedState) {
420
+ return singleNode.color;
421
+ }
422
+ else {
423
+ var selectedNode = state.selectedNode;
424
+ if (selectedNode && state.selectedNodes.has(singleNode.index)) {
425
+ return selectedNode.color;
426
+ }
427
+ else if (!selectedNode) {
428
+ return singleNode.color;
429
+ }
430
+ }
431
+ };
432
+ _this._fillNodeBorder = function (singleNode) {
433
+ var state = _this.state;
434
+ if (!state.selectedState) {
435
+ return singleNode.borderColor;
436
+ }
437
+ else {
438
+ if (state.selectedNodes.has(singleNode.index)) {
439
+ var selectedNode = state.selectedNode;
440
+ return selectedNode ? selectedNode.borderColor : singleNode.borderColor;
441
+ }
442
+ return singleNode.borderColor;
443
+ }
444
+ };
445
+ _this._calculateChartMinWidth = function () {
446
+ return (_this._margins.left +
447
+ _this._margins.right +
448
+ // total width of all node columns
449
+ _this._numColumns * NODE_WIDTH +
450
+ // minimum total width of all column gaps
451
+ (_this._numColumns - 1) * (NODE_WIDTH / 2));
452
+ };
453
+ _this.state = {
454
+ containerHeight: 468,
455
+ containerWidth: 912,
456
+ selectedState: false,
457
+ selectedLinks: new Set(),
458
+ selectedNodes: new Set(),
459
+ shouldOverflow: false,
460
+ isCalloutVisible: false,
461
+ };
462
+ _this._calloutId = (0, Utilities_1.getId)('callout');
463
+ _this._linkId = (0, Utilities_1.getId)('link');
464
+ _this._chartId = (0, Utilities_1.getId)('sankeyChart');
465
+ _this._emptyChartId = (0, Utilities_1.getId)('_SankeyChart_empty');
466
+ _this._labelTooltipId = (0, Utilities_1.getId)('tooltip');
467
+ _this._margins = { top: 36, right: 48, bottom: 32, left: 48 };
468
+ // We memo-ize creation so that we only create a new object when any of the fields change.
469
+ _this._computeClassNamesProps = (0, Utilities_1.memoizeFunction)(function (theme, pathColor, className, containerWidth, containerHeight) { return ({
470
+ theme: theme,
471
+ width: containerWidth,
472
+ height: containerHeight,
473
+ pathColor: pathColor,
474
+ className: className,
475
+ }); });
476
+ // `getClassNames` is memoized underneath, so it only recomputes when the `styles` or `classNamesProps` change.
477
+ // We memoize `classNamesProps` so that we only create new class names when absolutely necessary,
478
+ // and so that we can memoize the `_createNodes` method.
479
+ _this._computeClassNames = (0, Utilities_1.memoizeFunction)(function (styles, classNamesProps) { return getClassNames(styles, classNamesProps); });
480
+ _this._normalizeData = (0, Utilities_1.memoizeFunction)(function (data, containerWidth, containerHeight, colorsForNodes, borderColorsForNodes) { return _this._normalizeSankeyData(data, containerWidth, containerHeight, colorsForNodes, borderColorsForNodes); });
481
+ _this._fetchTooltip = (0, Utilities_1.memoizeFunction)(function (classNames) {
482
+ return _this._labelTooltipDiv(classNames);
483
+ });
484
+ // Prepare the localization utilities
485
+ _this._strings = (0, Utilities_1.memoizeFunction)(function (strings) {
486
+ var fromString = (strings === null || strings === void 0 ? void 0 : strings.linkFrom) || 'From {0}';
487
+ // NOTE: The `node` parameter is the sankey-generated node on the link, and not the original `node` supplied
488
+ // by the caller.
489
+ return {
490
+ linkFrom: function (node) { return (0, Utilities_1.format)(fromString, node.name); },
491
+ };
492
+ })(props.strings);
493
+ _this._accessibility = (0, Utilities_1.memoizeFunction)(function (accessibility) {
494
+ var linkString = (accessibility === null || accessibility === void 0 ? void 0 : accessibility.linkAriaLabel) || 'link from {0} to {1} with weight {2}';
495
+ var nodeString = (accessibility === null || accessibility === void 0 ? void 0 : accessibility.nodeAriaLabel) || 'node {0} with weight {1}';
496
+ return {
497
+ emptyAriaLabel: (accessibility === null || accessibility === void 0 ? void 0 : accessibility.emptyAriaLabel) || 'Graph has no data to display',
498
+ linkAriaLabel: function (link) {
499
+ return (0, Utilities_1.format)(linkString, link.source.name, link.target.name, link.unnormalizedValue ? _this._formatNumber(link.unnormalizedValue) : link.unnormalizedValue);
500
+ },
501
+ nodeAriaLabel: function (node, weight) { return (0, Utilities_1.format)(nodeString, node.name, _this._formatNumber(weight)); },
502
+ };
503
+ })(props.accessibility);
504
+ // NOTE: Memoizing the `_createNodes` and `_createLinks` methods would break the hoverability of the chart
505
+ // because the nodes are currently created differently based on the layout information. Hence why we do not
506
+ // memoize these methods (but have stubs for memoizing as the `_fetchNodes` and `_fetchLinks` methods).
507
+ _this._nodeAttributes = (0, Utilities_1.memoizeFunction)(function (nodes, nodeAriaLabel) {
508
+ return _this._computeNodeAttributes(nodes, nodeAriaLabel);
509
+ });
510
+ _this._fetchNodes = function (classNames, nodes, nodeAttributes, tooltipDiv) { return _this._createNodes(classNames, nodes, nodeAttributes, tooltipDiv); };
511
+ _this._linkAttributes = (0, Utilities_1.memoizeFunction)(function (links, linkFrom, linkAriaLabel) {
512
+ return computeLinkAttributes(links, linkFrom, linkAriaLabel);
513
+ });
514
+ _this._fetchLinks = function (links, linkAttributes) {
515
+ return _this._createLinks(links, linkAttributes);
516
+ };
517
+ return _this;
518
+ // Our shorter path to performance is to pre-compute the truncated labels of each node because
519
+ // that should not change based on the position of the mouse. This is a shorter path becase the code which
520
+ // computes the truncated labels creates and destroys a `tempText` element in the DOM. This is causing a
521
+ // reflow and repaint of the entire chart. This is a performance issue, and so computing the truncated labels
522
+ // once will help to mitigate this issue.
523
+ }
524
+ SankeyChartBase.prototype.componentDidMount = function () {
525
+ this._fitParentContainer();
526
+ };
527
+ SankeyChartBase.prototype.componentDidUpdate = function (prevProps) {
528
+ if (prevProps.shouldResize !== this.props.shouldResize) {
529
+ this._fitParentContainer();
530
+ }
531
+ };
532
+ SankeyChartBase.prototype.componentWillUnmount = function () {
533
+ cancelAnimationFrame(this._reqID);
534
+ };
535
+ SankeyChartBase.prototype.render = function () {
536
+ var _a, _b;
537
+ var _this = this;
538
+ if (!this._isChartEmpty()) {
539
+ var theme = (_a = this.props, _a.theme), className = _a.className, styles = _a.styles, pathColor = _a.pathColor, colorsForNodes = _a.colorsForNodes, borderColorsForNodes = _a.borderColorsForNodes;
540
+ var state = this.state;
541
+ var classNamesProps = this._computeClassNamesProps(theme, pathColor, className, state.containerWidth, state.containerHeight);
542
+ var classNames_1 = this._computeClassNames(styles, classNamesProps);
543
+ // Compute the position of each node and link
544
+ var nodes_1 = (_b = this._normalizeData(this.props.data.SankeyChartData, state.containerWidth, state.containerHeight, colorsForNodes, borderColorsForNodes), _b.nodes), links_1 = _b.links, width = _b.width, height = _b.height;
545
+ // In FocusZone, the focus order is determined by the rendering order of the elements. We need to find
546
+ // a rendering order such that the focus moves through the nodes and links in a logical sequence.
547
+ // Rendering the nodes and links layer by layer in a vertical order seems to be the most effective solution
548
+ // with FocusZone. Although this focus order may not be entirely logical, it ensures that the focus moves
549
+ // sequentially and prevents links (especially skip layer links) from being rendered over the nodes.
550
+ var nodeLinkDomOrderArray_1 = [];
551
+ nodes_1.sort(function (a, b) {
552
+ if (a.x0 !== b.x0) {
553
+ return a.x0 - b.x0;
554
+ }
555
+ return a.y0 - b.y0;
556
+ });
557
+ nodes_1.forEach(function (item, index) {
558
+ nodeLinkDomOrderArray_1.push({ layer: item.layer, type: 'node', index: index });
559
+ });
560
+ links_1.sort(function (a, b) {
561
+ var asx0 = a.source.x0;
562
+ var bsx0 = b.source.x0;
563
+ if (asx0 !== bsx0) {
564
+ return asx0 - bsx0;
565
+ }
566
+ return a.y0 - b.y0;
567
+ });
568
+ links_1.forEach(function (item, index) {
569
+ nodeLinkDomOrderArray_1.push({ layer: item.source.layer, type: 'link', index: index });
570
+ });
571
+ nodeLinkDomOrderArray_1.sort(function (a, b) {
572
+ if (a.layer !== b.layer) {
573
+ return a.layer - b.layer;
574
+ }
575
+ if (a.type > b.type) {
576
+ return -1;
577
+ }
578
+ if (a.type < b.type) {
579
+ return 1;
580
+ }
581
+ return 0;
582
+ });
583
+ // NOTE: I don't love this approach to caching the "select" result. Is it still valid from render-to-render?
584
+ // although local testing seems to indicate so, I do not trust that React will always support that instance.
585
+ // It might be better to perform this `fetch` within the `_showTooltip` and `_hideTooltip` methods.
586
+ var tooltipDiv = this._fetchTooltip(classNames_1);
587
+ // Pre-compute some important attributes about nodes, specifically text
588
+ var nodeAttributes = this._nodeAttributes(nodes_1, this._accessibility.nodeAriaLabel);
589
+ // Build the nodes and links as rendered in the UX.
590
+ var nodeData_1 = this._fetchNodes(classNames_1, nodes_1, nodeAttributes, tooltipDiv);
591
+ var linkAttributes = this._linkAttributes(links_1, this._strings.linkFrom, this._accessibility.linkAriaLabel);
592
+ var linkData_1 = this._fetchLinks(links_1, linkAttributes);
593
+ var calloutProps = {
594
+ isCalloutVisible: state.isCalloutVisible,
595
+ directionalHint: Callout_1.DirectionalHint.topAutoEdge,
596
+ id: "toolTip".concat(this._calloutId),
597
+ target: state.refSelected,
598
+ color: state.color,
599
+ XValue: state.xCalloutValue,
600
+ YValue: state.yCalloutValue ? state.yCalloutValue : state.dataForHoverCard,
601
+ descriptionMessage: state.descriptionMessage,
602
+ isBeakVisible: false,
603
+ gapSpace: 15,
604
+ onDismiss: this._onCloseCallout,
605
+ className: classNames_1.calloutContentRoot,
606
+ preventDismissOnLostFocus: true,
607
+ };
608
+ return (React.createElement("div", { className: classNames_1.root, role: 'presentation', ref: function (rootElem) { return (_this.chartContainer = rootElem); }, onMouseLeave: this._onCloseCallout },
609
+ React.createElement(react_focus_1.FocusZone, { direction: react_focus_1.FocusZoneDirection.vertical, className: classNames_1.chartWrapper },
610
+ React.createElement("svg", { width: width, height: height, id: this._chartId },
611
+ nodeLinkDomOrderArray_1.map(function (item) {
612
+ if (item.type === 'node') {
613
+ return (React.createElement("g", { key: nodes_1[item.index].nodeId, className: classNames_1.nodes }, nodeData_1[item.index]));
614
+ }
615
+ else {
616
+ return (React.createElement("g", { key: "".concat(links_1[item.index].source.nodeId, "-").concat(links_1[item.index].target.nodeId), className: classNames_1.links, strokeOpacity: 1 }, linkData_1[item.index]));
617
+ }
618
+ }),
619
+ calloutProps.isCalloutVisible && (React.createElement(Callout_1.Callout, tslib_1.__assign({}, calloutProps),
620
+ React.createElement(ChartHoverCard_1.ChartHoverCard, { XValue: calloutProps.XValue, YValue: calloutProps.YValue, color: calloutProps.color, descriptionMessage: calloutProps.descriptionMessage ? calloutProps.descriptionMessage : '' })))))));
621
+ }
622
+ return (React.createElement("div", { id: this._emptyChartId, role: 'alert', style: { opacity: '0' }, "aria-label": this._accessibility.emptyAriaLabel }));
623
+ };
624
+ SankeyChartBase.prototype._computeNodeAttributes = function (nodes, nodeAriaLabel) {
625
+ var _this = this;
626
+ var result = {};
627
+ var weightSpan = (0, d3_selection_1.select)('.nodeName').append('text').attr('class', 'tempText').append('tspan').text(null);
628
+ var nameSpan = (0, d3_selection_1.select)('.nodeName')
629
+ .append('text')
630
+ .attr('class', 'tempText')
631
+ .attr('font-size', '10')
632
+ .append('tspan')
633
+ .text(null);
634
+ nodes.forEach(function (singleNode) {
635
+ var height = Math.max(singleNode.y1 - singleNode.y0, 0);
636
+ var padding = 8;
637
+ var textLengthForNodeWeight = 0;
638
+ var nodeValue = singleNode.actualValue;
639
+ // If the nodeWeight is in the same line as node description an extra padding
640
+ // of 6 px is required between node description and node weight.
641
+ if (height < MIN_HEIGHT_FOR_DOUBLINE_TYPE) {
642
+ padding = padding + 6;
643
+ // The following `select` statement injects a `tempText` element into the DOM. This injection
644
+ // (and subsequent removal) is causing a layout recalculation. This is a performance issue.
645
+ var measurement = measureText(weightSpan, _this._formatNumber(nodeValue));
646
+ if (measurement !== undefined) {
647
+ textLengthForNodeWeight = measurement;
648
+ padding = padding + textLengthForNodeWeight;
649
+ }
650
+ }
651
+ // Since the total width of the node is 124 and we are giving margin of 8px from the left .
652
+ // So the actual value on which it will be truncated is 124-8=116.
653
+ var truncatedname = truncateText(nameSpan, singleNode.name, NODE_WIDTH - 8, padding);
654
+ var isTruncated = truncatedname.slice(-3) === elipsis;
655
+ result[singleNode.nodeId] = {
656
+ reactId: (0, Utilities_1.getId)('nodeBar'),
657
+ gElementId: (0, Utilities_1.getId)('nodeGElement'),
658
+ name: truncatedname,
659
+ aria: nodeAriaLabel(singleNode, nodeValue),
660
+ trimmed: isTruncated,
661
+ height: height,
662
+ weightOffset: textLengthForNodeWeight,
663
+ };
664
+ });
665
+ (0, d3_selection_1.selectAll)('.tempText').remove();
666
+ return result;
667
+ };
668
+ SankeyChartBase.prototype._linkCalloutAttributes = function (singleLink, from) {
669
+ return {
670
+ selectedLink: singleLink,
671
+ isCalloutVisible: true,
672
+ color: singleLink.source.color,
673
+ xCalloutValue: singleLink.target.name,
674
+ yCalloutValue: this._formatNumber(singleLink.unnormalizedValue),
675
+ descriptionMessage: from,
676
+ };
677
+ };
678
+ SankeyChartBase.prototype._normalizeSankeyData = function (data, containerWidth, containerHeight, colorsForNodes, borderColorsForNodes) {
679
+ var _a;
680
+ var sankey = (_a = preRenderLayout(this._margins, containerWidth, containerHeight, this._isRtl), _a.sankey), height = _a.height, width = _a.width;
681
+ // Clone the data before mutating it (via the SankeyLayoutGenerator) so that we don't mutate the original data.
682
+ var transformed = duplicateData(data);
683
+ sankey(transformed);
684
+ // NOTE: After the prior line, `transformed` is now a more-complex object than the incoming `ISankeyChartData`.
685
+ // `transformed` should be cast to a more-specific type. This is a breaking change because we would be eliminating
686
+ // fields from `ISankeyChartData` and putting those fields on a now-local type. But doing so makes it clearer what
687
+ // the caller needs to supply and why. For example, the `actualValue` and `layer` fields of `ISNodeExtra` should
688
+ // both be moved. Similarly for `unnormalizedValue` in `ISLinkExtra`.
689
+ // `SankeyNodeMinimal` and `SankeyLinkMinimal` are both the types after `sankey(transformed)`, but have almost no
690
+ // bearing on the data before `sankey(transformed)` (which is basically nodes with ids and names along with links
691
+ // with source index, target index, and value).
692
+ var nodesInColumn = groupNodesByColumn(transformed);
693
+ this._numColumns = Object.keys(nodesInColumn).length;
694
+ // Keep track of the original values of the links and their acccumulated values in the nodes
695
+ // Setting these in external objects so they cannot be mutated by other code.
696
+ // The IDs of nodes can be numbers or strings. But, the IDs of links are always the index into the "nodes" array.
697
+ // After the sankey layout is computed, the each link's `source` and `target` will have the ID of the node in the
698
+ // type originally specified in the Nodes array. Consequently, we get the values of those links after the sankey
699
+ // transformation.
700
+ var nodeValues = valuesOfNodes(transformed.nodes);
701
+ var linkValues = valuesOfLinks(transformed.links);
702
+ adjustOnePercentHeightNodes(nodesInColumn, nodeValues, linkValues);
703
+ adjustPadding(sankey, height - 6, nodesInColumn);
704
+ // `sankey` is called a second time, probably to re-layout the nodes with the one-percent adjusted weights.
705
+ // NOTE: The second call to `sankey` is required to allow links to be hoverable.
706
+ // Without the second call, the links are not hoverable.
707
+ sankey(transformed);
708
+ populateNodeActualValue(transformed, nodeValues, linkValues);
709
+ assignNodeColors(transformed.nodes, colorsForNodes, borderColorsForNodes);
710
+ return {
711
+ width: width,
712
+ height: height,
713
+ nodes: transformed.nodes,
714
+ links: transformed.links,
715
+ };
716
+ };
717
+ SankeyChartBase.prototype._labelTooltipDiv = function (classNames) {
718
+ // find the tooltip div. If it doesn't exist, then create it.
719
+ var tooltipDiv = (0, d3_selection_1.select)("#".concat(this._labelTooltipId));
720
+ if (tooltipDiv.empty()) {
721
+ tooltipDiv = (0, d3_selection_1.select)('body')
722
+ .append('div')
723
+ .attr('id', this._labelTooltipId)
724
+ .attr('class', classNames.toolTip)
725
+ .style('opacity', 0);
726
+ }
727
+ // If the div exists, then `classNames` has changed; update the `class` on the `div`.
728
+ tooltipDiv.attr('class', classNames.toolTip);
729
+ return tooltipDiv;
730
+ };
731
+ SankeyChartBase.prototype._createLinks = function (dataLinks, linkAttributes) {
732
+ var _this = this;
733
+ if (dataLinks) {
734
+ var linkId_1 = this._linkId;
735
+ return dataLinks.map(function (singleLink, index) {
736
+ var _a;
737
+ var onMouseOut = function () {
738
+ _this._onStreamLeave(singleLink);
739
+ };
740
+ var reactId = (_a = linkValue(linkAttributes, singleLink), _a.reactId), from = _a.from, aria = _a.aria;
741
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
742
+ var dataPoints = linkToDataPoints(singleLink);
743
+ var key = "".concat(linkId_1, "-").concat(index);
744
+ var gradientId = "gradient-".concat(key);
745
+ var gradientUrl = "url(#".concat(gradientId, ")");
746
+ var source = singleLink.source;
747
+ var target = singleLink.target;
748
+ // TODO: localize the aria-label string
749
+ return (React.createElement("g", { key: key },
750
+ React.createElement("defs", null,
751
+ React.createElement("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "0%" },
752
+ React.createElement("stop", { offset: "0", stopColor: source.color }),
753
+ React.createElement("stop", { offset: "100%", stopColor: target.color }))),
754
+ React.createElement("path", { d: linkArea(dataPoints), id: reactId, fill: _this._fillStreamColors(singleLink, gradientUrl), stroke: _this._fillStreamBorder(singleLink, gradientUrl), strokeWidth: "2", strokeOpacity: _this._getOpacityStreamBorder(singleLink), onMouseOver: function (event) { return _this._onStreamHover(event, singleLink, from); }, onMouseOut: onMouseOut, onFocus: function (event) { return _this._onFocusLink(event, singleLink, from); }, onBlur: _this._onBlur, fillOpacity: _this._getOpacityStream(singleLink), "data-is-focusable": true, "aria-label": aria, role: "img" })));
755
+ });
756
+ }
757
+ return [];
758
+ };
759
+ SankeyChartBase.prototype._createNodes = function (classNames, dataNodes, nodeAttributes, tooltipDiv) {
760
+ var _this = this;
761
+ if (dataNodes) {
762
+ var state_1 = this.state;
763
+ var textAnchor_1 = this._isRtl ? 'end' : 'start';
764
+ return dataNodes.map(function (singleNode, index) {
765
+ var _a;
766
+ var onMouseOut = function () {
767
+ _this._onLeave(singleNode);
768
+ };
769
+ var nodeId = (_a = nodeAttributes[singleNode.nodeId], _a.reactId), gElementId = _a.gElementId, height = _a.height, isTruncated = _a.trimmed, truncatedName = _a.name, textLengthForNodeWeight = _a.weightOffset, aria = _a.aria;
770
+ var tooTall = height > MIN_HEIGHT_FOR_DOUBLINE_TYPE;
771
+ var name = singleNode.name, actualValue = singleNode.actualValue, x0 = singleNode.x0, x1 = singleNode.x1, y0 = singleNode.y0;
772
+ var textColor = nodeTextColor(state_1, singleNode);
773
+ return (React.createElement("g", { key: index, id: gElementId },
774
+ React.createElement("rect", { x: x0, y: y0, height: height, width: x1 - x0, fill: _this._fillNodeColors(singleNode), id: nodeId, onMouseOver: _this._onHover.bind(_this, singleNode), onMouseOut: onMouseOut, onFocus: _this._onCloseCallout.bind(_this), stroke: _this._fillNodeBorder(singleNode), strokeWidth: "2", opacity: "1", "data-is-focusable": true, "aria-label": aria, role: "img" }),
775
+ height > MIN_HEIGHT_FOR_TYPE && (React.createElement("g", { className: classNames.nodeTextContainer },
776
+ React.createElement("g", { className: "nodeName" },
777
+ React.createElement("text", { id: "".concat(nodeId, "-name"), x: x0, y: y0, dy: '1.2em', dx: '0.4em', textAnchor: textAnchor_1, fontWeight: "regular", "aria-hidden": "true", fill: textColor, fontSize: 10, onMouseOver: _this._showTooltip.bind(_this, name, isTruncated, tooltipDiv), onMouseOut: _this._hideTooltip.bind(_this, tooltipDiv) }, truncatedName)),
778
+ React.createElement("text", { x: tooTall ? x0 : x1 - textLengthForNodeWeight - 8, y: y0, dy: tooTall ? '2em' : '1em', dx: tooTall ? '0.4em' : '0em', textAnchor: textAnchor_1, fontWeight: "bold", "aria-hidden": "true", fill: textColor, fontSize: 14 }, actualValue ? _this._formatNumber(actualValue) : actualValue)))));
779
+ });
780
+ }
781
+ };
782
+ SankeyChartBase.prototype._onLeave = function (singleNode) {
783
+ if (this.state.selectedState) {
784
+ this.setState({
785
+ selectedState: false,
786
+ selectedNodes: new Set(),
787
+ selectedLinks: new Set(),
788
+ selectedNode: undefined,
789
+ });
790
+ }
791
+ };
792
+ SankeyChartBase.prototype._onHover = function (singleNode, mouseEvent) {
793
+ mouseEvent.persist();
794
+ this._onCloseCallout();
795
+ if (!this.state.selectedState) {
796
+ var selectedLinks = getSelectedLinks(singleNode);
797
+ var selectedNodes = getSelectedNodes(selectedLinks);
798
+ selectedNodes.push(singleNode);
799
+ this.setState({
800
+ selectedState: true,
801
+ selectedNodes: new Set(Array.from(selectedNodes).map(function (node) { return node.index; })),
802
+ selectedLinks: new Set(Array.from(selectedLinks).map(function (link) { return link.index; })),
803
+ selectedNode: singleNode,
804
+ refSelected: mouseEvent,
805
+ isCalloutVisible: singleNode.y1 - singleNode.y0 < MIN_HEIGHT_FOR_TYPE,
806
+ color: singleNode.color,
807
+ xCalloutValue: singleNode.name,
808
+ yCalloutValue: this._formatNumber(singleNode.actualValue),
809
+ });
810
+ }
811
+ };
812
+ SankeyChartBase.prototype._formatNumber = function (value) {
813
+ return this.props.formatNumberOptions
814
+ ? value.toLocaleString(undefined, this.props.formatNumberOptions)
815
+ : value.toString();
816
+ };
817
+ SankeyChartBase.prototype._onStreamHover = function (mouseEvent, singleLink, from) {
818
+ var _a;
819
+ mouseEvent.persist();
820
+ this._onCloseCallout();
821
+ if (!this.state.selectedState) {
822
+ var selectedLinks = (_a = getSelectedLinksforStreamHover(singleLink), _a.selectedLinks), selectedNodes = _a.selectedNodes;
823
+ this.setState(tslib_1.__assign({ selectedState: true, selectedNodes: new Set(Array.from(selectedNodes).map(function (node) { return node.index; })), selectedLinks: new Set(Array.from(selectedLinks).map(function (link) { return link.index; })), refSelected: mouseEvent }, this._linkCalloutAttributes(singleLink, from)));
824
+ }
825
+ };
826
+ SankeyChartBase.prototype._onStreamLeave = function (singleLink) {
827
+ if (this.state.selectedState) {
828
+ this.setState({
829
+ selectedState: false,
830
+ selectedNodes: new Set(),
831
+ selectedLinks: new Set(),
832
+ selectedLink: undefined,
833
+ });
834
+ }
835
+ };
836
+ SankeyChartBase.prototype._onFocusLink = function (element, singleLink, from) {
837
+ // There is a big difference in how "Tab" and the "Arrow keys" are handled in this diagram.
838
+ // In particular, I would expect the "Down" key to be like "Tab", but it jumps a little wildly. I'm not sure
839
+ // if this behavior is an accessiblity violation, but it we might want to investigate it.
840
+ element.persist();
841
+ this._onCloseCallout();
842
+ this.setState(tslib_1.__assign({ refSelected: element.currentTarget }, this._linkCalloutAttributes(singleLink, from)));
843
+ };
844
+ SankeyChartBase.prototype._fillStreamColors = function (singleLink, gradientUrl) {
845
+ var state = this.state;
846
+ if (state.selectedState && state.selectedLinks.has(singleLink.index)) {
847
+ var selectedNode = state.selectedNode;
848
+ return selectedNode ? selectedNode.color : gradientUrl;
849
+ }
850
+ };
851
+ SankeyChartBase.prototype._fillStreamBorder = function (singleLink, gradientUrl) {
852
+ var state = this.state;
853
+ if (!state.selectedState) {
854
+ return NON_SELECTED_NODE_AND_STREAM_COLOR;
855
+ }
856
+ else {
857
+ if (state.selectedLinks.has(singleLink.index)) {
858
+ var selectedNode = state.selectedNode;
859
+ return selectedNode ? selectedNode.borderColor : gradientUrl;
860
+ }
861
+ return NON_SELECTED_NODE_AND_STREAM_COLOR;
862
+ }
863
+ };
864
+ SankeyChartBase.prototype._getOpacityStream = function (singleLink) {
865
+ var state = this.state;
866
+ if (state.selectedState) {
867
+ if (!state.selectedLinks.has(singleLink.index)) {
868
+ return NON_SELECTED_OPACITY;
869
+ }
870
+ else if (!state.selectedNode) {
871
+ return SELECTED_STREAM_OPACITY;
872
+ }
873
+ }
874
+ return REST_STREAM_OPACITY;
875
+ };
876
+ SankeyChartBase.prototype._getOpacityStreamBorder = function (singleLink) {
877
+ var state = this.state;
878
+ if (state.selectedState && !state.selectedLinks.has(singleLink.index) && !state.selectedNode) {
879
+ return NON_SELECTED_STREAM_BORDER_OPACITY;
880
+ }
881
+ return NON_SELECTED_OPACITY;
882
+ };
883
+ SankeyChartBase.prototype._fitParentContainer = function () {
884
+ var _a;
885
+ var _this = this;
886
+ var containerWidth = (_a = this.state, _a.containerWidth), containerHeight = _a.containerHeight;
887
+ this._reqID = requestAnimationFrame(function () {
888
+ // NOTE: Calls to this method trigger a re-render.
889
+ var container = _this.props.parentRef ? _this.props.parentRef : _this.chartContainer;
890
+ var currentContainerWidth = container &&
891
+ (_this.props.enableReflow
892
+ ? Math.max(container.getBoundingClientRect().width, _this._calculateChartMinWidth())
893
+ : container.getBoundingClientRect().width);
894
+ var currentContainerHeight = container && container.getBoundingClientRect().height;
895
+ var shouldResize = containerWidth !== currentContainerWidth || containerHeight !== currentContainerHeight;
896
+ if (shouldResize) {
897
+ _this.setState({
898
+ containerWidth: currentContainerWidth,
899
+ containerHeight: currentContainerHeight,
900
+ });
901
+ }
902
+ });
903
+ };
904
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
905
+ SankeyChartBase.prototype._showTooltip = function (text, checkTrcuncated, div, evt) {
906
+ if (checkTrcuncated) {
907
+ //Fixing tooltip position by attaching it to the element rather than page
908
+ div.style('opacity', 0.9);
909
+ div
910
+ .html(text)
911
+ .style('left', evt.pageX + 'px')
912
+ .style('top', evt.pageY - 28 + 'px');
913
+ }
914
+ };
915
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
916
+ SankeyChartBase.prototype._hideTooltip = function (div) {
917
+ div.style('opacity', 0);
918
+ };
919
+ SankeyChartBase.prototype._isChartEmpty = function () {
920
+ var _a;
921
+ var sankeyChartData = (_a = this.props.data) === null || _a === void 0 ? void 0 : _a.SankeyChartData;
922
+ return !(sankeyChartData && sankeyChartData.nodes.length > 0 && sankeyChartData.links.length > 0);
923
+ };
924
+ SankeyChartBase.defaultProps = {
925
+ enableReflow: true,
926
+ };
927
+ return SankeyChartBase;
928
+ }(React.Component));
929
+ });
930
+ //# sourceMappingURL=SankeyChart.base.js.map