@fluentui/react-charting 5.16.33 → 5.16.35

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 (492) hide show
  1. package/CHANGELOG.json +85 -1
  2. package/CHANGELOG.md +29 -2
  3. package/dist/react-charting.js +1 -1
  4. package/dist/react-charting.min.js +1 -1
  5. package/lib/components/AreaChart/AreaChart.base.js +13 -13
  6. package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
  7. package/lib/components/CommonComponents/CartesianChart.base.d.ts +1 -0
  8. package/lib/components/CommonComponents/CartesianChart.base.js +44 -13
  9. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  10. package/lib/components/CommonComponents/CartesianChart.styles.js +2 -2
  11. package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  12. package/lib/components/CommonComponents/CartesianChart.types.d.ts +11 -0
  13. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  14. package/lib/components/DonutChart/Arc/Arc.js +1 -1
  15. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  16. package/lib/components/DonutChart/DonutChart.base.js +1 -1
  17. package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
  18. package/lib/components/DonutChart/DonutChart.styles.js +1 -1
  19. package/lib/components/DonutChart/DonutChart.styles.js.map +1 -1
  20. package/lib/components/DonutChart/Pie/Pie.js +1 -1
  21. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  22. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +4 -4
  23. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  24. package/lib/components/HeatMapChart/HeatMapChart.base.js +13 -13
  25. package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  26. package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js +5 -5
  27. package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  28. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +6 -6
  29. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  30. package/lib/components/Legends/Legends.base.js +4 -4
  31. package/lib/components/Legends/Legends.base.js.map +1 -1
  32. package/lib/components/Legends/Legends.styles.js +3 -3
  33. package/lib/components/Legends/Legends.styles.js.map +1 -1
  34. package/lib/components/Legends/shape.js +10 -10
  35. package/lib/components/Legends/shape.js.map +1 -1
  36. package/lib/components/LineChart/LineChart.base.js +41 -41
  37. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  38. package/lib/components/PieChart/Arc/Arc.js +1 -1
  39. package/lib/components/PieChart/Arc/Arc.js.map +1 -1
  40. package/lib/components/PieChart/Pie/Pie.js +2 -2
  41. package/lib/components/PieChart/Pie/Pie.js.map +1 -1
  42. package/lib/components/SankeyChart/SankeyChart.base.js +6 -6
  43. package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
  44. package/lib/components/Sparkline/Sparkline.base.js +1 -1
  45. package/lib/components/Sparkline/Sparkline.base.js.map +1 -1
  46. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +4 -4
  47. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  48. package/lib/components/StackedBarChart/StackedBarChart.base.js +1 -1
  49. package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  50. package/lib/components/StackedBarChart/StackedBarChart.styles.js +2 -2
  51. package/lib/components/StackedBarChart/StackedBarChart.styles.js.map +1 -1
  52. package/lib/components/TreeChart/TreeChart.base.js +8 -8
  53. package/lib/components/TreeChart/TreeChart.base.js.map +1 -1
  54. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +21 -12
  55. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  56. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +23 -22
  57. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  58. package/lib/types/IDataPoint.d.ts +10 -0
  59. package/lib/types/IDataPoint.js.map +1 -1
  60. package/lib/utilities/ChartHoverCard/ChartHoverCard.styles.js +2 -2
  61. package/lib/utilities/ChartHoverCard/ChartHoverCard.styles.js.map +1 -1
  62. package/lib/utilities/utilities.d.ts +2 -2
  63. package/lib/utilities/utilities.js +16 -14
  64. package/lib/utilities/utilities.js.map +1 -1
  65. package/lib/version.js +1 -1
  66. package/lib/version.js.map +1 -1
  67. package/lib-amd/AreaChart.js +1 -1
  68. package/lib-amd/AreaChart.js.map +1 -1
  69. package/lib-amd/CartesianChart.js +1 -1
  70. package/lib-amd/CartesianChart.js.map +1 -1
  71. package/lib-amd/DonutChart.js +1 -1
  72. package/lib-amd/DonutChart.js.map +1 -1
  73. package/lib-amd/GroupedVerticalBarChart.js +1 -1
  74. package/lib-amd/GroupedVerticalBarChart.js.map +1 -1
  75. package/lib-amd/HeatMapChart.js +1 -1
  76. package/lib-amd/HeatMapChart.js.map +1 -1
  77. package/lib-amd/HorizontalBarChart.js +1 -1
  78. package/lib-amd/HorizontalBarChart.js.map +1 -1
  79. package/lib-amd/HorizontalBarChartWithAxis.js +1 -1
  80. package/lib-amd/HorizontalBarChartWithAxis.js.map +1 -1
  81. package/lib-amd/Legends.js +1 -1
  82. package/lib-amd/Legends.js.map +1 -1
  83. package/lib-amd/LineChart.js +1 -1
  84. package/lib-amd/LineChart.js.map +1 -1
  85. package/lib-amd/PieChart.js +1 -1
  86. package/lib-amd/PieChart.js.map +1 -1
  87. package/lib-amd/SankeyChart.js +1 -1
  88. package/lib-amd/SankeyChart.js.map +1 -1
  89. package/lib-amd/Sparkline.js +1 -1
  90. package/lib-amd/Sparkline.js.map +1 -1
  91. package/lib-amd/StackedBarChart.js +1 -1
  92. package/lib-amd/StackedBarChart.js.map +1 -1
  93. package/lib-amd/TreeChart.js +1 -1
  94. package/lib-amd/TreeChart.js.map +1 -1
  95. package/lib-amd/VerticalBarChart.js +1 -1
  96. package/lib-amd/VerticalBarChart.js.map +1 -1
  97. package/lib-amd/VerticalStackedBarChart.js +1 -1
  98. package/lib-amd/VerticalStackedBarChart.js.map +1 -1
  99. package/lib-amd/components/AreaChart/AreaChart.base.js +42 -42
  100. package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
  101. package/lib-amd/components/AreaChart/AreaChart.js +1 -1
  102. package/lib-amd/components/AreaChart/AreaChart.js.map +1 -1
  103. package/lib-amd/components/AreaChart/AreaChart.styles.js +1 -1
  104. package/lib-amd/components/AreaChart/AreaChart.styles.js.map +1 -1
  105. package/lib-amd/components/AreaChart/index.js +2 -2
  106. package/lib-amd/components/AreaChart/index.js.map +1 -1
  107. package/lib-amd/components/CommonComponents/CartesianChart.base.d.ts +1 -0
  108. package/lib-amd/components/CommonComponents/CartesianChart.base.js +73 -42
  109. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  110. package/lib-amd/components/CommonComponents/CartesianChart.js +1 -1
  111. package/lib-amd/components/CommonComponents/CartesianChart.js.map +1 -1
  112. package/lib-amd/components/CommonComponents/CartesianChart.styles.js +6 -6
  113. package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  114. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +11 -0
  115. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  116. package/lib-amd/components/CommonComponents/index.js +2 -2
  117. package/lib-amd/components/CommonComponents/index.js.map +1 -1
  118. package/lib-amd/components/DonutChart/Arc/Arc.js +6 -6
  119. package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
  120. package/lib-amd/components/DonutChart/Arc/index.js +2 -2
  121. package/lib-amd/components/DonutChart/Arc/index.js.map +1 -1
  122. package/lib-amd/components/DonutChart/DonutChart.base.js +10 -10
  123. package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
  124. package/lib-amd/components/DonutChart/DonutChart.js +1 -1
  125. package/lib-amd/components/DonutChart/DonutChart.js.map +1 -1
  126. package/lib-amd/components/DonutChart/DonutChart.styles.js +1 -1
  127. package/lib-amd/components/DonutChart/DonutChart.styles.js.map +1 -1
  128. package/lib-amd/components/DonutChart/Pie/Pie.js +4 -4
  129. package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -1
  130. package/lib-amd/components/DonutChart/Pie/index.js +2 -2
  131. package/lib-amd/components/DonutChart/Pie/index.js.map +1 -1
  132. package/lib-amd/components/DonutChart/index.js +3 -3
  133. package/lib-amd/components/DonutChart/index.js.map +1 -1
  134. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +23 -23
  135. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  136. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +1 -1
  137. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  138. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js +1 -1
  139. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js.map +1 -1
  140. package/lib-amd/components/GroupedVerticalBarChart/index.js +2 -2
  141. package/lib-amd/components/GroupedVerticalBarChart/index.js.map +1 -1
  142. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +25 -25
  143. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  144. package/lib-amd/components/HeatMapChart/HeatMapChart.js +1 -1
  145. package/lib-amd/components/HeatMapChart/HeatMapChart.js.map +1 -1
  146. package/lib-amd/components/HeatMapChart/index.js +2 -2
  147. package/lib-amd/components/HeatMapChart/index.js.map +1 -1
  148. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js +17 -17
  149. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  150. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.js +1 -1
  151. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  152. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.styles.js +2 -2
  153. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.styles.js.map +1 -1
  154. package/lib-amd/components/HorizontalBarChart/index.js +3 -3
  155. package/lib-amd/components/HorizontalBarChart/index.js.map +1 -1
  156. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +36 -36
  157. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  158. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +1 -1
  159. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  160. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js +1 -1
  161. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -1
  162. package/lib-amd/components/HorizontalBarChartWithAxis/index.js +2 -2
  163. package/lib-amd/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  164. package/lib-amd/components/Legends/Legends.base.js +16 -16
  165. package/lib-amd/components/Legends/Legends.base.js.map +1 -1
  166. package/lib-amd/components/Legends/Legends.js +1 -1
  167. package/lib-amd/components/Legends/Legends.js.map +1 -1
  168. package/lib-amd/components/Legends/Legends.styles.js +8 -8
  169. package/lib-amd/components/Legends/Legends.styles.js.map +1 -1
  170. package/lib-amd/components/Legends/index.js +3 -3
  171. package/lib-amd/components/Legends/index.js.map +1 -1
  172. package/lib-amd/components/Legends/shape.js +11 -11
  173. package/lib-amd/components/Legends/shape.js.map +1 -1
  174. package/lib-amd/components/LineChart/LineChart.base.js +78 -78
  175. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  176. package/lib-amd/components/LineChart/LineChart.js +1 -1
  177. package/lib-amd/components/LineChart/LineChart.js.map +1 -1
  178. package/lib-amd/components/LineChart/LineChart.styles.js +1 -1
  179. package/lib-amd/components/LineChart/LineChart.styles.js.map +1 -1
  180. package/lib-amd/components/LineChart/eventAnnotation/EventAnnotation.js +3 -3
  181. package/lib-amd/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  182. package/lib-amd/components/LineChart/eventAnnotation/Textbox.js +3 -3
  183. package/lib-amd/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  184. package/lib-amd/components/LineChart/index.js +3 -3
  185. package/lib-amd/components/LineChart/index.js.map +1 -1
  186. package/lib-amd/components/PieChart/Arc/Arc.js +5 -5
  187. package/lib-amd/components/PieChart/Arc/Arc.js.map +1 -1
  188. package/lib-amd/components/PieChart/Arc/index.js +2 -2
  189. package/lib-amd/components/PieChart/Arc/index.js.map +1 -1
  190. package/lib-amd/components/PieChart/Pie/Pie.js +3 -3
  191. package/lib-amd/components/PieChart/Pie/Pie.js.map +1 -1
  192. package/lib-amd/components/PieChart/Pie/index.js +2 -2
  193. package/lib-amd/components/PieChart/Pie/index.js.map +1 -1
  194. package/lib-amd/components/PieChart/PieChart.base.js +2 -2
  195. package/lib-amd/components/PieChart/PieChart.base.js.map +1 -1
  196. package/lib-amd/components/PieChart/PieChart.js +1 -1
  197. package/lib-amd/components/PieChart/PieChart.js.map +1 -1
  198. package/lib-amd/components/PieChart/PieChart.styles.js +1 -1
  199. package/lib-amd/components/PieChart/PieChart.styles.js.map +1 -1
  200. package/lib-amd/components/PieChart/index.js +2 -2
  201. package/lib-amd/components/PieChart/index.js.map +1 -1
  202. package/lib-amd/components/SankeyChart/SankeyChart.base.js +27 -27
  203. package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
  204. package/lib-amd/components/SankeyChart/SankeyChart.js +1 -1
  205. package/lib-amd/components/SankeyChart/SankeyChart.js.map +1 -1
  206. package/lib-amd/components/SankeyChart/SankeyChart.styles.js +1 -1
  207. package/lib-amd/components/SankeyChart/SankeyChart.styles.js.map +1 -1
  208. package/lib-amd/components/SankeyChart/index.js +2 -2
  209. package/lib-amd/components/SankeyChart/index.js.map +1 -1
  210. package/lib-amd/components/Sparkline/Sparkline.base.js +9 -9
  211. package/lib-amd/components/Sparkline/Sparkline.base.js.map +1 -1
  212. package/lib-amd/components/Sparkline/Sparkline.js +1 -1
  213. package/lib-amd/components/Sparkline/Sparkline.js.map +1 -1
  214. package/lib-amd/components/Sparkline/Sparkline.styles.js +1 -1
  215. package/lib-amd/components/Sparkline/Sparkline.styles.js.map +1 -1
  216. package/lib-amd/components/Sparkline/index.js +2 -2
  217. package/lib-amd/components/Sparkline/index.js.map +1 -1
  218. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +15 -15
  219. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  220. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.js +1 -1
  221. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.js.map +1 -1
  222. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.styles.js +1 -1
  223. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.styles.js.map +1 -1
  224. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +11 -11
  225. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  226. package/lib-amd/components/StackedBarChart/StackedBarChart.js +1 -1
  227. package/lib-amd/components/StackedBarChart/StackedBarChart.js.map +1 -1
  228. package/lib-amd/components/StackedBarChart/StackedBarChart.styles.js +3 -3
  229. package/lib-amd/components/StackedBarChart/StackedBarChart.styles.js.map +1 -1
  230. package/lib-amd/components/StackedBarChart/index.js +5 -5
  231. package/lib-amd/components/StackedBarChart/index.js.map +1 -1
  232. package/lib-amd/components/TreeChart/TreeChart.base.js +20 -20
  233. package/lib-amd/components/TreeChart/TreeChart.base.js.map +1 -1
  234. package/lib-amd/components/TreeChart/TreeChart.js +1 -1
  235. package/lib-amd/components/TreeChart/TreeChart.js.map +1 -1
  236. package/lib-amd/components/TreeChart/TreeChart.styles.js +4 -4
  237. package/lib-amd/components/TreeChart/TreeChart.styles.js.map +1 -1
  238. package/lib-amd/components/TreeChart/index.js +2 -2
  239. package/lib-amd/components/TreeChart/index.js.map +1 -1
  240. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +47 -38
  241. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  242. package/lib-amd/components/VerticalBarChart/VerticalBarChart.js +1 -1
  243. package/lib-amd/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  244. package/lib-amd/components/VerticalBarChart/VerticalBarChart.styles.js +1 -1
  245. package/lib-amd/components/VerticalBarChart/VerticalBarChart.styles.js.map +1 -1
  246. package/lib-amd/components/VerticalBarChart/index.js +2 -2
  247. package/lib-amd/components/VerticalBarChart/index.js.map +1 -1
  248. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +42 -41
  249. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  250. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -1
  251. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  252. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js +1 -1
  253. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js.map +1 -1
  254. package/lib-amd/components/VerticalStackedBarChart/index.js +2 -2
  255. package/lib-amd/components/VerticalStackedBarChart/index.js.map +1 -1
  256. package/lib-amd/index.js +19 -19
  257. package/lib-amd/index.js.map +1 -1
  258. package/lib-amd/types/IDataPoint.d.ts +10 -0
  259. package/lib-amd/types/IDataPoint.js.map +1 -1
  260. package/lib-amd/types/index.js +2 -2
  261. package/lib-amd/types/index.js.map +1 -1
  262. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.base.js +6 -6
  263. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -1
  264. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.js +1 -1
  265. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.js.map +1 -1
  266. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.styles.js +2 -2
  267. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.styles.js.map +1 -1
  268. package/lib-amd/utilities/ChartHoverCard/index.js +3 -3
  269. package/lib-amd/utilities/ChartHoverCard/index.js.map +1 -1
  270. package/lib-amd/utilities/FocusableTooltipText.js +3 -3
  271. package/lib-amd/utilities/FocusableTooltipText.js.map +1 -1
  272. package/lib-amd/utilities/index.js +3 -3
  273. package/lib-amd/utilities/index.js.map +1 -1
  274. package/lib-amd/utilities/utilities.d.ts +2 -2
  275. package/lib-amd/utilities/utilities.js +82 -80
  276. package/lib-amd/utilities/utilities.js.map +1 -1
  277. package/lib-amd/version.js +1 -1
  278. package/lib-amd/version.js.map +1 -1
  279. package/lib-commonjs/AreaChart.js +1 -1
  280. package/lib-commonjs/AreaChart.js.map +1 -1
  281. package/lib-commonjs/CartesianChart.js +1 -1
  282. package/lib-commonjs/CartesianChart.js.map +1 -1
  283. package/lib-commonjs/DonutChart.js +1 -1
  284. package/lib-commonjs/DonutChart.js.map +1 -1
  285. package/lib-commonjs/GroupedVerticalBarChart.js +1 -1
  286. package/lib-commonjs/GroupedVerticalBarChart.js.map +1 -1
  287. package/lib-commonjs/HeatMapChart.js +1 -1
  288. package/lib-commonjs/HeatMapChart.js.map +1 -1
  289. package/lib-commonjs/HorizontalBarChart.js +1 -1
  290. package/lib-commonjs/HorizontalBarChart.js.map +1 -1
  291. package/lib-commonjs/HorizontalBarChartWithAxis.js +1 -1
  292. package/lib-commonjs/HorizontalBarChartWithAxis.js.map +1 -1
  293. package/lib-commonjs/Legends.js +1 -1
  294. package/lib-commonjs/Legends.js.map +1 -1
  295. package/lib-commonjs/LineChart.js +1 -1
  296. package/lib-commonjs/LineChart.js.map +1 -1
  297. package/lib-commonjs/PieChart.js +1 -1
  298. package/lib-commonjs/PieChart.js.map +1 -1
  299. package/lib-commonjs/SankeyChart.js +1 -1
  300. package/lib-commonjs/SankeyChart.js.map +1 -1
  301. package/lib-commonjs/Sparkline.js +1 -1
  302. package/lib-commonjs/Sparkline.js.map +1 -1
  303. package/lib-commonjs/StackedBarChart.js +1 -1
  304. package/lib-commonjs/StackedBarChart.js.map +1 -1
  305. package/lib-commonjs/TreeChart.js +1 -1
  306. package/lib-commonjs/TreeChart.js.map +1 -1
  307. package/lib-commonjs/VerticalBarChart.js +1 -1
  308. package/lib-commonjs/VerticalBarChart.js.map +1 -1
  309. package/lib-commonjs/VerticalStackedBarChart.js +1 -1
  310. package/lib-commonjs/VerticalStackedBarChart.js.map +1 -1
  311. package/lib-commonjs/components/AreaChart/AreaChart.base.js +42 -42
  312. package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
  313. package/lib-commonjs/components/AreaChart/AreaChart.js +1 -1
  314. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  315. package/lib-commonjs/components/AreaChart/AreaChart.styles.js +1 -1
  316. package/lib-commonjs/components/AreaChart/AreaChart.styles.js.map +1 -1
  317. package/lib-commonjs/components/AreaChart/index.js +2 -2
  318. package/lib-commonjs/components/AreaChart/index.js.map +1 -1
  319. package/lib-commonjs/components/CommonComponents/CartesianChart.base.d.ts +1 -0
  320. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +73 -42
  321. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  322. package/lib-commonjs/components/CommonComponents/CartesianChart.js +1 -1
  323. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  324. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js +6 -6
  325. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  326. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +11 -0
  327. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  328. package/lib-commonjs/components/CommonComponents/index.js +2 -2
  329. package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
  330. package/lib-commonjs/components/DonutChart/Arc/Arc.js +6 -6
  331. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  332. package/lib-commonjs/components/DonutChart/Arc/index.js +2 -2
  333. package/lib-commonjs/components/DonutChart/Arc/index.js.map +1 -1
  334. package/lib-commonjs/components/DonutChart/DonutChart.base.js +10 -10
  335. package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
  336. package/lib-commonjs/components/DonutChart/DonutChart.js +1 -1
  337. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  338. package/lib-commonjs/components/DonutChart/DonutChart.styles.js +1 -1
  339. package/lib-commonjs/components/DonutChart/DonutChart.styles.js.map +1 -1
  340. package/lib-commonjs/components/DonutChart/Pie/Pie.js +4 -4
  341. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  342. package/lib-commonjs/components/DonutChart/Pie/index.js +2 -2
  343. package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -1
  344. package/lib-commonjs/components/DonutChart/index.js +3 -3
  345. package/lib-commonjs/components/DonutChart/index.js.map +1 -1
  346. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +23 -23
  347. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  348. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +1 -1
  349. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  350. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js +1 -1
  351. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js.map +1 -1
  352. package/lib-commonjs/components/GroupedVerticalBarChart/index.js +2 -2
  353. package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +1 -1
  354. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +25 -25
  355. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  356. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +1 -1
  357. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  358. package/lib-commonjs/components/HeatMapChart/index.js +2 -2
  359. package/lib-commonjs/components/HeatMapChart/index.js.map +1 -1
  360. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js +17 -17
  361. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  362. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +1 -1
  363. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  364. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.styles.js +2 -2
  365. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.styles.js.map +1 -1
  366. package/lib-commonjs/components/HorizontalBarChart/index.js +3 -3
  367. package/lib-commonjs/components/HorizontalBarChart/index.js.map +1 -1
  368. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +36 -36
  369. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  370. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +1 -1
  371. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  372. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js +1 -1
  373. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -1
  374. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js +2 -2
  375. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  376. package/lib-commonjs/components/Legends/Legends.base.js +16 -16
  377. package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
  378. package/lib-commonjs/components/Legends/Legends.js +1 -1
  379. package/lib-commonjs/components/Legends/Legends.js.map +1 -1
  380. package/lib-commonjs/components/Legends/Legends.styles.js +8 -8
  381. package/lib-commonjs/components/Legends/Legends.styles.js.map +1 -1
  382. package/lib-commonjs/components/Legends/index.js +3 -3
  383. package/lib-commonjs/components/Legends/index.js.map +1 -1
  384. package/lib-commonjs/components/Legends/shape.js +11 -11
  385. package/lib-commonjs/components/Legends/shape.js.map +1 -1
  386. package/lib-commonjs/components/LineChart/LineChart.base.js +78 -78
  387. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  388. package/lib-commonjs/components/LineChart/LineChart.js +1 -1
  389. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  390. package/lib-commonjs/components/LineChart/LineChart.styles.js +1 -1
  391. package/lib-commonjs/components/LineChart/LineChart.styles.js.map +1 -1
  392. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +3 -3
  393. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  394. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +3 -3
  395. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  396. package/lib-commonjs/components/LineChart/index.js +3 -3
  397. package/lib-commonjs/components/LineChart/index.js.map +1 -1
  398. package/lib-commonjs/components/PieChart/Arc/Arc.js +5 -5
  399. package/lib-commonjs/components/PieChart/Arc/Arc.js.map +1 -1
  400. package/lib-commonjs/components/PieChart/Arc/index.js +2 -2
  401. package/lib-commonjs/components/PieChart/Arc/index.js.map +1 -1
  402. package/lib-commonjs/components/PieChart/Pie/Pie.js +3 -3
  403. package/lib-commonjs/components/PieChart/Pie/Pie.js.map +1 -1
  404. package/lib-commonjs/components/PieChart/Pie/index.js +2 -2
  405. package/lib-commonjs/components/PieChart/Pie/index.js.map +1 -1
  406. package/lib-commonjs/components/PieChart/PieChart.base.js +2 -2
  407. package/lib-commonjs/components/PieChart/PieChart.base.js.map +1 -1
  408. package/lib-commonjs/components/PieChart/PieChart.js +1 -1
  409. package/lib-commonjs/components/PieChart/PieChart.js.map +1 -1
  410. package/lib-commonjs/components/PieChart/PieChart.styles.js +1 -1
  411. package/lib-commonjs/components/PieChart/PieChart.styles.js.map +1 -1
  412. package/lib-commonjs/components/PieChart/index.js +2 -2
  413. package/lib-commonjs/components/PieChart/index.js.map +1 -1
  414. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js +27 -27
  415. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
  416. package/lib-commonjs/components/SankeyChart/SankeyChart.js +1 -1
  417. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  418. package/lib-commonjs/components/SankeyChart/SankeyChart.styles.js +1 -1
  419. package/lib-commonjs/components/SankeyChart/SankeyChart.styles.js.map +1 -1
  420. package/lib-commonjs/components/SankeyChart/index.js +2 -2
  421. package/lib-commonjs/components/SankeyChart/index.js.map +1 -1
  422. package/lib-commonjs/components/Sparkline/Sparkline.base.js +9 -9
  423. package/lib-commonjs/components/Sparkline/Sparkline.base.js.map +1 -1
  424. package/lib-commonjs/components/Sparkline/Sparkline.js +1 -1
  425. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
  426. package/lib-commonjs/components/Sparkline/Sparkline.styles.js +1 -1
  427. package/lib-commonjs/components/Sparkline/Sparkline.styles.js.map +1 -1
  428. package/lib-commonjs/components/Sparkline/index.js +2 -2
  429. package/lib-commonjs/components/Sparkline/index.js.map +1 -1
  430. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +15 -15
  431. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  432. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.js +1 -1
  433. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.js.map +1 -1
  434. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.styles.js +1 -1
  435. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.styles.js.map +1 -1
  436. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js +11 -11
  437. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  438. package/lib-commonjs/components/StackedBarChart/StackedBarChart.js +1 -1
  439. package/lib-commonjs/components/StackedBarChart/StackedBarChart.js.map +1 -1
  440. package/lib-commonjs/components/StackedBarChart/StackedBarChart.styles.js +3 -3
  441. package/lib-commonjs/components/StackedBarChart/StackedBarChart.styles.js.map +1 -1
  442. package/lib-commonjs/components/StackedBarChart/index.js +5 -5
  443. package/lib-commonjs/components/StackedBarChart/index.js.map +1 -1
  444. package/lib-commonjs/components/TreeChart/TreeChart.base.js +20 -20
  445. package/lib-commonjs/components/TreeChart/TreeChart.base.js.map +1 -1
  446. package/lib-commonjs/components/TreeChart/TreeChart.js +1 -1
  447. package/lib-commonjs/components/TreeChart/TreeChart.js.map +1 -1
  448. package/lib-commonjs/components/TreeChart/TreeChart.styles.js +4 -4
  449. package/lib-commonjs/components/TreeChart/TreeChart.styles.js.map +1 -1
  450. package/lib-commonjs/components/TreeChart/index.js +2 -2
  451. package/lib-commonjs/components/TreeChart/index.js.map +1 -1
  452. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +47 -38
  453. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  454. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +1 -1
  455. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  456. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.styles.js +1 -1
  457. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.styles.js.map +1 -1
  458. package/lib-commonjs/components/VerticalBarChart/index.js +2 -2
  459. package/lib-commonjs/components/VerticalBarChart/index.js.map +1 -1
  460. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +42 -41
  461. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  462. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -1
  463. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  464. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js +1 -1
  465. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js.map +1 -1
  466. package/lib-commonjs/components/VerticalStackedBarChart/index.js +2 -2
  467. package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +1 -1
  468. package/lib-commonjs/index.js +19 -19
  469. package/lib-commonjs/index.js.map +1 -1
  470. package/lib-commonjs/types/IDataPoint.d.ts +10 -0
  471. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  472. package/lib-commonjs/types/index.js +2 -2
  473. package/lib-commonjs/types/index.js.map +1 -1
  474. package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.base.js +6 -6
  475. package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -1
  476. package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.js +1 -1
  477. package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.js.map +1 -1
  478. package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.styles.js +2 -2
  479. package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.styles.js.map +1 -1
  480. package/lib-commonjs/utilities/ChartHoverCard/index.js +3 -3
  481. package/lib-commonjs/utilities/ChartHoverCard/index.js.map +1 -1
  482. package/lib-commonjs/utilities/FocusableTooltipText.js +3 -3
  483. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  484. package/lib-commonjs/utilities/index.js +3 -3
  485. package/lib-commonjs/utilities/index.js.map +1 -1
  486. package/lib-commonjs/utilities/utilities.d.ts +2 -2
  487. package/lib-commonjs/utilities/utilities.js +82 -80
  488. package/lib-commonjs/utilities/utilities.js.map +1 -1
  489. package/lib-commonjs/version.js +1 -1
  490. package/lib-commonjs/version.js.map +1 -1
  491. package/package.json +7 -7
  492. package/src/components/CommonComponents/CartesianChart.types.ts +13 -0
