@fluentui/react-charting 5.24.9 → 5.24.11

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 (327) hide show
  1. package/CHANGELOG.json +69 -1
  2. package/CHANGELOG.md +25 -2
  3. package/dist/react-charting.d.ts +167 -3
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +47 -3
  7. package/lib/FunnelChart.d.ts +1 -0
  8. package/lib/FunnelChart.js +2 -0
  9. package/lib/FunnelChart.js.map +1 -0
  10. package/lib/components/AreaChart/AreaChart.base.js +4 -0
  11. package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
  12. package/lib/components/ChartTable/ChartTable.base.js +2 -1
  13. package/lib/components/ChartTable/ChartTable.base.js.map +1 -1
  14. package/lib/components/ChartTable/ChartTable.types.d.ts +1 -0
  15. package/lib/components/ChartTable/ChartTable.types.js.map +1 -1
  16. package/lib/components/CommonComponents/CartesianChart.base.js +4 -2
  17. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  18. package/lib/components/CommonComponents/CartesianChart.types.d.ts +4 -0
  19. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  20. package/lib/components/DeclarativeChart/DeclarativeChart.js +9 -1
  21. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  22. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
  23. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +121 -1
  24. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  25. package/lib/components/DonutChart/Arc/Arc.js +1 -0
  26. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  27. package/lib/components/DonutChart/DonutChart.base.js +5 -6
  28. package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
  29. package/lib/components/DonutChart/DonutChart.styles.js +2 -4
  30. package/lib/components/DonutChart/DonutChart.styles.js.map +1 -1
  31. package/lib/components/DonutChart/DonutChart.types.d.ts +4 -0
  32. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  33. package/lib/components/DonutChart/Pie/Pie.js +2 -0
  34. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  35. package/lib/components/FunnelChart/FunnelChart.base.d.ts +3 -0
  36. package/lib/components/FunnelChart/FunnelChart.base.js +266 -0
  37. package/lib/components/FunnelChart/FunnelChart.base.js.map +1 -0
  38. package/lib/components/FunnelChart/FunnelChart.d.ts +7 -0
  39. package/lib/components/FunnelChart/FunnelChart.js +9 -0
  40. package/lib/components/FunnelChart/FunnelChart.js.map +1 -0
  41. package/lib/components/FunnelChart/FunnelChart.styles.d.ts +2 -0
  42. package/lib/components/FunnelChart/FunnelChart.styles.js +38 -0
  43. package/lib/components/FunnelChart/FunnelChart.styles.js.map +1 -0
  44. package/lib/components/FunnelChart/FunnelChart.types.d.ts +139 -0
  45. package/lib/components/FunnelChart/FunnelChart.types.js +2 -0
  46. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -0
  47. package/lib/components/FunnelChart/funnelGeometry.d.ts +77 -0
  48. package/lib/components/FunnelChart/funnelGeometry.js +194 -0
  49. package/lib/components/FunnelChart/funnelGeometry.js.map +1 -0
  50. package/lib/components/FunnelChart/index.d.ts +2 -0
  51. package/lib/components/FunnelChart/index.js +3 -0
  52. package/lib/components/FunnelChart/index.js.map +1 -0
  53. package/lib/components/GaugeChart/GaugeChart.base.js +3 -5
  54. package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
  55. package/lib/components/GaugeChart/GaugeChart.styles.js +2 -4
  56. package/lib/components/GaugeChart/GaugeChart.styles.js.map +1 -1
  57. package/lib/components/GaugeChart/GaugeChart.types.d.ts +4 -0
  58. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  59. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +5 -0
  60. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  61. package/lib/components/HeatMapChart/HeatMapChart.base.d.ts +0 -1
  62. package/lib/components/HeatMapChart/HeatMapChart.base.js +5 -16
  63. package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  64. package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js +4 -0
  65. package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  66. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +6 -0
  67. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  68. package/lib/components/Legends/Legends.base.js +5 -1
  69. package/lib/components/Legends/Legends.base.js.map +1 -1
  70. package/lib/components/LineChart/LineChart.base.d.ts +2 -0
  71. package/lib/components/LineChart/LineChart.base.js +36 -11
  72. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  73. package/lib/components/LineChart/LineChart.types.d.ts +6 -0
  74. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  75. package/lib/components/PieChart/Arc/Arc.js +2 -0
  76. package/lib/components/PieChart/Arc/Arc.js.map +1 -1
  77. package/lib/components/PieChart/Pie/Pie.js +2 -0
  78. package/lib/components/PieChart/Pie/Pie.js.map +1 -1
  79. package/lib/components/PieChart/PieChart.base.js +1 -0
  80. package/lib/components/PieChart/PieChart.base.js.map +1 -1
  81. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +13 -5
  82. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  83. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.d.ts +2 -4
  84. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  85. package/lib/components/SankeyChart/SankeyChart.base.js +4 -6
  86. package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
  87. package/lib/components/SankeyChart/SankeyChart.styles.js +3 -0
  88. package/lib/components/SankeyChart/SankeyChart.styles.js.map +1 -1
  89. package/lib/components/SankeyChart/SankeyChart.types.d.ts +4 -0
  90. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  91. package/lib/components/ScatterChart/ScatterChart.base.js +12 -2
  92. package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -1
  93. package/lib/components/Sparkline/Sparkline.base.d.ts +2 -2
  94. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +6 -1
  95. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  96. package/lib/components/StackedBarChart/StackedBarChart.base.js +5 -1
  97. package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  98. package/lib/components/TreeChart/TreeChart.base.js +17 -2
  99. package/lib/components/TreeChart/TreeChart.base.js.map +1 -1
  100. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +11 -0
  101. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  102. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +3 -0
  103. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  104. package/lib/index.d.ts +2 -0
  105. package/lib/index.js +1 -0
  106. package/lib/index.js.map +1 -1
  107. package/lib/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -1
  108. package/lib/utilities/utilities.d.ts +3 -0
  109. package/lib/utilities/utilities.js +14 -0
  110. package/lib/utilities/utilities.js.map +1 -1
  111. package/lib-amd/FunnelChart.d.ts +1 -0
  112. package/lib-amd/FunnelChart.js +6 -0
  113. package/lib-amd/FunnelChart.js.map +1 -0
  114. package/lib-amd/components/AreaChart/AreaChart.base.js +4 -0
  115. package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
  116. package/lib-amd/components/ChartTable/ChartTable.base.js +2 -1
  117. package/lib-amd/components/ChartTable/ChartTable.base.js.map +1 -1
  118. package/lib-amd/components/ChartTable/ChartTable.types.d.ts +1 -0
  119. package/lib-amd/components/ChartTable/ChartTable.types.js.map +1 -1
  120. package/lib-amd/components/CommonComponents/CartesianChart.base.js +4 -2
  121. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  122. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +4 -0
  123. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  124. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +8 -1
  125. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  126. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
  127. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +123 -2
  128. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  129. package/lib-amd/components/DonutChart/Arc/Arc.js +1 -0
  130. package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
  131. package/lib-amd/components/DonutChart/DonutChart.base.js +5 -6
  132. package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
  133. package/lib-amd/components/DonutChart/DonutChart.styles.js +2 -4
  134. package/lib-amd/components/DonutChart/DonutChart.styles.js.map +1 -1
  135. package/lib-amd/components/DonutChart/DonutChart.types.d.ts +4 -0
  136. package/lib-amd/components/DonutChart/DonutChart.types.js.map +1 -1
  137. package/lib-amd/components/DonutChart/Pie/Pie.js +2 -0
  138. package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -1
  139. package/lib-amd/components/FunnelChart/FunnelChart.base.d.ts +3 -0
  140. package/lib-amd/components/FunnelChart/FunnelChart.base.js +260 -0
  141. package/lib-amd/components/FunnelChart/FunnelChart.base.js.map +1 -0
  142. package/lib-amd/components/FunnelChart/FunnelChart.d.ts +7 -0
  143. package/lib-amd/components/FunnelChart/FunnelChart.js +11 -0
  144. package/lib-amd/components/FunnelChart/FunnelChart.js.map +1 -0
  145. package/lib-amd/components/FunnelChart/FunnelChart.styles.d.ts +2 -0
  146. package/lib-amd/components/FunnelChart/FunnelChart.styles.js +43 -0
  147. package/lib-amd/components/FunnelChart/FunnelChart.styles.js.map +1 -0
  148. package/lib-amd/components/FunnelChart/FunnelChart.types.d.ts +139 -0
  149. package/lib-amd/components/FunnelChart/FunnelChart.types.js +5 -0
  150. package/lib-amd/components/FunnelChart/FunnelChart.types.js.map +1 -0
  151. package/lib-amd/components/FunnelChart/funnelGeometry.d.ts +77 -0
  152. package/lib-amd/components/FunnelChart/funnelGeometry.js +204 -0
  153. package/lib-amd/components/FunnelChart/funnelGeometry.js.map +1 -0
  154. package/lib-amd/components/FunnelChart/index.d.ts +2 -0
  155. package/lib-amd/components/FunnelChart/index.js +7 -0
  156. package/lib-amd/components/FunnelChart/index.js.map +1 -0
  157. package/lib-amd/components/GaugeChart/GaugeChart.base.js +3 -5
  158. package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
  159. package/lib-amd/components/GaugeChart/GaugeChart.styles.js +2 -4
  160. package/lib-amd/components/GaugeChart/GaugeChart.styles.js.map +1 -1
  161. package/lib-amd/components/GaugeChart/GaugeChart.types.d.ts +4 -0
  162. package/lib-amd/components/GaugeChart/GaugeChart.types.js.map +1 -1
  163. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +5 -0
  164. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  165. package/lib-amd/components/HeatMapChart/HeatMapChart.base.d.ts +0 -1
  166. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +5 -15
  167. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  168. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js +4 -0
  169. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  170. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +6 -0
  171. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  172. package/lib-amd/components/Legends/Legends.base.js +5 -1
  173. package/lib-amd/components/Legends/Legends.base.js.map +1 -1
  174. package/lib-amd/components/LineChart/LineChart.base.d.ts +2 -0
  175. package/lib-amd/components/LineChart/LineChart.base.js +36 -11
  176. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  177. package/lib-amd/components/LineChart/LineChart.types.d.ts +6 -0
  178. package/lib-amd/components/LineChart/LineChart.types.js.map +1 -1
  179. package/lib-amd/components/PieChart/Arc/Arc.js +2 -0
  180. package/lib-amd/components/PieChart/Arc/Arc.js.map +1 -1
  181. package/lib-amd/components/PieChart/Pie/Pie.js +2 -0
  182. package/lib-amd/components/PieChart/Pie/Pie.js.map +1 -1
  183. package/lib-amd/components/PieChart/PieChart.base.js +1 -0
  184. package/lib-amd/components/PieChart/PieChart.base.js.map +1 -1
  185. package/lib-amd/components/ResponsiveContainer/ResponsiveContainer.js +13 -5
  186. package/lib-amd/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  187. package/lib-amd/components/ResponsiveContainer/ResponsiveContainer.types.d.ts +2 -4
  188. package/lib-amd/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  189. package/lib-amd/components/SankeyChart/SankeyChart.base.js +4 -6
  190. package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
  191. package/lib-amd/components/SankeyChart/SankeyChart.styles.js +3 -0
  192. package/lib-amd/components/SankeyChart/SankeyChart.styles.js.map +1 -1
  193. package/lib-amd/components/SankeyChart/SankeyChart.types.d.ts +4 -0
  194. package/lib-amd/components/SankeyChart/SankeyChart.types.js.map +1 -1
  195. package/lib-amd/components/ScatterChart/ScatterChart.base.js +12 -2
  196. package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -1
  197. package/lib-amd/components/Sparkline/Sparkline.base.d.ts +2 -2
  198. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +6 -1
  199. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  200. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +5 -1
  201. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  202. package/lib-amd/components/TreeChart/TreeChart.base.js +17 -2
  203. package/lib-amd/components/TreeChart/TreeChart.base.js.map +1 -1
  204. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +11 -0
  205. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  206. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +3 -0
  207. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  208. package/lib-amd/index.d.ts +2 -0
  209. package/lib-amd/index.js +3 -2
  210. package/lib-amd/index.js.map +1 -1
  211. package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -1
  212. package/lib-amd/utilities/utilities.d.ts +3 -0
  213. package/lib-amd/utilities/utilities.js +17 -2
  214. package/lib-amd/utilities/utilities.js.map +1 -1
  215. package/lib-commonjs/FunnelChart.d.ts +1 -0
  216. package/lib-commonjs/FunnelChart.js +5 -0
  217. package/lib-commonjs/FunnelChart.js.map +1 -0
  218. package/lib-commonjs/components/AreaChart/AreaChart.base.js +4 -0
  219. package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
  220. package/lib-commonjs/components/ChartTable/ChartTable.base.js +2 -1
  221. package/lib-commonjs/components/ChartTable/ChartTable.base.js.map +1 -1
  222. package/lib-commonjs/components/ChartTable/ChartTable.types.d.ts +1 -0
  223. package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +1 -1
  224. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +4 -2
  225. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  226. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +4 -0
  227. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  228. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +8 -0
  229. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  230. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
  231. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +123 -2
  232. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  233. package/lib-commonjs/components/DonutChart/Arc/Arc.js +1 -0
  234. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  235. package/lib-commonjs/components/DonutChart/DonutChart.base.js +5 -6
  236. package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
  237. package/lib-commonjs/components/DonutChart/DonutChart.styles.js +2 -4
  238. package/lib-commonjs/components/DonutChart/DonutChart.styles.js.map +1 -1
  239. package/lib-commonjs/components/DonutChart/DonutChart.types.d.ts +4 -0
  240. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  241. package/lib-commonjs/components/DonutChart/Pie/Pie.js +2 -0
  242. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  243. package/lib-commonjs/components/FunnelChart/FunnelChart.base.d.ts +3 -0
  244. package/lib-commonjs/components/FunnelChart/FunnelChart.base.js +269 -0
  245. package/lib-commonjs/components/FunnelChart/FunnelChart.base.js.map +1 -0
  246. package/lib-commonjs/components/FunnelChart/FunnelChart.d.ts +7 -0
  247. package/lib-commonjs/components/FunnelChart/FunnelChart.js +12 -0
  248. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -0
  249. package/lib-commonjs/components/FunnelChart/FunnelChart.styles.d.ts +2 -0
  250. package/lib-commonjs/components/FunnelChart/FunnelChart.styles.js +42 -0
  251. package/lib-commonjs/components/FunnelChart/FunnelChart.styles.js.map +1 -0
  252. package/lib-commonjs/components/FunnelChart/FunnelChart.types.d.ts +139 -0
  253. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js +3 -0
  254. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -0
  255. package/lib-commonjs/components/FunnelChart/funnelGeometry.d.ts +77 -0
  256. package/lib-commonjs/components/FunnelChart/funnelGeometry.js +202 -0
  257. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -0
  258. package/lib-commonjs/components/FunnelChart/index.d.ts +2 -0
  259. package/lib-commonjs/components/FunnelChart/index.js +6 -0
  260. package/lib-commonjs/components/FunnelChart/index.js.map +1 -0
  261. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +3 -5
  262. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
  263. package/lib-commonjs/components/GaugeChart/GaugeChart.styles.js +2 -4
  264. package/lib-commonjs/components/GaugeChart/GaugeChart.styles.js.map +1 -1
  265. package/lib-commonjs/components/GaugeChart/GaugeChart.types.d.ts +4 -0
  266. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  267. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +5 -0
  268. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  269. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.d.ts +0 -1
  270. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +4 -15
  271. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  272. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js +4 -0
  273. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  274. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +6 -0
  275. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  276. package/lib-commonjs/components/Legends/Legends.base.js +5 -1
  277. package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
  278. package/lib-commonjs/components/LineChart/LineChart.base.d.ts +2 -0
  279. package/lib-commonjs/components/LineChart/LineChart.base.js +36 -11
  280. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  281. package/lib-commonjs/components/LineChart/LineChart.types.d.ts +6 -0
  282. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  283. package/lib-commonjs/components/PieChart/Arc/Arc.js +2 -0
  284. package/lib-commonjs/components/PieChart/Arc/Arc.js.map +1 -1
  285. package/lib-commonjs/components/PieChart/Pie/Pie.js +2 -0
  286. package/lib-commonjs/components/PieChart/Pie/Pie.js.map +1 -1
  287. package/lib-commonjs/components/PieChart/PieChart.base.js +1 -0
  288. package/lib-commonjs/components/PieChart/PieChart.base.js.map +1 -1
  289. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +13 -5
  290. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  291. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.d.ts +2 -4
  292. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  293. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js +4 -6
  294. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
  295. package/lib-commonjs/components/SankeyChart/SankeyChart.styles.js +3 -0
  296. package/lib-commonjs/components/SankeyChart/SankeyChart.styles.js.map +1 -1
  297. package/lib-commonjs/components/SankeyChart/SankeyChart.types.d.ts +4 -0
  298. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  299. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +12 -2
  300. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -1
  301. package/lib-commonjs/components/Sparkline/Sparkline.base.d.ts +2 -2
  302. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +6 -1
  303. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  304. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js +5 -1
  305. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  306. package/lib-commonjs/components/TreeChart/TreeChart.base.js +17 -2
  307. package/lib-commonjs/components/TreeChart/TreeChart.base.js.map +1 -1
  308. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +11 -0
  309. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  310. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +3 -0
  311. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  312. package/lib-commonjs/index.d.ts +2 -0
  313. package/lib-commonjs/index.js +3 -1
  314. package/lib-commonjs/index.js.map +1 -1
  315. package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -1
  316. package/lib-commonjs/utilities/utilities.d.ts +3 -0
  317. package/lib-commonjs/utilities/utilities.js +17 -1
  318. package/lib-commonjs/utilities/utilities.js.map +1 -1
  319. package/package.json +4 -4
  320. package/src/components/ChartTable/ChartTable.types.ts +1 -0
  321. package/src/components/CommonComponents/CartesianChart.types.ts +6 -0
  322. package/src/components/DonutChart/DonutChart.types.ts +5 -0
  323. package/src/components/FunnelChart/FunnelChart.types.ts +153 -0
  324. package/src/components/GaugeChart/GaugeChart.types.ts +5 -0
  325. package/src/components/LineChart/LineChart.types.ts +7 -0
  326. package/src/components/ResponsiveContainer/ResponsiveContainer.types.ts +3 -2
  327. package/src/components/SankeyChart/SankeyChart.types.ts +5 -0
