@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
@@ -0,0 +1,260 @@
1
+ define(["require", "exports", "tslib", "react", "@fluentui/react/lib/Utilities", "@fluentui/react-focus", "../Legends/index", "@fluentui/react/lib/Callout", "../../utilities/ChartHoverCard/ChartHoverCard", "@fluentui/chart-utilities", "../../utilities/image-export-utils", "../../utilities/utilities", "./funnelGeometry"], function (require, exports, tslib_1, React, Utilities_1, react_focus_1, index_1, Callout_1, ChartHoverCard_1, chart_utilities_1, image_export_utils_1, utilities_1, funnelGeometry_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.FunnelChartBase = void 0;
5
+ var getClassNames = (0, Utilities_1.classNamesFunction)();
6
+ exports.FunnelChartBase = React.forwardRef(function (props, forwardedRef) {
7
+ var _a;
8
+ var _tooltipId = (0, Utilities_1.getId)('FunnelChartTooltipId_');
9
+ var _emptyChartId = (0, Utilities_1.getId)('_FunnelChart_empty');
10
+ var isRTL = (0, Utilities_1.getRTL)();
11
+ var _b = React.useState(null), hoveredStage = _b[0], setHoveredStage = _b[1];
12
+ var _c = React.useState(false), isCalloutVisible = _c[0], setIsCalloutVisible = _c[1];
13
+ var _d = React.useState(null), calloutData = _d[0], setCalloutData = _d[1];
14
+ var _e = React.useState(null), refSelected = _e[0], setRefSelected = _e[1];
15
+ var _f = React.useState([]), selectedLegends = _f[0], setSelectedLegends = _f[1];
16
+ var chartContainerRef = React.useRef(null);
17
+ var legendsRef = React.useRef(null);
18
+ var isStacked = isStackedFunnelData(props.data);
19
+ React.useEffect(function () {
20
+ var _a;
21
+ if ((_a = props.legendProps) === null || _a === void 0 ? void 0 : _a.selectedLegends) {
22
+ setSelectedLegends(props.legendProps.selectedLegends);
23
+ }
24
+ }, [(_a = props.legendProps) === null || _a === void 0 ? void 0 : _a.selectedLegends]);
25
+ React.useImperativeHandle(props.componentRef, function () { return ({
26
+ chartContainer: chartContainerRef !== null && chartContainerRef !== void 0 ? chartContainerRef : null,
27
+ toImage: function (opts) {
28
+ var _a;
29
+ return (0, image_export_utils_1.toImage)(chartContainerRef.current, (_a = legendsRef.current) === null || _a === void 0 ? void 0 : _a.toSVG, (0, Utilities_1.getRTL)(), opts);
30
+ },
31
+ }); }, []);
32
+ function _handleHover(data, mouseEvent) {
33
+ mouseEvent === null || mouseEvent === void 0 ? void 0 : mouseEvent.persist();
34
+ setHoveredStage(data.stage);
35
+ setCalloutData(data);
36
+ setIsCalloutVisible(true);
37
+ setRefSelected(mouseEvent.currentTarget);
38
+ }
39
+ function _handleStackedHover(stage, subValue, mouseEvent) {
40
+ mouseEvent === null || mouseEvent === void 0 ? void 0 : mouseEvent.persist();
41
+ setHoveredStage(subValue.category);
42
+ setCalloutData({
43
+ stage: stage,
44
+ value: subValue.value,
45
+ color: subValue.color,
46
+ category: subValue.category,
47
+ });
48
+ setIsCalloutVisible(true);
49
+ setRefSelected(mouseEvent.currentTarget);
50
+ }
51
+ function _handleMouseOut() {
52
+ setHoveredStage(null);
53
+ setIsCalloutVisible(false);
54
+ setCalloutData(null);
55
+ setRefSelected(null);
56
+ }
57
+ function _onLegendSelectionChange(legendsSelected, event, currentLegend) {
58
+ var _a, _b;
59
+ if ((_a = props.legendProps) === null || _a === void 0 ? void 0 : _a.canSelectMultipleLegends) {
60
+ setSelectedLegends(legendsSelected);
61
+ }
62
+ else {
63
+ setSelectedLegends(legendsSelected.slice(-1));
64
+ }
65
+ if ((_b = props.legendProps) === null || _b === void 0 ? void 0 : _b.onChange) {
66
+ props.legendProps.onChange(legendsSelected, event, currentLegend);
67
+ }
68
+ }
69
+ var _onLegendSelectionChangeCallback = React.useCallback(_onLegendSelectionChange, [props.legendProps]);
70
+ function getHighlightedLegend() {
71
+ return selectedLegends.length > 0 ? selectedLegends : hoveredStage ? [hoveredStage] : [];
72
+ }
73
+ function legendHighlighted(legend) {
74
+ return getHighlightedLegend().includes(legend);
75
+ }
76
+ function noLegendHighlighted() {
77
+ return getHighlightedLegend().length === 0;
78
+ }
79
+ function _getEventHandlerProps(data) {
80
+ if ('subValue' in data) {
81
+ return {
82
+ culture: props.culture,
83
+ onMouseOver: function (event) { return _handleStackedHover(data.stage, data.subValue, event); },
84
+ onMouseMove: function (event) { return _handleStackedHover(data.stage, data.subValue, event); },
85
+ onMouseOut: function () { return _handleMouseOut(); },
86
+ };
87
+ }
88
+ else {
89
+ return {
90
+ culture: props.culture,
91
+ onMouseOver: function (event) { return _handleHover(data, event); },
92
+ onMouseMove: function (event) { return _handleHover(data, event); },
93
+ onMouseOut: function () { return _handleMouseOut(); },
94
+ };
95
+ }
96
+ }
97
+ function _renderSegmentText(_a) {
98
+ var show = _a.show, x = _a.x, y = _a.y, value = _a.value, textColor = _a.textColor;
99
+ if (!show) {
100
+ return null;
101
+ }
102
+ var textElement = (React.createElement("text", { x: isRTL ? funnelWidth - x : x, y: y, textAnchor: "middle", alignmentBaseline: "middle", fill: textColor }, (0, chart_utilities_1.formatToLocaleString)(value.toString(), props.culture)));
103
+ if (isRTL) {
104
+ return React.createElement("g", { transform: "scale(-1,1) translate(".concat(-funnelWidth, ",0)") }, textElement);
105
+ }
106
+ return textElement;
107
+ }
108
+ function _renderFunnelSegment(_a) {
109
+ var key = _a.key, pathD = _a.pathD, fill = _a.fill, opacity = _a.opacity, textProps = _a.textProps, data = _a.data;
110
+ var eventHandlers = _getEventHandlerProps(data);
111
+ var textColor = (0, utilities_1.getContrastTextColor)(fill, props.theme);
112
+ return (React.createElement("g", { key: key },
113
+ React.createElement("path", tslib_1.__assign({ d: pathD, fill: fill, opacity: opacity }, eventHandlers)),
114
+ textProps && React.createElement("g", tslib_1.__assign({}, eventHandlers), _renderSegmentText(tslib_1.__assign(tslib_1.__assign({}, textProps), { textColor: textColor })))));
115
+ }
116
+ function _createFunnel(containerHeight, containerWidth) {
117
+ var data = props.data;
118
+ var funnelWidth = containerWidth;
119
+ var funnelHeight = containerHeight * 0.8;
120
+ return data.map(function (d, i) {
121
+ var geometryProps = props.orientation === 'horizontal'
122
+ ? (0, funnelGeometry_1.getHorizontalFunnelSegmentGeometry)({ d: d, i: i, data: data, funnelWidth: funnelWidth, funnelHeight: funnelHeight, isRTL: isRTL })
123
+ : (0, funnelGeometry_1.getVerticalFunnelSegmentGeometry)({ d: d, i: i, data: data, funnelWidth: funnelWidth, funnelHeight: funnelHeight, isRTL: isRTL });
124
+ var pathD = geometryProps.pathD, textX = geometryProps.textX, textY = geometryProps.textY, availableWidth = geometryProps.availableWidth;
125
+ var minTextWidth = 16;
126
+ var eventHandlerProps = _getEventHandlerProps(d);
127
+ var textProps = (0, funnelGeometry_1.getSegmentTextProps)(tslib_1.__assign({ availableWidth: availableWidth, minTextWidth: minTextWidth, textX: textX, textY: textY, value: d.value }, eventHandlerProps));
128
+ return _renderFunnelSegment({
129
+ key: i,
130
+ pathD: pathD,
131
+ fill: d.color,
132
+ opacity: legendHighlighted(d.stage) || noLegendHighlighted() ? 1 : 0.1,
133
+ textProps: textProps,
134
+ data: d,
135
+ });
136
+ });
137
+ }
138
+ function isStackedFunnelData(data) {
139
+ return Array.isArray(data) && data.every(function (stage) { return Array.isArray(stage.subValues); });
140
+ }
141
+ function _renderStackedSegment(stage, subValue, stageIndex, subValueIndex, geometryParams) {
142
+ // Ensure stages have subValues for geometry functions
143
+ var stagesWithSubValues = geometryParams.stages.map(function (s) { return (tslib_1.__assign(tslib_1.__assign({}, s), { subValues: s.subValues || [] })); });
144
+ var geom = props.orientation === 'horizontal'
145
+ ? (0, funnelGeometry_1.getStackedHorizontalFunnelSegmentGeometry)(tslib_1.__assign(tslib_1.__assign({}, geometryParams), { stages: stagesWithSubValues, i: stageIndex, k: subValueIndex }))
146
+ : (0, funnelGeometry_1.getStackedVerticalFunnelSegmentGeometry)(tslib_1.__assign(tslib_1.__assign({}, geometryParams), { stages: stagesWithSubValues, i: stageIndex, k: subValueIndex }));
147
+ var minTextWidth = 16;
148
+ var eventHandlerProps = _getEventHandlerProps({ stage: stage.stage, subValue: subValue });
149
+ var textProps = (0, funnelGeometry_1.getSegmentTextProps)(tslib_1.__assign({ availableWidth: geom.availableWidth, minTextWidth: minTextWidth, textX: geom.textX, textY: geom.textY, value: subValue.value }, eventHandlerProps));
150
+ return _renderFunnelSegment({
151
+ key: "".concat(stageIndex, "-").concat(subValueIndex),
152
+ pathD: geom.pathD,
153
+ fill: subValue.color,
154
+ opacity: (isStackedFunnelData(props.data) && legendHighlighted(subValue.category)) || noLegendHighlighted() ? 1 : 0.1,
155
+ textProps: textProps,
156
+ data: { stage: stage.stage, subValue: subValue },
157
+ });
158
+ }
159
+ function _createStackedFunnel(containerHeight, containerWidth) {
160
+ var _a, _b;
161
+ var data = props.data;
162
+ var stages = data;
163
+ var totals = stages.map(function (s) { var _a, _b; return (_b = (_a = s === null || s === void 0 ? void 0 : s.subValues) === null || _a === void 0 ? void 0 : _a.reduce(function (sum, subValue) { return sum + subValue.value; }, 0)) !== null && _b !== void 0 ? _b : 0; });
164
+ var maxTotal = Math.max.apply(Math, totals);
165
+ var funnelWidth = containerWidth;
166
+ var funnelHeight = containerHeight * 0.8;
167
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
168
+ var paths = [];
169
+ var geometryParams = {
170
+ stages: stages,
171
+ totals: totals,
172
+ maxTotal: maxTotal,
173
+ funnelWidth: funnelWidth,
174
+ funnelHeight: funnelHeight,
175
+ isRTL: isRTL,
176
+ };
177
+ for (var i = 0; i < stages.length; i++) {
178
+ var cur = stages[i];
179
+ for (var k = 0; k < ((_a = cur.subValues) !== null && _a !== void 0 ? _a : []).length; k++) {
180
+ var v = (_b = cur.subValues) === null || _b === void 0 ? void 0 : _b[k];
181
+ if (!v) {
182
+ continue;
183
+ }
184
+ paths.push(_renderStackedSegment(cur, v, i, k, geometryParams));
185
+ }
186
+ }
187
+ return paths;
188
+ }
189
+ function _renderLegends() {
190
+ if (props.hideLegend) {
191
+ return React.createElement(React.Fragment, null);
192
+ }
193
+ var legends;
194
+ if (isStacked) {
195
+ // Collect unique categories and their color
196
+ var categoryMap_1 = {};
197
+ props.data.forEach(function (stage) {
198
+ (stage.subValues || []).forEach(function (sub) {
199
+ if (!(sub.category in categoryMap_1)) {
200
+ categoryMap_1[sub.category] = sub.color;
201
+ }
202
+ });
203
+ });
204
+ legends = Object.entries(categoryMap_1).map(function (_a) {
205
+ var category = _a[0], color = _a[1];
206
+ return ({
207
+ title: category,
208
+ color: color,
209
+ hoverAction: function () { return setHoveredStage(category); },
210
+ onMouseOutAction: function () { return setHoveredStage(null); },
211
+ });
212
+ });
213
+ }
214
+ else {
215
+ legends = props.data.map(function (d) { return ({
216
+ title: d.stage,
217
+ color: d.color,
218
+ hoverAction: function () { return setHoveredStage(d.stage); },
219
+ onMouseOutAction: function () { return setHoveredStage(null); },
220
+ }); });
221
+ }
222
+ return (React.createElement("div", { style: { display: 'flex', justifyContent: 'center' } },
223
+ React.createElement(index_1.Legends, tslib_1.__assign({ ref: legendsRef, legends: legends, centerLegends: true, onChange: _onLegendSelectionChangeCallback }, props.legendProps))));
224
+ }
225
+ function _isChartEmpty() {
226
+ return !(props.data && props.data.length > 0);
227
+ }
228
+ var calloutProps = tslib_1.__assign({ isCalloutVisible: isCalloutVisible, directionalHint: Callout_1.DirectionalHint.topAutoEdge, id: "toolTip".concat(_tooltipId), target: refSelected, color: calloutData === null || calloutData === void 0 ? void 0 : calloutData.color, XValue: calloutData === null || calloutData === void 0 ? void 0 : calloutData.stage, YValue: calloutData === null || calloutData === void 0 ? void 0 : calloutData.value, isBeakVisible: false, gapSpace: 15, onDismiss: function () {
229
+ setIsCalloutVisible(false);
230
+ }, preventDismissOnLostFocus: true }, props.calloutProps);
231
+ var width = props.width || 350;
232
+ var height = props.height || 500;
233
+ var classNames = getClassNames(props.styles, {
234
+ theme: props.theme,
235
+ className: props.className,
236
+ chartWidth: width,
237
+ chartHeight: height,
238
+ });
239
+ var funnelMarginTop = 40;
240
+ var funnelWidth = width * 0.8;
241
+ var funnelOffsetX = (width - funnelWidth) / 2;
242
+ return !_isChartEmpty() ? (React.createElement("div", { ref: chartContainerRef, className: classNames.root },
243
+ React.createElement(react_focus_1.FocusZone, { direction: react_focus_1.FocusZoneDirection.horizontal },
244
+ React.createElement("svg", { width: width, height: height, className: classNames.chart, role: 'img', "aria-label": props.chartTitle },
245
+ React.createElement("g", { transform: isRTL
246
+ ? "translate(".concat(funnelOffsetX + funnelWidth, ", ").concat(funnelMarginTop, ") scale(-1,1)")
247
+ : "translate(".concat(funnelOffsetX, ", ").concat(funnelMarginTop, ")") }, isStacked
248
+ ? _createStackedFunnel(height - funnelMarginTop, funnelWidth)
249
+ : _createFunnel(height - funnelMarginTop, funnelWidth)),
250
+ isCalloutVisible && (React.createElement(Callout_1.Callout, tslib_1.__assign({}, calloutProps),
251
+ React.createElement(ChartHoverCard_1.ChartHoverCard, { XValue: calloutProps === null || calloutProps === void 0 ? void 0 : calloutProps.XValue, YValue: calloutProps === null || calloutProps === void 0 ? void 0 : calloutProps.YValue, color: calloutProps === null || calloutProps === void 0 ? void 0 : calloutProps.color }))))),
252
+ _renderLegends())) : (React.createElement("div", { id: _emptyChartId, role: 'alert', style: { opacity: '0' }, "aria-label": 'Graph has no data to display' }));
253
+ });
254
+ exports.FunnelChartBase.displayName = 'FunnelChart';
255
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
256
+ exports.FunnelChartBase.defaultProps = {
257
+ orientation: 'horizontal',
258
+ };
259
+ });
260
+ //# sourceMappingURL=FunnelChart.base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunnelChart.base.js","sourceRoot":"../src/","sources":["components/FunnelChart/FunnelChart.base.tsx"],"names":[],"mappings":";;;;IAwBA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA8C,CAAC;IAE1E,QAAA,eAAe,GAA+C,KAAK,CAAC,UAAU,CAGzF,UAAC,KAAK,EAAE,YAAY;;QACpB,IAAM,UAAU,GAAW,IAAA,iBAAK,EAAC,uBAAuB,CAAC,CAAC;QAC1D,IAAM,aAAa,GAAW,IAAA,iBAAK,EAAC,oBAAoB,CAAC,CAAC;QAC1D,IAAM,KAAK,GAAG,IAAA,kBAAM,GAAE,CAAC;QAEjB,IAAA,KAAkC,KAAK,CAAC,QAAQ,CAAgB,IAAI,CAAC,EAApE,YAAY,QAAA,EAAE,eAAe,QAAuC,CAAC;QACtE,IAAA,KAA0C,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAA9D,gBAAgB,QAAA,EAAE,mBAAmB,QAAyB,CAAC;QAChE,IAAA,KAAgC,KAAK,CAAC,QAAQ,CAA+B,IAAI,CAAC,EAAjF,WAAW,QAAA,EAAE,cAAc,QAAsD,CAAC;QACnF,IAAA,KAAgC,KAAK,CAAC,QAAQ,CAAoB,IAAI,CAAC,EAAtE,WAAW,QAAA,EAAE,cAAc,QA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,CAAC,oBAAa,aAAa,GAAG,WAAW,eAAK,eAAe,kBAAe;4BAC7E,CAAC,CAAC,oBAAa,aAAa,eAAK,eAAe,MAAG,IAGtD,SAAS;wBACR,CAAC,CAAC,oBAAoB,CAAC,MAAM,GAAG,eAAe,EAAE,WAAW,CAAC;wBAC7D,CAAC,CAAC,aAAa,CAAC,MAAM,GAAG,eAAe,EAAE,WAAW,CAAC,CACtD;oBACH,gBAAgB,IAAI,CACnB,oBAAC,iBAAO,uBAAK,YAAY;wBACvB,oBAAC,+BAAc,IACb,MAAM,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAgB,EACtC,MAAM,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,EAC5B,KAAK,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,KAAK,GAC1B,CACM,CACX,CACG,CACI;YACX,cAAc,EAAE,CACb,CACP,CAAC,CAAC,CAAC,CACF,6BAAK,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,gBAAc,8BAA8B,GAAI,CAC/G,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,uBAAe,CAAC,WAAW,GAAG,aAAa,CAAC;IAC5C,4DAA4D;IAC5D,uBAAe,CAAC,YAAY,GAAG;QAC7B,WAAW,EAAE,YAAY;KAC1B,CAAC","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport {\n IFunnelChartDataPoint,\n IFunnelChartProps,\n IFunnelChartStyleProps,\n IFunnelChartStyles,\n} from './FunnelChart.types';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport { ILegend, ILegendContainer, Legends } from '../Legends/index';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { ChartHoverCard } from '../../utilities/ChartHoverCard/ChartHoverCard';\nimport { formatToLocaleString } from '@fluentui/chart-utilities';\nimport { IImageExportOptions } from '../../types/index';\nimport { toImage as convertToImage } from '../../utilities/image-export-utils';\nimport { getContrastTextColor } from '../../utilities/utilities';\nimport {\n getHorizontalFunnelSegmentGeometry,\n getVerticalFunnelSegmentGeometry,\n getSegmentTextProps,\n getStackedHorizontalFunnelSegmentGeometry,\n getStackedVerticalFunnelSegmentGeometry,\n} from './funnelGeometry';\n\nconst getClassNames = classNamesFunction<IFunnelChartStyleProps, IFunnelChartStyles>();\n\nexport const FunnelChartBase: React.FunctionComponent<IFunnelChartProps> = React.forwardRef<\n HTMLDivElement,\n IFunnelChartProps\n>((props, forwardedRef) => {\n const _tooltipId: string = getId('FunnelChartTooltipId_');\n const _emptyChartId: string = getId('_FunnelChart_empty');\n const isRTL = getRTL();\n\n const [hoveredStage, setHoveredStage] = React.useState<string | null>(null);\n const [isCalloutVisible, setIsCalloutVisible] = React.useState(false);\n const [calloutData, setCalloutData] = React.useState<IFunnelChartDataPoint | null>(null);\n const [refSelected, setRefSelected] = React.useState<SVGElement | null>(null);\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>([]);\n const chartContainerRef = React.useRef<HTMLDivElement | null>(null);\n const legendsRef = React.useRef<ILegendContainer | null>(null);\n const isStacked = isStackedFunnelData(props.data);\n\n React.useEffect(() => {\n if (props.legendProps?.selectedLegends) {\n setSelectedLegends(props.legendProps.selectedLegends);\n }\n }, [props.legendProps?.selectedLegends]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: chartContainerRef ?? null,\n toImage: (opts?: IImageExportOptions): Promise<string> => {\n return convertToImage(chartContainerRef.current, legendsRef.current?.toSVG, getRTL(), opts);\n },\n }),\n [],\n );\n\n function _handleHover(data: IFunnelChartDataPoint, mouseEvent: React.MouseEvent<SVGElement>) {\n mouseEvent?.persist();\n setHoveredStage(data.stage as string);\n setCalloutData(data);\n setIsCalloutVisible(true);\n setRefSelected(mouseEvent.currentTarget);\n }\n\n function _handleStackedHover(\n stage: string,\n subValue: { category: string; value: number; color: string },\n mouseEvent: React.MouseEvent<SVGElement>,\n ) {\n mouseEvent?.persist();\n setHoveredStage(subValue.category);\n setCalloutData({\n stage,\n value: subValue.value,\n color: subValue.color,\n category: subValue.category,\n } as IFunnelChartDataPoint);\n setIsCalloutVisible(true);\n setRefSelected(mouseEvent.currentTarget);\n }\n\n function _handleMouseOut() {\n setHoveredStage(null);\n setIsCalloutVisible(false);\n setCalloutData(null);\n setRefSelected(null);\n }\n\n function _onLegendSelectionChange(\n legendsSelected: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: ILegend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(legendsSelected);\n } else {\n setSelectedLegends(legendsSelected.slice(-1));\n }\n\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(legendsSelected, event, currentLegend);\n }\n }\n\n const _onLegendSelectionChangeCallback = React.useCallback(_onLegendSelectionChange, [props.legendProps]);\n\n function getHighlightedLegend(): string[] {\n return selectedLegends.length > 0 ? selectedLegends : hoveredStage ? [hoveredStage] : [];\n }\n\n function legendHighlighted(legend: string): boolean {\n return getHighlightedLegend().includes(legend);\n }\n\n function noLegendHighlighted(): boolean {\n return getHighlightedLegend().length === 0;\n }\n\n function _getEventHandlerProps(\n data: IFunnelChartDataPoint | { stage: string; subValue: { category: string; value: number; color: string } },\n ) {\n if ('subValue' in data) {\n return {\n culture: props.culture,\n onMouseOver: (event: React.MouseEvent<SVGElement>) => _handleStackedHover(data.stage, data.subValue, event),\n onMouseMove: (event: React.MouseEvent<SVGElement>) => _handleStackedHover(data.stage, data.subValue, event),\n onMouseOut: () => _handleMouseOut(),\n };\n } else {\n return {\n culture: props.culture,\n onMouseOver: (event: React.MouseEvent<SVGElement>) => _handleHover(data, event),\n onMouseMove: (event: React.MouseEvent<SVGElement>) => _handleHover(data, event),\n onMouseOut: () => _handleMouseOut(),\n };\n }\n }\n\n function _renderSegmentText({\n show,\n x,\n y,\n value,\n textColor,\n }: {\n show: boolean;\n x: number;\n y: number;\n value: number;\n textColor: string;\n }) {\n if (!show) {\n return null;\n }\n\n const textElement = (\n <text x={isRTL ? funnelWidth - x : x} y={y} textAnchor=\"middle\" alignmentBaseline=\"middle\" fill={textColor}>\n {formatToLocaleString(value.toString(), props.culture) as React.ReactNode}\n </text>\n );\n\n if (isRTL) {\n return <g transform={`scale(-1,1) translate(${-funnelWidth},0)`}>{textElement}</g>;\n }\n return textElement;\n }\n\n function _renderFunnelSegment({\n key,\n pathD,\n fill,\n opacity,\n textProps,\n data,\n }: {\n key: string | number;\n pathD: string;\n fill: string;\n opacity: number;\n textProps?: {\n show: boolean;\n x: number;\n y: number;\n value: number;\n };\n data: IFunnelChartDataPoint | { stage: string; subValue: { category: string; value: number; color: string } };\n }) {\n const eventHandlers = _getEventHandlerProps(data);\n const textColor = getContrastTextColor(fill, props.theme!);\n\n return (\n <g key={key}>\n <path d={pathD} fill={fill} opacity={opacity} {...eventHandlers} />\n {textProps && <g {...eventHandlers}>{_renderSegmentText({ ...textProps, textColor })}</g>}\n </g>\n );\n }\n\n function _createFunnel(\n containerHeight: number,\n containerWidth: number,\n ): // eslint-disable-next-line @typescript-eslint/no-deprecated\n JSX.Element[] {\n const { data } = props;\n const funnelWidth = containerWidth;\n const funnelHeight = containerHeight * 0.8;\n\n return data.map((d, i) => {\n const geometryProps =\n props.orientation === 'horizontal'\n ? getHorizontalFunnelSegmentGeometry({ d, i, data, funnelWidth, funnelHeight, isRTL })\n : getVerticalFunnelSegmentGeometry({ d, i, data, funnelWidth, funnelHeight, isRTL });\n\n const { pathD, textX, textY, availableWidth } = geometryProps;\n const minTextWidth = 16;\n const eventHandlerProps = _getEventHandlerProps(d);\n const textProps = getSegmentTextProps({\n availableWidth,\n minTextWidth,\n textX,\n textY,\n value: d.value!,\n ...eventHandlerProps,\n });\n\n return _renderFunnelSegment({\n key: i,\n pathD,\n fill: d.color!,\n opacity: legendHighlighted(d.stage as string) || noLegendHighlighted() ? 1 : 0.1,\n textProps,\n data: d,\n });\n });\n }\n\n function isStackedFunnelData(data: IFunnelChartDataPoint[]): boolean {\n return Array.isArray(data) && data.every(stage => Array.isArray(stage.subValues));\n }\n\n function _renderStackedSegment(\n stage: IFunnelChartDataPoint,\n subValue: { value: number; color: string; category: string },\n stageIndex: number,\n subValueIndex: number,\n geometryParams: {\n stages: IFunnelChartDataPoint[];\n totals: number[];\n maxTotal: number;\n funnelWidth: number;\n funnelHeight: number;\n isRTL: boolean;\n },\n ): // eslint-disable-next-line @typescript-eslint/no-deprecated\n JSX.Element {\n // Ensure stages have subValues for geometry functions\n const stagesWithSubValues = geometryParams.stages.map(s => ({\n ...s,\n subValues: s.subValues || [],\n }));\n\n const geom =\n props.orientation === 'horizontal'\n ? getStackedHorizontalFunnelSegmentGeometry({\n ...geometryParams,\n stages: stagesWithSubValues,\n i: stageIndex,\n k: subValueIndex,\n })\n : getStackedVerticalFunnelSegmentGeometry({\n ...geometryParams,\n stages: stagesWithSubValues,\n i: stageIndex,\n k: subValueIndex,\n });\n\n const minTextWidth = 16;\n const eventHandlerProps = _getEventHandlerProps({ stage: stage.stage as string, subValue });\n const textProps = getSegmentTextProps({\n availableWidth: geom.availableWidth,\n minTextWidth,\n textX: geom.textX,\n textY: geom.textY,\n value: subValue.value,\n ...eventHandlerProps,\n });\n\n return _renderFunnelSegment({\n key: `${stageIndex}-${subValueIndex}`,\n pathD: geom.pathD,\n fill: subValue.color,\n opacity:\n (isStackedFunnelData(props.data) && legendHighlighted(subValue.category)) || noLegendHighlighted() ? 1 : 0.1,\n textProps,\n data: { stage: stage.stage as string, subValue },\n });\n }\n\n function _createStackedFunnel(\n containerHeight: number,\n containerWidth: number,\n ): // eslint-disable-next-line @typescript-eslint/no-deprecated\n JSX.Element[] {\n const { data } = props;\n\n const stages = data;\n const totals = stages.map(s => s?.subValues?.reduce((sum, subValue) => sum + subValue.value, 0) ?? 0);\n const maxTotal = Math.max(...totals);\n\n const funnelWidth = containerWidth;\n const funnelHeight = containerHeight * 0.8;\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const paths: JSX.Element[] = [];\n\n const geometryParams = {\n stages,\n totals,\n maxTotal,\n funnelWidth,\n funnelHeight,\n isRTL,\n };\n\n for (let i = 0; i < stages.length; i++) {\n const cur = stages[i];\n for (let k = 0; k < (cur.subValues ?? []).length; k++) {\n const v = cur.subValues?.[k];\n if (!v) {\n continue;\n }\n paths.push(_renderStackedSegment(cur, v, i, k, geometryParams));\n }\n }\n return paths;\n }\n\n function _renderLegends(): // eslint-disable-next-line @typescript-eslint/no-deprecated\n JSX.Element {\n if (props.hideLegend) {\n return <></>;\n }\n let legends: ILegend[];\n\n if (isStacked) {\n // Collect unique categories and their color\n const categoryMap: Record<string, string> = {};\n props.data.forEach((stage: IFunnelChartDataPoint) => {\n (stage.subValues || []).forEach(sub => {\n if (!(sub.category in categoryMap)) {\n categoryMap[sub.category] = sub.color;\n }\n });\n });\n legends = Object.entries(categoryMap).map(([category, color]) => ({\n title: category,\n color,\n hoverAction: () => setHoveredStage(category),\n onMouseOutAction: () => setHoveredStage(null),\n }));\n } else {\n legends = props.data.map((d: IFunnelChartDataPoint) => ({\n title: d.stage as string,\n color: d.color!,\n hoverAction: () => setHoveredStage(d.stage as string),\n onMouseOutAction: () => setHoveredStage(null),\n }));\n }\n\n return (\n <div style={{ display: 'flex', justifyContent: 'center' }}>\n <Legends\n ref={legendsRef}\n legends={legends}\n centerLegends={true}\n onChange={_onLegendSelectionChangeCallback}\n {...props.legendProps}\n />\n </div>\n );\n }\n\n function _isChartEmpty(): boolean {\n return !(props.data && props.data.length > 0);\n }\n\n const calloutProps = {\n isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${_tooltipId}`,\n target: refSelected,\n color: calloutData?.color,\n XValue: calloutData?.stage,\n YValue: calloutData?.value,\n isBeakVisible: false,\n gapSpace: 15,\n onDismiss: () => {\n setIsCalloutVisible(false);\n },\n preventDismissOnLostFocus: true,\n ...props.calloutProps,\n };\n\n const width = props.width || 350;\n const height = props.height || 500;\n const classNames = getClassNames(props.styles!, {\n theme: props.theme!,\n className: props.className,\n chartWidth: width,\n chartHeight: height,\n });\n\n const funnelMarginTop = 40;\n const funnelWidth = width * 0.8;\n const funnelOffsetX = (width - funnelWidth) / 2;\n\n return !_isChartEmpty() ? (\n <div ref={chartContainerRef} className={classNames.root}>\n <FocusZone direction={FocusZoneDirection.horizontal}>\n <svg width={width} height={height} className={classNames.chart} role={'img'} aria-label={props.chartTitle}>\n <g\n transform={\n isRTL\n ? `translate(${funnelOffsetX + funnelWidth}, ${funnelMarginTop}) scale(-1,1)`\n : `translate(${funnelOffsetX}, ${funnelMarginTop})`\n }\n >\n {isStacked\n ? _createStackedFunnel(height - funnelMarginTop, funnelWidth)\n : _createFunnel(height - funnelMarginTop, funnelWidth)}\n </g>\n {isCalloutVisible && (\n <Callout {...calloutProps}>\n <ChartHoverCard\n XValue={calloutProps?.XValue as string}\n YValue={calloutProps?.YValue}\n color={calloutProps?.color}\n />\n </Callout>\n )}\n </svg>\n </FocusZone>\n {_renderLegends()}\n </div>\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n});\nFunnelChartBase.displayName = 'FunnelChart';\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nFunnelChartBase.defaultProps = {\n orientation: 'horizontal',\n};\n"]}
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { IFunnelChartProps } from './FunnelChart.types';
3
+ /**
4
+ * Funnelchart component.
5
+ * {@docCategory FunnelChart}
6
+ */
7
+ export declare const FunnelChart: React.FunctionComponent<IFunnelChartProps>;
@@ -0,0 +1,11 @@
1
+ define(["require", "exports", "@fluentui/react", "./FunnelChart.base", "./FunnelChart.styles"], function (require, exports, react_1, FunnelChart_base_1, FunnelChart_styles_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.FunnelChart = void 0;
5
+ /**
6
+ * Funnelchart component.
7
+ * {@docCategory FunnelChart}
8
+ */
9
+ exports.FunnelChart = (0, react_1.styled)(FunnelChart_base_1.FunnelChartBase, FunnelChart_styles_1.getFunnelChartStyles);
10
+ });
11
+ //# sourceMappingURL=FunnelChart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunnelChart.js","sourceRoot":"../src/","sources":["components/FunnelChart/FunnelChart.tsx"],"names":[],"mappings":";;;;IAMA;;;OAGG;IACU,QAAA,WAAW,GAA+C,IAAA,cAAM,EAI3E,kCAAe,EAAE,yCAAoB,CAAC,CAAC","sourcesContent":["import { styled } from '@fluentui/react';\nimport * as React from 'react';\nimport { FunnelChartBase } from './FunnelChart.base';\nimport { getFunnelChartStyles } from './FunnelChart.styles';\nimport { IFunnelChartProps, IFunnelChartStyleProps, IFunnelChartStyles } from './FunnelChart.types';\n\n/**\n * Funnelchart component.\n * {@docCategory FunnelChart}\n */\nexport const FunnelChart: React.FunctionComponent<IFunnelChartProps> = styled<\n IFunnelChartProps,\n IFunnelChartStyleProps,\n IFunnelChartStyles\n>(FunnelChartBase, getFunnelChartStyles);\n"]}
@@ -0,0 +1,2 @@
1
+ import { IFunnelChartStyleProps, IFunnelChartStyles } from './FunnelChart.types';
2
+ export declare const getFunnelChartStyles: (props: IFunnelChartStyleProps) => IFunnelChartStyles;
@@ -0,0 +1,43 @@
1
+ define(["require", "exports", "@fluentui/react/lib/Styling"], function (require, exports, Styling_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.getFunnelChartStyles = void 0;
5
+ var getFunnelChartStyles = function (props) {
6
+ var theme = props.theme, className = props.className, chartWidth = props.chartWidth, chartHeight = props.chartHeight;
7
+ return {
8
+ // root: { minHeight: '200px', minWidth: '200px', position: 'relative' },
9
+ root: [
10
+ theme.fonts.medium,
11
+ 'ms-FunnelChart',
12
+ {
13
+ alignItems: 'center',
14
+ width: '100%',
15
+ height: '100%',
16
+ },
17
+ className,
18
+ ],
19
+ chart: {
20
+ display: 'block',
21
+ width: chartWidth,
22
+ height: chartHeight,
23
+ },
24
+ text: [
25
+ theme.fonts.medium,
26
+ {
27
+ pointerEvents: 'none',
28
+ fontWeight: Styling_1.FontWeights.semibold,
29
+ fill: theme.palette.neutralPrimary,
30
+ },
31
+ ],
32
+ subComponentStyles: {
33
+ calloutStyles: {
34
+ root: {
35
+ maxWidth: '238px',
36
+ },
37
+ },
38
+ },
39
+ };
40
+ };
41
+ exports.getFunnelChartStyles = getFunnelChartStyles;
42
+ });
43
+ //# sourceMappingURL=FunnelChart.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunnelChart.styles.js","sourceRoot":"../src/","sources":["components/FunnelChart/FunnelChart.styles.ts"],"names":[],"mappings":";;;;IAGO,IAAM,oBAAoB,GAAG,UAAC,KAA6B;QACxD,IAAA,KAAK,GAAyC,KAAK,MAA9C,EAAE,SAAS,GAA8B,KAAK,UAAnC,EAAE,UAAU,GAAkB,KAAK,WAAvB,EAAE,WAAW,GAAK,KAAK,YAAV,CAAW;QAC5D,OAAO;YACL,yEAAyE;YACzE,IAAI,EAAE;gBACJ,KAAK,CAAC,KAAK,CAAC,MAAM;gBAClB,gBAAgB;gBAChB;oBACE,UAAU,EAAE,QAAQ;oBACpB,KAAK,EAAE,MAAM;oBACb,MAAM,EAAE,MAAM;iBACf;gBACD,SAAS;aACV;YACD,KAAK,EAAE;gBACL,OAAO,EAAE,OAAO;gBAChB,KAAK,EAAE,UAAU;gBACjB,MAAM,EAAE,WAAW;aACpB;YACD,IAAI,EAAE;gBACJ,KAAK,CAAC,KAAK,CAAC,MAAM;gBAClB;oBACE,aAAa,EAAE,MAAM;oBACrB,UAAU,EAAE,qBAAW,CAAC,QAAQ;oBAChC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;iBACnC;aACF;YACD,kBAAkB,EAAE;gBAClB,aAAa,EAAE;oBACb,IAAI,EAAE;wBACJ,QAAQ,EAAE,OAAO;qBAClB;iBACF;aACF;SACF,CAAC;IACJ,CAAC,CAAC;IAnCW,QAAA,oBAAoB,wBAmC/B","sourcesContent":["import { FontWeights } from '@fluentui/react/lib/Styling';\nimport { IFunnelChartStyleProps, IFunnelChartStyles } from './FunnelChart.types';\n\nexport const getFunnelChartStyles = (props: IFunnelChartStyleProps): IFunnelChartStyles => {\n const { theme, className, chartWidth, chartHeight } = props;\n return {\n // root: { minHeight: '200px', minWidth: '200px', position: 'relative' },\n root: [\n theme.fonts.medium,\n 'ms-FunnelChart',\n {\n alignItems: 'center',\n width: '100%',\n height: '100%',\n },\n className,\n ],\n chart: {\n display: 'block',\n width: chartWidth,\n height: chartHeight,\n },\n text: [\n theme.fonts.medium,\n {\n pointerEvents: 'none',\n fontWeight: FontWeights.semibold,\n fill: theme.palette.neutralPrimary,\n },\n ],\n subComponentStyles: {\n calloutStyles: {\n root: {\n maxWidth: '238px',\n },\n },\n },\n };\n};\n"]}
@@ -0,0 +1,139 @@
1
+ import * as React from 'react';
2
+ import { IStyle, ITheme } from '@fluentui/react/lib/Styling';
3
+ import { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
4
+ import { ICalloutContentStyleProps, ICalloutContentStyles } from '@fluentui/react/lib/Callout';
5
+ import { ILegendsProps } from '../Legends/index';
6
+ import { ICalloutProps } from '@fluentui/react/lib/Callout';
7
+ /**
8
+ * Data point for funnel chart
9
+ * {@docCategory FunnelChart}
10
+ */
11
+ export interface IFunnelChartDataPoint {
12
+ /**
13
+ * Stage name or identifier
14
+ */
15
+ stage: string | number;
16
+ /**
17
+ * Sub-values for stacked funnel charts
18
+ * Each sub-value represents a category within the stage
19
+ */
20
+ subValues?: Array<{
21
+ category: string;
22
+ value: number;
23
+ color: string;
24
+ }>;
25
+ /**
26
+ * Value for the stage (used for non-stacked funnel charts)
27
+ */
28
+ value?: number;
29
+ /**
30
+ * Color for the stage (used for non-stacked funnel charts)
31
+ */
32
+ color?: string;
33
+ }
34
+ /**
35
+ * Funnel Chart component props
36
+ * {@docCategory FunnelChart}
37
+ */
38
+ export interface IFunnelChartProps {
39
+ /**
40
+ * Data points for the funnel chart
41
+ */
42
+ data: IFunnelChartDataPoint[];
43
+ /**
44
+ * Title for the chart
45
+ */
46
+ chartTitle?: string;
47
+ /**
48
+ * Width of the chart
49
+ */
50
+ width?: number;
51
+ /**
52
+ * Height of the chart
53
+ */
54
+ height?: number;
55
+ /**
56
+ * Decides whether to show/hide legends
57
+ * @defaultvalue false
58
+ */
59
+ hideLegend?: boolean;
60
+ /**
61
+ * Props for the legends in the chart
62
+ */
63
+ legendProps?: Partial<ILegendsProps>;
64
+ /**
65
+ * Props for the callout in the chart
66
+ */
67
+ calloutProps?: Partial<ICalloutProps>;
68
+ /**
69
+ * Theme (provided through customization)
70
+ */
71
+ theme?: ITheme;
72
+ /**
73
+ * Call to provide customized styling that will layer on top of the variant rules
74
+ */
75
+ styles?: IStyleFunctionOrObject<IFunnelChartStyleProps, IFunnelChartStyles>;
76
+ /**
77
+ * Defines the culture to localize the numbers and dates
78
+ */
79
+ culture?: string;
80
+ /**
81
+ * Reference to the chart component
82
+ */
83
+ componentRef?: React.RefObject<any>;
84
+ /**
85
+ * Additional CSS class(es) to apply to the chart
86
+ */
87
+ className?: string;
88
+ /**
89
+ * Orientation of the funnel chart
90
+ * @defaultvalue 'horizontal'
91
+ */
92
+ orientation?: 'horizontal' | 'vertical';
93
+ }
94
+ /**
95
+ * Funnel Chart style properties
96
+ * {@docCategory FunnelChart}
97
+ */
98
+ export interface IFunnelChartStyleProps {
99
+ /**
100
+ * Theme (provided through customization)
101
+ */
102
+ theme: ITheme;
103
+ /**
104
+ * Additional CSS class(es) to apply to the chart
105
+ */
106
+ className?: string;
107
+ /**
108
+ * Width of the chart
109
+ */
110
+ chartWidth: number;
111
+ /**
112
+ * Height of the chart
113
+ */
114
+ chartHeight: number;
115
+ }
116
+ /**
117
+ * Funnel Chart styles
118
+ * {@docCategory FunnelChart}
119
+ */
120
+ export interface IFunnelChartStyles {
121
+ /**
122
+ * Styles for the root element
123
+ */
124
+ root?: IStyle;
125
+ /**
126
+ * Styles for the chart
127
+ */
128
+ chart?: IStyle;
129
+ /**
130
+ * Styles for text elements
131
+ */
132
+ text?: IStyle;
133
+ /**
134
+ * Styles for sub-components
135
+ */
136
+ subComponentStyles: {
137
+ calloutStyles: IStyleFunctionOrObject<ICalloutContentStyleProps, ICalloutContentStyles>;
138
+ };
139
+ }
@@ -0,0 +1,5 @@
1
+ define(["require", "exports"], function (require, exports) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ });
5
+ //# sourceMappingURL=FunnelChart.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunnelChart.types.js","sourceRoot":"../src/","sources":["components/FunnelChart/FunnelChart.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { IStyle, ITheme } from '@fluentui/react/lib/Styling';\nimport { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\nimport { ICalloutContentStyleProps, ICalloutContentStyles } from '@fluentui/react/lib/Callout';\nimport { ILegendsProps } from '../Legends/index';\nimport { ICalloutProps } from '@fluentui/react/lib/Callout';\n\n/**\n * Data point for funnel chart\n * {@docCategory FunnelChart}\n */\nexport interface IFunnelChartDataPoint {\n /**\n * Stage name or identifier\n */\n stage: string | number;\n /**\n * Sub-values for stacked funnel charts\n * Each sub-value represents a category within the stage\n */\n subValues?: Array<{ category: string; value: number; color: string }>;\n /**\n * Value for the stage (used for non-stacked funnel charts)\n */\n value?: number;\n /**\n * Color for the stage (used for non-stacked funnel charts)\n */\n color?: string;\n}\n\n/**\n * Funnel Chart component props\n * {@docCategory FunnelChart}\n */\nexport interface IFunnelChartProps {\n /**\n * Data points for the funnel chart\n */\n data: IFunnelChartDataPoint[];\n /**\n * Title for the chart\n */\n chartTitle?: string;\n /**\n * Width of the chart\n */\n width?: number;\n\n /**\n * Height of the chart\n */\n height?: number;\n\n /**\n * Decides whether to show/hide legends\n * @defaultvalue false\n */\n hideLegend?: boolean;\n\n /**\n * Props for the legends in the chart\n */\n legendProps?: Partial<ILegendsProps>;\n\n /**\n * Props for the callout in the chart\n */\n calloutProps?: Partial<ICalloutProps>;\n\n /**\n * Theme (provided through customization)\n */\n theme?: ITheme;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules\n */\n styles?: IStyleFunctionOrObject<IFunnelChartStyleProps, IFunnelChartStyles>;\n\n /**\n * Defines the culture to localize the numbers and dates\n */\n culture?: string;\n\n /**\n * Reference to the chart component\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n componentRef?: React.RefObject<any>;\n\n /**\n * Additional CSS class(es) to apply to the chart\n */\n className?: string;\n\n /**\n * Orientation of the funnel chart\n * @defaultvalue 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n}\n\n/**\n * Funnel Chart style properties\n * {@docCategory FunnelChart}\n */\nexport interface IFunnelChartStyleProps {\n /**\n * Theme (provided through customization)\n */\n theme: ITheme;\n /**\n * Additional CSS class(es) to apply to the chart\n */\n className?: string;\n /**\n * Width of the chart\n */\n chartWidth: number;\n /**\n * Height of the chart\n */\n chartHeight: number;\n}\n\n/**\n * Funnel Chart styles\n * {@docCategory FunnelChart}\n */\nexport interface IFunnelChartStyles {\n /**\n * Styles for the root element\n */\n root?: IStyle;\n\n /**\n * Styles for the chart\n */\n chart?: IStyle;\n\n /**\n * Styles for text elements\n */\n text?: IStyle;\n\n /**\n * Styles for sub-components\n */\n subComponentStyles: {\n calloutStyles: IStyleFunctionOrObject<ICalloutContentStyleProps, ICalloutContentStyles>;\n };\n}\n"]}
@@ -0,0 +1,77 @@
1
+ import * as React from 'react';
2
+ import { IFunnelChartDataPoint } from './FunnelChart.types';
3
+ export interface IFunnelSegmentGeometry {
4
+ pathD: string;
5
+ textX: number;
6
+ textY: number;
7
+ availableWidth: number;
8
+ }
9
+ export interface IStackedFunnelSegmentGeometry {
10
+ pathD: string;
11
+ textX: number;
12
+ textY: number;
13
+ availableWidth: number;
14
+ }
15
+ interface ISubValue {
16
+ category: string;
17
+ value: number;
18
+ color: string;
19
+ }
20
+ interface IStage {
21
+ subValues: ISubValue[];
22
+ }
23
+ export declare function getHorizontalFunnelSegmentGeometry({ d, i, data, funnelWidth, funnelHeight, isRTL, }: {
24
+ d: IFunnelChartDataPoint;
25
+ i: number;
26
+ data: IFunnelChartDataPoint[];
27
+ funnelWidth: number;
28
+ funnelHeight: number;
29
+ isRTL: boolean;
30
+ }): IFunnelSegmentGeometry;
31
+ export declare function getVerticalFunnelSegmentGeometry({ d, i, data, funnelWidth, funnelHeight, isRTL, }: {
32
+ d: IFunnelChartDataPoint;
33
+ i: number;
34
+ data: IFunnelChartDataPoint[];
35
+ funnelWidth: number;
36
+ funnelHeight: number;
37
+ isRTL: boolean;
38
+ }): IFunnelSegmentGeometry;
39
+ export declare function getStackedHorizontalFunnelSegmentGeometry({ i, k, stages, totals, maxTotal, funnelWidth, funnelHeight, }: {
40
+ i: number;
41
+ k: number;
42
+ stages: IStage[];
43
+ totals: number[];
44
+ maxTotal: number;
45
+ funnelWidth: number;
46
+ funnelHeight: number;
47
+ }): IStackedFunnelSegmentGeometry;
48
+ export declare function getStackedVerticalFunnelSegmentGeometry({ i, k, stages, totals, maxTotal, funnelWidth, funnelHeight, }: {
49
+ i: number;
50
+ k: number;
51
+ stages: IStage[];
52
+ totals: number[];
53
+ maxTotal: number;
54
+ funnelWidth: number;
55
+ funnelHeight: number;
56
+ }): IStackedFunnelSegmentGeometry;
57
+ export declare function getSegmentTextProps({ availableWidth, minTextWidth, textX, textY, value, culture, onMouseOver, onMouseMove, onMouseOut, }: {
58
+ availableWidth: number;
59
+ minTextWidth?: number;
60
+ textX: number;
61
+ textY: number;
62
+ value: number;
63
+ culture: string | undefined;
64
+ onMouseOver: (event: React.MouseEvent<SVGElement>) => void;
65
+ onMouseMove: (event: React.MouseEvent<SVGElement>) => void;
66
+ onMouseOut: () => void;
67
+ }): {
68
+ show: boolean;
69
+ x: number;
70
+ y: number;
71
+ value: number;
72
+ culture: string | undefined;
73
+ onMouseOver: (event: React.MouseEvent<SVGElement>) => void;
74
+ onMouseMove: (event: React.MouseEvent<SVGElement>) => void;
75
+ onMouseOut: () => void;
76
+ };
77
+ export {};