@fluentui/react-charts 9.1.8 → 9.1.10

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 (306) hide show
  1. package/CHANGELOG.md +34 -2
  2. package/dist/index.d.ts +309 -8
  3. package/lib/AreaChart.js.map +1 -1
  4. package/lib/CartesianChart.js.map +1 -1
  5. package/lib/DeclarativeChart.js.map +1 -1
  6. package/lib/DonutChart.js.map +1 -1
  7. package/lib/FunnelChart.js +1 -0
  8. package/lib/FunnelChart.js.map +1 -0
  9. package/lib/GanttChart.js +1 -0
  10. package/lib/GanttChart.js.map +1 -0
  11. package/lib/GaugeChart.js.map +1 -1
  12. package/lib/GroupedVerticalBarChart.js.map +1 -1
  13. package/lib/HeatMapChart.js.map +1 -1
  14. package/lib/HorizontalBarChart.js.map +1 -1
  15. package/lib/HorizontalBarChartWithAxis.js.map +1 -1
  16. package/lib/Legends.js.map +1 -1
  17. package/lib/LineChart.js.map +1 -1
  18. package/lib/Popover.js.map +1 -1
  19. package/lib/ResponsiveContainer.js.map +1 -1
  20. package/lib/SankeyChart.js.map +1 -1
  21. package/lib/ScatterChart.js.map +1 -1
  22. package/lib/Sparkline.js.map +1 -1
  23. package/lib/VerticalBarChart.js.map +1 -1
  24. package/lib/VerticalStackedBarChart.js.map +1 -1
  25. package/lib/components/AreaChart/AreaChart.js +13 -5
  26. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  27. package/lib/components/AreaChart/AreaChart.types.js.map +1 -1
  28. package/lib/components/AreaChart/index.js.map +1 -1
  29. package/lib/components/CommonComponents/CartesianChart.js +10 -7
  30. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  31. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  32. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  33. package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -1
  34. package/lib/components/CommonComponents/index.js.map +1 -1
  35. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  36. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  37. package/lib/components/DeclarativeChart/imageExporter.js.map +1 -1
  38. package/lib/components/DeclarativeChart/index.js.map +1 -1
  39. package/lib/components/DonutChart/Arc/Arc.js +5 -5
  40. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  41. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
  42. package/lib/components/DonutChart/Arc/index.js.map +1 -1
  43. package/lib/components/DonutChart/DonutChart.js +7 -1
  44. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  45. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  46. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  47. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
  48. package/lib/components/DonutChart/Pie/index.js.map +1 -1
  49. package/lib/components/DonutChart/index.js.map +1 -1
  50. package/lib/components/FunnelChart/FunnelChart.js +391 -0
  51. package/lib/components/FunnelChart/FunnelChart.js.map +1 -0
  52. package/lib/components/FunnelChart/FunnelChart.types.js +1 -0
  53. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -0
  54. package/lib/components/FunnelChart/funnelGeometry.js +220 -0
  55. package/lib/components/FunnelChart/funnelGeometry.js.map +1 -0
  56. package/lib/components/FunnelChart/index.js +2 -0
  57. package/lib/components/FunnelChart/index.js.map +1 -0
  58. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +59 -0
  59. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -0
  60. package/lib/components/GanttChart/GanttChart.js +530 -0
  61. package/lib/components/GanttChart/GanttChart.js.map +1 -0
  62. package/lib/components/GanttChart/GanttChart.types.js +4 -0
  63. package/lib/components/GanttChart/GanttChart.types.js.map +1 -0
  64. package/lib/components/GanttChart/index.js +2 -0
  65. package/lib/components/GanttChart/index.js.map +1 -0
  66. package/lib/components/GanttChart/useGanttChartStyles.styles.js +25 -0
  67. package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +1 -0
  68. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  69. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  70. package/lib/components/GaugeChart/index.js.map +1 -1
  71. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +10 -5
  72. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  73. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  74. package/lib/components/GroupedVerticalBarChart/index.js.map +1 -1
  75. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  76. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  77. package/lib/components/HeatMapChart/index.js.map +1 -1
  78. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  79. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +5 -3
  80. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  81. package/lib/components/HorizontalBarChart/index.js.map +1 -1
  82. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +9 -3
  83. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  84. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  85. package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  86. package/lib/components/Legends/Legends.js.map +1 -1
  87. package/lib/components/Legends/Legends.types.js.map +1 -1
  88. package/lib/components/Legends/OverflowMenu.js.map +1 -1
  89. package/lib/components/Legends/index.js.map +1 -1
  90. package/lib/components/Legends/shape.js +3 -3
  91. package/lib/components/Legends/shape.js.map +1 -1
  92. package/lib/components/LineChart/LineChart.js +14 -7
  93. package/lib/components/LineChart/LineChart.js.map +1 -1
  94. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  95. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  96. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  97. package/lib/components/LineChart/eventAnnotation/Textbox.js +2 -1
  98. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  99. package/lib/components/LineChart/index.js.map +1 -1
  100. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  101. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  102. package/lib/components/ResponsiveContainer/index.js.map +1 -1
  103. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  104. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  105. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  106. package/lib/components/SankeyChart/index.js.map +1 -1
  107. package/lib/components/ScatterChart/ScatterChart.js +8 -2
  108. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  109. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  110. package/lib/components/ScatterChart/index.js.map +1 -1
  111. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  112. package/lib/components/Sparkline/Sparkline.types.js.map +1 -1
  113. package/lib/components/Sparkline/index.js.map +1 -1
  114. package/lib/components/VerticalBarChart/VerticalBarChart.js +10 -4
  115. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  116. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  117. package/lib/components/VerticalBarChart/index.js.map +1 -1
  118. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +4 -4
  119. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  120. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  121. package/lib/components/VerticalStackedBarChart/index.js.map +1 -1
  122. package/lib/index.js +2 -0
  123. package/lib/index.js.map +1 -1
  124. package/lib/types/DataPoint.js +3 -1
  125. package/lib/types/DataPoint.js.map +1 -1
  126. package/lib/types/EventAnnotation.js.map +1 -1
  127. package/lib/types/LegendDataItem.js.map +1 -1
  128. package/lib/types/index.js.map +1 -1
  129. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  130. package/lib/utilities/KeyCodes.js.map +1 -1
  131. package/lib/utilities/SVGTooltipText.js.map +1 -1
  132. package/lib/utilities/async-utils.js.map +1 -1
  133. package/lib/utilities/colors.js +12 -0
  134. package/lib/utilities/colors.js.map +1 -1
  135. package/lib/utilities/getWindow.js.map +1 -1
  136. package/lib/utilities/index.js.map +1 -1
  137. package/lib/utilities/overflow-utils.js.map +1 -1
  138. package/lib/utilities/string.js.map +1 -1
  139. package/lib/utilities/test-data.js +236 -0
  140. package/lib/utilities/test-data.js.map +1 -1
  141. package/lib/utilities/utilities.js +90 -22
  142. package/lib/utilities/utilities.js.map +1 -1
  143. package/lib/utilities/vbc-utils.js +2 -2
  144. package/lib/utilities/vbc-utils.js.map +1 -1
  145. package/lib-commonjs/AreaChart.js.map +1 -1
  146. package/lib-commonjs/CartesianChart.js.map +1 -1
  147. package/lib-commonjs/DeclarativeChart.js.map +1 -1
  148. package/lib-commonjs/DonutChart.js.map +1 -1
  149. package/lib-commonjs/FunnelChart.js +6 -0
  150. package/lib-commonjs/FunnelChart.js.map +1 -0
  151. package/lib-commonjs/GanttChart.js +6 -0
  152. package/lib-commonjs/GanttChart.js.map +1 -0
  153. package/lib-commonjs/GaugeChart.js.map +1 -1
  154. package/lib-commonjs/GroupedVerticalBarChart.js.map +1 -1
  155. package/lib-commonjs/HeatMapChart.js.map +1 -1
  156. package/lib-commonjs/HorizontalBarChart.js.map +1 -1
  157. package/lib-commonjs/HorizontalBarChartWithAxis.js.map +1 -1
  158. package/lib-commonjs/Legends.js.map +1 -1
  159. package/lib-commonjs/LineChart.js.map +1 -1
  160. package/lib-commonjs/Popover.js.map +1 -1
  161. package/lib-commonjs/ResponsiveContainer.js.map +1 -1
  162. package/lib-commonjs/SankeyChart.js.map +1 -1
  163. package/lib-commonjs/ScatterChart.js.map +1 -1
  164. package/lib-commonjs/Sparkline.js.map +1 -1
  165. package/lib-commonjs/VerticalBarChart.js.map +1 -1
  166. package/lib-commonjs/VerticalStackedBarChart.js.map +1 -1
  167. package/lib-commonjs/components/AreaChart/AreaChart.js +13 -5
  168. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  169. package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +1 -1
  170. package/lib-commonjs/components/AreaChart/index.js.map +1 -1
  171. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  172. package/lib-commonjs/components/CommonComponents/CartesianChart.js +9 -6
  173. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  174. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  175. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
  176. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +1 -1
  177. package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
  178. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  179. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  180. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  181. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  182. package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -1
  183. package/lib-commonjs/components/DeclarativeChart/index.js.map +1 -1
  184. package/lib-commonjs/components/DonutChart/Arc/Arc.js +5 -5
  185. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  186. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -1
  187. package/lib-commonjs/components/DonutChart/Arc/index.js.map +1 -1
  188. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  189. package/lib-commonjs/components/DonutChart/DonutChart.js +7 -1
  190. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  191. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  192. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  193. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -1
  194. package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -1
  195. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
  196. package/lib-commonjs/components/DonutChart/index.js.map +1 -1
  197. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  198. package/lib-commonjs/components/FunnelChart/FunnelChart.js +402 -0
  199. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -0
  200. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js +6 -0
  201. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -0
  202. package/lib-commonjs/components/FunnelChart/funnelGeometry.js +248 -0
  203. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -0
  204. package/lib-commonjs/components/FunnelChart/index.js +7 -0
  205. package/lib-commonjs/components/FunnelChart/index.js.map +1 -0
  206. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +79 -0
  207. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -0
  208. package/lib-commonjs/components/GanttChart/GanttChart.js +541 -0
  209. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -0
  210. package/lib-commonjs/components/GanttChart/GanttChart.types.js +7 -0
  211. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -0
  212. package/lib-commonjs/components/GanttChart/index.js +7 -0
  213. package/lib-commonjs/components/GanttChart/index.js.map +1 -0
  214. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +39 -0
  215. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +1 -0
  216. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  217. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  218. package/lib-commonjs/components/GaugeChart/index.js.map +1 -1
  219. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  220. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +10 -5
  221. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  222. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  223. package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +1 -1
  224. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  225. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  226. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  227. package/lib-commonjs/components/HeatMapChart/index.js.map +1 -1
  228. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  229. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  230. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +3 -3
  231. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  232. package/lib-commonjs/components/HorizontalBarChart/index.js.map +1 -1
  233. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  234. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +9 -3
  235. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  236. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  237. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  238. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  239. package/lib-commonjs/components/Legends/Legends.js.map +1 -1
  240. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  241. package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -1
  242. package/lib-commonjs/components/Legends/index.js.map +1 -1
  243. package/lib-commonjs/components/Legends/shape.js +2 -2
  244. package/lib-commonjs/components/Legends/shape.js.map +1 -1
  245. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
  246. package/lib-commonjs/components/LineChart/LineChart.js +14 -7
  247. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  248. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  249. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  250. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  251. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +2 -1
  252. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  253. package/lib-commonjs/components/LineChart/index.js.map +1 -1
  254. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  255. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  256. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  257. package/lib-commonjs/components/ResponsiveContainer/index.js.map +1 -1
  258. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -1
  259. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  260. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  261. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  262. package/lib-commonjs/components/SankeyChart/index.js.map +1 -1
  263. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  264. package/lib-commonjs/components/ScatterChart/ScatterChart.js +8 -2
  265. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  266. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  267. package/lib-commonjs/components/ScatterChart/index.js.map +1 -1
  268. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  269. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
  270. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -1
  271. package/lib-commonjs/components/Sparkline/index.js.map +1 -1
  272. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +1 -1
  273. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +10 -4
  274. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  275. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  276. package/lib-commonjs/components/VerticalBarChart/index.js.map +1 -1
  277. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  278. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +4 -4
  279. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  280. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  281. package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +1 -1
  282. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  283. package/lib-commonjs/index.js +2 -0
  284. package/lib-commonjs/index.js.map +1 -1
  285. package/lib-commonjs/types/DataPoint.js +3 -1
  286. package/lib-commonjs/types/DataPoint.js.map +1 -1
  287. package/lib-commonjs/types/EventAnnotation.js.map +1 -1
  288. package/lib-commonjs/types/LegendDataItem.js.map +1 -1
  289. package/lib-commonjs/types/index.js.map +1 -1
  290. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  291. package/lib-commonjs/utilities/KeyCodes.js.map +1 -1
  292. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  293. package/lib-commonjs/utilities/async-utils.js.map +1 -1
  294. package/lib-commonjs/utilities/colors.js +18 -0
  295. package/lib-commonjs/utilities/colors.js.map +1 -1
  296. package/lib-commonjs/utilities/getWindow.js.map +1 -1
  297. package/lib-commonjs/utilities/index.js.map +1 -1
  298. package/lib-commonjs/utilities/overflow-utils.js.map +1 -1
  299. package/lib-commonjs/utilities/string.js.map +1 -1
  300. package/lib-commonjs/utilities/test-data.js +245 -0
  301. package/lib-commonjs/utilities/test-data.js.map +1 -1
  302. package/lib-commonjs/utilities/utilities.js +86 -17
  303. package/lib-commonjs/utilities/utilities.js.map +1 -1
  304. package/lib-commonjs/utilities/vbc-utils.js +2 -2
  305. package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
  306. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"sources":["test-data.ts"],"sourcesContent":["import {\n ChartDataPoint,\n ChartProps,\n HorizontalBarChartWithAxisDataPoint,\n VSChartDataPoint,\n VerticalStackedChartProps,\n VerticalBarChartDataPoint,\n DataVizPalette,\n} from '../index';\n\nexport const chartPointsVBC = [\n {\n x: 0,\n y: 10000,\n legend: 'First',\n color: 'aqua',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: 50000,\n legend: 'Second',\n color: 'blue',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Third',\n color: 'navy',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n\nconst firstChartPointsVSBC: VSChartDataPoint[] = [\n {\n legend: 'Metadata1',\n data: 40,\n color: 'aqua',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '40%',\n },\n {\n legend: 'Metadata2',\n data: 5,\n color: 'navy',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '5%',\n },\n];\n\nconst secondChartPointsVSBC: VSChartDataPoint[] = [\n {\n legend: 'Metadata1',\n data: 30,\n color: 'aqua',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '30%',\n },\n {\n legend: 'Metadata2',\n data: 20,\n color: 'navy',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n];\n\nexport const chartPointsVSBC: VerticalStackedChartProps[] = [\n { chartData: firstChartPointsVSBC, xAxisPoint: 0 },\n { chartData: secondChartPointsVSBC, xAxisPoint: 20 },\n];\n\nexport const chartPoints2VSBC: VerticalStackedChartProps[] = [\n {\n chartData: firstChartPointsVSBC,\n xAxisPoint: 0,\n lineData: [{ y: 15, legend: 'Line1', color: 'yellow' }],\n },\n {\n chartData: secondChartPointsVSBC,\n xAxisPoint: 20,\n lineData: [{ y: 30, legend: 'Line1', color: 'yellow' }],\n },\n];\n\nexport const emptychartPointsVSBC: VerticalStackedChartProps[] = [{ chartData: [], xAxisPoint: 0 }];\n\nexport const pointsHBCWA = [\n {\n x: 10000,\n y: 5000,\n legend: 'Oranges',\n color: 'aqua',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 20000,\n y: 50000,\n legend: 'Dogs',\n color: 'blue',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Apples',\n color: 'navy',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n\n {\n x: 40000,\n y: 13000,\n legend: 'Bananas',\n color: 'teal',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '88%',\n },\n];\n\nexport const pointsDC: ChartDataPoint[] = [\n { legend: 'first', data: 20000, color: '#E5E5E5', xAxisCalloutData: '2020/04/30' },\n { legend: 'second', data: 39000, color: '#0078D4', xAxisCalloutData: '2020/04/20' },\n { legend: 'third', data: 45000, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n];\n\nexport const pointsDCElevateMinimumsExample: ChartDataPoint[] = [\n { legend: 'first', data: 39000, color: '#E5E5E5', xAxisCalloutData: '2020/04/30' },\n { legend: 'second', data: 20, color: '#0078D4', xAxisCalloutData: '2020/04/20' },\n { legend: 'third', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n { legend: 'fourth', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n { legend: 'fifth', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n { legend: 'sixth', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n];\n\nexport const chartPointsDC: ChartProps = {\n chartTitle: 'Donut chart example',\n chartData: pointsDC,\n};\n\nexport const chartPointsDCElevateMinimums: ChartProps = {\n chartTitle: 'Donut chart example',\n chartData: pointsDC,\n};\n\nexport const chartPointsHBCWA: HorizontalBarChartWithAxisDataPoint[] = [\n {\n x: 10000,\n y: 5000,\n legend: 'Oranges',\n color: 'aqua',\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '10%',\n },\n {\n x: 20000,\n y: 50000,\n legend: 'Grapes',\n color: 'blue',\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Apples',\n color: 'navy',\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '37%',\n },\n\n {\n x: 40000,\n y: 13000,\n legend: 'Bananas',\n color: 'teal',\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '88%',\n },\n];\n\nexport const chartPointsWithStringYAxisHBCWA: HorizontalBarChartWithAxisDataPoint[] = [\n {\n y: 'String One',\n x: 1000,\n color: 'aqua',\n },\n {\n y: 'String Two',\n x: 5000,\n color: 'blue',\n },\n {\n y: 'String Three',\n x: 3000,\n color: 'navy',\n },\n {\n y: 'String Four',\n x: 2000,\n color: 'blue',\n },\n];\n\nexport const chartPointsWithAxisToolTipHBCWA: HorizontalBarChartWithAxisDataPoint[] = [\n {\n x: 1000,\n y: 1000,\n color: 'aqua',\n },\n {\n x: 2000,\n y: 5000,\n color: 'blue',\n },\n {\n x: 3000,\n y: 3000,\n color: 'navy',\n },\n {\n x: 4000,\n y: 2000,\n color: 'blue',\n },\n];\n\nexport const allNegativeChartPointsVBC: VerticalBarChartDataPoint[] = [\n {\n x: 0,\n y: -10000,\n legend: 'First',\n color: DataVizPalette.color1,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: -50000,\n legend: 'Second',\n color: DataVizPalette.color2,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: -30000,\n legend: 'Third',\n color: DataVizPalette.color3,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n\nexport const negativeChartPointsVBC: VerticalBarChartDataPoint[] = [\n {\n x: 0,\n y: 10000,\n legend: 'First',\n color: DataVizPalette.color1,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: -50000,\n legend: 'Second',\n color: DataVizPalette.color2,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Third',\n color: DataVizPalette.color3,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n"],"names":["DataVizPalette","chartPointsVBC","x","y","legend","color","xAxisCalloutData","yAxisCalloutData","firstChartPointsVSBC","data","secondChartPointsVSBC","chartPointsVSBC","chartData","xAxisPoint","chartPoints2VSBC","lineData","emptychartPointsVSBC","pointsHBCWA","pointsDC","pointsDCElevateMinimumsExample","chartPointsDC","chartTitle","chartPointsDCElevateMinimums","chartPointsHBCWA","chartPointsWithStringYAxisHBCWA","chartPointsWithAxisToolTipHBCWA","allNegativeChartPointsVBC","color1","color2","color3","negativeChartPointsVBC"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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GAAG,CAAC;QACJC,QAAQ;QACRC,OAAOL,eAAe6B,MAAM;QAC5BvB,kBAAkB;QAClBC,kBAAkB;IACpB;CACD,CAAC;AAEF,OAAO,MAAMuB,yBAAsD;IACjE;QACE5B,GAAG;QACHC,GAAG;QACHC,QAAQ;QACRC,OAAOL,eAAe2B,MAAM;QAC5BrB,kBAAkB;QAClBC,kBAAkB;IACpB;IACA;QACEL,GAAG;QACHC,GAAG,CAAC;QACJC,QAAQ;QACRC,OAAOL,eAAe4B,MAAM;QAC5BtB,kBAAkB;QAClBC,kBAAkB;IACpB;IACA;QACEL,GAAG;QACHC,GAAG;QACHC,QAAQ;QACRC,OAAOL,eAAe6B,MAAM;QAC5BvB,kBAAkB;QAClBC,kBAAkB;IACpB;CACD,CAAC"}
1
+ {"version":3,"sources":["test-data.ts"],"sourcesContent":["import {\n ChartDataPoint,\n ChartProps,\n HorizontalBarChartWithAxisDataPoint,\n VSChartDataPoint,\n GanttChartDataPoint,\n VerticalStackedChartProps,\n VerticalBarChartDataPoint,\n DataVizPalette,\n} from '../index';\n\nexport const chartPointsVBC = [\n {\n x: 0,\n y: 10000,\n legend: 'First',\n color: 'aqua',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: 50000,\n legend: 'Second',\n color: 'blue',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Third',\n color: 'navy',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n\nconst firstChartPointsVSBC: VSChartDataPoint[] = [\n {\n legend: 'Metadata1',\n data: 40,\n color: 'aqua',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '40%',\n },\n {\n legend: 'Metadata2',\n data: 5,\n color: 'navy',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '5%',\n },\n];\n\nconst secondChartPointsVSBC: VSChartDataPoint[] = [\n {\n legend: 'Metadata1',\n data: 30,\n color: 'aqua',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '30%',\n },\n {\n legend: 'Metadata2',\n data: 20,\n color: 'navy',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n];\n\nexport const chartPointsVSBC: VerticalStackedChartProps[] = [\n { chartData: firstChartPointsVSBC, xAxisPoint: 0 },\n { chartData: secondChartPointsVSBC, xAxisPoint: 20 },\n];\n\nexport const chartPoints2VSBC: VerticalStackedChartProps[] = [\n {\n chartData: firstChartPointsVSBC,\n xAxisPoint: 0,\n lineData: [{ y: 15, legend: 'Line1', color: 'yellow' }],\n },\n {\n chartData: secondChartPointsVSBC,\n xAxisPoint: 20,\n lineData: [{ y: 30, legend: 'Line1', color: 'yellow' }],\n },\n];\n\nexport const emptychartPointsVSBC: VerticalStackedChartProps[] = [{ chartData: [], xAxisPoint: 0 }];\n\nexport const pointsHBCWA = [\n {\n x: 10000,\n y: 5000,\n legend: 'Oranges',\n color: 'aqua',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 20000,\n y: 50000,\n legend: 'Dogs',\n color: 'blue',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Apples',\n color: 'navy',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n\n {\n x: 40000,\n y: 13000,\n legend: 'Bananas',\n color: 'teal',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '88%',\n },\n];\n\nexport const pointsDC: ChartDataPoint[] = [\n { legend: 'first', data: 20000, color: '#E5E5E5', xAxisCalloutData: '2020/04/30' },\n { legend: 'second', data: 39000, color: '#0078D4', xAxisCalloutData: '2020/04/20' },\n { legend: 'third', data: 45000, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n];\n\nexport const pointsDCElevateMinimumsExample: ChartDataPoint[] = [\n { legend: 'first', data: 39000, color: '#E5E5E5', xAxisCalloutData: '2020/04/30' },\n { legend: 'second', data: 20, color: '#0078D4', xAxisCalloutData: '2020/04/20' },\n { legend: 'third', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n { legend: 'fourth', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n { legend: 'fifth', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n { legend: 'sixth', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n];\n\nexport const chartPointsDC: ChartProps = {\n chartTitle: 'Donut chart example',\n chartData: pointsDC,\n};\n\nexport const chartPointsDCElevateMinimums: ChartProps = {\n chartTitle: 'Donut chart example',\n chartData: pointsDC,\n};\n\nexport const chartPointsHBCWA: HorizontalBarChartWithAxisDataPoint[] = [\n {\n x: 10000,\n y: 5000,\n legend: 'Oranges',\n color: 'aqua',\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '10%',\n },\n {\n x: 20000,\n y: 50000,\n legend: 'Grapes',\n color: 'blue',\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Apples',\n color: 'navy',\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '37%',\n },\n\n {\n x: 40000,\n y: 13000,\n legend: 'Bananas',\n color: 'teal',\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '88%',\n },\n];\n\nexport const chartPointsWithStringYAxisHBCWA: HorizontalBarChartWithAxisDataPoint[] = [\n {\n y: 'String One',\n x: 1000,\n color: 'aqua',\n },\n {\n y: 'String Two',\n x: 5000,\n color: 'blue',\n },\n {\n y: 'String Three',\n x: 3000,\n color: 'navy',\n },\n {\n y: 'String Four',\n x: 2000,\n color: 'blue',\n },\n];\n\nexport const chartPointsWithAxisToolTipHBCWA: HorizontalBarChartWithAxisDataPoint[] = [\n {\n x: 1000,\n y: 1000,\n color: 'aqua',\n },\n {\n x: 2000,\n y: 5000,\n color: 'blue',\n },\n {\n x: 3000,\n y: 3000,\n color: 'navy',\n },\n {\n x: 4000,\n y: 2000,\n color: 'blue',\n },\n];\n\nexport const allNegativeChartPointsVBC: VerticalBarChartDataPoint[] = [\n {\n x: 0,\n y: -10000,\n legend: 'First',\n color: DataVizPalette.color1,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: -50000,\n legend: 'Second',\n color: DataVizPalette.color2,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: -30000,\n legend: 'Third',\n color: DataVizPalette.color3,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n\nexport const negativeChartPointsVBC: VerticalBarChartDataPoint[] = [\n {\n x: 0,\n y: 10000,\n legend: 'First',\n color: DataVizPalette.color1,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: -50000,\n legend: 'Second',\n color: DataVizPalette.color2,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Third',\n color: DataVizPalette.color3,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n\nexport const ganttData: GanttChartDataPoint[] = [\n {\n x: {\n start: new Date('2017-01-01'),\n end: new Date('2017-02-02'),\n },\n y: 'Job-1',\n legend: 'Complete',\n color: DataVizPalette.success,\n gradient: ['#0C5E0C', '#107C10'],\n },\n {\n x: {\n start: new Date('2017-01-17'),\n end: new Date('2017-02-17'),\n },\n y: 'Job-2',\n legend: 'Complete',\n color: DataVizPalette.success,\n gradient: ['#0C5E0C', '#107C10'],\n },\n {\n x: {\n start: new Date('2017-01-14'),\n end: new Date('2017-03-14'),\n },\n y: 'Job-4',\n legend: 'Complete',\n color: DataVizPalette.success,\n gradient: ['#0C5E0C', '#107C10'],\n },\n {\n x: {\n start: new Date('2017-02-15'),\n end: new Date('2017-03-15'),\n },\n y: 'Job-1',\n legend: 'Incomplete',\n color: DataVizPalette.warning,\n gradient: ['#DE590B', '#F7630C'],\n },\n {\n x: {\n start: new Date('2017-01-17'),\n end: new Date('2017-02-17'),\n },\n y: 'Job-2',\n legend: 'Not Started',\n color: DataVizPalette.error,\n gradient: ['#B10E1C', '#CC2635'],\n },\n {\n x: {\n start: new Date('2017-03-10'),\n end: new Date('2017-03-20'),\n },\n y: 'Job-3',\n legend: 'Not Started',\n color: DataVizPalette.error,\n gradient: ['#B10E1C', '#CC2635'],\n },\n {\n x: {\n start: new Date('2017-04-01'),\n end: new Date('2017-04-20'),\n },\n y: 'Job-3',\n legend: 'Not Started',\n color: DataVizPalette.error,\n gradient: ['#B10E1C', '#CC2635'],\n },\n {\n x: {\n start: new Date('2017-05-18'),\n end: new Date(new Date('2017-06-18')),\n },\n y: 'Job-3',\n legend: 'Not Started',\n color: DataVizPalette.error,\n gradient: ['#B10E1C', '#CC2635'],\n },\n];\n\nexport const ganttDataWithLongY: GanttChartDataPoint[] = [\n {\n x: {\n start: new Date('2024-05-01'),\n end: new Date('2024-05-07'),\n },\n y: 'Site Preparation',\n legend: 'No',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2024-05-08'),\n end: new Date('2024-05-21'),\n },\n y: 'Foundation Work',\n legend: 'No',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2024-05-22'),\n end: new Date('2024-06-02'),\n },\n y: 'Framing',\n legend: 'No',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2024-06-03'),\n end: new Date('2024-06-09'),\n },\n y: 'Roof Installation',\n legend: 'No',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2024-06-10'),\n end: new Date('2024-06-23'),\n },\n y: 'Plumbing/Electrical',\n legend: 'No',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2024-07-08'),\n end: new Date('2024-07-17'),\n },\n y: 'Exterior Finishing',\n legend: 'No',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2024-06-24'),\n end: new Date('2024-07-07'),\n },\n y: 'Interior Finishing',\n legend: 'Yes (Phase 1)',\n color: '#f7630cff',\n },\n {\n x: {\n start: new Date('2024-07-18'),\n end: new Date('2024-07-24'),\n },\n y: 'Final Inspections',\n legend: 'Yes (Phase 2)',\n color: '#57811bff',\n },\n];\n\nexport const ganttDataWithNumericY: GanttChartDataPoint[] = [\n {\n x: {\n start: new Date('2021-01-01'),\n end: new Date('2022-01-10'),\n },\n y: 1,\n legend: 'HR',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2022-01-15'),\n end: new Date('2022-01-20'),\n },\n y: 2,\n legend: 'Finance',\n color: '#f7630cff',\n },\n {\n x: {\n start: new Date('2022-02-01'),\n end: new Date('2022-02-08'),\n },\n y: 3,\n legend: 'IT',\n color: '#57811bff',\n },\n {\n x: {\n start: new Date('2022-02-10'),\n end: new Date('2022-02-20'),\n },\n y: 4,\n legend: 'Operations',\n color: '#9373c0ff',\n },\n {\n x: {\n start: new Date('2022-03-01'),\n end: new Date('2022-03-10'),\n },\n y: 5,\n legend: 'Customer Support',\n color: '#ca5010ff',\n },\n {\n x: {\n start: new Date('2022-03-05'),\n end: new Date('2022-03-15'),\n },\n y: 6,\n legend: 'Legal',\n color: '#3a96ddff',\n },\n];\n"],"names":["DataVizPalette","chartPointsVBC","x","y","legend","color","xAxisCalloutData","yAxisCalloutData","firstChartPointsVSBC","data","secondChartPointsVSBC","chartPointsVSBC","chartData","xAxisPoint","chartPoints2VSBC","lineData","emptychartPointsVSBC","pointsHBCWA","pointsDC","pointsDCElevateMinimumsExample","chartPointsDC","chartTitle","chartPointsDCElevateMinimums","chartPointsHBCWA","chartPointsWithStringYAxisHBCWA","chartPointsWithAxisToolTipHBCWA","allNegativeChartPointsVBC","color1","color2","color3","negativeChartPointsVBC","ganttData","start","Date","end","success","gradient","warning","error","ganttDataWithLongY","ganttDataWithNumericY"],"mappings":"AAAA,SAQEA,cAAc,QACT,WAAW;AAElB,OAAO,MAAMC,iBAAiB;IAC5B;QAC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AK;QAChB;QACA9B,GAAG;QACHC,QAAQ;QACRC,OAAO;IACT;IACA;QACEH,GAAG;YACD8B,OAAO,IAAIC,KAAK;YAChBC,KAAK,IAAID,KAAK;QAChB;QACA9B,GAAG;QACHC,QAAQ;QACRC,OAAO;IACT;CACD,CAAC;AAEF,OAAO,MAAMmC,wBAA+C;IAC1D;QACEtC,GAAG;YACD8B,OAAO,IAAIC,KAAK;YAChBC,KAAK,IAAID,KAAK;QAChB;QACA9B,GAAG;QACHC,QAAQ;QACRC,OAAO;IACT;IACA;QACEH,GAAG;YACD8B,OAAO,IAAIC,KAAK;YAChBC,KAAK,IAAID,KAAK;QAChB;QACA9B,GAAG;QACHC,QAAQ;QACRC,OAAO;IACT;IACA;QACEH,GAAG;YACD8B,OAAO,IAAIC,KAAK;YAChBC,KAAK,IAAID,KAAK;QAChB;QACA9B,GAAG;QACHC,QAAQ;QACRC,OAAO;IACT;IACA;QACEH,GAAG;YACD8B,OAAO,IAAIC,KAAK;YAChBC,KAAK,IAAID,KAAK;QAChB;QACA9B,GAAG;QACHC,QAAQ;QACRC,OAAO;IACT;IACA;QACEH,GAAG;YACD8B,OAAO,IAAIC,KAAK;YAChBC,KAAK,IAAID,KAAK;QAChB;QACA9B,GAAG;QACHC,QAAQ;QACRC,OAAO;IACT;IACA;QACEH,GAAG;YACD8B,OAAO,IAAIC,KAAK;YAChBC,KAAK,IAAID,KAAK;QAChB;QACA9B,GAAG;QACHC,QAAQ;QACRC,OAAO;IACT;CACD,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { axisRight as d3AxisRight, axisBottom as d3AxisBottom, axisLeft as d3AxisLeft } from 'd3-axis';
2
- import { max as d3Max, min as d3Min, ticks as d3Ticks, nice as d3nice } from 'd3-array';
2
+ import { max as d3Max, min as d3Min, ticks as d3Ticks, nice as d3nice, sum as d3Sum, mean as d3Mean, median as d3Median } from 'd3-array';
3
3
  import { scaleLinear as d3ScaleLinear, scaleBand as d3ScaleBand, scaleUtc as d3ScaleUtc, scaleTime as d3ScaleTime } from 'd3-scale';
4
4
  import { select as d3Select, selectAll as d3SelectAll } from 'd3-selection';
5
5
  import { format as d3Format } from 'd3-format';
@@ -10,8 +10,7 @@ import { formatPrefix as d3FormatPrefix } from 'd3-format';
10
10
  import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';
11
11
  import { formatDateToLocaleString, formatToLocaleString, getMultiLevelDateTimeFormatOptions } from '@fluentui/chart-utilities';
12
12
  export const MIN_DOMAIN_MARGIN = 8;
13
- export var ChartTypes;
14
- (function(ChartTypes) {
13
+ export var ChartTypes = /*#__PURE__*/ function(ChartTypes) {
15
14
  ChartTypes[ChartTypes["AreaChart"] = 0] = "AreaChart";
16
15
  ChartTypes[ChartTypes["LineChart"] = 1] = "LineChart";
17
16
  ChartTypes[ChartTypes["VerticalBarChart"] = 2] = "VerticalBarChart";
@@ -20,19 +19,21 @@ export var ChartTypes;
20
19
  ChartTypes[ChartTypes["HeatMapChart"] = 5] = "HeatMapChart";
21
20
  ChartTypes[ChartTypes["HorizontalBarChartWithAxis"] = 6] = "HorizontalBarChartWithAxis";
22
21
  ChartTypes[ChartTypes["ScatterChart"] = 7] = "ScatterChart";
23
- })(ChartTypes || (ChartTypes = {}));
24
- export var XAxisTypes;
25
- (function(XAxisTypes) {
22
+ ChartTypes[ChartTypes["GanttChart"] = 8] = "GanttChart";
23
+ return ChartTypes;
24
+ }({});
25
+ export var XAxisTypes = /*#__PURE__*/ function(XAxisTypes) {
26
26
  XAxisTypes[XAxisTypes["NumericAxis"] = 0] = "NumericAxis";
27
27
  XAxisTypes[XAxisTypes["DateAxis"] = 1] = "DateAxis";
28
28
  XAxisTypes[XAxisTypes["StringAxis"] = 2] = "StringAxis";
29
- })(XAxisTypes || (XAxisTypes = {}));
30
- export var YAxisType;
31
- (function(YAxisType) {
29
+ return XAxisTypes;
30
+ }({});
31
+ export var YAxisType = /*#__PURE__*/ function(YAxisType) {
32
32
  YAxisType[YAxisType["NumericAxis"] = 0] = "NumericAxis";
33
33
  YAxisType[YAxisType["DateAxis"] = 1] = "DateAxis";
34
34
  YAxisType[YAxisType["StringAxis"] = 2] = "StringAxis";
35
- })(YAxisType || (YAxisType = {}));
35
+ return YAxisType;
36
+ }({});
36
37
  function yAxisTickFormatterInternal(value, limitWidth = false) {
37
38
  // Use SI format prefix with 2 decimal places without insignificant trailing zeros
38
39
  let formatter = d3FormatPrefix('.2~', value);
@@ -85,7 +86,10 @@ function yAxisTickFormatterInternal(value, limitWidth = false) {
85
86
  tickCount = Math.min(Math.max(1, Math.floor(Math.abs(end - start) / longestLabelWidth)), 10);
86
87
  }
87
88
  const xAxis = d3AxisBottom(xAxisScale).tickSize(xAxistickSize).tickPadding(tickPadding).ticks(tickCount).tickFormat(tickFormat);
88
- if (chartType === 6) {
89
+ if ([
90
+ 6,
91
+ 8
92
+ ].includes(chartType)) {
89
93
  xAxis.tickSizeInner(-(xAxisParams.containerHeight - xAxisParams.margins.top));
90
94
  }
91
95
  if (tickParams.tickValues) {
@@ -239,7 +243,7 @@ function yAxisTickFormatterInternal(value, limitWidth = false) {
239
243
  const formatter = timeFormat(MULTI_LEVEL_DATE_TIME_FORMATS[startLevel][endLevel]);
240
244
  return formatter;
241
245
  }
242
- function getDateFormatLevel(date, useUTC) {
246
+ export function getDateFormatLevel(date, useUTC) {
243
247
  const timeSecond = useUTC ? d3UtcSecond : d3TimeSecond;
244
248
  const timeMinute = useUTC ? d3UtcMinute : d3TimeMinute;
245
249
  const timeHour = useUTC ? d3UtcHour : d3TimeHour;
@@ -290,7 +294,7 @@ function getDateFormatLevel(date, useUTC) {
290
294
  * @export
291
295
  * @param {IXAxisParams} xAxisParams
292
296
  * @param {ITickParams} tickParams
293
- */ export function createDateXAxis(xAxisParams, tickParams, culture, options, timeFormatLocale, customDateTimeFormatter, useUTC) {
297
+ */ export function createDateXAxis(xAxisParams, tickParams, culture, options, timeFormatLocale, customDateTimeFormatter, useUTC, chartType) {
294
298
  const { domainNRangeValues, xAxisElement, tickPadding = 6, xAxistickSize = 6, xAxisCount } = xAxisParams;
295
299
  const isUtcSet = useUTC === true || useUTC === 'utc';
296
300
  const xAxisScale = isUtcSet ? d3ScaleUtc() : d3ScaleTime();
@@ -337,6 +341,11 @@ function getDateFormatLevel(date, useUTC) {
337
341
  const maxPossibleTickCount = Math.min(Math.max(1, Math.floor(Math.abs(end - start) / longestLabelWidth)), 10);
338
342
  tickCount = Math.min(maxPossibleTickCount, xAxisCount !== null && xAxisCount !== void 0 ? xAxisCount : tickCount);
339
343
  const xAxis = d3AxisBottom(xAxisScale).tickSize(xAxistickSize).tickPadding(tickPadding).ticks(tickCount).tickFormat(tickFormat);
344
+ if ([
345
+ 8
346
+ ].includes(chartType)) {
347
+ xAxis.tickSizeInner(-(xAxisParams.containerHeight - xAxisParams.margins.top));
348
+ }
340
349
  tickParams.tickValues ? xAxis.tickValues(tickParams.tickValues) : '';
341
350
  if (xAxisElement) {
342
351
  d3Select(xAxisElement).call(xAxis).selectAll('text').attr('aria-hidden', 'true');
@@ -1182,7 +1191,7 @@ export function tooltipOfAxislabels(axistooltipProps) {
1182
1191
  };
1183
1192
  }
1184
1193
  /**
1185
- * Fins the min and max values of the vertical bar chart y axis data point.
1194
+ * Finds the min and max values of the vertical bar chart y axis data point.
1186
1195
  * @export
1187
1196
  * @param {VerticalBarChartDataPoint[]} points
1188
1197
  * @returns {{ startValue: number; endValue: number }}
@@ -1204,9 +1213,9 @@ export function tooltipOfAxislabels(axistooltipProps) {
1204
1213
  };
1205
1214
  }
1206
1215
  /**
1207
- * Fins the min and max values of the vertical bar chart y axis data point.
1216
+ * Finds the min and max values of the horizontal bar chart y axis data point.
1208
1217
  * @export
1209
- * @param {VerticalBarChartDataPoint[]} points
1218
+ * @param {HorizontalBarChartWithAxisDataPoint[]|GanttChartDataPoint[]} points
1210
1219
  * @returns {{ startValue: number; endValue: number }}
1211
1220
  */ export function findHBCWANumericMinMaxOfY(points, yAxisType) {
1212
1221
  if (yAxisType !== undefined && yAxisType === 0) {
@@ -1248,8 +1257,10 @@ export function tooltipOfAxislabels(axistooltipProps) {
1248
1257
  }
1249
1258
  }
1250
1259
  };
1251
- export var Points;
1252
- (function(Points) {
1260
+ /**
1261
+ * we need to make sure that if we add any property to this, then
1262
+ * we need to also add that in pointTypes below and vise-versa
1263
+ */ export var Points = /*#__PURE__*/ function(Points) {
1253
1264
  Points[Points["circle"] = 0] = "circle";
1254
1265
  Points[Points["square"] = 1] = "square";
1255
1266
  Points[Points["triangle"] = 2] = "triangle";
@@ -1258,11 +1269,12 @@ export var Points;
1258
1269
  Points[Points["hexagon"] = 5] = "hexagon";
1259
1270
  Points[Points["pentagon"] = 6] = "pentagon";
1260
1271
  Points[Points["octagon"] = 7] = "octagon";
1261
- })(Points || (Points = {}));
1262
- export var CustomPoints;
1263
- (function(CustomPoints) {
1272
+ return Points;
1273
+ }({});
1274
+ export var CustomPoints = /*#__PURE__*/ function(CustomPoints) {
1264
1275
  CustomPoints[CustomPoints["dottedLine"] = 0] = "dottedLine";
1265
- })(CustomPoints || (CustomPoints = {}));
1276
+ return CustomPoints;
1277
+ }({});
1266
1278
  /**
1267
1279
  * we need to make sure that if we add any property to this, then
1268
1280
  * we need to also add that in enum Point and vise-versa
@@ -1481,3 +1493,59 @@ export const truncateString = (str, maxLength, ellipsis = '...')=>{
1481
1493
  }
1482
1494
  return str.slice(0, maxLength) + ellipsis;
1483
1495
  };
1496
+ const categoryOrderRegex = /(category|total|sum|min|max|mean|median) (ascending|descending)/;
1497
+ /**
1498
+ * @see {@link https://github.com/plotly/plotly.js/blob/master/src/plots/plots.js#L3041}
1499
+ */ export const sortAxisCategories = (categoryToValues, categoryOrder)=>{
1500
+ if (Array.isArray(categoryOrder)) {
1501
+ const result = [];
1502
+ const seen = new Set();
1503
+ // Add elements from categoryOrder array that are in categoryToValues, in the array's order
1504
+ categoryOrder.forEach((category)=>{
1505
+ if (categoryToValues[category] && !seen.has(category)) {
1506
+ result.push(category);
1507
+ seen.add(category);
1508
+ }
1509
+ });
1510
+ // Append any keys from categoryToValues not already in result
1511
+ Object.keys(categoryToValues).forEach((category)=>{
1512
+ if (!seen.has(category)) {
1513
+ result.push(category);
1514
+ }
1515
+ });
1516
+ return result;
1517
+ }
1518
+ const match = categoryOrder === null || categoryOrder === void 0 ? void 0 : categoryOrder.match(categoryOrderRegex);
1519
+ if (match) {
1520
+ const aggregator = match[1];
1521
+ const order = match[2];
1522
+ if (aggregator === 'category') {
1523
+ const result = Object.keys(categoryToValues).sort();
1524
+ return order === 'descending' ? result.reverse() : result;
1525
+ }
1526
+ const aggFn = {
1527
+ min: d3Min,
1528
+ max: d3Max,
1529
+ sum: d3Sum,
1530
+ total: d3Sum,
1531
+ mean: d3Mean,
1532
+ median: d3Median
1533
+ };
1534
+ const sortAscending = (a, b)=>{
1535
+ return a[1] - b[1];
1536
+ };
1537
+ const sortDescending = (a, b)=>{
1538
+ return b[1] - a[1];
1539
+ };
1540
+ const categoriesAggregatedValue = [];
1541
+ Object.keys(categoryToValues).forEach((category)=>{
1542
+ categoriesAggregatedValue.push([
1543
+ category,
1544
+ aggFn[aggregator](categoryToValues[category]) || 0
1545
+ ]);
1546
+ });
1547
+ categoriesAggregatedValue.sort(order === 'descending' ? sortDescending : sortAscending);
1548
+ return categoriesAggregatedValue.map(([category])=>category);
1549
+ }
1550
+ return Object.keys(categoryToValues);
1551
+ };