@@ -61,6 +61,12 @@ export interface ILineChartProps extends ICartesianChartProps {
61
61
  * @deprecated this prop no longer used to identify scatter mode
62
62
  */
63
63
  lineMode?: 'default' | 'scatter';
64
+ /**
65
+ * To enable callout for individual line or complete stack.
66
+ * @default false
67
+ * @type \{boolean \}
68
+ */
69
+ isCalloutForStack?: boolean;
64
70
  }
65
71
  /**
66
72
  * {@docCategory LineChart}
@@ -1 +1 @@
1
- {"version":3,"file":"LineChart.types.js","sourceRoot":"../src/","sources":["components/LineChart/LineChart.types.ts"],"names":[],"mappings":"","sourcesContent":["import { IRenderFunction, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\nimport {\n IChartProps,\n ILineChartPoints,\n IMargins,\n IBasestate,\n IRefArrayData,\n ICustomizedCalloutData,\n} from '../../types/index';\nimport { IEventAnnotation } from '../../types/IEventAnnotation';\nimport {\n ICartesianChartProps,\n ICartesianChartStyleProps,\n ICartesianChartStyles,\n IChildProps,\n} from '../CommonComponents/index';\nimport { IStyle } from '@fluentui/react/lib/Styling';\n\nexport type { IChildProps, ILineChartPoints, IMargins, IBasestate, IRefArrayData };\n\n/**\n * Line Chart properties\n * {@docCategory LineChart}\n */\nexport interface ILineChartProps extends ICartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data: IChartProps;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<ILineChartStyleProps, ILineChartStyles>;\n\n /**\n * Show event annotation\n */\n eventAnnotationProps?: IEventsAnnotationProps;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: IRenderFunction<ICustomizedCalloutData>;\n\n /**\n * Define a custom callout renderer for a stack; default is to render per data point\n */\n onRenderCalloutPerStack?: IRenderFunction<ICustomizedCalloutData>;\n\n /**\n * Callback for getting callout description message\n */\n getCalloutDescriptionMessage?: (calloutDataProps: ICustomizedCalloutData) => string | undefined;\n\n /*\n * Color fill bars for the chart,\n */\n colorFillBars?: IColorFillBarsProps[];\n\n /**\n * if this is set to true, then for each line there will be a unique shape assigned to the point,\n * there are total 8 shapes which are as follow circle, square, triangele, diamond, pyramid,\n * hexagon, pentagon and octagon, which will get assigned as respectively, if there are more\n * than 8 lines in the line chart then it will again start from cicle to octagon.\n * setting this flag to true will also change the behavior of the points, like for a\n * line, last point shape and first point shape will be visible all the times, and all\n * other points will get enlarge only when hovered over them\n * if set to false default shape will be circle, with the existing behavior\n * @default false\n */\n allowMultipleShapesForPoints?: boolean;\n\n /*\n * Optimize line chart rendering for large data set. If this prop is enabled, line chart\n * can easily render over 10K datapoints with multiple lines smoothly.\n * This rendering mechanism does not support gaps in lines.\n */\n optimizeLargeData?: boolean;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * @default false\n * The prop used to enable the perf optimization\n */\n enablePerfOptimization?: boolean;\n\n /**\n * The prop used to define line chart mode(default or scatter)\n * @deprecated this prop no longer used to identify scatter mode\n */\n lineMode?: 'default' | 'scatter';\n}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface IEventsAnnotationProps {\n events: IEventAnnotation[];\n strokeColor?: string;\n labelColor?: string;\n labelHeight?: number;\n labelWidth?: number;\n mergedLabel: (count: number) => string;\n}\n\n/**\n * Line Chart styles\n * {@docCategory LineChart}\n */\nexport interface ILineChartStyles extends ICartesianChartStyles {\n markerLabel?: IStyle;\n}\n\n/**\n * Line Chart style properties\n * {@docCategory LineChart}\n */\nexport interface ILineChartStyleProps extends ICartesianChartStyleProps {}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface IColorFillBarsProps {\n legend: string;\n color: string;\n data: IColorFillBarData[];\n applyPattern?: boolean;\n onLegendClick?: (selectedLegend: string | string[] | null) => void | undefined;\n}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface IColorFillBarData {\n startX: number | Date;\n endX: number | Date;\n}\n"]}
1
+ {"version":3,"file":"LineChart.types.js","sourceRoot":"../src/","sources":["components/LineChart/LineChart.types.ts"],"names":[],"mappings":"","sourcesContent":["import { IRenderFunction, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\nimport {\n IChartProps,\n ILineChartPoints,\n IMargins,\n IBasestate,\n IRefArrayData,\n ICustomizedCalloutData,\n} from '../../types/index';\nimport { IEventAnnotation } from '../../types/IEventAnnotation';\nimport {\n ICartesianChartProps,\n ICartesianChartStyleProps,\n ICartesianChartStyles,\n IChildProps,\n} from '../CommonComponents/index';\nimport { IStyle } from '@fluentui/react/lib/Styling';\n\nexport type { IChildProps, ILineChartPoints, IMargins, IBasestate, IRefArrayData };\n\n/**\n * Line Chart properties\n * {@docCategory LineChart}\n */\nexport interface ILineChartProps extends ICartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data: IChartProps;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<ILineChartStyleProps, ILineChartStyles>;\n\n /**\n * Show event annotation\n */\n eventAnnotationProps?: IEventsAnnotationProps;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: IRenderFunction<ICustomizedCalloutData>;\n\n /**\n * Define a custom callout renderer for a stack; default is to render per data point\n */\n onRenderCalloutPerStack?: IRenderFunction<ICustomizedCalloutData>;\n\n /**\n * Callback for getting callout description message\n */\n getCalloutDescriptionMessage?: (calloutDataProps: ICustomizedCalloutData) => string | undefined;\n\n /*\n * Color fill bars for the chart,\n */\n colorFillBars?: IColorFillBarsProps[];\n\n /**\n * if this is set to true, then for each line there will be a unique shape assigned to the point,\n * there are total 8 shapes which are as follow circle, square, triangele, diamond, pyramid,\n * hexagon, pentagon and octagon, which will get assigned as respectively, if there are more\n * than 8 lines in the line chart then it will again start from cicle to octagon.\n * setting this flag to true will also change the behavior of the points, like for a\n * line, last point shape and first point shape will be visible all the times, and all\n * other points will get enlarge only when hovered over them\n * if set to false default shape will be circle, with the existing behavior\n * @default false\n */\n allowMultipleShapesForPoints?: boolean;\n\n /*\n * Optimize line chart rendering for large data set. If this prop is enabled, line chart\n * can easily render over 10K datapoints with multiple lines smoothly.\n * This rendering mechanism does not support gaps in lines.\n */\n optimizeLargeData?: boolean;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * @default false\n * The prop used to enable the perf optimization\n */\n enablePerfOptimization?: boolean;\n\n /**\n * The prop used to define line chart mode(default or scatter)\n * @deprecated this prop no longer used to identify scatter mode\n */\n lineMode?: 'default' | 'scatter';\n\n /**\n * To enable callout for individual line or complete stack.\n * @default false\n * @type \\{boolean \\}\n */\n isCalloutForStack?: boolean;\n}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface IEventsAnnotationProps {\n events: IEventAnnotation[];\n strokeColor?: string;\n labelColor?: string;\n labelHeight?: number;\n labelWidth?: number;\n mergedLabel: (count: number) => string;\n}\n\n/**\n * Line Chart styles\n * {@docCategory LineChart}\n */\nexport interface ILineChartStyles extends ICartesianChartStyles {\n markerLabel?: IStyle;\n}\n\n/**\n * Line Chart style properties\n * {@docCategory LineChart}\n */\nexport interface ILineChartStyleProps extends ICartesianChartStyleProps {}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface IColorFillBarsProps {\n legend: string;\n color: string;\n data: IColorFillBarData[];\n applyPattern?: boolean;\n onLegendClick?: (selectedLegend: string | string[] | null) => void | undefined;\n}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface IColorFillBarData {\n startX: number | Date;\n endX: number | Date;\n}\n"]}
@@ -25,6 +25,7 @@ define(["require", "exports", "tslib", "react", "d3-shape", "@fluentui/react/lib
25
25
  _updateChart(nextProps);
26
26
  return null;
27
27
  };
28
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
28
29
  Arc.prototype.render = function () {
29
30
  var _this = this;
30
31
  var _a;
@@ -47,6 +48,7 @@ define(["require", "exports", "tslib", "react", "d3-shape", "@fluentui/react/lib
47
48
  _this._arcId = (0, Utilities_1.getId)('piechart_arc');
48
49
  return _this;
49
50
  }
51
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
50
52
  LabeledArc.prototype.render = function () {
51
53
  var _this = this;
52
54
  var _a, _b;
@@ -1 +1 @@
1
- {"version":3,"file":"Arc.js","sourceRoot":"../src/","sources":["components/PieChart/Arc/Arc.tsx"],"names":[],"mappings":";;;;IASA;QAAyB,+BAAqC;QAY5D,aAAmB,KAAgB;YACjC,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAQR,iBAAW,GAAG,UAAC,QAAmB;gBACvC,YAAY,CAAC,QAAQ,CAAC,CAAC;YACzB,CAAC,CAAC;YAgBQ,cAAQ,GAAG;gBACnB,KAAI,CAAC,QAAQ,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;YACxC,CAAC,CAAC;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AAK,CAAC,CAAC,CAAC,OAAO;wBACnG,YAAY,EAAE,UAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,CAAC,CAAC,cAAI,IAAA,sCAAoB,EAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAE;wBAC9E,SAAS,EAAE,UAAU,CAAC,OAAO;qBAC9B,EACD,oBAAoB,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,EAC7C,kBAAkB,EAAE,KAAK,EACzB,QAAQ,EAAE,EAAE,EACZ,WAAW,EAAE,uBAAW,GACxB,CACA,CACL,CAAC;QACJ,CAAC;QACH,iBAAC;IAAD,CAAC,AAxDD,CAAgC,GAAG,GAwDlC;IAxDY,gCAAU;IA0DvB,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 { arc as d3Arc } from 'd3-shape';\nimport { IArcProps, IArcState, IArcStyles } from './Arc.types';\nimport { classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { getStyles } from './Arc.styles';\nimport { wrapContent } from '../../../utilities/utilities';\nimport { SVGTooltipText } from '../../../utilities/SVGTooltipText';\nimport { formatToLocaleString } from '@fluentui/chart-utilities';\n\nexport class Arc extends React.Component<IArcProps, IArcState> {\n public static defaultProps: Partial<IArcProps> = {\n arc: d3Arc(),\n };\n\n protected _arcId: string;\n\n public static getDerivedStateFromProps(nextProps: Readonly<IArcProps>): null {\n _updateChart(nextProps);\n return null;\n }\n\n public constructor(props: IArcProps) {\n super(props);\n this.state = {\n isArcFocused: false,\n };\n\n this._arcId = getId('piechart_arc');\n }\n\n public updateChart = (newProps: IArcProps) => {\n _updateChart(newProps);\n };\n\n public render(): JSX.Element {\n const { arc } = this.props;\n const getClassNames = classNamesFunction<IArcProps, IArcStyles>();\n const classNames = getClassNames(props => getStyles(props, this.props.theme), { ...this.props });\n\n return (\n <path\n d={arc(this.props.data)}\n className={`${this.state.isArcFocused ? classNames.arcRootFocussed : classNames.arcRoot}`}\n onClick={this.props.data?.data.onClick}\n />\n );\n }\n\n protected _onFocus = () => {\n this.setState({ isArcFocused: true });\n };\n\n protected _onBlur = () => {\n this.setState({ isArcFocused: false });\n };\n}\n\nexport class LabeledArc extends Arc {\n private _isRTL = getRTL();\n\n public constructor(props: IArcProps) {\n super(props);\n this._arcId = getId('piechart_arc');\n }\n\n public render(): JSX.Element {\n const { data, culture } = this.props;\n const gap = 4;\n // placing the labels on the outside arc\n const [labelX, labelY] = d3Arc().centroid({\n endAngle: data?.endAngle || 0,\n startAngle: data?.startAngle || 0,\n padAngle: data?.padAngle,\n innerRadius: this.props?.outerRadius || 0,\n outerRadius: this.props?.outerRadius || 0 + gap,\n });\n\n const getClassNames = classNamesFunction<IArcProps, IArcStyles>();\n const classNames = getClassNames(props => getStyles(props, this.props.theme));\n\n const angle = ((data?.startAngle || 0) + (data?.endAngle || 0)) / 2;\n\n const content = `${data?.data.x}-${formatToLocaleString(data?.data.y, culture)}`;\n\n return (\n <g\n className={`${classNames.arc} arc`}\n data-is-focusable={true}\n id={this._arcId}\n onFocus={this._onFocus}\n onBlur={this._onBlur}\n aria-label={content}\n role=\"img\"\n >\n {super.render()}\n <SVGTooltipText\n content={content}\n textProps={{\n x: labelX + (angle > Math.PI ? -10 : 10),\n y: labelY + (angle > Math.PI / 2 && angle < (3 * Math.PI) / 2 ? 10 : -10),\n dominantBaseline: angle > Math.PI / 2 && angle < (3 * Math.PI) / 2 ? 'hanging' : 'auto',\n textAnchor: (!this._isRTL && angle > Math.PI) || (this._isRTL && angle < Math.PI) ? 'end' : 'start',\n 'aria-label': `${data?.data.x}-${formatToLocaleString(data?.data.y, culture)}`,\n className: classNames.arcText,\n }}\n isTooltipVisibleProp={this.state.isArcFocused}\n shouldReceiveFocus={false}\n maxWidth={40}\n wrapContent={wrapContent}\n />\n </g>\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/PieChart/Arc/Arc.tsx"],"names":[],"mappings":";;;;IASA;QAAyB,+BAAqC;QAY5D,aAAmB,KAAgB;YACjC,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAQR,iBAAW,GAAG,UAAC,QAAmB;gBACvC,YAAY,CAAC,QAAQ,CAAC,CAAC;YACzB,CAAC,CAAC;YAiBQ,cAAQ,GAAG;gBACnB,KAAI,CAAC,QAAQ,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;YACxC,CAAC,CAAC;YAEQ,aAAO,GAAG;gBAClB,KAAI,CAAC,QAAQ,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;YACzC,CAAC,CAAC;YAhCA,KAAI,CAAC,KAAK,GAAG;gBACX,YAAY,EAAE,KAAK;aACpB,CAAC;YAEF,KAAI,CAAC,MAAM,GAAG,IAAA,iBAAK,EAAC,cAAc,CAAC,CAAC;;QACtC,CAAC;QAZa,4BAAwB,GAAtC,UAAuC,SAA8B;YACnE,YAAY,CAAC,SAAS,CAAC,CAAC;YACxB,OAAO,IAAI,CAAC;QACd,CAAC;QAeD,4DAA4D;QACrD,oBAAM,GAAb;YAAA,iBAYC;;YAXS,IAAA,GAAG,GAAK,IAAI,CAAC,KAAK,IAAf,CAAgB;YAC3B,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAyB,CAAC;YAClE,IAAM,UAAU,GAAG,aAAa,CAAC,UAAA,KAAK,IAAI,OAAA,IAAA,sBAAS,EAAC,KAAK,EAAE,KAAI,CAAC,KAAK,CAAC,KAAK,C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CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACjD,CAAC","sourcesContent":["import * as React from 'react';\nimport { arc as d3Arc } from 'd3-shape';\nimport { IArcProps, IArcState, IArcStyles } from './Arc.types';\nimport { classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { getStyles } from './Arc.styles';\nimport { wrapContent } from '../../../utilities/utilities';\nimport { SVGTooltipText } from '../../../utilities/SVGTooltipText';\nimport { formatToLocaleString } from '@fluentui/chart-utilities';\n\nexport class Arc extends React.Component<IArcProps, IArcState> {\n public static defaultProps: Partial<IArcProps> = {\n arc: d3Arc(),\n };\n\n protected _arcId: string;\n\n public static getDerivedStateFromProps(nextProps: Readonly<IArcProps>): null {\n _updateChart(nextProps);\n return null;\n }\n\n public constructor(props: IArcProps) {\n super(props);\n this.state = {\n isArcFocused: false,\n };\n\n this._arcId = getId('piechart_arc');\n }\n\n public updateChart = (newProps: IArcProps) => {\n _updateChart(newProps);\n };\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public render(): JSX.Element {\n const { arc } = this.props;\n const getClassNames = classNamesFunction<IArcProps, IArcStyles>();\n const classNames = getClassNames(props => getStyles(props, this.props.theme), { ...this.props });\n\n return (\n <path\n d={arc(this.props.data)}\n className={`${this.state.isArcFocused ? classNames.arcRootFocussed : classNames.arcRoot}`}\n onClick={this.props.data?.data.onClick}\n />\n );\n }\n\n protected _onFocus = () => {\n this.setState({ isArcFocused: true });\n };\n\n protected _onBlur = () => {\n this.setState({ isArcFocused: false });\n };\n}\n\nexport class LabeledArc extends Arc {\n private _isRTL = getRTL();\n\n public constructor(props: IArcProps) {\n super(props);\n this._arcId = getId('piechart_arc');\n }\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public render(): JSX.Element {\n const { data, culture } = this.props;\n const gap = 4;\n // placing the labels on the outside arc\n const [labelX, labelY] = d3Arc().centroid({\n endAngle: data?.endAngle || 0,\n startAngle: data?.startAngle || 0,\n padAngle: data?.padAngle,\n innerRadius: this.props?.outerRadius || 0,\n outerRadius: this.props?.outerRadius || 0 + gap,\n });\n\n const getClassNames = classNamesFunction<IArcProps, IArcStyles>();\n const classNames = getClassNames(props => getStyles(props, this.props.theme));\n\n const angle = ((data?.startAngle || 0) + (data?.endAngle || 0)) / 2;\n\n const content = `${data?.data.x}-${formatToLocaleString(data?.data.y, culture)}`;\n\n return (\n <g\n className={`${classNames.arc} arc`}\n data-is-focusable={true}\n id={this._arcId}\n onFocus={this._onFocus}\n onBlur={this._onBlur}\n aria-label={content}\n role=\"img\"\n >\n {super.render()}\n <SVGTooltipText\n content={content}\n textProps={{\n x: labelX + (angle > Math.PI ? -10 : 10),\n y: labelY + (angle > Math.PI / 2 && angle < (3 * Math.PI) / 2 ? 10 : -10),\n dominantBaseline: angle > Math.PI / 2 && angle < (3 * Math.PI) / 2 ? 'hanging' : 'auto',\n textAnchor: (!this._isRTL && angle > Math.PI) || (this._isRTL && angle < Math.PI) ? 'end' : 'start',\n 'aria-label': `${data?.data.x}-${formatToLocaleString(data?.data.y, culture)}`,\n className: classNames.arcText,\n }}\n isTooltipVisibleProp={this.state.isArcFocused}\n shouldReceiveFocus={false}\n maxWidth={40}\n wrapContent={wrapContent}\n />\n </g>\n );\n }\n}\n\nfunction _updateChart(newProps: IArcProps): void {\n newProps.arc.innerRadius(newProps.innerRadius);\n newProps.arc.outerRadius(newProps.outerRadius);\n}\n"]}
@@ -6,11 +6,13 @@ define(["require", "exports", "tslib", "react", "d3-shape", "d3-scale", "../Arc/
6
6
  tslib_1.__extends(Pie, _super);
7
7
  function Pie(props) {
8
8
  var _this = _super.call(this, props) || this;
9
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
9
10
  _this.arcGenerator = function (d, i) {
10
11
  return (React.createElement(Arc_1.LabeledArc, { culture: _this.props.culture, key: i, data: d, innerRadius: _this.props.innerRadius, outerRadius: _this.props.outerRadius, color: "".concat(_this.colors(i)), theme: _this.props.theme }));
11
12
  };
12
13
  return _this;
13
14
  }
15
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
14
16
  Pie.prototype.render = function () {
15
17
  var _this = this;
16
18
  // const getClassNames = classNamesFunction<IPieProps, IPieStyles>();
@@ -1 +1 @@
1
- {"version":3,"file":"Pie.js","sourceRoot":"../src/","sources":["components/PieChart/Pie/Pie.tsx"],"names":[],"mappings":";;;;IASA;QAAyB,+BAA8B;QAUrD,aAAY,KAAgB;YAC1B,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAGR,kBAAY,GAAG,UAAC,CAAW,EAAE,CAAS;gBAC3C,OAAO,CACL,oBAAC,gBAAU,IACT,OAAO,EAAE,KAAI,CAAC,KAAK,CAAC,OAAO,EAC3B,GAAG,EAAE,CAAC,EACN,IAAI,EAAE,CAAC,EACP,WAAW,EAAE,KAAI,CAAC,KAAK,CAAC,WAAW,EACnC,WAAW,EAAE,KAAI,CAAC,KAAK,CAAC,WAAW,EACnC,KAAK,EAAE,UAAG,KAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAE,EAC1B,KAAK,EAAE,KAAI,CAAC,KAAK,CAAC,KAAK,GACvB,CACH,CAAC;YACJ,CAAC,CAAC;;QAdF,CAAC;QAgBM,oBAAM,GAAb;YAAA,iBA0BC;YAzBC,qEAAqE;YAC/D,IAAA,KAAkD,IAAI,CAAC,KAAK,EAA1D,GAAG,SAAA,EAAE,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,MAAM,YAAA,EAAE,UAAU,gBAAA,EAAE,KAAK,WAAe,CAAC;YAEnE,IAAM,aAAa,GAAkB,EAAE,CAAC;YACxC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;gBAC/B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;oBACrC,aAAa,CAAC,IAAI,CAAC,IAAA,qBAAY,EAAC,CAAC,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 'd3-shape';\nimport { ScaleOrdinal, scaleOrdinal } from 'd3-scale';\nimport { IPieProps } from './Pie.types';\nimport { LabeledArc } from '../Arc/Arc';\nimport { IArcData } from '../Arc/Arc.types';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport { getColorFromToken, getNextColor } from '../../../utilities/colors';\n\nexport class Pie extends React.Component<IPieProps, {}> {\n public static defaultProps: Partial<IPieProps> = {\n pie: d3Pie()\n .padAngle(0.01)\n .sort(null)\n /* eslint-disable @typescript-eslint/no-explicit-any */\n .value((d: any) => d.y),\n };\n private colors: ScaleOrdinal<string | number, any>;\n\n constructor(props: IPieProps) {\n super(props);\n }\n\n public arcGenerator = (d: IArcData, i: number): JSX.Element => {\n return (\n <LabeledArc\n culture={this.props.culture}\n key={i}\n data={d}\n innerRadius={this.props.innerRadius}\n outerRadius={this.props.outerRadius}\n color={`${this.colors(i)}`}\n theme={this.props.theme}\n />\n );\n };\n\n public render(): JSX.Element {\n // const getClassNames = classNamesFunction<IPieProps, IPieStyles>();\n const { pie, data, width, height, chartTitle, theme } = this.props;\n\n const defaultColors: Array<string> = [];\n if (data && !this.props.colors) {\n for (let i = 0; i < data.length; i++) {\n defaultColors.push(getNextColor(i, 0, theme?.isInverted));\n }\n }\n const { colors = defaultColors } = this.props;\n\n this.colors = scaleOrdinal().range(colors.map(color => getColorFromToken(color)));\n\n const piechart = pie(data);\n const translate = `translate(${width / 2}, ${height / 2})`;\n\n return (\n <FocusZone direction={FocusZoneDirection.domOrder}>\n <svg width={width} height={height} aria-label={chartTitle}>\n <g className=\"pie\" transform={translate}>\n {piechart.map((d: IArcData, i: number) => this.arcGenerator(d, i))}\n </g>\n </svg>\n </FocusZone>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"Pie.js","sourceRoot":"../src/","sources":["components/PieChart/Pie/Pie.tsx"],"names":[],"mappings":";;;;IASA;QAAyB,+BAA8B;QAUrD,aAAY,KAAgB;YAC1B,YAAA,MAAK,YAAC,KAAK,C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,KAAK,IAAI,OAAA,IAAA,0BAAiB,EAAC,KAAK,CAAC,EAAxB,CAAwB,CAAC,CAAC,CAAC;YAElF,IAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;YAC3B,IAAM,SAAS,GAAG,oBAAa,KAAK,GAAG,CAAC,eAAK,MAAM,GAAG,CAAC,MAAG,CAAC;YAE3D,OAAO,CACL,oBAAC,uBAAS,IAAC,SAAS,EAAE,gCAAkB,CAAC,QAAQ;gBAC/C,6BAAK,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAc,UAAU;oBACvD,2BAAG,SAAS,EAAC,KAAK,EAAC,SAAS,EAAE,SAAS,IACpC,QAAQ,CAAC,GAAG,CAAC,UAAC,CAAW,EAAE,CAAS,IAAK,OAAA,KAAI,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,EAAvB,CAAuB,CAAC,CAChE,CACA,CACI,CACb,CAAC;QACJ,CAAC;QAvDa,gBAAY,GAAuB;YAC/C,GAAG,EAAE,IAAA,cAAK,GAAE;iBACT,QAAQ,CAAC,IAAI,CAAC;iBACd,IAAI,CAAC,IAAI,CAAC;gBACX,uDAAuD;iBACtD,KAAK,CAAC,UAAC,CAAM,IAAK,OAAA,CAAC,CAAC,CAAC,EAAH,CAAG,CAAC;SAC1B,AANyB,CAMxB;QAkDJ,UAAC;KAAA,AAzDD,CAAyB,KAAK,CAAC,SAAS,GAyDvC;IAzDY,kBAAG","sourcesContent":["import * as React from 'react';\nimport { pie as d3Pie } from 'd3-shape';\nimport { ScaleOrdinal, scaleOrdinal } from 'd3-scale';\nimport { IPieProps } from './Pie.types';\nimport { LabeledArc } from '../Arc/Arc';\nimport { IArcData } from '../Arc/Arc.types';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport { getColorFromToken, getNextColor } from '../../../utilities/colors';\n\nexport class Pie extends React.Component<IPieProps, {}> {\n public static defaultProps: Partial<IPieProps> = {\n pie: d3Pie()\n .padAngle(0.01)\n .sort(null)\n /* eslint-disable @typescript-eslint/no-explicit-any */\n .value((d: any) => d.y),\n };\n private colors: ScaleOrdinal<string | number, any>;\n\n constructor(props: IPieProps) {\n super(props);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public arcGenerator = (d: IArcData, i: number): JSX.Element => {\n return (\n <LabeledArc\n culture={this.props.culture}\n key={i}\n data={d}\n innerRadius={this.props.innerRadius}\n outerRadius={this.props.outerRadius}\n color={`${this.colors(i)}`}\n theme={this.props.theme}\n />\n );\n };\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public render(): JSX.Element {\n // const getClassNames = classNamesFunction<IPieProps, IPieStyles>();\n const { pie, data, width, height, chartTitle, theme } = this.props;\n\n const defaultColors: Array<string> = [];\n if (data && !this.props.colors) {\n for (let i = 0; i < data.length; i++) {\n defaultColors.push(getNextColor(i, 0, theme?.isInverted));\n }\n }\n const { colors = defaultColors } = this.props;\n\n this.colors = scaleOrdinal().range(colors.map(color => getColorFromToken(color)));\n\n const piechart = pie(data);\n const translate = `translate(${width / 2}, ${height / 2})`;\n\n return (\n <FocusZone direction={FocusZoneDirection.domOrder}>\n <svg width={width} height={height} aria-label={chartTitle}>\n <g className=\"pie\" transform={translate}>\n {piechart.map((d: IArcData, i: number) => this.arcGenerator(d, i))}\n </g>\n </svg>\n </FocusZone>\n );\n }\n}\n"]}
@@ -10,6 +10,7 @@ define(["require", "exports", "tslib", "react", "@fluentui/react/lib/Utilities",
10
10
  _this._emptyChartId = (0, Utilities_1.getId)('_PieChart_empty');
11
11
  return _this;
12
12
  }
13
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
13
14
  PieChartBase.prototype.render = function () {
14
15
  var _a = this.props, data = _a.data, width = _a.width, height = _a.height, colors = _a.colors, chartTitle = _a.chartTitle;
15
16
  var _b = this.props, theme = _b.theme, className = _b.className, styles = _b.styles, culture = _b.culture;
@@ -1 +1 @@
1
- {"version":3,"file":"PieChart.base.js","sourceRoot":"../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AAC,KAAK,CAAC,UAAU,CAAK;gBAChG,oBAAC,SAAG,IACF,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAM,GAAG,CAAC,GAAG,OAAO,EAC3B,MAAM,EAAE,MAAO,GAAG,CAAC,GAAG,OAAO,EAC7B,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,CAAC,EACd,IAAI,EAAE,IAAK,EACX,MAAM,EAAE,MAAO,EACf,UAAU,EAAE,UAAW,EACvB,KAAK,EAAE,KAAK,GACZ,CACE,CACP,CAAC,CAAC,CAAC,CACF,6BACE,EAAE,EAAE,IAAI,CAAC,aAAa,EACtB,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,gBACX,8BAA8B,GAC1C,CACH,CAAC;QACJ,CAAC;QAEO,oCAAa,GAArB;YACE,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,CAAC,GAAG,CAAC,EAAV,CAAU,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACnH,CAAC;QA/Da,yBAAY,GAA4B;YACpD,IAAI,EAAE,EAAE;YACR,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,GAAG;SACZ,CAAC;QA4DJ,mBAAC;KAAA,AAjED,CAAkC,KAAK,CAAC,SAAS,GAiEhD;IAjEY,oCAAY","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, getId } from '@fluentui/react/lib/Utilities';\nimport { IPieChartProps, IPieChartStyleProps, IPieChartStyles } from './PieChart.types';\nimport { Pie } from './Pie/Pie';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\n\nconst getClassNames = classNamesFunction<IPieChartStyleProps, IPieChartStyles>();\n\nexport class PieChartBase extends React.Component<IPieChartProps, {}> {\n public static defaultProps: Partial<IPieChartProps> = {\n data: [],\n width: 600,\n height: 350,\n };\n private _classNames: IProcessedStyleSet<IPieChartStyles>;\n private _emptyChartId: string;\n\n public constructor(props: IPieChartProps) {\n super(props);\n this._emptyChartId = getId('_PieChart_empty');\n }\n\n public render(): JSX.Element {\n const { data, width, height, colors, chartTitle } = this.props;\n\n const { theme, className, styles, culture } = this.props;\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n width: width!,\n height: height!,\n className,\n });\n\n const TEXT_MAX_WIDTH = 40;\n const TEXT_LINE_HEIGHT = 16;\n const PADDING = 4;\n\n /**\n * The radius for the pie chart is computed based on the space available inside the svg\n * after subtracting the max amount of space that can be used by the text in pie chart\n */\n\n const radius = Math.min(width! - 2 * TEXT_MAX_WIDTH, height! - 2 * TEXT_LINE_HEIGHT) / 2;\n const outerRadius = radius;\n\n return !this._isChartEmpty() ? (\n <div className={this._classNames.root}>\n {this.props.chartTitle && <p className={this._classNames.chartTitle}>{this.props.chartTitle}</p>}\n <Pie\n culture={culture}\n width={width! + 2 * PADDING}\n height={height! + 2 * PADDING}\n outerRadius={outerRadius}\n innerRadius={1}\n data={data!}\n colors={colors!}\n chartTitle={chartTitle!}\n theme={theme}\n />\n </div>\n ) : (\n <div\n id={this._emptyChartId}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\n />\n );\n }\n\n private _isChartEmpty(): boolean {\n return !(this.props.data && this.props.data.length > 0 && this.props.data.filter(item => item.y > 0).length > 0);\n }\n}\n"]}
1
+ {"version":3,"file":"PieChart.base.js","sourceRoot":"../src/","sources":["components/PieChart/PieChart.base.tsx"],"names":[],"mappings":";;;;IAMA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAwC,CAAC;IAEjF;QAAkC,wCAAmC;QASnE,sBAAmB,KAAqB;YACtC,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YACb,KAAI,CAAC,aAAa,GAAG,IAAA,iBAAK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AAC,EACd,IAAI,EAAE,IAAK,EACX,MAAM,EAAE,MAAO,EACf,UAAU,EAAE,UAAW,EACvB,KAAK,EAAE,KAAK,GACZ,CACE,CACP,CAAC,CAAC,CAAC,CACF,6BACE,EAAE,EAAE,IAAI,CAAC,aAAa,EACtB,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,gBACX,8BAA8B,GAC1C,CACH,CAAC;QACJ,CAAC;QAEO,oCAAa,GAArB;YACE,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,CAAC,GAAG,CAAC,EAAV,CAAU,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACnH,CAAC;QAhEa,yBAAY,GAA4B;YACpD,IAAI,EAAE,EAAE;YACR,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,GAAG;SACZ,CAAC;QA6DJ,mBAAC;KAAA,AAlED,CAAkC,KAAK,CAAC,SAAS,GAkEhD;IAlEY,oCAAY","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, getId } from '@fluentui/react/lib/Utilities';\nimport { IPieChartProps, IPieChartStyleProps, IPieChartStyles } from './PieChart.types';\nimport { Pie } from './Pie/Pie';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\n\nconst getClassNames = classNamesFunction<IPieChartStyleProps, IPieChartStyles>();\n\nexport class PieChartBase extends React.Component<IPieChartProps, {}> {\n public static defaultProps: Partial<IPieChartProps> = {\n data: [],\n width: 600,\n height: 350,\n };\n private _classNames: IProcessedStyleSet<IPieChartStyles>;\n private _emptyChartId: string;\n\n public constructor(props: IPieChartProps) {\n super(props);\n this._emptyChartId = getId('_PieChart_empty');\n }\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public render(): JSX.Element {\n const { data, width, height, colors, chartTitle } = this.props;\n\n const { theme, className, styles, culture } = this.props;\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n width: width!,\n height: height!,\n className,\n });\n\n const TEXT_MAX_WIDTH = 40;\n const TEXT_LINE_HEIGHT = 16;\n const PADDING = 4;\n\n /**\n * The radius for the pie chart is computed based on the space available inside the svg\n * after subtracting the max amount of space that can be used by the text in pie chart\n */\n\n const radius = Math.min(width! - 2 * TEXT_MAX_WIDTH, height! - 2 * TEXT_LINE_HEIGHT) / 2;\n const outerRadius = radius;\n\n return !this._isChartEmpty() ? (\n <div className={this._classNames.root}>\n {this.props.chartTitle && <p className={this._classNames.chartTitle}>{this.props.chartTitle}</p>}\n <Pie\n culture={culture}\n width={width! + 2 * PADDING}\n height={height! + 2 * PADDING}\n outerRadius={outerRadius}\n innerRadius={1}\n data={data!}\n colors={colors!}\n chartTitle={chartTitle!}\n theme={theme}\n />\n </div>\n ) : (\n <div\n id={this._emptyChartId}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\n />\n );\n }\n\n private _isChartEmpty(): boolean {\n return !(this.props.data && this.props.data.length > 0 && this.props.data.filter(item => item.y > 0).length > 0);\n }\n}\n"]}
@@ -61,15 +61,23 @@ define(["require", "exports", "tslib", "react", "@fluentui/react"], function (re
61
61
  }
62
62
  }
63
63
  return React.Children.map(props.children, function (child) {
64
- var _a;
64
+ var _a, _b, _c, _d, _e, _f;
65
+ var commonStyles = {
66
+ root: tslib_1.__assign(tslib_1.__assign({}, (_a = child.props.styles) === null || _a === void 0 ? void 0 : _a.root), { width: '100%', height: '100%' }),
67
+ chartWrapper: tslib_1.__assign(tslib_1.__assign({}, (_b = child.props.styles) === null || _b === void 0 ? void 0 : _b.chartWrapper), { width: '100%' }),
68
+ chart: tslib_1.__assign(tslib_1.__assign({}, (_c = child.props.styles) === null || _c === void 0 ? void 0 : _c.chart), {
69
+ // This overrides the pixel width of svg allowing it to resize properly within a flexbox or grid layout.
70
+ // Note: height is not set to 100% because that causes the charts to resize vertically in an infinite loop.
71
+ width: '100%' }),
72
+ };
65
73
  return React.cloneElement(child, {
66
74
  width: calculatedWidth,
67
75
  height: calculatedHeight,
76
+ // For SankeyChart
68
77
  shouldResize: (calculatedWidth !== null && calculatedWidth !== void 0 ? calculatedWidth : 0) + (calculatedHeight !== null && calculatedHeight !== void 0 ? calculatedHeight : 0),
69
- styles: tslib_1.__assign(tslib_1.__assign({}, child.props.styles), { root: tslib_1.__assign(tslib_1.__assign({}, (_a = child.props.styles) === null || _a === void 0 ? void 0 : _a.root), {
70
- // Ensure the child element fills the parent container
71
- // https://stackoverflow.com/questions/8468066/child-inside-parent-with-min-height-100-not-inheriting-height
72
- width: calculatedWidth, height: calculatedHeight }) }),
78
+ styles: tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, child.props.styles), commonStyles), {
79
+ // For HeatMapChart
80
+ subComponentStyles: tslib_1.__assign(tslib_1.__assign({}, (_d = child.props.styles) === null || _d === void 0 ? void 0 : _d.subComponentStyles), { cartesianStyles: tslib_1.__assign(tslib_1.__assign({}, (_f = (_e = child.props.styles) === null || _e === void 0 ? void 0 : _e.subComponentStyles) === null || _f === void 0 ? void 0 : _f.cartesianStyles), commonStyles) }) }),
73
81
  });
74
82
  });
75
83
  }, [size, props.aspect, props.maxHeight, props.children]);
@@ -1 +1 @@
1
- {"version":3,"file":"ResponsiveContainer.js","sourceRoot":"../src/","sources":["components/ResponsiveContainer/ResponsiveContainer.tsx"],"names":[],"mappings":";;;;IAIA;;;OAGG;IACI,IAAM,mBAAmB,GAAwC,UAAA,KAAK;;QAC3E,IAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;QACxD,IAAM,WAAW,GAAG,KAAK,CAAC,MAAM,EAAyC,CAAC;QAEpE,IAAA,KAAkB,KAAK,CAAC,QAAQ,CAAwD,EAAE,CAAC,EAA1F,IAAI,QAAA,EAA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AC;oBAC9D,MAAM,wCAED,KAAK,CAAC,KAAK,CAAC,MAAM,KACrB,IAAI,wCACC,MAAA,KAAK,CAAC,KAAK,CAAC,MAAM,0CAAE,IAAI;4BAC3B,sDAAsD;4BACtD,4GAA4G;4BAC5G,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,gBAAgB,MAE3B;iBACF,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;QAE1D,OAAO,CACL,6BACE,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE;gBACL,KAAK,EAAE,MAAA,KAAK,CAAC,KAAK,mCAAI,MAAM;gBAC5B,MAAM,EAAE,MAAA,KAAK,CAAC,MAAM,mCAAI,MAAM;gBAC9B,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,SAAS,EAAE,KAAK,CAAC,SAAS;aAC3B,IAEA,YAAY,CACT,CACP,CAAC;IACJ,CAAC,CAAC;IAjGW,QAAA,mBAAmB,uBAiG9B","sourcesContent":["import * as React from 'react';\nimport { getWindow } from '@fluentui/react';\nimport { IResponsiveChildProps, IResponsiveContainerProps } from './ResponsiveContainer.types';\n\n/**\n * Responsive Container component\n * {@docCategory ResponsiveContainer}\n */\nexport const ResponsiveContainer: React.FC<IResponsiveContainerProps> = props => {\n const containerRef = React.useRef<HTMLDivElement>(null);\n const onResizeRef = React.useRef<IResponsiveContainerProps['onResize']>();\n\n const [size, setSize] = React.useState<{ containerWidth?: number; containerHeight?: number }>({});\n\n onResizeRef.current = props.onResize;\n\n React.useEffect(() => {\n const _window = getWindow(containerRef.current) as (Window & typeof globalThis) | undefined;\n let animationFrameId: number | undefined;\n let resizeObserver: ResizeObserver | undefined;\n\n const resizeCallback = (entries: ResizeObserverEntry[]) => {\n const { width: containerWidth, height: containerHeight } = entries[0].contentRect;\n // rAF is an alternative to the throttle function. For more info, see:\n // https://css-tricks.com/debouncing-throttling-explained-examples/#aa-requestanimationframe-raf\n animationFrameId = _window?.requestAnimationFrame(() => {\n setSize(prevSize => {\n const roundedWidth = Math.floor(containerWidth);\n const roundedHeight = Math.floor(containerHeight);\n if (prevSize.containerWidth === roundedWidth && prevSize.containerHeight === roundedHeight) {\n return prevSize;\n }\n\n return { containerWidth: roundedWidth, containerHeight: roundedHeight };\n });\n });\n onResizeRef.current?.(containerWidth, containerHeight);\n };\n\n if (_window && _window.ResizeObserver) {\n resizeObserver = new _window.ResizeObserver(resizeCallback);\n if (containerRef.current) {\n resizeObserver.observe(containerRef.current);\n }\n }\n\n return () => {\n if (animationFrameId) {\n _window?.cancelAnimationFrame(animationFrameId);\n }\n\n resizeObserver?.disconnect();\n };\n }, []);\n\n const chartContent = React.useMemo(() => {\n let calculatedWidth = size.containerWidth;\n let calculatedHeight = size.containerHeight;\n\n if (typeof props.aspect === 'number' && props.aspect > 0) {\n if (calculatedWidth) {\n calculatedHeight = calculatedWidth / props.aspect;\n } else if (calculatedHeight) {\n calculatedWidth = calculatedHeight * props.aspect;\n }\n\n if (typeof props.maxHeight === 'number' && calculatedHeight && calculatedHeight > props.maxHeight) {\n calculatedHeight = props.maxHeight;\n }\n }\n\n return React.Children.map(props.children, child => {\n return React.cloneElement<IResponsiveChildProps>(child, {\n width: calculatedWidth,\n height: calculatedHeight,\n shouldResize: (calculatedWidth ?? 0) + (calculatedHeight ?? 0),\n styles: {\n // Keep components styles\n ...child.props.styles,\n root: {\n ...child.props.styles?.root,\n // Ensure the child element fills the parent container\n // https://stackoverflow.com/questions/8468066/child-inside-parent-with-min-height-100-not-inheriting-height\n width: calculatedWidth,\n height: calculatedHeight,\n },\n },\n });\n });\n }, [size, props.aspect, props.maxHeight, props.children]);\n\n return (\n <div\n ref={containerRef}\n style={{\n width: props.width ?? '100%',\n height: props.height ?? '100%',\n minWidth: props.minWidth,\n minHeight: props.minHeight,\n maxHeight: props.maxHeight,\n }}\n >\n {chartContent}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"ResponsiveContainer.js","sourceRoot":"../src/","sources":["components/ResponsiveContainer/ResponsiveContainer.tsx"],"names":[],"mappings":";;;;IAIA;;;OAGG;IACI,IAAM,mBAAmB,GAAwC,UAAA,KAAK;;QAC3E,IAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;QACxD,IAAM,WAAW,GAAG,KAAK,CAAC,MAAM,EAAyC,CAAC;QAEpE,IAAA,KAAkB,KAAK,CAAC,QAAQ,CAAwD,EAAE,CAAC,EAA1F,IAAI,QAAA,EAAE,OAAO,QAA6E,CAAC;QAElG,WAAW,CAAC,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC;QAErC,KAAK,CAAC,SAAS,CAAC;YACd,IAAM,OAAO,GAAG,IAAA,iBAAS,EAAC,YAAY,CAAC,OAAO,CAA6C,CAAC;YAC5F,IAAI,gBAAoC,CAAC;YACzC,IAAI,cAA0C,CAAC;YAE/C,IAAM,cAAc,GAAG,UAAC,OAA8B;;gBAC9C,IAAA,KAAqD,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,EAAlE,cAAc,WAAA,EAAU,eAAe,YAA2B,CAAC;gBAClF,sEAAsE;gBACtE,gGAAgG;gBAChG,gBAAgB,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,qBAAqB,CAAC;oBAChD,OAAO,CAAC,UAAA,QAAQ;wBACd,IAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;wBAChD,IAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;wBAClD,IAAI,QAAQ,CAAC,cAAc,KAAK,YAAY,IAAI,QAAQ,CAAC,eAAe,KAAK,aAAa,EAAE,CAAC;4BAC3F,OAAO,QAAQ,CAAC;wBAClB,CAAC;wBAED,OAAO,EA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AAC,QAAQ,CAAC,CAAC,CAAC;QAE1D,OAAO,CACL,6BACE,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE;gBACL,KAAK,EAAE,MAAA,KAAK,CAAC,KAAK,mCAAI,MAAM;gBAC5B,MAAM,EAAE,MAAA,KAAK,CAAC,MAAM,mCAAI,MAAM;gBAC9B,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,SAAS,EAAE,KAAK,CAAC,SAAS;aAC3B,IAEA,YAAY,CACT,CACP,CAAC;IACJ,CAAC,CAAC;IAtHW,QAAA,mBAAmB,uBAsH9B","sourcesContent":["import * as React from 'react';\nimport { getWindow } from '@fluentui/react';\nimport { IResponsiveChildProps, IResponsiveContainerProps } from './ResponsiveContainer.types';\n\n/**\n * Responsive Container component\n * {@docCategory ResponsiveContainer}\n */\nexport const ResponsiveContainer: React.FC<IResponsiveContainerProps> = props => {\n const containerRef = React.useRef<HTMLDivElement>(null);\n const onResizeRef = React.useRef<IResponsiveContainerProps['onResize']>();\n\n const [size, setSize] = React.useState<{ containerWidth?: number; containerHeight?: number }>({});\n\n onResizeRef.current = props.onResize;\n\n React.useEffect(() => {\n const _window = getWindow(containerRef.current) as (Window & typeof globalThis) | undefined;\n let animationFrameId: number | undefined;\n let resizeObserver: ResizeObserver | undefined;\n\n const resizeCallback = (entries: ResizeObserverEntry[]) => {\n const { width: containerWidth, height: containerHeight } = entries[0].contentRect;\n // rAF is an alternative to the throttle function. For more info, see:\n // https://css-tricks.com/debouncing-throttling-explained-examples/#aa-requestanimationframe-raf\n animationFrameId = _window?.requestAnimationFrame(() => {\n setSize(prevSize => {\n const roundedWidth = Math.floor(containerWidth);\n const roundedHeight = Math.floor(containerHeight);\n if (prevSize.containerWidth === roundedWidth && prevSize.containerHeight === roundedHeight) {\n return prevSize;\n }\n\n return { containerWidth: roundedWidth, containerHeight: roundedHeight };\n });\n });\n onResizeRef.current?.(containerWidth, containerHeight);\n };\n\n if (_window && _window.ResizeObserver) {\n resizeObserver = new _window.ResizeObserver(resizeCallback);\n if (containerRef.current) {\n resizeObserver.observe(containerRef.current);\n }\n }\n\n return () => {\n if (animationFrameId) {\n _window?.cancelAnimationFrame(animationFrameId);\n }\n\n resizeObserver?.disconnect();\n };\n }, []);\n\n const chartContent = React.useMemo(() => {\n let calculatedWidth = size.containerWidth;\n let calculatedHeight = size.containerHeight;\n\n if (typeof props.aspect === 'number' && props.aspect > 0) {\n if (calculatedWidth) {\n calculatedHeight = calculatedWidth / props.aspect;\n } else if (calculatedHeight) {\n calculatedWidth = calculatedHeight * props.aspect;\n }\n\n if (typeof props.maxHeight === 'number' && calculatedHeight && calculatedHeight > props.maxHeight) {\n calculatedHeight = props.maxHeight;\n }\n }\n\n return React.Children.map(props.children, child => {\n const commonStyles = {\n root: {\n ...child.props.styles?.root,\n width: '100%',\n height: '100%',\n },\n chartWrapper: {\n ...child.props.styles?.chartWrapper,\n width: '100%',\n },\n chart: {\n ...child.props.styles?.chart,\n // This overrides the pixel width of svg allowing it to resize properly within a flexbox or grid layout.\n // Note: height is not set to 100% because that causes the charts to resize vertically in an infinite loop.\n width: '100%',\n },\n };\n\n return React.cloneElement<IResponsiveChildProps>(child, {\n width: calculatedWidth,\n height: calculatedHeight,\n // For SankeyChart\n shouldResize: (calculatedWidth ?? 0) + (calculatedHeight ?? 0),\n styles: {\n // Keep components styles\n ...child.props.styles,\n ...commonStyles,\n // For HeatMapChart\n subComponentStyles: {\n ...child.props.styles?.subComponentStyles,\n cartesianStyles: {\n ...child.props.styles?.subComponentStyles?.cartesianStyles,\n ...commonStyles,\n },\n },\n },\n });\n });\n }, [size, props.aspect, props.maxHeight, props.children]);\n\n return (\n <div\n ref={containerRef}\n style={{\n width: props.width ?? '100%',\n height: props.height ?? '100%',\n minWidth: props.minWidth,\n minHeight: props.minHeight,\n maxHeight: props.maxHeight,\n }}\n >\n {chartContent}\n </div>\n );\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { IStyle, IStyleFunctionOrObject } from '@fluentui/react';
2
+ import { IStyleFunctionOrObject } from '@fluentui/react';
3
3
  /**
4
4
  * Responsive Child props
5
5
  * {@docCategory ResponsiveContainer}
@@ -8,9 +8,7 @@ export interface IResponsiveChildProps {
8
8
  width?: number;
9
9
  height?: number;
10
10
  shouldResize?: number;
11
- styles?: IStyleFunctionOrObject<{}, {
12
- root: IStyle;
13
- }>;
11
+ styles?: IStyleFunctionOrObject<any, any>;
14
12
  }
15
13
  /**
16
14
  * Responsive Container props
@@ -1 +1 @@
1
- {"version":3,"file":"ResponsiveContainer.types.js","sourceRoot":"../src/","sources":["components/ResponsiveContainer/ResponsiveContainer.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { IStyle, IStyleFunctionOrObject } from '@fluentui/react';\n\n/**\n * Responsive Child props\n * {@docCategory ResponsiveContainer}\n */\nexport interface IResponsiveChildProps {\n width?: number;\n height?: number;\n shouldResize?: number;\n styles?: IStyleFunctionOrObject<{}, { root: IStyle }>;\n}\n\n/**\n * Responsive Container props\n * {@docCategory ResponsiveContainer}\n */\nexport interface IResponsiveContainerProps {\n /**\n * Aspect ratio (width / height) of the container. If specified, the height will be calculated by width / aspect.\n */\n aspect?: number;\n\n /**\n * Width of the container\n */\n width?: number | string;\n\n /**\n * Height of the container\n */\n height?: number | string;\n\n /**\n * Minimum width of the container\n */\n minWidth?: number | string;\n\n /**\n * Minimum height of the container\n */\n minHeight?: number | string;\n\n /**\n * Maximum height of the container\n */\n maxHeight?: number;\n\n /**\n * Callback providing the updated chart width and height values when the container is resized\n */\n onResize?: (width: number, height: number) => void;\n\n /**\n * Child component to be rendered within the container\n */\n children: React.ReactElement<IResponsiveChildProps>;\n}\n"]}
1
+ {"version":3,"file":"ResponsiveContainer.types.js","sourceRoot":"../src/","sources":["components/ResponsiveContainer/ResponsiveContainer.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { IStyleFunctionOrObject } from '@fluentui/react';\n\n/**\n * Responsive Child props\n * {@docCategory ResponsiveContainer}\n */\nexport interface IResponsiveChildProps {\n width?: number;\n height?: number;\n shouldResize?: number;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n styles?: IStyleFunctionOrObject<any, any>;\n}\n\n/**\n * Responsive Container props\n * {@docCategory ResponsiveContainer}\n */\nexport interface IResponsiveContainerProps {\n /**\n * Aspect ratio (width / height) of the container. If specified, the height will be calculated by width / aspect.\n */\n aspect?: number;\n\n /**\n * Width of the container\n */\n width?: number | string;\n\n /**\n * Height of the container\n */\n height?: number | string;\n\n /**\n * Minimum width of the container\n */\n minWidth?: number | string;\n\n /**\n * Minimum height of the container\n */\n minHeight?: number | string;\n\n /**\n * Maximum height of the container\n */\n maxHeight?: number;\n\n /**\n * Callback providing the updated chart width and height values when the container is resized\n */\n onResize?: (width: number, height: number) => void;\n\n /**\n * Child component to be rendered within the container\n */\n children: React.ReactElement<IResponsiveChildProps>;\n}\n"]}
@@ -253,16 +253,14 @@ define(["require", "exports", "tslib", "@fluentui/react-focus", "@fluentui/react
253
253
  // This is exported for unit tests.
254
254
  function preRenderLayout(margins, containerWidth, containerHeight, isRtl) {
255
255
  var left = margins.left, right = margins.right, top = margins.top, bottom = margins.bottom;
256
- var width = containerWidth - right;
257
- var height = containerHeight - bottom > 0 ? containerHeight - bottom : 0;
258
256
  var sankey = (0, d3_sankey_1.sankey)()
259
257
  .nodeWidth(NODE_WIDTH)
260
258
  .extent([
261
259
  [left, top],
262
- [width - 1, height - 6],
260
+ [containerWidth - right, containerHeight - bottom],
263
261
  ])
264
262
  .nodeAlign(isRtl ? d3_sankey_1.sankeyRight : d3_sankey_1.sankeyJustify);
265
- return { sankey: sankey, height: height, width: width };
263
+ return { sankey: sankey, height: containerHeight, width: containerWidth };
266
264
  }
267
265
  exports.preRenderLayout = preRenderLayout;
268
266
  var elipsis = '...';
@@ -597,7 +595,7 @@ define(["require", "exports", "tslib", "@fluentui/react-focus", "@fluentui/react
597
595
  var calloutProps = tslib_1.__assign({ isCalloutVisible: state.isCalloutVisible, directionalHint: Callout_1.DirectionalHint.topAutoEdge, id: "toolTip".concat(this._calloutId), target: state.refSelected, color: state.color, XValue: state.xCalloutValue, YValue: state.yCalloutValue ? state.yCalloutValue : state.dataForHoverCard, descriptionMessage: state.descriptionMessage, isBeakVisible: false, gapSpace: 15, onDismiss: this._onCloseCallout, className: classNames_1.calloutContentRoot, preventDismissOnLostFocus: true }, this.props.calloutProps);
598
596
  return (React.createElement("div", { className: classNames_1.root, role: 'presentation', ref: function (rootElem) { return (_this.chartContainer = rootElem); }, onMouseLeave: this._onCloseCallout },
599
597
  React.createElement(react_focus_1.FocusZone, { direction: react_focus_1.FocusZoneDirection.vertical, className: classNames_1.chartWrapper },
600
- React.createElement("svg", { width: width, height: height, id: this._chartId },
598
+ React.createElement("svg", { width: width, height: height, id: this._chartId, className: classNames_1.chart },
601
599
  nodeLinkDomOrderArray_1.map(function (item) {
602
600
  if (item.type === 'node') {
603
601
  return (React.createElement("g", { key: nodes_1[item.index].nodeId, className: classNames_1.nodes }, nodeData_1[item.index]));
@@ -689,7 +687,7 @@ define(["require", "exports", "tslib", "@fluentui/react-focus", "@fluentui/react
689
687
  var nodeValues = valuesOfNodes(transformed.nodes);
690
688
  var linkValues = valuesOfLinks(transformed.links);
691
689
  adjustOnePercentHeightNodes(nodesInColumn, nodeValues, linkValues);
692
- adjustPadding(sankey, height - 6, nodesInColumn);
690
+ adjustPadding(sankey, containerHeight - this._margins.top - this._margins.bottom, nodesInColumn);
693
691
  // `sankey` is called a second time, probably to re-layout the nodes with the one-percent adjusted weights.
694
692
  // NOTE: The second call to `sankey` is required to allow links to be hoverable.
695
693
  // Without the second call, the links are not hoverable.