@fluentui/react-charts 0.0.0-nightly-20250423-0405.1 → 0.0.0-nightly-20250423-1415.1

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 (483) hide show
  1. package/CHANGELOG.md +16 -16
  2. package/dist/index.d.ts +3337 -0
  3. package/lib/AreaChart.js +1 -0
  4. package/lib/AreaChart.js.map +1 -0
  5. package/lib/CartesianChart.js +1 -0
  6. package/lib/CartesianChart.js.map +1 -0
  7. package/lib/DeclarativeChart.js +1 -0
  8. package/lib/DeclarativeChart.js.map +1 -0
  9. package/lib/DonutChart.js +1 -0
  10. package/lib/DonutChart.js.map +1 -0
  11. package/lib/GaugeChart.js +1 -0
  12. package/lib/GaugeChart.js.map +1 -0
  13. package/lib/GroupedVerticalBarChart.js +1 -0
  14. package/lib/GroupedVerticalBarChart.js.map +1 -0
  15. package/lib/HeatMapChart.js +1 -0
  16. package/lib/HeatMapChart.js.map +1 -0
  17. package/lib/HorizontalBarChart.js +1 -0
  18. package/lib/HorizontalBarChart.js.map +1 -0
  19. package/lib/HorizontalBarChartWithAxis.js +1 -0
  20. package/lib/HorizontalBarChartWithAxis.js.map +1 -0
  21. package/lib/Legends.js +1 -0
  22. package/lib/Legends.js.map +1 -0
  23. package/lib/LineChart.js +1 -0
  24. package/lib/LineChart.js.map +1 -0
  25. package/lib/Popover.js +1 -0
  26. package/lib/Popover.js.map +1 -0
  27. package/lib/ResponsiveContainer.js +1 -0
  28. package/lib/ResponsiveContainer.js.map +1 -0
  29. package/lib/SankeyChart.js +1 -0
  30. package/lib/SankeyChart.js.map +1 -0
  31. package/lib/ScatterChart.js +1 -0
  32. package/lib/ScatterChart.js.map +1 -0
  33. package/lib/Sparkline.js +1 -0
  34. package/lib/Sparkline.js.map +1 -0
  35. package/lib/VerticalBarChart.js +1 -0
  36. package/lib/VerticalBarChart.js.map +1 -0
  37. package/lib/VerticalStackedBarChart.js +1 -0
  38. package/lib/VerticalStackedBarChart.js.map +1 -0
  39. package/lib/components/AreaChart/AreaChart.js +775 -0
  40. package/lib/components/AreaChart/AreaChart.js.map +1 -0
  41. package/lib/components/AreaChart/AreaChart.types.js +4 -0
  42. package/lib/components/AreaChart/AreaChart.types.js.map +1 -0
  43. package/lib/components/AreaChart/index.js +3 -0
  44. package/lib/components/AreaChart/index.js.map +1 -0
  45. package/lib/components/AreaChart/useAreaChartStyles.styles.js +64 -0
  46. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -0
  47. package/lib/components/CommonComponents/CartesianChart.js +478 -0
  48. package/lib/components/CommonComponents/CartesianChart.js.map +1 -0
  49. package/lib/components/CommonComponents/CartesianChart.types.js +1 -0
  50. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -0
  51. package/lib/components/CommonComponents/ChartPopover.js +187 -0
  52. package/lib/components/CommonComponents/ChartPopover.js.map +1 -0
  53. package/lib/components/CommonComponents/ChartPopover.types.js +1 -0
  54. package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -0
  55. package/lib/components/CommonComponents/index.js +4 -0
  56. package/lib/components/CommonComponents/index.js.map +1 -0
  57. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +229 -0
  58. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -0
  59. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +178 -0
  60. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -0
  61. package/lib/components/DeclarativeChart/DeclarativeChart.js +197 -0
  62. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
  63. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +811 -0
  64. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
  65. package/lib/components/DeclarativeChart/imageExporter.js +221 -0
  66. package/lib/components/DeclarativeChart/imageExporter.js.map +1 -0
  67. package/lib/components/DeclarativeChart/index.js +1 -0
  68. package/lib/components/DeclarativeChart/index.js.map +1 -0
  69. package/lib/components/DonutChart/Arc/Arc.js +110 -0
  70. package/lib/components/DonutChart/Arc/Arc.js.map +1 -0
  71. package/lib/components/DonutChart/Arc/Arc.types.js +1 -0
  72. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -0
  73. package/lib/components/DonutChart/Arc/index.js +2 -0
  74. package/lib/components/DonutChart/Arc/index.js.map +1 -0
  75. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +54 -0
  76. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -0
  77. package/lib/components/DonutChart/DonutChart.js +291 -0
  78. package/lib/components/DonutChart/DonutChart.js.map +1 -0
  79. package/lib/components/DonutChart/DonutChart.types.js +1 -0
  80. package/lib/components/DonutChart/DonutChart.types.js.map +1 -0
  81. package/lib/components/DonutChart/Pie/Pie.js +72 -0
  82. package/lib/components/DonutChart/Pie/Pie.js.map +1 -0
  83. package/lib/components/DonutChart/Pie/Pie.types.js +1 -0
  84. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -0
  85. package/lib/components/DonutChart/Pie/index.js +2 -0
  86. package/lib/components/DonutChart/Pie/index.js.map +1 -0
  87. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +44 -0
  88. package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -0
  89. package/lib/components/DonutChart/index.js +3 -0
  90. package/lib/components/DonutChart/index.js.map +1 -0
  91. package/lib/components/DonutChart/useDonutChartStyles.styles.js +58 -0
  92. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -0
  93. package/lib/components/GaugeChart/GaugeChart.js +592 -0
  94. package/lib/components/GaugeChart/GaugeChart.js.map +1 -0
  95. package/lib/components/GaugeChart/GaugeChart.types.js +4 -0
  96. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -0
  97. package/lib/components/GaugeChart/index.js +3 -0
  98. package/lib/components/GaugeChart/index.js.map +1 -0
  99. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +174 -0
  100. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -0
  101. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +501 -0
  102. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -0
  103. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +4 -0
  104. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -0
  105. package/lib/components/GroupedVerticalBarChart/index.js +3 -0
  106. package/lib/components/GroupedVerticalBarChart/index.js.map +1 -0
  107. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +90 -0
  108. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -0
  109. package/lib/components/HeatMapChart/HeatMapChart.js +588 -0
  110. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -0
  111. package/lib/components/HeatMapChart/HeatMapChart.types.js +4 -0
  112. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -0
  113. package/lib/components/HeatMapChart/index.js +3 -0
  114. package/lib/components/HeatMapChart/index.js.map +1 -0
  115. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +46 -0
  116. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -0
  117. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +402 -0
  118. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
  119. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +6 -0
  120. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -0
  121. package/lib/components/HorizontalBarChart/index.js +3 -0
  122. package/lib/components/HorizontalBarChart/index.js.map +1 -0
  123. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +163 -0
  124. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -0
  125. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +571 -0
  126. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -0
  127. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +4 -0
  128. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -0
  129. package/lib/components/HorizontalBarChartWithAxis/index.js +3 -0
  130. package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -0
  131. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +76 -0
  132. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -0
  133. package/lib/components/Legends/Legends.js +303 -0
  134. package/lib/components/Legends/Legends.js.map +1 -0
  135. package/lib/components/Legends/Legends.types.js +1 -0
  136. package/lib/components/Legends/Legends.types.js.map +1 -0
  137. package/lib/components/Legends/OverflowMenu.js +25 -0
  138. package/lib/components/Legends/OverflowMenu.js.map +1 -0
  139. package/lib/components/Legends/index.js +3 -0
  140. package/lib/components/Legends/index.js.map +1 -0
  141. package/lib/components/Legends/shape.js +35 -0
  142. package/lib/components/Legends/shape.js.map +1 -0
  143. package/lib/components/Legends/useLegendsStyles.styles.js +147 -0
  144. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -0
  145. package/lib/components/LineChart/LineChart.js +1034 -0
  146. package/lib/components/LineChart/LineChart.js.map +1 -0
  147. package/lib/components/LineChart/LineChart.types.js +3 -0
  148. package/lib/components/LineChart/LineChart.types.js.map +1 -0
  149. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +119 -0
  150. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -0
  151. package/lib/components/LineChart/eventAnnotation/LabelLink.js +57 -0
  152. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -0
  153. package/lib/components/LineChart/eventAnnotation/Textbox.js +40 -0
  154. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -0
  155. package/lib/components/LineChart/index.js +4 -0
  156. package/lib/components/LineChart/index.js.map +1 -0
  157. package/lib/components/LineChart/useLineChartStyles.styles.js +65 -0
  158. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -0
  159. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +65 -0
  160. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -0
  161. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js +1 -0
  162. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -0
  163. package/lib/components/ResponsiveContainer/index.js +1 -0
  164. package/lib/components/ResponsiveContainer/index.js.map +1 -0
  165. package/lib/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js +23 -0
  166. package/lib/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js.map +1 -0
  167. package/lib/components/SankeyChart/SankeyChart.js +1022 -0
  168. package/lib/components/SankeyChart/SankeyChart.js.map +1 -0
  169. package/lib/components/SankeyChart/SankeyChart.types.js +3 -0
  170. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -0
  171. package/lib/components/SankeyChart/index.js +3 -0
  172. package/lib/components/SankeyChart/index.js.map +1 -0
  173. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +109 -0
  174. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -0
  175. package/lib/components/ScatterChart/ScatterChart.js +465 -0
  176. package/lib/components/ScatterChart/ScatterChart.js.map +1 -0
  177. package/lib/components/ScatterChart/ScatterChart.types.js +4 -0
  178. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -0
  179. package/lib/components/ScatterChart/index.js +3 -0
  180. package/lib/components/ScatterChart/index.js.map +1 -0
  181. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +65 -0
  182. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -0
  183. package/lib/components/Sparkline/Sparkline.js +119 -0
  184. package/lib/components/Sparkline/Sparkline.js.map +1 -0
  185. package/lib/components/Sparkline/Sparkline.types.js +4 -0
  186. package/lib/components/Sparkline/Sparkline.types.js.map +1 -0
  187. package/lib/components/Sparkline/index.js +3 -0
  188. package/lib/components/Sparkline/index.js.map +1 -0
  189. package/lib/components/Sparkline/useSparklineStyles.styles.js +49 -0
  190. package/lib/components/Sparkline/useSparklineStyles.styles.js.map +1 -0
  191. package/lib/components/VerticalBarChart/VerticalBarChart.js +926 -0
  192. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -0
  193. package/lib/components/VerticalBarChart/VerticalBarChart.types.js +4 -0
  194. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -0
  195. package/lib/components/VerticalBarChart/index.js +3 -0
  196. package/lib/components/VerticalBarChart/index.js.map +1 -0
  197. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +74 -0
  198. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -0
  199. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +904 -0
  200. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -0
  201. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +1 -0
  202. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -0
  203. package/lib/components/VerticalStackedBarChart/index.js +3 -0
  204. package/lib/components/VerticalStackedBarChart/index.js.map +1 -0
  205. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +73 -0
  206. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -0
  207. package/lib/index.js +20 -0
  208. package/lib/index.js.map +1 -0
  209. package/lib/types/DataPoint.js +1 -0
  210. package/lib/types/DataPoint.js.map +1 -0
  211. package/lib/types/EventAnnotation.js +1 -0
  212. package/lib/types/EventAnnotation.js.map +1 -0
  213. package/lib/types/LegendDataItem.js +1 -0
  214. package/lib/types/LegendDataItem.js.map +1 -0
  215. package/lib/types/index.js +2 -0
  216. package/lib/types/index.js.map +1 -0
  217. package/lib/utilities/FocusableTooltipText.js +65 -0
  218. package/lib/utilities/FocusableTooltipText.js.map +1 -0
  219. package/lib/utilities/KeyCodes.js +8 -0
  220. package/lib/utilities/KeyCodes.js.map +1 -0
  221. package/lib/utilities/SVGTooltipText.js +183 -0
  222. package/lib/utilities/SVGTooltipText.js.map +1 -0
  223. package/lib/utilities/async-utils.js +380 -0
  224. package/lib/utilities/async-utils.js.map +1 -0
  225. package/lib/utilities/colors.js +269 -0
  226. package/lib/utilities/colors.js.map +1 -0
  227. package/lib/utilities/getWindow.js +25 -0
  228. package/lib/utilities/getWindow.js.map +1 -0
  229. package/lib/utilities/index.js +3 -0
  230. package/lib/utilities/index.js.map +1 -0
  231. package/lib/utilities/locale-util.js +15 -0
  232. package/lib/utilities/locale-util.js.map +1 -0
  233. package/lib/utilities/overflow-utils.js +27 -0
  234. package/lib/utilities/overflow-utils.js.map +1 -0
  235. package/lib/utilities/string.js +32 -0
  236. package/lib/utilities/string.js.map +1 -0
  237. package/lib/utilities/test-data.js +329 -0
  238. package/lib/utilities/test-data.js.map +1 -0
  239. package/lib/utilities/utilities.js +1405 -0
  240. package/lib/utilities/utilities.js.map +1 -0
  241. package/lib/utilities/vbc-utils.js +27 -0
  242. package/lib/utilities/vbc-utils.js.map +1 -0
  243. package/lib-commonjs/AreaChart.js +6 -0
  244. package/lib-commonjs/AreaChart.js.map +1 -0
  245. package/lib-commonjs/CartesianChart.js +6 -0
  246. package/lib-commonjs/CartesianChart.js.map +1 -0
  247. package/lib-commonjs/DeclarativeChart.js +6 -0
  248. package/lib-commonjs/DeclarativeChart.js.map +1 -0
  249. package/lib-commonjs/DonutChart.js +6 -0
  250. package/lib-commonjs/DonutChart.js.map +1 -0
  251. package/lib-commonjs/GaugeChart.js +6 -0
  252. package/lib-commonjs/GaugeChart.js.map +1 -0
  253. package/lib-commonjs/GroupedVerticalBarChart.js +6 -0
  254. package/lib-commonjs/GroupedVerticalBarChart.js.map +1 -0
  255. package/lib-commonjs/HeatMapChart.js +6 -0
  256. package/lib-commonjs/HeatMapChart.js.map +1 -0
  257. package/lib-commonjs/HorizontalBarChart.js +6 -0
  258. package/lib-commonjs/HorizontalBarChart.js.map +1 -0
  259. package/lib-commonjs/HorizontalBarChartWithAxis.js +6 -0
  260. package/lib-commonjs/HorizontalBarChartWithAxis.js.map +1 -0
  261. package/lib-commonjs/Legends.js +6 -0
  262. package/lib-commonjs/Legends.js.map +1 -0
  263. package/lib-commonjs/LineChart.js +6 -0
  264. package/lib-commonjs/LineChart.js.map +1 -0
  265. package/lib-commonjs/Popover.js +6 -0
  266. package/lib-commonjs/Popover.js.map +1 -0
  267. package/lib-commonjs/ResponsiveContainer.js +6 -0
  268. package/lib-commonjs/ResponsiveContainer.js.map +1 -0
  269. package/lib-commonjs/SankeyChart.js +6 -0
  270. package/lib-commonjs/SankeyChart.js.map +1 -0
  271. package/lib-commonjs/ScatterChart.js +6 -0
  272. package/lib-commonjs/ScatterChart.js.map +1 -0
  273. package/lib-commonjs/Sparkline.js +6 -0
  274. package/lib-commonjs/Sparkline.js.map +1 -0
  275. package/lib-commonjs/VerticalBarChart.js +6 -0
  276. package/lib-commonjs/VerticalBarChart.js.map +1 -0
  277. package/lib-commonjs/VerticalStackedBarChart.js +6 -0
  278. package/lib-commonjs/VerticalStackedBarChart.js.map +1 -0
  279. package/lib-commonjs/components/AreaChart/AreaChart.js +781 -0
  280. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -0
  281. package/lib-commonjs/components/AreaChart/AreaChart.types.js +7 -0
  282. package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +1 -0
  283. package/lib-commonjs/components/AreaChart/index.js +8 -0
  284. package/lib-commonjs/components/AreaChart/index.js.map +1 -0
  285. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +104 -0
  286. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -0
  287. package/lib-commonjs/components/CommonComponents/CartesianChart.js +484 -0
  288. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -0
  289. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js +6 -0
  290. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -0
  291. package/lib-commonjs/components/CommonComponents/ChartPopover.js +197 -0
  292. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -0
  293. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js +4 -0
  294. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +1 -0
  295. package/lib-commonjs/components/CommonComponents/index.js +9 -0
  296. package/lib-commonjs/components/CommonComponents/index.js.map +1 -0
  297. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +356 -0
  298. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -0
  299. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +261 -0
  300. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -0
  301. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +205 -0
  302. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
  303. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +859 -0
  304. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
  305. package/lib-commonjs/components/DeclarativeChart/imageExporter.js +231 -0
  306. package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -0
  307. package/lib-commonjs/components/DeclarativeChart/index.js +6 -0
  308. package/lib-commonjs/components/DeclarativeChart/index.js.map +1 -0
  309. package/lib-commonjs/components/DonutChart/Arc/Arc.js +117 -0
  310. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -0
  311. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js +4 -0
  312. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -0
  313. package/lib-commonjs/components/DonutChart/Arc/index.js +7 -0
  314. package/lib-commonjs/components/DonutChart/Arc/index.js.map +1 -0
  315. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +83 -0
  316. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -0
  317. package/lib-commonjs/components/DonutChart/DonutChart.js +298 -0
  318. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -0
  319. package/lib-commonjs/components/DonutChart/DonutChart.types.js +6 -0
  320. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -0
  321. package/lib-commonjs/components/DonutChart/Pie/Pie.js +79 -0
  322. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -0
  323. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js +4 -0
  324. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -0
  325. package/lib-commonjs/components/DonutChart/Pie/index.js +7 -0
  326. package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -0
  327. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +61 -0
  328. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -0
  329. package/lib-commonjs/components/DonutChart/index.js +8 -0
  330. package/lib-commonjs/components/DonutChart/index.js.map +1 -0
  331. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +82 -0
  332. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -0
  333. package/lib-commonjs/components/GaugeChart/GaugeChart.js +621 -0
  334. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -0
  335. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js +7 -0
  336. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -0
  337. package/lib-commonjs/components/GaugeChart/index.js +8 -0
  338. package/lib-commonjs/components/GaugeChart/index.js.map +1 -0
  339. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +252 -0
  340. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -0
  341. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +507 -0
  342. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -0
  343. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +7 -0
  344. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -0
  345. package/lib-commonjs/components/GroupedVerticalBarChart/index.js +8 -0
  346. package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +1 -0
  347. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +139 -0
  348. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -0
  349. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +599 -0
  350. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -0
  351. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js +7 -0
  352. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -0
  353. package/lib-commonjs/components/HeatMapChart/index.js +8 -0
  354. package/lib-commonjs/components/HeatMapChart/index.js.map +1 -0
  355. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +68 -0
  356. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -0
  357. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +408 -0
  358. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
  359. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +17 -0
  360. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -0
  361. package/lib-commonjs/components/HorizontalBarChart/index.js +8 -0
  362. package/lib-commonjs/components/HorizontalBarChart/index.js.map +1 -0
  363. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +251 -0
  364. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -0
  365. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +580 -0
  366. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -0
  367. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +7 -0
  368. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -0
  369. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js +8 -0
  370. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +1 -0
  371. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +116 -0
  372. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -0
  373. package/lib-commonjs/components/Legends/Legends.js +313 -0
  374. package/lib-commonjs/components/Legends/Legends.js.map +1 -0
  375. package/lib-commonjs/components/Legends/Legends.types.js +6 -0
  376. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -0
  377. package/lib-commonjs/components/Legends/OverflowMenu.js +36 -0
  378. package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -0
  379. package/lib-commonjs/components/Legends/index.js +8 -0
  380. package/lib-commonjs/components/Legends/index.js.map +1 -0
  381. package/lib-commonjs/components/Legends/shape.js +46 -0
  382. package/lib-commonjs/components/Legends/shape.js.map +1 -0
  383. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +304 -0
  384. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -0
  385. package/lib-commonjs/components/LineChart/LineChart.js +1040 -0
  386. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -0
  387. package/lib-commonjs/components/LineChart/LineChart.types.js +6 -0
  388. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -0
  389. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +129 -0
  390. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -0
  391. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +68 -0
  392. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -0
  393. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +51 -0
  394. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -0
  395. package/lib-commonjs/components/LineChart/index.js +9 -0
  396. package/lib-commonjs/components/LineChart/index.js.map +1 -0
  397. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +96 -0
  398. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -0
  399. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +76 -0
  400. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -0
  401. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js +6 -0
  402. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -0
  403. package/lib-commonjs/components/ResponsiveContainer/index.js +6 -0
  404. package/lib-commonjs/components/ResponsiveContainer/index.js.map +1 -0
  405. package/lib-commonjs/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js +47 -0
  406. package/lib-commonjs/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js.map +1 -0
  407. package/lib-commonjs/components/SankeyChart/SankeyChart.js +1038 -0
  408. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -0
  409. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js +6 -0
  410. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -0
  411. package/lib-commonjs/components/SankeyChart/index.js +8 -0
  412. package/lib-commonjs/components/SankeyChart/index.js.map +1 -0
  413. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +179 -0
  414. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -0
  415. package/lib-commonjs/components/ScatterChart/ScatterChart.js +471 -0
  416. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -0
  417. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +7 -0
  418. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -0
  419. package/lib-commonjs/components/ScatterChart/index.js +8 -0
  420. package/lib-commonjs/components/ScatterChart/index.js.map +1 -0
  421. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +96 -0
  422. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -0
  423. package/lib-commonjs/components/Sparkline/Sparkline.js +125 -0
  424. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -0
  425. package/lib-commonjs/components/Sparkline/Sparkline.types.js +7 -0
  426. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -0
  427. package/lib-commonjs/components/Sparkline/index.js +8 -0
  428. package/lib-commonjs/components/Sparkline/index.js.map +1 -0
  429. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +77 -0
  430. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +1 -0
  431. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +928 -0
  432. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -0
  433. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js +7 -0
  434. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -0
  435. package/lib-commonjs/components/VerticalBarChart/index.js +8 -0
  436. package/lib-commonjs/components/VerticalBarChart/index.js.map +1 -0
  437. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +117 -0
  438. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -0
  439. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +915 -0
  440. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -0
  441. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +6 -0
  442. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -0
  443. package/lib-commonjs/components/VerticalStackedBarChart/index.js +8 -0
  444. package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +1 -0
  445. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +120 -0
  446. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -0
  447. package/lib-commonjs/index.js +25 -0
  448. package/lib-commonjs/index.js.map +1 -0
  449. package/lib-commonjs/types/DataPoint.js +4 -0
  450. package/lib-commonjs/types/DataPoint.js.map +1 -0
  451. package/lib-commonjs/types/EventAnnotation.js +6 -0
  452. package/lib-commonjs/types/EventAnnotation.js.map +1 -0
  453. package/lib-commonjs/types/LegendDataItem.js +4 -0
  454. package/lib-commonjs/types/LegendDataItem.js.map +1 -0
  455. package/lib-commonjs/types/index.js +7 -0
  456. package/lib-commonjs/types/index.js.map +1 -0
  457. package/lib-commonjs/utilities/FocusableTooltipText.js +75 -0
  458. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -0
  459. package/lib-commonjs/utilities/KeyCodes.js +18 -0
  460. package/lib-commonjs/utilities/KeyCodes.js.map +1 -0
  461. package/lib-commonjs/utilities/SVGTooltipText.js +193 -0
  462. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -0
  463. package/lib-commonjs/utilities/async-utils.js +382 -0
  464. package/lib-commonjs/utilities/async-utils.js.map +1 -0
  465. package/lib-commonjs/utilities/colors.js +293 -0
  466. package/lib-commonjs/utilities/colors.js.map +1 -0
  467. package/lib-commonjs/utilities/getWindow.js +28 -0
  468. package/lib-commonjs/utilities/getWindow.js.map +1 -0
  469. package/lib-commonjs/utilities/index.js +8 -0
  470. package/lib-commonjs/utilities/index.js.map +1 -0
  471. package/lib-commonjs/utilities/locale-util.js +25 -0
  472. package/lib-commonjs/utilities/locale-util.js.map +1 -0
  473. package/lib-commonjs/utilities/overflow-utils.js +36 -0
  474. package/lib-commonjs/utilities/overflow-utils.js.map +1 -0
  475. package/lib-commonjs/utilities/string.js +29 -0
  476. package/lib-commonjs/utilities/string.js.map +1 -0
  477. package/lib-commonjs/utilities/test-data.js +383 -0
  478. package/lib-commonjs/utilities/test-data.js.map +1 -0
  479. package/lib-commonjs/utilities/utilities.js +1371 -0
  480. package/lib-commonjs/utilities/utilities.js.map +1 -0
  481. package/lib-commonjs/utilities/vbc-utils.js +45 -0
  482. package/lib-commonjs/utilities/vbc-utils.js.map +1 -0
  483. package/package.json +13 -13
