@fluentui/react-charting 5.16.21 → 5.16.23

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 (798) hide show
  1. package/CHANGELOG.json +55 -1
  2. package/CHANGELOG.md +24 -2
  3. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js +4 -5
  4. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  5. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +5 -6
  6. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  7. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js +4 -5
  8. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  9. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +1 -1
  10. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  11. package/lib-commonjs/utilities/FocusableTooltipText.d.ts +27 -0
  12. package/lib-commonjs/utilities/FocusableTooltipText.js +57 -0
  13. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -0
  14. package/lib-commonjs/version.js +1 -1
  15. package/lib-commonjs/version.js.map +1 -1
  16. package/package.json +6 -6
  17. package/dist/react-charting.js +0 -1
  18. package/dist/react-charting.min.js +0 -1
  19. package/lib/AreaChart.d.ts +0 -1
  20. package/lib/AreaChart.js +0 -2
  21. package/lib/AreaChart.js.map +0 -1
  22. package/lib/CartesianChart.d.ts +0 -1
  23. package/lib/CartesianChart.js +0 -2
  24. package/lib/CartesianChart.js.map +0 -1
  25. package/lib/DonutChart.d.ts +0 -1
  26. package/lib/DonutChart.js +0 -2
  27. package/lib/DonutChart.js.map +0 -1
  28. package/lib/GroupedVerticalBarChart.d.ts +0 -1
  29. package/lib/GroupedVerticalBarChart.js +0 -2
  30. package/lib/GroupedVerticalBarChart.js.map +0 -1
  31. package/lib/HeatMapChart.d.ts +0 -1
  32. package/lib/HeatMapChart.js +0 -2
  33. package/lib/HeatMapChart.js.map +0 -1
  34. package/lib/HorizontalBarChart.d.ts +0 -1
  35. package/lib/HorizontalBarChart.js +0 -2
  36. package/lib/HorizontalBarChart.js.map +0 -1
  37. package/lib/Legends.d.ts +0 -1
  38. package/lib/Legends.js +0 -2
  39. package/lib/Legends.js.map +0 -1
  40. package/lib/LineChart.d.ts +0 -1
  41. package/lib/LineChart.js +0 -2
  42. package/lib/LineChart.js.map +0 -1
  43. package/lib/PieChart.d.ts +0 -1
  44. package/lib/PieChart.js +0 -2
  45. package/lib/PieChart.js.map +0 -1
  46. package/lib/SankeyChart.d.ts +0 -1
  47. package/lib/SankeyChart.js +0 -2
  48. package/lib/SankeyChart.js.map +0 -1
  49. package/lib/Sparkline.d.ts +0 -1
  50. package/lib/Sparkline.js +0 -2
  51. package/lib/Sparkline.js.map +0 -1
  52. package/lib/StackedBarChart.d.ts +0 -1
  53. package/lib/StackedBarChart.js +0 -2
  54. package/lib/StackedBarChart.js.map +0 -1
  55. package/lib/Styling.d.ts +0 -2
  56. package/lib/Styling.js +0 -8
  57. package/lib/Styling.js.map +0 -1
  58. package/lib/TreeChart.d.ts +0 -1
  59. package/lib/TreeChart.js +0 -2
  60. package/lib/TreeChart.js.map +0 -1
  61. package/lib/Utilities.d.ts +0 -2
  62. package/lib/Utilities.js +0 -20
  63. package/lib/Utilities.js.map +0 -1
  64. package/lib/VerticalBarChart.d.ts +0 -1
  65. package/lib/VerticalBarChart.js +0 -2
  66. package/lib/VerticalBarChart.js.map +0 -1
  67. package/lib/VerticalStackedBarChart.d.ts +0 -1
  68. package/lib/VerticalStackedBarChart.js +0 -2
  69. package/lib/VerticalStackedBarChart.js.map +0 -1
  70. package/lib/components/AreaChart/AreaChart.base.d.ts +0 -92
  71. package/lib/components/AreaChart/AreaChart.base.js +0 -562
  72. package/lib/components/AreaChart/AreaChart.base.js.map +0 -1
  73. package/lib/components/AreaChart/AreaChart.d.ts +0 -3
  74. package/lib/components/AreaChart/AreaChart.js +0 -6
  75. package/lib/components/AreaChart/AreaChart.js.map +0 -1
  76. package/lib/components/AreaChart/AreaChart.styles.d.ts +0 -2
  77. package/lib/components/AreaChart/AreaChart.styles.js +0 -7
  78. package/lib/components/AreaChart/AreaChart.styles.js.map +0 -1
  79. package/lib/components/AreaChart/AreaChart.types.d.ts +0 -37
  80. package/lib/components/AreaChart/AreaChart.types.js +0 -2
  81. package/lib/components/AreaChart/AreaChart.types.js.map +0 -1
  82. package/lib/components/AreaChart/index.d.ts +0 -2
  83. package/lib/components/AreaChart/index.js +0 -3
  84. package/lib/components/AreaChart/index.js.map +0 -1
  85. package/lib/components/CommonComponents/CartesianChart.base.d.ts +0 -43
  86. package/lib/components/CommonComponents/CartesianChart.base.js +0 -331
  87. package/lib/components/CommonComponents/CartesianChart.base.js.map +0 -1
  88. package/lib/components/CommonComponents/CartesianChart.d.ts +0 -3
  89. package/lib/components/CommonComponents/CartesianChart.js +0 -5
  90. package/lib/components/CommonComponents/CartesianChart.js.map +0 -1
  91. package/lib/components/CommonComponents/CartesianChart.styles.d.ts +0 -2
  92. package/lib/components/CommonComponents/CartesianChart.styles.js +0 -163
  93. package/lib/components/CommonComponents/CartesianChart.styles.js.map +0 -1
  94. package/lib/components/CommonComponents/CartesianChart.types.d.ts +0 -428
  95. package/lib/components/CommonComponents/CartesianChart.types.js +0 -2
  96. package/lib/components/CommonComponents/CartesianChart.types.js.map +0 -1
  97. package/lib/components/CommonComponents/index.d.ts +0 -2
  98. package/lib/components/CommonComponents/index.js +0 -3
  99. package/lib/components/CommonComponents/index.js.map +0 -1
  100. package/lib/components/DonutChart/Arc/Arc.d.ts +0 -21
  101. package/lib/components/DonutChart/Arc/Arc.js +0 -86
  102. package/lib/components/DonutChart/Arc/Arc.js.map +0 -1
  103. package/lib/components/DonutChart/Arc/Arc.styles.d.ts +0 -2
  104. package/lib/components/DonutChart/Arc/Arc.styles.js +0 -28
  105. package/lib/components/DonutChart/Arc/Arc.styles.js.map +0 -1
  106. package/lib/components/DonutChart/Arc/Arc.types.d.ts +0 -124
  107. package/lib/components/DonutChart/Arc/Arc.types.js +0 -2
  108. package/lib/components/DonutChart/Arc/Arc.types.js.map +0 -1
  109. package/lib/components/DonutChart/Arc/index.d.ts +0 -2
  110. package/lib/components/DonutChart/Arc/index.js +0 -3
  111. package/lib/components/DonutChart/Arc/index.js.map +0 -1
  112. package/lib/components/DonutChart/DonutChart.base.d.ts +0 -50
  113. package/lib/components/DonutChart/DonutChart.base.js +0 -211
  114. package/lib/components/DonutChart/DonutChart.base.js.map +0 -1
  115. package/lib/components/DonutChart/DonutChart.d.ts +0 -3
  116. package/lib/components/DonutChart/DonutChart.js +0 -6
  117. package/lib/components/DonutChart/DonutChart.js.map +0 -1
  118. package/lib/components/DonutChart/DonutChart.styles.d.ts +0 -2
  119. package/lib/components/DonutChart/DonutChart.styles.js +0 -30
  120. package/lib/components/DonutChart/DonutChart.styles.js.map +0 -1
  121. package/lib/components/DonutChart/DonutChart.types.d.ts +0 -63
  122. package/lib/components/DonutChart/DonutChart.types.js +0 -2
  123. package/lib/components/DonutChart/DonutChart.types.js.map +0 -1
  124. package/lib/components/DonutChart/Pie/Pie.d.ts +0 -15
  125. package/lib/components/DonutChart/Pie/Pie.js +0 -71
  126. package/lib/components/DonutChart/Pie/Pie.js.map +0 -1
  127. package/lib/components/DonutChart/Pie/Pie.styles.d.ts +0 -2
  128. package/lib/components/DonutChart/Pie/Pie.styles.js +0 -19
  129. package/lib/components/DonutChart/Pie/Pie.styles.js.map +0 -1
  130. package/lib/components/DonutChart/Pie/Pie.types.d.ts +0 -96
  131. package/lib/components/DonutChart/Pie/Pie.types.js +0 -2
  132. package/lib/components/DonutChart/Pie/Pie.types.js.map +0 -1
  133. package/lib/components/DonutChart/Pie/index.d.ts +0 -2
  134. package/lib/components/DonutChart/Pie/index.js +0 -3
  135. package/lib/components/DonutChart/Pie/index.js.map +0 -1
  136. package/lib/components/DonutChart/index.d.ts +0 -3
  137. package/lib/components/DonutChart/index.js +0 -4
  138. package/lib/components/DonutChart/index.js.map +0 -1
  139. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +0 -62
  140. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +0 -381
  141. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +0 -1
  142. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.d.ts +0 -3
  143. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +0 -6
  144. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +0 -1
  145. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.d.ts +0 -2
  146. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js +0 -17
  147. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js.map +0 -1
  148. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +0 -83
  149. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +0 -2
  150. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +0 -1
  151. package/lib/components/GroupedVerticalBarChart/index.d.ts +0 -2
  152. package/lib/components/GroupedVerticalBarChart/index.js +0 -3
  153. package/lib/components/GroupedVerticalBarChart/index.js.map +0 -1
  154. package/lib/components/HeatMapChart/HeatMapChart.base.d.ts +0 -147
  155. package/lib/components/HeatMapChart/HeatMapChart.base.js +0 -498
  156. package/lib/components/HeatMapChart/HeatMapChart.base.js.map +0 -1
  157. package/lib/components/HeatMapChart/HeatMapChart.d.ts +0 -3
  158. package/lib/components/HeatMapChart/HeatMapChart.js +0 -5
  159. package/lib/components/HeatMapChart/HeatMapChart.js.map +0 -1
  160. package/lib/components/HeatMapChart/HeatMapChart.styles.d.ts +0 -2
  161. package/lib/components/HeatMapChart/HeatMapChart.styles.js +0 -24
  162. package/lib/components/HeatMapChart/HeatMapChart.styles.js.map +0 -1
  163. package/lib/components/HeatMapChart/HeatMapChart.types.d.ts +0 -110
  164. package/lib/components/HeatMapChart/HeatMapChart.types.js +0 -2
  165. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +0 -1
  166. package/lib/components/HeatMapChart/index.d.ts +0 -2
  167. package/lib/components/HeatMapChart/index.js +0 -3
  168. package/lib/components/HeatMapChart/index.js.map +0 -1
  169. package/lib/components/HorizontalBarChart/HorizontalBarChart.base.d.ts +0 -36
  170. package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js +0 -238
  171. package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +0 -1
  172. package/lib/components/HorizontalBarChart/HorizontalBarChart.d.ts +0 -3
  173. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +0 -6
  174. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +0 -1
  175. package/lib/components/HorizontalBarChart/HorizontalBarChart.styles.d.ts +0 -2
  176. package/lib/components/HorizontalBarChart/HorizontalBarChart.styles.js +0 -69
  177. package/lib/components/HorizontalBarChart/HorizontalBarChart.styles.js.map +0 -1
  178. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.d.ts +0 -172
  179. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +0 -6
  180. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +0 -1
  181. package/lib/components/HorizontalBarChart/index.d.ts +0 -3
  182. package/lib/components/HorizontalBarChart/index.js +0 -4
  183. package/lib/components/HorizontalBarChart/index.js.map +0 -1
  184. package/lib/components/Legends/Legends.base.d.ts +0 -44
  185. package/lib/components/Legends/Legends.base.js +0 -293
  186. package/lib/components/Legends/Legends.base.js.map +0 -1
  187. package/lib/components/Legends/Legends.d.ts +0 -3
  188. package/lib/components/Legends/Legends.js +0 -5
  189. package/lib/components/Legends/Legends.js.map +0 -1
  190. package/lib/components/Legends/Legends.styles.d.ts +0 -2
  191. package/lib/components/Legends/Legends.styles.js +0 -103
  192. package/lib/components/Legends/Legends.styles.js.map +0 -1
  193. package/lib/components/Legends/Legends.types.d.ts +0 -169
  194. package/lib/components/Legends/Legends.types.js +0 -2
  195. package/lib/components/Legends/Legends.types.js.map +0 -1
  196. package/lib/components/Legends/index.d.ts +0 -3
  197. package/lib/components/Legends/index.js +0 -4
  198. package/lib/components/Legends/index.js.map +0 -1
  199. package/lib/components/Legends/shape.d.ts +0 -9
  200. package/lib/components/Legends/shape.js +0 -24
  201. package/lib/components/Legends/shape.js.map +0 -1
  202. package/lib/components/LineChart/LineChart.base.d.ts +0 -84
  203. package/lib/components/LineChart/LineChart.base.js +0 -815
  204. package/lib/components/LineChart/LineChart.base.js.map +0 -1
  205. package/lib/components/LineChart/LineChart.d.ts +0 -3
  206. package/lib/components/LineChart/LineChart.js +0 -6
  207. package/lib/components/LineChart/LineChart.js.map +0 -1
  208. package/lib/components/LineChart/LineChart.styles.d.ts +0 -2
  209. package/lib/components/LineChart/LineChart.styles.js +0 -7
  210. package/lib/components/LineChart/LineChart.styles.js.map +0 -1
  211. package/lib/components/LineChart/LineChart.types.d.ts +0 -72
  212. package/lib/components/LineChart/LineChart.types.js +0 -2
  213. package/lib/components/LineChart/LineChart.types.js.map +0 -1
  214. package/lib/components/LineChart/eventAnnotation/EventAnnotation.d.ts +0 -10
  215. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +0 -93
  216. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +0 -1
  217. package/lib/components/LineChart/eventAnnotation/LabelLink.d.ts +0 -22
  218. package/lib/components/LineChart/eventAnnotation/LabelLink.js +0 -37
  219. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +0 -1
  220. package/lib/components/LineChart/eventAnnotation/Textbox.d.ts +0 -13
  221. package/lib/components/LineChart/eventAnnotation/Textbox.js +0 -37
  222. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +0 -1
  223. package/lib/components/LineChart/index.d.ts +0 -3
  224. package/lib/components/LineChart/index.js +0 -4
  225. package/lib/components/LineChart/index.js.map +0 -1
  226. package/lib/components/PieChart/Arc/Arc.d.ts +0 -12
  227. package/lib/components/PieChart/Arc/Arc.js +0 -57
  228. package/lib/components/PieChart/Arc/Arc.js.map +0 -1
  229. package/lib/components/PieChart/Arc/Arc.styles.d.ts +0 -2
  230. package/lib/components/PieChart/Arc/Arc.styles.js +0 -8
  231. package/lib/components/PieChart/Arc/Arc.styles.js.map +0 -1
  232. package/lib/components/PieChart/Arc/Arc.types.d.ts +0 -60
  233. package/lib/components/PieChart/Arc/Arc.types.js +0 -2
  234. package/lib/components/PieChart/Arc/Arc.types.js.map +0 -1
  235. package/lib/components/PieChart/Arc/index.d.ts +0 -2
  236. package/lib/components/PieChart/Arc/index.js +0 -3
  237. package/lib/components/PieChart/Arc/index.js.map +0 -1
  238. package/lib/components/PieChart/Pie/Pie.d.ts +0 -10
  239. package/lib/components/PieChart/Pie/Pie.js +0 -35
  240. package/lib/components/PieChart/Pie/Pie.js.map +0 -1
  241. package/lib/components/PieChart/Pie/Pie.styles.d.ts +0 -2
  242. package/lib/components/PieChart/Pie/Pie.styles.js +0 -6
  243. package/lib/components/PieChart/Pie/Pie.styles.js.map +0 -1
  244. package/lib/components/PieChart/Pie/Pie.types.d.ts +0 -46
  245. package/lib/components/PieChart/Pie/Pie.types.js +0 -2
  246. package/lib/components/PieChart/Pie/Pie.types.js.map +0 -1
  247. package/lib/components/PieChart/Pie/index.d.ts +0 -2
  248. package/lib/components/PieChart/Pie/index.js +0 -3
  249. package/lib/components/PieChart/Pie/index.js.map +0 -1
  250. package/lib/components/PieChart/PieChart.base.d.ts +0 -7
  251. package/lib/components/PieChart/PieChart.base.js +0 -34
  252. package/lib/components/PieChart/PieChart.base.js.map +0 -1
  253. package/lib/components/PieChart/PieChart.d.ts +0 -3
  254. package/lib/components/PieChart/PieChart.js +0 -6
  255. package/lib/components/PieChart/PieChart.js.map +0 -1
  256. package/lib/components/PieChart/PieChart.styles.d.ts +0 -2
  257. package/lib/components/PieChart/PieChart.styles.js +0 -29
  258. package/lib/components/PieChart/PieChart.styles.js.map +0 -1
  259. package/lib/components/PieChart/PieChart.types.d.ts +0 -63
  260. package/lib/components/PieChart/PieChart.types.js +0 -2
  261. package/lib/components/PieChart/PieChart.types.js.map +0 -1
  262. package/lib/components/PieChart/index.d.ts +0 -2
  263. package/lib/components/PieChart/index.js +0 -3
  264. package/lib/components/PieChart/index.js.map +0 -1
  265. package/lib/components/SankeyChart/SankeyChart.base.d.ts +0 -95
  266. package/lib/components/SankeyChart/SankeyChart.base.js +0 -674
  267. package/lib/components/SankeyChart/SankeyChart.base.js.map +0 -1
  268. package/lib/components/SankeyChart/SankeyChart.d.ts +0 -3
  269. package/lib/components/SankeyChart/SankeyChart.js +0 -6
  270. package/lib/components/SankeyChart/SankeyChart.js.map +0 -1
  271. package/lib/components/SankeyChart/SankeyChart.styles.d.ts +0 -2
  272. package/lib/components/SankeyChart/SankeyChart.styles.js +0 -58
  273. package/lib/components/SankeyChart/SankeyChart.styles.js.map +0 -1
  274. package/lib/components/SankeyChart/SankeyChart.types.d.ts +0 -83
  275. package/lib/components/SankeyChart/SankeyChart.types.js +0 -2
  276. package/lib/components/SankeyChart/SankeyChart.types.js.map +0 -1
  277. package/lib/components/SankeyChart/index.d.ts +0 -2
  278. package/lib/components/SankeyChart/index.js +0 -3
  279. package/lib/components/SankeyChart/index.js.map +0 -1
  280. package/lib/components/Sparkline/Sparkline.base.d.ts +0 -20
  281. package/lib/components/Sparkline/Sparkline.base.js +0 -76
  282. package/lib/components/Sparkline/Sparkline.base.js.map +0 -1
  283. package/lib/components/Sparkline/Sparkline.d.ts +0 -3
  284. package/lib/components/Sparkline/Sparkline.js +0 -6
  285. package/lib/components/Sparkline/Sparkline.js.map +0 -1
  286. package/lib/components/Sparkline/Sparkline.styles.d.ts +0 -2
  287. package/lib/components/Sparkline/Sparkline.styles.js +0 -10
  288. package/lib/components/Sparkline/Sparkline.styles.js.map +0 -1
  289. package/lib/components/Sparkline/Sparkline.types.d.ts +0 -51
  290. package/lib/components/Sparkline/Sparkline.types.js +0 -2
  291. package/lib/components/Sparkline/Sparkline.types.js.map +0 -1
  292. package/lib/components/Sparkline/index.d.ts +0 -2
  293. package/lib/components/Sparkline/index.js +0 -3
  294. package/lib/components/Sparkline/index.js.map +0 -1
  295. package/lib/components/StackedBarChart/MultiStackedBarChart.base.d.ts +0 -56
  296. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +0 -357
  297. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +0 -1
  298. package/lib/components/StackedBarChart/MultiStackedBarChart.d.ts +0 -3
  299. package/lib/components/StackedBarChart/MultiStackedBarChart.js +0 -6
  300. package/lib/components/StackedBarChart/MultiStackedBarChart.js.map +0 -1
  301. package/lib/components/StackedBarChart/MultiStackedBarChart.styles.d.ts +0 -2
  302. package/lib/components/StackedBarChart/MultiStackedBarChart.styles.js +0 -90
  303. package/lib/components/StackedBarChart/MultiStackedBarChart.styles.js.map +0 -1
  304. package/lib/components/StackedBarChart/MultiStackedBarChart.types.d.ts +0 -198
  305. package/lib/components/StackedBarChart/MultiStackedBarChart.types.js +0 -6
  306. package/lib/components/StackedBarChart/MultiStackedBarChart.types.js.map +0 -1
  307. package/lib/components/StackedBarChart/StackedBarChart.base.d.ts +0 -51
  308. package/lib/components/StackedBarChart/StackedBarChart.base.js +0 -312
  309. package/lib/components/StackedBarChart/StackedBarChart.base.js.map +0 -1
  310. package/lib/components/StackedBarChart/StackedBarChart.d.ts +0 -3
  311. package/lib/components/StackedBarChart/StackedBarChart.js +0 -6
  312. package/lib/components/StackedBarChart/StackedBarChart.js.map +0 -1
  313. package/lib/components/StackedBarChart/StackedBarChart.styles.d.ts +0 -2
  314. package/lib/components/StackedBarChart/StackedBarChart.styles.js +0 -104
  315. package/lib/components/StackedBarChart/StackedBarChart.styles.js.map +0 -1
  316. package/lib/components/StackedBarChart/StackedBarChart.types.d.ts +0 -210
  317. package/lib/components/StackedBarChart/StackedBarChart.types.js +0 -2
  318. package/lib/components/StackedBarChart/StackedBarChart.types.js.map +0 -1
  319. package/lib/components/StackedBarChart/index.d.ts +0 -5
  320. package/lib/components/StackedBarChart/index.js +0 -6
  321. package/lib/components/StackedBarChart/index.js.map +0 -1
  322. package/lib/components/TreeChart/TreeChart.base.d.ts +0 -18
  323. package/lib/components/TreeChart/TreeChart.base.js +0 -316
  324. package/lib/components/TreeChart/TreeChart.base.js.map +0 -1
  325. package/lib/components/TreeChart/TreeChart.d.ts +0 -3
  326. package/lib/components/TreeChart/TreeChart.js +0 -5
  327. package/lib/components/TreeChart/TreeChart.js.map +0 -1
  328. package/lib/components/TreeChart/TreeChart.styles.d.ts +0 -2
  329. package/lib/components/TreeChart/TreeChart.styles.js +0 -29
  330. package/lib/components/TreeChart/TreeChart.styles.js.map +0 -1
  331. package/lib/components/TreeChart/TreeChart.types.d.ts +0 -197
  332. package/lib/components/TreeChart/TreeChart.types.js +0 -23
  333. package/lib/components/TreeChart/TreeChart.types.js.map +0 -1
  334. package/lib/components/TreeChart/index.d.ts +0 -2
  335. package/lib/components/TreeChart/index.js +0 -3
  336. package/lib/components/TreeChart/index.js.map +0 -1
  337. package/lib/components/VerticalBarChart/VerticalBarChart.base.d.ts +0 -74
  338. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +0 -536
  339. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +0 -1
  340. package/lib/components/VerticalBarChart/VerticalBarChart.d.ts +0 -3
  341. package/lib/components/VerticalBarChart/VerticalBarChart.js +0 -6
  342. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +0 -1
  343. package/lib/components/VerticalBarChart/VerticalBarChart.styles.d.ts +0 -2
  344. package/lib/components/VerticalBarChart/VerticalBarChart.styles.js +0 -28
  345. package/lib/components/VerticalBarChart/VerticalBarChart.styles.js.map +0 -1
  346. package/lib/components/VerticalBarChart/VerticalBarChart.types.d.ts +0 -114
  347. package/lib/components/VerticalBarChart/VerticalBarChart.types.js +0 -2
  348. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +0 -1
  349. package/lib/components/VerticalBarChart/index.d.ts +0 -2
  350. package/lib/components/VerticalBarChart/index.js +0 -3
  351. package/lib/components/VerticalBarChart/index.js.map +0 -1
  352. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +0 -85
  353. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +0 -666
  354. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +0 -1
  355. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.d.ts +0 -3
  356. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +0 -6
  357. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +0 -1
  358. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.d.ts +0 -2
  359. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js +0 -18
  360. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js.map +0 -1
  361. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +0 -142
  362. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +0 -2
  363. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +0 -1
  364. package/lib/components/VerticalStackedBarChart/index.d.ts +0 -2
  365. package/lib/components/VerticalStackedBarChart/index.js +0 -3
  366. package/lib/components/VerticalStackedBarChart/index.js.map +0 -1
  367. package/lib/index.d.ts +0 -19
  368. package/lib/index.js +0 -20
  369. package/lib/index.js.map +0 -1
  370. package/lib/types/IDataPoint.d.ts +0 -545
  371. package/lib/types/IDataPoint.js +0 -2
  372. package/lib/types/IDataPoint.js.map +0 -1
  373. package/lib/types/IEventAnnotation.d.ts +0 -6
  374. package/lib/types/IEventAnnotation.js +0 -2
  375. package/lib/types/IEventAnnotation.js.map +0 -1
  376. package/lib/types/ILegendDataItem.d.ts +0 -10
  377. package/lib/types/ILegendDataItem.js +0 -2
  378. package/lib/types/ILegendDataItem.js.map +0 -1
  379. package/lib/types/index.d.ts +0 -2
  380. package/lib/types/index.js +0 -3
  381. package/lib/types/index.js.map +0 -1
  382. package/lib/utilities/ChartHoverCard/ChartHoverCard.base.d.ts +0 -6
  383. package/lib/utilities/ChartHoverCard/ChartHoverCard.base.js +0 -38
  384. package/lib/utilities/ChartHoverCard/ChartHoverCard.base.js.map +0 -1
  385. package/lib/utilities/ChartHoverCard/ChartHoverCard.d.ts +0 -3
  386. package/lib/utilities/ChartHoverCard/ChartHoverCard.js +0 -6
  387. package/lib/utilities/ChartHoverCard/ChartHoverCard.js.map +0 -1
  388. package/lib/utilities/ChartHoverCard/ChartHoverCard.styles.d.ts +0 -2
  389. package/lib/utilities/ChartHoverCard/ChartHoverCard.styles.js +0 -82
  390. package/lib/utilities/ChartHoverCard/ChartHoverCard.styles.js.map +0 -1
  391. package/lib/utilities/ChartHoverCard/ChartHoverCard.types.d.ts +0 -105
  392. package/lib/utilities/ChartHoverCard/ChartHoverCard.types.js +0 -2
  393. package/lib/utilities/ChartHoverCard/ChartHoverCard.types.js.map +0 -1
  394. package/lib/utilities/ChartHoverCard/index.d.ts +0 -3
  395. package/lib/utilities/ChartHoverCard/index.js +0 -4
  396. package/lib/utilities/ChartHoverCard/index.js.map +0 -1
  397. package/lib/utilities/colors.d.ts +0 -51
  398. package/lib/utilities/colors.js +0 -132
  399. package/lib/utilities/colors.js.map +0 -1
  400. package/lib/utilities/index.d.ts +0 -3
  401. package/lib/utilities/index.js +0 -4
  402. package/lib/utilities/index.js.map +0 -1
  403. package/lib/utilities/utilities.d.ts +0 -377
  404. package/lib/utilities/utilities.js +0 -864
  405. package/lib/utilities/utilities.js.map +0 -1
  406. package/lib/version.d.ts +0 -1
  407. package/lib/version.js +0 -5
  408. package/lib/version.js.map +0 -1
  409. package/lib-amd/AreaChart.d.ts +0 -1
  410. package/lib-amd/AreaChart.js +0 -6
  411. package/lib-amd/AreaChart.js.map +0 -1
  412. package/lib-amd/CartesianChart.d.ts +0 -1
  413. package/lib-amd/CartesianChart.js +0 -6
  414. package/lib-amd/CartesianChart.js.map +0 -1
  415. package/lib-amd/DonutChart.d.ts +0 -1
  416. package/lib-amd/DonutChart.js +0 -6
  417. package/lib-amd/DonutChart.js.map +0 -1
  418. package/lib-amd/GroupedVerticalBarChart.d.ts +0 -1
  419. package/lib-amd/GroupedVerticalBarChart.js +0 -6
  420. package/lib-amd/GroupedVerticalBarChart.js.map +0 -1
  421. package/lib-amd/HeatMapChart.d.ts +0 -1
  422. package/lib-amd/HeatMapChart.js +0 -6
  423. package/lib-amd/HeatMapChart.js.map +0 -1
  424. package/lib-amd/HorizontalBarChart.d.ts +0 -1
  425. package/lib-amd/HorizontalBarChart.js +0 -6
  426. package/lib-amd/HorizontalBarChart.js.map +0 -1
  427. package/lib-amd/Legends.d.ts +0 -1
  428. package/lib-amd/Legends.js +0 -6
  429. package/lib-amd/Legends.js.map +0 -1
  430. package/lib-amd/LineChart.d.ts +0 -1
  431. package/lib-amd/LineChart.js +0 -6
  432. package/lib-amd/LineChart.js.map +0 -1
  433. package/lib-amd/PieChart.d.ts +0 -1
  434. package/lib-amd/PieChart.js +0 -6
  435. package/lib-amd/PieChart.js.map +0 -1
  436. package/lib-amd/SankeyChart.d.ts +0 -1
  437. package/lib-amd/SankeyChart.js +0 -6
  438. package/lib-amd/SankeyChart.js.map +0 -1
  439. package/lib-amd/Sparkline.d.ts +0 -1
  440. package/lib-amd/Sparkline.js +0 -6
  441. package/lib-amd/Sparkline.js.map +0 -1
  442. package/lib-amd/StackedBarChart.d.ts +0 -1
  443. package/lib-amd/StackedBarChart.js +0 -6
  444. package/lib-amd/StackedBarChart.js.map +0 -1
  445. package/lib-amd/Styling.d.ts +0 -2
  446. package/lib-amd/Styling.js +0 -75
  447. package/lib-amd/Styling.js.map +0 -1
  448. package/lib-amd/TreeChart.d.ts +0 -1
  449. package/lib-amd/TreeChart.js +0 -6
  450. package/lib-amd/TreeChart.js.map +0 -1
  451. package/lib-amd/Utilities.d.ts +0 -2
  452. package/lib-amd/Utilities.js +0 -183
  453. package/lib-amd/Utilities.js.map +0 -1
  454. package/lib-amd/VerticalBarChart.d.ts +0 -1
  455. package/lib-amd/VerticalBarChart.js +0 -6
  456. package/lib-amd/VerticalBarChart.js.map +0 -1
  457. package/lib-amd/VerticalStackedBarChart.d.ts +0 -1
  458. package/lib-amd/VerticalStackedBarChart.js +0 -6
  459. package/lib-amd/VerticalStackedBarChart.js.map +0 -1
  460. package/lib-amd/components/AreaChart/AreaChart.base.d.ts +0 -92
  461. package/lib-amd/components/AreaChart/AreaChart.base.js +0 -555
  462. package/lib-amd/components/AreaChart/AreaChart.base.js.map +0 -1
  463. package/lib-amd/components/AreaChart/AreaChart.d.ts +0 -3
  464. package/lib-amd/components/AreaChart/AreaChart.js +0 -8
  465. package/lib-amd/components/AreaChart/AreaChart.js.map +0 -1
  466. package/lib-amd/components/AreaChart/AreaChart.styles.d.ts +0 -2
  467. package/lib-amd/components/AreaChart/AreaChart.styles.js +0 -12
  468. package/lib-amd/components/AreaChart/AreaChart.styles.js.map +0 -1
  469. package/lib-amd/components/AreaChart/AreaChart.types.d.ts +0 -37
  470. package/lib-amd/components/AreaChart/AreaChart.types.js +0 -5
  471. package/lib-amd/components/AreaChart/AreaChart.types.js.map +0 -1
  472. package/lib-amd/components/AreaChart/index.d.ts +0 -2
  473. package/lib-amd/components/AreaChart/index.js +0 -7
  474. package/lib-amd/components/AreaChart/index.js.map +0 -1
  475. package/lib-amd/components/CommonComponents/CartesianChart.base.d.ts +0 -43
  476. package/lib-amd/components/CommonComponents/CartesianChart.base.js +0 -329
  477. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +0 -1
  478. package/lib-amd/components/CommonComponents/CartesianChart.d.ts +0 -3
  479. package/lib-amd/components/CommonComponents/CartesianChart.js +0 -7
  480. package/lib-amd/components/CommonComponents/CartesianChart.js.map +0 -1
  481. package/lib-amd/components/CommonComponents/CartesianChart.styles.d.ts +0 -2
  482. package/lib-amd/components/CommonComponents/CartesianChart.styles.js +0 -166
  483. package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +0 -1
  484. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +0 -428
  485. package/lib-amd/components/CommonComponents/CartesianChart.types.js +0 -5
  486. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +0 -1
  487. package/lib-amd/components/CommonComponents/index.d.ts +0 -2
  488. package/lib-amd/components/CommonComponents/index.js +0 -7
  489. package/lib-amd/components/CommonComponents/index.js.map +0 -1
  490. package/lib-amd/components/DonutChart/Arc/Arc.d.ts +0 -21
  491. package/lib-amd/components/DonutChart/Arc/Arc.js +0 -85
  492. package/lib-amd/components/DonutChart/Arc/Arc.js.map +0 -1
  493. package/lib-amd/components/DonutChart/Arc/Arc.styles.d.ts +0 -2
  494. package/lib-amd/components/DonutChart/Arc/Arc.styles.js +0 -33
  495. package/lib-amd/components/DonutChart/Arc/Arc.styles.js.map +0 -1
  496. package/lib-amd/components/DonutChart/Arc/Arc.types.d.ts +0 -124
  497. package/lib-amd/components/DonutChart/Arc/Arc.types.js +0 -5
  498. package/lib-amd/components/DonutChart/Arc/Arc.types.js.map +0 -1
  499. package/lib-amd/components/DonutChart/Arc/index.d.ts +0 -2
  500. package/lib-amd/components/DonutChart/Arc/index.js +0 -7
  501. package/lib-amd/components/DonutChart/Arc/index.js.map +0 -1
  502. package/lib-amd/components/DonutChart/DonutChart.base.d.ts +0 -50
  503. package/lib-amd/components/DonutChart/DonutChart.base.js +0 -208
  504. package/lib-amd/components/DonutChart/DonutChart.base.js.map +0 -1
  505. package/lib-amd/components/DonutChart/DonutChart.d.ts +0 -3
  506. package/lib-amd/components/DonutChart/DonutChart.js +0 -8
  507. package/lib-amd/components/DonutChart/DonutChart.js.map +0 -1
  508. package/lib-amd/components/DonutChart/DonutChart.styles.d.ts +0 -2
  509. package/lib-amd/components/DonutChart/DonutChart.styles.js +0 -36
  510. package/lib-amd/components/DonutChart/DonutChart.styles.js.map +0 -1
  511. package/lib-amd/components/DonutChart/DonutChart.types.d.ts +0 -63
  512. package/lib-amd/components/DonutChart/DonutChart.types.js +0 -5
  513. package/lib-amd/components/DonutChart/DonutChart.types.js.map +0 -1
  514. package/lib-amd/components/DonutChart/Pie/Pie.d.ts +0 -15
  515. package/lib-amd/components/DonutChart/Pie/Pie.js +0 -69
  516. package/lib-amd/components/DonutChart/Pie/Pie.js.map +0 -1
  517. package/lib-amd/components/DonutChart/Pie/Pie.styles.d.ts +0 -2
  518. package/lib-amd/components/DonutChart/Pie/Pie.styles.js +0 -24
  519. package/lib-amd/components/DonutChart/Pie/Pie.styles.js.map +0 -1
  520. package/lib-amd/components/DonutChart/Pie/Pie.types.d.ts +0 -96
  521. package/lib-amd/components/DonutChart/Pie/Pie.types.js +0 -5
  522. package/lib-amd/components/DonutChart/Pie/Pie.types.js.map +0 -1
  523. package/lib-amd/components/DonutChart/Pie/index.d.ts +0 -2
  524. package/lib-amd/components/DonutChart/Pie/index.js +0 -7
  525. package/lib-amd/components/DonutChart/Pie/index.js.map +0 -1
  526. package/lib-amd/components/DonutChart/index.d.ts +0 -3
  527. package/lib-amd/components/DonutChart/index.js +0 -8
  528. package/lib-amd/components/DonutChart/index.js.map +0 -1
  529. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +0 -62
  530. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +0 -375
  531. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +0 -1
  532. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.d.ts +0 -3
  533. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +0 -8
  534. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +0 -1
  535. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.d.ts +0 -2
  536. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js +0 -21
  537. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js.map +0 -1
  538. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +0 -83
  539. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +0 -5
  540. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +0 -1
  541. package/lib-amd/components/GroupedVerticalBarChart/index.d.ts +0 -2
  542. package/lib-amd/components/GroupedVerticalBarChart/index.js +0 -7
  543. package/lib-amd/components/GroupedVerticalBarChart/index.js.map +0 -1
  544. package/lib-amd/components/HeatMapChart/HeatMapChart.base.d.ts +0 -147
  545. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +0 -492
  546. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +0 -1
  547. package/lib-amd/components/HeatMapChart/HeatMapChart.d.ts +0 -3
  548. package/lib-amd/components/HeatMapChart/HeatMapChart.js +0 -7
  549. package/lib-amd/components/HeatMapChart/HeatMapChart.js.map +0 -1
  550. package/lib-amd/components/HeatMapChart/HeatMapChart.styles.d.ts +0 -2
  551. package/lib-amd/components/HeatMapChart/HeatMapChart.styles.js +0 -29
  552. package/lib-amd/components/HeatMapChart/HeatMapChart.styles.js.map +0 -1
  553. package/lib-amd/components/HeatMapChart/HeatMapChart.types.d.ts +0 -110
  554. package/lib-amd/components/HeatMapChart/HeatMapChart.types.js +0 -5
  555. package/lib-amd/components/HeatMapChart/HeatMapChart.types.js.map +0 -1
  556. package/lib-amd/components/HeatMapChart/index.d.ts +0 -2
  557. package/lib-amd/components/HeatMapChart/index.js +0 -7
  558. package/lib-amd/components/HeatMapChart/index.js.map +0 -1
  559. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.d.ts +0 -36
  560. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js +0 -234
  561. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +0 -1
  562. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.d.ts +0 -3
  563. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.js +0 -8
  564. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.js.map +0 -1
  565. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.styles.d.ts +0 -2
  566. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.styles.js +0 -72
  567. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.styles.js.map +0 -1
  568. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.d.ts +0 -172
  569. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.js +0 -11
  570. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.js.map +0 -1
  571. package/lib-amd/components/HorizontalBarChart/index.d.ts +0 -3
  572. package/lib-amd/components/HorizontalBarChart/index.js +0 -8
  573. package/lib-amd/components/HorizontalBarChart/index.js.map +0 -1
  574. package/lib-amd/components/Legends/Legends.base.d.ts +0 -44
  575. package/lib-amd/components/Legends/Legends.base.js +0 -290
  576. package/lib-amd/components/Legends/Legends.base.js.map +0 -1
  577. package/lib-amd/components/Legends/Legends.d.ts +0 -3
  578. package/lib-amd/components/Legends/Legends.js +0 -7
  579. package/lib-amd/components/Legends/Legends.js.map +0 -1
  580. package/lib-amd/components/Legends/Legends.styles.d.ts +0 -2
  581. package/lib-amd/components/Legends/Legends.styles.js +0 -107
  582. package/lib-amd/components/Legends/Legends.styles.js.map +0 -1
  583. package/lib-amd/components/Legends/Legends.types.d.ts +0 -169
  584. package/lib-amd/components/Legends/Legends.types.js +0 -5
  585. package/lib-amd/components/Legends/Legends.types.js.map +0 -1
  586. package/lib-amd/components/Legends/index.d.ts +0 -3
  587. package/lib-amd/components/Legends/index.js +0 -8
  588. package/lib-amd/components/Legends/index.js.map +0 -1
  589. package/lib-amd/components/Legends/shape.d.ts +0 -9
  590. package/lib-amd/components/Legends/shape.js +0 -27
  591. package/lib-amd/components/Legends/shape.js.map +0 -1
  592. package/lib-amd/components/LineChart/LineChart.base.d.ts +0 -84
  593. package/lib-amd/components/LineChart/LineChart.base.js +0 -809
  594. package/lib-amd/components/LineChart/LineChart.base.js.map +0 -1
  595. package/lib-amd/components/LineChart/LineChart.d.ts +0 -3
  596. package/lib-amd/components/LineChart/LineChart.js +0 -8
  597. package/lib-amd/components/LineChart/LineChart.js.map +0 -1
  598. package/lib-amd/components/LineChart/LineChart.styles.d.ts +0 -2
  599. package/lib-amd/components/LineChart/LineChart.styles.js +0 -12
  600. package/lib-amd/components/LineChart/LineChart.styles.js.map +0 -1
  601. package/lib-amd/components/LineChart/LineChart.types.d.ts +0 -72
  602. package/lib-amd/components/LineChart/LineChart.types.js +0 -5
  603. package/lib-amd/components/LineChart/LineChart.types.js.map +0 -1
  604. package/lib-amd/components/LineChart/eventAnnotation/EventAnnotation.d.ts +0 -10
  605. package/lib-amd/components/LineChart/eventAnnotation/EventAnnotation.js +0 -95
  606. package/lib-amd/components/LineChart/eventAnnotation/EventAnnotation.js.map +0 -1
  607. package/lib-amd/components/LineChart/eventAnnotation/LabelLink.d.ts +0 -22
  608. package/lib-amd/components/LineChart/eventAnnotation/LabelLink.js +0 -40
  609. package/lib-amd/components/LineChart/eventAnnotation/LabelLink.js.map +0 -1
  610. package/lib-amd/components/LineChart/eventAnnotation/Textbox.d.ts +0 -13
  611. package/lib-amd/components/LineChart/eventAnnotation/Textbox.js +0 -40
  612. package/lib-amd/components/LineChart/eventAnnotation/Textbox.js.map +0 -1
  613. package/lib-amd/components/LineChart/index.d.ts +0 -3
  614. package/lib-amd/components/LineChart/index.js +0 -8
  615. package/lib-amd/components/LineChart/index.js.map +0 -1
  616. package/lib-amd/components/PieChart/Arc/Arc.d.ts +0 -12
  617. package/lib-amd/components/PieChart/Arc/Arc.js +0 -56
  618. package/lib-amd/components/PieChart/Arc/Arc.js.map +0 -1
  619. package/lib-amd/components/PieChart/Arc/Arc.styles.d.ts +0 -2
  620. package/lib-amd/components/PieChart/Arc/Arc.styles.js +0 -13
  621. package/lib-amd/components/PieChart/Arc/Arc.styles.js.map +0 -1
  622. package/lib-amd/components/PieChart/Arc/Arc.types.d.ts +0 -60
  623. package/lib-amd/components/PieChart/Arc/Arc.types.js +0 -5
  624. package/lib-amd/components/PieChart/Arc/Arc.types.js.map +0 -1
  625. package/lib-amd/components/PieChart/Arc/index.d.ts +0 -2
  626. package/lib-amd/components/PieChart/Arc/index.js +0 -7
  627. package/lib-amd/components/PieChart/Arc/index.js.map +0 -1
  628. package/lib-amd/components/PieChart/Pie/Pie.d.ts +0 -10
  629. package/lib-amd/components/PieChart/Pie/Pie.js +0 -35
  630. package/lib-amd/components/PieChart/Pie/Pie.js.map +0 -1
  631. package/lib-amd/components/PieChart/Pie/Pie.styles.d.ts +0 -2
  632. package/lib-amd/components/PieChart/Pie/Pie.styles.js +0 -12
  633. package/lib-amd/components/PieChart/Pie/Pie.styles.js.map +0 -1
  634. package/lib-amd/components/PieChart/Pie/Pie.types.d.ts +0 -46
  635. package/lib-amd/components/PieChart/Pie/Pie.types.js +0 -5
  636. package/lib-amd/components/PieChart/Pie/Pie.types.js.map +0 -1
  637. package/lib-amd/components/PieChart/Pie/index.d.ts +0 -2
  638. package/lib-amd/components/PieChart/Pie/index.js +0 -7
  639. package/lib-amd/components/PieChart/Pie/index.js.map +0 -1
  640. package/lib-amd/components/PieChart/PieChart.base.d.ts +0 -7
  641. package/lib-amd/components/PieChart/PieChart.base.js +0 -35
  642. package/lib-amd/components/PieChart/PieChart.base.js.map +0 -1
  643. package/lib-amd/components/PieChart/PieChart.d.ts +0 -3
  644. package/lib-amd/components/PieChart/PieChart.js +0 -8
  645. package/lib-amd/components/PieChart/PieChart.js.map +0 -1
  646. package/lib-amd/components/PieChart/PieChart.styles.d.ts +0 -2
  647. package/lib-amd/components/PieChart/PieChart.styles.js +0 -34
  648. package/lib-amd/components/PieChart/PieChart.styles.js.map +0 -1
  649. package/lib-amd/components/PieChart/PieChart.types.d.ts +0 -63
  650. package/lib-amd/components/PieChart/PieChart.types.js +0 -5
  651. package/lib-amd/components/PieChart/PieChart.types.js.map +0 -1
  652. package/lib-amd/components/PieChart/index.d.ts +0 -2
  653. package/lib-amd/components/PieChart/index.js +0 -7
  654. package/lib-amd/components/PieChart/index.js.map +0 -1
  655. package/lib-amd/components/SankeyChart/SankeyChart.base.d.ts +0 -95
  656. package/lib-amd/components/SankeyChart/SankeyChart.base.js +0 -669
  657. package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +0 -1
  658. package/lib-amd/components/SankeyChart/SankeyChart.d.ts +0 -3
  659. package/lib-amd/components/SankeyChart/SankeyChart.js +0 -8
  660. package/lib-amd/components/SankeyChart/SankeyChart.js.map +0 -1
  661. package/lib-amd/components/SankeyChart/SankeyChart.styles.d.ts +0 -2
  662. package/lib-amd/components/SankeyChart/SankeyChart.styles.js +0 -62
  663. package/lib-amd/components/SankeyChart/SankeyChart.styles.js.map +0 -1
  664. package/lib-amd/components/SankeyChart/SankeyChart.types.d.ts +0 -83
  665. package/lib-amd/components/SankeyChart/SankeyChart.types.js +0 -5
  666. package/lib-amd/components/SankeyChart/SankeyChart.types.js.map +0 -1
  667. package/lib-amd/components/SankeyChart/index.d.ts +0 -2
  668. package/lib-amd/components/SankeyChart/index.js +0 -7
  669. package/lib-amd/components/SankeyChart/index.js.map +0 -1
  670. package/lib-amd/components/Sparkline/Sparkline.base.d.ts +0 -20
  671. package/lib-amd/components/Sparkline/Sparkline.base.js +0 -74
  672. package/lib-amd/components/Sparkline/Sparkline.base.js.map +0 -1
  673. package/lib-amd/components/Sparkline/Sparkline.d.ts +0 -3
  674. package/lib-amd/components/Sparkline/Sparkline.js +0 -8
  675. package/lib-amd/components/Sparkline/Sparkline.js.map +0 -1
  676. package/lib-amd/components/Sparkline/Sparkline.styles.d.ts +0 -2
  677. package/lib-amd/components/Sparkline/Sparkline.styles.js +0 -15
  678. package/lib-amd/components/Sparkline/Sparkline.styles.js.map +0 -1
  679. package/lib-amd/components/Sparkline/Sparkline.types.d.ts +0 -51
  680. package/lib-amd/components/Sparkline/Sparkline.types.js +0 -5
  681. package/lib-amd/components/Sparkline/Sparkline.types.js.map +0 -1
  682. package/lib-amd/components/Sparkline/index.d.ts +0 -2
  683. package/lib-amd/components/Sparkline/index.js +0 -7
  684. package/lib-amd/components/Sparkline/index.js.map +0 -1
  685. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.d.ts +0 -56
  686. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +0 -352
  687. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +0 -1
  688. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.d.ts +0 -3
  689. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.js +0 -8
  690. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.js.map +0 -1
  691. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.styles.d.ts +0 -2
  692. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.styles.js +0 -93
  693. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.styles.js.map +0 -1
  694. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.d.ts +0 -198
  695. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.js +0 -11
  696. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.js.map +0 -1
  697. package/lib-amd/components/StackedBarChart/StackedBarChart.base.d.ts +0 -51
  698. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +0 -309
  699. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +0 -1
  700. package/lib-amd/components/StackedBarChart/StackedBarChart.d.ts +0 -3
  701. package/lib-amd/components/StackedBarChart/StackedBarChart.js +0 -8
  702. package/lib-amd/components/StackedBarChart/StackedBarChart.js.map +0 -1
  703. package/lib-amd/components/StackedBarChart/StackedBarChart.styles.d.ts +0 -2
  704. package/lib-amd/components/StackedBarChart/StackedBarChart.styles.js +0 -108
  705. package/lib-amd/components/StackedBarChart/StackedBarChart.styles.js.map +0 -1
  706. package/lib-amd/components/StackedBarChart/StackedBarChart.types.d.ts +0 -210
  707. package/lib-amd/components/StackedBarChart/StackedBarChart.types.js +0 -5
  708. package/lib-amd/components/StackedBarChart/StackedBarChart.types.js.map +0 -1
  709. package/lib-amd/components/StackedBarChart/index.d.ts +0 -5
  710. package/lib-amd/components/StackedBarChart/index.js +0 -10
  711. package/lib-amd/components/StackedBarChart/index.js.map +0 -1
  712. package/lib-amd/components/TreeChart/TreeChart.base.d.ts +0 -18
  713. package/lib-amd/components/TreeChart/TreeChart.base.js +0 -314
  714. package/lib-amd/components/TreeChart/TreeChart.base.js.map +0 -1
  715. package/lib-amd/components/TreeChart/TreeChart.d.ts +0 -3
  716. package/lib-amd/components/TreeChart/TreeChart.js +0 -7
  717. package/lib-amd/components/TreeChart/TreeChart.js.map +0 -1
  718. package/lib-amd/components/TreeChart/TreeChart.styles.d.ts +0 -2
  719. package/lib-amd/components/TreeChart/TreeChart.styles.js +0 -34
  720. package/lib-amd/components/TreeChart/TreeChart.styles.js.map +0 -1
  721. package/lib-amd/components/TreeChart/TreeChart.types.d.ts +0 -197
  722. package/lib-amd/components/TreeChart/TreeChart.types.js +0 -28
  723. package/lib-amd/components/TreeChart/TreeChart.types.js.map +0 -1
  724. package/lib-amd/components/TreeChart/index.d.ts +0 -2
  725. package/lib-amd/components/TreeChart/index.js +0 -7
  726. package/lib-amd/components/TreeChart/index.js.map +0 -1
  727. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.d.ts +0 -74
  728. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +0 -529
  729. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +0 -1
  730. package/lib-amd/components/VerticalBarChart/VerticalBarChart.d.ts +0 -3
  731. package/lib-amd/components/VerticalBarChart/VerticalBarChart.js +0 -8
  732. package/lib-amd/components/VerticalBarChart/VerticalBarChart.js.map +0 -1
  733. package/lib-amd/components/VerticalBarChart/VerticalBarChart.styles.d.ts +0 -2
  734. package/lib-amd/components/VerticalBarChart/VerticalBarChart.styles.js +0 -32
  735. package/lib-amd/components/VerticalBarChart/VerticalBarChart.styles.js.map +0 -1
  736. package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.d.ts +0 -114
  737. package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.js +0 -5
  738. package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.js.map +0 -1
  739. package/lib-amd/components/VerticalBarChart/index.d.ts +0 -2
  740. package/lib-amd/components/VerticalBarChart/index.js +0 -7
  741. package/lib-amd/components/VerticalBarChart/index.js.map +0 -1
  742. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +0 -85
  743. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +0 -659
  744. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +0 -1
  745. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.d.ts +0 -3
  746. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.js +0 -8
  747. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +0 -1
  748. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.d.ts +0 -2
  749. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js +0 -22
  750. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js.map +0 -1
  751. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +0 -142
  752. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +0 -5
  753. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +0 -1
  754. package/lib-amd/components/VerticalStackedBarChart/index.d.ts +0 -2
  755. package/lib-amd/components/VerticalStackedBarChart/index.js +0 -7
  756. package/lib-amd/components/VerticalStackedBarChart/index.js.map +0 -1
  757. package/lib-amd/index.d.ts +0 -19
  758. package/lib-amd/index.js +0 -23
  759. package/lib-amd/index.js.map +0 -1
  760. package/lib-amd/types/IDataPoint.d.ts +0 -545
  761. package/lib-amd/types/IDataPoint.js +0 -5
  762. package/lib-amd/types/IDataPoint.js.map +0 -1
  763. package/lib-amd/types/IEventAnnotation.d.ts +0 -6
  764. package/lib-amd/types/IEventAnnotation.js +0 -5
  765. package/lib-amd/types/IEventAnnotation.js.map +0 -1
  766. package/lib-amd/types/ILegendDataItem.d.ts +0 -10
  767. package/lib-amd/types/ILegendDataItem.js +0 -5
  768. package/lib-amd/types/ILegendDataItem.js.map +0 -1
  769. package/lib-amd/types/index.d.ts +0 -2
  770. package/lib-amd/types/index.js +0 -7
  771. package/lib-amd/types/index.js.map +0 -1
  772. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.base.d.ts +0 -6
  773. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.base.js +0 -39
  774. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.base.js.map +0 -1
  775. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.d.ts +0 -3
  776. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.js +0 -8
  777. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.js.map +0 -1
  778. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.styles.d.ts +0 -2
  779. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.styles.js +0 -87
  780. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.styles.js.map +0 -1
  781. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.types.d.ts +0 -105
  782. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.types.js +0 -5
  783. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.types.js.map +0 -1
  784. package/lib-amd/utilities/ChartHoverCard/index.d.ts +0 -3
  785. package/lib-amd/utilities/ChartHoverCard/index.js +0 -8
  786. package/lib-amd/utilities/ChartHoverCard/index.js.map +0 -1
  787. package/lib-amd/utilities/colors.d.ts +0 -51
  788. package/lib-amd/utilities/colors.js +0 -139
  789. package/lib-amd/utilities/colors.js.map +0 -1
  790. package/lib-amd/utilities/index.d.ts +0 -3
  791. package/lib-amd/utilities/index.js +0 -8
  792. package/lib-amd/utilities/index.js.map +0 -1
  793. package/lib-amd/utilities/utilities.d.ts +0 -377
  794. package/lib-amd/utilities/utilities.js +0 -888
  795. package/lib-amd/utilities/utilities.js.map +0 -1
  796. package/lib-amd/version.d.ts +0 -1
  797. package/lib-amd/version.js +0 -6
  798. package/lib-amd/version.js.map +0 -1
