@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,266 @@
1
+ import { __assign } from "tslib";
2
+ import * as React from 'react';
3
+ import { classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities';
4
+ import { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';
5
+ import { Legends } from '../Legends/index';
6
+ import { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';
7
+ import { ChartHoverCard } from '../../utilities/ChartHoverCard/ChartHoverCard';
8
+ import { formatToLocaleString } from '@fluentui/chart-utilities';
9
+ import { toImage as convertToImage } from '../../utilities/image-export-utils';
10
+ import { getContrastTextColor } from '../../utilities/utilities';
11
+ import { getHorizontalFunnelSegmentGeometry, getVerticalFunnelSegmentGeometry, getSegmentTextProps, getStackedHorizontalFunnelSegmentGeometry, getStackedVerticalFunnelSegmentGeometry, } from './funnelGeometry';
12
+ var getClassNames = classNamesFunction();
13
+ export var FunnelChartBase = React.forwardRef(function (props, forwardedRef) {
14
+ var _a;
15
+ var _tooltipId = getId('FunnelChartTooltipId_');
16
+ var _emptyChartId = getId('_FunnelChart_empty');
17
+ var isRTL = getRTL();
18
+ var _b = React.useState(null), hoveredStage = _b[0], setHoveredStage = _b[1];
19
+ var _c = React.useState(false), isCalloutVisible = _c[0], setIsCalloutVisible = _c[1];
20
+ var _d = React.useState(null), calloutData = _d[0], setCalloutData = _d[1];
21
+ var _e = React.useState(null), refSelected = _e[0], setRefSelected = _e[1];
22
+ var _f = React.useState([]), selectedLegends = _f[0], setSelectedLegends = _f[1];
23
+ var chartContainerRef = React.useRef(null);
24
+ var legendsRef = React.useRef(null);
25
+ var isStacked = isStackedFunnelData(props.data);
26
+ React.useEffect(function () {
27
+ var _a;
28
+ if ((_a = props.legendProps) === null || _a === void 0 ? void 0 : _a.selectedLegends) {
29
+ setSelectedLegends(props.legendProps.selectedLegends);
30
+ }
31
+ }, [(_a = props.legendProps) === null || _a === void 0 ? void 0 : _a.selectedLegends]);
32
+ React.useImperativeHandle(props.componentRef, function () { return ({
33
+ chartContainer: chartContainerRef !== null && chartContainerRef !== void 0 ? chartContainerRef : null,
34
+ toImage: function (opts) {
35
+ var _a;
36
+ return convertToImage(chartContainerRef.current, (_a = legendsRef.current) === null || _a === void 0 ? void 0 : _a.toSVG, getRTL(), opts);
37
+ },
38
+ }); }, []);
39
+ function _handleHover(data, mouseEvent) {
40
+ mouseEvent === null || mouseEvent === void 0 ? void 0 : mouseEvent.persist();
41
+ setHoveredStage(data.stage);
42
+ setCalloutData(data);
43
+ setIsCalloutVisible(true);
44
+ setRefSelected(mouseEvent.currentTarget);
45
+ }
46
+ function _handleStackedHover(stage, subValue, mouseEvent) {
47
+ mouseEvent === null || mouseEvent === void 0 ? void 0 : mouseEvent.persist();
48
+ setHoveredStage(subValue.category);
49
+ setCalloutData({
50
+ stage: stage,
51
+ value: subValue.value,
52
+ color: subValue.color,
53
+ category: subValue.category,
54
+ });
55
+ setIsCalloutVisible(true);
56
+ setRefSelected(mouseEvent.currentTarget);
57
+ }
58
+ function _handleMouseOut() {
59
+ setHoveredStage(null);
60
+ setIsCalloutVisible(false);
61
+ setCalloutData(null);
62
+ setRefSelected(null);
63
+ }
64
+ function _onLegendSelectionChange(legendsSelected, event, currentLegend) {
65
+ var _a, _b;
66
+ if ((_a = props.legendProps) === null || _a === void 0 ? void 0 : _a.canSelectMultipleLegends) {
67
+ setSelectedLegends(legendsSelected);
68
+ }
69
+ else {
70
+ setSelectedLegends(legendsSelected.slice(-1));
71
+ }
72
+ if ((_b = props.legendProps) === null || _b === void 0 ? void 0 : _b.onChange) {
73
+ props.legendProps.onChange(legendsSelected, event, currentLegend);
74
+ }
75
+ }
76
+ var _onLegendSelectionChangeCallback = React.useCallback(_onLegendSelectionChange, [props.legendProps]);
77
+ function getHighlightedLegend() {
78
+ return selectedLegends.length > 0 ? selectedLegends : hoveredStage ? [hoveredStage] : [];
79
+ }
80
+ function legendHighlighted(legend) {
81
+ return getHighlightedLegend().includes(legend);
82
+ }
83
+ function noLegendHighlighted() {
84
+ return getHighlightedLegend().length === 0;
85
+ }
86
+ function _getEventHandlerProps(data) {
87
+ if ('subValue' in data) {
88
+ return {
89
+ culture: props.culture,
90
+ onMouseOver: function (event) { return _handleStackedHover(data.stage, data.subValue, event); },
91
+ onMouseMove: function (event) { return _handleStackedHover(data.stage, data.subValue, event); },
92
+ onMouseOut: function () { return _handleMouseOut(); },
93
+ };
94
+ }
95
+ else {
96
+ return {
97
+ culture: props.culture,
98
+ onMouseOver: function (event) { return _handleHover(data, event); },
99
+ onMouseMove: function (event) { return _handleHover(data, event); },
100
+ onMouseOut: function () { return _handleMouseOut(); },
101
+ };
102
+ }
103
+ }
104
+ function _renderSegmentText(_a) {
105
+ var show = _a.show, x = _a.x, y = _a.y, value = _a.value, textColor = _a.textColor;
106
+ if (!show) {
107
+ return null;
108
+ }
109
+ var textElement = (React.createElement("text", { x: isRTL ? funnelWidth - x : x, y: y, textAnchor: "middle", alignmentBaseline: "middle", fill: textColor }, formatToLocaleString(value.toString(), props.culture)));
110
+ if (isRTL) {
111
+ return React.createElement("g", { transform: "scale(-1,1) translate(".concat(-funnelWidth, ",0)") }, textElement);
112
+ }
113
+ return textElement;
114
+ }
115
+ function _renderFunnelSegment(_a) {
116
+ var key = _a.key, pathD = _a.pathD, fill = _a.fill, opacity = _a.opacity, textProps = _a.textProps, data = _a.data;
117
+ var eventHandlers = _getEventHandlerProps(data);
118
+ var textColor = getContrastTextColor(fill, props.theme);
119
+ return (React.createElement("g", { key: key },
120
+ React.createElement("path", __assign({ d: pathD, fill: fill, opacity: opacity }, eventHandlers)),
121
+ textProps && React.createElement("g", __assign({}, eventHandlers), _renderSegmentText(__assign(__assign({}, textProps), { textColor: textColor })))));
122
+ }
123
+ function _createFunnel(containerHeight, containerWidth) {
124
+ var data = props.data;
125
+ var funnelWidth = containerWidth;
126
+ var funnelHeight = containerHeight * 0.8;
127
+ return data.map(function (d, i) {
128
+ var geometryProps = props.orientation === 'horizontal'
129
+ ? getHorizontalFunnelSegmentGeometry({ d: d, i: i, data: data, funnelWidth: funnelWidth, funnelHeight: funnelHeight, isRTL: isRTL })
130
+ : getVerticalFunnelSegmentGeometry({ d: d, i: i, data: data, funnelWidth: funnelWidth, funnelHeight: funnelHeight, isRTL: isRTL });
131
+ var pathD = geometryProps.pathD, textX = geometryProps.textX, textY = geometryProps.textY, availableWidth = geometryProps.availableWidth;
132
+ var minTextWidth = 16;
133
+ var eventHandlerProps = _getEventHandlerProps(d);
134
+ var textProps = getSegmentTextProps(__assign({ availableWidth: availableWidth, minTextWidth: minTextWidth, textX: textX, textY: textY, value: d.value }, eventHandlerProps));
135
+ return _renderFunnelSegment({
136
+ key: i,
137
+ pathD: pathD,
138
+ fill: d.color,
139
+ opacity: legendHighlighted(d.stage) || noLegendHighlighted() ? 1 : 0.1,
140
+ textProps: textProps,
141
+ data: d,
142
+ });
143
+ });
144
+ }
145
+ function isStackedFunnelData(data) {
146
+ return Array.isArray(data) && data.every(function (stage) { return Array.isArray(stage.subValues); });
147
+ }
148
+ function _renderStackedSegment(stage, subValue, stageIndex, subValueIndex, geometryParams) {
149
+ // Ensure stages have subValues for geometry functions
150
+ var stagesWithSubValues = geometryParams.stages.map(function (s) { return (__assign(__assign({}, s), { subValues: s.subValues || [] })); });
151
+ var geom = props.orientation === 'horizontal'
152
+ ? getStackedHorizontalFunnelSegmentGeometry(__assign(__assign({}, geometryParams), { stages: stagesWithSubValues, i: stageIndex, k: subValueIndex }))
153
+ : getStackedVerticalFunnelSegmentGeometry(__assign(__assign({}, geometryParams), { stages: stagesWithSubValues, i: stageIndex, k: subValueIndex }));
154
+ var minTextWidth = 16;
155
+ var eventHandlerProps = _getEventHandlerProps({ stage: stage.stage, subValue: subValue });
156
+ var textProps = getSegmentTextProps(__assign({ availableWidth: geom.availableWidth, minTextWidth: minTextWidth, textX: geom.textX, textY: geom.textY, value: subValue.value }, eventHandlerProps));
157
+ return _renderFunnelSegment({
158
+ key: "".concat(stageIndex, "-").concat(subValueIndex),
159
+ pathD: geom.pathD,
160
+ fill: subValue.color,
161
+ opacity: (isStackedFunnelData(props.data) && legendHighlighted(subValue.category)) || noLegendHighlighted() ? 1 : 0.1,
162
+ textProps: textProps,
163
+ data: { stage: stage.stage, subValue: subValue },
164
+ });
165
+ }
166
+ function _createStackedFunnel(containerHeight, containerWidth) {
167
+ var _a, _b;
168
+ var data = props.data;
169
+ var stages = data;
170
+ 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; });
171
+ var maxTotal = Math.max.apply(Math, totals);
172
+ var funnelWidth = containerWidth;
173
+ var funnelHeight = containerHeight * 0.8;
174
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
175
+ var paths = [];
176
+ var geometryParams = {
177
+ stages: stages,
178
+ totals: totals,
179
+ maxTotal: maxTotal,
180
+ funnelWidth: funnelWidth,
181
+ funnelHeight: funnelHeight,
182
+ isRTL: isRTL,
183
+ };
184
+ for (var i = 0; i < stages.length; i++) {
185
+ var cur = stages[i];
186
+ for (var k = 0; k < ((_a = cur.subValues) !== null && _a !== void 0 ? _a : []).length; k++) {
187
+ var v = (_b = cur.subValues) === null || _b === void 0 ? void 0 : _b[k];
188
+ if (!v) {
189
+ continue;
190
+ }
191
+ paths.push(_renderStackedSegment(cur, v, i, k, geometryParams));
192
+ }
193
+ }
194
+ return paths;
195
+ }
196
+ function _renderLegends() {
197
+ if (props.hideLegend) {
198
+ return React.createElement(React.Fragment, null);
199
+ }
200
+ var legends;
201
+ if (isStacked) {
202
+ // Collect unique categories and their color
203
+ var categoryMap_1 = {};
204
+ props.data.forEach(function (stage) {
205
+ (stage.subValues || []).forEach(function (sub) {
206
+ if (!(sub.category in categoryMap_1)) {
207
+ categoryMap_1[sub.category] = sub.color;
208
+ }
209
+ });
210
+ });
211
+ legends = Object.entries(categoryMap_1).map(function (_a) {
212
+ var category = _a[0], color = _a[1];
213
+ return ({
214
+ title: category,
215
+ color: color,
216
+ hoverAction: function () { return setHoveredStage(category); },
217
+ onMouseOutAction: function () { return setHoveredStage(null); },
218
+ });
219
+ });
220
+ }
221
+ else {
222
+ legends = props.data.map(function (d) { return ({
223
+ title: d.stage,
224
+ color: d.color,
225
+ hoverAction: function () { return setHoveredStage(d.stage); },
226
+ onMouseOutAction: function () { return setHoveredStage(null); },
227
+ }); });
228
+ }
229
+ return (React.createElement("div", { style: { display: 'flex', justifyContent: 'center' } },
230
+ React.createElement(Legends, __assign({ ref: legendsRef, legends: legends, centerLegends: true, onChange: _onLegendSelectionChangeCallback }, props.legendProps))));
231
+ }
232
+ function _isChartEmpty() {
233
+ return !(props.data && props.data.length > 0);
234
+ }
235
+ var calloutProps = __assign({ isCalloutVisible: isCalloutVisible, directionalHint: 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 () {
236
+ setIsCalloutVisible(false);
237
+ }, preventDismissOnLostFocus: true }, props.calloutProps);
238
+ var width = props.width || 350;
239
+ var height = props.height || 500;
240
+ var classNames = getClassNames(props.styles, {
241
+ theme: props.theme,
242
+ className: props.className,
243
+ chartWidth: width,
244
+ chartHeight: height,
245
+ });
246
+ var funnelMarginTop = 40;
247
+ var funnelWidth = width * 0.8;
248
+ var funnelOffsetX = (width - funnelWidth) / 2;
249
+ return !_isChartEmpty() ? (React.createElement("div", { ref: chartContainerRef, className: classNames.root },
250
+ React.createElement(FocusZone, { direction: FocusZoneDirection.horizontal },
251
+ React.createElement("svg", { width: width, height: height, className: classNames.chart, role: 'img', "aria-label": props.chartTitle },
252
+ React.createElement("g", { transform: isRTL
253
+ ? "translate(".concat(funnelOffsetX + funnelWidth, ", ").concat(funnelMarginTop, ") scale(-1,1)")
254
+ : "translate(".concat(funnelOffsetX, ", ").concat(funnelMarginTop, ")") }, isStacked
255
+ ? _createStackedFunnel(height - funnelMarginTop, funnelWidth)
256
+ : _createFunnel(height - funnelMarginTop, funnelWidth)),
257
+ isCalloutVisible && (React.createElement(Callout, __assign({}, calloutProps),
258
+ React.createElement(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 }))))),
259
+ _renderLegends())) : (React.createElement("div", { id: _emptyChartId, role: 'alert', style: { opacity: '0' }, "aria-label": 'Graph has no data to display' }));
260
+ });
261
+ FunnelChartBase.displayName = 'FunnelChart';
262
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
263
+ FunnelChartBase.defaultProps = {
264
+ orientation: 'horizontal',
265
+ };
266
+ //# 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":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAOlF,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAA6B,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EACL,kCAAkC,EAClC,gCAAgC,EAChC,mBAAmB,EACnB,yCAAyC,EACzC,uCAAuC,GACxC,MAAM,kBAAkB,CAAC;AAE1B,IAAM,aAAa,GAAG,kBAAkB,EAA8C,CAAC;AAEvF,MAAM,CAAC,IAAM,eAAe,GAA+C,KAAK,CAAC,UAAU,CAGzF,UAAC,KAAK,EAAE,YAAY;;IACpB,IAAM,UAAU,GAAW,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC1D,IAAM,aAAa,GAAW,KAAK,CAAC,oBAAoB,CAAC,CAAC;IAC1D,IAAM,KAAK,GAAG,MAAM,EAAE,CAAC;IAEjB,IAAA,KAAkC,KAAK,CAAC,QAA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SAAS,IAAC,SAAS,EAAE,kBAAkB,CAAC,UAAU;YACjD,6BAAK,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,gBAAc,KAAK,CAAC,UAAU;gBACvG,2BACE,SAAS,EACP,KAAK;wBACH,CAAC,CAAC,oBAAa,aAAa,GAAG,WAAW,eAAK,eAAe,kBAAe;wBAC7E,CAAC,CAAC,oBAAa,aAAa,eAAK,eAAe,MAAG,IAGtD,SAAS;oBACR,CAAC,CAAC,oBAAoB,CAAC,MAAM,GAAG,eAAe,EAAE,WAAW,CAAC;oBAC7D,CAAC,CAAC,aAAa,CAAC,MAAM,GAAG,eAAe,EAAE,WAAW,CAAC,CACtD;gBACH,gBAAgB,IAAI,CACnB,oBAAC,OAAO,eAAK,YAAY;oBACvB,oBAAC,cAAc,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;QACX,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;AACJ,CAAC,CAAC,CAAC;AACH,eAAe,CAAC,WAAW,GAAG,aAAa,CAAC;AAC5C,4DAA4D;AAC5D,eAAe,CAAC,YAAY,GAAG;IAC7B,WAAW,EAAE,YAAY;CAC1B,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,9 @@
1
+ import { styled } from '@fluentui/react';
2
+ import { FunnelChartBase } from './FunnelChart.base';
3
+ import { getFunnelChartStyles } from './FunnelChart.styles';
4
+ /**
5
+ * Funnelchart component.
6
+ * {@docCategory FunnelChart}
7
+ */
8
+ export var FunnelChart = styled(FunnelChartBase, getFunnelChartStyles);
9
+ //# sourceMappingURL=FunnelChart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunnelChart.js","sourceRoot":"../src/","sources":["components/FunnelChart/FunnelChart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG5D;;;GAGG;AACH,MAAM,CAAC,IAAM,WAAW,GAA+C,MAAM,CAI3E,eAAe,EAAE,oBAAoB,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,38 @@
1
+ import { FontWeights } from '@fluentui/react/lib/Styling';
2
+ export var getFunnelChartStyles = function (props) {
3
+ var theme = props.theme, className = props.className, chartWidth = props.chartWidth, chartHeight = props.chartHeight;
4
+ return {
5
+ // root: { minHeight: '200px', minWidth: '200px', position: 'relative' },
6
+ root: [
7
+ theme.fonts.medium,
8
+ 'ms-FunnelChart',
9
+ {
10
+ alignItems: 'center',
11
+ width: '100%',
12
+ height: '100%',
13
+ },
14
+ className,
15
+ ],
16
+ chart: {
17
+ display: 'block',
18
+ width: chartWidth,
19
+ height: chartHeight,
20
+ },
21
+ text: [
22
+ theme.fonts.medium,
23
+ {
24
+ pointerEvents: 'none',
25
+ fontWeight: FontWeights.semibold,
26
+ fill: theme.palette.neutralPrimary,
27
+ },
28
+ ],
29
+ subComponentStyles: {
30
+ calloutStyles: {
31
+ root: {
32
+ maxWidth: '238px',
33
+ },
34
+ },
35
+ },
36
+ };
37
+ };
38
+ //# 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":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAG1D,MAAM,CAAC,IAAM,oBAAoB,GAAG,UAAC,KAA6B;IACxD,IAAA,KAAK,GAAyC,KAAK,MAA9C,EAAE,SAAS,GAA8B,KAAK,UAAnC,EAAE,UAAU,GAAkB,KAAK,WAAvB,EAAE,WAAW,GAAK,KAAK,YAAV,CAAW;IAC5D,OAAO;QACL,yEAAyE;QACzE,IAAI,EAAE;YACJ,KAAK,CAAC,KAAK,CAAC,MAAM;YAClB,gBAAgB;YAChB;gBACE,UAAU,EAAE,QAAQ;gBACpB,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,MAAM;aACf;YACD,SAAS;SACV;QACD,KAAK,EAAE;YACL,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,UAAU;YACjB,MAAM,EAAE,WAAW;SACpB;QACD,IAAI,EAAE;YACJ,KAAK,CAAC,KAAK,CAAC,MAAM;YAClB;gBACE,aAAa,EAAE,MAAM;gBACrB,UAAU,EAAE,WAAW,CAAC,QAAQ;gBAChC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;aACnC;SACF;QACD,kBAAkB,EAAE;YAClB,aAAa,EAAE;gBACb,IAAI,EAAE;oBACJ,QAAQ,EAAE,OAAO;iBAClB;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC","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,2 @@
1
+ export {};
2
+ //# 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 {};