@@ -0,0 +1,1040 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "LineChart", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return LineChart;
9
+ }
10
+ });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _useLineChartStylesstyles = require("./useLineChartStyles.styles");
14
+ const _d3selection = require("d3-selection");
15
+ const _d3array = require("d3-array");
16
+ const _index = require("../Legends/index");
17
+ const _d3shape = require("d3-shape");
18
+ const _reactutilities = require("@fluentui/react-utilities");
19
+ const _index1 = require("../../utilities/index");
20
+ const _index2 = require("../../index");
21
+ const _EventAnnotation = require("./eventAnnotation/EventAnnotation");
22
+ const _reacttheme = require("@fluentui/react-theme");
23
+ var PointSize;
24
+ (function(PointSize) {
25
+ PointSize[PointSize["hoverSize"] = 11] = "hoverSize";
26
+ PointSize[PointSize["invisibleSize"] = 1] = "invisibleSize";
27
+ })(PointSize || (PointSize = {}));
28
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
29
+ const bisect = (0, _d3array.bisector)((d)=>d.x).left;
30
+ const DEFAULT_LINE_STROKE_SIZE = 4;
31
+ // The given shape of a icon must be 2.5 times bigger than line width (known as stroke width)
32
+ const PATH_MULTIPLY_SIZE = 2.5;
33
+ /**
34
+ *
35
+ * @param x units from origin
36
+ * @param y units from origin
37
+ * @param w is the legnth of the each side of a shape
38
+ * @param index index to get the shape path
39
+ */ const _getPointPath = (x, y, w, index)=>{
40
+ const allPointPaths = [
41
+ // circle path
42
+ `M${x - w / 2} ${y}
43
+ A${w / 2} ${w / 2} 0 1 0 ${x + w / 2} ${y}
44
+ M${x - w / 2} ${y}
45
+ A ${w / 2} ${w / 2} 0 1 1 ${x + w / 2} ${y}
46
+ `,
47
+ //square
48
+ `M${x - w / 2} ${y - w / 2}
49
+ L${x + w / 2} ${y - w / 2}
50
+ L${x + w / 2} ${y + w / 2}
51
+ L${x - w / 2} ${y + w / 2}
52
+ Z`,
53
+ //triangle
54
+ `M${x - w / 2} ${y - 0.2886 * w}
55
+ H ${x + w / 2}
56
+ L${x} ${y + 0.5774 * w} Z`,
57
+ //diamond
58
+ `M${x} ${y - w / 2}
59
+ L${x + w / 2} ${y}
60
+ L${x} ${y + w / 2}
61
+ L${x - w / 2} ${y}
62
+ Z`,
63
+ //pyramid
64
+ `M${x} ${y - 0.5774 * w}
65
+ L${x + w / 2} ${y + 0.2886 * w}
66
+ L${x - w / 2} ${y + 0.2886 * w} Z`,
67
+ //hexagon
68
+ `M${x - 0.5 * w} ${y - 0.866 * w}
69
+ L${x + 0.5 * w} ${y - 0.866 * w}
70
+ L${x + w} ${y}
71
+ L${x + 0.5 * w} ${y + 0.866 * w}
72
+ L${x - 0.5 * w} ${y + 0.866 * w}
73
+ L${x - w} ${y}
74
+ Z`,
75
+ //pentagon
76
+ `M${x} ${y - 0.851 * w}
77
+ L${x + 0.6884 * w} ${y - 0.2633 * w}
78
+ L${x + 0.5001 * w} ${y + 0.6884 * w}
79
+ L${x - 0.5001 * w} ${y + 0.6884 * w}
80
+ L${x - 0.6884 * w} ${y - 0.2633 * w}
81
+ Z`,
82
+ //octagon
83
+ `M${x - 0.5001 * w} ${y - 1.207 * w}
84
+ L${x + 0.5001 * w} ${y - 1.207 * w}
85
+ L${x + 1.207 * w} ${y - 0.5001 * w}
86
+ L${x + 1.207 * w} ${y + 0.5001 * w}
87
+ L${x + 0.5001 * w} ${y + 1.207 * w}
88
+ L${x - 0.5001 * w} ${y + 1.207 * w}
89
+ L${x - 1.207 * w} ${y + 0.5001 * w}
90
+ L${x - 1.207 * w} ${y - 0.5001 * w}
91
+ Z`
92
+ ];
93
+ return allPointPaths[index];
94
+ };
95
+ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
96
+ var _props_legendProps_selectedLegends, _props_legendProps;
97
+ let _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);
98
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
99
+ let _calloutPoints = (0, _index1.calloutData)(_points) || [];
100
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
101
+ let _xAxisScale = '';
102
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
103
+ let _yAxisScale = '';
104
+ let _circleId = (0, _reactutilities.useId)('circle');
105
+ let _lineId = (0, _reactutilities.useId)('lineID');
106
+ let _borderId = (0, _reactutilities.useId)('borderID');
107
+ let _verticalLine = (0, _reactutilities.useId)('verticalLine');
108
+ let _colorFillBarPatternId = (0, _reactutilities.useId)('colorFillBarPattern');
109
+ let _uniqueCallOutID = '';
110
+ let _refArray = [];
111
+ let margins;
112
+ let eventLabelHeight = 36;
113
+ let lines;
114
+ let _renderedColorFillBars;
115
+ const _colorFillBars = _react.useRef([]);
116
+ let _tooltipId = (0, _reactutilities.useId)('LineChartTooltipId_');
117
+ let _rectId = (0, _reactutilities.useId)('containerRectLD');
118
+ let _staticHighlightCircle = (0, _reactutilities.useId)('staticHighlightCircle');
119
+ let _firstRenderOptimization = true;
120
+ let _emptyChartId = (0, _reactutilities.useId)('_LineChart_empty');
121
+ const _colorFillBarId = (0, _reactutilities.useId)('_colorFillBarId');
122
+ const _isRTL = (0, _index1.useRtl)();
123
+ let xAxisCalloutAccessibilityData = {};
124
+ const cartesianChartRef = _react.useRef(null);
125
+ props.eventAnnotationProps && props.eventAnnotationProps.labelHeight && (eventLabelHeight = props.eventAnnotationProps.labelHeight);
126
+ const [hoverXValue, setHoverXValue] = _react.useState('');
127
+ const [activeLegend, setActiveLegend] = _react.useState('');
128
+ const [YValueHover, setYValueHover] = _react.useState([]);
129
+ const [selectedLegend, setSelectedLegend] = _react.useState('');
130
+ const [selectedLegendPoints, setSelectedLegendPoints] = _react.useState(_injectIndexPropertyInLineChartData(props.data.lineChartData, true));
131
+ const [selectedColorBarLegend, setSelectedColorBarLegend] = _react.useState([]);
132
+ var _props_legendProps_selectedLegends_length;
133
+ const [isSelectedLegend, setIsSelectedLegend] = _react.useState(((_props_legendProps_selectedLegends_length = (_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : (_props_legendProps_selectedLegends = _props_legendProps.selectedLegends) === null || _props_legendProps_selectedLegends === void 0 ? void 0 : _props_legendProps_selectedLegends.length) !== null && _props_legendProps_selectedLegends_length !== void 0 ? _props_legendProps_selectedLegends_length : 0) > 0);
134
+ const [activePoint, setActivePoint] = _react.useState('');
135
+ const [nearestCircleToHighlight, setNearestCircleToHighlight] = _react.useState(null);
136
+ const [dataPointCalloutProps, setDataPointCalloutProps] = _react.useState();
137
+ const [stackCalloutProps, setStackCalloutProps] = _react.useState();
138
+ const [clickPosition, setClickPosition] = _react.useState({
139
+ x: 0,
140
+ y: 0
141
+ });
142
+ const [isPopoverOpen, setPopoverOpen] = _react.useState(false);
143
+ const pointsRef = _react.useRef([]);
144
+ const calloutPointsRef = _react.useRef([]);
145
+ _react.useEffect(()=>{
146
+ /** note that height and width are not used to resize or set as dimesions of the chart,
147
+ * fitParentContainer is responisble for setting the height and width or resizing of the svg/chart
148
+ */ if (_points !== _injectIndexPropertyInLineChartData(props.data.lineChartData) || props.data !== _points) {
149
+ pointsRef.current = _injectIndexPropertyInLineChartData(props.data.lineChartData);
150
+ calloutPointsRef.current = (0, _index1.calloutData)(pointsRef.current);
151
+ }
152
+ }, [
153
+ props.height,
154
+ props.width,
155
+ props.data
156
+ ]);
157
+ _react.useImperativeHandle(props.componentRef, ()=>{
158
+ var _cartesianChartRef_current;
159
+ var _cartesianChartRef_current_chartContainer;
160
+ return {
161
+ chartContainer: (_cartesianChartRef_current_chartContainer = (_cartesianChartRef_current = cartesianChartRef.current) === null || _cartesianChartRef_current === void 0 ? void 0 : _cartesianChartRef_current.chartContainer) !== null && _cartesianChartRef_current_chartContainer !== void 0 ? _cartesianChartRef_current_chartContainer : null
162
+ };
163
+ }, []);
164
+ function _injectIndexPropertyInLineChartData(lineChartData, isFilterSelectedLegends = false) {
165
+ const { allowMultipleShapesForPoints = false } = props;
166
+ // Apply filter only if isPropChange is true
167
+ const filteredData = isFilterSelectedLegends ? lineChartData === null || lineChartData === void 0 ? void 0 : lineChartData.filter((item)=>{
168
+ var _props_legendProps_selectedLegends, _props_legendProps, _props_legendProps1;
169
+ return ((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : (_props_legendProps_selectedLegends = _props_legendProps.selectedLegends) === null || _props_legendProps_selectedLegends === void 0 ? void 0 : _props_legendProps_selectedLegends.includes(item.legend)) || ((_props_legendProps1 = props.legendProps) === null || _props_legendProps1 === void 0 ? void 0 : _props_legendProps1.selectedLegend) === item.legend;
170
+ }) : lineChartData;
171
+ return filteredData ? filteredData.map((item, index)=>{
172
+ let color;
173
+ if (typeof item.color === 'undefined') {
174
+ color = (0, _index1.getNextColor)(index, 0);
175
+ } else {
176
+ color = (0, _index1.getColorFromToken)(item.color);
177
+ }
178
+ return {
179
+ ...item,
180
+ index: allowMultipleShapesForPoints ? index : -1,
181
+ color
182
+ };
183
+ }) : [];
184
+ }
185
+ function updatePosition(newX, newY) {
186
+ const threshold = 1; // Set a threshold for movement
187
+ const { x, y } = clickPosition;
188
+ // Calculate the distance moved
189
+ const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));
190
+ // Update the position only if the distance moved is greater than the threshold
191
+ if (distance > threshold) {
192
+ setClickPosition({
193
+ x: newX,
194
+ y: newY
195
+ });
196
+ setPopoverOpen(true);
197
+ }
198
+ }
199
+ function _getCustomizedCallout() {
200
+ return props.onRenderCalloutPerStack ? props.onRenderCalloutPerStack(stackCalloutProps) : props.onRenderCalloutPerDataPoint ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps) : null;
201
+ }
202
+ function _getMargins(_margins) {
203
+ margins = _margins;
204
+ }
205
+ function _initializeLineChartData(xScale, yScale, containerHeight, containerWidth, xElement) {
206
+ _xAxisScale = xScale;
207
+ _yAxisScale = yScale;
208
+ _renderedColorFillBars = props.colorFillBars ? _createColorFillBars(containerHeight) : [];
209
+ lines = _createLines(xElement, containerHeight);
210
+ }
211
+ function _handleSingleLegendSelectionAction(lineChartItem) {
212
+ if (selectedLegend === lineChartItem.legend) {
213
+ setSelectedLegend('');
214
+ _handleLegendClick(lineChartItem, null);
215
+ } else {
216
+ setSelectedLegend(lineChartItem.legend);
217
+ _handleLegendClick(lineChartItem, lineChartItem.legend);
218
+ }
219
+ }
220
+ function _onHoverCardHide() {
221
+ setSelectedLegendPoints([]);
222
+ setSelectedColorBarLegend([]);
223
+ setIsSelectedLegend(false);
224
+ }
225
+ function _handleLegendClick(lineChartItem, selectedLegend) {
226
+ if (lineChartItem.onLegendClick) {
227
+ lineChartItem.onLegendClick(selectedLegend);
228
+ }
229
+ }
230
+ function _createLegends(data) {
231
+ const { legendProps, allowMultipleShapesForPoints = false } = props;
232
+ const isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);
233
+ const legendDataItems = data.map((point)=>{
234
+ const color = point.color;
235
+ // mapping data to the format Legends component needs
236
+ const legend = {
237
+ title: point.legend,
238
+ color,
239
+ action: ()=>{
240
+ if (isLegendMultiSelectEnabled) {
241
+ _handleMultipleLineLegendSelectionAction(point);
242
+ } else {
243
+ _handleSingleLegendSelectionAction(point);
244
+ }
245
+ },
246
+ onMouseOutAction: ()=>{
247
+ setActiveLegend('');
248
+ },
249
+ hoverAction: ()=>{
250
+ _handleChartMouseLeave();
251
+ setActiveLegend(point.legend);
252
+ },
253
+ ...point.legendShape && {
254
+ shape: point.legendShape
255
+ },
256
+ ...allowMultipleShapesForPoints && {
257
+ shape: _index1.Points[point.index % Object.keys(_index1.pointTypes).length]
258
+ }
259
+ };
260
+ return legend;
261
+ });
262
+ const colorFillBarsLegendDataItems = props.colorFillBars ? props.colorFillBars.map((colorFillBar, index)=>{
263
+ const title = colorFillBar.legend;
264
+ const color = (0, _index1.getColorFromToken)(colorFillBar.color);
265
+ const legend = {
266
+ title,
267
+ color,
268
+ action: ()=>{
269
+ if (isLegendMultiSelectEnabled) {
270
+ _handleMultipleColorFillBarLegendSelectionAction(colorFillBar);
271
+ } else {
272
+ _handleSingleLegendSelectionAction(colorFillBar);
273
+ }
274
+ },
275
+ onMouseOutAction: ()=>{
276
+ setActiveLegend('');
277
+ },
278
+ hoverAction: ()=>{
279
+ _handleChartMouseLeave();
280
+ setActiveLegend(title);
281
+ },
282
+ opacity: _getColorFillBarOpacity(colorFillBar),
283
+ stripePattern: colorFillBar.applyPattern
284
+ };
285
+ return legend;
286
+ }) : [];
287
+ return /*#__PURE__*/ _react.createElement(_index.Legends, {
288
+ legends: [
289
+ ...legendDataItems,
290
+ ...colorFillBarsLegendDataItems
291
+ ],
292
+ enabledWrapLines: props.enabledLegendsWrapLines,
293
+ overflowText: props.legendsOverflowText,
294
+ ...isLegendMultiSelectEnabled && {
295
+ onLegendHoverCardLeave: _onHoverCardHide
296
+ },
297
+ ...props.legendProps
298
+ });
299
+ }
300
+ function _getBoxWidthOfShape(pointId, pointIndex, isLastPoint) {
301
+ const { allowMultipleShapesForPoints = false, strokeWidth = DEFAULT_LINE_STROKE_SIZE } = props;
302
+ if (allowMultipleShapesForPoints) {
303
+ if (activePoint === pointId) {
304
+ return 11;
305
+ } else if (pointIndex === 1 || isLastPoint) {
306
+ return strokeWidth * PATH_MULTIPLY_SIZE;
307
+ } else {
308
+ return 1;
309
+ }
310
+ } else {
311
+ if (activePoint === pointId) {
312
+ return 11;
313
+ } else {
314
+ return 1;
315
+ }
316
+ }
317
+ }
318
+ function _getPath(xPos, yPos, pointId, pointIndex, isLastPoint, pointOftheLine) {
319
+ const { allowMultipleShapesForPoints = false } = props;
320
+ let w = _getBoxWidthOfShape(pointId, pointIndex, isLastPoint);
321
+ const index = allowMultipleShapesForPoints ? pointOftheLine % Object.keys(_index1.pointTypes).length : 0;
322
+ const widthRatio = _index1.pointTypes[index].widthRatio;
323
+ w = widthRatio > 1 ? w / widthRatio : w;
324
+ return _getPointPath(xPos, yPos, w, index);
325
+ }
326
+ function _getPointFill(lineColor, pointId, pointIndex, isLastPoint) {
327
+ const { allowMultipleShapesForPoints = false } = props;
328
+ if (allowMultipleShapesForPoints) {
329
+ if (pointIndex === 1 || isLastPoint) {
330
+ if (activePoint === pointId) {
331
+ return _reacttheme.tokens.colorNeutralBackground1;
332
+ } else {
333
+ return lineColor;
334
+ }
335
+ } else {
336
+ if (activePoint === pointId) {
337
+ return _reacttheme.tokens.colorNeutralBackground1;
338
+ } else {
339
+ return lineColor;
340
+ }
341
+ }
342
+ } else {
343
+ if (activePoint === pointId) {
344
+ return _reacttheme.tokens.colorNeutralBackground1;
345
+ } else {
346
+ return lineColor;
347
+ }
348
+ }
349
+ }
350
+ function _createLines(xElement, containerHeight) {
351
+ const lines = [];
352
+ if (isSelectedLegend) {
353
+ _points = selectedLegendPoints;
354
+ } else {
355
+ _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);
356
+ }
357
+ for(let i = _points.length - 1; i >= 0; i--){
358
+ var _points_i_gaps, _points_i_lineOptions;
359
+ const linesForLine = [];
360
+ const bordersForLine = [];
361
+ const pointsForLine = [];
362
+ const legendVal = _points[i].legend;
363
+ const lineColor = _points[i].color;
364
+ const verticaLineHeight = containerHeight - margins.bottom + 6;
365
+ if (_points[i].data.length === 1) {
366
+ // eslint-disable-next-line @typescript-eslint/no-shadow
367
+ const { x: x1, y: y1, xAxisCalloutData, xAxisCalloutAccessibilityData } = _points[i].data[0];
368
+ const circleId = `${_circleId}_${i}`;
369
+ const isLegendSelected = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;
370
+ pointsForLine.push(/*#__PURE__*/ _react.createElement("circle", {
371
+ id: circleId,
372
+ key: circleId,
373
+ r: activePoint === circleId ? 5.5 : 3.5,
374
+ cx: _xAxisScale(x1),
375
+ cy: _yAxisScale(y1),
376
+ fill: activePoint === circleId ? _reacttheme.tokens.colorNeutralBackground1 : lineColor,
377
+ opacity: isLegendSelected ? 1 : 0.1,
378
+ tabIndex: _points[i].legend !== '' ? 0 : undefined,
379
+ onMouseOver: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event),
380
+ onMouseMove: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event),
381
+ onMouseOut: _handleMouseOut,
382
+ strokeWidth: activePoint === circleId ? DEFAULT_LINE_STROKE_SIZE : 0,
383
+ stroke: activePoint === circleId ? lineColor : '',
384
+ role: "img",
385
+ "aria-label": _getAriaLabel(i, 0),
386
+ "data-is-focusable": isLegendSelected,
387
+ ref: (e)=>{
388
+ _refCallback(e, circleId);
389
+ },
390
+ onFocus: ()=>_handleFocus(circleId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData),
391
+ onBlur: _handleMouseOut,
392
+ ..._getClickHandler(_points[i].data[0].onDataPointClick)
393
+ }));
394
+ }
395
+ let gapIndex = 0;
396
+ var _points_i_gaps_sort;
397
+ const gaps = (_points_i_gaps_sort = (_points_i_gaps = _points[i].gaps) === null || _points_i_gaps === void 0 ? void 0 : _points_i_gaps.sort((a, b)=>a.startIndex - b.startIndex)) !== null && _points_i_gaps_sort !== void 0 ? _points_i_gaps_sort : [];
398
+ const lineCurve = (_points_i_lineOptions = _points[i].lineOptions) === null || _points_i_lineOptions === void 0 ? void 0 : _points_i_lineOptions.curve;
399
+ // Use path rendering technique for larger datasets to optimize performance.
400
+ if ((props.optimizeLargeData || lineCurve) && _points[i].data.length > 1) {
401
+ var _points_i_lineOptions1;
402
+ const line = (0, _d3shape.line)() // eslint-disable-next-line @typescript-eslint/no-explicit-any
403
+ .x((d)=>_xAxisScale(d[0])) // eslint-disable-next-line @typescript-eslint/no-explicit-any
404
+ .y((d)=>_yAxisScale(d[1])).curve((0, _index1.getCurveFactory)(lineCurve));
405
+ const lineId = `${_lineId}_${i}`;
406
+ const borderId = `${_borderId}_${i}`;
407
+ const strokeWidth = ((_points_i_lineOptions1 = _points[i].lineOptions) === null || _points_i_lineOptions1 === void 0 ? void 0 : _points_i_lineOptions1.strokeWidth) || props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
408
+ const isLegendSelected = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;
409
+ const lineData = [];
410
+ for(let k = 0; k < _points[i].data.length; k++){
411
+ lineData.push([
412
+ _points[i].data[k].x instanceof Date ? _points[i].data[k].x.getTime() : _points[i].data[k].x,
413
+ _points[i].data[k].y
414
+ ]);
415
+ }
416
+ if (isLegendSelected) {
417
+ var _points_i_lineOptions2, _points_i_lineOptions3;
418
+ const lineBorderWidth = ((_points_i_lineOptions2 = _points[i].lineOptions) === null || _points_i_lineOptions2 === void 0 ? void 0 : _points_i_lineOptions2.lineBorderWidth) ? Number.parseFloat(_points[i].lineOptions.lineBorderWidth.toString()) : 0;
419
+ if (lineBorderWidth > 0) {
420
+ var _points_i_lineOptions4, _points_i_lineOptions5;
421
+ var _points_i_lineOptions_strokeLinecap;
422
+ bordersForLine.push(/*#__PURE__*/ _react.createElement("path", {
423
+ id: borderId,
424
+ key: borderId,
425
+ d: line(lineData),
426
+ fill: "transparent",
427
+ strokeLinecap: (_points_i_lineOptions_strokeLinecap = (_points_i_lineOptions4 = _points[i].lineOptions) === null || _points_i_lineOptions4 === void 0 ? void 0 : _points_i_lineOptions4.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap !== void 0 ? _points_i_lineOptions_strokeLinecap : 'round',
428
+ strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth,
429
+ stroke: ((_points_i_lineOptions5 = _points[i].lineOptions) === null || _points_i_lineOptions5 === void 0 ? void 0 : _points_i_lineOptions5.lineBorderColor) || _reacttheme.tokens.colorNeutralBackground1,
430
+ opacity: 1
431
+ }));
432
+ }
433
+ var _points_i_lineOptions_strokeLinecap1;
434
+ linesForLine.push(/*#__PURE__*/ _react.createElement("path", {
435
+ id: lineId,
436
+ key: lineId,
437
+ d: line(lineData),
438
+ fill: "transparent",
439
+ "data-is-focusable": true,
440
+ stroke: lineColor,
441
+ strokeWidth: strokeWidth,
442
+ strokeLinecap: (_points_i_lineOptions_strokeLinecap1 = (_points_i_lineOptions3 = _points[i].lineOptions) === null || _points_i_lineOptions3 === void 0 ? void 0 : _points_i_lineOptions3.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap1 !== void 0 ? _points_i_lineOptions_strokeLinecap1 : 'round',
443
+ onMouseMove: (event)=>_onMouseOverLargeDataset.bind(i, verticaLineHeight, event),
444
+ onMouseOver: (event)=>_onMouseOverLargeDataset.bind(i, verticaLineHeight, event),
445
+ onMouseOut: _handleMouseOut,
446
+ ..._getClickHandler(_points[i].onLineClick),
447
+ opacity: 1,
448
+ tabIndex: _points[i].legend !== '' ? 0 : undefined
449
+ }));
450
+ } else {
451
+ var _points_i_lineOptions6;
452
+ var _points_i_lineOptions_strokeLinecap2;
453
+ linesForLine.push(/*#__PURE__*/ _react.createElement("path", {
454
+ id: lineId,
455
+ key: lineId,
456
+ d: line(lineData),
457
+ fill: "transparent",
458
+ "data-is-focusable": false,
459
+ stroke: lineColor,
460
+ strokeWidth: strokeWidth,
461
+ strokeLinecap: (_points_i_lineOptions_strokeLinecap2 = (_points_i_lineOptions6 = _points[i].lineOptions) === null || _points_i_lineOptions6 === void 0 ? void 0 : _points_i_lineOptions6.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap2 !== void 0 ? _points_i_lineOptions_strokeLinecap2 : 'round',
462
+ opacity: 0.1
463
+ }));
464
+ }
465
+ pointsForLine.push(/*#__PURE__*/ _react.createElement("circle", {
466
+ id: `${_staticHighlightCircle}_${i}`,
467
+ key: `${_staticHighlightCircle}_${i}`,
468
+ r: 5.5,
469
+ cx: 0,
470
+ cy: 0,
471
+ fill: _reacttheme.tokens.colorNeutralBackground1,
472
+ strokeWidth: DEFAULT_LINE_STROKE_SIZE,
473
+ stroke: lineColor,
474
+ visibility: 'hidden',
475
+ onMouseMove: (event)=>_onMouseOverLargeDataset.bind(i, verticaLineHeight, event),
476
+ onMouseOver: (event)=>_onMouseOverLargeDataset.bind(i, verticaLineHeight, event),
477
+ onMouseOut: _handleMouseOut
478
+ }));
479
+ } else if (!props.optimizeLargeData) {
480
+ for(let j = 1; j < _points[i].data.length; j++){
481
+ var _points_i_lineOptions7;
482
+ const gapResult = _checkInGap(j, gaps, gapIndex);
483
+ const isInGap = gapResult.isInGap;
484
+ gapIndex = gapResult.gapIndex;
485
+ const lineId = `${_lineId}_${i}_${j}`;
486
+ const borderId = `${_borderId}_${i}_${j}`;
487
+ const circleId = `${_circleId}_${i}_${j}`;
488
+ const { x: x1, y: y1, xAxisCalloutData, xAxisCalloutAccessibilityData } = _points[i].data[j - 1];
489
+ const { x: x2, y: y2 } = _points[i].data[j];
490
+ let path = _getPath(_xAxisScale(x1), _yAxisScale(y1), circleId, j, false, _points[i].index);
491
+ const strokeWidth = ((_points_i_lineOptions7 = _points[i].lineOptions) === null || _points_i_lineOptions7 === void 0 ? void 0 : _points_i_lineOptions7.strokeWidth) || props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
492
+ const isLegendSelected = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;
493
+ const currentPointHidden = _points[i].hideNonActiveDots && activePoint !== circleId;
494
+ pointsForLine.push(/*#__PURE__*/ _react.createElement("path", {
495
+ id: circleId,
496
+ key: circleId,
497
+ d: path,
498
+ "data-is-focusable": isLegendSelected,
499
+ onMouseOver: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event),
500
+ onMouseMove: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event),
501
+ onMouseOut: _handleMouseOut,
502
+ onFocus: ()=>_handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData),
503
+ onBlur: _handleMouseOut,
504
+ ..._getClickHandler(_points[i].data[j - 1].onDataPointClick),
505
+ opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01,
506
+ fill: _getPointFill(lineColor, circleId, j, false),
507
+ stroke: lineColor,
508
+ strokeWidth: strokeWidth,
509
+ role: "img",
510
+ "aria-label": _getAriaLabel(i, j - 1),
511
+ tabIndex: _points[i].legend !== '' ? 0 : undefined
512
+ }));
513
+ if (j + 1 === _points[i].data.length) {
514
+ // If this is last point of the line segment.
515
+ const lastCircleId = `${circleId}${j}L`;
516
+ const hiddenHoverCircleId = `${circleId}${j}D`;
517
+ const lastPointHidden = _points[i].hideNonActiveDots && activePoint !== lastCircleId;
518
+ path = _getPath(_xAxisScale(x2), _yAxisScale(y2), lastCircleId, j, true, _points[i].index);
519
+ const { xAxisCalloutData: lastCirlceXCallout, xAxisCalloutAccessibilityData: lastCirlceXCalloutAccessibilityData } = _points[i].data[j];
520
+ pointsForLine.push(/*#__PURE__*/ _react.createElement(_react.Fragment, {
521
+ key: `${lastCircleId}_container`
522
+ }, /*#__PURE__*/ _react.createElement("path", {
523
+ id: lastCircleId,
524
+ key: lastCircleId,
525
+ d: path,
526
+ "data-is-focusable": isLegendSelected,
527
+ onMouseOver: (event)=>_handleHover(x2, y2, verticaLineHeight, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData, event),
528
+ onMouseMove: (event)=>_handleHover(x2, y2, verticaLineHeight, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData, event),
529
+ onMouseOut: _handleMouseOut,
530
+ onFocus: ()=>_handleFocus(lineId, x2, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData),
531
+ onBlur: _handleMouseOut,
532
+ ..._getClickHandler(_points[i].data[j].onDataPointClick),
533
+ opacity: isLegendSelected && !lastPointHidden ? 1 : 0.01,
534
+ fill: _getPointFill(lineColor, lastCircleId, j, true),
535
+ stroke: lineColor,
536
+ strokeWidth: strokeWidth,
537
+ role: "img",
538
+ "aria-label": _getAriaLabel(i, j),
539
+ tabIndex: _points[i].legend !== '' ? 0 : undefined
540
+ }), /*#__PURE__*/ _react.createElement("circle", {
541
+ id: hiddenHoverCircleId,
542
+ key: hiddenHoverCircleId,
543
+ r: 8,
544
+ cx: _xAxisScale(x2),
545
+ cy: _yAxisScale(y2),
546
+ opacity: 0,
547
+ width: 0,
548
+ onMouseOver: (event)=>_handleHover(x2, y2, verticaLineHeight, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData, event),
549
+ onMouseMove: (event)=>_handleHover(x2, y2, verticaLineHeight, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData, event),
550
+ onMouseOut: _handleMouseOut,
551
+ strokeWidth: 0,
552
+ focusable: false,
553
+ onBlur: _handleMouseOut
554
+ })));
555
+ /* eslint-enable react/jsx-no-bind */ }
556
+ if (isLegendSelected) {
557
+ // don't draw line if it is in a gap
558
+ if (!isInGap) {
559
+ var _points_i_lineOptions8, _points_i_lineOptions9, _points_i_lineOptions10, _points_i_lineOptions11;
560
+ const lineBorderWidth = ((_points_i_lineOptions8 = _points[i].lineOptions) === null || _points_i_lineOptions8 === void 0 ? void 0 : _points_i_lineOptions8.lineBorderWidth) ? Number.parseFloat(_points[i].lineOptions.lineBorderWidth.toString()) : 0;
561
+ if (lineBorderWidth > 0) {
562
+ var _points_i_lineOptions12, _points_i_lineOptions13;
563
+ var _points_i_lineOptions_strokeLinecap3;
564
+ bordersForLine.push(/*#__PURE__*/ _react.createElement("line", {
565
+ id: borderId,
566
+ key: borderId,
567
+ x1: _xAxisScale(x1),
568
+ y1: _yAxisScale(y1),
569
+ x2: _xAxisScale(x2),
570
+ y2: _yAxisScale(y2),
571
+ strokeLinecap: (_points_i_lineOptions_strokeLinecap3 = (_points_i_lineOptions12 = _points[i].lineOptions) === null || _points_i_lineOptions12 === void 0 ? void 0 : _points_i_lineOptions12.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap3 !== void 0 ? _points_i_lineOptions_strokeLinecap3 : 'round',
572
+ strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth,
573
+ stroke: ((_points_i_lineOptions13 = _points[i].lineOptions) === null || _points_i_lineOptions13 === void 0 ? void 0 : _points_i_lineOptions13.lineBorderColor) || _reacttheme.tokens.colorNeutralBackground1,
574
+ opacity: 1
575
+ }));
576
+ }
577
+ var _points_i_lineOptions_strokeLinecap4;
578
+ linesForLine.push(/*#__PURE__*/ _react.createElement("line", {
579
+ id: lineId,
580
+ key: lineId,
581
+ x1: _xAxisScale(x1),
582
+ y1: _yAxisScale(y1),
583
+ x2: _xAxisScale(x2),
584
+ y2: _yAxisScale(y2),
585
+ strokeWidth: strokeWidth,
586
+ ref: (e)=>{
587
+ _refCallback(e, lineId);
588
+ },
589
+ onMouseOver: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event),
590
+ onMouseMove: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event),
591
+ onMouseOut: _handleMouseOut,
592
+ stroke: lineColor,
593
+ strokeLinecap: (_points_i_lineOptions_strokeLinecap4 = (_points_i_lineOptions9 = _points[i].lineOptions) === null || _points_i_lineOptions9 === void 0 ? void 0 : _points_i_lineOptions9.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap4 !== void 0 ? _points_i_lineOptions_strokeLinecap4 : 'round',
594
+ strokeDasharray: (_points_i_lineOptions10 = _points[i].lineOptions) === null || _points_i_lineOptions10 === void 0 ? void 0 : _points_i_lineOptions10.strokeDasharray,
595
+ strokeDashoffset: (_points_i_lineOptions11 = _points[i].lineOptions) === null || _points_i_lineOptions11 === void 0 ? void 0 : _points_i_lineOptions11.strokeDashoffset,
596
+ opacity: 1,
597
+ ..._getClickHandler(_points[i].onLineClick)
598
+ }));
599
+ }
600
+ } else {
601
+ if (!isInGap) {
602
+ var _points_i_lineOptions14, _points_i_lineOptions15, _points_i_lineOptions16;
603
+ var _points_i_lineOptions_strokeLinecap5;
604
+ linesForLine.push(/*#__PURE__*/ _react.createElement("line", {
605
+ id: lineId,
606
+ key: lineId,
607
+ x1: _xAxisScale(x1),
608
+ y1: _yAxisScale(y1),
609
+ x2: _xAxisScale(x2),
610
+ y2: _yAxisScale(y2),
611
+ strokeWidth: strokeWidth,
612
+ stroke: lineColor,
613
+ strokeLinecap: (_points_i_lineOptions_strokeLinecap5 = (_points_i_lineOptions14 = _points[i].lineOptions) === null || _points_i_lineOptions14 === void 0 ? void 0 : _points_i_lineOptions14.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap5 !== void 0 ? _points_i_lineOptions_strokeLinecap5 : 'round',
614
+ strokeDasharray: (_points_i_lineOptions15 = _points[i].lineOptions) === null || _points_i_lineOptions15 === void 0 ? void 0 : _points_i_lineOptions15.strokeDasharray,
615
+ strokeDashoffset: (_points_i_lineOptions16 = _points[i].lineOptions) === null || _points_i_lineOptions16 === void 0 ? void 0 : _points_i_lineOptions16.strokeDashoffset,
616
+ opacity: 0.1
617
+ }));
618
+ }
619
+ }
620
+ }
621
+ }
622
+ lines.push(/*#__PURE__*/ _react.createElement("g", {
623
+ key: `line_${i}`,
624
+ role: "region",
625
+ "aria-label": `${legendVal}, line ${i + 1} of ${_points.length} with ${_points[i].data.length} data points.`
626
+ }, bordersForLine, linesForLine, pointsForLine));
627
+ }
628
+ const classes = (0, _useLineChartStylesstyles.useLineChartStyles)(props);
629
+ // Removing un wanted tooltip div from DOM, when prop not provided.
630
+ if (!props.showXAxisLablesTooltip) {
631
+ try {
632
+ document.getElementById(_tooltipId) && document.getElementById(_tooltipId).remove();
633
+ // eslint-disable-next-line no-empty
634
+ } catch (e) {}
635
+ }
636
+ // Used to display tooltip at x axis labels.
637
+ if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {
638
+ const xAxisElement = (0, _d3selection.select)(xElement).call(_xAxisScale);
639
+ try {
640
+ document.getElementById(_tooltipId) && document.getElementById(_tooltipId).remove();
641
+ // eslint-disable-next-line no-empty
642
+ } catch (e) {}
643
+ const tooltipProps = {
644
+ tooltipCls: classes.tooltip,
645
+ id: _tooltipId,
646
+ xAxis: xAxisElement
647
+ };
648
+ xAxisElement && (0, _index1.tooltipOfXAxislabels)(tooltipProps);
649
+ }
650
+ return lines;
651
+ }
652
+ function _createColorFillBars(containerHeight) {
653
+ const colorFillBars = [];
654
+ if (isSelectedLegend) {
655
+ _colorFillBars.current = selectedColorBarLegend;
656
+ } else {
657
+ _colorFillBars.current = props.colorFillBars;
658
+ }
659
+ const yMinMaxValues = (0, _index1.getMinMaxOfYAxis)(_points, _index1.ChartTypes.LineChart);
660
+ const FILL_Y_PADDING = 3;
661
+ for(let i = 0; i < _colorFillBars.current.length; i++){
662
+ const colorFillBar = _colorFillBars.current[i];
663
+ const colorFillBarId = `${_colorFillBarId}-${i}`;
664
+ const color = (0, _index1.getColorFromToken)(colorFillBar.color);
665
+ if (colorFillBar.applyPattern) {
666
+ // Using a pattern element because CSS was unable to render diagonal stripes for rect elements
667
+ colorFillBars.push(_getStripePattern(color, i));
668
+ }
669
+ for(let j = 0; j < colorFillBar.data.length; j++){
670
+ const startX = colorFillBar.data[j].startX;
671
+ const endX = colorFillBar.data[j].endX;
672
+ const opacity = _legendHighlighted(colorFillBar.legend) || _noLegendHighlighted() || isSelectedLegend ? _getColorFillBarOpacity(colorFillBar) : 0.1;
673
+ colorFillBars.push(/*#__PURE__*/ _react.createElement("rect", {
674
+ fill: colorFillBar.applyPattern ? `url(#${_colorFillBarPatternId}_${i})` : color,
675
+ fillOpacity: opacity,
676
+ x: _isRTL ? _xAxisScale(endX) : _xAxisScale(startX),
677
+ y: _yAxisScale(yMinMaxValues.endValue) - FILL_Y_PADDING,
678
+ width: Math.abs(_xAxisScale(endX) - _xAxisScale(startX)),
679
+ height: _yAxisScale(props.yMinValue || 0) - _yAxisScale(yMinMaxValues.endValue) + FILL_Y_PADDING,
680
+ key: `${colorFillBarId}${j}`
681
+ }));
682
+ }
683
+ }
684
+ return colorFillBars;
685
+ }
686
+ function _getStripePattern(color, id) {
687
+ // This describes a tile pattern that resembles diagonal stripes
688
+ // For more information: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d
689
+ const stripePath = 'M-4,4 l8,-8 M0,16 l16,-16 M12,20 l8,-8';
690
+ return /*#__PURE__*/ _react.createElement("pattern", {
691
+ id: `${_colorFillBarPatternId}_${id}`,
692
+ width: 16,
693
+ height: 16,
694
+ key: `${_colorFillBarPatternId}_${id}`,
695
+ patternUnits: 'userSpaceOnUse'
696
+ }, /*#__PURE__*/ _react.createElement("path", {
697
+ d: stripePath,
698
+ stroke: color,
699
+ strokeWidth: 1.25
700
+ }));
701
+ }
702
+ function _checkInGap(pointIndex, gaps, currentGapIndex) {
703
+ let gapIndex = currentGapIndex;
704
+ let isInGap = false;
705
+ while(gapIndex < gaps.length && pointIndex > gaps[gapIndex].endIndex){
706
+ gapIndex++;
707
+ }
708
+ if (gapIndex < gaps.length && pointIndex > gaps[gapIndex].startIndex && pointIndex <= gaps[gapIndex].endIndex) {
709
+ isInGap = true;
710
+ }
711
+ return {
712
+ isInGap,
713
+ gapIndex
714
+ };
715
+ }
716
+ function _refCallback(element, legendTitle) {
717
+ _refArray.push({
718
+ index: legendTitle,
719
+ refElement: element
720
+ });
721
+ }
722
+ const _onMouseOverLargeDataset = (linenumber, lineHeight, mouseEvent)=>{
723
+ mouseEvent.persist();
724
+ const { data } = props;
725
+ const { lineChartData } = data;
726
+ // This will get the value of the X when mouse is on the chart
727
+ const xOffset = _xAxisScale.invert((0, _d3selection.pointer)(mouseEvent)[0], document.getElementById(_rectId));
728
+ const i = bisect(lineChartData[linenumber].data, xOffset);
729
+ const d0 = lineChartData[linenumber].data[i - 1];
730
+ const d1 = lineChartData[linenumber].data[i];
731
+ let axisType = null;
732
+ let xPointToHighlight = 0;
733
+ let index = null;
734
+ if (d0 === undefined && d1 !== undefined) {
735
+ xPointToHighlight = d1.x;
736
+ index = i;
737
+ } else if (d0 !== undefined && d1 === undefined) {
738
+ xPointToHighlight = d0.x;
739
+ index = i - 1;
740
+ } else {
741
+ axisType = (0, _index1.getTypeOfAxis)(lineChartData[linenumber].data[0].x, true);
742
+ let x0;
743
+ let point0;
744
+ let point1;
745
+ switch(axisType){
746
+ case _index1.XAxisTypes.DateAxis:
747
+ x0 = new Date(xOffset).getTime();
748
+ point0 = d0.x.getTime();
749
+ point1 = d1.x.getTime();
750
+ xPointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;
751
+ index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;
752
+ break;
753
+ case _index1.XAxisTypes.NumericAxis:
754
+ x0 = xOffset;
755
+ point0 = d0.x;
756
+ point1 = d1.x;
757
+ xPointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;
758
+ index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;
759
+ break;
760
+ default:
761
+ break;
762
+ }
763
+ }
764
+ const { xAxisCalloutData } = lineChartData[linenumber].data[index];
765
+ const formattedDate = xPointToHighlight instanceof Date ? (0, _index1.formatDate)(xPointToHighlight, props.useUTC) : xPointToHighlight;
766
+ const modifiedXVal = xPointToHighlight instanceof Date ? xPointToHighlight.getTime() : xPointToHighlight;
767
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
768
+ const found = (0, _index1.find)(_calloutPoints, (element)=>{
769
+ return element.x === modifiedXVal;
770
+ });
771
+ const pointToHighlight = lineChartData[linenumber].data[index];
772
+ const pointToHighlightUpdated = nearestCircleToHighlight === null || nearestCircleToHighlight !== null && pointToHighlight !== null && (nearestCircleToHighlight.x !== pointToHighlight.x || nearestCircleToHighlight.y !== pointToHighlight.y);
773
+ // if no points need to be called out then don't show vertical line and callout card
774
+ if (found && pointToHighlightUpdated) {
775
+ _uniqueCallOutID = `#${_staticHighlightCircle}_${linenumber}`;
776
+ (0, _d3selection.select)(`#${_staticHighlightCircle}_${linenumber}`).attr('cx', `${_xAxisScale(pointToHighlight.x)}`).attr('cy', `${_yAxisScale(pointToHighlight.y)}`).attr('visibility', 'visibility');
777
+ (0, _d3selection.select)(`#${_verticalLine}`).attr('transform', ()=>`translate(${_xAxisScale(pointToHighlight.x)}, ${_yAxisScale(pointToHighlight.y)})`).attr('visibility', 'visibility').attr('y2', `${lineHeight - 5 - _yAxisScale(pointToHighlight.y)}`);
778
+ setNearestCircleToHighlight(pointToHighlight);
779
+ updatePosition(mouseEvent.clientX, mouseEvent.clientY);
780
+ setStackCalloutProps(found);
781
+ setYValueHover(found.values);
782
+ setDataPointCalloutProps(found);
783
+ xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue(formattedDate);
784
+ setActivePoint('');
785
+ }
786
+ if (!found) {
787
+ setPopoverOpen(false);
788
+ setNearestCircleToHighlight(pointToHighlight);
789
+ setActivePoint('');
790
+ }
791
+ };
792
+ function _handleFocus(lineId, x, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData) {
793
+ _uniqueCallOutID = circleId;
794
+ const formattedData = x instanceof Date ? (0, _index1.formatDate)(x, props.useUTC) : x;
795
+ const xVal = x instanceof Date ? x.getTime() : x;
796
+ const found = (0, _index1.find)(_calloutPoints, (element)=>element.x === xVal);
797
+ // if no points need to be called out then don't show vertical line and callout card
798
+ if (found) {
799
+ (0, _d3selection.select)(`#${_verticalLine}`).attr('transform', ()=>`translate(${_xAxisScale(x)}, 0)`).attr('visibility', 'visibility');
800
+ _refArray.forEach((obj)=>{
801
+ if (obj.index === lineId) {
802
+ setPopoverOpen(true);
803
+ xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);
804
+ setYValueHover(found.values);
805
+ setStackCalloutProps(found);
806
+ setDataPointCalloutProps(found);
807
+ setActivePoint(circleId);
808
+ }
809
+ });
810
+ } else {
811
+ setActivePoint(circleId);
812
+ }
813
+ }
814
+ function _handleHover(x, y, lineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, mouseEvent) {
815
+ mouseEvent === null || mouseEvent === void 0 ? void 0 : mouseEvent.persist();
816
+ const formattedData = x instanceof Date ? (0, _index1.formatDate)(x, props.useUTC) : x;
817
+ const xVal = x instanceof Date ? x.getTime() : x;
818
+ const found = (0, _index1.find)(_calloutPoints, (element)=>element.x === xVal);
819
+ // if no points need to be called out then don't show vertical line and callout card
820
+ if (found) {
821
+ (0, _d3selection.select)(`#${_verticalLine}`).attr('transform', ()=>`translate(${_xAxisScale(x)}, ${_yAxisScale(y)})`).attr('visibility', 'visibility').attr('y2', `${lineHeight - 5 - _yAxisScale(y)}`);
822
+ if (_uniqueCallOutID !== circleId) {
823
+ _uniqueCallOutID = circleId;
824
+ updatePosition(mouseEvent.clientX, mouseEvent.clientY);
825
+ xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);
826
+ setYValueHover(found.values);
827
+ setStackCalloutProps(found);
828
+ setDataPointCalloutProps(found);
829
+ setActivePoint(circleId);
830
+ setNearestCircleToHighlight(null);
831
+ }
832
+ } else {
833
+ setActivePoint(circleId);
834
+ setNearestCircleToHighlight(null);
835
+ }
836
+ }
837
+ /**
838
+ * Screen readers announce an element as clickable if the onClick attribute is set.
839
+ * This function sets the attribute only when a click event handler is provided.*/ function _getClickHandler(func) {
840
+ if (func) {
841
+ return {
842
+ onClick: func
843
+ };
844
+ }
845
+ return {};
846
+ }
847
+ function _handleMouseOut() {
848
+ (0, _d3selection.select)(`#${_verticalLine}`).attr('visibility', 'hidden');
849
+ }
850
+ function _handleChartMouseLeave() {
851
+ _uniqueCallOutID = null;
852
+ setActivePoint('');
853
+ if (isPopoverOpen) {
854
+ setPopoverOpen(false);
855
+ }
856
+ }
857
+ function _handleMultipleLineLegendSelectionAction(selectedLine) {
858
+ const selectedLineIndex = selectedLegendPoints.reduce((acc, line, index)=>{
859
+ if (acc > -1 || line.legend !== selectedLine.legend) {
860
+ return acc;
861
+ } else {
862
+ return index;
863
+ }
864
+ }, -1);
865
+ let selectedLines;
866
+ if (selectedLineIndex === -1) {
867
+ selectedLines = [
868
+ ...selectedLegendPoints,
869
+ selectedLine
870
+ ];
871
+ } else {
872
+ selectedLines = selectedLegendPoints.slice(0, selectedLineIndex).concat(selectedLegendPoints.slice(selectedLineIndex + 1));
873
+ }
874
+ const areAllLineLegendsSelected = props.data && selectedLines.length === props.data.lineChartData.length;
875
+ if (areAllLineLegendsSelected && (props.colorFillBars && props.colorFillBars.length === selectedColorBarLegend.length || !props.colorFillBars)) {
876
+ // Clear all legends if all legends including color fill bar legends are selected
877
+ // Or clear all legends if all legends are selected and there are no color fill bars
878
+ _clearMultipleLegendSelections();
879
+ } else if (!selectedLines.length && !selectedColorBarLegend.length) {
880
+ // Clear all legends if no legends including color fill bar legends are selected
881
+ _clearMultipleLegendSelections();
882
+ } else {
883
+ // Otherwise, set state when one or more legends are selected, including color fill bar legends
884
+ setSelectedLegendPoints(selectedLines);
885
+ setIsSelectedLegend(true);
886
+ }
887
+ const selectedLegendTitlesToPass = selectedLines.map((line)=>line.legend);
888
+ _handleLegendClick(selectedLine, selectedLegendTitlesToPass);
889
+ }
890
+ function _handleMultipleColorFillBarLegendSelectionAction(selectedColorFillBar) {
891
+ const selectedColorFillBarIndex = selectedColorBarLegend.reduce((acc, colorFillBar, index)=>{
892
+ if (acc > -1 || colorFillBar.legend !== selectedColorFillBar.legend) {
893
+ return acc;
894
+ } else {
895
+ return index;
896
+ }
897
+ }, -1);
898
+ let selectedColorFillBars;
899
+ if (selectedColorFillBarIndex === -1) {
900
+ selectedColorFillBars = [
901
+ ...selectedColorBarLegend,
902
+ selectedColorFillBar
903
+ ];
904
+ } else {
905
+ selectedColorFillBars = selectedColorBarLegend.slice(0, selectedColorFillBarIndex).concat(selectedColorBarLegend.slice(selectedColorFillBarIndex + 1));
906
+ }
907
+ const areAllColorFillBarLegendsSelected = selectedColorFillBars.length === (props.colorFillBars && props.colorFillBars.length);
908
+ if (areAllColorFillBarLegendsSelected && (props.data && props.data.lineChartData.length === selectedLegendPoints.length || !props.data)) {
909
+ // Clear all legends if all legends, including line legends, are selected
910
+ // Or clear all legends if all legends are selected and there is no line data
911
+ _clearMultipleLegendSelections();
912
+ } else if (!selectedColorFillBars.length && !selectedLegendPoints.length) {
913
+ // Clear all legends if no legends are selected, including line legends
914
+ _clearMultipleLegendSelections();
915
+ } else {
916
+ // set state when one or more legends are selected, including line legends
917
+ setSelectedColorBarLegend(selectedColorFillBars);
918
+ setIsSelectedLegend(true);
919
+ }
920
+ const selectedLegendTitlesToPass = selectedColorFillBars.map((colorFillBar)=>colorFillBar.legend);
921
+ _handleLegendClick(selectedColorFillBar, selectedLegendTitlesToPass);
922
+ }
923
+ function _clearMultipleLegendSelections() {
924
+ setSelectedColorBarLegend([]);
925
+ setSelectedLegendPoints([]);
926
+ setIsSelectedLegend(false);
927
+ }
928
+ /**
929
+ * This function checks if the given legend is highlighted or not.
930
+ * A legend can be highlighted in 2 ways:
931
+ * 1. selection: if the user clicks on it
932
+ * 2. hovering: if there is no selected legend and the user hovers over it*/ function _legendHighlighted(legend) {
933
+ return selectedLegend === legend || selectedLegend === '' && activeLegend === legend;
934
+ }
935
+ /**
936
+ * This function checks if none of the legends is selected or hovered.*/ function _noLegendHighlighted() {
937
+ return selectedLegend === '' && activeLegend === '';
938
+ }
939
+ function _getColorFillBarOpacity(colorFillBar) {
940
+ return colorFillBar.applyPattern ? 1 : 0.4;
941
+ }
942
+ function _getAriaLabel(lineIndex, pointIndex) {
943
+ var _point_callOutAccessibilityData;
944
+ const line = _points[lineIndex];
945
+ const point = line.data[pointIndex];
946
+ const formattedDate = point.x instanceof Date ? (0, _index1.formatDate)(point.x, props.useUTC) : point.x;
947
+ const xValue = point.xAxisCalloutData || formattedDate;
948
+ const legend = line.legend;
949
+ const yValue = point.yAxisCalloutData || point.y;
950
+ return ((_point_callOutAccessibilityData = point.callOutAccessibilityData) === null || _point_callOutAccessibilityData === void 0 ? void 0 : _point_callOutAccessibilityData.ariaLabel) || `${xValue}. ${legend}, ${yValue}.`;
951
+ }
952
+ function _isChartEmpty() {
953
+ return !(props.data && props.data.lineChartData && props.data.lineChartData.length > 0 && props.data.lineChartData.filter((item)=>item.data.length).length > 0);
954
+ }
955
+ const { legendProps, tickValues, tickFormat, eventAnnotationProps } = props;
956
+ _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);
957
+ const isXAxisDateType = (0, _index1.getXAxisType)(_points);
958
+ let points = _points;
959
+ if (legendProps && !!legendProps.canSelectMultipleLegends) {
960
+ points = selectedLegendPoints.length >= 1 ? selectedLegendPoints : _points;
961
+ _calloutPoints = (0, _index1.calloutData)(points);
962
+ }
963
+ let legendBars = null;
964
+ // reduce computation cost by only creating legendBars
965
+ // if when hideLegend is false.
966
+ // NOTE: they are rendered only when hideLegend is false in CartesianChart.
967
+ if (!props.hideLegend) {
968
+ legendBars = _createLegends(_points); // ToDo: Memoize legends to improve performance.
969
+ }
970
+ var _props_culture;
971
+ const calloutProps = {
972
+ YValueHover: YValueHover,
973
+ hoverXValue: hoverXValue,
974
+ descriptionMessage: props.getCalloutDescriptionMessage && stackCalloutProps ? props.getCalloutDescriptionMessage(stackCalloutProps) : undefined,
975
+ 'data-is-focusable': true,
976
+ xAxisCalloutAccessibilityData: xAxisCalloutAccessibilityData,
977
+ ...props.calloutProps,
978
+ clickPosition: clickPosition,
979
+ isPopoverOpen: isPopoverOpen,
980
+ isCalloutForStack: true,
981
+ culture: (_props_culture = props.culture) !== null && _props_culture !== void 0 ? _props_culture : 'en-us',
982
+ isCartesian: true,
983
+ customCallout: {
984
+ customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout() : undefined,
985
+ customCalloutProps: props.calloutPropsPerDataPoint ? props.calloutPropsPerDataPoint(dataPointCalloutProps) : undefined
986
+ }
987
+ };
988
+ const tickParams = {
989
+ tickValues,
990
+ tickFormat
991
+ };
992
+ return !_isChartEmpty() ? /*#__PURE__*/ _react.createElement(_index2.CartesianChart, {
993
+ ...props,
994
+ chartTitle: props.data.chartTitle,
995
+ points: points,
996
+ chartType: _index1.ChartTypes.LineChart,
997
+ calloutProps: calloutProps,
998
+ tickParams: tickParams,
999
+ legendBars: legendBars,
1000
+ getmargins: _getMargins,
1001
+ getGraphData: _initializeLineChartData,
1002
+ xAxisType: isXAxisDateType ? _index1.XAxisTypes.DateAxis : _index1.XAxisTypes.NumericAxis,
1003
+ onChartMouseLeave: _handleChartMouseLeave,
1004
+ enableFirstRenderOptimization: props.enablePerfOptimization && _firstRenderOptimization,
1005
+ componentRef: cartesianChartRef,
1006
+ /* eslint-disable react/jsx-no-bind */ // eslint-disable-next-line react/no-children-prop
1007
+ children: (props)=>{
1008
+ _xAxisScale = props.xScale;
1009
+ _yAxisScale = props.yScale;
1010
+ return /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement("g", null, /*#__PURE__*/ _react.createElement("line", {
1011
+ x1: 0,
1012
+ y1: 0,
1013
+ x2: 0,
1014
+ y2: props.containerHeight,
1015
+ stroke: '#323130',
1016
+ id: _verticalLine,
1017
+ visibility: 'hidden',
1018
+ strokeDasharray: '5,5'
1019
+ }), props.optimizeLargeData ? /*#__PURE__*/ _react.createElement("rect", {
1020
+ id: _rectId,
1021
+ width: props.containerWidth,
1022
+ height: props.containerHeight,
1023
+ fill: 'transparent'
1024
+ }) : /*#__PURE__*/ _react.createElement(_react.Fragment, null), /*#__PURE__*/ _react.createElement("g", null, _renderedColorFillBars, lines), eventAnnotationProps && /*#__PURE__*/ _react.createElement(_EventAnnotation.EventsAnnotation, {
1025
+ ...eventAnnotationProps,
1026
+ scale: props.xScale,
1027
+ chartYTop: margins.top + eventLabelHeight,
1028
+ chartYBottom: props.containerHeight - 35
1029
+ })));
1030
+ }
1031
+ }) : /*#__PURE__*/ _react.createElement("div", {
1032
+ id: _emptyChartId,
1033
+ role: 'alert',
1034
+ style: {
1035
+ opacity: '0'
1036
+ },
1037
+ "aria-label": 'Graph has no data to display'
1038
+ });
1039
+ });
1040
+ LineChart.displayName = 'LineChart';