@fluentui/react-charts 9.3.21 → 9.74.3-experimental.esm.20260709-49ee7a20cf.0

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 (767) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/package.json +15 -17
  3. package/dist/index.d.ts +0 -5724
  4. package/lib/AnnotationOnlyChart.js +0 -1
  5. package/lib/AnnotationOnlyChart.js.map +0 -1
  6. package/lib/AreaChart.js +0 -1
  7. package/lib/AreaChart.js.map +0 -1
  8. package/lib/CartesianChart.js +0 -1
  9. package/lib/CartesianChart.js.map +0 -1
  10. package/lib/ChartTable.js +0 -1
  11. package/lib/ChartTable.js.map +0 -1
  12. package/lib/DeclarativeChart.js +0 -1
  13. package/lib/DeclarativeChart.js.map +0 -1
  14. package/lib/DonutChart.js +0 -1
  15. package/lib/DonutChart.js.map +0 -1
  16. package/lib/FunnelChart.js +0 -1
  17. package/lib/FunnelChart.js.map +0 -1
  18. package/lib/GanttChart.js +0 -1
  19. package/lib/GanttChart.js.map +0 -1
  20. package/lib/GaugeChart.js +0 -1
  21. package/lib/GaugeChart.js.map +0 -1
  22. package/lib/GroupedVerticalBarChart.js +0 -1
  23. package/lib/GroupedVerticalBarChart.js.map +0 -1
  24. package/lib/HeatMapChart.js +0 -1
  25. package/lib/HeatMapChart.js.map +0 -1
  26. package/lib/HorizontalBarChart.js +0 -1
  27. package/lib/HorizontalBarChart.js.map +0 -1
  28. package/lib/HorizontalBarChartWithAxis.js +0 -1
  29. package/lib/HorizontalBarChartWithAxis.js.map +0 -1
  30. package/lib/Legends.js +0 -1
  31. package/lib/Legends.js.map +0 -1
  32. package/lib/LineChart.js +0 -1
  33. package/lib/LineChart.js.map +0 -1
  34. package/lib/PolarChart.js +0 -1
  35. package/lib/PolarChart.js.map +0 -1
  36. package/lib/Popover.js +0 -1
  37. package/lib/Popover.js.map +0 -1
  38. package/lib/ResponsiveContainer.js +0 -1
  39. package/lib/ResponsiveContainer.js.map +0 -1
  40. package/lib/SankeyChart.js +0 -1
  41. package/lib/SankeyChart.js.map +0 -1
  42. package/lib/ScatterChart.js +0 -1
  43. package/lib/ScatterChart.js.map +0 -1
  44. package/lib/Sparkline.js +0 -1
  45. package/lib/Sparkline.js.map +0 -1
  46. package/lib/VegaDeclarativeChart.js +0 -1
  47. package/lib/VegaDeclarativeChart.js.map +0 -1
  48. package/lib/VerticalBarChart.js +0 -1
  49. package/lib/VerticalBarChart.js.map +0 -1
  50. package/lib/VerticalStackedBarChart.js +0 -1
  51. package/lib/VerticalStackedBarChart.js.map +0 -1
  52. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +0 -196
  53. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +0 -1
  54. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +0 -3
  55. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +0 -1
  56. package/lib/components/AnnotationOnlyChart/index.js +0 -2
  57. package/lib/components/AnnotationOnlyChart/index.js.map +0 -1
  58. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +0 -33
  59. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +0 -1
  60. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +0 -24
  61. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +0 -1
  62. package/lib/components/AreaChart/AreaChart.js +0 -932
  63. package/lib/components/AreaChart/AreaChart.js.map +0 -1
  64. package/lib/components/AreaChart/AreaChart.types.js +0 -4
  65. package/lib/components/AreaChart/AreaChart.types.js.map +0 -1
  66. package/lib/components/AreaChart/index.js +0 -3
  67. package/lib/components/AreaChart/index.js.map +0 -1
  68. package/lib/components/AreaChart/useAreaChartStyles.styles.js +0 -63
  69. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +0 -1
  70. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +0 -33
  71. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +0 -1
  72. package/lib/components/ChartTable/ChartTable.js +0 -160
  73. package/lib/components/ChartTable/ChartTable.js.map +0 -1
  74. package/lib/components/ChartTable/ChartTable.types.js +0 -4
  75. package/lib/components/ChartTable/ChartTable.types.js.map +0 -1
  76. package/lib/components/ChartTable/index.js +0 -3
  77. package/lib/components/ChartTable/index.js.map +0 -1
  78. package/lib/components/ChartTable/useChartTableStyles.styles.js +0 -136
  79. package/lib/components/ChartTable/useChartTableStyles.styles.js.map +0 -1
  80. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +0 -68
  81. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +0 -1
  82. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +0 -659
  83. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +0 -1
  84. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +0 -1
  85. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +0 -1
  86. package/lib/components/CommonComponents/Annotations/index.js +0 -2
  87. package/lib/components/CommonComponents/Annotations/index.js.map +0 -1
  88. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +0 -223
  89. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +0 -1
  90. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +0 -139
  91. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +0 -1
  92. package/lib/components/CommonComponents/CartesianChart.js +0 -665
  93. package/lib/components/CommonComponents/CartesianChart.js.map +0 -1
  94. package/lib/components/CommonComponents/CartesianChart.types.js +0 -2
  95. package/lib/components/CommonComponents/CartesianChart.types.js.map +0 -1
  96. package/lib/components/CommonComponents/ChartPopover.js +0 -197
  97. package/lib/components/CommonComponents/ChartPopover.js.map +0 -1
  98. package/lib/components/CommonComponents/ChartPopover.types.js +0 -1
  99. package/lib/components/CommonComponents/ChartPopover.types.js.map +0 -1
  100. package/lib/components/CommonComponents/index.js +0 -6
  101. package/lib/components/CommonComponents/index.js.map +0 -1
  102. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +0 -189
  103. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +0 -1
  104. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +0 -131
  105. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +0 -1
  106. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +0 -171
  107. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +0 -1
  108. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -127
  109. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +0 -1
  110. package/lib/components/DeclarativeChart/DeclarativeChart.js +0 -397
  111. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +0 -1
  112. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +0 -163
  113. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +0 -1
  114. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +0 -3490
  115. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +0 -1
  116. package/lib/components/DeclarativeChart/index.js +0 -1
  117. package/lib/components/DeclarativeChart/index.js.map +0 -1
  118. package/lib/components/DonutChart/Arc/Arc.js +0 -118
  119. package/lib/components/DonutChart/Arc/Arc.js.map +0 -1
  120. package/lib/components/DonutChart/Arc/Arc.types.js +0 -1
  121. package/lib/components/DonutChart/Arc/Arc.types.js.map +0 -1
  122. package/lib/components/DonutChart/Arc/index.js +0 -2
  123. package/lib/components/DonutChart/Arc/index.js.map +0 -1
  124. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +0 -80
  125. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +0 -1
  126. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +0 -49
  127. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +0 -1
  128. package/lib/components/DonutChart/DonutChart.js +0 -349
  129. package/lib/components/DonutChart/DonutChart.js.map +0 -1
  130. package/lib/components/DonutChart/DonutChart.types.js +0 -4
  131. package/lib/components/DonutChart/DonutChart.types.js.map +0 -1
  132. package/lib/components/DonutChart/Pie/Pie.js +0 -72
  133. package/lib/components/DonutChart/Pie/Pie.js.map +0 -1
  134. package/lib/components/DonutChart/Pie/Pie.types.js +0 -1
  135. package/lib/components/DonutChart/Pie/Pie.types.js.map +0 -1
  136. package/lib/components/DonutChart/Pie/index.js +0 -2
  137. package/lib/components/DonutChart/Pie/index.js.map +0 -1
  138. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +0 -41
  139. package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +0 -1
  140. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js +0 -30
  141. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +0 -1
  142. package/lib/components/DonutChart/index.js +0 -3
  143. package/lib/components/DonutChart/index.js.map +0 -1
  144. package/lib/components/DonutChart/useDonutChartStyles.styles.js +0 -98
  145. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +0 -1
  146. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +0 -62
  147. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +0 -1
  148. package/lib/components/FunnelChart/FunnelChart.js +0 -401
  149. package/lib/components/FunnelChart/FunnelChart.js.map +0 -1
  150. package/lib/components/FunnelChart/FunnelChart.types.js +0 -4
  151. package/lib/components/FunnelChart/FunnelChart.types.js.map +0 -1
  152. package/lib/components/FunnelChart/funnelGeometry.js +0 -219
  153. package/lib/components/FunnelChart/funnelGeometry.js.map +0 -1
  154. package/lib/components/FunnelChart/index.js +0 -2
  155. package/lib/components/FunnelChart/index.js.map +0 -1
  156. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +0 -83
  157. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +0 -1
  158. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +0 -65
  159. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +0 -1
  160. package/lib/components/GanttChart/GanttChart.js +0 -535
  161. package/lib/components/GanttChart/GanttChart.js.map +0 -1
  162. package/lib/components/GanttChart/GanttChart.types.js +0 -4
  163. package/lib/components/GanttChart/GanttChart.types.js.map +0 -1
  164. package/lib/components/GanttChart/index.js +0 -2
  165. package/lib/components/GanttChart/index.js.map +0 -1
  166. package/lib/components/GanttChart/useGanttChartStyles.styles.js +0 -27
  167. package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +0 -1
  168. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +0 -26
  169. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +0 -1
  170. package/lib/components/GaugeChart/GaugeChart.js +0 -568
  171. package/lib/components/GaugeChart/GaugeChart.js.map +0 -1
  172. package/lib/components/GaugeChart/GaugeChart.types.js +0 -4
  173. package/lib/components/GaugeChart/GaugeChart.types.js.map +0 -1
  174. package/lib/components/GaugeChart/index.js +0 -3
  175. package/lib/components/GaugeChart/index.js.map +0 -1
  176. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +0 -197
  177. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +0 -1
  178. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +0 -149
  179. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +0 -1
  180. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +0 -813
  181. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +0 -1
  182. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +0 -4
  183. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +0 -1
  184. package/lib/components/GroupedVerticalBarChart/index.js +0 -3
  185. package/lib/components/GroupedVerticalBarChart/index.js.map +0 -1
  186. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +0 -77
  187. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +0 -1
  188. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +0 -40
  189. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +0 -1
  190. package/lib/components/HeatMapChart/HeatMapChart.js +0 -677
  191. package/lib/components/HeatMapChart/HeatMapChart.js.map +0 -1
  192. package/lib/components/HeatMapChart/HeatMapChart.types.js +0 -4
  193. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +0 -1
  194. package/lib/components/HeatMapChart/index.js +0 -3
  195. package/lib/components/HeatMapChart/index.js.map +0 -1
  196. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +0 -48
  197. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +0 -1
  198. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +0 -42
  199. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +0 -1
  200. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +0 -411
  201. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +0 -1
  202. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +0 -7
  203. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +0 -1
  204. package/lib/components/HorizontalBarChart/index.js +0 -3
  205. package/lib/components/HorizontalBarChart/index.js.map +0 -1
  206. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +0 -175
  207. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +0 -1
  208. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +0 -125
  209. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +0 -1
  210. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +0 -720
  211. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +0 -1
  212. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +0 -4
  213. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +0 -1
  214. package/lib/components/HorizontalBarChartWithAxis/index.js +0 -3
  215. package/lib/components/HorizontalBarChartWithAxis/index.js.map +0 -1
  216. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +0 -62
  217. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +0 -1
  218. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +0 -54
  219. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +0 -1
  220. package/lib/components/Legends/Legends.js +0 -323
  221. package/lib/components/Legends/Legends.js.map +0 -1
  222. package/lib/components/Legends/Legends.types.js +0 -3
  223. package/lib/components/Legends/Legends.types.js.map +0 -1
  224. package/lib/components/Legends/OverflowMenu.js +0 -33
  225. package/lib/components/Legends/OverflowMenu.js.map +0 -1
  226. package/lib/components/Legends/index.js +0 -3
  227. package/lib/components/Legends/index.js.map +0 -1
  228. package/lib/components/Legends/shape.js +0 -36
  229. package/lib/components/Legends/shape.js.map +0 -1
  230. package/lib/components/Legends/useLegendsStyles.styles.js +0 -262
  231. package/lib/components/Legends/useLegendsStyles.styles.js.map +0 -1
  232. package/lib/components/Legends/useLegendsStyles.styles.raw.js +0 -142
  233. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +0 -1
  234. package/lib/components/LineChart/LineChart.js +0 -1332
  235. package/lib/components/LineChart/LineChart.js.map +0 -1
  236. package/lib/components/LineChart/LineChart.types.js +0 -3
  237. package/lib/components/LineChart/LineChart.types.js.map +0 -1
  238. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +0 -118
  239. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +0 -1
  240. package/lib/components/LineChart/eventAnnotation/LabelLink.js +0 -59
  241. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +0 -1
  242. package/lib/components/LineChart/eventAnnotation/Textbox.js +0 -42
  243. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +0 -1
  244. package/lib/components/LineChart/index.js +0 -4
  245. package/lib/components/LineChart/index.js.map +0 -1
  246. package/lib/components/LineChart/useLineChartStyles.styles.js +0 -93
  247. package/lib/components/LineChart/useLineChartStyles.styles.js.map +0 -1
  248. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +0 -50
  249. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +0 -1
  250. package/lib/components/PolarChart/PolarChart.js +0 -577
  251. package/lib/components/PolarChart/PolarChart.js.map +0 -1
  252. package/lib/components/PolarChart/PolarChart.types.js +0 -4
  253. package/lib/components/PolarChart/PolarChart.types.js.map +0 -1
  254. package/lib/components/PolarChart/PolarChart.utils.js +0 -174
  255. package/lib/components/PolarChart/PolarChart.utils.js.map +0 -1
  256. package/lib/components/PolarChart/index.js +0 -2
  257. package/lib/components/PolarChart/index.js.map +0 -1
  258. package/lib/components/PolarChart/usePolarChartStyles.styles.js +0 -72
  259. package/lib/components/PolarChart/usePolarChartStyles.styles.js.map +0 -1
  260. package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js +0 -61
  261. package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js.map +0 -1
  262. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +0 -99
  263. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +0 -1
  264. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js +0 -4
  265. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +0 -1
  266. package/lib/components/ResponsiveContainer/index.js +0 -3
  267. package/lib/components/ResponsiveContainer/index.js.map +0 -1
  268. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +0 -30
  269. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +0 -1
  270. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +0 -29
  271. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +0 -1
  272. package/lib/components/ResponsiveContainer/withResponsiveContainer.js +0 -20
  273. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +0 -1
  274. package/lib/components/SankeyChart/SankeyChart.js +0 -1026
  275. package/lib/components/SankeyChart/SankeyChart.js.map +0 -1
  276. package/lib/components/SankeyChart/SankeyChart.types.js +0 -3
  277. package/lib/components/SankeyChart/SankeyChart.types.js.map +0 -1
  278. package/lib/components/SankeyChart/index.js +0 -3
  279. package/lib/components/SankeyChart/index.js.map +0 -1
  280. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +0 -123
  281. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +0 -1
  282. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +0 -79
  283. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +0 -1
  284. package/lib/components/ScatterChart/ScatterChart.js +0 -544
  285. package/lib/components/ScatterChart/ScatterChart.js.map +0 -1
  286. package/lib/components/ScatterChart/ScatterChart.types.js +0 -4
  287. package/lib/components/ScatterChart/ScatterChart.types.js.map +0 -1
  288. package/lib/components/ScatterChart/index.js +0 -3
  289. package/lib/components/ScatterChart/index.js.map +0 -1
  290. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +0 -84
  291. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +0 -1
  292. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +0 -41
  293. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +0 -1
  294. package/lib/components/Sparkline/Sparkline.js +0 -123
  295. package/lib/components/Sparkline/Sparkline.js.map +0 -1
  296. package/lib/components/Sparkline/Sparkline.types.js +0 -4
  297. package/lib/components/Sparkline/Sparkline.types.js.map +0 -1
  298. package/lib/components/Sparkline/index.js +0 -3
  299. package/lib/components/Sparkline/index.js.map +0 -1
  300. package/lib/components/Sparkline/useSparklineStyles.styles.js +0 -40
  301. package/lib/components/Sparkline/useSparklineStyles.styles.js.map +0 -1
  302. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js +0 -31
  303. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js.map +0 -1
  304. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js +0 -405
  305. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js.map +0 -1
  306. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js +0 -20
  307. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js.map +0 -1
  308. package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js +0 -415
  309. package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js.map +0 -1
  310. package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js +0 -537
  311. package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js.map +0 -1
  312. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +0 -3279
  313. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +0 -1
  314. package/lib/components/VegaDeclarativeChart/VegaLiteTypes.js +0 -28
  315. package/lib/components/VegaDeclarativeChart/VegaLiteTypes.js.map +0 -1
  316. package/lib/components/VegaDeclarativeChart/index.js +0 -1
  317. package/lib/components/VegaDeclarativeChart/index.js.map +0 -1
  318. package/lib/components/VerticalBarChart/VerticalBarChart.js +0 -930
  319. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +0 -1
  320. package/lib/components/VerticalBarChart/VerticalBarChart.types.js +0 -4
  321. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +0 -1
  322. package/lib/components/VerticalBarChart/index.js +0 -3
  323. package/lib/components/VerticalBarChart/index.js.map +0 -1
  324. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +0 -86
  325. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +0 -1
  326. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +0 -48
  327. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +0 -1
  328. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +0 -1077
  329. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +0 -1
  330. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +0 -4
  331. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +0 -1
  332. package/lib/components/VerticalStackedBarChart/index.js +0 -3
  333. package/lib/components/VerticalStackedBarChart/index.js.map +0 -1
  334. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +0 -74
  335. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +0 -1
  336. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +0 -38
  337. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +0 -1
  338. package/lib/index.js +0 -26
  339. package/lib/index.js.map +0 -1
  340. package/lib/types/ChartAnnotation.js +0 -1
  341. package/lib/types/ChartAnnotation.js.map +0 -1
  342. package/lib/types/DataPoint.js +0 -3
  343. package/lib/types/DataPoint.js.map +0 -1
  344. package/lib/types/EventAnnotation.js +0 -1
  345. package/lib/types/EventAnnotation.js.map +0 -1
  346. package/lib/types/LegendDataItem.js +0 -1
  347. package/lib/types/LegendDataItem.js.map +0 -1
  348. package/lib/types/index.js +0 -3
  349. package/lib/types/index.js.map +0 -1
  350. package/lib/utilities/ChartTitle.js +0 -45
  351. package/lib/utilities/ChartTitle.js.map +0 -1
  352. package/lib/utilities/Common.styles.js +0 -117
  353. package/lib/utilities/Common.styles.js.map +0 -1
  354. package/lib/utilities/Common.styles.raw.js +0 -115
  355. package/lib/utilities/Common.styles.raw.js.map +0 -1
  356. package/lib/utilities/FocusableTooltipText.js +0 -65
  357. package/lib/utilities/FocusableTooltipText.js.map +0 -1
  358. package/lib/utilities/KeyCodes.js +0 -11
  359. package/lib/utilities/KeyCodes.js.map +0 -1
  360. package/lib/utilities/SVGTooltipText.js +0 -179
  361. package/lib/utilities/SVGTooltipText.js.map +0 -1
  362. package/lib/utilities/async-utils.js +0 -380
  363. package/lib/utilities/async-utils.js.map +0 -1
  364. package/lib/utilities/colors.js +0 -281
  365. package/lib/utilities/colors.js.map +0 -1
  366. package/lib/utilities/getWindow.js +0 -25
  367. package/lib/utilities/getWindow.js.map +0 -1
  368. package/lib/utilities/hooks.js +0 -34
  369. package/lib/utilities/hooks.js.map +0 -1
  370. package/lib/utilities/image-export-utils.js +0 -405
  371. package/lib/utilities/image-export-utils.js.map +0 -1
  372. package/lib/utilities/index.js +0 -5
  373. package/lib/utilities/index.js.map +0 -1
  374. package/lib/utilities/overflow-utils.js +0 -27
  375. package/lib/utilities/overflow-utils.js.map +0 -1
  376. package/lib/utilities/scatterpolar-utils.js +0 -52
  377. package/lib/utilities/scatterpolar-utils.js.map +0 -1
  378. package/lib/utilities/string.js +0 -32
  379. package/lib/utilities/string.js.map +0 -1
  380. package/lib/utilities/test-data.js +0 -565
  381. package/lib/utilities/test-data.js.map +0 -1
  382. package/lib/utilities/utilities.js +0 -1990
  383. package/lib/utilities/utilities.js.map +0 -1
  384. package/lib/utilities/vbc-utils.js +0 -51
  385. package/lib/utilities/vbc-utils.js.map +0 -1
  386. package/lib-commonjs/AnnotationOnlyChart.js +0 -6
  387. package/lib-commonjs/AnnotationOnlyChart.js.map +0 -1
  388. package/lib-commonjs/AreaChart.js +0 -6
  389. package/lib-commonjs/AreaChart.js.map +0 -1
  390. package/lib-commonjs/CartesianChart.js +0 -6
  391. package/lib-commonjs/CartesianChart.js.map +0 -1
  392. package/lib-commonjs/ChartTable.js +0 -6
  393. package/lib-commonjs/ChartTable.js.map +0 -1
  394. package/lib-commonjs/DeclarativeChart.js +0 -6
  395. package/lib-commonjs/DeclarativeChart.js.map +0 -1
  396. package/lib-commonjs/DonutChart.js +0 -6
  397. package/lib-commonjs/DonutChart.js.map +0 -1
  398. package/lib-commonjs/FunnelChart.js +0 -6
  399. package/lib-commonjs/FunnelChart.js.map +0 -1
  400. package/lib-commonjs/GanttChart.js +0 -6
  401. package/lib-commonjs/GanttChart.js.map +0 -1
  402. package/lib-commonjs/GaugeChart.js +0 -6
  403. package/lib-commonjs/GaugeChart.js.map +0 -1
  404. package/lib-commonjs/GroupedVerticalBarChart.js +0 -6
  405. package/lib-commonjs/GroupedVerticalBarChart.js.map +0 -1
  406. package/lib-commonjs/HeatMapChart.js +0 -6
  407. package/lib-commonjs/HeatMapChart.js.map +0 -1
  408. package/lib-commonjs/HorizontalBarChart.js +0 -6
  409. package/lib-commonjs/HorizontalBarChart.js.map +0 -1
  410. package/lib-commonjs/HorizontalBarChartWithAxis.js +0 -6
  411. package/lib-commonjs/HorizontalBarChartWithAxis.js.map +0 -1
  412. package/lib-commonjs/Legends.js +0 -6
  413. package/lib-commonjs/Legends.js.map +0 -1
  414. package/lib-commonjs/LineChart.js +0 -6
  415. package/lib-commonjs/LineChart.js.map +0 -1
  416. package/lib-commonjs/PolarChart.js +0 -6
  417. package/lib-commonjs/PolarChart.js.map +0 -1
  418. package/lib-commonjs/Popover.js +0 -6
  419. package/lib-commonjs/Popover.js.map +0 -1
  420. package/lib-commonjs/ResponsiveContainer.js +0 -6
  421. package/lib-commonjs/ResponsiveContainer.js.map +0 -1
  422. package/lib-commonjs/SankeyChart.js +0 -6
  423. package/lib-commonjs/SankeyChart.js.map +0 -1
  424. package/lib-commonjs/ScatterChart.js +0 -6
  425. package/lib-commonjs/ScatterChart.js.map +0 -1
  426. package/lib-commonjs/Sparkline.js +0 -6
  427. package/lib-commonjs/Sparkline.js.map +0 -1
  428. package/lib-commonjs/VegaDeclarativeChart.js +0 -6
  429. package/lib-commonjs/VegaDeclarativeChart.js.map +0 -1
  430. package/lib-commonjs/VerticalBarChart.js +0 -6
  431. package/lib-commonjs/VerticalBarChart.js.map +0 -1
  432. package/lib-commonjs/VerticalStackedBarChart.js +0 -6
  433. package/lib-commonjs/VerticalStackedBarChart.js.map +0 -1
  434. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +0 -207
  435. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +0 -1
  436. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +0 -6
  437. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +0 -1
  438. package/lib-commonjs/components/AnnotationOnlyChart/index.js +0 -7
  439. package/lib-commonjs/components/AnnotationOnlyChart/index.js.map +0 -1
  440. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +0 -57
  441. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +0 -1
  442. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +0 -34
  443. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +0 -1
  444. package/lib-commonjs/components/AreaChart/AreaChart.js +0 -938
  445. package/lib-commonjs/components/AreaChart/AreaChart.js.map +0 -1
  446. package/lib-commonjs/components/AreaChart/AreaChart.types.js +0 -7
  447. package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +0 -1
  448. package/lib-commonjs/components/AreaChart/index.js +0 -8
  449. package/lib-commonjs/components/AreaChart/index.js.map +0 -1
  450. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +0 -96
  451. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +0 -1
  452. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +0 -49
  453. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +0 -1
  454. package/lib-commonjs/components/ChartTable/ChartTable.js +0 -171
  455. package/lib-commonjs/components/ChartTable/ChartTable.js.map +0 -1
  456. package/lib-commonjs/components/ChartTable/ChartTable.types.js +0 -7
  457. package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +0 -1
  458. package/lib-commonjs/components/ChartTable/index.js +0 -8
  459. package/lib-commonjs/components/ChartTable/index.js.map +0 -1
  460. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +0 -200
  461. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +0 -1
  462. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +0 -82
  463. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +0 -1
  464. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +0 -670
  465. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +0 -1
  466. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +0 -4
  467. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +0 -1
  468. package/lib-commonjs/components/CommonComponents/Annotations/index.js +0 -7
  469. package/lib-commonjs/components/CommonComponents/Annotations/index.js.map +0 -1
  470. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +0 -325
  471. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +0 -1
  472. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +0 -174
  473. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +0 -1
  474. package/lib-commonjs/components/CommonComponents/CartesianChart.js +0 -673
  475. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +0 -1
  476. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js +0 -5
  477. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +0 -1
  478. package/lib-commonjs/components/CommonComponents/ChartPopover.js +0 -207
  479. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +0 -1
  480. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js +0 -4
  481. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +0 -1
  482. package/lib-commonjs/components/CommonComponents/index.js +0 -11
  483. package/lib-commonjs/components/CommonComponents/index.js.map +0 -1
  484. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +0 -268
  485. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +0 -1
  486. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +0 -144
  487. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +0 -1
  488. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +0 -238
  489. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +0 -1
  490. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -141
  491. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +0 -1
  492. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +0 -400
  493. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +0 -1
  494. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +0 -195
  495. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +0 -1
  496. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +0 -3577
  497. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +0 -1
  498. package/lib-commonjs/components/DeclarativeChart/index.js +0 -6
  499. package/lib-commonjs/components/DeclarativeChart/index.js.map +0 -1
  500. package/lib-commonjs/components/DonutChart/Arc/Arc.js +0 -125
  501. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +0 -1
  502. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js +0 -4
  503. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +0 -1
  504. package/lib-commonjs/components/DonutChart/Arc/index.js +0 -7
  505. package/lib-commonjs/components/DonutChart/Arc/index.js.map +0 -1
  506. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +0 -110
  507. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +0 -1
  508. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +0 -63
  509. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +0 -1
  510. package/lib-commonjs/components/DonutChart/DonutChart.js +0 -356
  511. package/lib-commonjs/components/DonutChart/DonutChart.js.map +0 -1
  512. package/lib-commonjs/components/DonutChart/DonutChart.types.js +0 -7
  513. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +0 -1
  514. package/lib-commonjs/components/DonutChart/Pie/Pie.js +0 -79
  515. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +0 -1
  516. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js +0 -4
  517. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +0 -1
  518. package/lib-commonjs/components/DonutChart/Pie/index.js +0 -7
  519. package/lib-commonjs/components/DonutChart/Pie/index.js.map +0 -1
  520. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +0 -55
  521. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +0 -1
  522. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js +0 -44
  523. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +0 -1
  524. package/lib-commonjs/components/DonutChart/index.js +0 -8
  525. package/lib-commonjs/components/DonutChart/index.js.map +0 -1
  526. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +0 -145
  527. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +0 -1
  528. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +0 -76
  529. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +0 -1
  530. package/lib-commonjs/components/FunnelChart/FunnelChart.js +0 -412
  531. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +0 -1
  532. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js +0 -7
  533. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +0 -1
  534. package/lib-commonjs/components/FunnelChart/funnelGeometry.js +0 -246
  535. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +0 -1
  536. package/lib-commonjs/components/FunnelChart/index.js +0 -7
  537. package/lib-commonjs/components/FunnelChart/index.js.map +0 -1
  538. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +0 -118
  539. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +0 -1
  540. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +0 -79
  541. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +0 -1
  542. package/lib-commonjs/components/GanttChart/GanttChart.js +0 -546
  543. package/lib-commonjs/components/GanttChart/GanttChart.js.map +0 -1
  544. package/lib-commonjs/components/GanttChart/GanttChart.types.js +0 -7
  545. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +0 -1
  546. package/lib-commonjs/components/GanttChart/index.js +0 -7
  547. package/lib-commonjs/components/GanttChart/index.js.map +0 -1
  548. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +0 -42
  549. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +0 -1
  550. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +0 -42
  551. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +0 -1
  552. package/lib-commonjs/components/GaugeChart/GaugeChart.js +0 -597
  553. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +0 -1
  554. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js +0 -7
  555. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +0 -1
  556. package/lib-commonjs/components/GaugeChart/index.js +0 -8
  557. package/lib-commonjs/components/GaugeChart/index.js.map +0 -1
  558. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +0 -281
  559. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +0 -1
  560. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +0 -167
  561. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +0 -1
  562. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +0 -818
  563. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +0 -1
  564. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +0 -7
  565. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +0 -1
  566. package/lib-commonjs/components/GroupedVerticalBarChart/index.js +0 -8
  567. package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +0 -1
  568. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +0 -116
  569. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +0 -1
  570. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +0 -56
  571. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +0 -1
  572. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +0 -688
  573. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +0 -1
  574. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js +0 -7
  575. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +0 -1
  576. package/lib-commonjs/components/HeatMapChart/index.js +0 -8
  577. package/lib-commonjs/components/HeatMapChart/index.js.map +0 -1
  578. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +0 -71
  579. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +0 -1
  580. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +0 -60
  581. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +0 -1
  582. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +0 -417
  583. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +0 -1
  584. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +0 -17
  585. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +0 -1
  586. package/lib-commonjs/components/HorizontalBarChart/index.js +0 -8
  587. package/lib-commonjs/components/HorizontalBarChart/index.js.map +0 -1
  588. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +0 -264
  589. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +0 -1
  590. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +0 -139
  591. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +0 -1
  592. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +0 -726
  593. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +0 -1
  594. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +0 -7
  595. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +0 -1
  596. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js +0 -8
  597. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +0 -1
  598. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +0 -86
  599. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +0 -1
  600. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +0 -70
  601. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +0 -1
  602. package/lib-commonjs/components/Legends/Legends.js +0 -333
  603. package/lib-commonjs/components/Legends/Legends.js.map +0 -1
  604. package/lib-commonjs/components/Legends/Legends.types.js +0 -6
  605. package/lib-commonjs/components/Legends/Legends.types.js.map +0 -1
  606. package/lib-commonjs/components/Legends/OverflowMenu.js +0 -44
  607. package/lib-commonjs/components/Legends/OverflowMenu.js.map +0 -1
  608. package/lib-commonjs/components/Legends/index.js +0 -8
  609. package/lib-commonjs/components/Legends/index.js.map +0 -1
  610. package/lib-commonjs/components/Legends/shape.js +0 -47
  611. package/lib-commonjs/components/Legends/shape.js.map +0 -1
  612. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +0 -456
  613. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +0 -1
  614. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +0 -178
  615. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +0 -1
  616. package/lib-commonjs/components/LineChart/LineChart.js +0 -1337
  617. package/lib-commonjs/components/LineChart/LineChart.js.map +0 -1
  618. package/lib-commonjs/components/LineChart/LineChart.types.js +0 -6
  619. package/lib-commonjs/components/LineChart/LineChart.types.js.map +0 -1
  620. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +0 -129
  621. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +0 -1
  622. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +0 -70
  623. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +0 -1
  624. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +0 -53
  625. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +0 -1
  626. package/lib-commonjs/components/LineChart/index.js +0 -9
  627. package/lib-commonjs/components/LineChart/index.js.map +0 -1
  628. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +0 -132
  629. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +0 -1
  630. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +0 -63
  631. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +0 -1
  632. package/lib-commonjs/components/PolarChart/PolarChart.js +0 -587
  633. package/lib-commonjs/components/PolarChart/PolarChart.js.map +0 -1
  634. package/lib-commonjs/components/PolarChart/PolarChart.types.js +0 -7
  635. package/lib-commonjs/components/PolarChart/PolarChart.types.js.map +0 -1
  636. package/lib-commonjs/components/PolarChart/PolarChart.utils.js +0 -204
  637. package/lib-commonjs/components/PolarChart/PolarChart.utils.js.map +0 -1
  638. package/lib-commonjs/components/PolarChart/index.js +0 -7
  639. package/lib-commonjs/components/PolarChart/index.js.map +0 -1
  640. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.js +0 -107
  641. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.js.map +0 -1
  642. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.js +0 -75
  643. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.js.map +0 -1
  644. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +0 -107
  645. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +0 -1
  646. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js +0 -7
  647. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +0 -1
  648. package/lib-commonjs/components/ResponsiveContainer/index.js +0 -8
  649. package/lib-commonjs/components/ResponsiveContainer/index.js.map +0 -1
  650. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +0 -50
  651. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +0 -1
  652. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +0 -47
  653. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +0 -1
  654. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js +0 -28
  655. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +0 -1
  656. package/lib-commonjs/components/SankeyChart/SankeyChart.js +0 -1042
  657. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +0 -1
  658. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js +0 -6
  659. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +0 -1
  660. package/lib-commonjs/components/SankeyChart/index.js +0 -8
  661. package/lib-commonjs/components/SankeyChart/index.js.map +0 -1
  662. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +0 -202
  663. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +0 -1
  664. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +0 -97
  665. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +0 -1
  666. package/lib-commonjs/components/ScatterChart/ScatterChart.js +0 -550
  667. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +0 -1
  668. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +0 -7
  669. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +0 -1
  670. package/lib-commonjs/components/ScatterChart/index.js +0 -8
  671. package/lib-commonjs/components/ScatterChart/index.js.map +0 -1
  672. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +0 -120
  673. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +0 -1
  674. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +0 -55
  675. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +0 -1
  676. package/lib-commonjs/components/Sparkline/Sparkline.js +0 -129
  677. package/lib-commonjs/components/Sparkline/Sparkline.js.map +0 -1
  678. package/lib-commonjs/components/Sparkline/Sparkline.types.js +0 -7
  679. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +0 -1
  680. package/lib-commonjs/components/Sparkline/index.js +0 -8
  681. package/lib-commonjs/components/Sparkline/index.js.map +0 -1
  682. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +0 -57
  683. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +0 -1
  684. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js +0 -45
  685. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js.map +0 -1
  686. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChart.js +0 -274
  687. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChart.js.map +0 -1
  688. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js +0 -35
  689. package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js.map +0 -1
  690. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteColorAdapter.js +0 -412
  691. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteColorAdapter.js.map +0 -1
  692. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js +0 -533
  693. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js.map +0 -1
  694. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +0 -3214
  695. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +0 -1
  696. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteTypes.js +0 -31
  697. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteTypes.js.map +0 -1
  698. package/lib-commonjs/components/VegaDeclarativeChart/index.js +0 -6
  699. package/lib-commonjs/components/VegaDeclarativeChart/index.js.map +0 -1
  700. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +0 -932
  701. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +0 -1
  702. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js +0 -7
  703. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +0 -1
  704. package/lib-commonjs/components/VerticalBarChart/index.js +0 -8
  705. package/lib-commonjs/components/VerticalBarChart/index.js.map +0 -1
  706. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +0 -128
  707. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +0 -1
  708. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +0 -64
  709. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +0 -1
  710. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +0 -1088
  711. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +0 -1
  712. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +0 -7
  713. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +0 -1
  714. package/lib-commonjs/components/VerticalStackedBarChart/index.js +0 -8
  715. package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +0 -1
  716. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +0 -116
  717. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +0 -1
  718. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +0 -56
  719. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +0 -1
  720. package/lib-commonjs/index.js +0 -31
  721. package/lib-commonjs/index.js.map +0 -1
  722. package/lib-commonjs/types/ChartAnnotation.js +0 -4
  723. package/lib-commonjs/types/ChartAnnotation.js.map +0 -1
  724. package/lib-commonjs/types/DataPoint.js +0 -6
  725. package/lib-commonjs/types/DataPoint.js.map +0 -1
  726. package/lib-commonjs/types/EventAnnotation.js +0 -4
  727. package/lib-commonjs/types/EventAnnotation.js.map +0 -1
  728. package/lib-commonjs/types/LegendDataItem.js +0 -4
  729. package/lib-commonjs/types/LegendDataItem.js.map +0 -1
  730. package/lib-commonjs/types/index.js +0 -8
  731. package/lib-commonjs/types/index.js.map +0 -1
  732. package/lib-commonjs/utilities/ChartTitle.js +0 -53
  733. package/lib-commonjs/utilities/ChartTitle.js.map +0 -1
  734. package/lib-commonjs/utilities/Common.styles.js +0 -138
  735. package/lib-commonjs/utilities/Common.styles.js.map +0 -1
  736. package/lib-commonjs/utilities/Common.styles.raw.js +0 -138
  737. package/lib-commonjs/utilities/Common.styles.raw.js.map +0 -1
  738. package/lib-commonjs/utilities/FocusableTooltipText.js +0 -75
  739. package/lib-commonjs/utilities/FocusableTooltipText.js.map +0 -1
  740. package/lib-commonjs/utilities/KeyCodes.js +0 -21
  741. package/lib-commonjs/utilities/KeyCodes.js.map +0 -1
  742. package/lib-commonjs/utilities/SVGTooltipText.js +0 -189
  743. package/lib-commonjs/utilities/SVGTooltipText.js.map +0 -1
  744. package/lib-commonjs/utilities/async-utils.js +0 -382
  745. package/lib-commonjs/utilities/async-utils.js.map +0 -1
  746. package/lib-commonjs/utilities/colors.js +0 -311
  747. package/lib-commonjs/utilities/colors.js.map +0 -1
  748. package/lib-commonjs/utilities/getWindow.js +0 -28
  749. package/lib-commonjs/utilities/getWindow.js.map +0 -1
  750. package/lib-commonjs/utilities/hooks.js +0 -45
  751. package/lib-commonjs/utilities/hooks.js.map +0 -1
  752. package/lib-commonjs/utilities/image-export-utils.js +0 -423
  753. package/lib-commonjs/utilities/image-export-utils.js.map +0 -1
  754. package/lib-commonjs/utilities/index.js +0 -10
  755. package/lib-commonjs/utilities/index.js.map +0 -1
  756. package/lib-commonjs/utilities/overflow-utils.js +0 -36
  757. package/lib-commonjs/utilities/overflow-utils.js.map +0 -1
  758. package/lib-commonjs/utilities/scatterpolar-utils.js +0 -67
  759. package/lib-commonjs/utilities/scatterpolar-utils.js.map +0 -1
  760. package/lib-commonjs/utilities/string.js +0 -29
  761. package/lib-commonjs/utilities/string.js.map +0 -1
  762. package/lib-commonjs/utilities/test-data.js +0 -628
  763. package/lib-commonjs/utilities/test-data.js.map +0 -1
  764. package/lib-commonjs/utilities/utilities.js +0 -2016
  765. package/lib-commonjs/utilities/utilities.js.map +0 -1
  766. package/lib-commonjs/utilities/vbc-utils.js +0 -72
  767. package/lib-commonjs/utilities/vbc-utils.js.map +0 -1