@@ -2,7 +2,7 @@ define(["require", "exports", "tslib", "@fluentui/react/lib/Styling", "@fluentui
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.getStyles = void 0;
5
- var isIE11Var = react_1.isIE11();
5
+ var isIE11Var = (0, react_1.isIE11)();
6
6
  var getStyles = function (props) {
7
7
  var _a, _b, _c, _d, _e, _f, _g, _h;
8
8
  var className = props.className, theme = props.theme, isRtl = props.isRtl, shouldHighlight = props.shouldHighlight, href = props.href, _j = props.lineColor, lineColor = _j === void 0 ? 'transparent' : _j, toDrawShape = props.toDrawShape;
@@ -109,7 +109,7 @@ define(["require", "exports", "tslib", "@fluentui/react/lib/Styling", "@fluentui
109
109
  justifyContent: 'space-between',
110
110
  },
111
111
  calloutContentX: [
112
- tslib_1.__assign(tslib_1.__assign({}, fonts.small), { lineHeight: '16px', opacity: '0.8', color: theme.semanticColors.bodySubtext }),
112
+ (0, tslib_1.__assign)((0, tslib_1.__assign)({}, fonts.small), { lineHeight: '16px', opacity: '0.8', color: theme.semanticColors.bodySubtext }),
113
113
  ],
114
114
  calloutBlockContainer: [
115
115
  theme.fonts.mediumPlus,
@@ -123,7 +123,7 @@ define(["require", "exports", "tslib", "@fluentui/react/lib/Styling", "@fluentui
123
123
  forcedColorAdjust: 'none',
124
124
  },
125
125
  _e),
126
- borderLeft: "4px solid " + lineColor,
126
+ borderLeft: "4px solid ".concat(lineColor),
127
127
  paddingLeft: '8px',
128
128
  },
129
129
  toDrawShape && {
@@ -133,13 +133,13 @@ define(["require", "exports", "tslib", "@fluentui/react/lib/Styling", "@fluentui
133
133
  shapeStyles: {
134
134
  marginRight: '8px',
135
135
  },
136
- calloutlegendText: tslib_1.__assign(tslib_1.__assign({}, fonts.small), { lineHeight: '16px', selectors: (_f = {},
136
+ calloutlegendText: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, fonts.small), { lineHeight: '16px', selectors: (_f = {},
137
137
  _f[Styling_1.HighContrastSelectorBlack] = {
138
138
  color: 'rgb(255, 255, 255)',
139
139
  },
140
140
  _f), color: theme.semanticColors.bodySubtext }),
141
141
  calloutContentY: [
142
- tslib_1.__assign(tslib_1.__assign({}, fonts.mediumPlus), { fontWeight: 'bold', lineHeight: '22px', selectors: (_g = {},
142
+ (0, tslib_1.__assign)((0, tslib_1.__assign)({}, fonts.mediumPlus), { fontWeight: 'bold', lineHeight: '22px', selectors: (_g = {},
143
143
  _g[Styling_1.HighContrastSelectorBlack] = {
144
144
  color: 'rgb(255, 255, 255)',
145
145
  },
@@ -156,7 +156,7 @@ define(["require", "exports", "tslib", "@fluentui/react/lib/Styling", "@fluentui
156
156
  color: theme.semanticColors.bodyText,
157
157
  marginTop: '10px',
158
158
  paddingTop: '10px',
159
- borderTop: "1px solid " + theme.semanticColors.menuDivider,
159
+ borderTop: "1px solid ".concat(theme.semanticColors.menuDivider),
160
160
  },
161
161
  ],
162
162
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CartesianChart.styles.js","sourceRoot":"../src/","sources":["components/CommonComponents/CartesianChart.styles.ts"],"names":[],"mappings":";;;;IAIA,IAAM,SAAS,GAAY,cAAM,EAAE,CAAC;IAE7B,IAAM,SAAS,GAAG,UAAC,KAAgC;;QAChD,IAAA,SAAS,GAAkF,KAAK,UAAvF,EAAE,KAAK,GAA2E,KAAK,MAAhF,EAAE,KAAK,GAAoE,KAAK,MAAzE,EAAE,eAAe,GAAmD,KAAK,gBAAxD,EAAE,IAAI,GAA6C,KAAK,KAAlD,EAAE,KAA2C,KAAK,UAAvB,EAAzB,SAAS,mBAAG,aAAa,KAAA,EAAE,WAAW,GAAK,KAAK,YAAV,CAAW;QACjG,IAAA,KAAK,GAAK,KAAM,MAAX,CAAY;QACzB,OAAO;YACL,IAAI,EAAE;gBACJ,KAAK,CAAC,KAAK,CAAC,MAAM;gBAClB;oBACE,OAAO,EAAE,MAAM;oBACf,KAAK,EAAE,MAAM;oBACb,MAAM,EAAE,MAAM;oBACd,aAAa,EAAE,QAAQ;oBACvB,QAAQ,EAAE,QAAQ;iBACnB;gBACD,SAAS;aACV;YACD,KAAK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AAc,CAAC,WAAW,GACxC;YACD,eAAe,EAAE;sDAEV,KAAK,CAAC,UAAU,KACnB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,SAAS;wBACP,GAAC,mCAAyB,IAAG;4BAC3B,KAAK,EAAE,oBAAoB;yBAC5B;;aAGN;YACD,kBAAkB,EAAE;gBAClB,KAAK,CAAC,KAAK,CAAC,KAAK;gBACjB;oBACE,SAAS;wBACP,GAAC,mCAAyB,IAAG;4BAC3B,KAAK,EAAE,oBAAoB;yBAC5B;2BACF;oBACD,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ;oBACpC,SAAS,EAAE,MAAM;oBACjB,UAAU,EAAE,MAAM;oBAClB,SAAS,EAAE,eAAa,KAAK,CAAC,cAAc,CAAC,WAAa;iBAC3D;aACF;SACF,CAAC;IACJ,CAAC,CAAC;IA7KW,QAAA,SAAS,aA6KpB","sourcesContent":["import { ICartesianChartStyleProps, ICartesianChartStyles } from './CartesianChart.types';\nimport { HighContrastSelectorBlack, HighContrastSelector } from '@fluentui/react/lib/Styling';\nimport { isIE11 } from '@fluentui/react';\n\nconst isIE11Var: boolean = isIE11();\n\nexport const getStyles = (props: ICartesianChartStyleProps): ICartesianChartStyles => {\n const { className, theme, isRtl, shouldHighlight, href, lineColor = 'transparent', toDrawShape } = props;\n const { fonts } = theme!;\n return {\n root: [\n theme.fonts.medium,\n {\n display: 'flex',\n width: '100%',\n height: '100%',\n flexDirection: 'column',\n overflow: 'hidden',\n },\n className,\n ],\n xAxis: {\n selectors: {\n text: [\n theme.fonts.tiny,\n {\n fill: theme.semanticColors.bodyText,\n fontWeight: '600',\n selectors: {\n [HighContrastSelectorBlack]: {\n fill: 'rgb(179, 179, 179)',\n },\n },\n },\n ],\n line: {\n opacity: 0.2,\n stroke: theme.semanticColors.bodyText,\n width: '1px',\n selectors: {\n [HighContrastSelectorBlack]: {\n opacity: 0.1,\n stroke: 'rgb(179, 179, 179)',\n },\n },\n },\n path: {\n display: 'none',\n },\n },\n },\n yAxis: {\n selectors: {\n text: [\n theme.fonts.tiny,\n {\n fill: theme.semanticColors.bodyText,\n fontWeight: '600',\n selectors: {\n [HighContrastSelectorBlack]: {\n fill: 'rgb(179, 179, 179)',\n },\n },\n },\n ],\n path: {\n display: 'none',\n },\n line: {\n opacity: 0.2,\n stroke: theme.semanticColors.bodyText,\n selectors: {\n [HighContrastSelectorBlack]: {\n opacity: 0.1,\n stroke: 'rgb(179, 179, 179)',\n },\n },\n },\n g: [\n isRtl &&\n !isIE11Var && {\n textAnchor: 'end',\n },\n ],\n },\n },\n\n opacityChangeOnHover: {\n opacity: shouldHighlight ? '' : '0.1',\n cursor: href ? 'pointer' : 'default',\n },\n\n legendContainer: [\n {\n marginTop: '8px',\n marginLeft: '20px',\n },\n ],\n calloutContentRoot: [\n {\n display: 'grid',\n overflow: 'hidden',\n padding: '11px 16px 10px 16px',\n backgroundColor: theme.semanticColors.bodyBackground,\n backgroundBlendMode: 'normal, luminosity',\n },\n ],\n calloutDateTimeContainer: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n calloutContentX: [\n {\n ...fonts.small,\n lineHeight: '16px',\n opacity: '0.8',\n color: theme.semanticColors.bodySubtext,\n },\n ],\n calloutBlockContainer: [\n theme.fonts.mediumPlus,\n {\n marginTop: '13px',\n color: theme.semanticColors.bodyText,\n },\n !toDrawShape && {\n selectors: {\n [HighContrastSelector]: {\n forcedColorAdjust: 'none',\n },\n },\n borderLeft: `4px solid ${lineColor}`,\n paddingLeft: '8px',\n },\n toDrawShape && {\n display: 'flex',\n },\n ],\n shapeStyles: {\n marginRight: '8px',\n },\n calloutlegendText: {\n ...fonts.small,\n lineHeight: '16px',\n selectors: {\n [HighContrastSelectorBlack]: {\n color: 'rgb(255, 255, 255)',\n },\n },\n color: theme.semanticColors.bodySubtext,\n },\n calloutContentY: [\n {\n ...fonts.mediumPlus,\n fontWeight: 'bold',\n lineHeight: '22px',\n selectors: {\n [HighContrastSelectorBlack]: {\n color: 'rgb(255, 255, 255)',\n },\n },\n },\n ],\n descriptionMessage: [\n theme.fonts.small,\n {\n selectors: {\n [HighContrastSelectorBlack]: {\n color: 'rgb(255, 255, 255)',\n },\n },\n color: theme.semanticColors.bodyText,\n marginTop: '10px',\n paddingTop: '10px',\n borderTop: `1px solid ${theme.semanticColors.menuDivider}`,\n },\n ],\n };\n};\n"]}
1
+ {"version":3,"file":"CartesianChart.styles.js","sourceRoot":"../src/","sources":["components/CommonComponents/CartesianChart.styles.ts"],"names":[],"mappings":";;;;IAIA,IAAM,SAAS,GAAY,IAAA,cAAM,GAAE,CAAC;IAE7B,IAAM,SAAS,GAAG,UAAC,KAAgC;;QAChD,IAAA,SAAS,GAAkF,KAAK,UAAvF,EAAE,KAAK,GAA2E,KAAK,MAAhF,EAAE,KAAK,GAAoE,KAAK,MAAzE,EAAE,eAAe,GAAmD,KAAK,gBAAxD,EAAE,IAAI,GAA6C,KAAK,KAAlD,EAAE,KAA2C,KAAK,UAAvB,EAAzB,SAAS,mBAAG,aAAa,KAAA,EAAE,WAAW,GAAK,KAAK,YAAV,CAAW;QACjG,IAAA,KAAK,GAAK,KAAM,MAAX,CAAY;QACzB,OAAO;YACL,IAAI,EAAE;gBACJ,KAAK,CAAC,KAAK,CAAC,MAAM;gBAClB;oBACE,OAAO,EAAE,MAAM;oBACf,KAAK,EAAE,MAAM;oBACb,MAAM,EAAE,MAAM;oBACd,aAAa,EAAE,QAAQ;oBACvB,QAAQ,EAAE,QAAQ;iBACnB;gBACD,SAAS;aACV;YACD,KAAK,EAAE;gBACL,SAAS,EAAE;oBACT,IAAI,EAAE;wBACJ,KAAK,CAAC,KAAK,CAAC,IAAI;wBAChB;4BACE,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ;4BACnC,UAAU,EAAE,KAAK;4BACjB,SAAS;gCACP,GAAC,mCAAyB,IAAG;oCAC3B,IAAI,EAAE,oBAAoB;iCAC3B;mCACF;yBACF;qBAC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AAK;gBACjB;oBACE,SAAS;wBACP,GAAC,mCAAyB,IAAG;4BAC3B,KAAK,EAAE,oBAAoB;yBAC5B;2BACF;oBACD,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ;oBACpC,SAAS,EAAE,MAAM;oBACjB,UAAU,EAAE,MAAM;oBAClB,SAAS,EAAE,oBAAa,KAAK,CAAC,cAAc,CAAC,WAAW,CAAE;iBAC3D;aACF;SACF,CAAC;IACJ,CAAC,CAAC;IA7KW,QAAA,SAAS,aA6KpB","sourcesContent":["import { ICartesianChartStyleProps, ICartesianChartStyles } from './CartesianChart.types';\nimport { HighContrastSelectorBlack, HighContrastSelector } from '@fluentui/react/lib/Styling';\nimport { isIE11 } from '@fluentui/react';\n\nconst isIE11Var: boolean = isIE11();\n\nexport const getStyles = (props: ICartesianChartStyleProps): ICartesianChartStyles => {\n const { className, theme, isRtl, shouldHighlight, href, lineColor = 'transparent', toDrawShape } = props;\n const { fonts } = theme!;\n return {\n root: [\n theme.fonts.medium,\n {\n display: 'flex',\n width: '100%',\n height: '100%',\n flexDirection: 'column',\n overflow: 'hidden',\n },\n className,\n ],\n xAxis: {\n selectors: {\n text: [\n theme.fonts.tiny,\n {\n fill: theme.semanticColors.bodyText,\n fontWeight: '600',\n selectors: {\n [HighContrastSelectorBlack]: {\n fill: 'rgb(179, 179, 179)',\n },\n },\n },\n ],\n line: {\n opacity: 0.2,\n stroke: theme.semanticColors.bodyText,\n width: '1px',\n selectors: {\n [HighContrastSelectorBlack]: {\n opacity: 0.1,\n stroke: 'rgb(179, 179, 179)',\n },\n },\n },\n path: {\n display: 'none',\n },\n },\n },\n yAxis: {\n selectors: {\n text: [\n theme.fonts.tiny,\n {\n fill: theme.semanticColors.bodyText,\n fontWeight: '600',\n selectors: {\n [HighContrastSelectorBlack]: {\n fill: 'rgb(179, 179, 179)',\n },\n },\n },\n ],\n path: {\n display: 'none',\n },\n line: {\n opacity: 0.2,\n stroke: theme.semanticColors.bodyText,\n selectors: {\n [HighContrastSelectorBlack]: {\n opacity: 0.1,\n stroke: 'rgb(179, 179, 179)',\n },\n },\n },\n g: [\n isRtl &&\n !isIE11Var && {\n textAnchor: 'end',\n },\n ],\n },\n },\n\n opacityChangeOnHover: {\n opacity: shouldHighlight ? '' : '0.1',\n cursor: href ? 'pointer' : 'default',\n },\n\n legendContainer: [\n {\n marginTop: '8px',\n marginLeft: '20px',\n },\n ],\n calloutContentRoot: [\n {\n display: 'grid',\n overflow: 'hidden',\n padding: '11px 16px 10px 16px',\n backgroundColor: theme.semanticColors.bodyBackground,\n backgroundBlendMode: 'normal, luminosity',\n },\n ],\n calloutDateTimeContainer: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n calloutContentX: [\n {\n ...fonts.small,\n lineHeight: '16px',\n opacity: '0.8',\n color: theme.semanticColors.bodySubtext,\n },\n ],\n calloutBlockContainer: [\n theme.fonts.mediumPlus,\n {\n marginTop: '13px',\n color: theme.semanticColors.bodyText,\n },\n !toDrawShape && {\n selectors: {\n [HighContrastSelector]: {\n forcedColorAdjust: 'none',\n },\n },\n borderLeft: `4px solid ${lineColor}`,\n paddingLeft: '8px',\n },\n toDrawShape && {\n display: 'flex',\n },\n ],\n shapeStyles: {\n marginRight: '8px',\n },\n calloutlegendText: {\n ...fonts.small,\n lineHeight: '16px',\n selectors: {\n [HighContrastSelectorBlack]: {\n color: 'rgb(255, 255, 255)',\n },\n },\n color: theme.semanticColors.bodySubtext,\n },\n calloutContentY: [\n {\n ...fonts.mediumPlus,\n fontWeight: 'bold',\n lineHeight: '22px',\n selectors: {\n [HighContrastSelectorBlack]: {\n color: 'rgb(255, 255, 255)',\n },\n },\n },\n ],\n descriptionMessage: [\n theme.fonts.small,\n {\n selectors: {\n [HighContrastSelectorBlack]: {\n color: 'rgb(255, 255, 255)',\n },\n },\n color: theme.semanticColors.bodyText,\n marginTop: '10px',\n paddingTop: '10px',\n borderTop: `1px solid ${theme.semanticColors.menuDivider}`,\n },\n ],\n };\n};\n"]}
@@ -187,6 +187,16 @@ export interface ICartesianChartProps {
187
187
  * Please look at https://github.com/d3/d3-format for all the formats supported
188
188
  */
189
189
  yAxisTickFormat?: any;
190
+ /**
191
+ * Secondary y-scale options
192
+ * By default this is not defined, meaning there will be no secondary y-scale.
193
+ */
194
+ secondaryYScaleOptions?: {
195
+ /** Minimum value (0 by default) */
196
+ yMinValue?: number;
197
+ /** Maximum value (100 by default) */
198
+ yMaxValue?: number;
199
+ };
190
200
  /**
191
201
  * minimum data value point in y-axis
192
202
  */
@@ -305,6 +315,7 @@ export interface IYValueHover {
305
315
  export interface IChildProps {
306
316
  xScale?: any;
307
317
  yScale?: any;
318
+ yScaleSecondary?: any;
308
319
  containerHeight?: number;
309
320
  containerWidth?: number;
310
321
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CartesianChart.types.js","sourceRoot":"../src/","sources":["components/CommonComponents/CartesianChart.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\nimport { ITheme, IStyle } from '@fluentui/react/lib/Styling';\nimport { IOverflowSetProps } from '@fluentui/react/lib/OverflowSet';\nimport { IFocusZoneProps, FocusZoneDirection } from '@fluentui/react-focus';\nimport { ICalloutProps } from '@fluentui/react/lib/Callout';\nimport { ILegendsProps } from '../Legends/index';\nimport { IAccessibilityProps, IMargins } from '../../types/index';\nimport { ChartTypes, IChartHoverCardProps, XAxisTypes, YAxisType } from '../../utilities/index';\nimport * as d3TimeFormat from 'd3-time-format';\n\nexport interface ICartesianChartStyleProps {\n /**\n * Theme (provided through customization.)\n */\n theme: ITheme;\n\n /**\n * Additional CSS class(es) to apply to the Chart.\n */\n className?: string;\n\n /**\n * Width of the chart.\n */\n width?: number;\n\n /**\n * Height of the chart.\n */\n height?: number;\n\n /**\n * Color of the chart.\n */\n color?: string;\n\n /**\n * Link to redirect if click action for graph\n */\n href?: string;\n\n /**\n * prop to check if the chart is selected or hovered upon to determine opacity\n */\n shouldHighlight?: boolean;\n\n /**\n * prop to check if the Page is in Rtl\n */\n isRtl?: boolean;\n\n /**\n * color of the line\n */\n lineColor?: string;\n\n /**\n * boolean flag which determines if shape is drawn in callout\n */\n toDrawShape?: boolean;\n}\n\nexport interface ICartesianChartStyles {\n /**\n * Style for the root element.\n */\n root?: IStyle;\n\n /**\n * Style for the element containing the x-axis.\n */\n xAxis?: IStyle;\n\n /**\n * Style for the element containing the y-axis.\n */\n yAxis?: IStyle;\n\n /**\n * Style for legend container\n */\n legendContainer?: IStyle;\n\n /**\n * line hover box css\n */\n hover?: IStyle;\n\n /**\n * styles for callout root-content\n */\n calloutContentRoot?: IStyle;\n\n /**\n * styles for callout x-content\n */\n calloutContentX?: IStyle;\n\n /**\n * styles for callout y-content\n */\n calloutContentY?: IStyle;\n\n /**\n * styles for description message\n */\n descriptionMessage?: IStyle;\n\n /**\n * styles for callout Date time container\n */\n calloutDateTimeContainer?: IStyle;\n\n /**\n * styles for callout info container\n */\n calloutInfoContainer?: IStyle;\n\n /**\n * styles for callout block container\n */\n calloutBlockContainer?: IStyle;\n\n /**\n * styles for callout legend text\n */\n calloutlegendText?: IStyle;\n\n /**\n * styles for tooltip\n */\n tooltip?: IStyle;\n\n /**\n * Style for the chart Title.\n */\n chartTitle?: IStyle;\n\n /**\n * Style to change the opacity of bars in dataviz when we hover on a single bar or legends\n */\n opacityChangeOnHover?: IStyle;\n\n /**\n * styles for the shape object in the callout\n */\n shapeStyles?: IStyle;\n}\n\nexport interface ICartesianChartProps {\n /**\n * Below height used for resizing of the chart\n * Wrap chart in your container and send the updated height and width to these props.\n * These values decide wheather chart re render or not. Please check examples for reference\n */\n height?: number;\n\n /**\n * Below width used for resizing of the chart\n * Wrap chart in your container and send the updated height and width to these props.\n * These values decide wheather chart re render or not. Please check examples for reference\n */\n width?: number;\n\n /**\n * this prop takes its parent as a HTML element to define the width and height of the chart\n */\n parentRef?: HTMLElement | null;\n\n /**\n * Additional CSS class(es) to apply to the Chart.\n */\n className?: string;\n\n /**\n * Theme (provided through customization.)\n */\n theme?: ITheme;\n\n /**\n * Margins for the chart\n * @default `{ top: 20, bottom: 35, left: 40, right: 20 }`\n * To avoid edge cuttings to the chart, we recommend you use default values or greater then default values\n */\n margins?: IMargins;\n\n /** decides wether to show/hide legends\n * @defaultvalue false\n */\n hideLegend?: boolean;\n\n /**\n * Do not show tooltips in chart\n * @default false\n */\n hideTooltip?: boolean;\n\n /**\n * this prop takes values that you want the chart to render on x-axis\n * This is a optional parameter if not specified D3 will decide which values appear on the x-axis for you\n * Please look at https://github.com/d3/d3-scale for more information on how D3 decides what data to appear on the axis of chart\n */\n tickValues?: number[] | Date[];\n\n /**\n * the format for the data on x-axis. For date object this can be specified to your requirement. Eg: '%m/%d', '%d'\n * Please look at https://github.com/d3/d3-time-format for all the formats supported for date axis\n * Only applicable for date axis. For y-axis format use yAxisTickFormat prop.\n */\n tickFormat?: string;\n\n /**\n * Width of line stroke\n */\n strokeWidth?: number;\n\n /**\n * x Axis labels tick padding. This defines the gap between tick labels and tick lines.\n * @default 10\n */\n xAxisTickPadding?: number;\n\n /**\n * the format in for the data on y-axis. For data object this can be specified to your requirement.\n * Eg: d3.format(\".0%\")(0.123),d3.format(\"+20\")(42);\n * Please look at https://github.com/d3/d3-format for all the formats supported\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yAxisTickFormat?: any;\n\n /**\n * minimum data value point in y-axis\n */\n yMinValue?: number;\n\n /**\n * maximum data value point in y-axis\n */\n yMaxValue?: number;\n\n /**\n * maximum data value point in x-axis\n */\n xMaxValue?: number;\n\n /**\n * Number of ticks on the y-axis.\n * Tick count should be factor of difference between (yMinValue, yMaxValue)?\n * @default 4\n */\n yAxisTickCount?: number;\n\n /**\n * defines the number of ticks on the x-axis. Tries to match the nearest interval satisfying the count.\n * Does not work for string axis.\n * @default 6\n */\n xAxisTickCount?: number;\n\n /**\n * define the size of the tick lines on the x-axis\n * @default 10\n */\n xAxistickSize?: number;\n\n /**\n * defines the space between the tick line and the data label\n * @default 10\n */\n tickPadding?: number;\n\n /**\n * Url that the data-viz needs to redirect to upon clicking on it\n */\n href?: string;\n\n /**\n * Label to apply to the whole chart.\n * @deprecated - Use your chart label for the chart.\n */\n chartLabel?: string;\n\n /**\n * overflow props for the legends\n */\n legendsOverflowProps?: Partial<IOverflowSetProps>;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n legendsOverflowText?: any;\n\n /**\n * focus zone props in hover card for legends\n */\n focusZonePropsForLegendsInHoverCard?: IFocusZoneProps;\n\n /**\n * Enable the legends to wrap lines if there is not enough space to show all legends on a single line\n */\n enabledLegendsWrapLines?: boolean;\n\n /*\n * props for the legends in the chart\n */\n legendProps?: Partial<ILegendsProps>;\n\n /**\n *@default false\n *Used for to elipse x axis labes and show tooltip on x axis labels\n */\n showXAxisLablesTooltip?: boolean;\n\n /**\n * @default 4\n * Used for X axis labels\n * While Giving showXAxisLablesTooltip prop, need to define after how many chars, we need to truncate the word.\n */\n noOfCharsToTruncate?: number;\n\n /**\n * @default false\n * Used to wrap x axis labels values (whole value)\n */\n wrapXAxisLables?: boolean;\n\n /**\n * @default false\n * Used to rotate x axis labels by 45 degrees\n */\n rotateXAxisLables?: boolean;\n\n /**\n * The prop used to define the date time localization options\n */\n dateLocalizeOptions?: Intl.DateTimeFormatOptions;\n\n /**\n * The prop used to define a custom locale for the date time format.\n */\n timeFormatLocale?: d3TimeFormat.TimeLocaleDefinition;\n\n /**\n * The prop used to define a custom datetime formatter for date axis.\n */\n customDateTimeFormatter?: (dateTime: Date) => string;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<ICartesianChartStyleProps, ICartesianChartStyles>;\n\n /**\n * Callout customization props\n */\n calloutProps?: Partial<ICalloutProps>;\n\n /**\n * props for the svg; use this to include aria-* or other attributes on the tag\n */\n svgProps?: React.SVGProps<SVGSVGElement>;\n}\n\nexport interface IYValueHover {\n legend?: string;\n y?: number;\n color?: string;\n data?: string | number;\n shouldDrawBorderBottom?: boolean;\n yAxisCalloutData?: string | { [id: string]: number };\n index?: number;\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\nexport interface IChildProps {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScale?: any;\n containerHeight?: number;\n containerWidth?: number;\n}\n\n// Only used for Cartesian chart base\nexport interface IModifiedCartesianChartProps extends ICartesianChartProps {\n /**\n * Define the chart title\n */\n chartTitle?: string;\n\n /**\n * Only used for Area chart\n * Value used to draw y axis of that chart.\n */\n maxOfYVal?: number;\n\n /**\n * Data of the chart\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n points: any;\n\n /**\n * Define type of the chart\n */\n chartType: ChartTypes;\n\n /** X axis type */\n xAxisType: XAxisTypes;\n\n /** Y axis type */\n yAxisType?: YAxisType;\n\n /**\n * Legends of the chart.\n */\n legendBars: JSX.Element;\n\n /**\n * Callout props\n */\n calloutProps: Partial<ICalloutProps> & {\n isCalloutVisible: boolean;\n id: string;\n YValueHover?: IYValueHover[];\n hoverXValue?: string | number | null;\n legend?: string;\n color?: string;\n YValue?: string | number;\n XValue?: string;\n descriptionMessage?: string;\n };\n\n /**\n * Callback method used for to get margins to the chart.\n */\n getmargins?: (margins: IMargins) => void;\n\n /**\n * This is a call back method to the chart from cartesian chart.\n * params are xScale, yScale, containerHeight, containerWidth. These values were used to draw the graph.\n * It also contians an optional param xAxisElement - defines as x axis scale element.\n * This param used to enable feature word wrap of Xaxis.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getGraphData?: any;\n\n /**\n * Used for bar chart graphs.\n * To define width of the bar\n */\n barwidth?: number;\n\n /**\n * Used for tick styles of the x axis of the chart\n * Tick params are applicable for date axis only.\n */\n tickParams?: {\n tickValues?: number[] | Date[];\n tickFormat?: string;\n };\n\n /**\n * it's padding between bar's or lines in the graph\n */\n xAxisPadding?: number;\n\n /**\n * it's padding between bar's or lines in the graph\n */\n yAxisPadding?: number;\n\n /**\n * Children elements specific to derived chart types.\n */\n children(props: IChildProps): React.ReactNode;\n\n /**\n * To enable callout for individualbar or complete stack. Using for only Vertical stacked bar chart.\n * @default false\n * @type {boolean}\n */\n isCalloutForStack?: boolean;\n\n /** dataset values to find out domain of the String axis\n * Present using for only vertical stacked bar chart and grouped vertical bar chart\n */\n datasetForXAxisDomain?: string[];\n\n /** Own callout design */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n customizedCallout?: any;\n\n /**\n * if the data points for the y-axis is of type string, then we need to give this\n * prop to construct the y-axis\n */\n stringDatasetForYAxisDomain?: string[];\n\n /**\n * Focus zone direction to the chart\n * @default FocusZoneDirection.horizontal\n */\n focusZoneDirection?: FocusZoneDirection;\n\n /**\n * props to send into the chart hover card\n */\n chartHoverProps?: IChartHoverCardProps;\n\n /**\n * props to send to the focuszone\n */\n svgFocusZoneProps?: IFocusZoneProps;\n\n /**\n * The prop used to define the culture to localize the numbers and date\n */\n culture?: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getAxisData?: any;\n\n /**\n * Callback method used when mouse leaves the chart boundary.\n */\n onChartMouseLeave?: () => void;\n\n /** Callback method to get extra margins for domain */\n getDomainMargins?: (containerWidth: number) => IMargins;\n\n /** Padding between each bar/line-point */\n xAxisInnerPadding?: number;\n\n /** Padding before first bar/line-point and after last bar/line-point */\n xAxisOuterPadding?: number;\n\n /**\n *@default false\n *Used for to elipse y axis labes and show tooltip on x axis labels\n */\n showYAxisLablesTooltip?: boolean;\n\n /**\n *@default false\n *Used for showing complete y axis lables */\n showYAxisLables?: boolean;\n}\n"]}
1
+ {"version":3,"file":"CartesianChart.types.js","sourceRoot":"../src/","sources":["components/CommonComponents/CartesianChart.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\nimport { ITheme, IStyle } from '@fluentui/react/lib/Styling';\nimport { IOverflowSetProps } from '@fluentui/react/lib/OverflowSet';\nimport { IFocusZoneProps, FocusZoneDirection } from '@fluentui/react-focus';\nimport { ICalloutProps } from '@fluentui/react/lib/Callout';\nimport { ILegendsProps } from '../Legends/index';\nimport { IAccessibilityProps, IMargins } from '../../types/index';\nimport { ChartTypes, IChartHoverCardProps, XAxisTypes, YAxisType } from '../../utilities/index';\nimport * as d3TimeFormat from 'd3-time-format';\n\nexport interface ICartesianChartStyleProps {\n /**\n * Theme (provided through customization.)\n */\n theme: ITheme;\n\n /**\n * Additional CSS class(es) to apply to the Chart.\n */\n className?: string;\n\n /**\n * Width of the chart.\n */\n width?: number;\n\n /**\n * Height of the chart.\n */\n height?: number;\n\n /**\n * Color of the chart.\n */\n color?: string;\n\n /**\n * Link to redirect if click action for graph\n */\n href?: string;\n\n /**\n * prop to check if the chart is selected or hovered upon to determine opacity\n */\n shouldHighlight?: boolean;\n\n /**\n * prop to check if the Page is in Rtl\n */\n isRtl?: boolean;\n\n /**\n * color of the line\n */\n lineColor?: string;\n\n /**\n * boolean flag which determines if shape is drawn in callout\n */\n toDrawShape?: boolean;\n}\n\nexport interface ICartesianChartStyles {\n /**\n * Style for the root element.\n */\n root?: IStyle;\n\n /**\n * Style for the element containing the x-axis.\n */\n xAxis?: IStyle;\n\n /**\n * Style for the element containing the y-axis.\n */\n yAxis?: IStyle;\n\n /**\n * Style for legend container\n */\n legendContainer?: IStyle;\n\n /**\n * line hover box css\n */\n hover?: IStyle;\n\n /**\n * styles for callout root-content\n */\n calloutContentRoot?: IStyle;\n\n /**\n * styles for callout x-content\n */\n calloutContentX?: IStyle;\n\n /**\n * styles for callout y-content\n */\n calloutContentY?: IStyle;\n\n /**\n * styles for description message\n */\n descriptionMessage?: IStyle;\n\n /**\n * styles for callout Date time container\n */\n calloutDateTimeContainer?: IStyle;\n\n /**\n * styles for callout info container\n */\n calloutInfoContainer?: IStyle;\n\n /**\n * styles for callout block container\n */\n calloutBlockContainer?: IStyle;\n\n /**\n * styles for callout legend text\n */\n calloutlegendText?: IStyle;\n\n /**\n * styles for tooltip\n */\n tooltip?: IStyle;\n\n /**\n * Style for the chart Title.\n */\n chartTitle?: IStyle;\n\n /**\n * Style to change the opacity of bars in dataviz when we hover on a single bar or legends\n */\n opacityChangeOnHover?: IStyle;\n\n /**\n * styles for the shape object in the callout\n */\n shapeStyles?: IStyle;\n}\n\nexport interface ICartesianChartProps {\n /**\n * Below height used for resizing of the chart\n * Wrap chart in your container and send the updated height and width to these props.\n * These values decide wheather chart re render or not. Please check examples for reference\n */\n height?: number;\n\n /**\n * Below width used for resizing of the chart\n * Wrap chart in your container and send the updated height and width to these props.\n * These values decide wheather chart re render or not. Please check examples for reference\n */\n width?: number;\n\n /**\n * this prop takes its parent as a HTML element to define the width and height of the chart\n */\n parentRef?: HTMLElement | null;\n\n /**\n * Additional CSS class(es) to apply to the Chart.\n */\n className?: string;\n\n /**\n * Theme (provided through customization.)\n */\n theme?: ITheme;\n\n /**\n * Margins for the chart\n * @default `{ top: 20, bottom: 35, left: 40, right: 20 }`\n * To avoid edge cuttings to the chart, we recommend you use default values or greater then default values\n */\n margins?: IMargins;\n\n /** decides wether to show/hide legends\n * @defaultvalue false\n */\n hideLegend?: boolean;\n\n /**\n * Do not show tooltips in chart\n * @default false\n */\n hideTooltip?: boolean;\n\n /**\n * this prop takes values that you want the chart to render on x-axis\n * This is a optional parameter if not specified D3 will decide which values appear on the x-axis for you\n * Please look at https://github.com/d3/d3-scale for more information on how D3 decides what data to appear on the axis of chart\n */\n tickValues?: number[] | Date[];\n\n /**\n * the format for the data on x-axis. For date object this can be specified to your requirement. Eg: '%m/%d', '%d'\n * Please look at https://github.com/d3/d3-time-format for all the formats supported for date axis\n * Only applicable for date axis. For y-axis format use yAxisTickFormat prop.\n */\n tickFormat?: string;\n\n /**\n * Width of line stroke\n */\n strokeWidth?: number;\n\n /**\n * x Axis labels tick padding. This defines the gap between tick labels and tick lines.\n * @default 10\n */\n xAxisTickPadding?: number;\n\n /**\n * the format in for the data on y-axis. For data object this can be specified to your requirement.\n * Eg: d3.format(\".0%\")(0.123),d3.format(\"+20\")(42);\n * Please look at https://github.com/d3/d3-format for all the formats supported\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yAxisTickFormat?: any;\n\n /**\n * Secondary y-scale options\n * By default this is not defined, meaning there will be no secondary y-scale.\n */\n secondaryYScaleOptions?: {\n /** Minimum value (0 by default) */\n yMinValue?: number;\n /** Maximum value (100 by default) */\n yMaxValue?: number;\n };\n\n /**\n * minimum data value point in y-axis\n */\n yMinValue?: number;\n\n /**\n * maximum data value point in y-axis\n */\n yMaxValue?: number;\n\n /**\n * maximum data value point in x-axis\n */\n xMaxValue?: number;\n\n /**\n * Number of ticks on the y-axis.\n * Tick count should be factor of difference between (yMinValue, yMaxValue)?\n * @default 4\n */\n yAxisTickCount?: number;\n\n /**\n * defines the number of ticks on the x-axis. Tries to match the nearest interval satisfying the count.\n * Does not work for string axis.\n * @default 6\n */\n xAxisTickCount?: number;\n\n /**\n * define the size of the tick lines on the x-axis\n * @default 10\n */\n xAxistickSize?: number;\n\n /**\n * defines the space between the tick line and the data label\n * @default 10\n */\n tickPadding?: number;\n\n /**\n * Url that the data-viz needs to redirect to upon clicking on it\n */\n href?: string;\n\n /**\n * Label to apply to the whole chart.\n * @deprecated - Use your chart label for the chart.\n */\n chartLabel?: string;\n\n /**\n * overflow props for the legends\n */\n legendsOverflowProps?: Partial<IOverflowSetProps>;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n legendsOverflowText?: any;\n\n /**\n * focus zone props in hover card for legends\n */\n focusZonePropsForLegendsInHoverCard?: IFocusZoneProps;\n\n /**\n * Enable the legends to wrap lines if there is not enough space to show all legends on a single line\n */\n enabledLegendsWrapLines?: boolean;\n\n /*\n * props for the legends in the chart\n */\n legendProps?: Partial<ILegendsProps>;\n\n /**\n *@default false\n *Used for to elipse x axis labes and show tooltip on x axis labels\n */\n showXAxisLablesTooltip?: boolean;\n\n /**\n * @default 4\n * Used for X axis labels\n * While Giving showXAxisLablesTooltip prop, need to define after how many chars, we need to truncate the word.\n */\n noOfCharsToTruncate?: number;\n\n /**\n * @default false\n * Used to wrap x axis labels values (whole value)\n */\n wrapXAxisLables?: boolean;\n\n /**\n * @default false\n * Used to rotate x axis labels by 45 degrees\n */\n rotateXAxisLables?: boolean;\n\n /**\n * The prop used to define the date time localization options\n */\n dateLocalizeOptions?: Intl.DateTimeFormatOptions;\n\n /**\n * The prop used to define a custom locale for the date time format.\n */\n timeFormatLocale?: d3TimeFormat.TimeLocaleDefinition;\n\n /**\n * The prop used to define a custom datetime formatter for date axis.\n */\n customDateTimeFormatter?: (dateTime: Date) => string;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<ICartesianChartStyleProps, ICartesianChartStyles>;\n\n /**\n * Callout customization props\n */\n calloutProps?: Partial<ICalloutProps>;\n\n /**\n * props for the svg; use this to include aria-* or other attributes on the tag\n */\n svgProps?: React.SVGProps<SVGSVGElement>;\n}\n\nexport interface IYValueHover {\n legend?: string;\n y?: number;\n color?: string;\n data?: string | number;\n shouldDrawBorderBottom?: boolean;\n yAxisCalloutData?: string | { [id: string]: number };\n index?: number;\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\nexport interface IChildProps {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScale?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScaleSecondary?: any;\n containerHeight?: number;\n containerWidth?: number;\n}\n\n// Only used for Cartesian chart base\nexport interface IModifiedCartesianChartProps extends ICartesianChartProps {\n /**\n * Define the chart title\n */\n chartTitle?: string;\n\n /**\n * Only used for Area chart\n * Value used to draw y axis of that chart.\n */\n maxOfYVal?: number;\n\n /**\n * Data of the chart\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n points: any;\n\n /**\n * Define type of the chart\n */\n chartType: ChartTypes;\n\n /** X axis type */\n xAxisType: XAxisTypes;\n\n /** Y axis type */\n yAxisType?: YAxisType;\n\n /**\n * Legends of the chart.\n */\n legendBars: JSX.Element;\n\n /**\n * Callout props\n */\n calloutProps: Partial<ICalloutProps> & {\n isCalloutVisible: boolean;\n id: string;\n YValueHover?: IYValueHover[];\n hoverXValue?: string | number | null;\n legend?: string;\n color?: string;\n YValue?: string | number;\n XValue?: string;\n descriptionMessage?: string;\n };\n\n /**\n * Callback method used for to get margins to the chart.\n */\n getmargins?: (margins: IMargins) => void;\n\n /**\n * This is a call back method to the chart from cartesian chart.\n * params are xScale, yScale, containerHeight, containerWidth. These values were used to draw the graph.\n * It also contians an optional param xAxisElement - defines as x axis scale element.\n * This param used to enable feature word wrap of Xaxis.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getGraphData?: any;\n\n /**\n * Used for bar chart graphs.\n * To define width of the bar\n */\n barwidth?: number;\n\n /**\n * Used for tick styles of the x axis of the chart\n * Tick params are applicable for date axis only.\n */\n tickParams?: {\n tickValues?: number[] | Date[];\n tickFormat?: string;\n };\n\n /**\n * it's padding between bar's or lines in the graph\n */\n xAxisPadding?: number;\n\n /**\n * it's padding between bar's or lines in the graph\n */\n yAxisPadding?: number;\n\n /**\n * Children elements specific to derived chart types.\n */\n children(props: IChildProps): React.ReactNode;\n\n /**\n * To enable callout for individualbar or complete stack. Using for only Vertical stacked bar chart.\n * @default false\n * @type {boolean}\n */\n isCalloutForStack?: boolean;\n\n /** dataset values to find out domain of the String axis\n * Present using for only vertical stacked bar chart and grouped vertical bar chart\n */\n datasetForXAxisDomain?: string[];\n\n /** Own callout design */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n customizedCallout?: any;\n\n /**\n * if the data points for the y-axis is of type string, then we need to give this\n * prop to construct the y-axis\n */\n stringDatasetForYAxisDomain?: string[];\n\n /**\n * Focus zone direction to the chart\n * @default FocusZoneDirection.horizontal\n */\n focusZoneDirection?: FocusZoneDirection;\n\n /**\n * props to send into the chart hover card\n */\n chartHoverProps?: IChartHoverCardProps;\n\n /**\n * props to send to the focuszone\n */\n svgFocusZoneProps?: IFocusZoneProps;\n\n /**\n * The prop used to define the culture to localize the numbers and date\n */\n culture?: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getAxisData?: any;\n\n /**\n * Callback method used when mouse leaves the chart boundary.\n */\n onChartMouseLeave?: () => void;\n\n /** Callback method to get extra margins for domain */\n getDomainMargins?: (containerWidth: number) => IMargins;\n\n /** Padding between each bar/line-point */\n xAxisInnerPadding?: number;\n\n /** Padding before first bar/line-point and after last bar/line-point */\n xAxisOuterPadding?: number;\n\n /**\n *@default false\n *Used for to elipse y axis labes and show tooltip on x axis labels\n */\n showYAxisLablesTooltip?: boolean;\n\n /**\n *@default false\n *Used for showing complete y axis lables */\n showYAxisLables?: boolean;\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  define(["require", "exports", "tslib", "./CartesianChart", "./CartesianChart.types"], function (require, exports, tslib_1, CartesianChart_1, CartesianChart_types_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(CartesianChart_1, exports);
5
- tslib_1.__exportStar(CartesianChart_types_1, exports);
4
+ (0, tslib_1.__exportStar)(CartesianChart_1, exports);
5
+ (0, tslib_1.__exportStar)(CartesianChart_types_1, exports);
6
6
  });
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/CommonComponents/index.ts"],"names":[],"mappings":";;;IAAA,gDAAiC;IACjC,sDAAuC","sourcesContent":["export * from './CartesianChart';\nexport * from './CartesianChart.types';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/CommonComponents/index.ts"],"names":[],"mappings":";;;IAAA,qDAAiC;IACjC,2DAAuC","sourcesContent":["export * from './CartesianChart';\nexport * from './CartesianChart.types';\n"]}
@@ -3,12 +3,12 @@ define(["require", "exports", "tslib", "react", "d3-shape", "@fluentui/react/lib
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Arc = void 0;
5
5
  var Arc = /** @class */ (function (_super) {
6
- tslib_1.__extends(Arc, _super);
6
+ (0, tslib_1.__extends)(Arc, _super);
7
7
  function Arc() {
8
8
  var _this = _super !== null && _super.apply(this, arguments) || this;
9
9
  _this.state = {};
10
10
  _this.currentRef = React.createRef();
11
- _this._isRTL = Utilities_1.getRTL();
11
+ _this._isRTL = (0, Utilities_1.getRTL)();
12
12
  _this._hoverOff = function () {
13
13
  _this.props.hoverLeaveCallback();
14
14
  };
@@ -20,7 +20,7 @@ define(["require", "exports", "tslib", "react", "d3-shape", "@fluentui/react/lib
20
20
  var point = _this.props.data.data;
21
21
  var legend = point.xAxisCalloutData || point.legend;
22
22
  var yValue = point.yAxisCalloutData || point.data || 0;
23
- return ((_a = point.callOutAccessibilityData) === null || _a === void 0 ? void 0 : _a.ariaLabel) || (legend ? legend + ", " : '') + (yValue + ".");
23
+ return ((_a = point.callOutAccessibilityData) === null || _a === void 0 ? void 0 : _a.ariaLabel) || (legend ? "".concat(legend, ", ") : '') + "".concat(yValue, ".");
24
24
  };
25
25
  _this._renderArcLabel = function (className) {
26
26
  var _a = _this.props, arc = _a.arc, data = _a.data, innerRadius = _a.innerRadius, outerRadius = _a.outerRadius, showLabelsInPercent = _a.showLabelsInPercent, totalValue = _a.totalValue, hideLabels = _a.hideLabels;
@@ -33,8 +33,8 @@ define(["require", "exports", "tslib", "react", "d3-shape", "@fluentui/react/lib
33
33
  var angle = (data.startAngle + data.endAngle) / 2;
34
34
  var arcValue = data.value;
35
35
  return (React.createElement("text", { x: (hyp === 0 ? 0 : base / hyp) * labelRadius, y: (hyp === 0 ? 0 : perp / hyp) * labelRadius, textAnchor: angle > Math.PI !== _this._isRTL ? 'end' : 'start', dominantBaseline: angle > Math.PI / 2 && angle < (3 * Math.PI) / 2 ? 'hanging' : 'auto', className: className, "aria-hidden": true }, showLabelsInPercent
36
- ? d3_format_1.format('.0%')(totalValue === 0 ? 0 : arcValue / totalValue)
37
- : d3_format_1.formatPrefix(arcValue < 1000 ? '.2~' : '.1', arcValue)(arcValue)));
36
+ ? (0, d3_format_1.format)('.0%')(totalValue === 0 ? 0 : arcValue / totalValue)
37
+ : (0, d3_format_1.formatPrefix)(arcValue < 1000 ? '.2~' : '.1', arcValue)(arcValue)));
38
38
  };
39
39
  return _this;
40
40
  }
@@ -48,7 +48,7 @@ define(["require", "exports", "tslib", "react", "d3-shape", "@fluentui/react/lib
48
48
  Arc.prototype.render = function () {
49
49
  var _a;
50
50
  var _b = this.props, arc = _b.arc, href = _b.href, focusedArcId = _b.focusedArcId;
51
- var getClassNames = Utilities_1.classNamesFunction();
51
+ var getClassNames = (0, Utilities_1.classNamesFunction)();
52
52
  var classNames = getClassNames(Arc_styles_1.getStyles, {
53
53
  color: this.props.color,
54
54
  href: href,
@@ -1 +1 @@
1
- {"version":3,"file":"Arc.js","sourceRoot":"../src/","sources":["components/DonutChart/Arc/Arc.tsx"],"names":[],"mappings":";;;;IAYA;QAAyB,+BAAqC;QAA9D;YAAA,qEA+GC;YA1GQ,WAAK,GAAO,EAAE,CAAC;YAEd,gBAAU,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAC;YAC/C,YAAM,GAAY,kBAAM,EAAE,CAAC;YAwD3B,eAAS,GAAG;gBAClB,KAAI,CAAC,KAAK,CAAC,kBAAmB,EAAE,CAAC;YACnC,CAAC,CAAC;YAEM,aAAO,GAAG;gBAChB,KAAI,CAAC,KAAK,CAAC,cAAe,EAAE,CAAC;YAC/B,CAAC,CAAC;YAMM,mBAAa,GAAG;;gBACtB,IAAM,KAAK,GAAG,KAAI,CAAC,KAAK,CAAC,IAAK,CAAC,IAAI,CAAC;gBACpC,IAAM,MAAM,GAAG,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,MAAM,CAAC;gBACtD,IAAM,MAAM,GAAG,KAA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AW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAC/C,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACjD,CAAC","sourcesContent":["import * as React from 'react';\nimport * as shape from 'd3-shape';\nimport { classNamesFunction, getRTL } from '@fluentui/react/lib/Utilities';\nimport { getStyles } from './Arc.styles';\nimport { IChartDataPoint } from '../index';\nimport { IArcProps, IArcStyles } from './index';\nimport { format as d3Format, formatPrefix as d3FormatPrefix } from 'd3-format';\n\nexport interface IArcState {\n isCalloutVisible?: boolean;\n}\n\nexport class Arc extends React.Component<IArcProps, IArcState> {\n public static defaultProps: Partial<IArcProps> = {\n arc: shape.arc(),\n };\n\n public state: {} = {};\n\n private currentRef = React.createRef<SVGPathElement>();\n private _isRTL: boolean = getRTL();\n\n public static getDerivedStateFromProps(nextProps: Readonly<IArcProps>): Partial<IArcState> | null {\n _updateChart(nextProps);\n return null;\n }\n\n public updateChart(newProps: IArcProps): void {\n _updateChart(newProps);\n }\n\n public render(): JSX.Element {\n const { arc, href, focusedArcId } = this.props;\n const getClassNames = classNamesFunction<IArcProps, IArcStyles>();\n const classNames = getClassNames(getStyles, {\n color: this.props.color,\n href: href!,\n theme: this.props.theme!,\n });\n const id = this.props.uniqText! + this.props.data!.data.legend!.replace(/\\s+/, '') + this.props.data!.data.data;\n const opacity: number =\n this.props.activeArc === this.props.data!.data.legend || this.props.activeArc === '' ? 1 : 0.1;\n return (\n <g ref={this.currentRef}>\n {!!focusedArcId && focusedArcId === id && (\n <path id={id + 'focusRing'} d={arc(this.props.focusData)} className={classNames.focusRing} />\n )}\n <path\n id={id}\n d={arc(this.props.data)}\n onFocus={this._onFocus.bind(this, this.props.data!.data, id)}\n className={classNames.root}\n data-is-focusable={true}\n onMouseOver={this._hoverOn.bind(this, this.props.data!.data)}\n onMouseMove={this._hoverOn.bind(this, this.props.data!.data)}\n onMouseLeave={this._hoverOff}\n onBlur={this._onBlur}\n opacity={opacity}\n onClick={href ? this._redirectToUrl.bind(this, href) : this.props.data?.data.onClick}\n aria-label={this._getAriaLabel()}\n role=\"img\"\n />\n {this._renderArcLabel(classNames.arcLabel)}\n </g>\n );\n }\n\n private _onFocus(data: IChartDataPoint, id: string): void {\n this.props.onFocusCallback!(data, id, this.currentRef.current);\n }\n\n private _hoverOn(data: IChartDataPoint, mouseEvent: React.MouseEvent<SVGPathElement>): void {\n mouseEvent.persist();\n this.props.hoverOnCallback!(data, mouseEvent);\n }\n\n private _hoverOff = (): void => {\n this.props.hoverLeaveCallback!();\n };\n\n private _onBlur = (): void => {\n this.props.onBlurCallback!();\n };\n\n private _redirectToUrl(href: string | undefined): void {\n href ? (window.location.href = href) : '';\n }\n\n private _getAriaLabel = (): string => {\n const point = this.props.data!.data;\n const legend = point.xAxisCalloutData || point.legend;\n const yValue = point.yAxisCalloutData || point.data || 0;\n return point.callOutAccessibilityData?.ariaLabel || (legend ? `${legend}, ` : '') + `${yValue}.`;\n };\n\n private _renderArcLabel = (className: string) => {\n const { arc, data, innerRadius, outerRadius, showLabelsInPercent, totalValue, hideLabels } = this.props;\n\n if (hideLabels || Math.abs(data!.endAngle - data!.startAngle) < Math.PI / 12) {\n return null;\n }\n\n const [base, perp] = arc.centroid(data);\n const hyp = Math.sqrt(base * base + perp * perp);\n const labelRadius = Math.max(innerRadius!, outerRadius!) + 2;\n const angle = (data!.startAngle + data!.endAngle) / 2;\n const arcValue = data!.value;\n\n return (\n <text\n x={(hyp === 0 ? 0 : base / hyp) * labelRadius}\n y={(hyp === 0 ? 0 : perp / hyp) * labelRadius}\n textAnchor={angle > Math.PI !== this._isRTL ? 'end' : 'start'}\n dominantBaseline={angle > Math.PI / 2 && angle < (3 * Math.PI) / 2 ? 'hanging' : 'auto'}\n className={className}\n aria-hidden={true}\n >\n {showLabelsInPercent\n ? d3Format('.0%')(totalValue! === 0 ? 0 : arcValue / totalValue!)\n : d3FormatPrefix(arcValue < 1000 ? '.2~' : '.1', arcValue)(arcValue)}\n </text>\n );\n };\n}\n\nfunction _updateChart(newProps: IArcProps): void {\n newProps.arc.innerRadius(newProps.innerRadius);\n newProps.arc.outerRadius(newProps.outerRadius);\n}\n"]}
1
+ {"version":3,"file":"Arc.js","sourceRoot":"../src/","sources":["components/DonutChart/Arc/Arc.tsx"],"names":[],"mappings":";;;;IAYA;QAAyB,oCAAqC;QAA9D;YAAA,qEA+GC;YA1GQ,WAAK,GAAO,EAAE,CAAC;YAEd,gBAAU,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAC;YAC/C,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;YAwD3B,eAAS,GAAG;gBAClB,KAAI,CAAC,KAAK,CAAC,kBAAmB,EAAE,CAAC;YACnC,CAAC,CAAC;YAEM,aAAO,GAAG;gBAChB,KAAI,CAAC,KAAK,CAAC,cAAe,EAAE,CAAC;YAC/B,CAAC,CAAC;YAMM,mBAAa,GAAG;;gBACtB,IAAM,KAAK,GAAG,KAAI,CAAC,KAAK,CAAC,IAAK,CAAC,IAAI,CAAC;gBACpC,IAAM,MAAM,GAAG,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,MAAM,CAAC;gBACtD,IAAM,MAAM,GAAG,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC;gBACzD,OAAO,CAAA,MAAA,KAAK,CAAC,wBAAwB,0CAAE,SAAS,KAAI,CAAC,MAAM,CAAC,CAAC,CAAC,UAAG,MAAM,OAAI,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,UAAG,MAAM,MAAG,CAAC;YACnG,CAAC,CAAC;YAEM,qBAAe,GAAG,UAAC,SAAiB;gBACpC,IAAA,KAAuF,KAAI,CAAC,KAAK,EAA/F,GAAG,SAAA,EAAE,IAAI,UAAA,EAAE,WAAW,iBAAA,EAAE,WAAW,iBAAA,EAAE,mBAAmB,yBAAA,EAAE,UAAU,gBAAA,EAAE,UAAU,gBAAe,CAAC;gBAExG,IAAI,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UAAU,CAAC,QAAQ,CAAC,CACxC,CACL,CAAC;QACJ,CAAC;QAEO,sBAAQ,GAAhB,UAAiB,IAAqB,EAAE,EAAU;YAChD,IAAI,CAAC,KAAK,CAAC,eAAgB,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QACjE,CAAC;QAEO,sBAAQ,GAAhB,UAAiB,IAAqB,EAAE,UAA4C;YAClF,UAAU,CAAC,OAAO,EAAE,CAAC;YACrB,IAAI,CAAC,KAAK,CAAC,eAAgB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAChD,CAAC;QAUO,4BAAc,GAAtB,UAAuB,IAAwB;YAC7C,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5C,CAAC;QAzEa,gBAAY,GAAuB;YAC/C,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE;SACjB,CAAC;QA4GJ,UAAC;KAAA,AA/GD,CAAyB,KAAK,CAAC,SAAS,GA+GvC;IA/GY,kBAAG;IAiHhB,SAAS,YAAY,CAAC,QAAmB;QACvC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAC/C,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACjD,CAAC","sourcesContent":["import * as React from 'react';\nimport * as shape from 'd3-shape';\nimport { classNamesFunction, getRTL } from '@fluentui/react/lib/Utilities';\nimport { getStyles } from './Arc.styles';\nimport { IChartDataPoint } from '../index';\nimport { IArcProps, IArcStyles } from './index';\nimport { format as d3Format, formatPrefix as d3FormatPrefix } from 'd3-format';\n\nexport interface IArcState {\n isCalloutVisible?: boolean;\n}\n\nexport class Arc extends React.Component<IArcProps, IArcState> {\n public static defaultProps: Partial<IArcProps> = {\n arc: shape.arc(),\n };\n\n public state: {} = {};\n\n private currentRef = React.createRef<SVGPathElement>();\n private _isRTL: boolean = getRTL();\n\n public static getDerivedStateFromProps(nextProps: Readonly<IArcProps>): Partial<IArcState> | null {\n _updateChart(nextProps);\n return null;\n }\n\n public updateChart(newProps: IArcProps): void {\n _updateChart(newProps);\n }\n\n public render(): JSX.Element {\n const { arc, href, focusedArcId } = this.props;\n const getClassNames = classNamesFunction<IArcProps, IArcStyles>();\n const classNames = getClassNames(getStyles, {\n color: this.props.color,\n href: href!,\n theme: this.props.theme!,\n });\n const id = this.props.uniqText! + this.props.data!.data.legend!.replace(/\\s+/, '') + this.props.data!.data.data;\n const opacity: number =\n this.props.activeArc === this.props.data!.data.legend || this.props.activeArc === '' ? 1 : 0.1;\n return (\n <g ref={this.currentRef}>\n {!!focusedArcId && focusedArcId === id && (\n <path id={id + 'focusRing'} d={arc(this.props.focusData)} className={classNames.focusRing} />\n )}\n <path\n id={id}\n d={arc(this.props.data)}\n onFocus={this._onFocus.bind(this, this.props.data!.data, id)}\n className={classNames.root}\n data-is-focusable={true}\n onMouseOver={this._hoverOn.bind(this, this.props.data!.data)}\n onMouseMove={this._hoverOn.bind(this, this.props.data!.data)}\n onMouseLeave={this._hoverOff}\n onBlur={this._onBlur}\n opacity={opacity}\n onClick={href ? this._redirectToUrl.bind(this, href) : this.props.data?.data.onClick}\n aria-label={this._getAriaLabel()}\n role=\"img\"\n />\n {this._renderArcLabel(classNames.arcLabel)}\n </g>\n );\n }\n\n private _onFocus(data: IChartDataPoint, id: string): void {\n this.props.onFocusCallback!(data, id, this.currentRef.current);\n }\n\n private _hoverOn(data: IChartDataPoint, mouseEvent: React.MouseEvent<SVGPathElement>): void {\n mouseEvent.persist();\n this.props.hoverOnCallback!(data, mouseEvent);\n }\n\n private _hoverOff = (): void => {\n this.props.hoverLeaveCallback!();\n };\n\n private _onBlur = (): void => {\n this.props.onBlurCallback!();\n };\n\n private _redirectToUrl(href: string | undefined): void {\n href ? (window.location.href = href) : '';\n }\n\n private _getAriaLabel = (): string => {\n const point = this.props.data!.data;\n const legend = point.xAxisCalloutData || point.legend;\n const yValue = point.yAxisCalloutData || point.data || 0;\n return point.callOutAccessibilityData?.ariaLabel || (legend ? `${legend}, ` : '') + `${yValue}.`;\n };\n\n private _renderArcLabel = (className: string) => {\n const { arc, data, innerRadius, outerRadius, showLabelsInPercent, totalValue, hideLabels } = this.props;\n\n if (hideLabels || Math.abs(data!.endAngle - data!.startAngle) < Math.PI / 12) {\n return null;\n }\n\n const [base, perp] = arc.centroid(data);\n const hyp = Math.sqrt(base * base + perp * perp);\n const labelRadius = Math.max(innerRadius!, outerRadius!) + 2;\n const angle = (data!.startAngle + data!.endAngle) / 2;\n const arcValue = data!.value;\n\n return (\n <text\n x={(hyp === 0 ? 0 : base / hyp) * labelRadius}\n y={(hyp === 0 ? 0 : perp / hyp) * labelRadius}\n textAnchor={angle > Math.PI !== this._isRTL ? 'end' : 'start'}\n dominantBaseline={angle > Math.PI / 2 && angle < (3 * Math.PI) / 2 ? 'hanging' : 'auto'}\n className={className}\n aria-hidden={true}\n >\n {showLabelsInPercent\n ? d3Format('.0%')(totalValue! === 0 ? 0 : arcValue / totalValue!)\n : d3FormatPrefix(arcValue < 1000 ? '.2~' : '.1', arcValue)(arcValue)}\n </text>\n );\n };\n}\n\nfunction _updateChart(newProps: IArcProps): void {\n newProps.arc.innerRadius(newProps.innerRadius);\n newProps.arc.outerRadius(newProps.outerRadius);\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  define(["require", "exports", "tslib", "./Arc", "./Arc.types"], function (require, exports, tslib_1, Arc_1, Arc_types_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(Arc_1, exports);
5
- tslib_1.__exportStar(Arc_types_1, exports);
4
+ (0, tslib_1.__exportStar)(Arc_1, exports);
5
+ (0, tslib_1.__exportStar)(Arc_types_1, exports);
6
6
  });
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/DonutChart/Arc/index.ts"],"names":[],"mappings":";;;IAAA,qCAAsB;IACtB,2CAA4B","sourcesContent":["export * from './Arc';\nexport * from './Arc.types';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/DonutChart/Arc/index.ts"],"names":[],"mappings":";;;IAAA,0CAAsB;IACtB,gDAA4B","sourcesContent":["export * from './Arc';\nexport * from './Arc.types';\n"]}
@@ -2,10 +2,10 @@ define(["require", "exports", "tslib", "react", "@fluentui/react/lib/Utilities",
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.DonutChartBase = void 0;
5
- var getClassNames = Utilities_1.classNamesFunction();
5
+ var getClassNames = (0, Utilities_1.classNamesFunction)();
6
6
  var LEGEND_CONTAINER_HEIGHT = 40;
7
7
  var DonutChartBase = /** @class */ (function (_super) {
8
- tslib_1.__extends(DonutChartBase, _super);
8
+ (0, tslib_1.__extends)(DonutChartBase, _super);
9
9
  function DonutChartBase(props) {
10
10
  var _this = _super.call(this, props) || this;
11
11
  _this._closeCallout = function () {
@@ -68,8 +68,8 @@ define(["require", "exports", "tslib", "react", "@fluentui/react/lib/Utilities",
68
68
  _this._hoverCallback = _this._hoverCallback.bind(_this);
69
69
  _this._focusCallback = _this._focusCallback.bind(_this);
70
70
  _this._hoverLeave = _this._hoverLeave.bind(_this);
71
- _this._calloutId = Utilities_1.getId('callout');
72
- _this._uniqText = Utilities_1.getId('_Pie_');
71
+ _this._calloutId = (0, Utilities_1.getId)('callout');
72
+ _this._uniqText = (0, Utilities_1.getId)('_Pie_');
73
73
  return _this;
74
74
  }
75
75
  DonutChartBase.getDerivedStateFromProps = function (nextProps, prevState) {
@@ -81,7 +81,7 @@ define(["require", "exports", "tslib", "react", "@fluentui/react/lib/Utilities",
81
81
  if (nextProps.height && nextProps.height !== prevState._height) {
82
82
  heightState = { _height: nextProps.height - LEGEND_CONTAINER_HEIGHT };
83
83
  }
84
- return tslib_1.__assign(tslib_1.__assign({}, widthState), heightState);
84
+ return (0, tslib_1.__assign)((0, tslib_1.__assign)({}, widthState), heightState);
85
85
  };
86
86
  DonutChartBase.prototype.componentDidMount = function () {
87
87
  if (this._rootElem) {
@@ -114,9 +114,9 @@ define(["require", "exports", "tslib", "react", "@fluentui/react/lib/Utilities",
114
114
  React.createElement("div", null,
115
115
  React.createElement("svg", { className: this._classNames.chart, "aria-label": data === null || data === void 0 ? void 0 : data.chartTitle, ref: function (node) { return _this._setViewBox(node); } },
116
116
  React.createElement(index_2.Pie, { width: this.state._width, height: this.state._height, outerRadius: outerRadius, innerRadius: this.props.innerRadius, data: chartData, onFocusCallback: this._focusCallback, hoverOnCallback: this._hoverCallback, hoverLeaveCallback: this._hoverLeave, uniqText: this._uniqText, onBlurCallback: this._onBlur, activeArc: this._getHighlightedLegend(), focusedArcId: this.state.focusedArcId || '', href: this.props.href, calloutId: this._calloutId, valueInsideDonut: this._toLocaleString(valueInsideDonut), theme: this.props.theme, showLabelsInPercent: this.props.showLabelsInPercent, hideLabels: this.props.hideLabels })))),
117
- React.createElement(Callout_1.Callout, tslib_1.__assign({ target: this._currentHoverElement, alignTargetEdge: true, isBeakVisible: false, directionalHint: Callout_1.DirectionalHint.topAutoEdge, gapSpace: 15, hidden: !(!this.props.hideTooltip && this.state.showHover), id: this._calloutId, onDismiss: this._closeCallout, preventDismissOnLostFocus: true,
117
+ React.createElement(Callout_1.Callout, (0, tslib_1.__assign)({ target: this._currentHoverElement, alignTargetEdge: true, isBeakVisible: false, directionalHint: Callout_1.DirectionalHint.topAutoEdge, gapSpace: 15, hidden: !(!this.props.hideTooltip && this.state.showHover), id: this._calloutId, onDismiss: this._closeCallout, preventDismissOnLostFocus: true,
118
118
  /** Keep the callout updated with details of focused/hovered arc */
119
- shouldUpdateWhenHidden: true }, this.props.calloutProps, index_3.getAccessibleDataObject(this.state.callOutAccessibilityData, 'text', false)), this.props.onRenderCalloutPerDataPoint ? (this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)) : (React.createElement(index_1.ChartHoverCard, { Legend: this.state.xCalloutValue ? this.state.xCalloutValue : this.state.legend, YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.value, color: this.state.color, culture: this.props.culture }))),
119
+ shouldUpdateWhenHidden: true }, this.props.calloutProps, (0, index_3.getAccessibleDataObject)(this.state.callOutAccessibilityData, 'text', false)), this.props.onRenderCalloutPerDataPoint ? (this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)) : (React.createElement(index_1.ChartHoverCard, { Legend: this.state.xCalloutValue ? this.state.xCalloutValue : this.state.legend, YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.value, color: this.state.color, culture: this.props.culture }))),
120
120
  !hideLegend && React.createElement("div", { className: this._classNames.legendContainer }, legendBars)));
121
121
  };
122
122
  DonutChartBase.prototype._setViewBox = function (node) {
@@ -128,7 +128,7 @@ define(["require", "exports", "tslib", "react", "@fluentui/react/lib/Utilities",
128
128
  var heightVal = node.parentElement && ((_a = node.parentElement) === null || _a === void 0 ? void 0 : _a.offsetHeight) > this.state._height
129
129
  ? (_b = node.parentElement) === null || _b === void 0 ? void 0 : _b.offsetHeight
130
130
  : this.state._height;
131
- var viewbox = "0 0 " + widthVal + " " + heightVal;
131
+ var viewbox = "0 0 ".concat(widthVal, " ").concat(heightVal);
132
132
  node.setAttribute('viewBox', viewbox);
133
133
  };
134
134
  DonutChartBase.prototype._createLegends = function (data, palette) {
@@ -159,7 +159,7 @@ define(["require", "exports", "tslib", "react", "@fluentui/react/lib/Utilities",
159
159
  };
160
160
  return legend;
161
161
  });
162
- var legends = (React.createElement(index_1.Legends, tslib_1.__assign({ legends: legendDataItems, centerLegends: true, overflowProps: this.props.legendsOverflowProps, focusZonePropsInHoverCard: this.props.focusZonePropsForLegendsInHoverCard, overflowText: this.props.legendsOverflowText }, this.props.legendProps)));
162
+ var legends = (React.createElement(index_1.Legends, (0, tslib_1.__assign)({ legends: legendDataItems, centerLegends: true, overflowProps: this.props.legendsOverflowProps, focusZonePropsInHoverCard: this.props.focusZonePropsForLegendsInHoverCard, overflowText: this.props.legendsOverflowText }, this.props.legendProps)));
163
163
  return legends;
164
164
  };
165
165
  DonutChartBase.prototype._hoverLeave = function () {
@@ -182,7 +182,7 @@ define(["require", "exports", "tslib", "react", "@fluentui/react/lib/Utilities",
182
182
  }
183
183
  };
184
184
  DonutChartBase.prototype._toLocaleString = function (data) {
185
- var localeString = index_3.convertToLocaleString(data, this.props.culture);
185
+ var localeString = (0, index_3.convertToLocaleString)(data, this.props.culture);
186
186
  if (!localeString) {
187
187
  return data;
188
188
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DonutChart.base.js","sourceRoot":"../src/","sources":["components/DonutChart/DonutChart.base.tsx"],"names":[],"mappings":";;;;IAUA,IAAM,aAAa,GAAG,8BAAkB,EAA4C,CAAC;IACrF,IAAM,uBAAuB,GAAG,EAAE,CAAC;IAkBnC;QAAoC,0CAAmD;QA+BrF,wBAAY,KAAuB;YAAnC,YACE,kBAAM,KAAK,CAAC,SAmBb;YAgGO,mBAAa,GAAG;gBACtB,KAAI,CAAC,QAAQ,CAAC;oBACZ,SAAS,EAAE,KAAK;iBACjB,CAAC,CAAC;YACL,CAAC,CAAC;YAwDM,oBAAc,GAAG,UAAC,IAAqB,EAAE,EAAU,EAAE,OAAuB;gBAClF,KAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC;gBACpC,KAAI,CAAC,QAAQ,CAAC;oBACZ,iGAAiG;oBACjG,SAAS,EAAE,KAAI,CAAC,KAAK,CAAC,cAAc,KAAK,EAAE,IAAI,KAAI,CAAC,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC,MAAM;oBACxF,KAAK,EAAE,IAAI,CAAC,IAAK,CAAC,QAAQ,EAAE;oBAC5B,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,KAAK,EAAE,IAAI,CAAC,KAAM;oBAClB,aAAa,EAAE,IA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AA9RD,CAAoC,KAAK,CAAC,SAAS,GA8RlD;IA9RY,wCAAc","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, getId } from '@fluentui/react/lib/Utilities';\nimport * as scale from 'd3-scale';\nimport { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { FocusZone, FocusZoneDirection, FocusZoneTabbableElements } from '@fluentui/react-focus';\nimport { IAccessibilityProps, ChartHoverCard, ILegend, Legends } from '../../index';\nimport { Pie } from './Pie/index';\nimport { IChartDataPoint, IChartProps, IDonutChartProps, IDonutChartStyleProps, IDonutChartStyles } from './index';\nimport { convertToLocaleString, getAccessibleDataObject } from '../../utilities/index';\nconst getClassNames = classNamesFunction<IDonutChartStyleProps, IDonutChartStyles>();\nconst LEGEND_CONTAINER_HEIGHT = 40;\n\nexport interface IDonutChartState {\n showHover?: boolean;\n value?: string | undefined;\n legend?: string | undefined;\n _width?: number | undefined;\n _height?: number | undefined;\n activeLegend?: string;\n color?: string | undefined;\n xCalloutValue?: string;\n yCalloutValue?: string;\n focusedArcId?: string;\n selectedLegend: string;\n dataPointCalloutProps?: IChartDataPoint;\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\nexport class DonutChartBase extends React.Component<IDonutChartProps, IDonutChartState> {\n public static defaultProps: Partial<IDonutChartProps> = {\n innerRadius: 0,\n hideLabels: true,\n };\n public _colors: scale.ScaleOrdinal<string, {}>;\n private _classNames: IProcessedStyleSet<IDonutChartStyles>;\n private _rootElem: HTMLElement | null;\n private _uniqText: string;\n /* eslint-disable @typescript-eslint/no-explicit-any */\n private _currentHoverElement: any;\n private _calloutId: string;\n private _calloutAnchorPoint: IChartDataPoint | null;\n\n public static getDerivedStateFromProps(\n nextProps: Readonly<IDonutChartProps>,\n prevState: Readonly<IDonutChartState>,\n ): Partial<IDonutChartState> | null {\n let widthState: { _width: number } | undefined;\n if (nextProps.width && nextProps.width !== prevState._width) {\n widthState = { _width: nextProps.width };\n }\n\n let heightState: { _height: number } | undefined;\n if (nextProps.height && nextProps.height !== prevState._height) {\n heightState = { _height: nextProps.height - LEGEND_CONTAINER_HEIGHT };\n }\n\n return { ...widthState, ...heightState };\n }\n\n constructor(props: IDonutChartProps) {\n super(props);\n this.state = {\n showHover: false,\n value: '',\n legend: '',\n _width: this.props.width || 200,\n _height: this.props.height || 200,\n activeLegend: '',\n color: '',\n xCalloutValue: '',\n yCalloutValue: '',\n selectedLegend: '',\n focusedArcId: '',\n };\n this._hoverCallback = this._hoverCallback.bind(this);\n this._focusCallback = this._focusCallback.bind(this);\n this._hoverLeave = this._hoverLeave.bind(this);\n this._calloutId = getId('callout');\n this._uniqText = getId('_Pie_');\n }\n public componentDidMount(): void {\n if (this._rootElem) {\n this.setState({\n _width: this._rootElem.offsetWidth,\n _height: this._rootElem.offsetHeight - LEGEND_CONTAINER_HEIGHT,\n });\n }\n }\n\n public render(): JSX.Element {\n const { data, hideLegend = false } = this.props;\n const { palette } = this.props.theme!;\n\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n width: this.state._width!,\n height: this.state._height!,\n color: this.state.color!,\n className: this.props.className!,\n });\n\n const legendBars = this._createLegends(data!, palette);\n const donutMarginHorizontal = this.props.hideLabels ? 0 : 80;\n const donutMarginVertical = this.props.hideLabels ? 0 : 40;\n const outerRadius =\n Math.min(this.state._width! - donutMarginHorizontal, this.state._height! - donutMarginVertical) / 2;\n const chartData = data && data.chartData?.filter((d: IChartDataPoint) => d.data! > 0);\n const valueInsideDonut = this._valueInsideDonut(this.props.valueInsideDonut!, chartData!);\n return (\n <div\n className={this._classNames.root}\n ref={(rootElem: HTMLElement | null) => (this._rootElem = rootElem)}\n onMouseLeave={this._handleChartMouseLeave}\n >\n <FocusZone direction={FocusZoneDirection.horizontal} handleTabKey={FocusZoneTabbableElements.all}>\n <div>\n <svg\n className={this._classNames.chart}\n aria-label={data?.chartTitle}\n ref={(node: SVGElement | null) => this._setViewBox(node)}\n >\n <Pie\n width={this.state._width!}\n height={this.state._height!}\n outerRadius={outerRadius}\n innerRadius={this.props.innerRadius!}\n data={chartData!}\n onFocusCallback={this._focusCallback}\n hoverOnCallback={this._hoverCallback}\n hoverLeaveCallback={this._hoverLeave}\n uniqText={this._uniqText}\n onBlurCallback={this._onBlur}\n activeArc={this._getHighlightedLegend()}\n focusedArcId={this.state.focusedArcId || ''}\n href={this.props.href!}\n calloutId={this._calloutId}\n valueInsideDonut={this._toLocaleString(valueInsideDonut)}\n theme={this.props.theme!}\n showLabelsInPercent={this.props.showLabelsInPercent}\n hideLabels={this.props.hideLabels}\n />\n </svg>\n </div>\n </FocusZone>\n <Callout\n target={this._currentHoverElement}\n alignTargetEdge={true}\n isBeakVisible={false}\n directionalHint={DirectionalHint.topAutoEdge}\n gapSpace={15}\n hidden={!(!this.props.hideTooltip && this.state.showHover)}\n id={this._calloutId}\n onDismiss={this._closeCallout}\n preventDismissOnLostFocus={true}\n /** Keep the callout updated with details of focused/hovered arc */\n shouldUpdateWhenHidden={true}\n {...this.props.calloutProps!}\n {...getAccessibleDataObject(this.state.callOutAccessibilityData, 'text', false)}\n >\n {this.props.onRenderCalloutPerDataPoint ? (\n this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps!)\n ) : (\n <ChartHoverCard\n Legend={this.state.xCalloutValue ? this.state.xCalloutValue : this.state.legend}\n YValue={this.state.yCalloutValue ? this.state.yCalloutValue : this.state.value}\n color={this.state.color}\n culture={this.props.culture}\n />\n )}\n </Callout>\n {!hideLegend && <div className={this._classNames.legendContainer}>{legendBars}</div>}\n </div>\n );\n }\n\n private _closeCallout = () => {\n this.setState({\n showHover: false,\n });\n };\n\n private _setViewBox(node: SVGElement | null): void {\n if (node === null) {\n return;\n }\n\n const widthVal = node.parentElement ? node.parentElement.clientWidth : this.state._width;\n\n const heightVal =\n node.parentElement && node.parentElement?.offsetHeight > this.state._height!\n ? node.parentElement?.offsetHeight\n : this.state._height;\n const viewbox = `0 0 ${widthVal!} ${heightVal!}`;\n node.setAttribute('viewBox', viewbox);\n }\n private _createLegends(data: IChartProps, palette: IPalette): JSX.Element {\n const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n const legendDataItems =\n data &&\n data!.chartData!.map((point: IChartDataPoint, index: number) => {\n const color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: point.legend!,\n color: color,\n action: () => {\n if (this.state.selectedLegend === point.legend) {\n this.setState({ selectedLegend: '' });\n } else {\n this.setState({ selectedLegend: point.legend! });\n }\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this.setState({ activeLegend: point.legend! });\n },\n onMouseOutAction: () => {\n this.setState({ activeLegend: '' });\n },\n };\n return legend;\n });\n const legends = (\n <Legends\n legends={legendDataItems}\n centerLegends\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n />\n );\n return legends;\n }\n\n private _focusCallback = (data: IChartDataPoint, id: string, element: SVGPathElement): void => {\n this._currentHoverElement = element;\n this.setState({\n /** Show the callout if highlighted arc is focused and Hide it if unhighlighted arc is focused */\n showHover: this.state.selectedLegend === '' || this.state.selectedLegend === data.legend,\n value: data.data!.toString(),\n legend: data.legend,\n color: data.color!,\n xCalloutValue: data.xAxisCalloutData!,\n yCalloutValue: data.yAxisCalloutData!,\n focusedArcId: id,\n dataPointCalloutProps: data,\n callOutAccessibilityData: data.callOutAccessibilityData!,\n });\n };\n\n private _hoverCallback = (data: IChartDataPoint, e: React.MouseEvent<SVGPathElement>): void => {\n if (this._calloutAnchorPoint !== data) {\n this._calloutAnchorPoint = data;\n this._currentHoverElement = e;\n this.setState({\n /** Show the callout if highlighted arc is hovered and Hide it if unhighlighted arc is hovered */\n showHover: this.state.selectedLegend === '' || this.state.selectedLegend === data.legend,\n value: data.data!.toString(),\n legend: data.legend,\n color: data.color!,\n xCalloutValue: data.xAxisCalloutData!,\n yCalloutValue: data.yAxisCalloutData!,\n dataPointCalloutProps: data,\n callOutAccessibilityData: data.callOutAccessibilityData!,\n });\n }\n };\n private _onBlur = (): void => {\n this.setState({ focusedArcId: '' });\n };\n\n private _hoverLeave(): void {\n /**/\n }\n\n private _handleChartMouseLeave = () => {\n this._calloutAnchorPoint = null;\n this.setState({ showHover: false });\n };\n\n private _valueInsideDonut(valueInsideDonut: string | number | undefined, data: IChartDataPoint[]) {\n const highlightedLegend = this._getHighlightedLegend();\n if (valueInsideDonut !== undefined && highlightedLegend !== '' && !this.state.showHover) {\n let legendValue = valueInsideDonut;\n data!.map((point: IChartDataPoint, index: number) => {\n if (point.legend === highlightedLegend) {\n legendValue = point.yAxisCalloutData ? point.yAxisCalloutData : point.data!;\n }\n return;\n });\n return legendValue;\n } else {\n return valueInsideDonut;\n }\n }\n\n private _toLocaleString(data: string | number | undefined) {\n const localeString = convertToLocaleString(data, this.props.culture);\n if (!localeString) {\n return data;\n }\n return localeString?.toString();\n }\n\n /**\n * This function returns\n * the selected legend if there is one\n * or the hovered legend if none of the legends is selected.\n * Note: This won't work in case of multiple legends selection.\n */\n private _getHighlightedLegend() {\n return this.state.selectedLegend || this.state.activeLegend;\n }\n}\n"]}
1
+ {"version":3,"file":"DonutChart.base.js","sourceRoot":"../src/","sources":["components/DonutChart/DonutChart.base.tsx"],"names":[],"mappings":";;;;IAUA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA4C,CAAC;IACrF,IAAM,uBAAuB,GAAG,EAAE,CAAC;IAkBnC;QAAoC,+CAAmD;QA+BrF,wBAAY,KAAuB;YAAnC,YACE,kBAAM,KAAK,CAAC,SAmBb;YAgGO,mBAAa,GAAG;gBACtB,KAAI,CAAC,QAAQ,CAAC;oBACZ,SAAS,EAAE,KAAK;iBACjB,CAAC,CAAC;YACL,CAAC,CAAC;YAwDM,oBAAc,GAAG,UAAC,I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AAI,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACrE,IAAI,CAAC,YAAY,EAAE;gBACjB,OAAO,IAAI,CAAC;aACb;YACD,OAAO,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ,EAAE,CAAC;QAClC,CAAC;QAED;;;;;WAKG;QACK,8CAAqB,GAA7B;YACE,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC;QAC9D,CAAC;QA5Ra,2BAAY,GAA8B;YACtD,WAAW,EAAE,CAAC;YACd,UAAU,EAAE,IAAI;SACjB,CAAC;QA0RJ,qBAAC;KAAA,AA9RD,CAAoC,KAAK,CAAC,SAAS,GA8RlD;IA9RY,wCAAc","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, getId } from '@fluentui/react/lib/Utilities';\nimport * as scale from 'd3-scale';\nimport { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { FocusZone, FocusZoneDirection, FocusZoneTabbableElements } from '@fluentui/react-focus';\nimport { IAccessibilityProps, ChartHoverCard, ILegend, Legends } from '../../index';\nimport { Pie } from './Pie/index';\nimport { IChartDataPoint, IChartProps, IDonutChartProps, IDonutChartStyleProps, IDonutChartStyles } from './index';\nimport { convertToLocaleString, getAccessibleDataObject } from '../../utilities/index';\nconst getClassNames = classNamesFunction<IDonutChartStyleProps, IDonutChartStyles>();\nconst LEGEND_CONTAINER_HEIGHT = 40;\n\nexport interface IDonutChartState {\n showHover?: boolean;\n value?: string | undefined;\n legend?: string | undefined;\n _width?: number | undefined;\n _height?: number | undefined;\n activeLegend?: string;\n color?: string | undefined;\n xCalloutValue?: string;\n yCalloutValue?: string;\n focusedArcId?: string;\n selectedLegend: string;\n dataPointCalloutProps?: IChartDataPoint;\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\nexport class DonutChartBase extends React.Component<IDonutChartProps, IDonutChartState> {\n public static defaultProps: Partial<IDonutChartProps> = {\n innerRadius: 0,\n hideLabels: true,\n };\n public _colors: scale.ScaleOrdinal<string, {}>;\n private _classNames: IProcessedStyleSet<IDonutChartStyles>;\n private _rootElem: HTMLElement | null;\n private _uniqText: string;\n /* eslint-disable @typescript-eslint/no-explicit-any */\n private _currentHoverElement: any;\n private _calloutId: string;\n private _calloutAnchorPoint: IChartDataPoint | null;\n\n public static getDerivedStateFromProps(\n nextProps: Readonly<IDonutChartProps>,\n prevState: Readonly<IDonutChartState>,\n ): Partial<IDonutChartState> | null {\n let widthState: { _width: number } | undefined;\n if (nextProps.width && nextProps.width !== prevState._width) {\n widthState = { _width: nextProps.width };\n }\n\n let heightState: { _height: number } | undefined;\n if (nextProps.height && nextProps.height !== prevState._height) {\n heightState = { _height: nextProps.height - LEGEND_CONTAINER_HEIGHT };\n }\n\n return { ...widthState, ...heightState };\n }\n\n constructor(props: IDonutChartProps) {\n super(props);\n this.state = {\n showHover: false,\n value: '',\n legend: '',\n _width: this.props.width || 200,\n _height: this.props.height || 200,\n activeLegend: '',\n color: '',\n xCalloutValue: '',\n yCalloutValue: '',\n selectedLegend: '',\n focusedArcId: '',\n };\n this._hoverCallback = this._hoverCallback.bind(this);\n this._focusCallback = this._focusCallback.bind(this);\n this._hoverLeave = this._hoverLeave.bind(this);\n this._calloutId = getId('callout');\n this._uniqText = getId('_Pie_');\n }\n public componentDidMount(): void {\n if (this._rootElem) {\n this.setState({\n _width: this._rootElem.offsetWidth,\n _height: this._rootElem.offsetHeight - LEGEND_CONTAINER_HEIGHT,\n });\n }\n }\n\n public render(): JSX.Element {\n const { data, hideLegend = false } = this.props;\n const { palette } = this.props.theme!;\n\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n width: this.state._width!,\n height: this.state._height!,\n color: this.state.color!,\n className: this.props.className!,\n });\n\n const legendBars = this._createLegends(data!, palette);\n const donutMarginHorizontal = this.props.hideLabels ? 0 : 80;\n const donutMarginVertical = this.props.hideLabels ? 0 : 40;\n const outerRadius =\n Math.min(this.state._width! - donutMarginHorizontal, this.state._height! - donutMarginVertical) / 2;\n const chartData = data && data.chartData?.filter((d: IChartDataPoint) => d.data! > 0);\n const valueInsideDonut = this._valueInsideDonut(this.props.valueInsideDonut!, chartData!);\n return (\n <div\n className={this._classNames.root}\n ref={(rootElem: HTMLElement | null) => (this._rootElem = rootElem)}\n onMouseLeave={this._handleChartMouseLeave}\n >\n <FocusZone direction={FocusZoneDirection.horizontal} handleTabKey={FocusZoneTabbableElements.all}>\n <div>\n <svg\n className={this._classNames.chart}\n aria-label={data?.chartTitle}\n ref={(node: SVGElement | null) => this._setViewBox(node)}\n >\n <Pie\n width={this.state._width!}\n height={this.state._height!}\n outerRadius={outerRadius}\n innerRadius={this.props.innerRadius!}\n data={chartData!}\n onFocusCallback={this._focusCallback}\n hoverOnCallback={this._hoverCallback}\n hoverLeaveCallback={this._hoverLeave}\n uniqText={this._uniqText}\n onBlurCallback={this._onBlur}\n activeArc={this._getHighlightedLegend()}\n focusedArcId={this.state.focusedArcId || ''}\n href={this.props.href!}\n calloutId={this._calloutId}\n valueInsideDonut={this._toLocaleString(valueInsideDonut)}\n theme={this.props.theme!}\n showLabelsInPercent={this.props.showLabelsInPercent}\n hideLabels={this.props.hideLabels}\n />\n </svg>\n </div>\n </FocusZone>\n <Callout\n target={this._currentHoverElement}\n alignTargetEdge={true}\n isBeakVisible={false}\n directionalHint={DirectionalHint.topAutoEdge}\n gapSpace={15}\n hidden={!(!this.props.hideTooltip && this.state.showHover)}\n id={this._calloutId}\n onDismiss={this._closeCallout}\n preventDismissOnLostFocus={true}\n /** Keep the callout updated with details of focused/hovered arc */\n shouldUpdateWhenHidden={true}\n {...this.props.calloutProps!}\n {...getAccessibleDataObject(this.state.callOutAccessibilityData, 'text', false)}\n >\n {this.props.onRenderCalloutPerDataPoint ? (\n this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps!)\n ) : (\n <ChartHoverCard\n Legend={this.state.xCalloutValue ? this.state.xCalloutValue : this.state.legend}\n YValue={this.state.yCalloutValue ? this.state.yCalloutValue : this.state.value}\n color={this.state.color}\n culture={this.props.culture}\n />\n )}\n </Callout>\n {!hideLegend && <div className={this._classNames.legendContainer}>{legendBars}</div>}\n </div>\n );\n }\n\n private _closeCallout = () => {\n this.setState({\n showHover: false,\n });\n };\n\n private _setViewBox(node: SVGElement | null): void {\n if (node === null) {\n return;\n }\n\n const widthVal = node.parentElement ? node.parentElement.clientWidth : this.state._width;\n\n const heightVal =\n node.parentElement && node.parentElement?.offsetHeight > this.state._height!\n ? node.parentElement?.offsetHeight\n : this.state._height;\n const viewbox = `0 0 ${widthVal!} ${heightVal!}`;\n node.setAttribute('viewBox', viewbox);\n }\n private _createLegends(data: IChartProps, palette: IPalette): JSX.Element {\n const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n const legendDataItems =\n data &&\n data!.chartData!.map((point: IChartDataPoint, index: number) => {\n const color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: point.legend!,\n color: color,\n action: () => {\n if (this.state.selectedLegend === point.legend) {\n this.setState({ selectedLegend: '' });\n } else {\n this.setState({ selectedLegend: point.legend! });\n }\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this.setState({ activeLegend: point.legend! });\n },\n onMouseOutAction: () => {\n this.setState({ activeLegend: '' });\n },\n };\n return legend;\n });\n const legends = (\n <Legends\n legends={legendDataItems}\n centerLegends\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n />\n );\n return legends;\n }\n\n private _focusCallback = (data: IChartDataPoint, id: string, element: SVGPathElement): void => {\n this._currentHoverElement = element;\n this.setState({\n /** Show the callout if highlighted arc is focused and Hide it if unhighlighted arc is focused */\n showHover: this.state.selectedLegend === '' || this.state.selectedLegend === data.legend,\n value: data.data!.toString(),\n legend: data.legend,\n color: data.color!,\n xCalloutValue: data.xAxisCalloutData!,\n yCalloutValue: data.yAxisCalloutData!,\n focusedArcId: id,\n dataPointCalloutProps: data,\n callOutAccessibilityData: data.callOutAccessibilityData!,\n });\n };\n\n private _hoverCallback = (data: IChartDataPoint, e: React.MouseEvent<SVGPathElement>): void => {\n if (this._calloutAnchorPoint !== data) {\n this._calloutAnchorPoint = data;\n this._currentHoverElement = e;\n this.setState({\n /** Show the callout if highlighted arc is hovered and Hide it if unhighlighted arc is hovered */\n showHover: this.state.selectedLegend === '' || this.state.selectedLegend === data.legend,\n value: data.data!.toString(),\n legend: data.legend,\n color: data.color!,\n xCalloutValue: data.xAxisCalloutData!,\n yCalloutValue: data.yAxisCalloutData!,\n dataPointCalloutProps: data,\n callOutAccessibilityData: data.callOutAccessibilityData!,\n });\n }\n };\n private _onBlur = (): void => {\n this.setState({ focusedArcId: '' });\n };\n\n private _hoverLeave(): void {\n /**/\n }\n\n private _handleChartMouseLeave = () => {\n this._calloutAnchorPoint = null;\n this.setState({ showHover: false });\n };\n\n private _valueInsideDonut(valueInsideDonut: string | number | undefined, data: IChartDataPoint[]) {\n const highlightedLegend = this._getHighlightedLegend();\n if (valueInsideDonut !== undefined && highlightedLegend !== '' && !this.state.showHover) {\n let legendValue = valueInsideDonut;\n data!.map((point: IChartDataPoint, index: number) => {\n if (point.legend === highlightedLegend) {\n legendValue = point.yAxisCalloutData ? point.yAxisCalloutData : point.data!;\n }\n return;\n });\n return legendValue;\n } else {\n return valueInsideDonut;\n }\n }\n\n private _toLocaleString(data: string | number | undefined) {\n const localeString = convertToLocaleString(data, this.props.culture);\n if (!localeString) {\n return data;\n }\n return localeString?.toString();\n }\n\n /**\n * This function returns\n * the selected legend if there is one\n * or the hovered legend if none of the legends is selected.\n * Note: This won't work in case of multiple legends selection.\n */\n private _getHighlightedLegend() {\n return this.state.selectedLegend || this.state.activeLegend;\n }\n}\n"]}
@@ -3,6 +3,6 @@ define(["require", "exports", "../../Utilities", "./DonutChart.base", "./DonutCh
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.DonutChart = void 0;
5
5
  // Create a DonutChart variant which uses these default styles and this styled subcomponent.
6
- exports.DonutChart = Utilities_1.styled(DonutChart_base_1.DonutChartBase, DonutChart_styles_1.getStyles);
6
+ exports.DonutChart = (0, Utilities_1.styled)(DonutChart_base_1.DonutChartBase, DonutChart_styles_1.getStyles);
7
7
  });
8
8
  //# sourceMappingURL=DonutChart.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DonutChart.js","sourceRoot":"../src/","sources":["components/DonutChart/DonutChart.tsx"],"names":[],"mappings":";;;;IAMA,4FAA4F;IAC/E,QAAA,UAAU,GAA8C,kBAAM,CAIzE,gCAAc,EAAE,6BAAS,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '../../Utilities';\nimport { IDonutChartProps, IDonutChartStyleProps, IDonutChartStyles } from './DonutChart.types';\nimport { DonutChartBase } from './DonutChart.base';\nimport { getStyles } from './DonutChart.styles';\n\n// Create a DonutChart variant which uses these default styles and this styled subcomponent.\nexport const DonutChart: React.FunctionComponent<IDonutChartProps> = styled<\n IDonutChartProps,\n IDonutChartStyleProps,\n IDonutChartStyles\n>(DonutChartBase, getStyles);\n"]}
1
+ {"version":3,"file":"DonutChart.js","sourceRoot":"../src/","sources":["components/DonutChart/DonutChart.tsx"],"names":[],"mappings":";;;;IAMA,4FAA4F;IAC/E,QAAA,UAAU,GAA8C,IAAA,kBAAM,EAIzE,gCAAc,EAAE,6BAAS,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '../../Utilities';\nimport { IDonutChartProps, IDonutChartStyleProps, IDonutChartStyles } from './DonutChart.types';\nimport { DonutChartBase } from './DonutChart.base';\nimport { getStyles } from './DonutChart.styles';\n\n// Create a DonutChart variant which uses these default styles and this styled subcomponent.\nexport const DonutChart: React.FunctionComponent<IDonutChartProps> = styled<\n IDonutChartProps,\n IDonutChartStyleProps,\n IDonutChartStyles\n>(DonutChartBase, getStyles);\n"]}
@@ -27,7 +27,7 @@ define(["require", "exports"], function (require, exports) {
27
27
  },
28
28
  legendContainer: {
29
29
  paddingTop: '16px',
30
- width: width + "px",
30
+ width: "".concat(width, "px"),
31
31
  },
32
32
  };
33
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DonutChart.styles.js","sourceRoot":"../src/","sources":["components/DonutChart/DonutChart.styles.ts"],"names":[],"mappings":";;;;IAEO,IAAM,SAAS,GAAG,UAAC,KAA4B;QAC5C,IAAA,SAAS,GAA2B,KAAK,UAAhC,EAAE,KAAK,GAAoB,KAAK,MAAzB,EAAE,MAAM,GAAY,KAAK,OAAjB,EAAE,KAAK,GAAK,KAAK,MAAV,CAAW;QAClD,OAAO;YACL,IAAI,EAAE;gBACJ,KAAK,CAAC,KAAK,CAAC,MAAM;gBAClB,eAAe;gBACf;oBACE,UAAU,EAAE,QAAQ;oBACpB,OAAO,EAAE,MAAM;oBACf,aAAa,EAAE,QAAQ;oBACvB,KAAK,EAAE,MAAM;oBACb,MAAM,EAAE,MAAM;iBACf;gBACD,SAAS;aACV;YACD,KAAK,EAAE;gBACL,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,MAAM;gBACd,SAAS,EAAE,aAAa;gBACxB,QAAQ,EAAE,SAAS;gBACnB,eAAe,EAAE,QAAQ;gBACzB,OAAO,EAAE,OAAO;aACjB;YACD,eAAe,EAAE;gBACf,UAAU,EAAE,MAAM;gBAClB,KAAK,EAAK,KAAK,OAAI;aACpB;SACF,CAAC;IACJ,CAAC,CAAC;IA5BW,QAAA,SAAS,aA4BpB","sourcesContent":["import { IDonutChartStyleProps, IDonutChartStyles } from './DonutChart.types';\n\nexport const getStyles = (props: IDonutChartStyleProps): IDonutChartStyles => {\n const { className, width, height, theme } = props;\n return {\n root: [\n theme.fonts.medium,\n 'ms-DonutChart',\n {\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n height: '100%',\n },\n className,\n ],\n chart: {\n width: width,\n height: height,\n boxSizing: 'content-box',\n overflow: 'visible',\n alignmentAdjust: 'center',\n display: 'block',\n },\n legendContainer: {\n paddingTop: '16px',\n width: `${width}px`,\n },\n };\n};\n"]}
1
+ {"version":3,"file":"DonutChart.styles.js","sourceRoot":"../src/","sources":["components/DonutChart/DonutChart.styles.ts"],"names":[],"mappings":";;;;IAEO,IAAM,SAAS,GAAG,UAAC,KAA4B;QAC5C,IAAA,SAAS,GAA2B,KAAK,UAAhC,EAAE,KAAK,GAAoB,KAAK,MAAzB,EAAE,MAAM,GAAY,KAAK,OAAjB,EAAE,KAAK,GAAK,KAAK,MAAV,CAAW;QAClD,OAAO;YACL,IAAI,EAAE;gBACJ,KAAK,CAAC,KAAK,CAAC,MAAM;gBAClB,eAAe;gBACf;oBACE,UAAU,EAAE,QAAQ;oBACpB,OAAO,EAAE,MAAM;oBACf,aAAa,EAAE,QAAQ;oBACvB,KAAK,EAAE,MAAM;oBACb,MAAM,EAAE,MAAM;iBACf;gBACD,SAAS;aACV;YACD,KAAK,EAAE;gBACL,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,MAAM;gBACd,SAAS,EAAE,aAAa;gBACxB,QAAQ,EAAE,SAAS;gBACnB,eAAe,EAAE,QAAQ;gBACzB,OAAO,EAAE,OAAO;aACjB;YACD,eAAe,EAAE;gBACf,UAAU,EAAE,MAAM;gBAClB,KAAK,EAAE,UAAG,KAAK,OAAI;aACpB;SACF,CAAC;IACJ,CAAC,CAAC;IA5BW,QAAA,SAAS,aA4BpB","sourcesContent":["import { IDonutChartStyleProps, IDonutChartStyles } from './DonutChart.types';\n\nexport const getStyles = (props: IDonutChartStyleProps): IDonutChartStyles => {\n const { className, width, height, theme } = props;\n return {\n root: [\n theme.fonts.medium,\n 'ms-DonutChart',\n {\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n height: '100%',\n },\n className,\n ],\n chart: {\n width: width,\n height: height,\n boxSizing: 'content-box',\n overflow: 'visible',\n alignmentAdjust: 'center',\n display: 'block',\n },\n legendContainer: {\n paddingTop: '16px',\n width: `${width}px`,\n },\n };\n};\n"]}
@@ -2,10 +2,10 @@ define(["require", "exports", "tslib", "react", "d3-shape", "../Arc/index", "@fl
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Pie = void 0;
5
- var getClassNames = Utilities_1.classNamesFunction();
5
+ var getClassNames = (0, Utilities_1.classNamesFunction)();
6
6
  var TEXT_PADDING = 5;
7
7
  var Pie = /** @class */ (function (_super) {
8
- tslib_1.__extends(Pie, _super);
8
+ (0, tslib_1.__extends)(Pie, _super);
9
9
  function Pie(props) {
10
10
  var _this = _super.call(this, props) || this;
11
11
  _this.arcGenerator = function (d, i, focusData, href) {
@@ -36,7 +36,7 @@ define(["require", "exports", "tslib", "react", "d3-shape", "../Arc/index", "@fl
36
36
  var _a = this.props, pie = _a.pie, data = _a.data;
37
37
  var focusData = this._pieForFocusRing(data);
38
38
  var piechart = pie(data);
39
- var translate = "translate(" + this.props.width / 2 + ", " + this.props.height / 2 + ")";
39
+ var translate = "translate(".concat(this.props.width / 2, ", ").concat(this.props.height / 2, ")");
40
40
  var classNames = getClassNames(Pie_styles_1.getStyles, {
41
41
  theme: this.props.theme,
42
42
  });
@@ -49,7 +49,7 @@ define(["require", "exports", "tslib", "react", "d3-shape", "../Arc/index", "@fl
49
49
  var classNames = getClassNames(Pie_styles_1.getStyles, {
50
50
  theme: this.props.theme,
51
51
  });
52
- index_2.wrapTextInsideDonut(classNames.insideDonutString, this.props.innerRadius * 2 - TEXT_PADDING);
52
+ (0, index_2.wrapTextInsideDonut)(classNames.insideDonutString, this.props.innerRadius * 2 - TEXT_PADDING);
53
53
  };
54
54
  Pie.prototype._hoverCallback = function (data, e) {
55
55
  this.props.hoverOnCallback(data, e);