@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,202 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSegmentTextProps = exports.getStackedVerticalFunnelSegmentGeometry = exports.getStackedHorizontalFunnelSegmentGeometry = exports.getVerticalFunnelSegmentGeometry = exports.getHorizontalFunnelSegmentGeometry = void 0;
4
+ function getHorizontalFunnelSegmentGeometry(_a) {
5
+ var d = _a.d, i = _a.i, data = _a.data, funnelWidth = _a.funnelWidth, funnelHeight = _a.funnelHeight, isRTL = _a.isRTL;
6
+ var segmentHeight = funnelHeight / data.length;
7
+ var widthScale = function (value) { return (value / Math.max.apply(Math, data.map(function (dataPoint) { return dataPoint.value; }))) * funnelWidth; };
8
+ var topWidth = widthScale(d.value);
9
+ var bottomWidth = i < data.length - 1 ? widthScale(data[i + 1].value) : 0;
10
+ var xOffset = (funnelWidth - topWidth) / 2;
11
+ var nextXOffset = (funnelWidth - bottomWidth) / 2;
12
+ var xStart = isRTL ? funnelWidth - xOffset : xOffset;
13
+ var xEnd = isRTL ? funnelWidth - nextXOffset : nextXOffset;
14
+ var isLastSegment = i === data.length - 1;
15
+ var textY = isLastSegment ? i * segmentHeight + segmentHeight * 0.33 : i * segmentHeight + segmentHeight / 2;
16
+ var textX = funnelWidth / 2;
17
+ var availableWidth = topWidth;
18
+ if (isLastSegment) {
19
+ var yFromTop = textY - i * segmentHeight;
20
+ var widthAtY = topWidth * (1 - yFromTop / segmentHeight);
21
+ availableWidth = Math.max(widthAtY * 0.8, 0);
22
+ }
23
+ else {
24
+ availableWidth = Math.min(topWidth, bottomWidth) * 0.9;
25
+ }
26
+ var pathD = "M".concat(xStart, ",").concat(i * segmentHeight, "\n L").concat(funnelWidth - xStart, ",").concat(i * segmentHeight, "\n L").concat(funnelWidth - xEnd, ",").concat((i + 1) * segmentHeight, "\n L").concat(xEnd, ",").concat((i + 1) * segmentHeight, "\n Z");
27
+ return { pathD: pathD, textX: textX, textY: textY, availableWidth: availableWidth };
28
+ }
29
+ exports.getHorizontalFunnelSegmentGeometry = getHorizontalFunnelSegmentGeometry;
30
+ function getVerticalFunnelSegmentGeometry(_a) {
31
+ var d = _a.d, i = _a.i, data = _a.data, funnelWidth = _a.funnelWidth, funnelHeight = _a.funnelHeight, isRTL = _a.isRTL;
32
+ var segmentWidth = funnelWidth / data.length;
33
+ var heightScale = function (value) { return (value / Math.max.apply(Math, data.map(function (dataPoint) { return dataPoint.value; }))) * funnelHeight; };
34
+ var leftHeight = heightScale(d.value);
35
+ var rightHeight = i < data.length - 1 ? heightScale(data[i + 1].value) : 0;
36
+ var yOffset = (funnelHeight - leftHeight) / 2;
37
+ var nextYOffset = (funnelHeight - rightHeight) / 2;
38
+ var x0 = i * segmentWidth;
39
+ var x1 = (i + 1) * segmentWidth;
40
+ var isLastSegment = i === data.length - 1;
41
+ var textX;
42
+ var textY;
43
+ var availableWidth = segmentWidth * 0.8;
44
+ if (isLastSegment) {
45
+ // For the triangular last segment, position text at 1/4 from the left edge
46
+ textX = x0 + (x1 - x0) * 0.25;
47
+ textY = funnelHeight / 2;
48
+ // For triangular segments, we need to check both height and width constraints
49
+ // The segment needs to be large enough to contain text
50
+ var segmentArea = (leftHeight * segmentWidth) / 2; // Area of triangle
51
+ var minAreaForText = 800; // Minimum area needed to show text
52
+ if (leftHeight < 40 || segmentArea < minAreaForText) {
53
+ // Hide text if height is too small or area is insufficient
54
+ availableWidth = 0;
55
+ }
56
+ else {
57
+ // Calculate available width at text position
58
+ var widthAtTextPosition = (x1 - x0) * 0.75;
59
+ availableWidth = widthAtTextPosition * 0.6;
60
+ }
61
+ }
62
+ else {
63
+ textX = (x0 + x1) / 2;
64
+ textY = funnelHeight / 2;
65
+ var minHeight = Math.min(leftHeight, rightHeight);
66
+ availableWidth = minHeight > 20 ? segmentWidth * 0.8 : 0;
67
+ }
68
+ var pathD = "M".concat(x0, ",").concat(yOffset, "\n L").concat(x1, ",").concat(nextYOffset, "\n L").concat(x1, ",").concat(funnelHeight - nextYOffset, "\n L").concat(x0, ",").concat(funnelHeight - yOffset, "\n Z");
69
+ return { pathD: pathD, textX: textX, textY: textY, availableWidth: availableWidth };
70
+ }
71
+ exports.getVerticalFunnelSegmentGeometry = getVerticalFunnelSegmentGeometry;
72
+ function getStackedHorizontalFunnelSegmentGeometry(_a) {
73
+ var _b, _c;
74
+ var i = _a.i, k = _a.k, stages = _a.stages, totals = _a.totals, maxTotal = _a.maxTotal, funnelWidth = _a.funnelWidth, funnelHeight = _a.funnelHeight;
75
+ var segmentHeight = funnelHeight / stages.length;
76
+ var cur = stages[i];
77
+ var next = stages[i + 1] || { subValues: [] };
78
+ var curTotal = totals[i] || 1;
79
+ var nextTotal = totals[i + 1] || 0;
80
+ var cumTop = 0;
81
+ var cumBot = 0;
82
+ var _loop_1 = function (idx) {
83
+ var v_1 = cur.subValues[idx];
84
+ var vNext_1 = (_b = next.subValues) === null || _b === void 0 ? void 0 : _b.find(function (x) { return x.category === v_1.category; });
85
+ var val_1 = v_1.value;
86
+ var nextVal_1 = vNext_1 ? vNext_1.value : 0;
87
+ cumTop += (val_1 / curTotal) * (curTotal / maxTotal) * funnelWidth;
88
+ cumBot += (nextVal_1 / nextTotal || 0) * (nextTotal / maxTotal) * funnelWidth;
89
+ };
90
+ for (var idx = 0; idx < k; idx++) {
91
+ _loop_1(idx);
92
+ }
93
+ var v = cur.subValues[k];
94
+ var vNext = (_c = next.subValues) === null || _c === void 0 ? void 0 : _c.find(function (x) { return x.category === v.category; });
95
+ var val = v.value;
96
+ var nextVal = vNext ? vNext.value : 0;
97
+ var topW = (val / curTotal) * (curTotal / maxTotal) * funnelWidth;
98
+ var botW = (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelWidth;
99
+ var topStart = (funnelWidth - (curTotal / maxTotal) * funnelWidth) / 2 + cumTop;
100
+ var topEnd = topStart + topW;
101
+ var botStart = (funnelWidth - (nextTotal / maxTotal) * funnelWidth) / 2 + cumBot;
102
+ var botEnd = botStart + botW;
103
+ var textX = (topStart + topEnd + botStart + botEnd) / 4;
104
+ var isLastSegment = i === stages.length - 1;
105
+ var textY = isLastSegment ? i * segmentHeight + segmentHeight * 0.33 : (i + 0.5) * segmentHeight;
106
+ // Calculate available width based on this specific segment's width
107
+ var availableWidth;
108
+ if (isLastSegment) {
109
+ // For triangular last segment, use the width at text Y position
110
+ var yFromTop = textY - i * segmentHeight;
111
+ var widthRatio = 1 - yFromTop / segmentHeight;
112
+ availableWidth = topW * widthRatio;
113
+ }
114
+ else {
115
+ // For trapezoidal segments, use the actual segment width
116
+ availableWidth = Math.min(topW, botW);
117
+ }
118
+ var pathD = "M".concat(topStart, ",").concat(i * segmentHeight, "\n L").concat(topEnd, ",").concat(i * segmentHeight, "\n L").concat(botEnd, ",").concat((i + 1) * segmentHeight, "\n L").concat(botStart, ",").concat((i + 1) * segmentHeight, "\n Z");
119
+ return { pathD: pathD, textX: textX, textY: textY, availableWidth: availableWidth };
120
+ }
121
+ exports.getStackedHorizontalFunnelSegmentGeometry = getStackedHorizontalFunnelSegmentGeometry;
122
+ function getStackedVerticalFunnelSegmentGeometry(_a) {
123
+ var _b, _c;
124
+ var i = _a.i, k = _a.k, stages = _a.stages, totals = _a.totals, maxTotal = _a.maxTotal, funnelWidth = _a.funnelWidth, funnelHeight = _a.funnelHeight;
125
+ var segmentWidth = funnelWidth / stages.length;
126
+ var cur = stages[i];
127
+ var next = stages[i + 1] || { subValues: [] };
128
+ var curTotal = totals[i] || 1;
129
+ var nextTotal = totals[i + 1] || 0;
130
+ var cumTop = 0;
131
+ var cumBot = 0;
132
+ var _loop_2 = function (idx) {
133
+ var v_2 = cur.subValues[idx];
134
+ var vNext_2 = (_b = next.subValues) === null || _b === void 0 ? void 0 : _b.find(function (x) { return x.category === v_2.category; });
135
+ var val_2 = v_2.value;
136
+ var nextVal_2 = vNext_2 ? vNext_2.value : 0;
137
+ cumTop += (val_2 / curTotal) * (curTotal / maxTotal) * funnelHeight;
138
+ cumBot += (nextVal_2 / nextTotal || 0) * (nextTotal / maxTotal) * funnelHeight;
139
+ };
140
+ for (var idx = 0; idx < k; idx++) {
141
+ _loop_2(idx);
142
+ }
143
+ var v = cur.subValues[k];
144
+ var vNext = (_c = next.subValues) === null || _c === void 0 ? void 0 : _c.find(function (x) { return x.category === v.category; });
145
+ var val = v.value;
146
+ var nextVal = vNext ? vNext.value : 0;
147
+ var topH = (val / curTotal) * (curTotal / maxTotal) * funnelHeight;
148
+ var botH = (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelHeight;
149
+ var leftStart = i * segmentWidth;
150
+ var leftEnd = (i + 1) * segmentWidth;
151
+ var topStart = (funnelHeight - (curTotal / maxTotal) * funnelHeight) / 2 + cumTop;
152
+ var topEnd = topStart + topH;
153
+ var botStart = (funnelHeight - (nextTotal / maxTotal) * funnelHeight) / 2 + cumBot;
154
+ var botEnd = botStart + botH;
155
+ var isLastSegment = i === stages.length - 1;
156
+ var textX;
157
+ var textY;
158
+ var availableWidth;
159
+ if (isLastSegment) {
160
+ textX = leftStart + (leftEnd - leftStart) * 0.25;
161
+ textY = (topStart + topEnd) / 2;
162
+ // For triangular segments, calculate available width at text position
163
+ var segmentWidthAtTextPos = (leftEnd - leftStart) * 0.5;
164
+ availableWidth = segmentWidthAtTextPos * 0.8;
165
+ // For triangular last segments, also check if there's enough height
166
+ // The segment area should be large enough to contain text
167
+ var segmentArea = (topH * segmentWidth) / 2;
168
+ if (topH < 24 || segmentArea < 600) {
169
+ availableWidth = 0;
170
+ }
171
+ }
172
+ else {
173
+ textX = (leftStart + leftEnd) / 2;
174
+ textY = (topStart + topEnd + botStart + botEnd) / 4;
175
+ // For trapezoidal segments, use full segment width
176
+ availableWidth = Math.abs(leftEnd - leftStart) * 0.9;
177
+ // Check if the segment has sufficient height for text
178
+ // For non-last segments, we need to ensure there's enough vertical space
179
+ var avgHeight = (topH + botH) / 2;
180
+ if (avgHeight < 20) {
181
+ availableWidth = 0;
182
+ }
183
+ }
184
+ var pathD = "M".concat(leftStart, ",").concat(topStart, "\n L").concat(leftEnd, ",").concat(botStart, "\n L").concat(leftEnd, ",").concat(botEnd, "\n L").concat(leftStart, ",").concat(topEnd, "\n Z");
185
+ return { pathD: pathD, textX: textX, textY: textY, availableWidth: availableWidth };
186
+ }
187
+ exports.getStackedVerticalFunnelSegmentGeometry = getStackedVerticalFunnelSegmentGeometry;
188
+ function getSegmentTextProps(_a) {
189
+ var availableWidth = _a.availableWidth, _b = _a.minTextWidth, minTextWidth = _b === void 0 ? 24 : _b, textX = _a.textX, textY = _a.textY, value = _a.value, culture = _a.culture, onMouseOver = _a.onMouseOver, onMouseMove = _a.onMouseMove, onMouseOut = _a.onMouseOut;
190
+ return {
191
+ show: availableWidth > minTextWidth && availableWidth > 0,
192
+ x: textX,
193
+ y: textY,
194
+ value: value,
195
+ culture: culture,
196
+ onMouseOver: onMouseOver,
197
+ onMouseMove: onMouseMove,
198
+ onMouseOut: onMouseOut,
199
+ };
200
+ }
201
+ exports.getSegmentTextProps = getSegmentTextProps;
202
+ //# sourceMappingURL=funnelGeometry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"funnelGeometry.js","sourceRoot":"../src/","sources":["components/FunnelChart/funnelGeometry.ts"],"names":[],"mappings":";;;AA2BA,SAAgB,kCAAkC,CAAC,EAclD;QAbC,CAAC,OAAA,EACD,CAAC,OAAA,EACD,IAAI,UAAA,EACJ,WAAW,iBAAA,EACX,YAAY,kBAAA,EACZ,KAAK,WAAA;IASL,IAAM,aAAa,GAAG,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC;IACjD,IAAM,UAAU,GAAG,UAAC,KAAa,IAAK,OAAA,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,OAAR,IAAI,EAAQ,IAAI,CAAC,GAAG,CAAC,UAAA,SAAS,IAAI,OAAA,SAAS,CAAC,KAAM,EAAhB,CAAgB,CAAC,CAAC,CAAC,GAAG,WAAW,EAA5E,CAA4E,CAAC;IACnH,IAAM,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,KAAM,CAAC,CAAC;IACtC,IAAM,WAAW,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7E,IAAM,OAAO,GAAG,CAAC,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC7C,IAAM,WAAW,GAAG,CAAC,WAAW,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IACpD,IAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAA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D,kDA+BC","sourcesContent":["import * as React from 'react';\nimport { IFunnelChartDataPoint } from './FunnelChart.types';\n\nexport interface IFunnelSegmentGeometry {\n pathD: string;\n textX: number;\n textY: number;\n availableWidth: number;\n}\n\nexport interface IStackedFunnelSegmentGeometry {\n pathD: string;\n textX: number;\n textY: number;\n availableWidth: number;\n}\n\ninterface ISubValue {\n category: string;\n value: number;\n color: string;\n}\n\ninterface IStage {\n subValues: ISubValue[];\n}\n\nexport function getHorizontalFunnelSegmentGeometry({\n d,\n i,\n data,\n funnelWidth,\n funnelHeight,\n isRTL,\n}: {\n d: IFunnelChartDataPoint;\n i: number;\n data: IFunnelChartDataPoint[];\n funnelWidth: number;\n funnelHeight: number;\n isRTL: boolean;\n}): IFunnelSegmentGeometry {\n const segmentHeight = funnelHeight / data.length;\n const widthScale = (value: number) => (value / Math.max(...data.map(dataPoint => dataPoint.value!))) * funnelWidth;\n const topWidth = widthScale(d.value!);\n const bottomWidth = i < data.length - 1 ? widthScale(data[i + 1].value!) : 0;\n const xOffset = (funnelWidth - topWidth) / 2;\n const nextXOffset = (funnelWidth - bottomWidth) / 2;\n const xStart = isRTL ? funnelWidth - xOffset : xOffset;\n const xEnd = isRTL ? funnelWidth - nextXOffset : nextXOffset;\n\n const isLastSegment = i === data.length - 1;\n const textY = isLastSegment ? i * segmentHeight + segmentHeight * 0.33 : i * segmentHeight + segmentHeight / 2;\n\n const textX = funnelWidth / 2;\n let availableWidth = topWidth;\n if (isLastSegment) {\n const yFromTop = textY - i * segmentHeight;\n const widthAtY = topWidth * (1 - yFromTop / segmentHeight);\n availableWidth = Math.max(widthAtY * 0.8, 0);\n } else {\n availableWidth = Math.min(topWidth, bottomWidth) * 0.9;\n }\n const pathD = `M${xStart},${i * segmentHeight}\n L${funnelWidth - xStart},${i * segmentHeight}\n L${funnelWidth - xEnd},${(i + 1) * segmentHeight}\n L${xEnd},${(i + 1) * segmentHeight}\n Z`;\n return { pathD, textX, textY, availableWidth };\n}\n\nexport function getVerticalFunnelSegmentGeometry({\n d,\n i,\n data,\n funnelWidth,\n funnelHeight,\n isRTL,\n}: {\n d: IFunnelChartDataPoint;\n i: number;\n data: IFunnelChartDataPoint[];\n funnelWidth: number;\n funnelHeight: number;\n isRTL: boolean;\n}): IFunnelSegmentGeometry {\n const segmentWidth = funnelWidth / data.length;\n const heightScale = (value: number) => (value / Math.max(...data.map(dataPoint => dataPoint.value!))) * funnelHeight;\n const leftHeight = heightScale(d.value!);\n const rightHeight = i < data.length - 1 ? heightScale(data[i + 1].value!) : 0;\n const yOffset = (funnelHeight - leftHeight) / 2;\n const nextYOffset = (funnelHeight - rightHeight) / 2;\n const x0 = i * segmentWidth;\n const x1 = (i + 1) * segmentWidth;\n\n const isLastSegment = i === data.length - 1;\n let textX: number;\n let textY: number;\n let availableWidth = segmentWidth * 0.8;\n\n if (isLastSegment) {\n // For the triangular last segment, position text at 1/4 from the left edge\n textX = x0 + (x1 - x0) * 0.25;\n textY = funnelHeight / 2;\n\n // For triangular segments, we need to check both height and width constraints\n // The segment needs to be large enough to contain text\n const segmentArea = (leftHeight * segmentWidth) / 2; // Area of triangle\n const minAreaForText = 800; // Minimum area needed to show text\n\n if (leftHeight < 40 || segmentArea < minAreaForText) {\n // Hide text if height is too small or area is insufficient\n availableWidth = 0;\n } else {\n // Calculate available width at text position\n const widthAtTextPosition = (x1 - x0) * 0.75;\n availableWidth = widthAtTextPosition * 0.6;\n }\n } else {\n textX = (x0 + x1) / 2;\n textY = funnelHeight / 2;\n const minHeight = Math.min(leftHeight, rightHeight);\n availableWidth = minHeight > 20 ? segmentWidth * 0.8 : 0;\n }\n\n const pathD = `M${x0},${yOffset}\n L${x1},${nextYOffset}\n L${x1},${funnelHeight - nextYOffset}\n L${x0},${funnelHeight - yOffset}\n Z`;\n return { pathD, textX, textY, availableWidth };\n}\n\nexport function getStackedHorizontalFunnelSegmentGeometry({\n i,\n k,\n stages,\n totals,\n maxTotal,\n funnelWidth,\n funnelHeight,\n}: {\n i: number;\n k: number;\n stages: IStage[];\n totals: number[];\n maxTotal: number;\n funnelWidth: number;\n funnelHeight: number;\n}): IStackedFunnelSegmentGeometry {\n const segmentHeight = funnelHeight / stages.length;\n const cur = stages[i];\n const next = stages[i + 1] || { subValues: [] };\n const curTotal = totals[i] || 1;\n const nextTotal = totals[i + 1] || 0;\n\n let cumTop = 0;\n let cumBot = 0;\n for (let idx = 0; idx < k; idx++) {\n const v = cur.subValues[idx];\n const vNext = next.subValues?.find((x: ISubValue) => x.category === v.category);\n const val = v.value;\n const nextVal = vNext ? vNext.value : 0;\n cumTop += (val / curTotal) * (curTotal / maxTotal) * funnelWidth;\n cumBot += (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelWidth;\n }\n const v = cur.subValues[k];\n const vNext = next.subValues?.find((x: ISubValue) => x.category === v.category);\n const val = v.value;\n const nextVal = vNext ? vNext.value : 0;\n const topW = (val / curTotal) * (curTotal / maxTotal) * funnelWidth;\n const botW = (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelWidth;\n const topStart = (funnelWidth - (curTotal / maxTotal) * funnelWidth) / 2 + cumTop;\n const topEnd = topStart + topW;\n const botStart = (funnelWidth - (nextTotal / maxTotal) * funnelWidth) / 2 + cumBot;\n const botEnd = botStart + botW;\n const textX = (topStart + topEnd + botStart + botEnd) / 4;\n\n const isLastSegment = i === stages.length - 1;\n const textY = isLastSegment ? i * segmentHeight + segmentHeight * 0.33 : (i + 0.5) * segmentHeight;\n\n // Calculate available width based on this specific segment's width\n let availableWidth: number;\n if (isLastSegment) {\n // For triangular last segment, use the width at text Y position\n const yFromTop = textY - i * segmentHeight;\n const widthRatio = 1 - yFromTop / segmentHeight;\n availableWidth = topW * widthRatio;\n } else {\n // For trapezoidal segments, use the actual segment width\n availableWidth = Math.min(topW, botW);\n }\n\n const pathD = `M${topStart},${i * segmentHeight}\n L${topEnd},${i * segmentHeight}\n L${botEnd},${(i + 1) * segmentHeight}\n L${botStart},${(i + 1) * segmentHeight}\n Z`;\n return { pathD, textX, textY, availableWidth };\n}\n\nexport function getStackedVerticalFunnelSegmentGeometry({\n i,\n k,\n stages,\n totals,\n maxTotal,\n funnelWidth,\n funnelHeight,\n}: {\n i: number;\n k: number;\n stages: IStage[];\n totals: number[];\n maxTotal: number;\n funnelWidth: number;\n funnelHeight: number;\n}): IStackedFunnelSegmentGeometry {\n const segmentWidth = funnelWidth / stages.length;\n const cur = stages[i];\n const next = stages[i + 1] || { subValues: [] };\n const curTotal = totals[i] || 1;\n const nextTotal = totals[i + 1] || 0;\n\n let cumTop = 0;\n let cumBot = 0;\n for (let idx = 0; idx < k; idx++) {\n const v = cur.subValues[idx];\n const vNext = next.subValues?.find((x: ISubValue) => x.category === v.category);\n const val = v.value;\n const nextVal = vNext ? vNext.value : 0;\n cumTop += (val / curTotal) * (curTotal / maxTotal) * funnelHeight;\n cumBot += (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelHeight;\n }\n const v = cur.subValues[k];\n const vNext = next.subValues?.find((x: ISubValue) => x.category === v.category);\n const val = v.value;\n const nextVal = vNext ? vNext.value : 0;\n const topH = (val / curTotal) * (curTotal / maxTotal) * funnelHeight;\n const botH = (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelHeight;\n const leftStart = i * segmentWidth;\n const leftEnd = (i + 1) * segmentWidth;\n const topStart = (funnelHeight - (curTotal / maxTotal) * funnelHeight) / 2 + cumTop;\n const topEnd = topStart + topH;\n const botStart = (funnelHeight - (nextTotal / maxTotal) * funnelHeight) / 2 + cumBot;\n const botEnd = botStart + botH;\n\n const isLastSegment = i === stages.length - 1;\n let textX: number;\n let textY: number;\n let availableWidth: number;\n\n if (isLastSegment) {\n textX = leftStart + (leftEnd - leftStart) * 0.25;\n textY = (topStart + topEnd) / 2;\n // For triangular segments, calculate available width at text position\n const segmentWidthAtTextPos = (leftEnd - leftStart) * 0.5;\n availableWidth = segmentWidthAtTextPos * 0.8;\n\n // For triangular last segments, also check if there's enough height\n // The segment area should be large enough to contain text\n const segmentArea = (topH * segmentWidth) / 2;\n if (topH < 24 || segmentArea < 600) {\n availableWidth = 0;\n }\n } else {\n textX = (leftStart + leftEnd) / 2;\n textY = (topStart + topEnd + botStart + botEnd) / 4;\n // For trapezoidal segments, use full segment width\n availableWidth = Math.abs(leftEnd - leftStart) * 0.9;\n\n // Check if the segment has sufficient height for text\n // For non-last segments, we need to ensure there's enough vertical space\n const avgHeight = (topH + botH) / 2;\n if (avgHeight < 20) {\n availableWidth = 0;\n }\n }\n\n const pathD = `M${leftStart},${topStart}\n L${leftEnd},${botStart}\n L${leftEnd},${botEnd}\n L${leftStart},${topEnd}\n Z`;\n return { pathD, textX, textY, availableWidth };\n}\n\nexport function getSegmentTextProps({\n availableWidth,\n minTextWidth = 24,\n textX,\n textY,\n value,\n culture,\n onMouseOver,\n onMouseMove,\n onMouseOut,\n}: {\n availableWidth: number;\n minTextWidth?: number;\n textX: number;\n textY: number;\n value: number;\n culture: string | undefined;\n onMouseOver: (event: React.MouseEvent<SVGElement>) => void;\n onMouseMove: (event: React.MouseEvent<SVGElement>) => void;\n onMouseOut: () => void;\n}) {\n return {\n show: availableWidth > minTextWidth && availableWidth > 0,\n x: textX,\n y: textY,\n value,\n culture,\n onMouseOver,\n onMouseMove,\n onMouseOut,\n };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './FunnelChart';
2
+ export * from './FunnelChart.types';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./FunnelChart"), exports);
5
+ tslib_1.__exportStar(require("./FunnelChart.types"), exports);
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/FunnelChart/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B;AAC9B,8DAAoC","sourcesContent":["export * from './FunnelChart';\nexport * from './FunnelChart.types';\n"]}
@@ -344,13 +344,11 @@ var GaugeChartBase = /** @class */ (function (_super) {
344
344
  this._classNames = getClassNames(this.props.styles, {
345
345
  theme: this.props.theme,
346
346
  className: this.props.className,
347
- chartWidth: width,
348
- chartHeight: height - this._legendsHeight,
349
347
  chartValueSize: chartValueSize,
350
348
  });
351
349
  return (React.createElement("div", { className: this._classNames.root, ref: function (el) { return (_this._rootElem = el); } },
352
- React.createElement(react_focus_1.FocusZone, { direction: react_focus_1.FocusZoneDirection.horizontal },
353
- React.createElement("svg", { className: this._classNames.chart, role: "region", "aria-label": this._getChartTitle(), onMouseLeave: this._handleMouseOut },
350
+ React.createElement(react_focus_1.FocusZone, { direction: react_focus_1.FocusZoneDirection.horizontal, className: this._classNames.chartWrapper },
351
+ React.createElement("svg", { className: this._classNames.chart, role: "region", "aria-label": this._getChartTitle(), onMouseLeave: this._handleMouseOut, width: width, height: height - this._legendsHeight },
354
352
  React.createElement("g", { transform: "translate(".concat(width / 2, ", ").concat(height - (this._margins.bottom + this._legendsHeight), ")") },
355
353
  this.props.chartTitle && (React.createElement("text", { x: 0, y: -(this._outerRadius + TITLE_OFFSET), textAnchor: "middle", className: this._classNames.chartTitle, "aria-hidden": true }, this.props.chartTitle)),
356
354
  !this.props.hideMinMax && (React.createElement(React.Fragment, null,
@@ -466,7 +464,7 @@ var GaugeChartBase = /** @class */ (function (_super) {
466
464
  Object.keys(subcounts_1).map(function (subcountName) {
467
465
  return (React.createElement("div", { key: subcountName, className: _classNames.calloutBlockContainer },
468
466
  React.createElement("div", { className: _classNames.calloutlegendText },
469
- " ",
467
+ ' ',
470
468
  (0, chart_utilities_1.formatToLocaleString)(subcountName, culture)),
471
469
  React.createElement("div", { className: _classNames.calloutContentY }, (0, chart_utilities_1.formatToLocaleString)(subcounts_1[subcountName], culture))));
472
470
  })));
@@ -1 +1 @@
1
- {"version":3,"file":"GaugeChart.base.js","sourceRoot":"../src/","sources":["components/GaugeChart/GaugeChart.base.tsx"],"names":[],"mappings":";;;;AAAA,6BAA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AAK,SAAS,EAAE,WAAW,CAAC,eAAe,IACxC,IAAA,sCAAoB,EAAC,WAAS,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,CACnD,CACF,CACP,CAAC;gBACJ,CAAC,CAAC,CACE,CACP,CAAC;QACJ,CAAC;IACH,CAAC;IAMH,qBAAC;AAAD,CAAC,AA1pBD,CAAoC,KAAK,CAAC,SAAS,GA0pBlD;AA1pBY,wCAAc","sourcesContent":["import * as React from 'react';\nimport { arc as d3Arc } from 'd3-shape';\nimport { classNamesFunction, getId, getRTL, initializeComponentRef } from '@fluentui/react/lib/Utilities';\nimport {\n IGaugeChartProps,\n IGaugeChartSegment,\n IGaugeChartStyleProps,\n IGaugeChartStyles,\n GaugeValueFormat,\n GaugeChartVariant,\n} from './GaugeChart.types';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { formatToLocaleString } from '@fluentui/chart-utilities';\nimport {\n Points,\n areArraysEqual,\n formatScientificLimitWidth,\n getAccessibleDataObject,\n getColorFromToken,\n getNextColor,\n getNextGradient,\n pointTypes,\n} from '../../utilities/index';\nimport { ILegend, ILegendContainer, LegendShape, Legends, Shape } from '../Legends/index';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { IYValueHover } from '../../index';\nimport { SVGTooltipText } from '../../utilities/SVGTooltipText';\nimport { select as d3Select } from 'd3-selection';\nimport { IChart, IImageExportOptions } from '../../types/index';\nimport { toImage } from '../../utilities/image-export-utils';\n\nconst GAUGE_MARGIN = 16;\nconst LABEL_WIDTH = 36;\nconst LABEL_HEIGHT = 16;\nconst LABEL_OFFSET = 4;\nconst TITLE_OFFSET = 11;\nconst EXTRA_NEEDLE_LENGTH = 4;\nexport const ARC_PADDING = 2;\nexport const BREAKPOINTS = [\n { minRadius: 52, arcWidth: 12, fontSize: 20 },\n { minRadius: 70, arcWidth: 16, fontSize: 24 },\n { minRadius: 88, arcWidth: 20, fontSize: 32 },\n { minRadius: 106, arcWidth: 24, fontSize: 32 },\n { minRadius: 124, arcWidth: 28, fontSize: 40 },\n { minRadius: 142, arcWidth: 32, fontSize: 40 },\n];\n\nconst getClassNames = classNamesFunction<IGaugeChartStyleProps, IGaugeChartStyles>();\n\nexport const calcNeedleRotation = (chartValue: number, minValue: number, maxValue: number) => {\n let needleRotation = ((chartValue - minValue) / (maxValue - minValue)) * 180;\n if (needleRotation < 0) {\n needleRotation = 0;\n } else if (needleRotation > 180) {\n needleRotation = 180;\n }\n\n return needleRotation;\n};\n\nexport const getSegmentLabel = (\n segment: IExtendedSegment,\n minValue: number,\n maxValue: number,\n variant?: GaugeChartVariant,\n isAriaLabel: boolean = false,\n) => {\n if (isAriaLabel) {\n return minValue === 0 && variant === GaugeChartVariant.SingleSegment\n ? `${segment.legend}, ${segment.size} out of ${maxValue} or ${((segment.size / maxValue) * 100).toFixed()}%`\n : `${segment.legend}, ${segment.start} to ${segment.end}`;\n }\n\n return minValue === 0 && variant === GaugeChartVariant.SingleSegment\n ? `${segment.size} (${((segment.size / maxValue) * 100).toFixed()}%)`\n : `${segment.start} - ${segment.end}`;\n};\n\nexport const getChartValueLabel = (\n chartValue: number,\n minValue: number,\n maxValue: number,\n chartValueFormat?: GaugeValueFormat | ((sweepFraction: [number, number]) => string),\n forCallout: boolean = false,\n): string => {\n if (forCallout) {\n // When displaying the chart value as a percentage, use fractions in the callout, and vice versa.\n // This helps clarify the actual value and avoid repetition.\n return minValue !== 0\n ? chartValue.toString()\n : chartValueFormat === GaugeValueFormat.Fraction\n ? `${((chartValue / maxValue) * 100).toFixed()}%`\n : `${chartValue}/${maxValue}`;\n }\n\n return typeof chartValueFormat === 'function'\n ? chartValueFormat([chartValue - minValue, maxValue - minValue])\n : minValue !== 0\n ? chartValue.toString()\n : chartValueFormat === GaugeValueFormat.Fraction\n ? `${chartValue}/${maxValue}`\n : `${((chartValue / maxValue) * 100).toFixed()}%`;\n};\n\ninterface IYValue extends Omit<IYValueHover, 'y'> {\n y?: string | number;\n}\nexport interface IGaugeChartState {\n hoveredLegend: string;\n selectedLegends: string[];\n focusedElement?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n calloutTarget: any;\n isCalloutVisible: boolean;\n hoverXValue: string | number;\n hoverYValues: IYValue[];\n width: number;\n height: number;\n}\nexport interface IExtendedSegment extends IGaugeChartSegment {\n start: number;\n end: number;\n}\n\nexport class GaugeChartBase extends React.Component<IGaugeChartProps, IGaugeChartState> implements IChart {\n private _classNames: IProcessedStyleSet<IGaugeChartStyles>;\n private _isRTL: boolean;\n private _innerRadius: number;\n private _outerRadius: number;\n private _minValue: number;\n private _maxValue: number;\n private _segments: IExtendedSegment[];\n private _calloutAnchor: string;\n private _rootElem: HTMLDivElement | null;\n private _margins: { left: number; right: number; top: number; bottom: number };\n private _legendsHeight: number;\n private _legendsRef: React.RefObject<ILegendContainer>;\n\n constructor(props: IGaugeChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this._margins = this._getMargins();\n this._legendsHeight = !props.hideLegend ? 24 : 0;\n\n this.state = {\n hoveredLegend: '',\n selectedLegends: props.legendProps?.selectedLegends || [],\n focusedElement: '',\n calloutTarget: null,\n isCalloutVisible: false,\n hoverXValue: '',\n hoverYValues: [],\n width: 140 + this._margins.left + this._margins.right,\n height: 70 + this._margins.top + this._margins.bottom + this._legendsHeight,\n };\n\n this._isRTL = getRTL(props.theme);\n this._calloutAnchor = '';\n this._legendsRef = React.createRef();\n }\n\n public componentDidMount(): void {\n if (this._rootElem) {\n this.setState({\n width: this._rootElem.clientWidth,\n height: this._rootElem.clientHeight,\n });\n }\n }\n\n public componentDidUpdate(prevProps: IGaugeChartProps): void {\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, this.props.legendProps?.selectedLegends)) {\n this.setState({\n selectedLegends: this.props.legendProps?.selectedLegends || [],\n });\n }\n }\n\n public render(): React.ReactNode {\n this._margins = this._getMargins();\n this._legendsHeight = !this.props.hideLegend ? 24 : 0;\n\n const width = this.props.width || this.state.width;\n const height = this.props.height || this.state.height;\n\n this._outerRadius = Math.min(\n (width - (this._margins.left + this._margins.right)) / 2,\n height - (this._margins.top + this._margins.bottom + this._legendsHeight),\n );\n\n const { arcWidth, chartValueSize } = this._getStylesBasedOnBreakpoint();\n this._innerRadius = this._outerRadius - arcWidth;\n\n const { arcs } = this._processProps();\n\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n className: this.props.className,\n chartWidth: width,\n chartHeight: height - this._legendsHeight,\n chartValueSize,\n });\n\n return (\n <div className={this._classNames.root} ref={el => (this._rootElem = el)}>\n <FocusZone direction={FocusZoneDirection.horizontal}>\n <svg\n className={this._classNames.chart}\n role=\"region\"\n aria-label={this._getChartTitle()}\n onMouseLeave={this._handleMouseOut}\n >\n <g transform={`translate(${width / 2}, ${height - (this._margins.bottom + this._legendsHeight)})`}>\n {this.props.chartTitle && (\n <text\n x={0}\n y={-(this._outerRadius + TITLE_OFFSET)}\n textAnchor=\"middle\"\n className={this._classNames.chartTitle}\n aria-hidden={true}\n >\n {this.props.chartTitle}\n </text>\n )}\n {!this.props.hideMinMax && (\n <>\n <text\n x={(this._isRTL ? 1 : -1) * (this._outerRadius + LABEL_OFFSET)}\n y={0}\n textAnchor=\"end\"\n className={this._classNames.limits}\n role=\"img\"\n aria-label={`Min value: ${this._minValue}`}\n >\n {formatScientificLimitWidth(this._minValue)}\n </text>\n <text\n x={(this._isRTL ? -1 : 1) * (this._outerRadius + LABEL_OFFSET)}\n y={0}\n textAnchor=\"start\"\n className={this._classNames.limits}\n role=\"img\"\n aria-label={`Max value: ${this._maxValue}`}\n >\n {formatScientificLimitWidth(this._maxValue)}\n </text>\n </>\n )}\n {arcs.map((arc, index) => {\n const segment = this._segments[arc.segmentIndex];\n\n const clipId = getId('Arc_clip') + `${index}_${arc.startAngle}_${arc.endAngle}`;\n\n const arcClassNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n solidFill: this.props.enableGradient ? 'transparent' : segment.color!,\n gradientFill: `conic-gradient(\n from ${arc.startAngle}rad at 50% 100%,\n ${segment.gradient?.[0]},\n ${segment.gradient?.[1]} ${arc.endAngle - arc.startAngle}rad\n )`,\n opacity: this._legendHighlighted(segment.legend) || this._noLegendHighlighted() ? 1 : 0.1,\n });\n\n return (\n <React.Fragment key={index}>\n <path\n d={arc.d}\n strokeWidth={this.state.focusedElement === segment.legend ? ARC_PADDING : 0}\n className={arcClassNames.segment}\n {...getAccessibleDataObject(\n {\n ariaLabel: getSegmentLabel(segment, this._minValue, this._maxValue, this.props.variant, true),\n ...segment.accessibilityData,\n },\n 'img',\n true,\n )}\n onFocus={e => this._handleFocus(e, segment.legend)}\n onBlur={this._handleBlur}\n onMouseEnter={e => this._handleMouseOver(e, segment.legend)}\n onMouseMove={e => this._handleMouseOver(e, segment.legend)}\n data-is-focusable={this._legendHighlighted(segment.legend) || this._noLegendHighlighted()}\n />\n\n {this.props.enableGradient && (\n <>\n <clipPath id={clipId}>\n <path d={arc.d} />\n </clipPath>\n <foreignObject x=\"-50%\" y=\"-100%\" width=\"100%\" height=\"100%\" clipPath={`url(#${clipId})`}>\n <div className={arcClassNames.gradientSegment} />\n </foreignObject>\n </>\n )}\n </React.Fragment>\n );\n })}\n {this._renderNeedle()}\n <g\n onMouseEnter={e => this._handleMouseOver(e, 'Chart value')}\n onMouseMove={e => this._handleMouseOver(e, 'Chart value')}\n >\n <SVGTooltipText\n content={getChartValueLabel(\n this.props.chartValue,\n this._minValue,\n this._maxValue,\n this.props.chartValueFormat,\n )}\n textProps={{\n x: 0,\n y: 0,\n textAnchor: 'middle',\n className: this._classNames.chartValue,\n 'aria-hidden': 'true',\n }}\n maxWidth={this._innerRadius * 2 - 24}\n wrapContent={this._wrapContent}\n />\n </g>\n {this.props.sublabel && (\n <SVGTooltipText\n content={this.props.sublabel}\n textProps={{\n x: 0,\n y: 4,\n textAnchor: 'middle',\n dominantBaseline: 'hanging',\n className: this._classNames.sublabel,\n }}\n maxWidth={this._innerRadius * 2}\n wrapContent={this._wrapContent}\n />\n )}\n </g>\n </svg>\n </FocusZone>\n {this._renderLegends()}\n {!this.props.hideTooltip && this.state.isCalloutVisible && (\n <Callout\n target={this.state.calloutTarget}\n directionalHint={DirectionalHint.topAutoEdge}\n gapSpace={15}\n isBeakVisible={false}\n onDismiss={this._handleCalloutDismiss}\n {...this.props.calloutProps}\n >\n {this._multiValueCallout({\n hoverXValue: this.state.hoverXValue,\n YValueHover: this.state.hoverYValues,\n })}\n </Callout>\n )}\n </div>\n );\n }\n\n public get chartContainer(): HTMLElement | null {\n return this._rootElem;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._rootElem, this._legendsRef.current?.toSVG, this._isRTL, opts);\n };\n\n private _getMargins = () => {\n const { hideMinMax, chartTitle, sublabel } = this.props;\n\n return {\n left: (!hideMinMax ? LABEL_OFFSET + LABEL_WIDTH : 0) + GAUGE_MARGIN,\n right: (!hideMinMax ? LABEL_OFFSET + LABEL_WIDTH : 0) + GAUGE_MARGIN,\n top: (chartTitle ? TITLE_OFFSET + LABEL_HEIGHT : EXTRA_NEEDLE_LENGTH / 2) + GAUGE_MARGIN,\n bottom: (sublabel ? LABEL_OFFSET + LABEL_HEIGHT : 0) + GAUGE_MARGIN,\n };\n };\n\n private _getStylesBasedOnBreakpoint = () => {\n for (let index = BREAKPOINTS.length - 1; index >= 0; index -= 1) {\n if (this._outerRadius >= BREAKPOINTS[index].minRadius) {\n return {\n arcWidth: BREAKPOINTS[index].arcWidth,\n chartValueSize: BREAKPOINTS[index].fontSize,\n };\n }\n }\n return {\n arcWidth: BREAKPOINTS[0].arcWidth,\n chartValueSize: BREAKPOINTS[0].fontSize,\n };\n };\n\n private _processProps = () => {\n const { minValue = 0, maxValue, theme } = this.props;\n\n let total = minValue;\n const segments: IExtendedSegment[] = this.props.segments.map((segment, index) => {\n const size = Math.max(segment.size, 0);\n total += size;\n return {\n legend: segment.legend,\n size,\n color:\n typeof segment.color !== 'undefined'\n ? getColorFromToken(segment.color, theme!.isInverted)\n : getNextColor(index, 0, theme!.isInverted),\n gradient: segment.gradient ?? getNextGradient(index, 0, theme!.isInverted),\n accessibilityData: segment.accessibilityData,\n start: total - size,\n end: total,\n };\n });\n if (typeof maxValue !== 'undefined' && total < maxValue) {\n segments.push({\n legend: 'Unknown',\n size: maxValue - total,\n color: theme!.palette.neutralLight,\n start: total,\n end: maxValue,\n });\n total = maxValue;\n }\n\n const arcGenerator = d3Arc()\n .cornerRadius(this.props.roundCorners ? 3 : 0)\n .padAngle(ARC_PADDING / this._outerRadius)\n .padRadius(this._outerRadius);\n const rtlSafeSegments = this._isRTL ? Array.from(segments).reverse() : segments;\n let prevAngle = -Math.PI / 2;\n const arcs = rtlSafeSegments.map((segment, index) => {\n const endAngle = prevAngle + (segment.size / (total - minValue)) * Math.PI;\n const d = arcGenerator({\n innerRadius: this._innerRadius,\n outerRadius: this._outerRadius,\n startAngle: prevAngle,\n endAngle,\n })!;\n prevAngle = endAngle;\n return {\n d,\n segmentIndex: this._isRTL ? segments.length - 1 - index : index,\n startAngle: prevAngle - (segment.size / (total - minValue)) * Math.PI,\n endAngle,\n };\n });\n\n this._minValue = minValue;\n this._maxValue = total;\n this._segments = segments;\n\n return {\n arcs,\n };\n };\n\n private _renderNeedle = () => {\n const needleRotation = calcNeedleRotation(this.props.chartValue, this._minValue, this._maxValue);\n const rtlSafeNeedleRotation = this._isRTL ? 180 - needleRotation : needleRotation;\n const strokeWidth = 2;\n const halfStrokeWidth = strokeWidth / 2;\n const needleLength = this._outerRadius - this._innerRadius + EXTRA_NEEDLE_LENGTH;\n\n return (\n <g transform={`rotate(${rtlSafeNeedleRotation}, 0, 0)`}>\n <path\n d={`\n M 0,${-halfStrokeWidth - 3}\n L ${-needleLength},${-halfStrokeWidth - 1}\n A ${halfStrokeWidth + 1},${halfStrokeWidth + 1},0,0,0,${-needleLength},${halfStrokeWidth + 1}\n L 0,${halfStrokeWidth + 3}\n A ${halfStrokeWidth + 3},${halfStrokeWidth + 3},0,0,0,0,${-halfStrokeWidth - 3}\n `}\n strokeWidth={strokeWidth}\n className={this._classNames.needle}\n transform={`translate(${-this._innerRadius + EXTRA_NEEDLE_LENGTH / 2})`}\n data-is-focusable={true}\n onFocus={e => this._handleFocus(e, 'Needle')}\n onBlur={this._handleBlur}\n onMouseEnter={e => this._handleMouseOver(e, 'Needle')}\n onMouseMove={e => this._handleMouseOver(e, 'Needle')}\n role=\"img\"\n aria-label={\n 'Current value: ' +\n getChartValueLabel(this.props.chartValue, this._minValue, this._maxValue, this.props.chartValueFormat)\n }\n />\n </g>\n );\n };\n\n private _renderLegends = () => {\n if (this.props.hideLegend) {\n return null;\n }\n\n const legends: ILegend[] = this._segments.map((segment, index) => {\n const color: string = this.props.enableGradient\n ? segment.gradient?.[0] || getNextGradient(index, 0, this.props.theme!.isInverted)[0]\n : segment.color || getNextColor(index, 0, this.props.theme!.isInverted);\n\n return {\n title: segment.legend,\n color,\n hoverAction: () => {\n this.setState({ hoveredLegend: segment.legend });\n },\n onMouseOutAction: () => {\n this.setState({ hoveredLegend: '' });\n },\n };\n });\n\n return (\n <div className={this._classNames.legendsContainer}>\n <Legends\n legends={legends}\n centerLegends\n {...this.props.legendProps}\n // eslint-disable-next-line react/jsx-no-bind\n onChange={this._onLegendSelectionChange.bind(this)}\n ref={this._legendsRef}\n />\n </div>\n );\n };\n\n private _onLegendSelectionChange(\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: ILegend,\n ): void {\n if (this.props.legendProps?.canSelectMultipleLegends) {\n this.setState({ selectedLegends });\n } else {\n this.setState({ selectedLegends: selectedLegends.slice(-1) });\n }\n if (this.props.legendProps?.onChange) {\n this.props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legend: string) => {\n return this._getHighlightedLegend().includes(legend!);\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this._getHighlightedLegend().length === 0;\n };\n\n private _getHighlightedLegend() {\n return this.state.selectedLegends.length > 0\n ? this.state.selectedLegends\n : this.state.hoveredLegend\n ? [this.state.hoveredLegend]\n : [];\n }\n\n private _handleFocus = (focusEvent: React.FocusEvent<SVGElement>, focusedElement: string) => {\n this._showCallout(focusEvent.target, focusedElement, true);\n };\n\n private _handleBlur = () => {\n this._hideCallout(true);\n };\n\n private _handleMouseOver = (mouseEvent: React.MouseEvent<SVGElement>, hoveredElement: string) => {\n this._showCallout(mouseEvent.target, hoveredElement, false);\n };\n\n private _handleMouseOut = () => {\n this._hideCallout(false);\n };\n\n private _handleCalloutDismiss = () => {\n this._hideCallout(false);\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _showCallout = (target: any, legend: string, isFocusEvent: boolean) => {\n if (this._calloutAnchor === legend) {\n return;\n }\n\n this._calloutAnchor = legend;\n const hoverXValue: string =\n 'Current value is ' +\n getChartValueLabel(this.props.chartValue, this._minValue, this._maxValue, this.props.chartValueFormat, true);\n const hoverYValues: IYValue[] = this._segments.map(segment => {\n const yValue: IYValue = {\n legend: segment.legend,\n y: getSegmentLabel(segment, this._minValue, this._maxValue, this.props.variant),\n color: this.props.enableGradient ? segment.gradient?.[0] : segment.color,\n };\n return yValue;\n });\n this.setState({\n calloutTarget: target,\n /** Show the callout if highlighted arc is hovered/focused and Hide it if unhighlighted arc is hovered/focused */\n isCalloutVisible:\n ['Needle', 'Chart value'].includes(legend) || this._noLegendHighlighted() || this._legendHighlighted(legend),\n hoverXValue,\n hoverYValues,\n ...(isFocusEvent ? { focusedElement: legend } : {}),\n });\n };\n\n private _hideCallout = (isBlurEvent?: boolean) => {\n this._calloutAnchor = '';\n this.setState({\n calloutTarget: null,\n isCalloutVisible: false,\n hoverXValue: '',\n hoverYValues: [],\n ...(isBlurEvent ? { focusedElement: '' } : {}),\n });\n };\n\n private _wrapContent = (content: string, id: string, maxWidth: number) => {\n const textElement = d3Select<SVGTextElement, {}>(`#${id}`);\n textElement.text(content);\n if (!textElement.node()) {\n return false;\n }\n\n let isOverflowing = false;\n let textLength = textElement.node()!.getComputedTextLength();\n while (textLength > maxWidth && content.length > 0) {\n content = content.slice(0, -1);\n textElement.text(content + '...');\n isOverflowing = true;\n textLength = textElement.node()!.getComputedTextLength();\n }\n return isOverflowing;\n };\n\n // TO DO: Write a common functional component for Multi value callout and divide sub count method\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _multiValueCallout = (calloutProps: any) => {\n const yValueHoverSubCountsExists: boolean = this._yValueHoverSubCountsExists(calloutProps.YValueHover);\n return (\n <div className={this._classNames.calloutContentRoot}>\n <div\n className={this._classNames.calloutDateTimeContainer}\n style={yValueHoverSubCountsExists ? { marginBottom: '11px' } : {}}\n >\n <div\n className={this._classNames.calloutContentX}\n {...getAccessibleDataObject(calloutProps!.xAxisCalloutAccessibilityData, 'text', false)}\n >\n {formatToLocaleString(calloutProps!.hoverXValue, this.props.culture)}\n </div>\n </div>\n <div\n className={this._classNames.calloutInfoContainer}\n style={yValueHoverSubCountsExists ? { display: 'flex' } : {}}\n >\n {calloutProps!.YValueHover &&\n calloutProps!.YValueHover.map((yValue: IYValueHover, index: number, yValues: IYValueHover[]) => {\n const isLast: boolean = index + 1 === yValues.length;\n const { shouldDrawBorderBottom = false } = yValue;\n return (\n <div\n {...getAccessibleDataObject(yValue.callOutAccessibilityData, 'text', false)}\n key={`callout-content-${index}`}\n style={\n yValueHoverSubCountsExists\n ? {\n display: 'inline-block',\n ...(shouldDrawBorderBottom && {\n borderBottom: `1px solid ${this.props.theme!.semanticColors.menuDivider}`,\n paddingBottom: '10px',\n }),\n }\n : {\n ...(shouldDrawBorderBottom && {\n borderBottom: `1px solid ${this.props.theme!.semanticColors.menuDivider}`,\n paddingBottom: '10px',\n }),\n }\n }\n >\n {this._getCalloutContent(yValue, index, yValueHoverSubCountsExists, isLast)}\n </div>\n );\n })}\n {!!calloutProps.descriptionMessage && (\n <div className={this._classNames.descriptionMessage}>{calloutProps.descriptionMessage}</div>\n )}\n </div>\n </div>\n );\n };\n\n private _yValueHoverSubCountsExists(yValueHover?: IYValueHover[]) {\n if (yValueHover) {\n return yValueHover.some(\n (yValue: {\n legend?: string;\n y?: number;\n color?: string;\n yAxisCalloutData?: string | { [id: string]: number };\n }) => yValue.yAxisCalloutData && typeof yValue.yAxisCalloutData !== 'string',\n );\n }\n return false;\n }\n\n private _getCalloutContent(\n xValue: IYValueHover,\n index: number,\n yValueHoverSubCountsExists: boolean,\n isLast: boolean,\n ): React.ReactNode {\n const marginStyle: React.CSSProperties = isLast ? {} : { marginRight: '16px' };\n const toDrawShape = xValue.index !== undefined && xValue.index !== -1;\n const _classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n lineColor: xValue.color,\n toDrawShape,\n });\n\n const { culture } = this.props;\n const yValue = formatToLocaleString(xValue.y, culture);\n if (!xValue.yAxisCalloutData || typeof xValue.yAxisCalloutData === 'string') {\n return (\n <div style={yValueHoverSubCountsExists ? marginStyle : {}}>\n {yValueHoverSubCountsExists && (\n <div className=\"ms-fontWeight-semibold\" style={{ fontSize: '12pt' }}>\n {xValue.legend!} ({yValue})\n </div>\n )}\n <div id={`${index}_${xValue.y}`} className={_classNames.calloutBlockContainer}>\n {toDrawShape && (\n <Shape\n svgProps={{\n className: _classNames.shapeStyles,\n }}\n pathProps={{ fill: xValue.color }}\n shape={Points[xValue.index! % Object.keys(pointTypes).length] as LegendShape}\n />\n )}\n <div>\n <div className={_classNames.calloutlegendText}> {xValue.legend}</div>\n <div className={_classNames.calloutContentY}>\n {formatToLocaleString(\n xValue.yAxisCalloutData ? xValue.yAxisCalloutData : xValue.y || xValue.data,\n culture,\n )}\n </div>\n </div>\n </div>\n </div>\n );\n } else {\n const subcounts: { [id: string]: number } = xValue.yAxisCalloutData as { [id: string]: number };\n return (\n <div style={marginStyle}>\n <div className=\"ms-fontWeight-semibold\" style={{ fontSize: '12pt' }}>\n {xValue.legend!} ({yValue})\n </div>\n {Object.keys(subcounts).map((subcountName: string) => {\n return (\n <div key={subcountName} className={_classNames.calloutBlockContainer}>\n <div className={_classNames.calloutlegendText}> {formatToLocaleString(subcountName, culture)}</div>\n <div className={_classNames.calloutContentY}>\n {formatToLocaleString(subcounts[subcountName], culture)}\n </div>\n </div>\n );\n })}\n </div>\n );\n }\n }\n\n private _getChartTitle = (): string => {\n const { chartTitle } = this.props;\n return (chartTitle ? `${chartTitle}. ` : '') + `Gauge chart with ${this._segments.length} segments. `;\n };\n}\n"]}
1
+ {"version":3,"file":"GaugeChart.base.js","sourceRoot":"../src/","sources":["components/GaugeChart/GaugeChart.base.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAC/B,qCAAwC;AACxC,2DAA0G;AAC1G,uDAO4B;AAE5B,6DAAiE;AACjE,+CAS+B;AAC/B,0CAA0F;AAC1F,qDAAsE;AACtE,uDAAuE;AAEvE,iEAAgE;AAChE,6CAAkD;AAElD,yEAA6D;AAE7D,IAAM,YAAY,GAAG,EAAE,CAAC;AACxB,IAAM,WAAW,GAAG,EAAE,CAAC;AACvB,IAAM,YAAY,GAAG,EAAE,CAAC;AACxB,IAAM,YAAY,GAAG,CAAC,CAAC;AACvB,IAAM,YAAY,GAAG,EAAE,CAAC;AACxB,IAAM,mBAAmB,GAAG,CAAC,CAAC;AACjB,QAAA,WAAW,GAAG,CAAC,CAAC;AAChB,QAAA,WAAW,GAAG;IACzB,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7C,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7C,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,E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IAAI,MAAM,CAAC,IAAI,EAC3E,OAAO,CACW,CAElB,CACF,CACF,CACF,CACP,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,IAAM,WAAS,GAA6B,MAAM,CAAC,gBAA4C,CAAC;YAChG,OAAO,CACL,6BAAK,KAAK,EAAE,WAAW;gBACrB,6BAAK,SAAS,EAAC,wBAAwB,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE;oBAChE,MAAM,CAAC,MAAO;;oBAAI,MAAM;wBACrB;gBACL,MAAM,CAAC,IAAI,CAAC,WAAS,CAAC,CAAC,GAAG,CAAC,UAAC,YAAoB;oBAC/C,OAAO,CACL,6BAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,CAAC,qBAAqB;wBAClE,6BAAK,SAAS,EAAE,WAAW,CAAC,iBAAiB;4BAC1C,GAAG;4BACH,IAAA,sCAAoB,EAAC,YAAY,EAAE,OAAO,CAAoB,CAC3D;wBACN,6BAAK,SAAS,EAAE,WAAW,CAAC,eAAe,IACxC,IAAA,sCAAoB,EAAC,WAAS,CAAC,YAAY,CAAC,EAAE,OAAO,CAAoB,CACtE,CACF,CACP,CAAC;gBACJ,CAAC,CAAC,CACE,CACP,CAAC;QACJ,CAAC;IACH,CAAC;IAMH,qBAAC;AAAD,CAAC,AA/pBD,CAAoC,KAAK,CAAC,SAAS,GA+pBlD;AA/pBY,wCAAc","sourcesContent":["import * as React from 'react';\nimport { arc as d3Arc } from 'd3-shape';\nimport { classNamesFunction, getId, getRTL, initializeComponentRef } from '@fluentui/react/lib/Utilities';\nimport {\n IGaugeChartProps,\n IGaugeChartSegment,\n IGaugeChartStyleProps,\n IGaugeChartStyles,\n GaugeValueFormat,\n GaugeChartVariant,\n} from './GaugeChart.types';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { formatToLocaleString } from '@fluentui/chart-utilities';\nimport {\n Points,\n areArraysEqual,\n formatScientificLimitWidth,\n getAccessibleDataObject,\n getColorFromToken,\n getNextColor,\n getNextGradient,\n pointTypes,\n} from '../../utilities/index';\nimport { ILegend, ILegendContainer, LegendShape, Legends, Shape } from '../Legends/index';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { IYValueHover } from '../../index';\nimport { SVGTooltipText } from '../../utilities/SVGTooltipText';\nimport { select as d3Select } from 'd3-selection';\nimport { IChart, IImageExportOptions } from '../../types/index';\nimport { toImage } from '../../utilities/image-export-utils';\n\nconst GAUGE_MARGIN = 16;\nconst LABEL_WIDTH = 36;\nconst LABEL_HEIGHT = 16;\nconst LABEL_OFFSET = 4;\nconst TITLE_OFFSET = 11;\nconst EXTRA_NEEDLE_LENGTH = 4;\nexport const ARC_PADDING = 2;\nexport const BREAKPOINTS = [\n { minRadius: 52, arcWidth: 12, fontSize: 20 },\n { minRadius: 70, arcWidth: 16, fontSize: 24 },\n { minRadius: 88, arcWidth: 20, fontSize: 32 },\n { minRadius: 106, arcWidth: 24, fontSize: 32 },\n { minRadius: 124, arcWidth: 28, fontSize: 40 },\n { minRadius: 142, arcWidth: 32, fontSize: 40 },\n];\n\nconst getClassNames = classNamesFunction<IGaugeChartStyleProps, IGaugeChartStyles>();\n\nexport const calcNeedleRotation = (chartValue: number, minValue: number, maxValue: number) => {\n let needleRotation = ((chartValue - minValue) / (maxValue - minValue)) * 180;\n if (needleRotation < 0) {\n needleRotation = 0;\n } else if (needleRotation > 180) {\n needleRotation = 180;\n }\n\n return needleRotation;\n};\n\nexport const getSegmentLabel = (\n segment: IExtendedSegment,\n minValue: number,\n maxValue: number,\n variant?: GaugeChartVariant,\n isAriaLabel: boolean = false,\n) => {\n if (isAriaLabel) {\n return minValue === 0 && variant === GaugeChartVariant.SingleSegment\n ? `${segment.legend}, ${segment.size} out of ${maxValue} or ${((segment.size / maxValue) * 100).toFixed()}%`\n : `${segment.legend}, ${segment.start} to ${segment.end}`;\n }\n\n return minValue === 0 && variant === GaugeChartVariant.SingleSegment\n ? `${segment.size} (${((segment.size / maxValue) * 100).toFixed()}%)`\n : `${segment.start} - ${segment.end}`;\n};\n\nexport const getChartValueLabel = (\n chartValue: number,\n minValue: number,\n maxValue: number,\n chartValueFormat?: GaugeValueFormat | ((sweepFraction: [number, number]) => string),\n forCallout: boolean = false,\n): string => {\n if (forCallout) {\n // When displaying the chart value as a percentage, use fractions in the callout, and vice versa.\n // This helps clarify the actual value and avoid repetition.\n return minValue !== 0\n ? chartValue.toString()\n : chartValueFormat === GaugeValueFormat.Fraction\n ? `${((chartValue / maxValue) * 100).toFixed()}%`\n : `${chartValue}/${maxValue}`;\n }\n\n return typeof chartValueFormat === 'function'\n ? chartValueFormat([chartValue - minValue, maxValue - minValue])\n : minValue !== 0\n ? chartValue.toString()\n : chartValueFormat === GaugeValueFormat.Fraction\n ? `${chartValue}/${maxValue}`\n : `${((chartValue / maxValue) * 100).toFixed()}%`;\n};\n\ninterface IYValue extends Omit<IYValueHover, 'y'> {\n y?: string | number;\n}\nexport interface IGaugeChartState {\n hoveredLegend: string;\n selectedLegends: string[];\n focusedElement?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n calloutTarget: any;\n isCalloutVisible: boolean;\n hoverXValue: string | number;\n hoverYValues: IYValue[];\n width: number;\n height: number;\n}\nexport interface IExtendedSegment extends IGaugeChartSegment {\n start: number;\n end: number;\n}\n\nexport class GaugeChartBase extends React.Component<IGaugeChartProps, IGaugeChartState> implements IChart {\n private _classNames: IProcessedStyleSet<IGaugeChartStyles>;\n private _isRTL: boolean;\n private _innerRadius: number;\n private _outerRadius: number;\n private _minValue: number;\n private _maxValue: number;\n private _segments: IExtendedSegment[];\n private _calloutAnchor: string;\n private _rootElem: HTMLDivElement | null;\n private _margins: { left: number; right: number; top: number; bottom: number };\n private _legendsHeight: number;\n private _legendsRef: React.RefObject<ILegendContainer>;\n\n constructor(props: IGaugeChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this._margins = this._getMargins();\n this._legendsHeight = !props.hideLegend ? 24 : 0;\n\n this.state = {\n hoveredLegend: '',\n selectedLegends: props.legendProps?.selectedLegends || [],\n focusedElement: '',\n calloutTarget: null,\n isCalloutVisible: false,\n hoverXValue: '',\n hoverYValues: [],\n width: 140 + this._margins.left + this._margins.right,\n height: 70 + this._margins.top + this._margins.bottom + this._legendsHeight,\n };\n\n this._isRTL = getRTL(props.theme);\n this._calloutAnchor = '';\n this._legendsRef = React.createRef();\n }\n\n public componentDidMount(): void {\n if (this._rootElem) {\n this.setState({\n width: this._rootElem.clientWidth,\n height: this._rootElem.clientHeight,\n });\n }\n }\n\n public componentDidUpdate(prevProps: IGaugeChartProps): void {\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, this.props.legendProps?.selectedLegends)) {\n this.setState({\n selectedLegends: this.props.legendProps?.selectedLegends || [],\n });\n }\n }\n\n public render(): React.ReactNode {\n this._margins = this._getMargins();\n this._legendsHeight = !this.props.hideLegend ? 24 : 0;\n\n const width = this.props.width || this.state.width;\n const height = this.props.height || this.state.height;\n\n this._outerRadius = Math.min(\n (width - (this._margins.left + this._margins.right)) / 2,\n height - (this._margins.top + this._margins.bottom + this._legendsHeight),\n );\n\n const { arcWidth, chartValueSize } = this._getStylesBasedOnBreakpoint();\n this._innerRadius = this._outerRadius - arcWidth;\n\n const { arcs } = this._processProps();\n\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n className: this.props.className,\n chartValueSize,\n });\n\n return (\n <div className={this._classNames.root} ref={el => (this._rootElem = el)}>\n <FocusZone direction={FocusZoneDirection.horizontal} className={this._classNames.chartWrapper}>\n <svg\n className={this._classNames.chart}\n role=\"region\"\n aria-label={this._getChartTitle()}\n onMouseLeave={this._handleMouseOut}\n width={width}\n height={height - this._legendsHeight}\n >\n <g transform={`translate(${width / 2}, ${height - (this._margins.bottom + this._legendsHeight)})`}>\n {this.props.chartTitle && (\n <text\n x={0}\n y={-(this._outerRadius + TITLE_OFFSET)}\n textAnchor=\"middle\"\n className={this._classNames.chartTitle}\n aria-hidden={true}\n >\n {this.props.chartTitle}\n </text>\n )}\n {!this.props.hideMinMax && (\n <>\n <text\n x={(this._isRTL ? 1 : -1) * (this._outerRadius + LABEL_OFFSET)}\n y={0}\n textAnchor=\"end\"\n className={this._classNames.limits}\n role=\"img\"\n aria-label={`Min value: ${this._minValue}`}\n >\n {formatScientificLimitWidth(this._minValue)}\n </text>\n <text\n x={(this._isRTL ? -1 : 1) * (this._outerRadius + LABEL_OFFSET)}\n y={0}\n textAnchor=\"start\"\n className={this._classNames.limits}\n role=\"img\"\n aria-label={`Max value: ${this._maxValue}`}\n >\n {formatScientificLimitWidth(this._maxValue)}\n </text>\n </>\n )}\n {arcs.map((arc, index) => {\n const segment = this._segments[arc.segmentIndex];\n\n const clipId = getId('Arc_clip') + `${index}_${arc.startAngle}_${arc.endAngle}`;\n\n const arcClassNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n solidFill: this.props.enableGradient ? 'transparent' : segment.color!,\n gradientFill: `conic-gradient(\n from ${arc.startAngle}rad at 50% 100%,\n ${segment.gradient?.[0]},\n ${segment.gradient?.[1]} ${arc.endAngle - arc.startAngle}rad\n )`,\n opacity: this._legendHighlighted(segment.legend) || this._noLegendHighlighted() ? 1 : 0.1,\n });\n\n return (\n <React.Fragment key={index}>\n <path\n d={arc.d}\n strokeWidth={this.state.focusedElement === segment.legend ? ARC_PADDING : 0}\n className={arcClassNames.segment}\n {...getAccessibleDataObject(\n {\n ariaLabel: getSegmentLabel(segment, this._minValue, this._maxValue, this.props.variant, true),\n ...segment.accessibilityData,\n },\n 'img',\n true,\n )}\n onFocus={e => this._handleFocus(e, segment.legend)}\n onBlur={this._handleBlur}\n onMouseEnter={e => this._handleMouseOver(e, segment.legend)}\n onMouseMove={e => this._handleMouseOver(e, segment.legend)}\n data-is-focusable={this._legendHighlighted(segment.legend) || this._noLegendHighlighted()}\n />\n\n {this.props.enableGradient && (\n <>\n <clipPath id={clipId}>\n <path d={arc.d} />\n </clipPath>\n <foreignObject x=\"-50%\" y=\"-100%\" width=\"100%\" height=\"100%\" clipPath={`url(#${clipId})`}>\n <div className={arcClassNames.gradientSegment} />\n </foreignObject>\n </>\n )}\n </React.Fragment>\n );\n })}\n {this._renderNeedle()}\n <g\n onMouseEnter={e => this._handleMouseOver(e, 'Chart value')}\n onMouseMove={e => this._handleMouseOver(e, 'Chart value')}\n >\n <SVGTooltipText\n content={getChartValueLabel(\n this.props.chartValue,\n this._minValue,\n this._maxValue,\n this.props.chartValueFormat,\n )}\n textProps={{\n x: 0,\n y: 0,\n textAnchor: 'middle',\n className: this._classNames.chartValue,\n 'aria-hidden': 'true',\n }}\n maxWidth={this._innerRadius * 2 - 24}\n wrapContent={this._wrapContent}\n />\n </g>\n {this.props.sublabel && (\n <SVGTooltipText\n content={this.props.sublabel}\n textProps={{\n x: 0,\n y: 4,\n textAnchor: 'middle',\n dominantBaseline: 'hanging',\n className: this._classNames.sublabel,\n }}\n maxWidth={this._innerRadius * 2}\n wrapContent={this._wrapContent}\n />\n )}\n </g>\n </svg>\n </FocusZone>\n {this._renderLegends()}\n {!this.props.hideTooltip && this.state.isCalloutVisible && (\n <Callout\n target={this.state.calloutTarget}\n directionalHint={DirectionalHint.topAutoEdge}\n gapSpace={15}\n isBeakVisible={false}\n onDismiss={this._handleCalloutDismiss}\n {...this.props.calloutProps}\n >\n {this._multiValueCallout({\n hoverXValue: this.state.hoverXValue,\n YValueHover: this.state.hoverYValues,\n })}\n </Callout>\n )}\n </div>\n );\n }\n\n public get chartContainer(): HTMLElement | null {\n return this._rootElem;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._rootElem, this._legendsRef.current?.toSVG, this._isRTL, opts);\n };\n\n private _getMargins = () => {\n const { hideMinMax, chartTitle, sublabel } = this.props;\n\n return {\n left: (!hideMinMax ? LABEL_OFFSET + LABEL_WIDTH : 0) + GAUGE_MARGIN,\n right: (!hideMinMax ? LABEL_OFFSET + LABEL_WIDTH : 0) + GAUGE_MARGIN,\n top: (chartTitle ? TITLE_OFFSET + LABEL_HEIGHT : EXTRA_NEEDLE_LENGTH / 2) + GAUGE_MARGIN,\n bottom: (sublabel ? LABEL_OFFSET + LABEL_HEIGHT : 0) + GAUGE_MARGIN,\n };\n };\n\n private _getStylesBasedOnBreakpoint = () => {\n for (let index = BREAKPOINTS.length - 1; index >= 0; index -= 1) {\n if (this._outerRadius >= BREAKPOINTS[index].minRadius) {\n return {\n arcWidth: BREAKPOINTS[index].arcWidth,\n chartValueSize: BREAKPOINTS[index].fontSize,\n };\n }\n }\n return {\n arcWidth: BREAKPOINTS[0].arcWidth,\n chartValueSize: BREAKPOINTS[0].fontSize,\n };\n };\n\n private _processProps = () => {\n const { minValue = 0, maxValue, theme } = this.props;\n\n let total = minValue;\n const segments: IExtendedSegment[] = this.props.segments.map((segment, index) => {\n const size = Math.max(segment.size, 0);\n total += size;\n return {\n legend: segment.legend,\n size,\n color:\n typeof segment.color !== 'undefined'\n ? getColorFromToken(segment.color, theme!.isInverted)\n : getNextColor(index, 0, theme!.isInverted),\n gradient: segment.gradient ?? getNextGradient(index, 0, theme!.isInverted),\n accessibilityData: segment.accessibilityData,\n start: total - size,\n end: total,\n };\n });\n if (typeof maxValue !== 'undefined' && total < maxValue) {\n segments.push({\n legend: 'Unknown',\n size: maxValue - total,\n color: theme!.palette.neutralLight,\n start: total,\n end: maxValue,\n });\n total = maxValue;\n }\n\n const arcGenerator = d3Arc()\n .cornerRadius(this.props.roundCorners ? 3 : 0)\n .padAngle(ARC_PADDING / this._outerRadius)\n .padRadius(this._outerRadius);\n const rtlSafeSegments = this._isRTL ? Array.from(segments).reverse() : segments;\n let prevAngle = -Math.PI / 2;\n const arcs = rtlSafeSegments.map((segment, index) => {\n const endAngle = prevAngle + (segment.size / (total - minValue)) * Math.PI;\n const d = arcGenerator({\n innerRadius: this._innerRadius,\n outerRadius: this._outerRadius,\n startAngle: prevAngle,\n endAngle,\n })!;\n prevAngle = endAngle;\n return {\n d,\n segmentIndex: this._isRTL ? segments.length - 1 - index : index,\n startAngle: prevAngle - (segment.size / (total - minValue)) * Math.PI,\n endAngle,\n };\n });\n\n this._minValue = minValue;\n this._maxValue = total;\n this._segments = segments;\n\n return {\n arcs,\n };\n };\n\n private _renderNeedle = () => {\n const needleRotation = calcNeedleRotation(this.props.chartValue, this._minValue, this._maxValue);\n const rtlSafeNeedleRotation = this._isRTL ? 180 - needleRotation : needleRotation;\n const strokeWidth = 2;\n const halfStrokeWidth = strokeWidth / 2;\n const needleLength = this._outerRadius - this._innerRadius + EXTRA_NEEDLE_LENGTH;\n\n return (\n <g transform={`rotate(${rtlSafeNeedleRotation}, 0, 0)`}>\n <path\n d={`\n M 0,${-halfStrokeWidth - 3}\n L ${-needleLength},${-halfStrokeWidth - 1}\n A ${halfStrokeWidth + 1},${halfStrokeWidth + 1},0,0,0,${-needleLength},${halfStrokeWidth + 1}\n L 0,${halfStrokeWidth + 3}\n A ${halfStrokeWidth + 3},${halfStrokeWidth + 3},0,0,0,0,${-halfStrokeWidth - 3}\n `}\n strokeWidth={strokeWidth}\n className={this._classNames.needle}\n transform={`translate(${-this._innerRadius + EXTRA_NEEDLE_LENGTH / 2})`}\n data-is-focusable={true}\n onFocus={e => this._handleFocus(e, 'Needle')}\n onBlur={this._handleBlur}\n onMouseEnter={e => this._handleMouseOver(e, 'Needle')}\n onMouseMove={e => this._handleMouseOver(e, 'Needle')}\n role=\"img\"\n aria-label={\n 'Current value: ' +\n getChartValueLabel(this.props.chartValue, this._minValue, this._maxValue, this.props.chartValueFormat)\n }\n />\n </g>\n );\n };\n\n private _renderLegends = () => {\n if (this.props.hideLegend) {\n return null;\n }\n\n const legends: ILegend[] = this._segments.map((segment, index) => {\n const color: string = this.props.enableGradient\n ? segment.gradient?.[0] || getNextGradient(index, 0, this.props.theme!.isInverted)[0]\n : segment.color || getNextColor(index, 0, this.props.theme!.isInverted);\n\n return {\n title: segment.legend,\n color,\n hoverAction: () => {\n this.setState({ hoveredLegend: segment.legend });\n },\n onMouseOutAction: () => {\n this.setState({ hoveredLegend: '' });\n },\n };\n });\n\n return (\n <div className={this._classNames.legendsContainer}>\n <Legends\n legends={legends}\n centerLegends\n {...this.props.legendProps}\n // eslint-disable-next-line react/jsx-no-bind\n onChange={this._onLegendSelectionChange.bind(this)}\n ref={this._legendsRef}\n />\n </div>\n );\n };\n\n private _onLegendSelectionChange(\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: ILegend,\n ): void {\n if (this.props.legendProps?.canSelectMultipleLegends) {\n this.setState({ selectedLegends });\n } else {\n this.setState({ selectedLegends: selectedLegends.slice(-1) });\n }\n if (this.props.legendProps?.onChange) {\n this.props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legend: string) => {\n return this._getHighlightedLegend().includes(legend!);\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this._getHighlightedLegend().length === 0;\n };\n\n private _getHighlightedLegend() {\n return this.state.selectedLegends.length > 0\n ? this.state.selectedLegends\n : this.state.hoveredLegend\n ? [this.state.hoveredLegend]\n : [];\n }\n\n private _handleFocus = (focusEvent: React.FocusEvent<SVGElement>, focusedElement: string) => {\n this._showCallout(focusEvent.target, focusedElement, true);\n };\n\n private _handleBlur = () => {\n this._hideCallout(true);\n };\n\n private _handleMouseOver = (mouseEvent: React.MouseEvent<SVGElement>, hoveredElement: string) => {\n this._showCallout(mouseEvent.target, hoveredElement, false);\n };\n\n private _handleMouseOut = () => {\n this._hideCallout(false);\n };\n\n private _handleCalloutDismiss = () => {\n this._hideCallout(false);\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _showCallout = (target: any, legend: string, isFocusEvent: boolean) => {\n if (this._calloutAnchor === legend) {\n return;\n }\n\n this._calloutAnchor = legend;\n const hoverXValue: string =\n 'Current value is ' +\n getChartValueLabel(this.props.chartValue, this._minValue, this._maxValue, this.props.chartValueFormat, true);\n const hoverYValues: IYValue[] = this._segments.map(segment => {\n const yValue: IYValue = {\n legend: segment.legend,\n y: getSegmentLabel(segment, this._minValue, this._maxValue, this.props.variant),\n color: this.props.enableGradient ? segment.gradient?.[0] : segment.color,\n };\n return yValue;\n });\n this.setState({\n calloutTarget: target,\n /** Show the callout if highlighted arc is hovered/focused and Hide it if unhighlighted arc is hovered/focused */\n isCalloutVisible:\n ['Needle', 'Chart value'].includes(legend) || this._noLegendHighlighted() || this._legendHighlighted(legend),\n hoverXValue,\n hoverYValues,\n ...(isFocusEvent ? { focusedElement: legend } : {}),\n });\n };\n\n private _hideCallout = (isBlurEvent?: boolean) => {\n this._calloutAnchor = '';\n this.setState({\n calloutTarget: null,\n isCalloutVisible: false,\n hoverXValue: '',\n hoverYValues: [],\n ...(isBlurEvent ? { focusedElement: '' } : {}),\n });\n };\n\n private _wrapContent = (content: string, id: string, maxWidth: number) => {\n const textElement = d3Select<SVGTextElement, {}>(`#${id}`);\n textElement.text(content);\n if (!textElement.node()) {\n return false;\n }\n\n let isOverflowing = false;\n let textLength = textElement.node()!.getComputedTextLength();\n while (textLength > maxWidth && content.length > 0) {\n content = content.slice(0, -1);\n textElement.text(content + '...');\n isOverflowing = true;\n textLength = textElement.node()!.getComputedTextLength();\n }\n return isOverflowing;\n };\n\n // TO DO: Write a common functional component for Multi value callout and divide sub count method\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _multiValueCallout = (calloutProps: any) => {\n const yValueHoverSubCountsExists: boolean = this._yValueHoverSubCountsExists(calloutProps.YValueHover);\n return (\n <div className={this._classNames.calloutContentRoot}>\n <div\n className={this._classNames.calloutDateTimeContainer}\n style={yValueHoverSubCountsExists ? { marginBottom: '11px' } : {}}\n >\n <div\n className={this._classNames.calloutContentX}\n {...getAccessibleDataObject(calloutProps!.xAxisCalloutAccessibilityData, 'text', false)}\n >\n {formatToLocaleString(calloutProps!.hoverXValue, this.props.culture) as React.ReactNode}\n </div>\n </div>\n <div\n className={this._classNames.calloutInfoContainer}\n style={yValueHoverSubCountsExists ? { display: 'flex' } : {}}\n >\n {calloutProps!.YValueHover &&\n calloutProps!.YValueHover.map((yValue: IYValueHover, index: number, yValues: IYValueHover[]) => {\n const isLast: boolean = index + 1 === yValues.length;\n const { shouldDrawBorderBottom = false } = yValue;\n return (\n <div\n {...getAccessibleDataObject(yValue.callOutAccessibilityData, 'text', false)}\n key={`callout-content-${index}`}\n style={\n yValueHoverSubCountsExists\n ? {\n display: 'inline-block',\n ...(shouldDrawBorderBottom && {\n borderBottom: `1px solid ${this.props.theme!.semanticColors.menuDivider}`,\n paddingBottom: '10px',\n }),\n }\n : {\n ...(shouldDrawBorderBottom && {\n borderBottom: `1px solid ${this.props.theme!.semanticColors.menuDivider}`,\n paddingBottom: '10px',\n }),\n }\n }\n >\n {this._getCalloutContent(yValue, index, yValueHoverSubCountsExists, isLast)}\n </div>\n );\n })}\n {!!calloutProps.descriptionMessage && (\n <div className={this._classNames.descriptionMessage}>{calloutProps.descriptionMessage}</div>\n )}\n </div>\n </div>\n );\n };\n\n private _yValueHoverSubCountsExists(yValueHover?: IYValueHover[]) {\n if (yValueHover) {\n return yValueHover.some(\n (yValue: {\n legend?: string;\n y?: number;\n color?: string;\n yAxisCalloutData?: string | { [id: string]: number };\n }) => yValue.yAxisCalloutData && typeof yValue.yAxisCalloutData !== 'string',\n );\n }\n return false;\n }\n\n private _getCalloutContent(\n xValue: IYValueHover,\n index: number,\n yValueHoverSubCountsExists: boolean,\n isLast: boolean,\n ): React.ReactNode {\n const marginStyle: React.CSSProperties = isLast ? {} : { marginRight: '16px' };\n const toDrawShape = xValue.index !== undefined && xValue.index !== -1;\n const _classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n lineColor: xValue.color,\n toDrawShape,\n });\n\n const { culture } = this.props;\n const yValue = formatToLocaleString(xValue.y, culture) as React.ReactNode;\n if (!xValue.yAxisCalloutData || typeof xValue.yAxisCalloutData === 'string') {\n return (\n <div style={yValueHoverSubCountsExists ? marginStyle : {}}>\n {yValueHoverSubCountsExists && (\n <div className=\"ms-fontWeight-semibold\" style={{ fontSize: '12pt' }}>\n {xValue.legend!} ({yValue})\n </div>\n )}\n <div id={`${index}_${xValue.y}`} className={_classNames.calloutBlockContainer}>\n {toDrawShape && (\n <Shape\n svgProps={{\n className: _classNames.shapeStyles,\n }}\n pathProps={{ fill: xValue.color }}\n shape={Points[xValue.index! % Object.keys(pointTypes).length] as LegendShape}\n />\n )}\n <div>\n <div className={_classNames.calloutlegendText}> {xValue.legend}</div>\n <div className={_classNames.calloutContentY}>\n {\n formatToLocaleString(\n xValue.yAxisCalloutData ? xValue.yAxisCalloutData : xValue.y || xValue.data,\n culture,\n ) as React.ReactNode\n }\n </div>\n </div>\n </div>\n </div>\n );\n } else {\n const subcounts: { [id: string]: number } = xValue.yAxisCalloutData as { [id: string]: number };\n return (\n <div style={marginStyle}>\n <div className=\"ms-fontWeight-semibold\" style={{ fontSize: '12pt' }}>\n {xValue.legend!} ({yValue})\n </div>\n {Object.keys(subcounts).map((subcountName: string) => {\n return (\n <div key={subcountName} className={_classNames.calloutBlockContainer}>\n <div className={_classNames.calloutlegendText}>\n {' '}\n {formatToLocaleString(subcountName, culture) as React.ReactNode}\n </div>\n <div className={_classNames.calloutContentY}>\n {formatToLocaleString(subcounts[subcountName], culture) as React.ReactNode}\n </div>\n </div>\n );\n })}\n </div>\n );\n }\n }\n\n private _getChartTitle = (): string => {\n const { chartTitle } = this.props;\n return (chartTitle ? `${chartTitle}. ` : '') + `Gauge chart with ${this._segments.length} segments. `;\n };\n}\n"]}
@@ -5,7 +5,7 @@ var tslib_1 = require("tslib");
5
5
  var react_1 = require("@fluentui/react");
6
6
  var getStyles = function (props) {
7
7
  var _a, _b, _c, _d, _e, _f, _g, _h;
8
- var theme = props.theme, chartValueSize = props.chartValueSize, chartWidth = props.chartWidth, chartHeight = props.chartHeight, className = props.className, lineColor = props.lineColor, toDrawShape = props.toDrawShape, solidFill = props.solidFill, gradientFill = props.gradientFill, opacity = props.opacity;
8
+ var theme = props.theme, chartValueSize = props.chartValueSize, className = props.className, lineColor = props.lineColor, toDrawShape = props.toDrawShape, solidFill = props.solidFill, gradientFill = props.gradientFill, opacity = props.opacity;
9
9
  return {
10
10
  root: [
11
11
  theme.fonts.medium,
@@ -21,8 +21,6 @@ var getStyles = function (props) {
21
21
  ],
22
22
  chart: {
23
23
  display: 'block',
24
- width: chartWidth,
25
- height: chartHeight,
26
24
  },
27
25
  limits: {
28
26
  fontSize: react_1.FontSizes.small,
@@ -80,7 +78,7 @@ var getStyles = function (props) {
80
78
  opacity: opacity,
81
79
  },
82
80
  legendsContainer: {
83
- width: chartWidth,
81
+ width: '100%',
84
82
  },
85
83
  calloutContentRoot: [
86
84
  {