@@ -1,1332 +0,0 @@
1
- 'use client';
2
- import * as React from 'react';
3
- import { useLineChartStyles } from './useLineChartStyles.styles';
4
- import { select as d3Select, pointer } from 'd3-selection';
5
- import { bisector } from 'd3-array';
6
- import { Legends } from '../Legends/index';
7
- import { line as d3Line } from 'd3-shape';
8
- import { max as d3Max } from 'd3-array';
9
- import { useId } from '@fluentui/react-utilities';
10
- import { find, findCalloutPoints } from '../../utilities/index';
11
- import { CartesianChart } from '../../index';
12
- import { EventsAnnotation } from './eventAnnotation/EventAnnotation';
13
- import { tokens } from '@fluentui/react-theme';
14
- import { calloutData, ChartTypes, getXAxisType, XAxisTypes, Points, pointTypes, getTypeOfAxis, getNextColor, getColorFromToken, findNumericMinMaxOfY, createNumericYAxis, domainRangeOfDateForAreaLineScatterVerticalBarCharts, domainRangeOfNumericForAreaLineScatterCharts, createStringYAxis, useRtl, getCurveFactory, isScatterPolarSeries, getDomainPaddingForMarkers, isPlottable, getRangeForScatterMarkerSize, calculateMarkerRadius } from '../../utilities/index';
15
- import { renderScatterPolarCategoryLabels } from '../../utilities/scatterpolar-utils';
16
- import { formatDateToLocaleString } from '@fluentui/chart-utilities';
17
- import { useImageExport } from '../../utilities/hooks';
18
- var PointSize = /*#__PURE__*/ function(PointSize) {
19
- PointSize[PointSize["hoverSize"] = 11] = "hoverSize";
20
- PointSize[PointSize["invisibleSize"] = 1] = "invisibleSize";
21
- return PointSize;
22
- }(PointSize || {});
23
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
24
- const bisect = bisector((d)=>d.x).left;
25
- const DEFAULT_LINE_STROKE_SIZE = 4;
26
- // The given shape of a icon must be 2.5 times bigger than line width (known as stroke width)
27
- const PATH_MULTIPLY_SIZE = 2.5;
28
- /**
29
- *
30
- * @param x units from origin
31
- * @param y units from origin
32
- * @param w is the legnth of the each side of a shape
33
- * @param index index to get the shape path
34
- */ const _getPointPath = (x, y, w, index)=>{
35
- const allPointPaths = [
36
- // circle path
37
- `M${x - w / 2} ${y}
38
- A${w / 2} ${w / 2} 0 1 0 ${x + w / 2} ${y}
39
- M${x - w / 2} ${y}
40
- A ${w / 2} ${w / 2} 0 1 1 ${x + w / 2} ${y}
41
- `,
42
- //square
43
- `M${x - w / 2} ${y - w / 2}
44
- L${x + w / 2} ${y - w / 2}
45
- L${x + w / 2} ${y + w / 2}
46
- L${x - w / 2} ${y + w / 2}
47
- Z`,
48
- //triangle
49
- `M${x - w / 2} ${y - 0.2886 * w}
50
- H ${x + w / 2}
51
- L${x} ${y + 0.5774 * w} Z`,
52
- //diamond
53
- `M${x} ${y - w / 2}
54
- L${x + w / 2} ${y}
55
- L${x} ${y + w / 2}
56
- L${x - w / 2} ${y}
57
- Z`,
58
- //pyramid
59
- `M${x} ${y - 0.5774 * w}
60
- L${x + w / 2} ${y + 0.2886 * w}
61
- L${x - w / 2} ${y + 0.2886 * w} Z`,
62
- //hexagon
63
- `M${x - 0.5 * w} ${y - 0.866 * w}
64
- L${x + 0.5 * w} ${y - 0.866 * w}
65
- L${x + w} ${y}
66
- L${x + 0.5 * w} ${y + 0.866 * w}
67
- L${x - 0.5 * w} ${y + 0.866 * w}
68
- L${x - w} ${y}
69
- Z`,
70
- //pentagon
71
- `M${x} ${y - 0.851 * w}
72
- L${x + 0.6884 * w} ${y - 0.2633 * w}
73
- L${x + 0.5001 * w} ${y + 0.6884 * w}
74
- L${x - 0.5001 * w} ${y + 0.6884 * w}
75
- L${x - 0.6884 * w} ${y - 0.2633 * w}
76
- Z`,
77
- //octagon
78
- `M${x - 0.5001 * w} ${y - 1.207 * w}
79
- L${x + 0.5001 * w} ${y - 1.207 * w}
80
- L${x + 1.207 * w} ${y - 0.5001 * w}
81
- L${x + 1.207 * w} ${y + 0.5001 * w}
82
- L${x + 0.5001 * w} ${y + 1.207 * w}
83
- L${x - 0.5001 * w} ${y + 1.207 * w}
84
- L${x - 1.207 * w} ${y + 0.5001 * w}
85
- L${x - 1.207 * w} ${y - 0.5001 * w}
86
- Z`
87
- ];
88
- return allPointPaths[index];
89
- };
90
- // Create a LineChart variant which uses these default styles and this styled subcomponent.
91
- /**
92
- * Linechart component
93
- * {@docCategory LineChart}
94
- */ export const LineChart = /*#__PURE__*/ React.forwardRef(({ isCalloutForStack = true, ...restProps }, forwardedRef)=>{
95
- var _props_legendProps_selectedLegends, _props_legendProps;
96
- const props = {
97
- isCalloutForStack,
98
- ...restProps
99
- };
100
- let _hasMarkersMode = false;
101
- let _isXAxisDateType = false;
102
- let _isScatterPolar = false;
103
- let _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);
104
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
105
- let _xAxisScale = '';
106
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
107
- let _yScalePrimary = '';
108
- const _circleId = useId('circle');
109
- const _lineId = useId('lineID');
110
- const _borderId = useId('borderID');
111
- const _verticalLine = useId('verticalLine');
112
- const _colorFillBarPatternId = useId('colorFillBarPattern');
113
- let _uniqueCallOutID = '';
114
- const _refArray = [];
115
- let margins;
116
- let eventLabelHeight = 36;
117
- let lines;
118
- let _renderedColorFillBars;
119
- const _colorFillBars = React.useRef([]);
120
- const _rectId = useId('containerRectLD');
121
- const _staticHighlightCircle = useId('staticHighlightCircle');
122
- const _firstRenderOptimization = true;
123
- const _emptyChartId = useId('_LineChart_empty');
124
- const _colorFillBarId = useId('_colorFillBarId');
125
- const _isRTL = useRtl();
126
- const xAxisCalloutAccessibilityData = {};
127
- const { cartesianChartRef, legendsRef: _legendsRef } = useImageExport(props.componentRef, props.hideLegend);
128
- let _yScaleSecondary;
129
- props.eventAnnotationProps && props.eventAnnotationProps.labelHeight && (eventLabelHeight = props.eventAnnotationProps.labelHeight);
130
- const [hoverXValue, setHoverXValue] = React.useState('');
131
- const [activeLegend, setActiveLegend] = React.useState('');
132
- const [yValueHover, setYValueHover] = React.useState([]);
133
- const [selectedLegend, setSelectedLegend] = React.useState('');
134
- const [selectedLegendPoints, setSelectedLegendPoints] = React.useState(_injectIndexPropertyInLineChartData(props.data.lineChartData, true));
135
- const [selectedColorBarLegend, setSelectedColorBarLegend] = React.useState([]);
136
- var _props_legendProps_selectedLegends_length;
137
- 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);
138
- const [activePoint, setActivePoint] = React.useState('');
139
- const [nearestCircleToHighlight, setNearestCircleToHighlight] = React.useState(null);
140
- const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState();
141
- const [stackCalloutProps, setStackCalloutProps] = React.useState();
142
- const [clickPosition, setClickPosition] = React.useState({
143
- x: 0,
144
- y: 0
145
- });
146
- const [isPopoverOpen, setPopoverOpen] = React.useState(false);
147
- const [YValue, setYValue] = React.useState('');
148
- const [legendVal, setLegendVal] = React.useState('');
149
- const [lineColor, setLineColor] = React.useState('');
150
- const [refSelected, setRefSelected] = React.useState(null);
151
- const pointsRef = React.useRef([]);
152
- const calloutPointsRef = React.useRef({});
153
- const classes = useLineChartStyles(props);
154
- React.useEffect(()=>{
155
- /** note that height and width are not used to resize or set as dimesions of the chart,
156
- * fitParentContainer is responisble for setting the height and width or resizing of the svg/chart
157
- */ if (_points !== _injectIndexPropertyInLineChartData(props.data.lineChartData) || props.data !== _points) {
158
- pointsRef.current = _injectIndexPropertyInLineChartData(props.data.lineChartData);
159
- calloutPointsRef.current = calloutData(pointsRef.current);
160
- }
161
- }, [
162
- props.height,
163
- props.width,
164
- props.data
165
- ]);
166
- function _getDomainNRangeValues(points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues) {
167
- let domainNRangeValue;
168
- if (xAxisType === XAxisTypes.NumericAxis) {
169
- domainNRangeValue = domainRangeOfNumericForAreaLineScatterCharts(points, margins, width, isRTL, props.xScaleType, _hasMarkersMode, props.xMinValue, props.xMaxValue);
170
- } else if (xAxisType === XAxisTypes.DateAxis) {
171
- domainNRangeValue = domainRangeOfDateForAreaLineScatterVerticalBarCharts(points, margins, width, isRTL, tickValues, chartType, barWidth, _hasMarkersMode);
172
- } else {
173
- domainNRangeValue = {
174
- dStartValue: 0,
175
- dEndValue: 0,
176
- rStartValue: 0,
177
- rEndValue: 0
178
- };
179
- }
180
- return domainNRangeValue;
181
- }
182
- function _injectIndexPropertyInLineChartData(lineChartData, isFilterSelectedLegends = false) {
183
- const { allowMultipleShapesForPoints = false } = props;
184
- // Apply filter only if isPropChange is true
185
- const filteredData = isFilterSelectedLegends ? lineChartData === null || lineChartData === void 0 ? void 0 : lineChartData.filter((item)=>{
186
- var _props_legendProps_selectedLegends, _props_legendProps, _props_legendProps1;
187
- 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;
188
- }) : lineChartData;
189
- var _filteredData_some;
190
- _hasMarkersMode = (_filteredData_some = filteredData === null || filteredData === void 0 ? void 0 : filteredData.some((item)=>{
191
- var _item_lineOptions_mode_includes, _item_lineOptions_mode, _item_lineOptions;
192
- return (_item_lineOptions = item.lineOptions) === null || _item_lineOptions === void 0 ? void 0 : (_item_lineOptions_mode = _item_lineOptions.mode) === null || _item_lineOptions_mode === void 0 ? void 0 : (_item_lineOptions_mode_includes = _item_lineOptions_mode.includes) === null || _item_lineOptions_mode_includes === void 0 ? void 0 : _item_lineOptions_mode_includes.call(_item_lineOptions_mode, 'markers');
193
- })) !== null && _filteredData_some !== void 0 ? _filteredData_some : false;
194
- _isScatterPolar = isScatterPolarSeries(filteredData);
195
- return filteredData ? filteredData.map((item, index)=>{
196
- let color;
197
- if (typeof item.color === 'undefined') {
198
- color = getNextColor(index, 0);
199
- } else {
200
- color = getColorFromToken(item.color);
201
- }
202
- return {
203
- ...item,
204
- index: allowMultipleShapesForPoints ? index : -1,
205
- color
206
- };
207
- }) : [];
208
- }
209
- function updatePosition(newX, newY) {
210
- const threshold = 1; // Set a threshold for movement
211
- const { x, y } = clickPosition;
212
- // Calculate the distance moved
213
- const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));
214
- // Update the position only if the distance moved is greater than the threshold
215
- if (distance > threshold) {
216
- setClickPosition({
217
- x: newX,
218
- y: newY
219
- });
220
- setPopoverOpen(true);
221
- }
222
- }
223
- function _getCustomizedCallout() {
224
- return props.onRenderCalloutPerStack ? props.onRenderCalloutPerStack(stackCalloutProps) : props.onRenderCalloutPerDataPoint ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps) : null;
225
- }
226
- function _getNumericMinMaxOfY(points, yAxisType, useSecondaryYScale) {
227
- const { startValue, endValue } = findNumericMinMaxOfY(points, yAxisType, useSecondaryYScale, useSecondaryYScale ? props.secondaryYScaleType : props.yScaleType);
228
- let yPadding = {
229
- start: 0,
230
- end: 0
231
- };
232
- if (_hasMarkersMode) {
233
- yPadding = getDomainPaddingForMarkers(startValue, endValue, useSecondaryYScale ? props.secondaryYScaleType : props.yScaleType);
234
- }
235
- return {
236
- startValue: startValue - yPadding.start,
237
- endValue: endValue + yPadding.end
238
- };
239
- }
240
- function _getMargins(_margins) {
241
- margins = _margins;
242
- }
243
- function _initializeLineChartData(xScale, yScalePrimary, containerHeight, containerWidth, xElement, yAxisElement, yScaleSecondary) {
244
- _xAxisScale = xScale;
245
- _yScalePrimary = yScalePrimary;
246
- _yScaleSecondary = yScaleSecondary;
247
- _renderedColorFillBars = props.colorFillBars ? _createColorFillBars(containerHeight) : [];
248
- lines = _createLines(xElement, containerHeight);
249
- }
250
- function _handleSingleLegendSelectionAction(lineChartItem) {
251
- if (selectedLegend === lineChartItem.legend) {
252
- setSelectedLegend('');
253
- _handleLegendClick(lineChartItem, null);
254
- } else {
255
- setSelectedLegend(lineChartItem.legend);
256
- _handleLegendClick(lineChartItem, lineChartItem.legend);
257
- }
258
- }
259
- function _onHoverCardHide() {
260
- setSelectedLegendPoints([]);
261
- setSelectedColorBarLegend([]);
262
- setIsSelectedLegend(false);
263
- }
264
- function _handleLegendClick(lineChartItem, selectedLegend) {
265
- if (lineChartItem.onLegendClick) {
266
- lineChartItem.onLegendClick(selectedLegend);
267
- }
268
- }
269
- function _createLegends(data) {
270
- const { legendProps, allowMultipleShapesForPoints = false } = props;
271
- const isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);
272
- const mapLegendToPoints = {};
273
- data.forEach((point)=>{
274
- if (point.legend) {
275
- if (!mapLegendToPoints[point.legend]) {
276
- mapLegendToPoints[point.legend] = [];
277
- }
278
- mapLegendToPoints[point.legend].push(point);
279
- }
280
- });
281
- const legendDataItems = Object.entries(mapLegendToPoints).map(([legendTitle, points])=>{
282
- const representativePoint = points[0];
283
- // mapping data to the format Legends component needs
284
- const legend = {
285
- title: legendTitle,
286
- color: representativePoint.color,
287
- action: ()=>{
288
- if (isLegendMultiSelectEnabled) {
289
- points.forEach((p)=>_handleMultipleLineLegendSelectionAction(p));
290
- } else {
291
- points.forEach((p)=>_handleSingleLegendSelectionAction(p));
292
- }
293
- },
294
- onMouseOutAction: ()=>{
295
- setActiveLegend('');
296
- },
297
- hoverAction: ()=>{
298
- _handleChartMouseLeave();
299
- setActiveLegend(legendTitle);
300
- },
301
- ...representativePoint.legendShape && {
302
- shape: representativePoint.legendShape
303
- },
304
- ...allowMultipleShapesForPoints && {
305
- shape: Points[representativePoint.index % Object.keys(pointTypes).length]
306
- }
307
- };
308
- return legend;
309
- });
310
- const colorFillBarsLegendDataItems = props.colorFillBars ? props.colorFillBars.map((colorFillBar, index)=>{
311
- const title = colorFillBar.legend;
312
- const color = getColorFromToken(colorFillBar.color);
313
- const legend = {
314
- title,
315
- color,
316
- action: ()=>{
317
- if (isLegendMultiSelectEnabled) {
318
- _handleMultipleColorFillBarLegendSelectionAction(colorFillBar);
319
- } else {
320
- _handleSingleLegendSelectionAction(colorFillBar);
321
- }
322
- },
323
- onMouseOutAction: ()=>{
324
- setActiveLegend('');
325
- },
326
- hoverAction: ()=>{
327
- _handleChartMouseLeave();
328
- setActiveLegend(title);
329
- },
330
- opacity: _getColorFillBarOpacity(colorFillBar),
331
- stripePattern: colorFillBar.applyPattern
332
- };
333
- return legend;
334
- }) : [];
335
- return /*#__PURE__*/ React.createElement(Legends, {
336
- legends: [
337
- ...legendDataItems,
338
- ...colorFillBarsLegendDataItems
339
- ],
340
- enabledWrapLines: props.enabledLegendsWrapLines,
341
- overflowText: props.legendsOverflowText,
342
- ...isLegendMultiSelectEnabled && {
343
- onLegendHoverCardLeave: _onHoverCardHide
344
- },
345
- ...props.legendProps,
346
- legendRef: _legendsRef
347
- });
348
- }
349
- function _getBoxWidthOfShape(pointId, pointIndex, isLastPoint) {
350
- const { allowMultipleShapesForPoints = false, strokeWidth = DEFAULT_LINE_STROKE_SIZE } = props;
351
- if (allowMultipleShapesForPoints) {
352
- if (activePoint === pointId) {
353
- return 11;
354
- } else if (pointIndex === 1 || isLastPoint) {
355
- return strokeWidth * PATH_MULTIPLY_SIZE;
356
- } else {
357
- return 1;
358
- }
359
- } else {
360
- if (activePoint === pointId) {
361
- return 11;
362
- } else {
363
- return 1;
364
- }
365
- }
366
- }
367
- function _getPath(xPos, yPos, pointId, pointIndex, isLastPoint, pointOftheLine) {
368
- const { allowMultipleShapesForPoints = false } = props;
369
- let w = _getBoxWidthOfShape(pointId, pointIndex, isLastPoint);
370
- const index = allowMultipleShapesForPoints ? pointOftheLine % Object.keys(pointTypes).length : 0;
371
- const widthRatio = pointTypes[index].widthRatio;
372
- w = widthRatio > 1 ? w / widthRatio : w;
373
- return _getPointPath(xPos, yPos, w, index);
374
- }
375
- function _getPointFill(lineColor, pointId, pointIndex, isLastPoint) {
376
- const { allowMultipleShapesForPoints = false } = props;
377
- if (allowMultipleShapesForPoints) {
378
- if (pointIndex === 1 || isLastPoint) {
379
- if (activePoint === pointId) {
380
- return tokens.colorNeutralBackground1;
381
- } else {
382
- return lineColor;
383
- }
384
- } else {
385
- if (activePoint === pointId) {
386
- return tokens.colorNeutralBackground1;
387
- } else {
388
- return lineColor;
389
- }
390
- }
391
- } else {
392
- if (activePoint === pointId) {
393
- return tokens.colorNeutralBackground1;
394
- } else {
395
- return lineColor;
396
- }
397
- }
398
- }
399
- function _createLines(xElement, containerHeight) {
400
- const lines = [];
401
- if (isSelectedLegend) {
402
- _points = selectedLegendPoints;
403
- } else {
404
- _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);
405
- }
406
- const maxMarkerSize = d3Max(_points, (point)=>{
407
- return d3Max(point.data, (item)=>{
408
- return item.markerSize;
409
- });
410
- });
411
- for(let i = _points.length - 1; i >= 0; i--){
412
- var _points_i_gaps, _points_i_lineOptions, _points_i_lineOptions1;
413
- const linesForLine = [];
414
- const bordersForLine = [];
415
- const pointsForLine = [];
416
- const legendVal = _points[i].legend;
417
- const lineColor = _points[i].color;
418
- const verticaLineHeight = containerHeight - margins.bottom + 6;
419
- const useSecondaryYScale = !!(_points[i].useSecondaryYScale && _yScaleSecondary);
420
- const yScale = useSecondaryYScale ? _yScaleSecondary : _yScalePrimary;
421
- const extraMaxPixels = _hasMarkersMode ? getRangeForScatterMarkerSize({
422
- data: _points,
423
- xScale: _xAxisScale,
424
- yScalePrimary: _yScalePrimary,
425
- yScaleSecondary: _yScaleSecondary,
426
- useSecondaryYScale,
427
- xScaleType: props.xScaleType,
428
- yScaleType: props.yScaleType,
429
- secondaryYScaleType: props.secondaryYScaleType
430
- }) : 0;
431
- if (_points[i].data.length === 1) {
432
- const { x: x1, y: y1, xAxisCalloutData, xAxisCalloutAccessibilityData } = _points[i].data[0];
433
- const xPoint = _xAxisScale(x1);
434
- const yPoint = yScale(y1);
435
- if (isPlottable(xPoint, yPoint)) {
436
- var _points_i_lineOptions_mode, _points_i_lineOptions2;
437
- const circleId = `${_circleId}_${i}`;
438
- const isLegendSelected = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;
439
- const currentMarkerSize = _points[i].data[0].markerSize;
440
- const supportsTextMode = (_points_i_lineOptions2 = _points[i].lineOptions) === null || _points_i_lineOptions2 === void 0 ? void 0 : (_points_i_lineOptions_mode = _points_i_lineOptions2.mode) === null || _points_i_lineOptions_mode === void 0 ? void 0 : _points_i_lineOptions_mode.includes('text');
441
- const text = _points[i].data[0].text;
442
- const targetElement = document.getElementById(circleId);
443
- var _points_i_data__text;
444
- pointsForLine.push(/*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(React.Fragment, {
445
- key: `${circleId}_fragment`
446
- }, /*#__PURE__*/ React.createElement("circle", {
447
- id: circleId,
448
- key: circleId,
449
- r: calculateMarkerRadius({
450
- pointMarkerSize: currentMarkerSize,
451
- minMarkerSize: 0,
452
- maxMarkerSize,
453
- extraMaxPixels,
454
- isContinuousXY: true,
455
- isActive: activePoint === circleId
456
- }),
457
- cx: xPoint,
458
- cy: yPoint,
459
- fill: activePoint === circleId ? tokens.colorNeutralBackground1 : lineColor,
460
- opacity: isLegendSelected ? 1 : 0.1,
461
- tabIndex: isLegendSelected ? 0 : undefined,
462
- onMouseOver: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale, legendVal, lineColor, targetElement),
463
- onMouseMove: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale, legendVal, lineColor, targetElement),
464
- onMouseOut: _handleMouseOut,
465
- strokeWidth: activePoint === circleId ? DEFAULT_LINE_STROKE_SIZE : 0,
466
- stroke: activePoint === circleId ? lineColor : '',
467
- role: "img",
468
- "aria-label": (_points_i_data__text = _points[i].data[0].text) !== null && _points_i_data__text !== void 0 ? _points_i_data__text : _getAriaLabel(i, 0),
469
- ref: (e)=>{
470
- _refCallback(e, circleId);
471
- },
472
- onFocus: (event)=>_handleFocus(event, circleId, x1, xAxisCalloutData, circleId, targetElement, xAxisCalloutAccessibilityData),
473
- onBlur: _handleMouseOut,
474
- ..._getClickHandler(_points[i].data[0].onDataPointClick)
475
- }), !_isScatterPolar && supportsTextMode && text && /*#__PURE__*/ React.createElement("text", {
476
- key: `${circleId}-label`,
477
- x: xPoint,
478
- y: yPoint + Math.max(currentMarkerSize ? currentMarkerSize * extraMaxPixels / maxMarkerSize : 3.5, 4) + 12,
479
- className: classes.markerLabel,
480
- opacity: isLegendSelected ? 1 : 0.1
481
- }, text))));
482
- }
483
- }
484
- let gapIndex = 0;
485
- var _points_i_gaps_sort;
486
- 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 : [];
487
- const lineCurve = (_points_i_lineOptions = _points[i].lineOptions) === null || _points_i_lineOptions === void 0 ? void 0 : _points_i_lineOptions.curve;
488
- // Use path rendering technique for larger datasets to optimize performance.
489
- if ((props.optimizeLargeData || lineCurve) && _points[i].data.length > 1) {
490
- var _points_i_lineOptions3, _points_i_lineOptions4;
491
- const line = d3Line()// eslint-disable-next-line @typescript-eslint/no-explicit-any
492
- .x((d)=>_xAxisScale(d[0]))// eslint-disable-next-line @typescript-eslint/no-explicit-any
493
- .y((d)=>yScale(d[1])).curve(getCurveFactory(lineCurve)).defined((d)=>isPlottable(_xAxisScale(d[0]), yScale(d[1])));
494
- const lineId = `${_lineId}_${i}`;
495
- const borderId = `${_borderId}_${i}`;
496
- const strokeWidth = ((_points_i_lineOptions3 = _points[i].lineOptions) === null || _points_i_lineOptions3 === void 0 ? void 0 : _points_i_lineOptions3.strokeWidth) || props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
497
- const isLegendSelected = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;
498
- const lineData = [];
499
- for(let k = 0; k < _points[i].data.length; k++){
500
- lineData.push([
501
- _points[i].data[k].x instanceof Date ? _points[i].data[k].x.getTime() : _points[i].data[k].x,
502
- _points[i].data[k].y
503
- ]);
504
- }
505
- // Check if lines should be drawn based on mode
506
- const lineMode = (_points_i_lineOptions4 = _points[i].lineOptions) === null || _points_i_lineOptions4 === void 0 ? void 0 : _points_i_lineOptions4.mode;
507
- const shouldDrawLines = lineMode !== 'markers';
508
- if (shouldDrawLines && isLegendSelected) {
509
- var _points_i_lineOptions5, _points_i_lineOptions6, _points_i_lineOptions7;
510
- const lineBorderWidth = ((_points_i_lineOptions5 = _points[i].lineOptions) === null || _points_i_lineOptions5 === void 0 ? void 0 : _points_i_lineOptions5.lineBorderWidth) ? Number.parseFloat(_points[i].lineOptions.lineBorderWidth.toString()) : 0;
511
- if (lineBorderWidth > 0) {
512
- var _points_i_lineOptions8, _points_i_lineOptions9;
513
- var _points_i_lineOptions_strokeLinecap;
514
- bordersForLine.push(/*#__PURE__*/ React.createElement("path", {
515
- id: borderId,
516
- key: borderId,
517
- d: line(lineData),
518
- fill: "transparent",
519
- strokeLinecap: (_points_i_lineOptions_strokeLinecap = (_points_i_lineOptions8 = _points[i].lineOptions) === null || _points_i_lineOptions8 === void 0 ? void 0 : _points_i_lineOptions8.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap !== void 0 ? _points_i_lineOptions_strokeLinecap : 'round',
520
- strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth,
521
- stroke: ((_points_i_lineOptions9 = _points[i].lineOptions) === null || _points_i_lineOptions9 === void 0 ? void 0 : _points_i_lineOptions9.lineBorderColor) || tokens.colorNeutralBackground1,
522
- opacity: 1
523
- }));
524
- }
525
- var _points_i_lineOptions_strokeLinecap1;
526
- linesForLine.push(/*#__PURE__*/ React.createElement("path", {
527
- id: lineId,
528
- key: lineId,
529
- d: line(lineData),
530
- fill: "transparent",
531
- stroke: lineColor,
532
- strokeWidth: strokeWidth,
533
- strokeLinecap: (_points_i_lineOptions_strokeLinecap1 = (_points_i_lineOptions6 = _points[i].lineOptions) === null || _points_i_lineOptions6 === void 0 ? void 0 : _points_i_lineOptions6.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap1 !== void 0 ? _points_i_lineOptions_strokeLinecap1 : 'round',
534
- strokeDasharray: (_points_i_lineOptions7 = _points[i].lineOptions) === null || _points_i_lineOptions7 === void 0 ? void 0 : _points_i_lineOptions7.strokeDasharray,
535
- onMouseMove: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
536
- onMouseOver: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
537
- onMouseOut: _handleMouseOut,
538
- ..._getClickHandler(_points[i].onLineClick),
539
- opacity: 1,
540
- tabIndex: isLegendSelected ? 0 : undefined
541
- }));
542
- } else if (shouldDrawLines) {
543
- var _points_i_lineOptions10, _points_i_lineOptions11;
544
- var _points_i_lineOptions_strokeLinecap2;
545
- linesForLine.push(/*#__PURE__*/ React.createElement("path", {
546
- id: lineId,
547
- key: lineId,
548
- d: line(lineData),
549
- fill: "transparent",
550
- tabIndex: -1,
551
- stroke: lineColor,
552
- strokeWidth: strokeWidth,
553
- strokeLinecap: (_points_i_lineOptions_strokeLinecap2 = (_points_i_lineOptions10 = _points[i].lineOptions) === null || _points_i_lineOptions10 === void 0 ? void 0 : _points_i_lineOptions10.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap2 !== void 0 ? _points_i_lineOptions_strokeLinecap2 : 'round',
554
- strokeDasharray: (_points_i_lineOptions11 = _points[i].lineOptions) === null || _points_i_lineOptions11 === void 0 ? void 0 : _points_i_lineOptions11.strokeDasharray,
555
- opacity: 0.1
556
- }));
557
- }
558
- // Always add the highlight circle for large dataset hover
559
- pointsForLine.push(/*#__PURE__*/ React.createElement("circle", {
560
- id: `${_staticHighlightCircle}_${i}`,
561
- key: `${_staticHighlightCircle}_${i}`,
562
- r: 5.5,
563
- cx: 0,
564
- cy: 0,
565
- fill: tokens.colorNeutralBackground1,
566
- strokeWidth: DEFAULT_LINE_STROKE_SIZE,
567
- tabIndex: isLegendSelected ? 0 : undefined,
568
- stroke: lineColor,
569
- visibility: 'hidden',
570
- onMouseMove: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
571
- onMouseOver: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
572
- onMouseOut: _handleMouseOut
573
- }));
574
- // Add individual markers if mode includes 'markers'
575
- const showMarkers = !!(lineMode === null || lineMode === void 0 ? void 0 : lineMode.includes('markers'));
576
- if (showMarkers) {
577
- for(let k = 0; k < _points[i].data.length; k++){
578
- const { x, y } = _points[i].data[k];
579
- const xPoint = _xAxisScale(x instanceof Date ? x.getTime() : x);
580
- const yPoint = yScale(y);
581
- if (isPlottable(xPoint, yPoint)) {
582
- var _points_i_data_k, _points_i;
583
- const markerSize = _points[i].data[k].markerSize;
584
- const perPointColor = (_points_i_data_k = _points[i].data[k]) === null || _points_i_data_k === void 0 ? void 0 : _points_i_data_k.markerColor;
585
- var _points_i_data_k_text;
586
- pointsForLine.push(/*#__PURE__*/ React.createElement("circle", {
587
- key: `${_circleId}_${i}_${k}_marker`,
588
- r: calculateMarkerRadius({
589
- pointMarkerSize: markerSize,
590
- minMarkerSize: 0,
591
- maxMarkerSize,
592
- extraMaxPixels,
593
- isContinuousXY: true,
594
- isActive: activePoint === _circleId
595
- }),
596
- cx: xPoint,
597
- cy: yPoint,
598
- fill: activePoint === _circleId ? tokens.colorNeutralBackground1 : perPointColor || ((_points_i = _points[i]) === null || _points_i === void 0 ? void 0 : _points_i.color) || lineColor,
599
- tabIndex: isLegendSelected ? 0 : undefined,
600
- stroke: perPointColor || lineColor,
601
- strokeWidth: 1,
602
- opacity: isLegendSelected ? 1 : 0.1,
603
- onMouseMove: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
604
- onMouseOver: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
605
- onFocus: (event)=>_onFocusLargeDataset(i, verticaLineHeight, event, yScale, k),
606
- onMouseOut: _handleMouseOut,
607
- role: "img",
608
- "aria-label": (_points_i_data_k_text = _points[i].data[k].text) !== null && _points_i_data_k_text !== void 0 ? _points_i_data_k_text : _getAriaLabel(i, k)
609
- }));
610
- }
611
- }
612
- }
613
- } else if (!props.optimizeLargeData) {
614
- for(let j = 1; j < _points[i].data.length; j++){
615
- var _points_i_lineOptions12, _points_i_lineOptions_mode1, _points_i_lineOptions13, _points_i_lineOptions_mode2, _points_i_lineOptions14;
616
- const gapResult = _checkInGap(j, gaps, gapIndex);
617
- const isInGap = gapResult.isInGap;
618
- gapIndex = gapResult.gapIndex;
619
- const lineId = `${_lineId}_${i}_${j}`;
620
- const borderId = `${_borderId}_${i}_${j}`;
621
- const circleId = `${_circleId}_${i}_${j}`;
622
- const { x: x1, y: y1, xAxisCalloutData, xAxisCalloutAccessibilityData } = _points[i].data[j - 1];
623
- const { x: x2, y: y2 } = _points[i].data[j];
624
- const xPoint1 = _xAxisScale(x1);
625
- const yPoint1 = yScale(y1);
626
- const xPoint2 = _xAxisScale(x2);
627
- const yPoint2 = yScale(y2);
628
- const strokeWidth = ((_points_i_lineOptions12 = _points[i].lineOptions) === null || _points_i_lineOptions12 === void 0 ? void 0 : _points_i_lineOptions12.strokeWidth) || props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
629
- const isLegendSelected = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;
630
- const currentPointHidden = _points[i].hideNonActiveDots && activePoint !== circleId;
631
- const supportsTextMode = (_points_i_lineOptions13 = _points[i].lineOptions) === null || _points_i_lineOptions13 === void 0 ? void 0 : (_points_i_lineOptions_mode1 = _points_i_lineOptions13.mode) === null || _points_i_lineOptions_mode1 === void 0 ? void 0 : _points_i_lineOptions_mode1.includes('text');
632
- const text = _points[i].data[j - 1].text;
633
- let currentMarkerSize = _points[i].data[j - 1].markerSize;
634
- if (isPlottable(xPoint1, yPoint1)) {
635
- var _points_i_lineOptions_mode3, _points_i_lineOptions15, _points_i_data_, _points_i_data_1, _points_i_data_2, _points_i_data_3;
636
- const path = _getPath(xPoint1, yPoint1, circleId, j, false, _points[i].index);
637
- const targetElement = document.getElementById(circleId);
638
- var _points_i_data__text1;
639
- pointsForLine.push(((_points_i_lineOptions15 = _points[i].lineOptions) === null || _points_i_lineOptions15 === void 0 ? void 0 : (_points_i_lineOptions_mode3 = _points_i_lineOptions15.mode) === null || _points_i_lineOptions_mode3 === void 0 ? void 0 : _points_i_lineOptions_mode3.includes('markers')) || supportsTextMode ? /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("circle", {
640
- id: circleId,
641
- key: circleId,
642
- r: calculateMarkerRadius({
643
- pointMarkerSize: currentMarkerSize,
644
- minMarkerSize: 0,
645
- maxMarkerSize,
646
- extraMaxPixels,
647
- isContinuousXY: true,
648
- isActive: activePoint === circleId
649
- }),
650
- cx: xPoint1,
651
- cy: yPoint1,
652
- tabIndex: isLegendSelected ? 0 : undefined,
653
- onMouseOver: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale, legendVal, lineColor, targetElement),
654
- onMouseMove: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale, legendVal, lineColor, targetElement),
655
- onMouseOut: _handleMouseOut,
656
- onFocus: (event)=>_handleFocus(event, lineId, x1, xAxisCalloutData, circleId, targetElement, xAxisCalloutAccessibilityData),
657
- onBlur: _handleMouseOut,
658
- ..._getClickHandler(_points[i].data[j - 1].onDataPointClick),
659
- opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01,
660
- fill: ((_points_i_data_ = _points[i].data[j - 1]) === null || _points_i_data_ === void 0 ? void 0 : _points_i_data_.markerColor) || _getPointFill(lineColor, circleId, j, false),
661
- stroke: ((_points_i_data_1 = _points[i].data[j - 1]) === null || _points_i_data_1 === void 0 ? void 0 : _points_i_data_1.markerColor) || lineColor,
662
- strokeWidth: strokeWidth,
663
- role: "img",
664
- "aria-label": (_points_i_data__text1 = _points[i].data[j - 1].text) !== null && _points_i_data__text1 !== void 0 ? _points_i_data__text1 : _getAriaLabel(i, j - 1)
665
- }), !_isScatterPolar && supportsTextMode && text && /*#__PURE__*/ React.createElement("text", {
666
- key: `${circleId}-label`,
667
- x: xPoint1,
668
- y: yPoint1 + calculateMarkerRadius({
669
- pointMarkerSize: currentMarkerSize,
670
- minMarkerSize: 0,
671
- maxMarkerSize,
672
- extraMaxPixels,
673
- isContinuousXY: true
674
- }) + 12,
675
- className: classes.markerLabel,
676
- opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01
677
- }, text)) : /*#__PURE__*/ React.createElement("path", {
678
- id: circleId,
679
- key: circleId,
680
- d: path,
681
- onMouseOver: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale, legendVal, lineColor, targetElement),
682
- onMouseMove: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale, legendVal, lineColor, targetElement),
683
- onMouseOut: _handleMouseOut,
684
- onFocus: (event)=>_handleFocus(event, lineId, x1, xAxisCalloutData, circleId, targetElement, xAxisCalloutAccessibilityData),
685
- onBlur: _handleMouseOut,
686
- ..._getClickHandler(_points[i].data[j - 1].onDataPointClick),
687
- opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01,
688
- fill: ((_points_i_data_2 = _points[i].data[j - 1]) === null || _points_i_data_2 === void 0 ? void 0 : _points_i_data_2.markerColor) || _getPointFill(lineColor, circleId, j, false),
689
- stroke: ((_points_i_data_3 = _points[i].data[j - 1]) === null || _points_i_data_3 === void 0 ? void 0 : _points_i_data_3.markerColor) || lineColor,
690
- strokeWidth: strokeWidth,
691
- role: "img",
692
- "aria-label": _getAriaLabel(i, j - 1),
693
- tabIndex: isLegendSelected ? 0 : undefined
694
- }));
695
- }
696
- if (j + 1 === _points[i].data.length) {
697
- var _points_i_lineOptions_mode4, _points_i_lineOptions16;
698
- // If this is last point of the line segment.
699
- const lastCircleId = `${circleId}${j}L`;
700
- const hiddenHoverCircleId = `${circleId}${j}D`;
701
- const lastPointHidden = _points[i].hideNonActiveDots && activePoint !== lastCircleId;
702
- const { xAxisCalloutData: lastCirlceXCallout, xAxisCalloutAccessibilityData: lastCirlceXCalloutAccessibilityData } = _points[i].data[j];
703
- currentMarkerSize = _points[i].data[j].markerSize;
704
- const lastSupportsTextMode = (_points_i_lineOptions16 = _points[i].lineOptions) === null || _points_i_lineOptions16 === void 0 ? void 0 : (_points_i_lineOptions_mode4 = _points_i_lineOptions16.mode) === null || _points_i_lineOptions_mode4 === void 0 ? void 0 : _points_i_lineOptions_mode4.includes('text');
705
- const lastText = _points[i].data[j].text;
706
- if (isPlottable(xPoint2, yPoint2)) {
707
- var _points_i_lineOptions_mode5, _points_i_lineOptions17, _points_i_data_j, _points_i_data_j1;
708
- const path = _getPath(xPoint2, yPoint2, lastCircleId, j, true, _points[i].index);
709
- const targetElement = document.getElementById(lastCircleId);
710
- var _points_i_data_j_text;
711
- pointsForLine.push(/*#__PURE__*/ React.createElement(React.Fragment, {
712
- key: `${lastCircleId}_container`
713
- }, ((_points_i_lineOptions17 = _points[i].lineOptions) === null || _points_i_lineOptions17 === void 0 ? void 0 : (_points_i_lineOptions_mode5 = _points_i_lineOptions17.mode) === null || _points_i_lineOptions_mode5 === void 0 ? void 0 : _points_i_lineOptions_mode5.includes('markers')) || lastSupportsTextMode ? /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("circle", {
714
- id: lastCircleId,
715
- key: lastCircleId,
716
- r: calculateMarkerRadius({
717
- pointMarkerSize: currentMarkerSize,
718
- minMarkerSize: 0,
719
- maxMarkerSize,
720
- extraMaxPixels,
721
- isContinuousXY: true,
722
- isActive: activePoint === lastCircleId
723
- }),
724
- cx: xPoint2,
725
- cy: yPoint2,
726
- tabIndex: isLegendSelected ? 0 : undefined,
727
- onMouseOver: (event)=>_handleHover(x2, y2, verticaLineHeight, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData, event, yScale, legendVal, lineColor, targetElement),
728
- onMouseMove: (event)=>_handleHover(x2, y2, verticaLineHeight, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData, event, yScale, legendVal, lineColor, targetElement),
729
- onMouseOut: _handleMouseOut,
730
- onFocus: (event)=>_handleFocus(event, lineId, x2, lastCirlceXCallout, lastCircleId, targetElement, lastCirlceXCalloutAccessibilityData),
731
- onBlur: _handleMouseOut,
732
- ..._getClickHandler(_points[i].data[j].onDataPointClick),
733
- opacity: isLegendSelected && !lastPointHidden ? 1 : 0.01,
734
- fill: _getPointFill(lineColor, lastCircleId, j, true),
735
- stroke: lineColor,
736
- strokeWidth: strokeWidth,
737
- role: "img",
738
- "aria-label": (_points_i_data_j_text = _points[i].data[j].text) !== null && _points_i_data_j_text !== void 0 ? _points_i_data_j_text : _getAriaLabel(i, j)
739
- }), !_isScatterPolar && lastSupportsTextMode && lastText && /*#__PURE__*/ React.createElement("text", {
740
- key: `${lastCircleId}-label`,
741
- x: xPoint2,
742
- y: yPoint2 + calculateMarkerRadius({
743
- pointMarkerSize: currentMarkerSize,
744
- minMarkerSize: 0,
745
- maxMarkerSize,
746
- extraMaxPixels,
747
- isContinuousXY: true
748
- }) + 12,
749
- className: classes.markerLabel
750
- }, text)) : /*#__PURE__*/ React.createElement("path", {
751
- id: lastCircleId,
752
- key: lastCircleId,
753
- d: path,
754
- onMouseOver: (event)=>_handleHover(x2, y2, verticaLineHeight, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData, event, yScale, legendVal, lineColor, targetElement),
755
- onMouseMove: (event)=>_handleHover(x2, y2, verticaLineHeight, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData, event, yScale, legendVal, lineColor, targetElement),
756
- onMouseOut: _handleMouseOut,
757
- onFocus: (event)=>_handleFocus(event, lineId, x2, lastCirlceXCallout, lastCircleId, targetElement, lastCirlceXCalloutAccessibilityData),
758
- onBlur: _handleMouseOut,
759
- ..._getClickHandler(_points[i].data[j].onDataPointClick),
760
- opacity: isLegendSelected && !lastPointHidden ? 1 : 0.01,
761
- fill: ((_points_i_data_j = _points[i].data[j]) === null || _points_i_data_j === void 0 ? void 0 : _points_i_data_j.markerColor) || _getPointFill(lineColor, lastCircleId, j, true),
762
- stroke: ((_points_i_data_j1 = _points[i].data[j]) === null || _points_i_data_j1 === void 0 ? void 0 : _points_i_data_j1.markerColor) || lineColor,
763
- strokeWidth: strokeWidth,
764
- role: "img",
765
- "aria-label": _getAriaLabel(i, j),
766
- tabIndex: isLegendSelected ? 0 : undefined
767
- }), /*#__PURE__*/ React.createElement("circle", {
768
- id: hiddenHoverCircleId,
769
- key: hiddenHoverCircleId,
770
- r: 8,
771
- cx: xPoint2,
772
- cy: yPoint2,
773
- opacity: 0,
774
- width: 0,
775
- onMouseOver: (event)=>_handleHover(x2, y2, verticaLineHeight, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData, event, yScale, legendVal, lineColor, targetElement),
776
- onMouseMove: (event)=>_handleHover(x2, y2, verticaLineHeight, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData, event, yScale, legendVal, lineColor, targetElement),
777
- onMouseOut: _handleMouseOut,
778
- strokeWidth: 0,
779
- focusable: false,
780
- onBlur: _handleMouseOut
781
- })));
782
- }
783
- }
784
- if (isPlottable(xPoint1, yPoint1) && isPlottable(xPoint2, yPoint2) && (!_hasMarkersMode || ((_points_i_lineOptions14 = _points[i].lineOptions) === null || _points_i_lineOptions14 === void 0 ? void 0 : (_points_i_lineOptions_mode2 = _points_i_lineOptions14.mode) === null || _points_i_lineOptions_mode2 === void 0 ? void 0 : _points_i_lineOptions_mode2.includes('lines')))) {
785
- if (isLegendSelected) {
786
- // don't draw line if it is in a gap
787
- if (!isInGap) {
788
- var _points_i_lineOptions18, _points_i_lineOptions19, _points_i_lineOptions20, _points_i_lineOptions21;
789
- const lineBorderWidth = ((_points_i_lineOptions18 = _points[i].lineOptions) === null || _points_i_lineOptions18 === void 0 ? void 0 : _points_i_lineOptions18.lineBorderWidth) ? Number.parseFloat(_points[i].lineOptions.lineBorderWidth.toString()) : 0;
790
- const targetElement = document.getElementById(circleId);
791
- if (lineBorderWidth > 0) {
792
- var _points_i_lineOptions22, _points_i_lineOptions23;
793
- var _points_i_lineOptions_strokeLinecap3;
794
- bordersForLine.push(/*#__PURE__*/ React.createElement("line", {
795
- id: borderId,
796
- key: borderId,
797
- x1: xPoint1,
798
- y1: yPoint1,
799
- x2: xPoint2,
800
- y2: yPoint2,
801
- strokeLinecap: (_points_i_lineOptions_strokeLinecap3 = (_points_i_lineOptions22 = _points[i].lineOptions) === null || _points_i_lineOptions22 === void 0 ? void 0 : _points_i_lineOptions22.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap3 !== void 0 ? _points_i_lineOptions_strokeLinecap3 : 'round',
802
- strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth,
803
- stroke: ((_points_i_lineOptions23 = _points[i].lineOptions) === null || _points_i_lineOptions23 === void 0 ? void 0 : _points_i_lineOptions23.lineBorderColor) || tokens.colorNeutralBackground1,
804
- opacity: 1
805
- }));
806
- }
807
- var _points_i_lineOptions_strokeLinecap4;
808
- linesForLine.push(/*#__PURE__*/ React.createElement("line", {
809
- id: lineId,
810
- key: lineId,
811
- x1: xPoint1,
812
- y1: yPoint1,
813
- x2: xPoint2,
814
- y2: yPoint2,
815
- strokeWidth: strokeWidth,
816
- ref: (e)=>{
817
- _refCallback(e, lineId);
818
- },
819
- onMouseOver: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale, legendVal, lineColor, targetElement),
820
- onMouseMove: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale, legendVal, lineColor, targetElement),
821
- onMouseOut: _handleMouseOut,
822
- stroke: lineColor,
823
- strokeLinecap: (_points_i_lineOptions_strokeLinecap4 = (_points_i_lineOptions19 = _points[i].lineOptions) === null || _points_i_lineOptions19 === void 0 ? void 0 : _points_i_lineOptions19.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap4 !== void 0 ? _points_i_lineOptions_strokeLinecap4 : 'round',
824
- strokeDasharray: (_points_i_lineOptions20 = _points[i].lineOptions) === null || _points_i_lineOptions20 === void 0 ? void 0 : _points_i_lineOptions20.strokeDasharray,
825
- strokeDashoffset: (_points_i_lineOptions21 = _points[i].lineOptions) === null || _points_i_lineOptions21 === void 0 ? void 0 : _points_i_lineOptions21.strokeDashoffset,
826
- opacity: 1,
827
- ..._getClickHandler(_points[i].onLineClick)
828
- }));
829
- }
830
- } else {
831
- if (!isInGap) {
832
- var _points_i_lineOptions24, _points_i_lineOptions25, _points_i_lineOptions26;
833
- var _points_i_lineOptions_strokeLinecap5;
834
- linesForLine.push(/*#__PURE__*/ React.createElement("line", {
835
- id: lineId,
836
- key: lineId,
837
- x1: xPoint1,
838
- y1: yPoint1,
839
- x2: xPoint2,
840
- y2: yPoint2,
841
- strokeWidth: strokeWidth,
842
- stroke: lineColor,
843
- strokeLinecap: (_points_i_lineOptions_strokeLinecap5 = (_points_i_lineOptions24 = _points[i].lineOptions) === null || _points_i_lineOptions24 === void 0 ? void 0 : _points_i_lineOptions24.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap5 !== void 0 ? _points_i_lineOptions_strokeLinecap5 : 'round',
844
- strokeDasharray: (_points_i_lineOptions25 = _points[i].lineOptions) === null || _points_i_lineOptions25 === void 0 ? void 0 : _points_i_lineOptions25.strokeDasharray,
845
- strokeDashoffset: (_points_i_lineOptions26 = _points[i].lineOptions) === null || _points_i_lineOptions26 === void 0 ? void 0 : _points_i_lineOptions26.strokeDashoffset,
846
- opacity: 0.1
847
- }));
848
- }
849
- }
850
- }
851
- }
852
- }
853
- // Add filled area for scatterpolar charts
854
- const fillMode = (_points_i_lineOptions1 = _points[i].lineOptions) === null || _points_i_lineOptions1 === void 0 ? void 0 : _points_i_lineOptions1.fill;
855
- const isLegendSelected = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;
856
- if (fillMode === 'toself' && _points[i].data.length >= 3 && isLegendSelected && _isScatterPolar) {
857
- const getScaledXValue = (dataPoint)=>_xAxisScale(dataPoint.x instanceof Date ? dataPoint.x : dataPoint.x);
858
- const fillPathGenerator = d3Line().x((dataPoint)=>getScaledXValue(dataPoint)).y((dataPoint)=>yScale(dataPoint.y)).curve(getCurveFactory(lineCurve)).defined((dataPoint)=>isPlottable(getScaledXValue(dataPoint), yScale(dataPoint.y)));
859
- const fillPath = fillPathGenerator(_points[i].data);
860
- if (fillPath) {
861
- linesForLine.push(/*#__PURE__*/ React.createElement("path", {
862
- key: `scatterpolar_fill_${i}`,
863
- d: `${fillPath}Z`,
864
- fill: lineColor,
865
- fillOpacity: 0.5,
866
- stroke: lineColor,
867
- strokeWidth: 2,
868
- strokeOpacity: 0.8,
869
- pointerEvents: "none"
870
- }));
871
- }
872
- }
873
- if (_isScatterPolar) {
874
- var _points_i1;
875
- pointsForLine.push(...renderScatterPolarCategoryLabels({
876
- xAxisScale: _xAxisScale,
877
- yAxisScale: yScale,
878
- className: classes.markerLabel || '',
879
- lineOptions: (_points_i1 = _points[i]) === null || _points_i1 === void 0 ? void 0 : _points_i1.lineOptions
880
- }));
881
- }
882
- lines.push(/*#__PURE__*/ React.createElement("g", {
883
- key: `line_${i}`,
884
- role: "region",
885
- "aria-label": `${legendVal}, line ${i + 1} of ${_points.length} with ${_points[i].data.length} data points.`
886
- }, bordersForLine, linesForLine, pointsForLine));
887
- }
888
- return lines;
889
- }
890
- function _createColorFillBars(containerHeight) {
891
- const colorFillBars = [];
892
- if (isSelectedLegend) {
893
- _colorFillBars.current = selectedColorBarLegend;
894
- } else {
895
- _colorFillBars.current = props.colorFillBars;
896
- }
897
- const yMinMaxValues = findNumericMinMaxOfY(_points);
898
- const FILL_Y_PADDING = 3;
899
- for(let i = 0; i < _colorFillBars.current.length; i++){
900
- const colorFillBar = _colorFillBars.current[i];
901
- const colorFillBarId = `${_colorFillBarId}-${i}`;
902
- const color = getColorFromToken(colorFillBar.color);
903
- if (colorFillBar.applyPattern) {
904
- // Using a pattern element because CSS was unable to render diagonal stripes for rect elements
905
- colorFillBars.push(_getStripePattern(color, i));
906
- }
907
- for(let j = 0; j < colorFillBar.data.length; j++){
908
- const startX = colorFillBar.data[j].startX;
909
- const endX = colorFillBar.data[j].endX;
910
- const opacity = _legendHighlighted(colorFillBar.legend) || _noLegendHighlighted() || isSelectedLegend ? _getColorFillBarOpacity(colorFillBar) : 0.1;
911
- colorFillBars.push(/*#__PURE__*/ React.createElement("rect", {
912
- fill: colorFillBar.applyPattern ? `url(#${_colorFillBarPatternId}_${i})` : color,
913
- fillOpacity: opacity,
914
- x: _isRTL ? _xAxisScale(endX) : _xAxisScale(startX),
915
- y: _yScalePrimary(yMinMaxValues.endValue) - FILL_Y_PADDING,
916
- width: Math.abs(_xAxisScale(endX) - _xAxisScale(startX)),
917
- height: _yScalePrimary(props.yMinValue || 0) - _yScalePrimary(yMinMaxValues.endValue) + FILL_Y_PADDING,
918
- key: `${colorFillBarId}${j}`
919
- }));
920
- }
921
- }
922
- return colorFillBars;
923
- }
924
- function _getStripePattern(color, id) {
925
- // This describes a tile pattern that resembles diagonal stripes
926
- // For more information: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d
927
- const stripePath = 'M-4,4 l8,-8 M0,16 l16,-16 M12,20 l8,-8';
928
- return /*#__PURE__*/ React.createElement("pattern", {
929
- id: `${_colorFillBarPatternId}_${id}`,
930
- width: 16,
931
- height: 16,
932
- key: `${_colorFillBarPatternId}_${id}`,
933
- patternUnits: 'userSpaceOnUse'
934
- }, /*#__PURE__*/ React.createElement("path", {
935
- d: stripePath,
936
- stroke: color,
937
- strokeWidth: 1.25
938
- }));
939
- }
940
- function _checkInGap(pointIndex, gaps, currentGapIndex) {
941
- let gapIndex = currentGapIndex;
942
- let isInGap = false;
943
- while(gapIndex < gaps.length && pointIndex > gaps[gapIndex].endIndex){
944
- gapIndex++;
945
- }
946
- if (gapIndex < gaps.length && pointIndex > gaps[gapIndex].startIndex && pointIndex <= gaps[gapIndex].endIndex) {
947
- isInGap = true;
948
- }
949
- return {
950
- isInGap,
951
- gapIndex
952
- };
953
- }
954
- function _refCallback(element, legendTitle) {
955
- _refArray.push({
956
- index: legendTitle,
957
- refElement: element
958
- });
959
- }
960
- // Helper function to update highlight circle, vertical line, and callout for large datasets
961
- const _updateLargeDatasetHighlightAndCallout = (linenumber, lineHeight, pointToHighlight, xAxisCalloutData, formattedDate, yScale)=>{
962
- // Check if this point is plottable. If not, close the popover and return.
963
- const xPoint = _xAxisScale(pointToHighlight.x);
964
- const yPoint = yScale(pointToHighlight.y);
965
- if (!isPlottable(xPoint, yPoint)) {
966
- return;
967
- }
968
- const found = findCalloutPoints(calloutPointsRef.current, pointToHighlight.x);
969
- const pointToHighlightUpdated = nearestCircleToHighlight === null || nearestCircleToHighlight !== null && pointToHighlight !== null && (nearestCircleToHighlight.x !== pointToHighlight.x || nearestCircleToHighlight.y !== pointToHighlight.y);
970
- // if no points need to be called out then don't show vertical line and callout card
971
- if (found && pointToHighlightUpdated) {
972
- _uniqueCallOutID = `#${_staticHighlightCircle}_${linenumber}`;
973
- d3Select(`#${_staticHighlightCircle}_${linenumber}`).attr('cx', `${xPoint}`).attr('cy', `${yPoint}`).attr('visibility', 'visibility');
974
- d3Select(`#${_verticalLine}`).attr('transform', ()=>`translate(${xPoint}, ${yPoint})`).attr('visibility', 'visibility').attr('y2', `${lineHeight - 5 - yPoint}`);
975
- const targetElement = document.getElementById(`${_staticHighlightCircle}_${linenumber}`);
976
- const rect = targetElement.getBoundingClientRect();
977
- setNearestCircleToHighlight(pointToHighlight);
978
- updatePosition(rect.x, rect.y);
979
- setStackCalloutProps(found);
980
- setYValueHover(found.values);
981
- setDataPointCalloutProps(found);
982
- xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue(formattedDate);
983
- setActivePoint('');
984
- }
985
- if (!found) {
986
- setPopoverOpen(false);
987
- setNearestCircleToHighlight(pointToHighlight);
988
- setActivePoint('');
989
- }
990
- };
991
- const _onFocusLargeDataset = (linenumber, lineHeight, focusEvent, yScale, pointIndex)=>{
992
- focusEvent.persist();
993
- const { data } = props;
994
- const { lineChartData } = data;
995
- // For focus events, we use the provided point index directly
996
- const pointToHighlight = lineChartData[linenumber].data[pointIndex];
997
- if (!pointToHighlight) {
998
- return;
999
- }
1000
- const { xAxisCalloutData } = pointToHighlight;
1001
- const formattedDate = pointToHighlight.x instanceof Date ? formatDateToLocaleString(pointToHighlight.x, props.culture, props.useUTC) : pointToHighlight.x;
1002
- _updateLargeDatasetHighlightAndCallout(linenumber, lineHeight, pointToHighlight, xAxisCalloutData, formattedDate, yScale);
1003
- };
1004
- const _onMouseOverLargeDataset = (linenumber, lineHeight, mouseEvent, yScale)=>{
1005
- mouseEvent.persist();
1006
- const { data } = props;
1007
- const { lineChartData } = data;
1008
- // This will get the value of the X when mouse is on the chart
1009
- const xOffset = _xAxisScale.invert(pointer(mouseEvent)[0], document.getElementById(_rectId));
1010
- const i = bisect(lineChartData[linenumber].data, xOffset);
1011
- const d0 = lineChartData[linenumber].data[i - 1];
1012
- const d1 = lineChartData[linenumber].data[i];
1013
- let axisType = null;
1014
- let xPointToHighlight = 0;
1015
- let index = null;
1016
- if (d0 === undefined && d1 !== undefined) {
1017
- xPointToHighlight = d1.x;
1018
- index = i;
1019
- } else if (d0 !== undefined && d1 === undefined) {
1020
- xPointToHighlight = d0.x;
1021
- index = i - 1;
1022
- } else {
1023
- axisType = getTypeOfAxis(lineChartData[linenumber].data[0].x, true);
1024
- let x0;
1025
- let point0;
1026
- let point1;
1027
- switch(axisType){
1028
- case XAxisTypes.DateAxis:
1029
- x0 = new Date(xOffset).getTime();
1030
- point0 = d0.x.getTime();
1031
- point1 = d1.x.getTime();
1032
- xPointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;
1033
- index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;
1034
- break;
1035
- case XAxisTypes.NumericAxis:
1036
- x0 = xOffset;
1037
- point0 = d0.x;
1038
- point1 = d1.x;
1039
- xPointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;
1040
- index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;
1041
- break;
1042
- default:
1043
- break;
1044
- }
1045
- }
1046
- const { xAxisCalloutData } = lineChartData[linenumber].data[index];
1047
- const formattedDate = xPointToHighlight instanceof Date ? formatDateToLocaleString(xPointToHighlight, props.culture, props.useUTC) : xPointToHighlight;
1048
- const pointToHighlight = lineChartData[linenumber].data[index];
1049
- _updateLargeDatasetHighlightAndCallout(linenumber, lineHeight, pointToHighlight, xAxisCalloutData, formattedDate, yScale);
1050
- };
1051
- function _handleFocus(event, lineId, x, xAxisCalloutData, circleId, targetElement, xAxisCalloutAccessibilityData) {
1052
- _uniqueCallOutID = circleId;
1053
- const formattedData = x instanceof Date ? formatDateToLocaleString(x, props.culture, props.useUTC) : x;
1054
- const found = findCalloutPoints(calloutPointsRef.current, x);
1055
- // if no points need to be called out then don't show vertical line and callout card
1056
- if (found) {
1057
- d3Select(`#${_verticalLine}`).attr('transform', ()=>`translate(${_xAxisScale(x)}, 0)`).attr('visibility', 'visibility');
1058
- _refArray.forEach((obj)=>{
1059
- if (obj.index === lineId) {
1060
- setPopoverOpen(true);
1061
- xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);
1062
- setYValueHover(found.values);
1063
- setRefSelected(targetElement);
1064
- setStackCalloutProps(found);
1065
- setDataPointCalloutProps(found);
1066
- setActivePoint(circleId);
1067
- }
1068
- });
1069
- } else {
1070
- setActivePoint(circleId);
1071
- }
1072
- }
1073
- function _handleHover(x, y, lineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, mouseEvent, yScale, legendVal, lineColor, targetElement) {
1074
- mouseEvent === null || mouseEvent === void 0 ? void 0 : mouseEvent.persist();
1075
- const formattedData = x instanceof Date ? formatDateToLocaleString(x, props.culture, props.useUTC) : x;
1076
- const found = findCalloutPoints(calloutPointsRef.current, x);
1077
- let hoverDp = undefined;
1078
- if (props.isCalloutForStack === false && (found === null || found === void 0 ? void 0 : found.values)) {
1079
- const dp = find(found.values, (val)=>(val === null || val === void 0 ? void 0 : val.y) === y);
1080
- if (dp) {
1081
- hoverDp = {
1082
- x,
1083
- values: [
1084
- dp
1085
- ]
1086
- };
1087
- }
1088
- }
1089
- // if no points need to be called out then don't show vertical line and callout card
1090
- if (found) {
1091
- d3Select(`#${_verticalLine}`).attr('transform', ()=>`translate(${_xAxisScale(x)}, ${yScale(y)})`).attr('visibility', 'visibility').attr('y2', `${lineHeight - 5 - yScale(y)}`);
1092
- if (_uniqueCallOutID !== circleId) {
1093
- _uniqueCallOutID = circleId;
1094
- setRefSelected(targetElement);
1095
- setPopoverOpen(true);
1096
- xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);
1097
- setYValueHover(found.values);
1098
- setYValue(y);
1099
- setLegendVal(legendVal);
1100
- setLineColor(lineColor);
1101
- setStackCalloutProps(found);
1102
- setDataPointCalloutProps(hoverDp);
1103
- setActivePoint(circleId);
1104
- setNearestCircleToHighlight(null);
1105
- }
1106
- } else {
1107
- setActivePoint(circleId);
1108
- setNearestCircleToHighlight(null);
1109
- }
1110
- }
1111
- /**
1112
- * Screen readers announce an element as clickable if the onClick attribute is set.
1113
- * This function sets the attribute only when a click event handler is provided.*/ function _getClickHandler(func) {
1114
- if (func) {
1115
- return {
1116
- onClick: func
1117
- };
1118
- }
1119
- return {};
1120
- }
1121
- function _handleMouseOut() {
1122
- d3Select(`#${_verticalLine}`).attr('visibility', 'hidden');
1123
- }
1124
- function _handleChartMouseLeave() {
1125
- _uniqueCallOutID = null;
1126
- setActivePoint('');
1127
- if (isPopoverOpen) {
1128
- setPopoverOpen(false);
1129
- }
1130
- }
1131
- function _handleMultipleLineLegendSelectionAction(selectedLine) {
1132
- const selectedLineIndex = selectedLegendPoints.reduce((acc, line, index)=>{
1133
- if (acc > -1 || line.legend !== selectedLine.legend) {
1134
- return acc;
1135
- } else {
1136
- return index;
1137
- }
1138
- }, -1);
1139
- let selectedLines;
1140
- if (selectedLineIndex === -1) {
1141
- selectedLines = [
1142
- ...selectedLegendPoints,
1143
- selectedLine
1144
- ];
1145
- } else {
1146
- selectedLines = selectedLegendPoints.slice(0, selectedLineIndex).concat(selectedLegendPoints.slice(selectedLineIndex + 1));
1147
- }
1148
- const areAllLineLegendsSelected = props.data && selectedLines.length === props.data.lineChartData.length;
1149
- if (areAllLineLegendsSelected && (props.colorFillBars && props.colorFillBars.length === selectedColorBarLegend.length || !props.colorFillBars)) {
1150
- // Clear all legends if all legends including color fill bar legends are selected
1151
- // Or clear all legends if all legends are selected and there are no color fill bars
1152
- _clearMultipleLegendSelections();
1153
- } else if (!selectedLines.length && !selectedColorBarLegend.length) {
1154
- // Clear all legends if no legends including color fill bar legends are selected
1155
- _clearMultipleLegendSelections();
1156
- } else {
1157
- // Otherwise, set state when one or more legends are selected, including color fill bar legends
1158
- setSelectedLegendPoints(selectedLines);
1159
- setIsSelectedLegend(true);
1160
- }
1161
- const selectedLegendTitlesToPass = selectedLines.map((line)=>line.legend);
1162
- _handleLegendClick(selectedLine, selectedLegendTitlesToPass);
1163
- }
1164
- function _handleMultipleColorFillBarLegendSelectionAction(selectedColorFillBar) {
1165
- const selectedColorFillBarIndex = selectedColorBarLegend.reduce((acc, colorFillBar, index)=>{
1166
- if (acc > -1 || colorFillBar.legend !== selectedColorFillBar.legend) {
1167
- return acc;
1168
- } else {
1169
- return index;
1170
- }
1171
- }, -1);
1172
- let selectedColorFillBars;
1173
- if (selectedColorFillBarIndex === -1) {
1174
- selectedColorFillBars = [
1175
- ...selectedColorBarLegend,
1176
- selectedColorFillBar
1177
- ];
1178
- } else {
1179
- selectedColorFillBars = selectedColorBarLegend.slice(0, selectedColorFillBarIndex).concat(selectedColorBarLegend.slice(selectedColorFillBarIndex + 1));
1180
- }
1181
- const areAllColorFillBarLegendsSelected = selectedColorFillBars.length === (props.colorFillBars && props.colorFillBars.length);
1182
- if (areAllColorFillBarLegendsSelected && (props.data && props.data.lineChartData.length === selectedLegendPoints.length || !props.data)) {
1183
- // Clear all legends if all legends, including line legends, are selected
1184
- // Or clear all legends if all legends are selected and there is no line data
1185
- _clearMultipleLegendSelections();
1186
- } else if (!selectedColorFillBars.length && !selectedLegendPoints.length) {
1187
- // Clear all legends if no legends are selected, including line legends
1188
- _clearMultipleLegendSelections();
1189
- } else {
1190
- // set state when one or more legends are selected, including line legends
1191
- setSelectedColorBarLegend(selectedColorFillBars);
1192
- setIsSelectedLegend(true);
1193
- }
1194
- const selectedLegendTitlesToPass = selectedColorFillBars.map((colorFillBar)=>colorFillBar.legend);
1195
- _handleLegendClick(selectedColorFillBar, selectedLegendTitlesToPass);
1196
- }
1197
- function _clearMultipleLegendSelections() {
1198
- setSelectedColorBarLegend([]);
1199
- setSelectedLegendPoints([]);
1200
- setIsSelectedLegend(false);
1201
- }
1202
- /**
1203
- * This function checks if the given legend is highlighted or not.
1204
- * A legend can be highlighted in 2 ways:
1205
- * 1. selection: if the user clicks on it
1206
- * 2. hovering: if there is no selected legend and the user hovers over it*/ function _legendHighlighted(legend) {
1207
- return selectedLegend === legend || selectedLegend === '' && activeLegend === legend;
1208
- }
1209
- /**
1210
- * This function checks if none of the legends is selected or hovered.*/ function _noLegendHighlighted() {
1211
- return selectedLegend === '' && activeLegend === '';
1212
- }
1213
- function _getColorFillBarOpacity(colorFillBar) {
1214
- return colorFillBar.applyPattern ? 1 : 0.4;
1215
- }
1216
- function _getAriaLabel(lineIndex, pointIndex) {
1217
- var _point_callOutAccessibilityData;
1218
- const line = _points[lineIndex];
1219
- const point = line.data[pointIndex];
1220
- const formattedDate = point.x instanceof Date ? formatDateToLocaleString(point.x, props.culture, props.useUTC) : point.x;
1221
- const xValue = point.xAxisCalloutData || formattedDate;
1222
- const legend = line.legend;
1223
- const yValue = point.yAxisCalloutData || point.y;
1224
- return ((_point_callOutAccessibilityData = point.callOutAccessibilityData) === null || _point_callOutAccessibilityData === void 0 ? void 0 : _point_callOutAccessibilityData.ariaLabel) || `${xValue}. ${legend}, ${yValue}.`;
1225
- }
1226
- function _getChartTitle() {
1227
- const { chartTitle, lineChartData } = props.data;
1228
- return (chartTitle ? `${chartTitle}. ` : '') + `Line chart with ${(lineChartData === null || lineChartData === void 0 ? void 0 : lineChartData.length) || 0} lines. `;
1229
- }
1230
- function _isChartEmpty() {
1231
- return !(props.data && props.data.lineChartData && props.data.lineChartData.length > 0 && props.data.lineChartData.filter((item)=>item.data.length).length > 0);
1232
- }
1233
- const { legendProps, tickValues, tickFormat, eventAnnotationProps } = props;
1234
- _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);
1235
- _isXAxisDateType = getXAxisType(_points);
1236
- let points = _points;
1237
- if (legendProps && !!legendProps.canSelectMultipleLegends) {
1238
- points = selectedLegendPoints.length >= 1 ? selectedLegendPoints : _points;
1239
- calloutPointsRef.current = calloutData(points);
1240
- }
1241
- let legendBars = null;
1242
- // reduce computation cost by only creating legendBars
1243
- // if when hideLegend is false.
1244
- // NOTE: they are rendered only when hideLegend is false in CartesianChart.
1245
- if (!props.hideLegend) {
1246
- legendBars = _createLegends(_points); // ToDo: Memoize legends to improve performance.
1247
- }
1248
- const calloutProps = {
1249
- YValueHover: yValueHover,
1250
- hoverXValue,
1251
- YValue,
1252
- legend: legendVal,
1253
- color: lineColor,
1254
- XValue: hoverXValue,
1255
- descriptionMessage: props.getCalloutDescriptionMessage && stackCalloutProps ? props.getCalloutDescriptionMessage(stackCalloutProps) : undefined,
1256
- tabIndex: 0,
1257
- xAxisCalloutAccessibilityData,
1258
- ...props.calloutProps,
1259
- isPopoverOpen,
1260
- clickPosition,
1261
- positioning: {
1262
- target: refSelected
1263
- },
1264
- isCalloutForStack: props.isCalloutForStack,
1265
- culture: props.culture,
1266
- isCartesian: true,
1267
- customCallout: {
1268
- customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout() : undefined,
1269
- customCalloutProps: props.calloutPropsPerDataPoint ? props.calloutPropsPerDataPoint(dataPointCalloutProps) : undefined
1270
- }
1271
- };
1272
- const tickParams = {
1273
- tickValues,
1274
- tickFormat
1275
- };
1276
- return !_isChartEmpty() ? /*#__PURE__*/ React.createElement(CartesianChart, {
1277
- ...props,
1278
- chartTitle: _getChartTitle(),
1279
- points: points,
1280
- chartType: ChartTypes.LineChart,
1281
- calloutProps: calloutProps,
1282
- tickParams: tickParams,
1283
- legendBars: legendBars,
1284
- createYAxis: createNumericYAxis,
1285
- getmargins: _getMargins,
1286
- getMinMaxOfYAxis: _getNumericMinMaxOfY,
1287
- getGraphData: _initializeLineChartData,
1288
- xAxisType: _isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis,
1289
- ..._isScatterPolar ? {
1290
- yMaxValue: 1,
1291
- yMinValue: -1
1292
- } : {},
1293
- getDomainNRangeValues: _getDomainNRangeValues,
1294
- createStringYAxis: createStringYAxis,
1295
- onChartMouseLeave: _handleChartMouseLeave,
1296
- enableFirstRenderOptimization: props.enablePerfOptimization && _firstRenderOptimization,
1297
- componentRef: cartesianChartRef,
1298
- children: (props)=>{
1299
- _xAxisScale = props.xScale;
1300
- _yScalePrimary = props.yScalePrimary;
1301
- _yScaleSecondary = props.yScaleSecondary;
1302
- return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("g", null, /*#__PURE__*/ React.createElement("line", {
1303
- x1: 0,
1304
- y1: 0,
1305
- x2: 0,
1306
- y2: props.containerHeight,
1307
- stroke: '#323130',
1308
- id: _verticalLine,
1309
- visibility: 'hidden',
1310
- strokeDasharray: '5,5'
1311
- }), props.optimizeLargeData ? /*#__PURE__*/ React.createElement("rect", {
1312
- id: _rectId,
1313
- width: props.containerWidth,
1314
- height: props.containerHeight,
1315
- fill: 'transparent'
1316
- }) : /*#__PURE__*/ React.createElement(React.Fragment, null), /*#__PURE__*/ React.createElement("g", null, _renderedColorFillBars, lines), eventAnnotationProps && /*#__PURE__*/ React.createElement(EventsAnnotation, {
1317
- ...eventAnnotationProps,
1318
- scale: props.xScale,
1319
- chartYTop: margins.top + eventLabelHeight,
1320
- chartYBottom: props.containerHeight - 35
1321
- })));
1322
- }
1323
- }) : /*#__PURE__*/ React.createElement("div", {
1324
- id: _emptyChartId,
1325
- role: 'alert',
1326
- style: {
1327
- opacity: '0'
1328
- },
1329
- "aria-label": 'Graph has no data to display'
1330
- });
1331
- });
1332
- LineChart.displayName = 'LineChart';