@@ -1,316 +0,0 @@
1
- import { __extends } from "tslib";
2
- import * as React from 'react';
3
- import { hierarchy, tree } from 'd3-hierarchy';
4
- import { classNamesFunction } from '@fluentui/react/lib/Utilities';
5
- import { select, selectAll } from 'd3-selection';
6
- import { FocusZone } from '@fluentui/react-focus';
7
- import { max as d3Max, min as d3Min } from 'd3-array';
8
- var getClassNames = classNamesFunction();
9
- // Create a parent class for common tree components
10
- var StandardTree = /** @class */ (function () {
11
- function StandardTree(treeData, styleClassNames, _nodeElements, _linkElements) {
12
- if (_nodeElements === void 0) { _nodeElements = []; }
13
- if (_linkElements === void 0) { _linkElements = []; }
14
- this._nodeElements = [];
15
- this._linkElements = [];
16
- this.treeData = treeData;
17
- this.styleClassNames = styleClassNames;
18
- this._nodeElements = _nodeElements;
19
- this._linkElements = _linkElements;
20
- }
21
- StandardTree.prototype.truncateText = function (text, rectangleWidth, padding, styleClass) {
22
- var truncatedText = '';
23
- var words = text.split(/\s+/).reverse();
24
- var word = '';
25
- var tspan = select('.svgTree').append('text').attr('class', 'tempText').append('tspan').text(null);
26
- if (styleClass) {
27
- tspan.attr('class', styleClass);
28
- }
29
- var line = [];
30
- while ((word = words.pop())) {
31
- line.push(word);
32
- tspan.text(line.join(' ') + ' ');
33
- if (tspan.node() !== null) {
34
- var w = tspan.node().getComputedTextLength();
35
- if (w > rectangleWidth - padding) {
36
- line.pop();
37
- line.push('...');
38
- break;
39
- }
40
- }
41
- }
42
- truncatedText = line.join(' ') + ' ';
43
- tspan.text(null);
44
- selectAll('.tempText').remove();
45
- return truncatedText;
46
- };
47
- // Append node elements
48
- // nodeId to create unique key
49
- StandardTree.prototype.addNodeShapetoSVG = function (name, subname, bodytext, metricName, xCenterCoordinate, yCoordinate, fillColor, rectangleWidth, rectangleHeight, nodeId, parentInfo) {
50
- var ariaLabel = "nodeId: " + nodeId + " \nnodeMainText: " + name + "\nsubText " + subname + " " + parentInfo;
51
- var xCoordinate = xCenterCoordinate - rectangleWidth / 2;
52
- if (metricName || nodeId !== 0 || !bodytext) {
53
- this._nodeElements.push(React.createElement("rect", { width: rectangleWidth, height: rectangleHeight, x: xCoordinate, y: yCoordinate, tabIndex: 0, role: 'text', "data-is-focusable": true, "aria-label": ariaLabel, className: this.styleClassNames.rectNode, stroke: fillColor, key: "" + nodeId + this.styleClassNames.rectNode }));
54
- }
55
- if (subname) {
56
- subname = this.truncateText(subname, rectangleWidth, rectangleWidth / 4, this.styleClassNames.rectSubText);
57
- }
58
- if (bodytext) {
59
- bodytext = this.truncateText(bodytext, rectangleWidth, rectangleWidth / 4, this.styleClassNames.rectBodyText);
60
- }
61
- if (metricName) {
62
- metricName = this.truncateText(metricName, rectangleWidth, rectangleWidth / 4, this.styleClassNames.rectMetricText);
63
- }
64
- name = this.truncateText(name, rectangleWidth, rectangleWidth / 4, this.styleClassNames.rectText);
65
- // Text position y = y + rectHeight/2, 2 is ratio for depth
66
- // Text position x = x + rectWidth/2, 2 is ratio for length
67
- // Sub-text position x = x + rectWidth/2, 2 is ratio for length
68
- var subValue = metricName ? (React.createElement("tspan", { className: this.styleClassNames.rectMetricText, dy: "1.4em", x: xCoordinate + rectangleWidth / 2 }, metricName)) : bodytext ? (React.createElement(React.Fragment, null,
69
- React.createElement("tspan", { className: this.styleClassNames.rectSubText, dy: "1.4em", x: xCoordinate + rectangleWidth / 2 }, subname),
70
- React.createElement("tspan", { className: this.styleClassNames.rectBodyText, dy: "1.4em", x: xCoordinate + rectangleWidth / 2 }, bodytext))) : (React.createElement("tspan", { className: this.styleClassNames.rectSubText, dy: "1.4em", x: xCoordinate + rectangleWidth / 2 }, subname));
71
- if (!subname && !metricName && !bodytext) {
72
- this._nodeElements.push(React.createElement("text", { textAnchor: "middle", className: this.styleClassNames.rectMetricText, dy: yCoordinate + rectangleHeight / 1.6, x: xCoordinate + rectangleWidth / 2, key: "" + nodeId + this.styleClassNames.rectText }, name));
73
- }
74
- else {
75
- this._nodeElements.push(React.createElement("text", { textAnchor: "middle", className: metricName ? this.styleClassNames.rectSubText : this.styleClassNames.rectText, dy: metricName ? yCoordinate + rectangleHeight / 2.5 : yCoordinate + rectangleHeight / 2, x: xCoordinate + rectangleWidth / 2, key: "" + nodeId + this.styleClassNames.rectText },
76
- name,
77
- subValue));
78
- }
79
- };
80
- // Create a rectangular path from parent to the child nodes
81
- StandardTree.prototype.createPathLink = function (parentX, parentY, childX, childY, leaf, rectWidth, rectHeight, gap, childXMax) {
82
- // gap adds ratio for parent.y to child.y
83
- /*Below code is used to draw lines(___|) to show the parent child relation i.e a vertical line
84
- emerging from the parent and
85
- then a horzontal line encompassing all the its children which are
86
- shown below it .so it gives a visual representation of tree branches.
87
-
88
- So for making this path firstly we are moving to the childX which is the mid point of the node and then
89
- we are subtracting the half of rectwidth to move the complete width of the rectangle and
90
- we are subtracting gap from y cordinate as we are making this line at a little gap from node.
91
- Then we are building that line horizonatlly till childXmax, again adding half rectwidth to complete
92
- the line till end as childXmax will be midpoint.
93
- Then last part is for making line vertical for that we move to the parentx position and
94
- then draw the vertical till parenty + rectHeight + gap/2
95
- We have seperate path for leaf node as we are using different composition like compact, long etc.*/
96
- var path = "M" + (childX - rectWidth / 2) + "," + (childY - gap) + " H" + (childXMax + rectWidth / 2) + " M" + parentX + "," + (childY - gap) + "\n V" + (parentY + rectHeight + gap / 2);
97
- var leafpath = "M" + parentX + "," + (parentY + rectHeight + gap / 2) + " V" + (parentY + gap * 5) + "\n H" + (parentX - rectWidth / 2) + " H" + (parentX + rectWidth / 2);
98
- // based on the type of node return leafpath or path element
99
- return leaf ? leafpath : path;
100
- };
101
- // Append path link element
102
- StandardTree.prototype.addLinktoSVG = function (nodeId, parentX, parentY, childX, childY, leaf, rectWidth, rectHeight, gap, childXMax) {
103
- if (childXMax === void 0) { childXMax = 0; }
104
- this._linkElements.push(React.createElement("path", { className: this.styleClassNames.link, d: this.createPathLink(parentX, parentY, childX, childY, leaf, rectWidth, rectHeight, gap, childXMax), key: "" + nodeId + this.styleClassNames.link }));
105
- };
106
- return StandardTree;
107
- }());
108
- // Create child class to Add Tree component based on treeHeight
109
- var LayeredTree = /** @class */ (function (_super) {
110
- __extends(LayeredTree, _super);
111
- function LayeredTree(treeData, composition, styleClassNames, _nodeElements, _linkElements, _treeTraversal) {
112
- if (_nodeElements === void 0) { _nodeElements = []; }
113
- if (_linkElements === void 0) { _linkElements = []; }
114
- var _this = _super.call(this, treeData, styleClassNames, _nodeElements, _linkElements) || this;
115
- _this.composition = composition;
116
- _this._treeTraversal = _treeTraversal;
117
- return _this;
118
- }
119
- LayeredTree.prototype.createTree = function (givenLayoutWidth, screenWidth) {
120
- var _a, _b, _c, _d, _e, _f;
121
- givenLayoutWidth = givenLayoutWidth < 65 ? 65 : givenLayoutWidth > 90 ? 90 : givenLayoutWidth;
122
- var layoutWidth = givenLayoutWidth || 75;
123
- var root = hierarchy(this.treeData, function (d) {
124
- return d.children;
125
- });
126
- // Find tree Height
127
- var treeHeight = (root === null || root === void 0 ? void 0 : root.height) + 1;
128
- // Create tree layout, width: layoutWidth, height: layoutWidth/1.5 and add node separation
129
- var treeChart = tree()
130
- .nodeSize([layoutWidth, layoutWidth / 1.5])
131
- .separation(function (a, b) {
132
- return a.parent === root && b.parent === root ? 3.5 : 1;
133
- });
134
- // Assigns the x and y position for the nodes
135
- var treeData = treeChart(root);
136
- // Compute the new tree layout.
137
- var nodes = treeData.descendants();
138
- // Normalize for fixed-depth and width
139
- // Normalise y coordinate by depth of each node by a factor of 130
140
- // Normalise x coordinate by start coordinate 0 with screenSize/3
141
- nodes.forEach(function (d) {
142
- d.y = d.depth === 0 ? 10 : d.depth * 130;
143
- d.x += screenWidth / 2;
144
- });
145
- // <------------------ Traversal section ------------------>
146
- // Create tree data structure
147
- var treeDataStructure = [];
148
- var TreeID = 0;
149
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
150
- var createTreeDataStructure = function (d) {
151
- var _a, _b;
152
- d.id = TreeID;
153
- treeDataStructure.push({
154
- id: TreeID,
155
- children: d.children,
156
- dataName: d.data.name,
157
- subName: d.data.subname,
158
- bodyText: d.data.bodytext,
159
- metricName: (_a = d.data) === null || _a === void 0 ? void 0 : _a.metric,
160
- fill: d.data.fill,
161
- x: d.x,
162
- y: d.y,
163
- parentID: (_b = d.parent) === null || _b === void 0 ? void 0 : _b.id,
164
- });
165
- TreeID++;
166
- };
167
- this._treeTraversal === 0
168
- ? root.each(function (d) {
169
- createTreeDataStructure(d);
170
- })
171
- : root.eachBefore(function (d) {
172
- createTreeDataStructure(d);
173
- });
174
- var rectWidth = layoutWidth * 3;
175
- var rectHeight = rectWidth / 3.45;
176
- var gap = 20;
177
- var parentSet = new Set();
178
- for (var _i = 0, treeDataStructure_1 = treeDataStructure; _i < treeDataStructure_1.length; _i++) {
179
- var d = treeDataStructure_1[_i];
180
- var parentInfo = d.id === 0
181
- ? 'Root Node'
182
- : "Parent info parentId: " + d.parentID + "\n " + treeDataStructure[d.parentID].dataName + "\n " + treeDataStructure[d.parentID].subName;
183
- // check for leaf nodes
184
- if (!d.children && !parentSet.has(d.parentID) && treeHeight === 3) {
185
- var compactNodeWidth = (rectWidth - gap) / 2;
186
- var compactNodeHeight = rectHeight;
187
- parentSet.add(d.parentID);
188
- // <------------------ Links section ------------------>
189
- this.addLinktoSVG(d.id, treeDataStructure[d.parentID].x, treeDataStructure[d.parentID].y, treeDataStructure[d.id].x, treeDataStructure[d.id].y, true, rectWidth, rectHeight, gap);
190
- // <------------------ Nodes section ------------------>
191
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
192
- var children = (_a = treeDataStructure[d.parentID]) === null || _a === void 0 ? void 0 : _a.children;
193
- var compactNodeCenterX1 = ((_b = treeDataStructure[d.parentID]) === null || _b === void 0 ? void 0 : _b.x) - compactNodeWidth / 2 - gap / 2;
194
- var compactNodeCenterX2 = ((_c = treeDataStructure[d.parentID]) === null || _c === void 0 ? void 0 : _c.x) + compactNodeWidth / 2 + gap / 2;
195
- var longNodeCenterX = (_d = treeDataStructure[d.parentID]) === null || _d === void 0 ? void 0 : _d.x;
196
- var dy = (_e = children[0]) === null || _e === void 0 ? void 0 : _e.y;
197
- for (var itr = 0; itr < children.length; ++itr) {
198
- var child = children[itr];
199
- // Given Composition
200
- if (this.composition !== undefined) {
201
- // For compact compostion
202
- if (this.composition === 0) {
203
- this.addNodeShapetoSVG(child.data.name, child.data.subname, child.data.bodytext, child.data.metricName,
204
- // If the leaf node count is 1 ,
205
- //irrespective of provided composition we should always use long composition
206
- itr % 2 === 0 ? (children.length === 1 ? longNodeCenterX : compactNodeCenterX1) : compactNodeCenterX2, dy, child.data.fill, children.length === 1 ? rectWidth : compactNodeWidth, rectHeight, child.id, parentInfo);
207
- if (itr % 2 === 1) {
208
- dy += compactNodeHeight + gap;
209
- }
210
- }
211
- // For long compostion
212
- else {
213
- this.addNodeShapetoSVG(child.data.name, child.data.subname, child.data.bodytext, child.data.metricName, longNodeCenterX, dy, child.data.fill, rectWidth, rectHeight, child.id, parentInfo);
214
- dy += compactNodeHeight + gap;
215
- }
216
- }
217
- // Automatic Node Composition
218
- else {
219
- if (children.length > 2) {
220
- this.addNodeShapetoSVG(child.data.name, child.data.subname, child.data.bodytext, child.data.metricName, itr % 2 === 0 ? compactNodeCenterX1 : compactNodeCenterX2, dy, child.data.fill, children.length === 1 ? rectWidth : compactNodeWidth, rectHeight, child.id, parentInfo);
221
- if (itr % 2 === 1) {
222
- dy += compactNodeHeight + gap;
223
- }
224
- }
225
- else {
226
- this.addNodeShapetoSVG(child.data.name, child.data.subname, child.data.bodytext, child.data.metricName, longNodeCenterX, dy, child.data.fill, rectWidth, rectHeight, child.id, parentInfo);
227
- dy += compactNodeHeight + gap;
228
- }
229
- }
230
- }
231
- }
232
- if (d.children || treeHeight <= 2) {
233
- // <------------------ Nodes section ------------------>
234
- // Since the height <=2 we will be using long compositon.
235
- this.addNodeShapetoSVG(d.dataName, d.subName, d.bodyText, d.metricName, d.x, d.y, d.fill, rectWidth, rectHeight, d.id, parentInfo);
236
- // <------------------ Links section ------------------>
237
- if (d.id === 0 && d.children) {
238
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
239
- var children = (_f = treeDataStructure[d.id]) === null || _f === void 0 ? void 0 : _f.children;
240
- var childXMin = d3Min(children, function (child) { return child.x; });
241
- var childXMax = d3Max(children, function (child) { return child.x; });
242
- this.addLinktoSVG(d.id, d.x, d.y, childXMin, d.children[0].y, false, rectWidth, rectHeight, gap, childXMax);
243
- }
244
- }
245
- }
246
- };
247
- return LayeredTree;
248
- }(StandardTree));
249
- var TreeChartBase = /** @class */ (function (_super) {
250
- __extends(TreeChartBase, _super);
251
- function TreeChartBase(props) {
252
- var _a;
253
- var _this = _super.call(this, props) || this;
254
- _this._nodeElements = [];
255
- _this._linkElements = [];
256
- _this._margin = { top: 30, right: 20, bottom: 30, left: 50 };
257
- _this._width = _this.props.width || 1500;
258
- _this._height = _this.props.height || 700;
259
- _this._treeData = _this.props.treeData;
260
- _this._composition = (_a = _this.props) === null || _a === void 0 ? void 0 : _a.composition;
261
- _this._treeTraversal = _this.props.treeTraversal;
262
- _this.state = {
263
- _width: _this._width,
264
- _height: _this._height,
265
- };
266
- return _this;
267
- }
268
- TreeChartBase.prototype.componentDidMount = function () {
269
- var _a = this.props, theme = _a.theme, className = _a.className, styles = _a.styles;
270
- // Get classNames to create component styling
271
- this._classNames = getClassNames(styles, {
272
- theme: theme,
273
- className: className,
274
- });
275
- // Call createTreeChart function in componentDidMount
276
- this.createTreeChart();
277
- this.setState({
278
- _width: this.props.width || 1500,
279
- _height: this.props.height || 700,
280
- });
281
- };
282
- TreeChartBase.prototype.componentDidUpdate = function (prevProps) {
283
- if (prevProps.layoutWidth !== this.props.layoutWidth) {
284
- var svgText = selectAll('text');
285
- var svgRect = selectAll('rect');
286
- var svgLink = selectAll('path');
287
- if (this._nodeElements.length === 0 && this._linkElements.length === 0) {
288
- svgText.remove();
289
- svgRect.remove();
290
- svgLink.remove();
291
- }
292
- this.createTreeChart();
293
- }
294
- };
295
- TreeChartBase.prototype.createTreeChart = function () {
296
- var nodeElements = [];
297
- var linkElements = [];
298
- // Instantiate inherited class and call createTree function for the object
299
- var treeObject = new LayeredTree(this._treeData, this._composition, this._classNames, nodeElements, linkElements, this._treeTraversal);
300
- var width = this.state._width - this._margin.left - this._margin.right;
301
- treeObject.createTree(this.props.layoutWidth, width);
302
- this._nodeElements = nodeElements;
303
- this._linkElements = linkElements;
304
- };
305
- TreeChartBase.prototype.render = function () {
306
- var _a;
307
- return (React.createElement(FocusZone, null,
308
- React.createElement("div", { className: (_a = this._classNames) === null || _a === void 0 ? void 0 : _a.root },
309
- React.createElement("svg", { className: "svgTree", width: this.state._width - this._margin.left - this._margin.right, height: this.state._height - this._margin.top - this._margin.bottom },
310
- React.createElement("g", { className: "svgNode" }, this._nodeElements.map(function (element) { return element; })),
311
- React.createElement("g", { className: "svgLink" }, this._linkElements.map(function (element) { return element; }))))));
312
- };
313
- return TreeChartBase;
314
- }(React.Component));
315
- export { TreeChartBase };
316
- //# sourceMappingURL=TreeChart.base.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TreeChart.base.js","sourceRoot":"../src/","sources":["components/TreeChart/TreeChart.base.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,kBAAkB,E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'react';\nimport { hierarchy, tree } from 'd3-hierarchy';\nimport { classNamesFunction } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { select, selectAll } from 'd3-selection';\nimport { FocusZone } from '@fluentui/react-focus';\nimport { max as d3Max, min as d3Min } from 'd3-array';\n\nimport {\n ITreeProps,\n ITreeState,\n ITreeDataStructure,\n ITreeChartDataPoint,\n ITreeStyleProps,\n ITreeStyles,\n} from '../../index';\n\nconst getClassNames = classNamesFunction<ITreeStyleProps, ITreeStyles>();\n\n// Create a parent class for common tree components\nclass StandardTree {\n public treeData: ITreeChartDataPoint;\n public styleClassNames: IProcessedStyleSet<ITreeStyles>;\n\n private _nodeElements: JSX.Element[] = [];\n private _linkElements: JSX.Element[] = [];\n\n constructor(\n treeData: ITreeChartDataPoint,\n styleClassNames: IProcessedStyleSet<ITreeStyles>,\n _nodeElements: JSX.Element[] = [],\n _linkElements: JSX.Element[] = [],\n ) {\n this.treeData = treeData;\n this.styleClassNames = styleClassNames;\n this._nodeElements = _nodeElements;\n this._linkElements = _linkElements;\n }\n\n public truncateText(text: string, rectangleWidth: number, padding: number, styleClass: string | undefined) {\n let truncatedText = '';\n const words = text.split(/\\s+/).reverse();\n let word: string = '';\n const tspan = select('.svgTree').append('text').attr('class', 'tempText').append('tspan').text(null);\n\n if (styleClass) {\n tspan.attr('class', styleClass);\n }\n\n const line: string[] = [];\n while ((word = words.pop()!)) {\n line.push(word);\n tspan.text(line.join(' ') + ' ');\n if (tspan.node() !== null) {\n const w = tspan.node()!.getComputedTextLength();\n if (w > rectangleWidth - padding) {\n line.pop();\n line.push('...');\n break;\n }\n }\n }\n\n truncatedText = line.join(' ') + ' ';\n tspan.text(null);\n selectAll('.tempText').remove();\n return truncatedText;\n }\n\n // Append node elements\n // nodeId to create unique key\n public addNodeShapetoSVG(\n name: string,\n subname: string | undefined,\n bodytext: string | undefined,\n metricName: string | undefined,\n xCenterCoordinate: number,\n yCoordinate: number,\n fillColor: string,\n rectangleWidth: number,\n rectangleHeight: number,\n nodeId: number,\n parentInfo: string,\n ) {\n const ariaLabel = `nodeId: ${nodeId} \\nnodeMainText: ${name}\\nsubText ${subname} ${parentInfo}`;\n const xCoordinate = xCenterCoordinate - rectangleWidth / 2;\n if (metricName || nodeId !== 0 || !bodytext) {\n this._nodeElements.push(\n <rect\n width={rectangleWidth}\n height={rectangleHeight}\n x={xCoordinate}\n y={yCoordinate}\n tabIndex={0}\n role={'text'}\n data-is-focusable={true}\n aria-label={ariaLabel}\n className={this.styleClassNames.rectNode}\n stroke={fillColor}\n key={`${nodeId}${this.styleClassNames.rectNode}`}\n />,\n );\n }\n\n if (subname) {\n subname = this.truncateText(subname, rectangleWidth, rectangleWidth / 4, this.styleClassNames.rectSubText);\n }\n if (bodytext) {\n bodytext = this.truncateText(bodytext, rectangleWidth, rectangleWidth / 4, this.styleClassNames.rectBodyText);\n }\n if (metricName) {\n metricName = this.truncateText(\n metricName,\n rectangleWidth,\n rectangleWidth / 4,\n this.styleClassNames.rectMetricText,\n );\n }\n name = this.truncateText(name, rectangleWidth, rectangleWidth / 4, this.styleClassNames.rectText);\n\n // Text position y = y + rectHeight/2, 2 is ratio for depth\n // Text position x = x + rectWidth/2, 2 is ratio for length\n // Sub-text position x = x + rectWidth/2, 2 is ratio for length\n\n const subValue = metricName ? (\n <tspan className={this.styleClassNames.rectMetricText} dy=\"1.4em\" x={xCoordinate + rectangleWidth / 2}>\n {metricName}\n </tspan>\n ) : bodytext ? (\n <>\n <tspan className={this.styleClassNames.rectSubText} dy=\"1.4em\" x={xCoordinate + rectangleWidth / 2}>\n {subname}\n </tspan>\n <tspan className={this.styleClassNames.rectBodyText} dy=\"1.4em\" x={xCoordinate + rectangleWidth / 2}>\n {bodytext}\n </tspan>\n </>\n ) : (\n <tspan className={this.styleClassNames.rectSubText} dy=\"1.4em\" x={xCoordinate + rectangleWidth / 2}>\n {subname}\n </tspan>\n );\n\n if (!subname && !metricName && !bodytext) {\n this._nodeElements.push(\n <text\n textAnchor=\"middle\"\n className={this.styleClassNames.rectMetricText}\n dy={yCoordinate + rectangleHeight / 1.6}\n x={xCoordinate + rectangleWidth / 2}\n key={`${nodeId}${this.styleClassNames.rectText}`}\n >\n {name}\n </text>,\n );\n } else {\n this._nodeElements.push(\n <text\n textAnchor=\"middle\"\n className={metricName ? this.styleClassNames.rectSubText : this.styleClassNames.rectText}\n dy={metricName ? yCoordinate + rectangleHeight / 2.5 : yCoordinate + rectangleHeight / 2}\n x={xCoordinate + rectangleWidth / 2}\n key={`${nodeId}${this.styleClassNames.rectText}`}\n >\n {name}\n {subValue}\n </text>,\n );\n }\n }\n // Create a rectangular path from parent to the child nodes\n public createPathLink(\n parentX: number,\n parentY: number,\n childX: number,\n childY: number,\n leaf: boolean,\n rectWidth: number,\n rectHeight: number,\n gap: number,\n childXMax: number,\n ): string {\n // gap adds ratio for parent.y to child.y\n\n /*Below code is used to draw lines(___|) to show the parent child relation i.e a vertical line\n emerging from the parent and\n then a horzontal line encompassing all the its children which are\n shown below it .so it gives a visual representation of tree branches.\n\n So for making this path firstly we are moving to the childX which is the mid point of the node and then\n we are subtracting the half of rectwidth to move the complete width of the rectangle and\n we are subtracting gap from y cordinate as we are making this line at a little gap from node.\n Then we are building that line horizonatlly till childXmax, again adding half rectwidth to complete\n the line till end as childXmax will be midpoint.\n Then last part is for making line vertical for that we move to the parentx position and\n then draw the vertical till parenty + rectHeight + gap/2\n We have seperate path for leaf node as we are using different composition like compact, long etc.*/\n\n const path = `M${childX - rectWidth / 2},${childY - gap} H${childXMax + rectWidth / 2} M${parentX},${childY - gap}\n V${parentY + rectHeight + gap / 2}`;\n\n const leafpath = `M${parentX},${parentY + rectHeight + gap / 2} V${parentY + gap * 5}\n H${parentX - rectWidth / 2} H${parentX + rectWidth / 2}`;\n\n // based on the type of node return leafpath or path element\n return leaf ? leafpath : path;\n }\n\n // Append path link element\n public addLinktoSVG(\n nodeId: number,\n parentX: number,\n parentY: number,\n childX: number,\n childY: number,\n leaf: boolean,\n rectWidth: number,\n rectHeight: number,\n gap: number,\n childXMax: number = 0,\n ) {\n this._linkElements.push(\n <path\n className={this.styleClassNames.link}\n d={this.createPathLink(parentX, parentY, childX, childY, leaf, rectWidth, rectHeight, gap, childXMax)}\n key={`${nodeId}${this.styleClassNames.link}`}\n />,\n );\n }\n}\n\n// Create child class to Add Tree component based on treeHeight\nclass LayeredTree extends StandardTree {\n public composition: number | undefined;\n private _treeTraversal: number | undefined;\n constructor(\n treeData: ITreeChartDataPoint,\n composition: number | undefined,\n styleClassNames: IProcessedStyleSet<ITreeStyles>,\n _nodeElements: JSX.Element[] = [],\n _linkElements: JSX.Element[] = [],\n _treeTraversal: number | undefined,\n ) {\n super(treeData, styleClassNames, _nodeElements, _linkElements);\n this.composition = composition;\n this._treeTraversal = _treeTraversal;\n }\n public createTree(givenLayoutWidth: number | undefined, screenWidth: number) {\n givenLayoutWidth = givenLayoutWidth! < 65 ? 65 : givenLayoutWidth! > 90 ? 90 : givenLayoutWidth;\n const layoutWidth = givenLayoutWidth || 75;\n const root = hierarchy(this.treeData, d => {\n return d.children;\n });\n\n // Find tree Height\n const treeHeight = root?.height + 1;\n\n // Create tree layout, width: layoutWidth, height: layoutWidth/1.5 and add node separation\n const treeChart = tree()\n .nodeSize([layoutWidth, layoutWidth / 1.5])\n .separation((a, b) => {\n return a.parent === root && b.parent === root ? 3.5 : 1;\n });\n\n // Assigns the x and y position for the nodes\n const treeData = treeChart(root);\n\n // Compute the new tree layout.\n const nodes = treeData.descendants();\n\n // Normalize for fixed-depth and width\n // Normalise y coordinate by depth of each node by a factor of 130\n // Normalise x coordinate by start coordinate 0 with screenSize/3\n nodes.forEach(d => {\n d.y = d.depth === 0 ? 10 : d.depth * 130;\n d.x += screenWidth / 2;\n });\n\n // <------------------ Traversal section ------------------>\n\n // Create tree data structure\n const treeDataStructure: Array<ITreeDataStructure> = [];\n let TreeID: number = 0;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const createTreeDataStructure = (d: any) => {\n d.id = TreeID;\n treeDataStructure.push({\n id: TreeID,\n children: d.children,\n dataName: d.data.name,\n subName: d.data.subname,\n bodyText: d.data.bodytext,\n metricName: d.data?.metric,\n fill: d.data.fill,\n x: d.x,\n y: d.y,\n parentID: d.parent?.id,\n });\n TreeID++;\n };\n\n this._treeTraversal === 0\n ? root.each(d => {\n createTreeDataStructure(d);\n })\n : root.eachBefore(d => {\n createTreeDataStructure(d);\n });\n\n const rectWidth = layoutWidth * 3;\n const rectHeight = rectWidth / 3.45;\n const gap: number = 20;\n const parentSet = new Set();\n\n for (const d of treeDataStructure) {\n const parentInfo =\n d.id === 0\n ? 'Root Node'\n : `Parent info parentId: ${d.parentID}\n ${treeDataStructure[d.parentID].dataName}\n ${treeDataStructure[d.parentID].subName}`;\n\n // check for leaf nodes\n if (!d.children && !parentSet.has(d.parentID) && treeHeight === 3) {\n const compactNodeWidth = (rectWidth - gap) / 2;\n const compactNodeHeight = rectHeight;\n parentSet.add(d.parentID);\n\n // <------------------ Links section ------------------>\n this.addLinktoSVG(\n d.id,\n treeDataStructure[d.parentID].x,\n treeDataStructure[d.parentID].y,\n treeDataStructure[d.id].x,\n treeDataStructure[d.id].y,\n true,\n rectWidth,\n rectHeight,\n gap,\n );\n\n // <------------------ Nodes section ------------------>\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const children: any = treeDataStructure[d.parentID]?.children;\n\n const compactNodeCenterX1: number = treeDataStructure[d.parentID]?.x - compactNodeWidth / 2 - gap / 2;\n const compactNodeCenterX2: number = treeDataStructure[d.parentID]?.x + compactNodeWidth / 2 + gap / 2;\n const longNodeCenterX: number = treeDataStructure[d.parentID]?.x;\n let dy: number = children[0]?.y;\n\n for (let itr = 0; itr < children.length; ++itr) {\n const child = children[itr];\n\n // Given Composition\n if (this.composition !== undefined) {\n // For compact compostion\n if (this.composition === 0) {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.bodytext,\n child.data.metricName,\n // If the leaf node count is 1 ,\n //irrespective of provided composition we should always use long composition\n itr % 2 === 0 ? (children.length === 1 ? longNodeCenterX : compactNodeCenterX1) : compactNodeCenterX2,\n dy,\n child.data.fill,\n children.length === 1 ? rectWidth : compactNodeWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n if (itr % 2 === 1) {\n dy += compactNodeHeight + gap;\n }\n }\n // For long compostion\n else {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.bodytext,\n child.data.metricName,\n longNodeCenterX,\n dy,\n child.data.fill,\n rectWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n dy += compactNodeHeight + gap;\n }\n }\n\n // Automatic Node Composition\n else {\n if (children.length > 2) {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.bodytext,\n child.data.metricName,\n itr % 2 === 0 ? compactNodeCenterX1 : compactNodeCenterX2,\n dy,\n child.data.fill,\n children.length === 1 ? rectWidth : compactNodeWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n if (itr % 2 === 1) {\n dy += compactNodeHeight + gap;\n }\n } else {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.bodytext,\n child.data.metricName,\n longNodeCenterX,\n dy,\n child.data.fill,\n rectWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n dy += compactNodeHeight + gap;\n }\n }\n }\n }\n\n if (d.children || treeHeight <= 2) {\n // <------------------ Nodes section ------------------>\n // Since the height <=2 we will be using long compositon.\n this.addNodeShapetoSVG(\n d.dataName,\n d.subName,\n d.bodyText,\n d.metricName,\n d.x,\n d.y,\n d.fill,\n rectWidth,\n rectHeight,\n d.id,\n parentInfo,\n );\n\n // <------------------ Links section ------------------>\n if (d.id === 0 && d.children) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const children: any = treeDataStructure[d.id]?.children;\n const childXMin = d3Min(children, (child: ITreeDataStructure) => child.x as number)!;\n const childXMax = d3Max(children, (child: ITreeDataStructure) => child.x as number)!;\n this.addLinktoSVG(d.id, d.x, d.y, childXMin, d.children[0].y, false, rectWidth, rectHeight, gap, childXMax);\n }\n }\n }\n }\n}\n\nexport class TreeChartBase extends React.Component<ITreeProps, ITreeState> {\n private _treeData: ITreeChartDataPoint;\n private _width: number;\n private _height: number;\n private _composition: number | undefined;\n private _classNames: IProcessedStyleSet<ITreeStyles>;\n private _margin: { left: number; right: number; top: number; bottom: number };\n private _nodeElements: JSX.Element[] = [];\n private _linkElements: JSX.Element[] = [];\n private _treeTraversal: number | undefined;\n\n constructor(props: ITreeProps) {\n super(props);\n this._margin = { top: 30, right: 20, bottom: 30, left: 50 };\n this._width = this.props.width || 1500;\n this._height = this.props.height || 700;\n this._treeData = this.props.treeData;\n this._composition = this.props?.composition;\n this._treeTraversal = this.props.treeTraversal;\n\n this.state = {\n _width: this._width,\n _height: this._height,\n };\n }\n\n public componentDidMount() {\n const { theme, className, styles } = this.props;\n\n // Get classNames to create component styling\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n\n // Call createTreeChart function in componentDidMount\n this.createTreeChart();\n\n this.setState({\n _width: this.props.width || 1500,\n _height: this.props.height || 700,\n });\n }\n\n public componentDidUpdate(prevProps: ITreeProps): void {\n if (prevProps.layoutWidth !== this.props.layoutWidth) {\n const svgText = selectAll('text');\n const svgRect = selectAll('rect');\n const svgLink = selectAll('path');\n\n if (this._nodeElements.length === 0 && this._linkElements.length === 0) {\n svgText.remove();\n svgRect.remove();\n svgLink.remove();\n }\n\n this.createTreeChart();\n }\n }\n public createTreeChart() {\n const nodeElements: JSX.Element[] = [];\n const linkElements: JSX.Element[] = [];\n\n // Instantiate inherited class and call createTree function for the object\n const treeObject = new LayeredTree(\n this._treeData,\n this._composition,\n this._classNames,\n nodeElements,\n linkElements,\n this._treeTraversal,\n );\n const width = this.state._width - this._margin.left - this._margin.right;\n treeObject.createTree(this.props.layoutWidth, width);\n this._nodeElements = nodeElements;\n this._linkElements = linkElements;\n }\n\n public render(): JSX.Element {\n return (\n <FocusZone>\n <div className={this._classNames?.root}>\n <svg\n className=\"svgTree\"\n width={this.state._width - this._margin.left - this._margin.right}\n height={this.state._height - this._margin.top - this._margin.bottom}\n >\n <g className=\"svgNode\">{this._nodeElements.map(element => element)}</g>\n <g className=\"svgLink\">{this._linkElements.map(element => element)}</g>\n </svg>\n </div>\n </FocusZone>\n );\n }\n}\n"]}
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- import { ITreeProps } from './TreeChart.types';
3
- export declare const TreeChart: React.FunctionComponent<ITreeProps>;
@@ -1,5 +0,0 @@
1
- import { styled } from '@fluentui/react/lib/Utilities';
2
- import { TreeChartBase } from './TreeChart.base';
3
- import { getStyles } from './TreeChart.styles';
4
- export var TreeChart = styled(TreeChartBase, getStyles);
5
- //# sourceMappingURL=TreeChart.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TreeChart.js","sourceRoot":"../src/","sources":["components/TreeChart/TreeChart.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,CAAC,IAAM,SAAS,GAAwC,MAAM,CAClE,aAAa,EACb,SAAS,CACV,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '@fluentui/react/lib/Utilities';\nimport { ITreeStyles, ITreeProps, ITreeStyleProps } from './TreeChart.types';\nimport { TreeChartBase } from './TreeChart.base';\nimport { getStyles } from './TreeChart.styles';\n\nexport const TreeChart: React.FunctionComponent<ITreeProps> = styled<ITreeProps, ITreeStyleProps, ITreeStyles>(\n TreeChartBase,\n getStyles,\n);\n"]}
@@ -1,2 +0,0 @@
1
- import { ITreeStyleProps, ITreeStyles } from './TreeChart.types';
2
- export declare const getStyles: (props: ITreeStyleProps) => ITreeStyles;
@@ -1,29 +0,0 @@
1
- import { __assign } from "tslib";
2
- export var getStyles = function (props) {
3
- return {
4
- root: [
5
- props.theme.spacing,
6
- 'ms-TreeChart',
7
- props.className,
8
- {
9
- overflow: 'scroll',
10
- },
11
- ],
12
- link: {
13
- fill: 'none',
14
- stroke: '#A1A1A1',
15
- strokeWidth: '2px',
16
- },
17
- rectNode: {
18
- strokeWidth: '2px',
19
- fill: 'white',
20
- padding: '10px',
21
- rx: '2px',
22
- },
23
- rectText: __assign({ fill: 'black' }, props.theme.fonts.large),
24
- rectSubText: __assign({ fill: '#484644' }, props.theme.fonts.medium),
25
- rectBodyText: __assign({ fill: '#808080' }, props.theme.fonts.xSmall),
26
- rectMetricText: __assign({ fill: '#000000' }, props.theme.fonts.xLarge),
27
- };
28
- };
29
- //# sourceMappingURL=TreeChart.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TreeChart.styles.js","sourceRoot":"../src/","sources":["components/TreeChart/TreeChart.styles.ts"],"names":[],"mappings":";AAEA,MAAM,CAAC,IAAM,SAAS,GAAG,UAAC,KAAsB;IAC9C,OAAO;QACL,IAAI,EAAE;YACJ,KAAK,CAAC,KAAK,CAAC,OAAO;YACnB,cAAc;YACd,KAAK,CAAC,SAAS;YACf;gBACE,QAAQ,EAAE,QAAQ;aACnB;SACF;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,SAAS;YACjB,WAAW,EAAE,KAAK;SACnB;QACD,QAAQ,EAAE;YACR,WAAW,EAAE,KAAK;YAClB,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,MAAM;YACf,EAAE,EAAE,KAAK;SACV;QACD,QAAQ,aACN,IAAI,EAAE,OAAO,IACV,KAAK,CAAC,KAAM,CAAC,KAAK,CAAC,KAAK,CAC5B;QACD,WAAW,aACT,IAAI,EAAE,SAAS,IACZ,KAAK,CAAC,KAAM,CAAC,KAAK,CAAC,MAAM,CAC7B;QACD,YAAY,aACV,IAAI,EAAE,SAAS,IACZ,KAAK,CAAC,KAAM,CAAC,KAAK,CAAC,MAAM,CAC7B;QACD,cAAc,aACZ,IAAI,EAAE,SAAS,IACZ,KAAK,CAAC,KAAM,CAAC,KAAK,CAAC,MAAM,CAC7B;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { ITreeStyleProps, ITreeStyles } from './TreeChart.types';\n\nexport const getStyles = (props: ITreeStyleProps): ITreeStyles => {\n return {\n root: [\n props.theme.spacing,\n 'ms-TreeChart',\n props.className,\n {\n overflow: 'scroll',\n },\n ],\n link: {\n fill: 'none',\n stroke: '#A1A1A1',\n strokeWidth: '2px',\n },\n rectNode: {\n strokeWidth: '2px',\n fill: 'white',\n padding: '10px',\n rx: '2px',\n },\n rectText: {\n fill: 'black',\n ...props.theme!.fonts.large,\n },\n rectSubText: {\n fill: '#484644',\n ...props.theme!.fonts.medium,\n },\n rectBodyText: {\n fill: '#808080',\n ...props.theme!.fonts.xSmall,\n },\n rectMetricText: {\n fill: '#000000',\n ...props.theme!.fonts.xLarge,\n },\n };\n};\n"]}
@@ -1,197 +0,0 @@
1
- import { IStyle, ITheme } from '@fluentui/react/lib/Styling';
2
- import { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
3
- export interface ITreeChartDataPoint {
4
- /**
5
- * Node main text
6
- */
7
- name: string;
8
- /**
9
- * Subtext value (optional)
10
- */
11
- subname?: string;
12
- /**
13
- * Bodytext value (optional)
14
- */
15
- bodytext?: string;
16
- /**
17
- * Metric text value (optional)
18
- */
19
- metric?: string;
20
- /**
21
- * Color of the rectangular box
22
- */
23
- fill: string;
24
- /**
25
- * Recursive datastructure for child node object
26
- */
27
- children?: Array<ITreeChartDataPoint>;
28
- }
29
- export declare enum NodesComposition {
30
- /**
31
- * NodeComposition enum val for long: number = 1
32
- */
33
- long = 1,
34
- /**
35
- * NodeComposition enum val for compact: number = 0
36
- */
37
- compact = 0
38
- }
39
- export declare enum TreeTraverse {
40
- /**
41
- * TreeTraverse enum val for preOrder: number = 1
42
- */
43
- preOrder = 1,
44
- /**
45
- * TreeTraverse enum val for levelOrder: number = 0
46
- */
47
- levelOrder = 0
48
- }
49
- export interface ITreeProps {
50
- /**
51
- * An object of chart data points for the Tree chart
52
- */
53
- treeData: ITreeChartDataPoint;
54
- /**
55
- * compostion for three layer chart, long: composition = 1; compact: composition = 0
56
- */
57
- composition?: NodesComposition.long | NodesComposition.compact;
58
- /**
59
- * Node Width Size for the Tree Layout
60
- * * @default 75
61
- */
62
- layoutWidth?: number;
63
- /**
64
- * traversal order for tree chart, preOrder = 1, levelOrder = 0
65
- */
66
- treeTraversal?: TreeTraverse.preOrder | TreeTraverse.levelOrder;
67
- /**
68
- * Width of SVG tree chart
69
- * * @default 1500
70
- */
71
- width?: number;
72
- /**
73
- * Height of SVG tree chart
74
- * * @default 700
75
- */
76
- height?: number;
77
- /**
78
- * Margin for the SVG tree chart
79
- */
80
- marign?: {
81
- left: number;
82
- right: number;
83
- top: number;
84
- bottom: number;
85
- };
86
- /**
87
- * Call to provide customized styling that will layer on top of the variant rules.
88
- */
89
- styles?: IStyleFunctionOrObject<ITreeStyleProps, ITreeStyles>;
90
- /**
91
- * Additional CSS class(es) to apply to the TreeChart.
92
- */
93
- className?: string;
94
- /**
95
- * Theme (provided through customization.)
96
- */
97
- theme?: ITheme;
98
- }
99
- export interface ITreeState {
100
- /**
101
- * Width of SVG tree chart
102
- * * @default 1500
103
- */
104
- _width: number;
105
- /**
106
- * Height of SVG tree chart
107
- * * @default 700
108
- */
109
- _height: number;
110
- /**
111
- * Layout Width of SVG tree chart
112
- * * @default 75
113
- */
114
- _layoutWidth?: number;
115
- }
116
- export interface ITreeDataStructure {
117
- /**
118
- * Node id of each node
119
- */
120
- id: number;
121
- /**
122
- * Children node object
123
- */
124
- children: Array<ITreeDataStructure>;
125
- /**
126
- * Node main text
127
- */
128
- dataName: string;
129
- /**
130
- * Subtext value (optional)
131
- */
132
- subName?: string;
133
- /**
134
- * Bodytext value (optional)
135
- */
136
- bodyText?: string;
137
- /**
138
- * Metric text value (optional)
139
- */
140
- metricName?: string;
141
- /**
142
- * Color of the rectangular box
143
- */
144
- fill: string;
145
- /**
146
- * X-coordindate of node
147
- */
148
- x: number;
149
- /**
150
- * Y-coordindate of node
151
- */
152
- y: number;
153
- /**
154
- * Node id of each node's parent
155
- */
156
- parentID: number;
157
- }
158
- export interface ITreeStyleProps {
159
- /**
160
- * Theme (provided through customization.)
161
- */
162
- theme: ITheme;
163
- /**
164
- * Additional CSS class(es) to apply to the TreeChart.
165
- */
166
- className?: string;
167
- }
168
- export interface ITreeStyles {
169
- /**
170
- * Style for the root element.
171
- */
172
- root: IStyle;
173
- /**
174
- * Style for the Link/Path element.
175
- */
176
- link: IStyle;
177
- /**
178
- * Style for rectangular Node
179
- */
180
- rectNode: IStyle;
181
- /**
182
- * Style for the node main Text
183
- */
184
- rectText: IStyle;
185
- /**
186
- * Style for the node sub Text
187
- */
188
- rectSubText: IStyle;
189
- /**
190
- * Style for the node body Text
191
- */
192
- rectBodyText: IStyle;
193
- /**
194
- * Style for the node metric value Text
195
- */
196
- rectMetricText: IStyle;
197
- }