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