@fluentui/react-charts 9.1.10 → 9.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) hide show
  1. package/CHANGELOG.md +41 -2
  2. package/dist/index.d.ts +44 -3
  3. package/lib/AreaChart.js.map +1 -1
  4. package/lib/CartesianChart.js.map +1 -1
  5. package/lib/DeclarativeChart.js.map +1 -1
  6. package/lib/DonutChart.js.map +1 -1
  7. package/lib/FunnelChart.js.map +1 -1
  8. package/lib/GanttChart.js.map +1 -1
  9. package/lib/GaugeChart.js.map +1 -1
  10. package/lib/GroupedVerticalBarChart.js.map +1 -1
  11. package/lib/HeatMapChart.js.map +1 -1
  12. package/lib/HorizontalBarChart.js.map +1 -1
  13. package/lib/HorizontalBarChartWithAxis.js.map +1 -1
  14. package/lib/Legends.js.map +1 -1
  15. package/lib/LineChart.js.map +1 -1
  16. package/lib/Popover.js.map +1 -1
  17. package/lib/ResponsiveContainer.js.map +1 -1
  18. package/lib/SankeyChart.js.map +1 -1
  19. package/lib/ScatterChart.js.map +1 -1
  20. package/lib/Sparkline.js.map +1 -1
  21. package/lib/VerticalBarChart.js.map +1 -1
  22. package/lib/VerticalStackedBarChart.js.map +1 -1
  23. package/lib/components/AreaChart/AreaChart.js +11 -3
  24. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  25. package/lib/components/AreaChart/AreaChart.types.js.map +1 -1
  26. package/lib/components/AreaChart/index.js.map +1 -1
  27. package/lib/components/AreaChart/useAreaChartStyles.styles.js +1 -2
  28. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +41 -0
  29. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -0
  30. package/lib/components/CommonComponents/CartesianChart.js +2 -1
  31. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  32. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  33. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  34. package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -1
  35. package/lib/components/CommonComponents/index.js.map +1 -1
  36. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +1 -2
  37. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +128 -0
  38. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -0
  39. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +1 -2
  40. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +126 -0
  41. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -0
  42. package/lib/components/DeclarativeChart/DeclarativeChart.js +15 -7
  43. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  44. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +90 -29
  45. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  46. package/lib/components/DeclarativeChart/imageExporter.js +1 -0
  47. package/lib/components/DeclarativeChart/imageExporter.js.map +1 -1
  48. package/lib/components/DeclarativeChart/index.js.map +1 -1
  49. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  50. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
  51. package/lib/components/DonutChart/Arc/index.js.map +1 -1
  52. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +1 -2
  53. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +44 -0
  54. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -0
  55. package/lib/components/DonutChart/DonutChart.js +11 -3
  56. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  57. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  58. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  59. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
  60. package/lib/components/DonutChart/Pie/index.js.map +1 -1
  61. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +1 -2
  62. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js +29 -0
  63. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -0
  64. package/lib/components/DonutChart/index.js.map +1 -1
  65. package/lib/components/DonutChart/useDonutChartStyles.styles.js +1 -2
  66. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +45 -0
  67. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -0
  68. package/lib/components/FunnelChart/FunnelChart.js +10 -1
  69. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  70. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
  71. package/lib/components/FunnelChart/funnelGeometry.js.map +1 -1
  72. package/lib/components/FunnelChart/index.js.map +1 -1
  73. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +1 -2
  74. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +51 -0
  75. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -0
  76. package/lib/components/GanttChart/GanttChart.js +19 -2
  77. package/lib/components/GanttChart/GanttChart.js.map +1 -1
  78. package/lib/components/GanttChart/GanttChart.types.js.map +1 -1
  79. package/lib/components/GanttChart/index.js.map +1 -1
  80. package/lib/components/GanttChart/useGanttChartStyles.styles.js +1 -2
  81. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +23 -0
  82. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -0
  83. package/lib/components/GaugeChart/GaugeChart.js +9 -2
  84. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  85. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  86. package/lib/components/GaugeChart/index.js.map +1 -1
  87. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +1 -2
  88. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +142 -0
  89. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -0
  90. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +70 -58
  91. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  92. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  93. package/lib/components/GroupedVerticalBarChart/index.js.map +1 -1
  94. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +1 -2
  95. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +53 -0
  96. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -0
  97. package/lib/components/HeatMapChart/HeatMapChart.js +11 -3
  98. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  99. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  100. package/lib/components/HeatMapChart/index.js.map +1 -1
  101. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +1 -2
  102. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +38 -0
  103. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -0
  104. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +23 -26
  105. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  106. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  107. package/lib/components/HorizontalBarChart/index.js.map +1 -1
  108. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +1 -2
  109. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +120 -0
  110. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -0
  111. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +9 -2
  112. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  113. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  114. package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  115. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +1 -2
  116. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +39 -0
  117. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -0
  118. package/lib/components/Legends/Legends.js +28 -10
  119. package/lib/components/Legends/Legends.js.map +1 -1
  120. package/lib/components/Legends/Legends.types.js.map +1 -1
  121. package/lib/components/Legends/OverflowMenu.js.map +1 -1
  122. package/lib/components/Legends/index.js.map +1 -1
  123. package/lib/components/Legends/shape.js.map +1 -1
  124. package/lib/components/Legends/useLegendsStyles.styles.js +57 -14
  125. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  126. package/lib/components/Legends/useLegendsStyles.styles.raw.js +138 -0
  127. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -0
  128. package/lib/components/LineChart/LineChart.js +9 -2
  129. package/lib/components/LineChart/LineChart.js.map +1 -1
  130. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  131. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  132. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  133. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  134. package/lib/components/LineChart/index.js.map +1 -1
  135. package/lib/components/LineChart/useLineChartStyles.styles.js +1 -2
  136. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +52 -0
  137. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -0
  138. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  139. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  140. package/lib/components/ResponsiveContainer/index.js.map +1 -1
  141. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +1 -2
  142. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +28 -0
  143. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -0
  144. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  145. package/lib/components/SankeyChart/SankeyChart.js +5 -1
  146. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  147. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  148. package/lib/components/SankeyChart/index.js.map +1 -1
  149. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +1 -2
  150. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +77 -0
  151. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -0
  152. package/lib/components/ScatterChart/ScatterChart.js +11 -3
  153. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  154. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  155. package/lib/components/ScatterChart/index.js.map +1 -1
  156. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +1 -2
  157. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +43 -0
  158. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -0
  159. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  160. package/lib/components/Sparkline/Sparkline.types.js.map +1 -1
  161. package/lib/components/Sparkline/index.js.map +1 -1
  162. package/lib/components/Sparkline/useSparklineStyles.styles.js +1 -2
  163. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js +30 -0
  164. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -0
  165. package/lib/components/VerticalBarChart/VerticalBarChart.js +62 -28
  166. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  167. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  168. package/lib/components/VerticalBarChart/index.js.map +1 -1
  169. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +1 -2
  170. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +58 -0
  171. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -0
  172. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +22 -8
  173. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  174. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  175. package/lib/components/VerticalStackedBarChart/index.js.map +1 -1
  176. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +1 -2
  177. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +49 -0
  178. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -0
  179. package/lib/index.js.map +1 -1
  180. package/lib/types/DataPoint.js.map +1 -1
  181. package/lib/types/EventAnnotation.js.map +1 -1
  182. package/lib/types/LegendDataItem.js.map +1 -1
  183. package/lib/types/index.js.map +1 -1
  184. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  185. package/lib/utilities/KeyCodes.js.map +1 -1
  186. package/lib/utilities/SVGTooltipText.js +2 -0
  187. package/lib/utilities/SVGTooltipText.js.map +1 -1
  188. package/lib/utilities/async-utils.js.map +1 -1
  189. package/lib/utilities/colors.js.map +1 -1
  190. package/lib/utilities/getWindow.js.map +1 -1
  191. package/lib/utilities/image-export-utils.js +256 -0
  192. package/lib/utilities/image-export-utils.js.map +1 -0
  193. package/lib/utilities/index.js.map +1 -1
  194. package/lib/utilities/overflow-utils.js.map +1 -1
  195. package/lib/utilities/string.js.map +1 -1
  196. package/lib/utilities/test-data.js.map +1 -1
  197. package/lib/utilities/utilities.js +50 -5
  198. package/lib/utilities/utilities.js.map +1 -1
  199. package/lib/utilities/vbc-utils.js.map +1 -1
  200. package/lib-commonjs/AreaChart.js.map +1 -1
  201. package/lib-commonjs/CartesianChart.js.map +1 -1
  202. package/lib-commonjs/DeclarativeChart.js.map +1 -1
  203. package/lib-commonjs/DonutChart.js.map +1 -1
  204. package/lib-commonjs/FunnelChart.js.map +1 -1
  205. package/lib-commonjs/GanttChart.js.map +1 -1
  206. package/lib-commonjs/GaugeChart.js.map +1 -1
  207. package/lib-commonjs/GroupedVerticalBarChart.js.map +1 -1
  208. package/lib-commonjs/HeatMapChart.js.map +1 -1
  209. package/lib-commonjs/HorizontalBarChart.js.map +1 -1
  210. package/lib-commonjs/HorizontalBarChartWithAxis.js.map +1 -1
  211. package/lib-commonjs/Legends.js.map +1 -1
  212. package/lib-commonjs/LineChart.js.map +1 -1
  213. package/lib-commonjs/Popover.js.map +1 -1
  214. package/lib-commonjs/ResponsiveContainer.js.map +1 -1
  215. package/lib-commonjs/SankeyChart.js.map +1 -1
  216. package/lib-commonjs/ScatterChart.js.map +1 -1
  217. package/lib-commonjs/Sparkline.js.map +1 -1
  218. package/lib-commonjs/VerticalBarChart.js.map +1 -1
  219. package/lib-commonjs/VerticalStackedBarChart.js.map +1 -1
  220. package/lib-commonjs/components/AreaChart/AreaChart.js +10 -2
  221. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  222. package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +1 -1
  223. package/lib-commonjs/components/AreaChart/index.js.map +1 -1
  224. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +1 -1
  225. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  226. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +57 -0
  227. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -0
  228. package/lib-commonjs/components/CommonComponents/CartesianChart.js +2 -1
  229. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  230. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  231. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
  232. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +1 -1
  233. package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
  234. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +1 -1
  235. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  236. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +142 -0
  237. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -0
  238. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +1 -1
  239. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  240. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +140 -0
  241. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -0
  242. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +14 -6
  243. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  244. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +93 -29
  245. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  246. package/lib-commonjs/components/DeclarativeChart/imageExporter.js +1 -0
  247. package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -1
  248. package/lib-commonjs/components/DeclarativeChart/index.js.map +1 -1
  249. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  250. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -1
  251. package/lib-commonjs/components/DonutChart/Arc/index.js.map +1 -1
  252. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +1 -1
  253. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  254. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +58 -0
  255. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -0
  256. package/lib-commonjs/components/DonutChart/DonutChart.js +10 -2
  257. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  258. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  259. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  260. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -1
  261. package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -1
  262. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +1 -1
  263. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js +43 -0
  264. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -0
  265. package/lib-commonjs/components/DonutChart/index.js.map +1 -1
  266. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +1 -1
  267. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +59 -0
  268. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -0
  269. package/lib-commonjs/components/FunnelChart/FunnelChart.js +10 -1
  270. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
  271. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -1
  272. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -1
  273. package/lib-commonjs/components/FunnelChart/index.js.map +1 -1
  274. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +1 -1
  275. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
  276. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +65 -0
  277. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -0
  278. package/lib-commonjs/components/GanttChart/GanttChart.js +18 -1
  279. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
  280. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -1
  281. package/lib-commonjs/components/GanttChart/index.js.map +1 -1
  282. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +1 -1
  283. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +39 -0
  284. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -0
  285. package/lib-commonjs/components/GaugeChart/GaugeChart.js +9 -2
  286. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  287. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  288. package/lib-commonjs/components/GaugeChart/index.js.map +1 -1
  289. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +1 -1
  290. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  291. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +160 -0
  292. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -0
  293. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +70 -58
  294. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  295. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  296. package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +1 -1
  297. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +1 -1
  298. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +69 -0
  299. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -0
  300. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +10 -2
  301. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  302. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  303. package/lib-commonjs/components/HeatMapChart/index.js.map +1 -1
  304. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +1 -1
  305. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +56 -0
  306. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -0
  307. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +23 -26
  308. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  309. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  310. package/lib-commonjs/components/HorizontalBarChart/index.js.map +1 -1
  311. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +1 -1
  312. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +134 -0
  313. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -0
  314. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +9 -2
  315. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  316. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  317. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  318. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +1 -1
  319. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +55 -0
  320. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -0
  321. package/lib-commonjs/components/Legends/Legends.js +28 -10
  322. package/lib-commonjs/components/Legends/Legends.js.map +1 -1
  323. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  324. package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -1
  325. package/lib-commonjs/components/Legends/index.js.map +1 -1
  326. package/lib-commonjs/components/Legends/shape.js.map +1 -1
  327. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +101 -28
  328. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
  329. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +174 -0
  330. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -0
  331. package/lib-commonjs/components/LineChart/LineChart.js +9 -2
  332. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  333. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  334. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  335. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  336. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  337. package/lib-commonjs/components/LineChart/index.js.map +1 -1
  338. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +1 -1
  339. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +66 -0
  340. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -0
  341. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  342. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  343. package/lib-commonjs/components/ResponsiveContainer/index.js.map +1 -1
  344. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +1 -1
  345. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +46 -0
  346. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -0
  347. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  348. package/lib-commonjs/components/SankeyChart/SankeyChart.js +5 -1
  349. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  350. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  351. package/lib-commonjs/components/SankeyChart/index.js.map +1 -1
  352. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +1 -1
  353. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  354. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +95 -0
  355. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -0
  356. package/lib-commonjs/components/ScatterChart/ScatterChart.js +10 -2
  357. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  358. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  359. package/lib-commonjs/components/ScatterChart/index.js.map +1 -1
  360. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +1 -1
  361. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +57 -0
  362. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -0
  363. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
  364. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -1
  365. package/lib-commonjs/components/Sparkline/index.js.map +1 -1
  366. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +1 -1
  367. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js +44 -0
  368. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -0
  369. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +62 -28
  370. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  371. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  372. package/lib-commonjs/components/VerticalBarChart/index.js.map +1 -1
  373. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +1 -1
  374. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +74 -0
  375. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -0
  376. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +22 -8
  377. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  378. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  379. package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +1 -1
  380. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +1 -1
  381. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  382. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +67 -0
  383. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -0
  384. package/lib-commonjs/index.js.map +1 -1
  385. package/lib-commonjs/types/DataPoint.js.map +1 -1
  386. package/lib-commonjs/types/EventAnnotation.js.map +1 -1
  387. package/lib-commonjs/types/LegendDataItem.js.map +1 -1
  388. package/lib-commonjs/types/index.js.map +1 -1
  389. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  390. package/lib-commonjs/utilities/KeyCodes.js.map +1 -1
  391. package/lib-commonjs/utilities/SVGTooltipText.js +2 -0
  392. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  393. package/lib-commonjs/utilities/async-utils.js.map +1 -1
  394. package/lib-commonjs/utilities/colors.js.map +1 -1
  395. package/lib-commonjs/utilities/getWindow.js.map +1 -1
  396. package/lib-commonjs/utilities/image-export-utils.js +274 -0
  397. package/lib-commonjs/utilities/image-export-utils.js.map +1 -0
  398. package/lib-commonjs/utilities/index.js.map +1 -1
  399. package/lib-commonjs/utilities/overflow-utils.js.map +1 -1
  400. package/lib-commonjs/utilities/string.js.map +1 -1
  401. package/lib-commonjs/utilities/test-data.js.map +1 -1
  402. package/lib-commonjs/utilities/utilities.js +56 -5
  403. package/lib-commonjs/utilities/utilities.js.map +1 -1
  404. package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
  405. package/package.json +12 -22
@@ -1 +1 @@
1
- {"version":3,"sources":["LineChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { LineChartProps } from './LineChart.types';\nimport { useLineChartStyles } from './useLineChartStyles.styles';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select, pointer } from 'd3-selection';\nimport { bisector } from 'd3-array';\nimport { Legend, Legends } from '../Legends/index';\nimport { line as d3Line } from 'd3-shape';\nimport { useId } from '@fluentui/react-utilities';\nimport { find } from '../../utilities/index';\nimport {\n AccessibilityProps,\n CartesianChart,\n ChildProps,\n LineChartPoints,\n CustomizedCalloutData,\n Margins,\n RefArrayData,\n ColorFillBarsProps,\n LineChartGap,\n LineChartDataPoint,\n Chart,\n} from '../../index';\nimport { EventsAnnotation } from './eventAnnotation/EventAnnotation';\nimport { tokens } from '@fluentui/react-theme';\nimport {\n calloutData,\n ChartTypes,\n getXAxisType,\n XAxisTypes,\n tooltipOfAxislabels,\n Points,\n pointTypes,\n getTypeOfAxis,\n getNextColor,\n getColorFromToken,\n findNumericMinMaxOfY,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfDateForAreaLineVerticalBarChart,\n domainRangeOfNumericForAreaChart,\n createStringYAxis,\n useRtl,\n formatDate,\n getCurveFactory,\n} from '../../utilities/index';\nimport { ScaleLinear } from 'd3-scale';\n\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\nenum PointSize {\n hoverSize = 11,\n invisibleSize = 1,\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst bisect = bisector((d: any) => d.x).left;\n\nconst DEFAULT_LINE_STROKE_SIZE = 4;\n// The given shape of a icon must be 2.5 times bigger than line width (known as stroke width)\nconst PATH_MULTIPLY_SIZE = 2.5;\n\n/**\n *\n * @param x units from origin\n * @param y units from origin\n * @param w is the legnth of the each side of a shape\n * @param index index to get the shape path\n */\nconst _getPointPath = (x: number, y: number, w: number, index: number): string => {\n const allPointPaths = [\n // circle path\n `M${x - w / 2} ${y}\n A${w / 2} ${w / 2} 0 1 0 ${x + w / 2} ${y}\n M${x - w / 2} ${y}\n A ${w / 2} ${w / 2} 0 1 1 ${x + w / 2} ${y}\n `,\n //square\n `M${x - w / 2} ${y - w / 2}\n L${x + w / 2} ${y - w / 2}\n L${x + w / 2} ${y + w / 2}\n L${x - w / 2} ${y + w / 2}\n Z`,\n //triangle\n `M${x - w / 2} ${y - 0.2886 * w}\n H ${x + w / 2}\n L${x} ${y + 0.5774 * w} Z`,\n //diamond\n `M${x} ${y - w / 2}\n L${x + w / 2} ${y}\n L${x} ${y + w / 2}\n L${x - w / 2} ${y}\n Z`,\n //pyramid\n `M${x} ${y - 0.5774 * w}\n L${x + w / 2} ${y + 0.2886 * w}\n L${x - w / 2} ${y + 0.2886 * w} Z`,\n //hexagon\n `M${x - 0.5 * w} ${y - 0.866 * w}\n L${x + 0.5 * w} ${y - 0.866 * w}\n L${x + w} ${y}\n L${x + 0.5 * w} ${y + 0.866 * w}\n L${x - 0.5 * w} ${y + 0.866 * w}\n L${x - w} ${y}\n Z`,\n //pentagon\n `M${x} ${y - 0.851 * w}\n L${x + 0.6884 * w} ${y - 0.2633 * w}\n L${x + 0.5001 * w} ${y + 0.6884 * w}\n L${x - 0.5001 * w} ${y + 0.6884 * w}\n L${x - 0.6884 * w} ${y - 0.2633 * w}\n Z`,\n //octagon\n `M${x - 0.5001 * w} ${y - 1.207 * w}\n L${x + 0.5001 * w} ${y - 1.207 * w}\n L${x + 1.207 * w} ${y - 0.5001 * w}\n L${x + 1.207 * w} ${y + 0.5001 * w}\n L${x + 0.5001 * w} ${y + 1.207 * w}\n L${x - 0.5001 * w} ${y + 1.207 * w}\n L${x - 1.207 * w} ${y + 0.5001 * w}\n L${x - 1.207 * w} ${y - 0.5001 * w}\n Z`,\n ];\n return allPointPaths[index];\n};\n\ntype LineChartDataWithIndex = LineChartPoints & { index: number };\n\n// Create a LineChart variant which uses these default styles and this styled subcomponent.\n/**\n * Linechart component\n * {@docCategory LineChart}\n */\nexport const LineChart: React.FunctionComponent<LineChartProps> = React.forwardRef<HTMLDivElement, LineChartProps>(\n (props, forwardedRef) => {\n let _points: LineChartDataWithIndex[] = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _calloutPoints: any[] = calloutData(_points) || [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _xAxisScale: any = '';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _yScalePrimary: any = '';\n let _circleId: string = useId('circle');\n let _lineId: string = useId('lineID');\n let _borderId: string = useId('borderID');\n let _verticalLine: string = useId('verticalLine');\n let _colorFillBarPatternId: string = useId('colorFillBarPattern');\n let _uniqueCallOutID: string | null = '';\n let _refArray: RefArrayData[] = [];\n let margins: Margins;\n let eventLabelHeight: number = 36;\n let lines: JSX.Element[];\n let _renderedColorFillBars: JSX.Element[];\n const _colorFillBars = React.useRef<ColorFillBarsProps[]>([]);\n let _tooltipId: string = useId('LineChartTooltipId_');\n let _rectId: string = useId('containerRectLD');\n let _staticHighlightCircle: string = useId('staticHighlightCircle');\n let _firstRenderOptimization = true;\n let _emptyChartId: string = useId('_LineChart_empty');\n const _colorFillBarId = useId('_colorFillBarId');\n const _isRTL: boolean = useRtl();\n let xAxisCalloutAccessibilityData: AccessibilityProps = {};\n const cartesianChartRef = React.useRef<Chart>(null);\n let _yScaleSecondary: ScaleLinear<number, number> | undefined;\n\n props.eventAnnotationProps &&\n props.eventAnnotationProps.labelHeight &&\n (eventLabelHeight = props.eventAnnotationProps.labelHeight);\n\n const [hoverXValue, setHoverXValue] = React.useState<string | number>('');\n const [activeLegend, setActiveLegend] = React.useState<string>('');\n const [YValueHover, setYValueHover] = React.useState<[]>([]);\n const [selectedLegend, setSelectedLegend] = React.useState<string>('');\n const [selectedLegendPoints, setSelectedLegendPoints] = React.useState<any[]>(\n _injectIndexPropertyInLineChartData(props.data.lineChartData, true),\n );\n const [selectedColorBarLegend, setSelectedColorBarLegend] = React.useState<any[]>([]);\n const [isSelectedLegend, setIsSelectedLegend] = React.useState<boolean>(\n (props.legendProps?.selectedLegends?.length ?? 0) > 0,\n );\n const [activePoint, setActivePoint] = React.useState<string>('');\n const [nearestCircleToHighlight, setNearestCircleToHighlight] = React.useState<LineChartDataPoint | null>(null);\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<CustomizedCalloutData>();\n const [stackCalloutProps, setStackCalloutProps] = React.useState<CustomizedCalloutData>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n\n const pointsRef = React.useRef<LineChartDataWithIndex[] | []>([]);\n const calloutPointsRef = React.useRef<any[]>([]);\n const classes = useLineChartStyles(props);\n React.useEffect(() => {\n /** note that height and width are not used to resize or set as dimesions of the chart,\n * fitParentContainer is responisble for setting the height and width or resizing of the svg/chart\n */\n\n if (_points !== _injectIndexPropertyInLineChartData(props.data.lineChartData) || props.data !== _points) {\n pointsRef.current = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n calloutPointsRef.current = calloutData(pointsRef.current);\n }\n }, [props.height, props.width, props.data]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n }),\n [],\n );\n\n function _getDomainNRangeValues(\n points: LineChartPoints[],\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfNumericForAreaChart(points, margins, width, isRTL);\n } else if (xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = domainRangeOfDateForAreaLineVerticalBarChart(\n points,\n margins,\n width,\n isRTL,\n tickValues! as Date[],\n chartType,\n barWidth,\n );\n } else {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n }\n return domainNRangeValue;\n }\n\n function _injectIndexPropertyInLineChartData(\n lineChartData?: LineChartPoints[],\n isFilterSelectedLegends: boolean = false,\n ): LineChartDataWithIndex[] | [] {\n const { allowMultipleShapesForPoints = false } = props;\n // Apply filter only if isPropChange is true\n const filteredData = isFilterSelectedLegends\n ? lineChartData?.filter(\n (item: LineChartPoints) =>\n props.legendProps?.selectedLegends?.includes(item.legend) ||\n props.legendProps?.selectedLegend === item.legend,\n )\n : lineChartData;\n return filteredData\n ? filteredData.map((item: LineChartPoints, index: number) => {\n let color: string;\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0);\n } else {\n color = getColorFromToken(item.color);\n }\n return {\n ...item,\n index: allowMultipleShapesForPoints ? index : -1,\n color,\n };\n })\n : [];\n }\n\n function updatePosition(newX: number, newY: number) {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n function _getCustomizedCallout() {\n return props.onRenderCalloutPerStack\n ? props.onRenderCalloutPerStack(stackCalloutProps)\n : props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps)\n : null;\n }\n\n function _getMargins(_margins: Margins) {\n margins = _margins;\n }\n\n function _initializeLineChartData(\n xScale: NumericAxis,\n yScalePrimary: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n yAxisElement?: SVGElement | null,\n yScaleSecondary?: ScaleLinear<number, number>,\n ) {\n _xAxisScale = xScale;\n _yScalePrimary = yScalePrimary;\n _yScaleSecondary = yScaleSecondary;\n _renderedColorFillBars = props.colorFillBars ? _createColorFillBars(containerHeight) : [];\n lines = _createLines(xElement!, containerHeight!);\n }\n\n function _handleSingleLegendSelectionAction(lineChartItem: LineChartDataWithIndex | ColorFillBarsProps) {\n if (selectedLegend === lineChartItem.legend) {\n setSelectedLegend('');\n _handleLegendClick(lineChartItem, null);\n } else {\n setSelectedLegend(lineChartItem.legend);\n _handleLegendClick(lineChartItem, lineChartItem.legend);\n }\n }\n\n function _onHoverCardHide() {\n setSelectedLegendPoints([]);\n setSelectedColorBarLegend([]);\n setIsSelectedLegend(false);\n }\n\n function _handleLegendClick(\n lineChartItem: LineChartDataWithIndex | ColorFillBarsProps,\n selectedLegend: string | null | string[],\n ): void {\n if (lineChartItem.onLegendClick) {\n lineChartItem.onLegendClick(selectedLegend);\n }\n }\n\n function _createLegends(data: LineChartDataWithIndex[]): JSX.Element {\n const { legendProps, allowMultipleShapesForPoints = false } = props;\n const isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);\n const legendDataItems = data.map((point: LineChartDataWithIndex) => {\n const color: string = point.color!;\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: point.legend!,\n color,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n _handleMultipleLineLegendSelectionAction(point);\n } else {\n _handleSingleLegendSelectionAction(point);\n }\n },\n onMouseOutAction: () => {\n setActiveLegend('');\n },\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(point.legend);\n },\n ...(point.legendShape && {\n shape: point.legendShape,\n }),\n ...(allowMultipleShapesForPoints && {\n shape: Points[point.index % Object.keys(pointTypes).length] as Legend['shape'],\n }),\n };\n return legend;\n });\n\n const colorFillBarsLegendDataItems = props.colorFillBars\n ? props.colorFillBars.map((colorFillBar: ColorFillBarsProps, index: number) => {\n const title = colorFillBar.legend;\n const color = getColorFromToken(colorFillBar.color);\n const legend: Legend = {\n title,\n color,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n _handleMultipleColorFillBarLegendSelectionAction(colorFillBar);\n } else {\n _handleSingleLegendSelectionAction(colorFillBar);\n }\n },\n onMouseOutAction: () => {\n setActiveLegend('');\n },\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(title);\n },\n opacity: _getColorFillBarOpacity(colorFillBar),\n stripePattern: colorFillBar.applyPattern,\n };\n return legend;\n })\n : [];\n\n return (\n <Legends\n legends={[...legendDataItems, ...colorFillBarsLegendDataItems]}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...(isLegendMultiSelectEnabled && { onLegendHoverCardLeave: _onHoverCardHide })}\n {...props.legendProps}\n />\n );\n }\n\n function _getBoxWidthOfShape(pointId: string, pointIndex: number, isLastPoint: boolean) {\n const { allowMultipleShapesForPoints = false, strokeWidth = DEFAULT_LINE_STROKE_SIZE } = props;\n if (allowMultipleShapesForPoints) {\n if (activePoint === pointId) {\n return PointSize.hoverSize;\n } else if (pointIndex === 1 || isLastPoint) {\n return strokeWidth * PATH_MULTIPLY_SIZE;\n } else {\n return PointSize.invisibleSize;\n }\n } else {\n if (activePoint === pointId) {\n return PointSize.hoverSize;\n } else {\n return PointSize.invisibleSize;\n }\n }\n }\n\n function _getPath(\n xPos: number,\n yPos: number,\n pointId: string,\n pointIndex: number,\n isLastPoint: boolean,\n pointOftheLine: number,\n ): string {\n const { allowMultipleShapesForPoints = false } = props;\n let w = _getBoxWidthOfShape(pointId, pointIndex, isLastPoint);\n const index: number = allowMultipleShapesForPoints ? pointOftheLine % Object.keys(pointTypes).length : 0;\n const widthRatio = pointTypes[index].widthRatio;\n w = widthRatio > 1 ? w / widthRatio : w;\n\n return _getPointPath(xPos, yPos, w, index);\n }\n function _getPointFill(lineColor: string, pointId: string, pointIndex: number, isLastPoint: boolean) {\n const { allowMultipleShapesForPoints = false } = props;\n if (allowMultipleShapesForPoints) {\n if (pointIndex === 1 || isLastPoint) {\n if (activePoint === pointId) {\n return tokens.colorNeutralBackground1;\n } else {\n return lineColor;\n }\n } else {\n if (activePoint === pointId) {\n return tokens.colorNeutralBackground1;\n } else {\n return lineColor;\n }\n }\n } else {\n if (activePoint === pointId) {\n return tokens.colorNeutralBackground1;\n } else {\n return lineColor;\n }\n }\n }\n\n function _createLines(xElement: SVGElement, containerHeight: number): JSX.Element[] {\n const lines: JSX.Element[] = [];\n if (isSelectedLegend) {\n _points = selectedLegendPoints;\n } else {\n _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n }\n for (let i = _points.length - 1; i >= 0; i--) {\n const linesForLine: JSX.Element[] = [];\n const bordersForLine: JSX.Element[] = [];\n const pointsForLine: JSX.Element[] = [];\n\n const legendVal: string = _points[i].legend;\n const lineColor: string = _points[i].color!;\n const verticaLineHeight = containerHeight - margins.bottom! + 6;\n const yScale = _points[i].useSecondaryYScale && _yScaleSecondary ? _yScaleSecondary : _yScalePrimary;\n if (_points[i].data.length === 1) {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const {\n x: x1,\n y: y1,\n xAxisCalloutData,\n xAxisCalloutAccessibilityData,\n } = _points[i].data[0] as LineChartDataPoint;\n const circleId = `${_circleId}_${i}`;\n const isLegendSelected: boolean = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n pointsForLine.push(\n <circle\n id={circleId}\n key={circleId}\n r={activePoint === circleId ? 5.5 : 3.5}\n cx={_xAxisScale(x1)}\n cy={yScale(y1)}\n fill={activePoint === circleId ? tokens.colorNeutralBackground1 : lineColor}\n opacity={isLegendSelected ? 1 : 0.1}\n tabIndex={isLegendSelected ? 0 : undefined}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseOut={_handleMouseOut}\n strokeWidth={activePoint === circleId ? DEFAULT_LINE_STROKE_SIZE : 0}\n stroke={activePoint === circleId ? lineColor : ''}\n role=\"img\"\n aria-label={_getAriaLabel(i, 0)}\n data-is-focusable={isLegendSelected}\n ref={(e: SVGCircleElement | null) => {\n _refCallback(e!, circleId);\n }}\n onFocus={event =>\n _handleFocus(event, circleId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)\n }\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[0].onDataPointClick)}\n />,\n );\n }\n\n let gapIndex = 0;\n const gaps = _points[i].gaps?.sort((a, b) => a.startIndex - b.startIndex) ?? [];\n const lineCurve = _points[i].lineOptions?.curve;\n\n // Use path rendering technique for larger datasets to optimize performance.\n if ((props.optimizeLargeData || lineCurve) && _points[i].data.length > 1) {\n const line = d3Line()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => _xAxisScale(d[0]))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => yScale(d[1]))\n .curve(getCurveFactory(lineCurve));\n\n const lineId = `${_lineId}_${i}`;\n const borderId = `${_borderId}_${i}`;\n const strokeWidth = _points[i].lineOptions?.strokeWidth || props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;\n\n const isLegendSelected: boolean = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n\n const lineData: [number, number][] = [];\n for (let k = 0; k < _points[i].data.length; k++) {\n lineData.push([\n _points[i].data[k].x instanceof Date\n ? (_points[i].data[k].x as Date).getTime()\n : (_points[i].data[k].x as number),\n _points[i].data[k].y,\n ]);\n }\n\n if (isLegendSelected) {\n const lineBorderWidth = _points[i].lineOptions?.lineBorderWidth\n ? Number.parseFloat(_points[i].lineOptions!.lineBorderWidth!.toString())\n : 0;\n if (lineBorderWidth > 0) {\n bordersForLine.push(\n <path\n id={borderId}\n key={borderId}\n d={line(lineData)!}\n fill=\"transparent\"\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeWidth={Number.parseFloat(strokeWidth.toString()) + lineBorderWidth}\n stroke={_points[i].lineOptions?.lineBorderColor || tokens.colorNeutralBackground1}\n opacity={1}\n />,\n );\n }\n\n linesForLine.push(\n <path\n id={lineId}\n key={lineId}\n d={line(lineData)!}\n fill=\"transparent\"\n data-is-focusable={true}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n onMouseMove={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event, yScale)}\n onMouseOver={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event, yScale)}\n onMouseOut={_handleMouseOut}\n {..._getClickHandler(_points[i].onLineClick)}\n opacity={1}\n tabIndex={isLegendSelected ? 0 : undefined}\n />,\n );\n } else {\n linesForLine.push(\n <path\n id={lineId}\n key={lineId}\n d={line(lineData)!}\n fill=\"transparent\"\n data-is-focusable={false}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n opacity={0.1}\n />,\n );\n }\n\n pointsForLine.push(\n <circle\n id={`${_staticHighlightCircle}_${i}`}\n key={`${_staticHighlightCircle}_${i}`}\n r={5.5}\n cx={0}\n cy={0}\n fill={tokens.colorNeutralBackground1}\n strokeWidth={DEFAULT_LINE_STROKE_SIZE}\n stroke={lineColor}\n visibility={'hidden'}\n onMouseMove={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event, yScale)}\n onMouseOver={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event, yScale)}\n onMouseOut={_handleMouseOut}\n />,\n );\n } else if (!props.optimizeLargeData) {\n for (let j = 1; j < _points[i].data.length; j++) {\n const gapResult = _checkInGap(j, gaps, gapIndex);\n const isInGap = gapResult.isInGap;\n gapIndex = gapResult.gapIndex;\n\n const lineId = `${_lineId}_${i}_${j}`;\n const borderId = `${_borderId}_${i}_${j}`;\n const circleId = `${_circleId}_${i}_${j}`;\n const {\n x: x1,\n y: y1,\n xAxisCalloutData,\n xAxisCalloutAccessibilityData,\n } = _points[i].data[j - 1] as LineChartDataPoint;\n const { x: x2, y: y2 } = _points[i].data[j] as LineChartDataPoint;\n let path = _getPath(_xAxisScale(x1), yScale(y1), circleId, j, false, _points[i].index);\n const strokeWidth = _points[i].lineOptions?.strokeWidth || props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;\n\n const isLegendSelected: boolean =\n _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n\n const currentPointHidden = _points[i].hideNonActiveDots && activePoint !== circleId;\n pointsForLine.push(\n <path\n id={circleId}\n key={circleId}\n d={path}\n data-is-focusable={isLegendSelected}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={event =>\n _handleFocus(event, lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)\n }\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[j - 1].onDataPointClick)}\n opacity={isLegendSelected && !currentPointHidden ? 1 : 0.01}\n fill={_getPointFill(lineColor, circleId, j, false)}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n role=\"img\"\n aria-label={_getAriaLabel(i, j - 1)}\n tabIndex={isLegendSelected ? 0 : undefined}\n />,\n );\n if (j + 1 === _points[i].data.length) {\n // If this is last point of the line segment.\n const lastCircleId = `${circleId}${j}L`;\n const hiddenHoverCircleId = `${circleId}${j}D`;\n const lastPointHidden = _points[i].hideNonActiveDots && activePoint !== lastCircleId;\n path = _getPath(_xAxisScale(x2), yScale(y2), lastCircleId, j, true, _points[i].index);\n const {\n xAxisCalloutData: lastCirlceXCallout,\n xAxisCalloutAccessibilityData: lastCirlceXCalloutAccessibilityData,\n } = _points[i].data[j];\n pointsForLine.push(\n <React.Fragment key={`${lastCircleId}_container`}>\n <path\n id={lastCircleId}\n key={lastCircleId}\n d={path}\n data-is-focusable={isLegendSelected}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={event =>\n _handleFocus(\n event,\n lineId,\n x2,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n )\n }\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[j].onDataPointClick)}\n opacity={isLegendSelected && !lastPointHidden ? 1 : 0.01}\n fill={_getPointFill(lineColor, lastCircleId, j, true)}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n role=\"img\"\n aria-label={_getAriaLabel(i, j)}\n tabIndex={isLegendSelected ? 0 : undefined}\n />\n {/* Dummy circle acting as magnetic latch for last callout point */}\n <circle\n id={hiddenHoverCircleId}\n key={hiddenHoverCircleId}\n r={8}\n cx={_xAxisScale(x2)}\n cy={yScale(y2)}\n opacity={0}\n width={0}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onFocus={event =>\n _handleFocus(event, circleId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)\n }\n onMouseOut={_handleMouseOut}\n strokeWidth={0}\n focusable={false}\n onBlur={_handleMouseOut}\n />\n </React.Fragment>,\n );\n /* eslint-enable react/jsx-no-bind */\n }\n\n if (isLegendSelected) {\n // don't draw line if it is in a gap\n if (!isInGap) {\n const lineBorderWidth = _points[i].lineOptions?.lineBorderWidth\n ? Number.parseFloat(_points[i].lineOptions!.lineBorderWidth!.toString())\n : 0;\n if (lineBorderWidth > 0) {\n bordersForLine.push(\n <line\n id={borderId}\n key={borderId}\n x1={_xAxisScale(x1)}\n y1={yScale(y1)}\n x2={_xAxisScale(x2)}\n y2={yScale(y2)}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeWidth={Number.parseFloat(strokeWidth.toString()) + lineBorderWidth}\n {...(_points[i].lineOptions?.lineBorderColor && {\n stroke: _points[i].lineOptions?.lineBorderColor,\n })}\n className={classes.lineBorder}\n opacity={1}\n />,\n );\n }\n\n linesForLine.push(\n <line\n id={lineId}\n key={lineId}\n x1={_xAxisScale(x1)}\n y1={yScale(y1)}\n x2={_xAxisScale(x2)}\n y2={yScale(y2)}\n strokeWidth={strokeWidth}\n ref={(e: SVGLineElement | null) => {\n _refCallback(e!, lineId);\n }}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseOut={_handleMouseOut}\n stroke={lineColor}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={_points[i].lineOptions?.strokeDasharray}\n strokeDashoffset={_points[i].lineOptions?.strokeDashoffset}\n opacity={1}\n {..._getClickHandler(_points[i].onLineClick)}\n />,\n );\n }\n } else {\n if (!isInGap) {\n linesForLine.push(\n <line\n id={lineId}\n key={lineId}\n x1={_xAxisScale(x1)}\n y1={yScale(y1)}\n x2={_xAxisScale(x2)}\n y2={yScale(y2)}\n strokeWidth={strokeWidth}\n stroke={lineColor}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={_points[i].lineOptions?.strokeDasharray}\n strokeDashoffset={_points[i].lineOptions?.strokeDashoffset}\n opacity={0.1}\n />,\n );\n }\n }\n }\n }\n\n lines.push(\n <g\n key={`line_${i}`}\n role=\"region\"\n aria-label={`${legendVal}, line ${i + 1} of ${_points.length} with ${_points[i].data.length} data points.`}\n >\n {bordersForLine}\n {linesForLine}\n {pointsForLine}\n </g>,\n );\n }\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(_xAxisScale);\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return lines;\n }\n\n function _createColorFillBars(containerHeight: number) {\n const colorFillBars: JSX.Element[] = [];\n if (isSelectedLegend) {\n _colorFillBars.current = selectedColorBarLegend;\n } else {\n _colorFillBars.current = props.colorFillBars!;\n }\n\n const yMinMaxValues = findNumericMinMaxOfY(_points);\n const FILL_Y_PADDING = 3;\n for (let i = 0; i < _colorFillBars.current.length; i++) {\n const colorFillBar = _colorFillBars.current[i];\n const colorFillBarId = `${_colorFillBarId}-${i}`;\n const color = getColorFromToken(colorFillBar.color);\n\n if (colorFillBar.applyPattern) {\n // Using a pattern element because CSS was unable to render diagonal stripes for rect elements\n colorFillBars.push(_getStripePattern(color, i));\n }\n\n for (let j = 0; j < colorFillBar.data.length; j++) {\n const startX = colorFillBar.data[j].startX;\n const endX = colorFillBar.data[j].endX;\n const opacity =\n _legendHighlighted(colorFillBar.legend) || _noLegendHighlighted() || isSelectedLegend\n ? _getColorFillBarOpacity(colorFillBar)\n : 0.1;\n colorFillBars.push(\n <rect\n fill={colorFillBar.applyPattern ? `url(#${_colorFillBarPatternId}_${i})` : color}\n fillOpacity={opacity}\n x={_isRTL ? _xAxisScale(endX) : _xAxisScale(startX)}\n y={_yScalePrimary(yMinMaxValues.endValue) - FILL_Y_PADDING}\n width={Math.abs(_xAxisScale(endX) - _xAxisScale(startX))}\n height={_yScalePrimary(props.yMinValue || 0) - _yScalePrimary(yMinMaxValues.endValue) + FILL_Y_PADDING}\n key={`${colorFillBarId}${j}`}\n />,\n );\n }\n }\n return colorFillBars;\n }\n\n function _getStripePattern(color: string, id: number) {\n // This describes a tile pattern that resembles diagonal stripes\n // For more information: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d\n const stripePath = 'M-4,4 l8,-8 M0,16 l16,-16 M12,20 l8,-8';\n return (\n <pattern\n id={`${_colorFillBarPatternId}_${id}`}\n width={16}\n height={16}\n key={`${_colorFillBarPatternId}_${id}`}\n patternUnits={'userSpaceOnUse'}\n >\n <path d={stripePath} stroke={color} strokeWidth={1.25} />\n </pattern>\n );\n }\n\n function _checkInGap(pointIndex: number, gaps: LineChartGap[], currentGapIndex: number) {\n let gapIndex = currentGapIndex;\n let isInGap = false;\n\n while (gapIndex < gaps.length && pointIndex > gaps[gapIndex].endIndex) {\n gapIndex++;\n }\n\n if (gapIndex < gaps.length && pointIndex > gaps[gapIndex].startIndex && pointIndex <= gaps[gapIndex].endIndex) {\n isInGap = true;\n }\n return { isInGap, gapIndex };\n }\n\n function _refCallback(element: SVGGElement, legendTitle: string): void {\n _refArray.push({ index: legendTitle, refElement: element });\n }\n\n const _onMouseOverLargeDataset = (\n linenumber: number,\n lineHeight: number,\n mouseEvent: React.MouseEvent<SVGRectElement | SVGPathElement | SVGCircleElement>,\n yScale: ScaleLinear<number, number>,\n ) => {\n mouseEvent.persist();\n const { data } = props;\n const { lineChartData } = data;\n\n // This will get the value of the X when mouse is on the chart\n const xOffset = _xAxisScale.invert(pointer(mouseEvent)[0], document.getElementById(_rectId)!);\n const i = bisect(lineChartData![linenumber].data, xOffset);\n const d0 = lineChartData![linenumber].data[i - 1] as LineChartDataPoint;\n const d1 = lineChartData![linenumber].data[i] as LineChartDataPoint;\n let axisType: XAxisTypes | null = null;\n let xPointToHighlight: string | Date | number = 0;\n let index: null | number = null;\n if (d0 === undefined && d1 !== undefined) {\n xPointToHighlight = d1.x;\n index = i;\n } else if (d0 !== undefined && d1 === undefined) {\n xPointToHighlight = d0.x;\n index = i - 1;\n } else {\n axisType = getTypeOfAxis(lineChartData![linenumber].data[0].x, true) as XAxisTypes;\n let x0;\n let point0;\n let point1;\n switch (axisType) {\n case XAxisTypes.DateAxis:\n x0 = new Date(xOffset).getTime();\n point0 = (d0.x as Date).getTime();\n point1 = (d1.x as Date).getTime();\n xPointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n case XAxisTypes.NumericAxis:\n x0 = xOffset as number;\n point0 = d0.x as number;\n point1 = d1.x as number;\n xPointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n default:\n break;\n }\n }\n\n const { xAxisCalloutData } = lineChartData![linenumber].data[index as number];\n const formattedDate =\n xPointToHighlight instanceof Date ? formatDate(xPointToHighlight, props.useUTC) : xPointToHighlight;\n const modifiedXVal = xPointToHighlight instanceof Date ? xPointToHighlight.getTime() : xPointToHighlight;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = find(_calloutPoints, (element: { x: string | number }) => {\n return element.x === modifiedXVal;\n });\n const pointToHighlight: LineChartDataPoint = lineChartData![linenumber].data[index!] as LineChartDataPoint;\n const pointToHighlightUpdated =\n nearestCircleToHighlight === null ||\n (nearestCircleToHighlight !== null &&\n pointToHighlight !== null &&\n (nearestCircleToHighlight.x !== pointToHighlight.x || nearestCircleToHighlight.y !== pointToHighlight.y));\n // if no points need to be called out then don't show vertical line and callout card\n if (found && pointToHighlightUpdated) {\n _uniqueCallOutID = `#${_staticHighlightCircle}_${linenumber}`;\n\n d3Select(`#${_staticHighlightCircle}_${linenumber}`)\n .attr('cx', `${_xAxisScale(pointToHighlight.x)}`)\n .attr('cy', `${yScale(pointToHighlight.y)}`)\n .attr('visibility', 'visibility');\n\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(pointToHighlight.x)}, ${yScale(pointToHighlight.y)})`)\n .attr('visibility', 'visibility')\n .attr('y2', `${lineHeight - 5 - yScale(pointToHighlight.y)}`);\n\n setNearestCircleToHighlight(pointToHighlight);\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setStackCalloutProps(found!);\n setYValueHover(found.values);\n setDataPointCalloutProps(found!);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue(formattedDate);\n setActivePoint('');\n }\n\n if (!found) {\n setPopoverOpen(false);\n setNearestCircleToHighlight(pointToHighlight);\n setActivePoint('');\n }\n };\n\n function _handleFocus(\n event: React.FocusEvent<SVGCircleElement | SVGPathElement, Element>,\n lineId: string,\n x: number | Date,\n\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData?: AccessibilityProps,\n ) {\n let cx = 0;\n let cy = 0;\n\n const targetRect = (event.target as SVGCircleElement | SVGPathElement).getBoundingClientRect();\n cx = targetRect.left + targetRect.width / 2;\n cy = targetRect.top + targetRect.height / 2;\n updatePosition(cx, cy);\n _uniqueCallOutID = circleId;\n const formattedData = x instanceof Date ? formatDate(x, props.useUTC) : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const found = find(_calloutPoints, (element: { x: string | number }) => element.x === xVal);\n // if no points need to be called out then don't show vertical line and callout card\n\n if (found) {\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(x)}, 0)`)\n .attr('visibility', 'visibility');\n _refArray.forEach((obj: RefArrayData) => {\n if (obj.index === lineId) {\n setPopoverOpen(true);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);\n setYValueHover(found.values);\n setStackCalloutProps(found!);\n setDataPointCalloutProps(found!);\n setActivePoint(circleId);\n }\n });\n } else {\n setActivePoint(circleId);\n }\n }\n\n function _handleHover(\n x: number | Date,\n y: number | Date,\n lineHeight: number,\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData: AccessibilityProps | undefined,\n mouseEvent: React.MouseEvent<SVGElement>,\n yScale: ScaleLinear<number, number>,\n ) {\n mouseEvent?.persist();\n const formattedData = x instanceof Date ? formatDate(x, props.useUTC) : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const found = find(_calloutPoints, (element: { x: string | number }) => element.x === xVal);\n // if no points need to be called out then don't show vertical line and callout card\n\n if (found) {\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(x)}, ${yScale(y)})`)\n .attr('visibility', 'visibility')\n .attr('y2', `${lineHeight - 5 - yScale(y)}`);\n\n if (_uniqueCallOutID !== circleId) {\n _uniqueCallOutID = circleId;\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);\n setYValueHover(found.values);\n setStackCalloutProps(found!);\n setDataPointCalloutProps(found!);\n setActivePoint(circleId);\n setNearestCircleToHighlight(null);\n }\n } else {\n setActivePoint(circleId);\n setNearestCircleToHighlight(null);\n }\n }\n\n /**\n * Screen readers announce an element as clickable if the onClick attribute is set.\n * This function sets the attribute only when a click event handler is provided.*/\n\n function _getClickHandler(func?: () => void): { onClick?: () => void } {\n if (func) {\n return {\n onClick: func,\n };\n }\n\n return {};\n }\n\n function _handleMouseOut() {\n d3Select(`#${_verticalLine}`).attr('visibility', 'hidden');\n }\n\n function _handleChartMouseLeave() {\n _uniqueCallOutID = null;\n setActivePoint('');\n if (isPopoverOpen) {\n setPopoverOpen(false);\n }\n }\n\n function _handleMultipleLineLegendSelectionAction(selectedLine: LineChartDataWithIndex) {\n const selectedLineIndex = selectedLegendPoints.reduce((acc, line, index) => {\n if (acc > -1 || line.legend !== selectedLine.legend) {\n return acc;\n } else {\n return index;\n }\n }, -1);\n\n let selectedLines: LineChartDataWithIndex[];\n if (selectedLineIndex === -1) {\n selectedLines = [...selectedLegendPoints, selectedLine];\n } else {\n selectedLines = selectedLegendPoints\n .slice(0, selectedLineIndex)\n .concat(selectedLegendPoints.slice(selectedLineIndex + 1));\n }\n\n const areAllLineLegendsSelected = props.data && selectedLines.length === props.data.lineChartData!.length;\n\n if (\n areAllLineLegendsSelected &&\n ((props.colorFillBars && props.colorFillBars.length === selectedColorBarLegend.length) || !props.colorFillBars)\n ) {\n // Clear all legends if all legends including color fill bar legends are selected\n // Or clear all legends if all legends are selected and there are no color fill bars\n _clearMultipleLegendSelections();\n } else if (!selectedLines.length && !selectedColorBarLegend.length) {\n // Clear all legends if no legends including color fill bar legends are selected\n _clearMultipleLegendSelections();\n } else {\n // Otherwise, set state when one or more legends are selected, including color fill bar legends\n setSelectedLegendPoints(selectedLines);\n setIsSelectedLegend(true);\n }\n\n const selectedLegendTitlesToPass = selectedLines.map((line: LineChartDataWithIndex) => line.legend);\n _handleLegendClick(selectedLine, selectedLegendTitlesToPass);\n }\n\n function _handleMultipleColorFillBarLegendSelectionAction(selectedColorFillBar: ColorFillBarsProps) {\n const selectedColorFillBarIndex = selectedColorBarLegend.reduce((acc, colorFillBar, index) => {\n if (acc > -1 || colorFillBar.legend !== selectedColorFillBar.legend) {\n return acc;\n } else {\n return index;\n }\n }, -1);\n\n let selectedColorFillBars: ColorFillBarsProps[];\n if (selectedColorFillBarIndex === -1) {\n selectedColorFillBars = [...selectedColorBarLegend, selectedColorFillBar];\n } else {\n selectedColorFillBars = selectedColorBarLegend\n .slice(0, selectedColorFillBarIndex)\n .concat(selectedColorBarLegend.slice(selectedColorFillBarIndex + 1));\n }\n\n const areAllColorFillBarLegendsSelected =\n selectedColorFillBars.length === (props.colorFillBars && props.colorFillBars!.length);\n\n if (\n areAllColorFillBarLegendsSelected &&\n ((props.data && props.data.lineChartData!.length === selectedLegendPoints.length) || !props.data)\n ) {\n // Clear all legends if all legends, including line legends, are selected\n // Or clear all legends if all legends are selected and there is no line data\n _clearMultipleLegendSelections();\n } else if (!selectedColorFillBars.length && !selectedLegendPoints.length) {\n // Clear all legends if no legends are selected, including line legends\n _clearMultipleLegendSelections();\n } else {\n // set state when one or more legends are selected, including line legends\n setSelectedColorBarLegend(selectedColorFillBars);\n setIsSelectedLegend(true);\n }\n\n const selectedLegendTitlesToPass = selectedColorFillBars.map(\n (colorFillBar: ColorFillBarsProps) => colorFillBar.legend,\n );\n _handleLegendClick(selectedColorFillBar, selectedLegendTitlesToPass);\n }\n\n function _clearMultipleLegendSelections() {\n setSelectedColorBarLegend([]);\n setSelectedLegendPoints([]);\n setIsSelectedLegend(false);\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it*/\n\n function _legendHighlighted(legend: string) {\n return selectedLegend === legend || (selectedLegend === '' && activeLegend === legend);\n }\n\n /**\n * This function checks if none of the legends is selected or hovered.*/\n\n function _noLegendHighlighted() {\n return selectedLegend === '' && activeLegend === '';\n }\n\n function _getColorFillBarOpacity(colorFillBar: ColorFillBarsProps) {\n return colorFillBar.applyPattern ? 1 : 0.4;\n }\n\n function _getAriaLabel(lineIndex: number, pointIndex: number): string {\n const line = _points[lineIndex];\n const point = line.data[pointIndex];\n const formattedDate = point.x instanceof Date ? formatDate(point.x, props.useUTC) : point.x;\n const xValue = point.xAxisCalloutData || formattedDate;\n const legend = line.legend;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n function _isChartEmpty(): boolean {\n return !(\n props.data &&\n props.data.lineChartData &&\n props.data.lineChartData.length > 0 &&\n props.data.lineChartData.filter((item: LineChartPoints) => item.data.length).length > 0\n );\n }\n\n const { legendProps, tickValues, tickFormat, eventAnnotationProps } = props;\n _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n\n const isXAxisDateType = getXAxisType(_points);\n let points = _points;\n if (legendProps && !!legendProps.canSelectMultipleLegends) {\n points = selectedLegendPoints.length >= 1 ? selectedLegendPoints : _points;\n _calloutPoints = calloutData(points);\n }\n\n let legendBars = null;\n // reduce computation cost by only creating legendBars\n // if when hideLegend is false.\n // NOTE: they are rendered only when hideLegend is false in CartesianChart.\n if (!props.hideLegend) {\n legendBars = _createLegends(_points!); // ToDo: Memoize legends to improve performance.\n }\n const calloutProps = {\n YValueHover: YValueHover,\n hoverXValue: hoverXValue,\n descriptionMessage:\n props.getCalloutDescriptionMessage && stackCalloutProps\n ? props.getCalloutDescriptionMessage(stackCalloutProps)\n : undefined,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData: xAxisCalloutAccessibilityData,\n ...props.calloutProps,\n clickPosition: clickPosition,\n isPopoverOpen: isPopoverOpen,\n isCalloutForStack: true,\n culture: props.culture ?? 'en-us',\n isCartesian: true,\n customCallout: {\n customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n };\n const tickParams = {\n tickValues,\n tickFormat,\n };\n\n return !_isChartEmpty() ? (\n <CartesianChart\n {...props}\n chartTitle={props.data.chartTitle}\n points={points}\n chartType={ChartTypes.LineChart}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n createYAxis={createNumericYAxis}\n getmargins={_getMargins}\n getMinMaxOfYAxis={findNumericMinMaxOfY}\n getGraphData={_initializeLineChartData}\n xAxisType={isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n getDomainNRangeValues={_getDomainNRangeValues}\n createStringYAxis={createStringYAxis}\n onChartMouseLeave={_handleChartMouseLeave}\n enableFirstRenderOptimization={props.enablePerfOptimization && _firstRenderOptimization}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: ChildProps) => {\n _xAxisScale = props.xScale!;\n _yScalePrimary = props.yScalePrimary!;\n _yScaleSecondary = props.yScaleSecondary;\n return (\n <>\n <g>\n <line\n x1={0}\n y1={0}\n x2={0}\n y2={props.containerHeight}\n stroke={'#323130'}\n id={_verticalLine}\n visibility={'hidden'}\n strokeDasharray={'5,5'}\n />\n {props.optimizeLargeData ? (\n <rect id={_rectId} width={props.containerWidth} height={props.containerHeight} fill={'transparent'} />\n ) : (\n <></>\n )}\n <g>\n {_renderedColorFillBars}\n {lines}\n </g>\n {eventAnnotationProps && (\n <EventsAnnotation\n {...eventAnnotationProps}\n scale={props.xScale!}\n chartYTop={margins.top! + eventLabelHeight}\n chartYBottom={props.containerHeight! - 35}\n />\n )}\n </g>\n </>\n );\n }}\n />\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n },\n);\nLineChart.displayName = 'LineChart';\n"],"names":["React","useLineChartStyles","select","d3Select","pointer","bisector","Legends","line","d3Line","useId","find","CartesianChart","EventsAnnotation","tokens","calloutData","ChartTypes","getXAxisType","XAxisTypes","tooltipOfAxislabels","Points","pointTypes","getTypeOfAxis","getNextColor","getColorFromToken","findNumericMinMaxOfY","createNumericYAxis","domainRangeOfDateForAreaLineVerticalBarChart","domainRangeOfNumericForAreaChart","createStringYAxis","useRtl","formatDate","getCurveFactory","PointSize","bisect","d","x","left","DEFAULT_LINE_STROKE_SIZE","PATH_MULTIPLY_SIZE","_getPointPath","y","w","index","allPointPaths","LineChart","forwardRef","props","forwardedRef","_points","_injectIndexPropertyInLineChartData","data","lineChartData","_calloutPoints","_xAxisScale","_yScalePrimary","_circleId","_lineId","_borderId","_verticalLine","_colorFillBarPatternId","_uniqueCallOutID","_refArray","margins","eventLabelHeight","lines","_renderedColorFillBars","_colorFillBars","useRef","_tooltipId","_rectId","_staticHighlightCircle","_firstRenderOptimization","_emptyChartId","_colorFillBarId","_isRTL","xAxisCalloutAccessibilityData","cartesianChartRef","_yScaleSecondary","eventAnnotationProps","labelHeight","hoverXValue","setHoverXValue","useState","activeLegend","setActiveLegend","YValueHover","setYValueHover","selectedLegend","setSelectedLegend","selectedLegendPoints","setSelectedLegendPoints","selectedColorBarLegend","setSelectedColorBarLegend","isSelectedLegend","setIsSelectedLegend","legendProps","selectedLegends","length","activePoint","setActivePoint","nearestCircleToHighlight","setNearestCircleToHighlight","dataPointCalloutProps","setDataPointCalloutProps","stackCalloutProps","setStackCalloutProps","clickPosition","setClickPosition","isPopoverOpen","setPopoverOpen","pointsRef","calloutPointsRef","classes","useEffect","current","height","width","useImperativeHandle","componentRef","chartContainer","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","barWidth","tickValues","shiftX","domainNRangeValue","NumericAxis","DateAxis","dStartValue","dEndValue","rStartValue","rEndValue","isFilterSelectedLegends","allowMultipleShapesForPoints","filteredData","filter","item","includes","legend","map","color","updatePosition","newX","newY","threshold","distance","Math","sqrt","pow","_getCustomizedCallout","onRenderCalloutPerStack","onRenderCalloutPerDataPoint","_getMargins","_margins","_initializeLineChartData","xScale","yScalePrimary","containerHeight","containerWidth","xElement","yAxisElement","yScaleSecondary","colorFillBars","_createColorFillBars","_createLines","_handleSingleLegendSelectionAction","lineChartItem","_handleLegendClick","_onHoverCardHide","onLegendClick","_createLegends","isLegendMultiSelectEnabled","canSelectMultipleLegends","legendDataItems","point","title","action","_handleMultipleLineLegendSelectionAction","onMouseOutAction","hoverAction","_handleChartMouseLeave","legendShape","shape","Object","keys","colorFillBarsLegendDataItems","colorFillBar","_handleMultipleColorFillBarLegendSelectionAction","opacity","_getColorFillBarOpacity","stripePattern","applyPattern","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onLegendHoverCardLeave","_getBoxWidthOfShape","pointId","pointIndex","isLastPoint","strokeWidth","_getPath","xPos","yPos","pointOftheLine","widthRatio","_getPointFill","lineColor","colorNeutralBackground1","i","linesForLine","bordersForLine","pointsForLine","legendVal","verticaLineHeight","bottom","yScale","useSecondaryYScale","x1","y1","xAxisCalloutData","circleId","isLegendSelected","_legendHighlighted","_noLegendHighlighted","push","circle","id","key","r","cx","cy","fill","tabIndex","undefined","onMouseOver","event","_handleHover","onMouseMove","onMouseOut","_handleMouseOut","stroke","role","aria-label","_getAriaLabel","data-is-focusable","ref","e","_refCallback","onFocus","_handleFocus","onBlur","_getClickHandler","onDataPointClick","gapIndex","gaps","sort","a","b","startIndex","lineCurve","lineOptions","curve","optimizeLargeData","lineId","borderId","lineData","k","Date","getTime","lineBorderWidth","Number","parseFloat","toString","path","strokeLinecap","lineBorderColor","_onMouseOverLargeDataset","bind","onLineClick","visibility","j","gapResult","_checkInGap","isInGap","x2","y2","currentPointHidden","hideNonActiveDots","lastCircleId","hiddenHoverCircleId","lastPointHidden","lastCirlceXCallout","lastCirlceXCalloutAccessibilityData","Fragment","focusable","className","lineBorder","strokeDasharray","strokeDashoffset","g","showXAxisLablesTooltip","document","getElementById","remove","wrapXAxisLables","xAxisElement","call","tooltipProps","tooltipCls","tooltip","axis","yMinMaxValues","FILL_Y_PADDING","colorFillBarId","_getStripePattern","startX","endX","rect","fillOpacity","endValue","abs","yMinValue","stripePath","pattern","patternUnits","currentGapIndex","endIndex","element","legendTitle","refElement","linenumber","lineHeight","mouseEvent","persist","xOffset","invert","d0","d1","axisType","xPointToHighlight","x0","point0","point1","formattedDate","useUTC","modifiedXVal","found","pointToHighlight","pointToHighlightUpdated","attr","clientX","clientY","values","targetRect","target","getBoundingClientRect","top","formattedData","xVal","forEach","obj","func","onClick","selectedLine","selectedLineIndex","reduce","acc","selectedLines","slice","concat","areAllLineLegendsSelected","_clearMultipleLegendSelections","selectedLegendTitlesToPass","selectedColorFillBar","selectedColorFillBarIndex","selectedColorFillBars","areAllColorFillBarLegendsSelected","lineIndex","xValue","yValue","yAxisCalloutData","callOutAccessibilityData","ariaLabel","_isChartEmpty","tickFormat","isXAxisDateType","legendBars","hideLegend","calloutProps","descriptionMessage","getCalloutDescriptionMessage","isCalloutForStack","culture","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","chartTitle","createYAxis","getmargins","getMinMaxOfYAxis","getGraphData","getDomainNRangeValues","onChartMouseLeave","enableFirstRenderOptimization","enablePerfOptimization","children","scale","chartYTop","chartYBottom","div","style","displayName"],"mappings":";;;;;;;eAoIa4C;;;;iEApIU,QAAQ;0CAEI,8BAA8B;6BAErB,eAAe;yBAClC,WAAW;uBACJ,mBAAmB;yBACpB,WAAW;gCACpB,4BAA4B;wBAC7B,wBAAwB;wBAatC,cAAc;iCACY,oCAAoC;4BAC9C,wBAAwB;AAyB/C,IAAKZ,YAAAA,WAAAA,GAAAA,SAAAA,SAAAA;;;WAAAA;EAAAA,aAAAA,CAAAA;AAKL,8DAA8D;AAC9D,MAAMC,aAAS5B,iBAAAA,EAAS,CAAC6B,IAAWA,EAAEC,CAAC,EAAEC,IAAI;AAE7C,MAAMC,2BAA2B;AACjC,6FAA6F;AAC7F,MAAMC,qBAAqB;AAE3B;;;;;;CAMC,GACD,MAAMC,gBAAgB,CAACJ,GAAWK,GAAWC,GAAWC;IACtD,MAAMC,gBAAgB;QACpB,cAAc;QACd,CAAC,CAAC,EAAER,IAAIM,IAAI,EAAE,CAAC,EAAED,EAAE;MACjB,EAAEC,IAAI,EAAE,CAAC,EAAEA,IAAI,EAAE,OAAO,EAAEN,IAAIM,IAAI,EAAE,CAAC,EAAED,EAAE;MACzC,EAAEL,IAAIM,IAAI,EAAE,CAAC,EAAED,EAAE;OAChB,EAAEC,IAAI,EAAE,CAA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1BxG,iBAAiBR,MAAMiH,aAAa;YACpClF,mBAAmB/B,MAAMsH,eAAe;YACxC,OAAA,WAAA,GACE,OAAA,aAAA,CAAA,OAAA,QAAA,EAAA,MAAA,WAAA,GACE,OAAA,aAAA,CAAC6I,KAAAA,MAAAA,WAAAA,GACC,OAAA,aAAA,CAAC1S,QAAAA;gBACCwN,IAAI;gBACJC,IAAI;gBACJkE,IAAI;gBACJC,IAAIrP,MAAMkH,eAAe;gBACzBsF,QAAQ;gBACRd,IAAI9K;gBACJmO,YAAY;gBACZkB,iBAAiB;gBAElBjQ,MAAM8N,iBAAiB,GAAA,WAAA,GACtB,OAAA,aAAA,CAACuD,QAAAA;gBAAK3F,IAAInK;gBAAS+C,OAAOtE,MAAMmH,cAAc;gBAAE9C,QAAQrE,MAAMkH,eAAe;gBAAE6E,MAAM;+BAErF,OAAA,aAAA,CAAA,OAAA,QAAA,EAAA,OAAA,WAAA,GAEF,OAAA,aAAA,CAACoE,KAAAA,MACEhP,wBACAD,QAEFc,wBAAAA,WAAAA,GACC,OAAA,aAAA,CAAClE,iCAAAA,EAAAA;gBACE,GAAGkE,oBAAoB;gBACxBiV,OAAOjX,MAAMgH,MAAM;gBACnBkQ,WAAWlW,QAAQ4S,GAAG,GAAI3S;gBAC1BkW,cAAcnX,MAAMkH,eAAe,GAAI;;QAMnD;uBAGF,OAAA,aAAA,CAACkQ,OAAAA;QAAI1L,IAAIhK;QAAe+K,MAAM;QAAS4K,OAAO;YAAEpO,SAAS;QAAI;QAAGyD,cAAY;;AAEhF,GACA;AACF5M,UAAUwX,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/LineChart/LineChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { LineChartProps } from './LineChart.types';\nimport { useLineChartStyles } from './useLineChartStyles.styles';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select, pointer } from 'd3-selection';\nimport { bisector } from 'd3-array';\nimport { Legend, Legends, LegendContainer } from '../Legends/index';\nimport { line as d3Line } from 'd3-shape';\nimport { useId } from '@fluentui/react-utilities';\nimport { find } from '../../utilities/index';\nimport {\n AccessibilityProps,\n CartesianChart,\n ChildProps,\n LineChartPoints,\n CustomizedCalloutData,\n Margins,\n RefArrayData,\n ColorFillBarsProps,\n LineChartGap,\n LineChartDataPoint,\n Chart,\n ImageExportOptions,\n} from '../../index';\nimport { EventsAnnotation } from './eventAnnotation/EventAnnotation';\nimport { tokens } from '@fluentui/react-theme';\nimport {\n calloutData,\n ChartTypes,\n getXAxisType,\n XAxisTypes,\n tooltipOfAxislabels,\n Points,\n pointTypes,\n getTypeOfAxis,\n getNextColor,\n getColorFromToken,\n findNumericMinMaxOfY,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfDateForAreaLineVerticalBarChart,\n domainRangeOfNumericForAreaChart,\n createStringYAxis,\n useRtl,\n formatDate,\n getCurveFactory,\n} from '../../utilities/index';\nimport { ScaleLinear } from 'd3-scale';\nimport { toImage } from '../../utilities/image-export-utils';\n\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\nenum PointSize {\n hoverSize = 11,\n invisibleSize = 1,\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst bisect = bisector((d: any) => d.x).left;\n\nconst DEFAULT_LINE_STROKE_SIZE = 4;\n// The given shape of a icon must be 2.5 times bigger than line width (known as stroke width)\nconst PATH_MULTIPLY_SIZE = 2.5;\n\n/**\n *\n * @param x units from origin\n * @param y units from origin\n * @param w is the legnth of the each side of a shape\n * @param index index to get the shape path\n */\nconst _getPointPath = (x: number, y: number, w: number, index: number): string => {\n const allPointPaths = [\n // circle path\n `M${x - w / 2} ${y}\n A${w / 2} ${w / 2} 0 1 0 ${x + w / 2} ${y}\n M${x - w / 2} ${y}\n A ${w / 2} ${w / 2} 0 1 1 ${x + w / 2} ${y}\n `,\n //square\n `M${x - w / 2} ${y - w / 2}\n L${x + w / 2} ${y - w / 2}\n L${x + w / 2} ${y + w / 2}\n L${x - w / 2} ${y + w / 2}\n Z`,\n //triangle\n `M${x - w / 2} ${y - 0.2886 * w}\n H ${x + w / 2}\n L${x} ${y + 0.5774 * w} Z`,\n //diamond\n `M${x} ${y - w / 2}\n L${x + w / 2} ${y}\n L${x} ${y + w / 2}\n L${x - w / 2} ${y}\n Z`,\n //pyramid\n `M${x} ${y - 0.5774 * w}\n L${x + w / 2} ${y + 0.2886 * w}\n L${x - w / 2} ${y + 0.2886 * w} Z`,\n //hexagon\n `M${x - 0.5 * w} ${y - 0.866 * w}\n L${x + 0.5 * w} ${y - 0.866 * w}\n L${x + w} ${y}\n L${x + 0.5 * w} ${y + 0.866 * w}\n L${x - 0.5 * w} ${y + 0.866 * w}\n L${x - w} ${y}\n Z`,\n //pentagon\n `M${x} ${y - 0.851 * w}\n L${x + 0.6884 * w} ${y - 0.2633 * w}\n L${x + 0.5001 * w} ${y + 0.6884 * w}\n L${x - 0.5001 * w} ${y + 0.6884 * w}\n L${x - 0.6884 * w} ${y - 0.2633 * w}\n Z`,\n //octagon\n `M${x - 0.5001 * w} ${y - 1.207 * w}\n L${x + 0.5001 * w} ${y - 1.207 * w}\n L${x + 1.207 * w} ${y - 0.5001 * w}\n L${x + 1.207 * w} ${y + 0.5001 * w}\n L${x + 0.5001 * w} ${y + 1.207 * w}\n L${x - 0.5001 * w} ${y + 1.207 * w}\n L${x - 1.207 * w} ${y + 0.5001 * w}\n L${x - 1.207 * w} ${y - 0.5001 * w}\n Z`,\n ];\n return allPointPaths[index];\n};\n\ntype LineChartDataWithIndex = LineChartPoints & { index: number };\n\n// Create a LineChart variant which uses these default styles and this styled subcomponent.\n/**\n * Linechart component\n * {@docCategory LineChart}\n */\nexport const LineChart: React.FunctionComponent<LineChartProps> = React.forwardRef<HTMLDivElement, LineChartProps>(\n (props, forwardedRef) => {\n let _points: LineChartDataWithIndex[] = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _calloutPoints: any[] = calloutData(_points) || [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _xAxisScale: any = '';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _yScalePrimary: any = '';\n let _circleId: string = useId('circle');\n let _lineId: string = useId('lineID');\n let _borderId: string = useId('borderID');\n let _verticalLine: string = useId('verticalLine');\n let _colorFillBarPatternId: string = useId('colorFillBarPattern');\n let _uniqueCallOutID: string | null = '';\n let _refArray: RefArrayData[] = [];\n let margins: Margins;\n let eventLabelHeight: number = 36;\n let lines: JSX.Element[];\n let _renderedColorFillBars: JSX.Element[];\n const _colorFillBars = React.useRef<ColorFillBarsProps[]>([]);\n let _tooltipId: string = useId('LineChartTooltipId_');\n let _rectId: string = useId('containerRectLD');\n let _staticHighlightCircle: string = useId('staticHighlightCircle');\n let _firstRenderOptimization = true;\n let _emptyChartId: string = useId('_LineChart_empty');\n const _colorFillBarId = useId('_colorFillBarId');\n const _isRTL: boolean = useRtl();\n let xAxisCalloutAccessibilityData: AccessibilityProps = {};\n const cartesianChartRef = React.useRef<Chart>(null);\n let _yScaleSecondary: ScaleLinear<number, number> | undefined;\n const _legendsRef = React.useRef<LegendContainer>(null);\n\n props.eventAnnotationProps &&\n props.eventAnnotationProps.labelHeight &&\n (eventLabelHeight = props.eventAnnotationProps.labelHeight);\n\n const [hoverXValue, setHoverXValue] = React.useState<string | number>('');\n const [activeLegend, setActiveLegend] = React.useState<string>('');\n const [YValueHover, setYValueHover] = React.useState<[]>([]);\n const [selectedLegend, setSelectedLegend] = React.useState<string>('');\n const [selectedLegendPoints, setSelectedLegendPoints] = React.useState<any[]>(\n _injectIndexPropertyInLineChartData(props.data.lineChartData, true),\n );\n const [selectedColorBarLegend, setSelectedColorBarLegend] = React.useState<any[]>([]);\n const [isSelectedLegend, setIsSelectedLegend] = React.useState<boolean>(\n (props.legendProps?.selectedLegends?.length ?? 0) > 0,\n );\n const [activePoint, setActivePoint] = React.useState<string>('');\n const [nearestCircleToHighlight, setNearestCircleToHighlight] = React.useState<LineChartDataPoint | null>(null);\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<CustomizedCalloutData>();\n const [stackCalloutProps, setStackCalloutProps] = React.useState<CustomizedCalloutData>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n\n const pointsRef = React.useRef<LineChartDataWithIndex[] | []>([]);\n const calloutPointsRef = React.useRef<any[]>([]);\n const classes = useLineChartStyles(props);\n React.useEffect(() => {\n /** note that height and width are not used to resize or set as dimesions of the chart,\n * fitParentContainer is responisble for setting the height and width or resizing of the svg/chart\n */\n\n if (_points !== _injectIndexPropertyInLineChartData(props.data.lineChartData) || props.data !== _points) {\n pointsRef.current = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n calloutPointsRef.current = calloutData(pointsRef.current);\n }\n }, [props.height, props.width, props.data]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n toImage: (opts?: ImageExportOptions): Promise<string> => {\n return toImage(cartesianChartRef.current?.chartContainer, _legendsRef.current?.toSVG, _isRTL, opts);\n },\n }),\n [],\n );\n\n function _getDomainNRangeValues(\n points: LineChartPoints[],\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfNumericForAreaChart(points, margins, width, isRTL);\n } else if (xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = domainRangeOfDateForAreaLineVerticalBarChart(\n points,\n margins,\n width,\n isRTL,\n tickValues! as Date[],\n chartType,\n barWidth,\n );\n } else {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n }\n return domainNRangeValue;\n }\n\n function _injectIndexPropertyInLineChartData(\n lineChartData?: LineChartPoints[],\n isFilterSelectedLegends: boolean = false,\n ): LineChartDataWithIndex[] | [] {\n const { allowMultipleShapesForPoints = false } = props;\n // Apply filter only if isPropChange is true\n const filteredData = isFilterSelectedLegends\n ? lineChartData?.filter(\n (item: LineChartPoints) =>\n props.legendProps?.selectedLegends?.includes(item.legend) ||\n props.legendProps?.selectedLegend === item.legend,\n )\n : lineChartData;\n return filteredData\n ? filteredData.map((item: LineChartPoints, index: number) => {\n let color: string;\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0);\n } else {\n color = getColorFromToken(item.color);\n }\n return {\n ...item,\n index: allowMultipleShapesForPoints ? index : -1,\n color,\n };\n })\n : [];\n }\n\n function updatePosition(newX: number, newY: number) {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n function _getCustomizedCallout() {\n return props.onRenderCalloutPerStack\n ? props.onRenderCalloutPerStack(stackCalloutProps)\n : props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps)\n : null;\n }\n\n function _getMargins(_margins: Margins) {\n margins = _margins;\n }\n\n function _initializeLineChartData(\n xScale: NumericAxis,\n yScalePrimary: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n yAxisElement?: SVGElement | null,\n yScaleSecondary?: ScaleLinear<number, number>,\n ) {\n _xAxisScale = xScale;\n _yScalePrimary = yScalePrimary;\n _yScaleSecondary = yScaleSecondary;\n _renderedColorFillBars = props.colorFillBars ? _createColorFillBars(containerHeight) : [];\n lines = _createLines(xElement!, containerHeight!);\n }\n\n function _handleSingleLegendSelectionAction(lineChartItem: LineChartDataWithIndex | ColorFillBarsProps) {\n if (selectedLegend === lineChartItem.legend) {\n setSelectedLegend('');\n _handleLegendClick(lineChartItem, null);\n } else {\n setSelectedLegend(lineChartItem.legend);\n _handleLegendClick(lineChartItem, lineChartItem.legend);\n }\n }\n\n function _onHoverCardHide() {\n setSelectedLegendPoints([]);\n setSelectedColorBarLegend([]);\n setIsSelectedLegend(false);\n }\n\n function _handleLegendClick(\n lineChartItem: LineChartDataWithIndex | ColorFillBarsProps,\n selectedLegend: string | null | string[],\n ): void {\n if (lineChartItem.onLegendClick) {\n lineChartItem.onLegendClick(selectedLegend);\n }\n }\n\n function _createLegends(data: LineChartDataWithIndex[]): JSX.Element {\n const { legendProps, allowMultipleShapesForPoints = false } = props;\n const isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);\n const legendDataItems = data.map((point: LineChartDataWithIndex) => {\n const color: string = point.color!;\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: point.legend!,\n color,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n _handleMultipleLineLegendSelectionAction(point);\n } else {\n _handleSingleLegendSelectionAction(point);\n }\n },\n onMouseOutAction: () => {\n setActiveLegend('');\n },\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(point.legend);\n },\n ...(point.legendShape && {\n shape: point.legendShape,\n }),\n ...(allowMultipleShapesForPoints && {\n shape: Points[point.index % Object.keys(pointTypes).length] as Legend['shape'],\n }),\n };\n return legend;\n });\n\n const colorFillBarsLegendDataItems = props.colorFillBars\n ? props.colorFillBars.map((colorFillBar: ColorFillBarsProps, index: number) => {\n const title = colorFillBar.legend;\n const color = getColorFromToken(colorFillBar.color);\n const legend: Legend = {\n title,\n color,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n _handleMultipleColorFillBarLegendSelectionAction(colorFillBar);\n } else {\n _handleSingleLegendSelectionAction(colorFillBar);\n }\n },\n onMouseOutAction: () => {\n setActiveLegend('');\n },\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(title);\n },\n opacity: _getColorFillBarOpacity(colorFillBar),\n stripePattern: colorFillBar.applyPattern,\n };\n return legend;\n })\n : [];\n\n return (\n <Legends\n legends={[...legendDataItems, ...colorFillBarsLegendDataItems]}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...(isLegendMultiSelectEnabled && { onLegendHoverCardLeave: _onHoverCardHide })}\n {...props.legendProps}\n legendRef={_legendsRef}\n />\n );\n }\n\n function _getBoxWidthOfShape(pointId: string, pointIndex: number, isLastPoint: boolean) {\n const { allowMultipleShapesForPoints = false, strokeWidth = DEFAULT_LINE_STROKE_SIZE } = props;\n if (allowMultipleShapesForPoints) {\n if (activePoint === pointId) {\n return PointSize.hoverSize;\n } else if (pointIndex === 1 || isLastPoint) {\n return strokeWidth * PATH_MULTIPLY_SIZE;\n } else {\n return PointSize.invisibleSize;\n }\n } else {\n if (activePoint === pointId) {\n return PointSize.hoverSize;\n } else {\n return PointSize.invisibleSize;\n }\n }\n }\n\n function _getPath(\n xPos: number,\n yPos: number,\n pointId: string,\n pointIndex: number,\n isLastPoint: boolean,\n pointOftheLine: number,\n ): string {\n const { allowMultipleShapesForPoints = false } = props;\n let w = _getBoxWidthOfShape(pointId, pointIndex, isLastPoint);\n const index: number = allowMultipleShapesForPoints ? pointOftheLine % Object.keys(pointTypes).length : 0;\n const widthRatio = pointTypes[index].widthRatio;\n w = widthRatio > 1 ? w / widthRatio : w;\n\n return _getPointPath(xPos, yPos, w, index);\n }\n function _getPointFill(lineColor: string, pointId: string, pointIndex: number, isLastPoint: boolean) {\n const { allowMultipleShapesForPoints = false } = props;\n if (allowMultipleShapesForPoints) {\n if (pointIndex === 1 || isLastPoint) {\n if (activePoint === pointId) {\n return tokens.colorNeutralBackground1;\n } else {\n return lineColor;\n }\n } else {\n if (activePoint === pointId) {\n return tokens.colorNeutralBackground1;\n } else {\n return lineColor;\n }\n }\n } else {\n if (activePoint === pointId) {\n return tokens.colorNeutralBackground1;\n } else {\n return lineColor;\n }\n }\n }\n\n function _createLines(xElement: SVGElement, containerHeight: number): JSX.Element[] {\n const lines: JSX.Element[] = [];\n if (isSelectedLegend) {\n _points = selectedLegendPoints;\n } else {\n _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n }\n for (let i = _points.length - 1; i >= 0; i--) {\n const linesForLine: JSX.Element[] = [];\n const bordersForLine: JSX.Element[] = [];\n const pointsForLine: JSX.Element[] = [];\n\n const legendVal: string = _points[i].legend;\n const lineColor: string = _points[i].color!;\n const verticaLineHeight = containerHeight - margins.bottom! + 6;\n const yScale = _points[i].useSecondaryYScale && _yScaleSecondary ? _yScaleSecondary : _yScalePrimary;\n if (_points[i].data.length === 1) {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const {\n x: x1,\n y: y1,\n xAxisCalloutData,\n xAxisCalloutAccessibilityData,\n } = _points[i].data[0] as LineChartDataPoint;\n const circleId = `${_circleId}_${i}`;\n const isLegendSelected: boolean = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n pointsForLine.push(\n <circle\n id={circleId}\n key={circleId}\n r={activePoint === circleId ? 5.5 : 3.5}\n cx={_xAxisScale(x1)}\n cy={yScale(y1)}\n fill={activePoint === circleId ? tokens.colorNeutralBackground1 : lineColor}\n opacity={isLegendSelected ? 1 : 0.1}\n tabIndex={isLegendSelected ? 0 : undefined}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseOut={_handleMouseOut}\n strokeWidth={activePoint === circleId ? DEFAULT_LINE_STROKE_SIZE : 0}\n stroke={activePoint === circleId ? lineColor : ''}\n role=\"img\"\n aria-label={_getAriaLabel(i, 0)}\n data-is-focusable={isLegendSelected}\n ref={(e: SVGCircleElement | null) => {\n _refCallback(e!, circleId);\n }}\n onFocus={event =>\n _handleFocus(event, circleId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)\n }\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[0].onDataPointClick)}\n />,\n );\n }\n\n let gapIndex = 0;\n const gaps = _points[i].gaps?.sort((a, b) => a.startIndex - b.startIndex) ?? [];\n const lineCurve = _points[i].lineOptions?.curve;\n\n // Use path rendering technique for larger datasets to optimize performance.\n if ((props.optimizeLargeData || lineCurve) && _points[i].data.length > 1) {\n const line = d3Line()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => _xAxisScale(d[0]))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => yScale(d[1]))\n .curve(getCurveFactory(lineCurve));\n\n const lineId = `${_lineId}_${i}`;\n const borderId = `${_borderId}_${i}`;\n const strokeWidth = _points[i].lineOptions?.strokeWidth || props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;\n\n const isLegendSelected: boolean = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n\n const lineData: [number, number][] = [];\n for (let k = 0; k < _points[i].data.length; k++) {\n lineData.push([\n _points[i].data[k].x instanceof Date\n ? (_points[i].data[k].x as Date).getTime()\n : (_points[i].data[k].x as number),\n _points[i].data[k].y,\n ]);\n }\n\n if (isLegendSelected) {\n const lineBorderWidth = _points[i].lineOptions?.lineBorderWidth\n ? Number.parseFloat(_points[i].lineOptions!.lineBorderWidth!.toString())\n : 0;\n if (lineBorderWidth > 0) {\n bordersForLine.push(\n <path\n id={borderId}\n key={borderId}\n d={line(lineData)!}\n fill=\"transparent\"\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeWidth={Number.parseFloat(strokeWidth.toString()) + lineBorderWidth}\n stroke={_points[i].lineOptions?.lineBorderColor || tokens.colorNeutralBackground1}\n opacity={1}\n />,\n );\n }\n\n linesForLine.push(\n <path\n id={lineId}\n key={lineId}\n d={line(lineData)!}\n fill=\"transparent\"\n data-is-focusable={true}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n onMouseMove={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event, yScale)}\n onMouseOver={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event, yScale)}\n onMouseOut={_handleMouseOut}\n {..._getClickHandler(_points[i].onLineClick)}\n opacity={1}\n tabIndex={isLegendSelected ? 0 : undefined}\n />,\n );\n } else {\n linesForLine.push(\n <path\n id={lineId}\n key={lineId}\n d={line(lineData)!}\n fill=\"transparent\"\n data-is-focusable={false}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n opacity={0.1}\n />,\n );\n }\n\n pointsForLine.push(\n <circle\n id={`${_staticHighlightCircle}_${i}`}\n key={`${_staticHighlightCircle}_${i}`}\n r={5.5}\n cx={0}\n cy={0}\n fill={tokens.colorNeutralBackground1}\n strokeWidth={DEFAULT_LINE_STROKE_SIZE}\n stroke={lineColor}\n visibility={'hidden'}\n onMouseMove={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event, yScale)}\n onMouseOver={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event, yScale)}\n onMouseOut={_handleMouseOut}\n />,\n );\n } else if (!props.optimizeLargeData) {\n for (let j = 1; j < _points[i].data.length; j++) {\n const gapResult = _checkInGap(j, gaps, gapIndex);\n const isInGap = gapResult.isInGap;\n gapIndex = gapResult.gapIndex;\n\n const lineId = `${_lineId}_${i}_${j}`;\n const borderId = `${_borderId}_${i}_${j}`;\n const circleId = `${_circleId}_${i}_${j}`;\n const {\n x: x1,\n y: y1,\n xAxisCalloutData,\n xAxisCalloutAccessibilityData,\n } = _points[i].data[j - 1] as LineChartDataPoint;\n const { x: x2, y: y2 } = _points[i].data[j] as LineChartDataPoint;\n let path = _getPath(_xAxisScale(x1), yScale(y1), circleId, j, false, _points[i].index);\n const strokeWidth = _points[i].lineOptions?.strokeWidth || props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;\n\n const isLegendSelected: boolean =\n _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n\n const currentPointHidden = _points[i].hideNonActiveDots && activePoint !== circleId;\n pointsForLine.push(\n <path\n id={circleId}\n key={circleId}\n d={path}\n data-is-focusable={isLegendSelected}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={event =>\n _handleFocus(event, lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)\n }\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[j - 1].onDataPointClick)}\n opacity={isLegendSelected && !currentPointHidden ? 1 : 0.01}\n fill={_getPointFill(lineColor, circleId, j, false)}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n role=\"img\"\n aria-label={_getAriaLabel(i, j - 1)}\n tabIndex={isLegendSelected ? 0 : undefined}\n />,\n );\n if (j + 1 === _points[i].data.length) {\n // If this is last point of the line segment.\n const lastCircleId = `${circleId}${j}L`;\n const hiddenHoverCircleId = `${circleId}${j}D`;\n const lastPointHidden = _points[i].hideNonActiveDots && activePoint !== lastCircleId;\n path = _getPath(_xAxisScale(x2), yScale(y2), lastCircleId, j, true, _points[i].index);\n const {\n xAxisCalloutData: lastCirlceXCallout,\n xAxisCalloutAccessibilityData: lastCirlceXCalloutAccessibilityData,\n } = _points[i].data[j];\n pointsForLine.push(\n <React.Fragment key={`${lastCircleId}_container`}>\n <path\n id={lastCircleId}\n key={lastCircleId}\n d={path}\n data-is-focusable={isLegendSelected}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={event =>\n _handleFocus(\n event,\n lineId,\n x2,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n )\n }\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[j].onDataPointClick)}\n opacity={isLegendSelected && !lastPointHidden ? 1 : 0.01}\n fill={_getPointFill(lineColor, lastCircleId, j, true)}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n role=\"img\"\n aria-label={_getAriaLabel(i, j)}\n tabIndex={isLegendSelected ? 0 : undefined}\n />\n {/* Dummy circle acting as magnetic latch for last callout point */}\n <circle\n id={hiddenHoverCircleId}\n key={hiddenHoverCircleId}\n r={8}\n cx={_xAxisScale(x2)}\n cy={yScale(y2)}\n opacity={0}\n width={0}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onFocus={event =>\n _handleFocus(event, circleId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)\n }\n onMouseOut={_handleMouseOut}\n strokeWidth={0}\n focusable={false}\n onBlur={_handleMouseOut}\n />\n </React.Fragment>,\n );\n /* eslint-enable react/jsx-no-bind */\n }\n\n if (isLegendSelected) {\n // don't draw line if it is in a gap\n if (!isInGap) {\n const lineBorderWidth = _points[i].lineOptions?.lineBorderWidth\n ? Number.parseFloat(_points[i].lineOptions!.lineBorderWidth!.toString())\n : 0;\n if (lineBorderWidth > 0) {\n bordersForLine.push(\n <line\n id={borderId}\n key={borderId}\n x1={_xAxisScale(x1)}\n y1={yScale(y1)}\n x2={_xAxisScale(x2)}\n y2={yScale(y2)}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeWidth={Number.parseFloat(strokeWidth.toString()) + lineBorderWidth}\n {...(_points[i].lineOptions?.lineBorderColor && {\n stroke: _points[i].lineOptions?.lineBorderColor,\n })}\n className={classes.lineBorder}\n opacity={1}\n />,\n );\n }\n\n linesForLine.push(\n <line\n id={lineId}\n key={lineId}\n x1={_xAxisScale(x1)}\n y1={yScale(y1)}\n x2={_xAxisScale(x2)}\n y2={yScale(y2)}\n strokeWidth={strokeWidth}\n ref={(e: SVGLineElement | null) => {\n _refCallback(e!, lineId);\n }}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseOut={_handleMouseOut}\n stroke={lineColor}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={_points[i].lineOptions?.strokeDasharray}\n strokeDashoffset={_points[i].lineOptions?.strokeDashoffset}\n opacity={1}\n {..._getClickHandler(_points[i].onLineClick)}\n />,\n );\n }\n } else {\n if (!isInGap) {\n linesForLine.push(\n <line\n id={lineId}\n key={lineId}\n x1={_xAxisScale(x1)}\n y1={yScale(y1)}\n x2={_xAxisScale(x2)}\n y2={yScale(y2)}\n strokeWidth={strokeWidth}\n stroke={lineColor}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={_points[i].lineOptions?.strokeDasharray}\n strokeDashoffset={_points[i].lineOptions?.strokeDashoffset}\n opacity={0.1}\n />,\n );\n }\n }\n }\n }\n\n lines.push(\n <g\n key={`line_${i}`}\n role=\"region\"\n aria-label={`${legendVal}, line ${i + 1} of ${_points.length} with ${_points[i].data.length} data points.`}\n >\n {bordersForLine}\n {linesForLine}\n {pointsForLine}\n </g>,\n );\n }\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(_xAxisScale);\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return lines;\n }\n\n function _createColorFillBars(containerHeight: number) {\n const colorFillBars: JSX.Element[] = [];\n if (isSelectedLegend) {\n _colorFillBars.current = selectedColorBarLegend;\n } else {\n _colorFillBars.current = props.colorFillBars!;\n }\n\n const yMinMaxValues = findNumericMinMaxOfY(_points);\n const FILL_Y_PADDING = 3;\n for (let i = 0; i < _colorFillBars.current.length; i++) {\n const colorFillBar = _colorFillBars.current[i];\n const colorFillBarId = `${_colorFillBarId}-${i}`;\n const color = getColorFromToken(colorFillBar.color);\n\n if (colorFillBar.applyPattern) {\n // Using a pattern element because CSS was unable to render diagonal stripes for rect elements\n colorFillBars.push(_getStripePattern(color, i));\n }\n\n for (let j = 0; j < colorFillBar.data.length; j++) {\n const startX = colorFillBar.data[j].startX;\n const endX = colorFillBar.data[j].endX;\n const opacity =\n _legendHighlighted(colorFillBar.legend) || _noLegendHighlighted() || isSelectedLegend\n ? _getColorFillBarOpacity(colorFillBar)\n : 0.1;\n colorFillBars.push(\n <rect\n fill={colorFillBar.applyPattern ? `url(#${_colorFillBarPatternId}_${i})` : color}\n fillOpacity={opacity}\n x={_isRTL ? _xAxisScale(endX) : _xAxisScale(startX)}\n y={_yScalePrimary(yMinMaxValues.endValue) - FILL_Y_PADDING}\n width={Math.abs(_xAxisScale(endX) - _xAxisScale(startX))}\n height={_yScalePrimary(props.yMinValue || 0) - _yScalePrimary(yMinMaxValues.endValue) + FILL_Y_PADDING}\n key={`${colorFillBarId}${j}`}\n />,\n );\n }\n }\n return colorFillBars;\n }\n\n function _getStripePattern(color: string, id: number) {\n // This describes a tile pattern that resembles diagonal stripes\n // For more information: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d\n const stripePath = 'M-4,4 l8,-8 M0,16 l16,-16 M12,20 l8,-8';\n return (\n <pattern\n id={`${_colorFillBarPatternId}_${id}`}\n width={16}\n height={16}\n key={`${_colorFillBarPatternId}_${id}`}\n patternUnits={'userSpaceOnUse'}\n >\n <path d={stripePath} stroke={color} strokeWidth={1.25} />\n </pattern>\n );\n }\n\n function _checkInGap(pointIndex: number, gaps: LineChartGap[], currentGapIndex: number) {\n let gapIndex = currentGapIndex;\n let isInGap = false;\n\n while (gapIndex < gaps.length && pointIndex > gaps[gapIndex].endIndex) {\n gapIndex++;\n }\n\n if (gapIndex < gaps.length && pointIndex > gaps[gapIndex].startIndex && pointIndex <= gaps[gapIndex].endIndex) {\n isInGap = true;\n }\n return { isInGap, gapIndex };\n }\n\n function _refCallback(element: SVGGElement, legendTitle: string): void {\n _refArray.push({ index: legendTitle, refElement: element });\n }\n\n const _onMouseOverLargeDataset = (\n linenumber: number,\n lineHeight: number,\n mouseEvent: React.MouseEvent<SVGRectElement | SVGPathElement | SVGCircleElement>,\n yScale: ScaleLinear<number, number>,\n ) => {\n mouseEvent.persist();\n const { data } = props;\n const { lineChartData } = data;\n\n // This will get the value of the X when mouse is on the chart\n const xOffset = _xAxisScale.invert(pointer(mouseEvent)[0], document.getElementById(_rectId)!);\n const i = bisect(lineChartData![linenumber].data, xOffset);\n const d0 = lineChartData![linenumber].data[i - 1] as LineChartDataPoint;\n const d1 = lineChartData![linenumber].data[i] as LineChartDataPoint;\n let axisType: XAxisTypes | null = null;\n let xPointToHighlight: string | Date | number = 0;\n let index: null | number = null;\n if (d0 === undefined && d1 !== undefined) {\n xPointToHighlight = d1.x;\n index = i;\n } else if (d0 !== undefined && d1 === undefined) {\n xPointToHighlight = d0.x;\n index = i - 1;\n } else {\n axisType = getTypeOfAxis(lineChartData![linenumber].data[0].x, true) as XAxisTypes;\n let x0;\n let point0;\n let point1;\n switch (axisType) {\n case XAxisTypes.DateAxis:\n x0 = new Date(xOffset).getTime();\n point0 = (d0.x as Date).getTime();\n point1 = (d1.x as Date).getTime();\n xPointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n case XAxisTypes.NumericAxis:\n x0 = xOffset as number;\n point0 = d0.x as number;\n point1 = d1.x as number;\n xPointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n default:\n break;\n }\n }\n\n const { xAxisCalloutData } = lineChartData![linenumber].data[index as number];\n const formattedDate =\n xPointToHighlight instanceof Date ? formatDate(xPointToHighlight, props.useUTC) : xPointToHighlight;\n const modifiedXVal = xPointToHighlight instanceof Date ? xPointToHighlight.getTime() : xPointToHighlight;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = find(_calloutPoints, (element: { x: string | number }) => {\n return element.x === modifiedXVal;\n });\n const pointToHighlight: LineChartDataPoint = lineChartData![linenumber].data[index!] as LineChartDataPoint;\n const pointToHighlightUpdated =\n nearestCircleToHighlight === null ||\n (nearestCircleToHighlight !== null &&\n pointToHighlight !== null &&\n (nearestCircleToHighlight.x !== pointToHighlight.x || nearestCircleToHighlight.y !== pointToHighlight.y));\n // if no points need to be called out then don't show vertical line and callout card\n if (found && pointToHighlightUpdated) {\n _uniqueCallOutID = `#${_staticHighlightCircle}_${linenumber}`;\n\n d3Select(`#${_staticHighlightCircle}_${linenumber}`)\n .attr('cx', `${_xAxisScale(pointToHighlight.x)}`)\n .attr('cy', `${yScale(pointToHighlight.y)}`)\n .attr('visibility', 'visibility');\n\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(pointToHighlight.x)}, ${yScale(pointToHighlight.y)})`)\n .attr('visibility', 'visibility')\n .attr('y2', `${lineHeight - 5 - yScale(pointToHighlight.y)}`);\n\n setNearestCircleToHighlight(pointToHighlight);\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setStackCalloutProps(found!);\n setYValueHover(found.values);\n setDataPointCalloutProps(found!);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue(formattedDate);\n setActivePoint('');\n }\n\n if (!found) {\n setPopoverOpen(false);\n setNearestCircleToHighlight(pointToHighlight);\n setActivePoint('');\n }\n };\n\n function _handleFocus(\n event: React.FocusEvent<SVGCircleElement | SVGPathElement, Element>,\n lineId: string,\n x: number | Date,\n\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData?: AccessibilityProps,\n ) {\n let cx = 0;\n let cy = 0;\n\n const targetRect = (event.target as SVGCircleElement | SVGPathElement).getBoundingClientRect();\n cx = targetRect.left + targetRect.width / 2;\n cy = targetRect.top + targetRect.height / 2;\n updatePosition(cx, cy);\n _uniqueCallOutID = circleId;\n const formattedData = x instanceof Date ? formatDate(x, props.useUTC) : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const found = find(_calloutPoints, (element: { x: string | number }) => element.x === xVal);\n // if no points need to be called out then don't show vertical line and callout card\n\n if (found) {\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(x)}, 0)`)\n .attr('visibility', 'visibility');\n _refArray.forEach((obj: RefArrayData) => {\n if (obj.index === lineId) {\n setPopoverOpen(true);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);\n setYValueHover(found.values);\n setStackCalloutProps(found!);\n setDataPointCalloutProps(found!);\n setActivePoint(circleId);\n }\n });\n } else {\n setActivePoint(circleId);\n }\n }\n\n function _handleHover(\n x: number | Date,\n y: number | Date,\n lineHeight: number,\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData: AccessibilityProps | undefined,\n mouseEvent: React.MouseEvent<SVGElement>,\n yScale: ScaleLinear<number, number>,\n ) {\n mouseEvent?.persist();\n const formattedData = x instanceof Date ? formatDate(x, props.useUTC) : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const found = find(_calloutPoints, (element: { x: string | number }) => element.x === xVal);\n // if no points need to be called out then don't show vertical line and callout card\n\n if (found) {\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(x)}, ${yScale(y)})`)\n .attr('visibility', 'visibility')\n .attr('y2', `${lineHeight - 5 - yScale(y)}`);\n\n if (_uniqueCallOutID !== circleId) {\n _uniqueCallOutID = circleId;\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);\n setYValueHover(found.values);\n setStackCalloutProps(found!);\n setDataPointCalloutProps(found!);\n setActivePoint(circleId);\n setNearestCircleToHighlight(null);\n }\n } else {\n setActivePoint(circleId);\n setNearestCircleToHighlight(null);\n }\n }\n\n /**\n * Screen readers announce an element as clickable if the onClick attribute is set.\n * This function sets the attribute only when a click event handler is provided.*/\n\n function _getClickHandler(func?: () => void): { onClick?: () => void } {\n if (func) {\n return {\n onClick: func,\n };\n }\n\n return {};\n }\n\n function _handleMouseOut() {\n d3Select(`#${_verticalLine}`).attr('visibility', 'hidden');\n }\n\n function _handleChartMouseLeave() {\n _uniqueCallOutID = null;\n setActivePoint('');\n if (isPopoverOpen) {\n setPopoverOpen(false);\n }\n }\n\n function _handleMultipleLineLegendSelectionAction(selectedLine: LineChartDataWithIndex) {\n const selectedLineIndex = selectedLegendPoints.reduce((acc, line, index) => {\n if (acc > -1 || line.legend !== selectedLine.legend) {\n return acc;\n } else {\n return index;\n }\n }, -1);\n\n let selectedLines: LineChartDataWithIndex[];\n if (selectedLineIndex === -1) {\n selectedLines = [...selectedLegendPoints, selectedLine];\n } else {\n selectedLines = selectedLegendPoints\n .slice(0, selectedLineIndex)\n .concat(selectedLegendPoints.slice(selectedLineIndex + 1));\n }\n\n const areAllLineLegendsSelected = props.data && selectedLines.length === props.data.lineChartData!.length;\n\n if (\n areAllLineLegendsSelected &&\n ((props.colorFillBars && props.colorFillBars.length === selectedColorBarLegend.length) || !props.colorFillBars)\n ) {\n // Clear all legends if all legends including color fill bar legends are selected\n // Or clear all legends if all legends are selected and there are no color fill bars\n _clearMultipleLegendSelections();\n } else if (!selectedLines.length && !selectedColorBarLegend.length) {\n // Clear all legends if no legends including color fill bar legends are selected\n _clearMultipleLegendSelections();\n } else {\n // Otherwise, set state when one or more legends are selected, including color fill bar legends\n setSelectedLegendPoints(selectedLines);\n setIsSelectedLegend(true);\n }\n\n const selectedLegendTitlesToPass = selectedLines.map((line: LineChartDataWithIndex) => line.legend);\n _handleLegendClick(selectedLine, selectedLegendTitlesToPass);\n }\n\n function _handleMultipleColorFillBarLegendSelectionAction(selectedColorFillBar: ColorFillBarsProps) {\n const selectedColorFillBarIndex = selectedColorBarLegend.reduce((acc, colorFillBar, index) => {\n if (acc > -1 || colorFillBar.legend !== selectedColorFillBar.legend) {\n return acc;\n } else {\n return index;\n }\n }, -1);\n\n let selectedColorFillBars: ColorFillBarsProps[];\n if (selectedColorFillBarIndex === -1) {\n selectedColorFillBars = [...selectedColorBarLegend, selectedColorFillBar];\n } else {\n selectedColorFillBars = selectedColorBarLegend\n .slice(0, selectedColorFillBarIndex)\n .concat(selectedColorBarLegend.slice(selectedColorFillBarIndex + 1));\n }\n\n const areAllColorFillBarLegendsSelected =\n selectedColorFillBars.length === (props.colorFillBars && props.colorFillBars!.length);\n\n if (\n areAllColorFillBarLegendsSelected &&\n ((props.data && props.data.lineChartData!.length === selectedLegendPoints.length) || !props.data)\n ) {\n // Clear all legends if all legends, including line legends, are selected\n // Or clear all legends if all legends are selected and there is no line data\n _clearMultipleLegendSelections();\n } else if (!selectedColorFillBars.length && !selectedLegendPoints.length) {\n // Clear all legends if no legends are selected, including line legends\n _clearMultipleLegendSelections();\n } else {\n // set state when one or more legends are selected, including line legends\n setSelectedColorBarLegend(selectedColorFillBars);\n setIsSelectedLegend(true);\n }\n\n const selectedLegendTitlesToPass = selectedColorFillBars.map(\n (colorFillBar: ColorFillBarsProps) => colorFillBar.legend,\n );\n _handleLegendClick(selectedColorFillBar, selectedLegendTitlesToPass);\n }\n\n function _clearMultipleLegendSelections() {\n setSelectedColorBarLegend([]);\n setSelectedLegendPoints([]);\n setIsSelectedLegend(false);\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it*/\n\n function _legendHighlighted(legend: string) {\n return selectedLegend === legend || (selectedLegend === '' && activeLegend === legend);\n }\n\n /**\n * This function checks if none of the legends is selected or hovered.*/\n\n function _noLegendHighlighted() {\n return selectedLegend === '' && activeLegend === '';\n }\n\n function _getColorFillBarOpacity(colorFillBar: ColorFillBarsProps) {\n return colorFillBar.applyPattern ? 1 : 0.4;\n }\n\n function _getAriaLabel(lineIndex: number, pointIndex: number): string {\n const line = _points[lineIndex];\n const point = line.data[pointIndex];\n const formattedDate = point.x instanceof Date ? formatDate(point.x, props.useUTC) : point.x;\n const xValue = point.xAxisCalloutData || formattedDate;\n const legend = line.legend;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n function _isChartEmpty(): boolean {\n return !(\n props.data &&\n props.data.lineChartData &&\n props.data.lineChartData.length > 0 &&\n props.data.lineChartData.filter((item: LineChartPoints) => item.data.length).length > 0\n );\n }\n\n const { legendProps, tickValues, tickFormat, eventAnnotationProps } = props;\n _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n\n const isXAxisDateType = getXAxisType(_points);\n let points = _points;\n if (legendProps && !!legendProps.canSelectMultipleLegends) {\n points = selectedLegendPoints.length >= 1 ? selectedLegendPoints : _points;\n _calloutPoints = calloutData(points);\n }\n\n let legendBars = null;\n // reduce computation cost by only creating legendBars\n // if when hideLegend is false.\n // NOTE: they are rendered only when hideLegend is false in CartesianChart.\n if (!props.hideLegend) {\n legendBars = _createLegends(_points!); // ToDo: Memoize legends to improve performance.\n }\n const calloutProps = {\n YValueHover: YValueHover,\n hoverXValue: hoverXValue,\n descriptionMessage:\n props.getCalloutDescriptionMessage && stackCalloutProps\n ? props.getCalloutDescriptionMessage(stackCalloutProps)\n : undefined,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData: xAxisCalloutAccessibilityData,\n ...props.calloutProps,\n clickPosition: clickPosition,\n isPopoverOpen: isPopoverOpen,\n isCalloutForStack: true,\n culture: props.culture ?? 'en-us',\n isCartesian: true,\n customCallout: {\n customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n };\n const tickParams = {\n tickValues,\n tickFormat,\n };\n\n return !_isChartEmpty() ? (\n <CartesianChart\n {...props}\n chartTitle={props.data.chartTitle}\n points={points}\n chartType={ChartTypes.LineChart}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n createYAxis={createNumericYAxis}\n getmargins={_getMargins}\n getMinMaxOfYAxis={findNumericMinMaxOfY}\n getGraphData={_initializeLineChartData}\n xAxisType={isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n getDomainNRangeValues={_getDomainNRangeValues}\n createStringYAxis={createStringYAxis}\n onChartMouseLeave={_handleChartMouseLeave}\n enableFirstRenderOptimization={props.enablePerfOptimization && _firstRenderOptimization}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: ChildProps) => {\n _xAxisScale = props.xScale!;\n _yScalePrimary = props.yScalePrimary!;\n _yScaleSecondary = props.yScaleSecondary;\n return (\n <>\n <g>\n <line\n x1={0}\n y1={0}\n x2={0}\n y2={props.containerHeight}\n stroke={'#323130'}\n id={_verticalLine}\n visibility={'hidden'}\n strokeDasharray={'5,5'}\n />\n {props.optimizeLargeData ? (\n <rect id={_rectId} width={props.containerWidth} height={props.containerHeight} fill={'transparent'} />\n ) : (\n <></>\n )}\n <g>\n {_renderedColorFillBars}\n {lines}\n </g>\n {eventAnnotationProps && (\n <EventsAnnotation\n {...eventAnnotationProps}\n scale={props.xScale!}\n chartYTop={margins.top! + eventLabelHeight}\n chartYBottom={props.containerHeight! - 35}\n />\n )}\n </g>\n </>\n );\n }}\n />\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n },\n);\nLineChart.displayName = 'LineChart';\n"],"names":["React","useLineChartStyles","select","d3Select","pointer","bisector","Legends","line","d3Line","useId","find","CartesianChart","EventsAnnotation","tokens","calloutData","ChartTypes","getXAxisType","XAxisTypes","tooltipOfAxislabels","Points","pointTypes","getTypeOfAxis","getNextColor","getColorFromToken","findNumericMinMaxOfY","createNumericYAxis","domainRangeOfDateForAreaLineVerticalBarChart","domainRangeOfNumericForAreaChart","createStringYAxis","useRtl","formatDate","getCurveFactory","toImage","PointSize","bisect","d","x","left","DEFAULT_LINE_STROKE_SIZE","PATH_MULTIPLY_SIZE","_getPointPath","y","w","index","allPointPaths","LineChart","forwardRef","props","forwardedRef","_points","_injectIndexPropertyInLineChartData","data","lineChartData","_calloutPoints","_xAxisScale","_yScalePrimary","_circleId","_lineId","_borderId","_verticalLine","_colorFillBarPatternId","_uniqueCallOutID","_refArray","margins","eventLabelHeight","lines","_renderedColorFillBars","_colorFillBars","useRef","_tooltipId","_rectId","_staticHighlightCircle","_firstRenderOptimization","_emptyChartId","_colorFillBarId","_isRTL","xAxisCalloutAccessibilityData","cartesianChartRef","_yScaleSecondary","_legendsRef","eventAnnotationProps","labelHeight","hoverXValue","setHoverXValue","useState","activeLegend","setActiveLegend","YValueHover","setYValueHover","selectedLegend","setSelectedLegend","selectedLegendPoints","setSelectedLegendPoints","selectedColorBarLegend","setSelectedColorBarLegend","isSelectedLegend","setIsSelectedLegend","legendProps","selectedLegends","length","activePoint","setActivePoint","nearestCircleToHighlight","setNearestCircleToHighlight","dataPointCalloutProps","setDataPointCalloutProps","stackCalloutProps","setStackCalloutProps","clickPosition","setClickPosition","isPopoverOpen","setPopoverOpen","pointsRef","calloutPointsRef","classes","useEffect","current","height","width","useImperativeHandle","componentRef","chartContainer","opts","toSVG","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","barWidth","tickValues","shiftX","domainNRangeValue","NumericAxis","DateAxis","dStartValue","dEndValue","rStartValue","rEndValue","isFilterSelectedLegends","allowMultipleShapesForPoints","filteredData","filter","item","includes","legend","map","color","updatePosition","newX","newY","threshold","distance","Math","sqrt","pow","_getCustomizedCallout","onRenderCalloutPerStack","onRenderCalloutPerDataPoint","_getMargins","_margins","_initializeLineChartData","xScale","yScalePrimary","containerHeight","containerWidth","xElement","yAxisElement","yScaleSecondary","colorFillBars","_createColorFillBars","_createLines","_handleSingleLegendSelectionAction","lineChartItem","_handleLegendClick","_onHoverCardHide","onLegendClick","_createLegends","isLegendMultiSelectEnabled","canSelectMultipleLegends","legendDataItems","point","title","action","_handleMultipleLineLegendSelectionAction","onMouseOutAction","hoverAction","_handleChartMouseLeave","legendShape","shape","Object","keys","colorFillBarsLegendDataItems","colorFillBar","_handleMultipleColorFillBarLegendSelectionAction","opacity","_getColorFillBarOpacity","stripePattern","applyPattern","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onLegendHoverCardLeave","legendRef","_getBoxWidthOfShape","pointId","pointIndex","isLastPoint","strokeWidth","_getPath","xPos","yPos","pointOftheLine","widthRatio","_getPointFill","lineColor","colorNeutralBackground1","i","linesForLine","bordersForLine","pointsForLine","legendVal","verticaLineHeight","bottom","yScale","useSecondaryYScale","x1","y1","xAxisCalloutData","circleId","isLegendSelected","_legendHighlighted","_noLegendHighlighted","push","circle","id","key","r","cx","cy","fill","tabIndex","undefined","onMouseOver","event","_handleHover","onMouseMove","onMouseOut","_handleMouseOut","stroke","role","aria-label","_getAriaLabel","data-is-focusable","ref","e","_refCallback","onFocus","_handleFocus","onBlur","_getClickHandler","onDataPointClick","gapIndex","gaps","sort","a","b","startIndex","lineCurve","lineOptions","curve","optimizeLargeData","lineId","borderId","lineData","k","Date","getTime","lineBorderWidth","Number","parseFloat","toString","path","strokeLinecap","lineBorderColor","_onMouseOverLargeDataset","bind","onLineClick","visibility","j","gapResult","_checkInGap","isInGap","x2","y2","currentPointHidden","hideNonActiveDots","lastCircleId","hiddenHoverCircleId","lastPointHidden","lastCirlceXCallout","lastCirlceXCalloutAccessibilityData","Fragment","focusable","className","lineBorder","strokeDasharray","strokeDashoffset","g","showXAxisLablesTooltip","document","getElementById","remove","wrapXAxisLables","xAxisElement","call","tooltipProps","tooltipCls","tooltip","axis","yMinMaxValues","FILL_Y_PADDING","colorFillBarId","_getStripePattern","startX","endX","rect","fillOpacity","endValue","abs","yMinValue","stripePath","pattern","patternUnits","currentGapIndex","endIndex","element","legendTitle","refElement","linenumber","lineHeight","mouseEvent","persist","xOffset","invert","d0","d1","axisType","xPointToHighlight","x0","point0","point1","formattedDate","useUTC","modifiedXVal","found","pointToHighlight","pointToHighlightUpdated","attr","clientX","clientY","values","targetRect","target","getBoundingClientRect","top","formattedData","xVal","forEach","obj","func","onClick","selectedLine","selectedLineIndex","reduce","acc","selectedLines","slice","concat","areAllLineLegendsSelected","_clearMultipleLegendSelections","selectedLegendTitlesToPass","selectedColorFillBar","selectedColorFillBarIndex","selectedColorFillBars","areAllColorFillBarLegendsSelected","lineIndex","xValue","yValue","yAxisCalloutData","callOutAccessibilityData","ariaLabel","_isChartEmpty","tickFormat","isXAxisDateType","legendBars","hideLegend","calloutProps","descriptionMessage","getCalloutDescriptionMessage","isCalloutForStack","culture","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","chartTitle","createYAxis","getmargins","getMinMaxOfYAxis","getGraphData","getDomainNRangeValues","onChartMouseLeave","enableFirstRenderOptimization","enablePerfOptimization","children","scale","chartYTop","chartYBottom","div","style","displayName"],"mappings":";;;;;;;eAsIa6C;;;;iEAtIU,QAAQ;0CAEI,8BAA8B;6BAErB,eAAe;yBAClC,WAAW;uBACa,mBAAmB;yBACrC,WAAW;gCACpB,4BAA4B;wBAC7B,wBAAwB;wBActC,cAAc;iCACY,oCAAoC;4BAC9C,wBAAwB;kCAuBvB,qCAAqC;AAG7D,IAAKZ,YAAAA,WAAAA,GAAAA,SAAAA,SAAAA;;;WAAAA;EAAAA,aAAAA,CAAAA;AAKL,8DAA8D;AAC9D,MAAMC,aAAS7B,iBAAAA,EAAS,CAAC8B,IAAWA,EAAEC,CAAC,EAAEC,IAAI;AAE7C,MAAMC,2BAA2B;AACjC,6FAA6F;AAC7F,MAAMC,qBAAqB;AAE3B;;;;;;CAMC,GACD,MAAMC,gBAAgB,CAACJ,GAAWK,GAAWC,GAAWC;IACtD,MAAMC,gBAAgB;QACpB,cAAc;QACd,CAAC,CAAC,EAAER,IAAIM,IAAI,EAAE,CAAC,EAAED,EAAE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C,OAAA,aAAA,CAACpE,iCAAAA,EAAAA;gBACE,GAAGoE,oBAAoB;gBACxBoV,OAAOrX,MAAMmH,MAAM;gBACnBmQ,WAAWtW,QAAQgT,GAAG,GAAI/S;gBAC1BsW,cAAcvX,MAAMqH,eAAe,GAAI;;QAMnD;uBAGF,OAAA,aAAA,CAACmQ,OAAAA;QAAI1L,IAAIpK;QAAemL,MAAM;QAAS4K,OAAO;YAAErO,SAAS;QAAI;QAAG0D,cAAY;;AAEhF,GACA;AACFhN,UAAU4X,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["LineChart.types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport { RenderFunction } from '../../utilities/index';\nimport {\n ChartProps,\n LineChartPoints,\n Margins,\n Basestate,\n RefArrayData,\n CustomizedCalloutData,\n} from '../../types/index';\nimport { EventAnnotation } from '../../types/EventAnnotation';\nimport {\n CartesianChartProps,\n CartesianChartStyleProps,\n CartesianChartStyles,\n ChildProps,\n} from '../CommonComponents/index';\n\nexport type { ChildProps, LineChartPoints, Margins, Basestate, RefArrayData };\n\n/**\n * Line Chart properties\n * {@docCategory LineChart}\n */\nexport interface LineChartProps extends CartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data: ChartProps;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: LineChartStyles;\n\n /**\n * Show event annotation\n */\n eventAnnotationProps?: EventsAnnotationProps;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: RenderFunction<CustomizedCalloutData>;\n\n /**\n * Define a custom callout renderer for a stack; default is to render per data point\n */\n onRenderCalloutPerStack?: RenderFunction<CustomizedCalloutData>;\n\n /**\n * Callback for getting callout description message\n */\n getCalloutDescriptionMessage?: (calloutDataProps: CustomizedCalloutData) => string | undefined;\n\n /*\n * Color fill bars for the chart,\n */\n colorFillBars?: ColorFillBarsProps[];\n\n /**\n * if this is set to true, then for each line there will be a unique shape assigned to the point,\n * there are total 8 shapes which are as follow circle, square, triangele, diamond, pyramid,\n * hexagon, pentagon and octagon, which will get assigned as respectively, if there are more\n * than 8 lines in the line chart then it will again start from cicle to octagon.\n * setting this flag to true will also change the behavior of the points, like for a\n * line, last point shape and first point shape will be visible all the times, and all\n * other points will get enlarge only when hovered over them\n * if set to false default shape will be circle, with the existing behavior\n * @default false\n */\n allowMultipleShapesForPoints?: boolean;\n\n /*\n * Optimize line chart rendering for large data set. If this prop is enabled, line chart\n * can easily render over 10K datapoints with multiple lines smoothly.\n * This rendering mechanism does not support gaps in lines.\n */\n optimizeLargeData?: boolean;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * @default false\n * The prop used to enable the perf optimization\n */\n enablePerfOptimization?: boolean;\n}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface EventsAnnotationProps {\n events: EventAnnotation[];\n strokeColor?: string;\n labelColor?: string;\n labelHeight?: number;\n labelWidth?: number;\n mergedLabel: (count: number) => string;\n}\n\n/**\n * Line Chart styles\n * {@docCategory LineChart}\n */\nexport interface LineChartStyles extends CartesianChartStyles {\n /**\n * styles for line border\n */\n lineBorder?: string;\n}\n\n/**\n * Line Chart style properties\n * {@docCategory LineChart}\n */\nexport interface LineChartStyleProps extends CartesianChartStyleProps {}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface ColorFillBarsProps {\n legend: string;\n color: string;\n data: ColorFillBarData[];\n applyPattern?: boolean;\n onLegendClick?: (selectedLegend: string | string[] | null) => void | undefined;\n}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface ColorFillBarData {\n startX: number | Date;\n endX: number | Date;\n}\n"],"names":[],"mappings":"AAAA,uDAAuD,GAoIvD;;CAEC,GACD,WAGC"}
1
+ {"version":3,"sources":["../src/components/LineChart/LineChart.types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport { RenderFunction } from '../../utilities/index';\nimport {\n ChartProps,\n LineChartPoints,\n Margins,\n Basestate,\n RefArrayData,\n CustomizedCalloutData,\n} from '../../types/index';\nimport { EventAnnotation } from '../../types/EventAnnotation';\nimport {\n CartesianChartProps,\n CartesianChartStyleProps,\n CartesianChartStyles,\n ChildProps,\n} from '../CommonComponents/index';\n\nexport type { ChildProps, LineChartPoints, Margins, Basestate, RefArrayData };\n\n/**\n * Line Chart properties\n * {@docCategory LineChart}\n */\nexport interface LineChartProps extends CartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data: ChartProps;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: LineChartStyles;\n\n /**\n * Show event annotation\n */\n eventAnnotationProps?: EventsAnnotationProps;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: RenderFunction<CustomizedCalloutData>;\n\n /**\n * Define a custom callout renderer for a stack; default is to render per data point\n */\n onRenderCalloutPerStack?: RenderFunction<CustomizedCalloutData>;\n\n /**\n * Callback for getting callout description message\n */\n getCalloutDescriptionMessage?: (calloutDataProps: CustomizedCalloutData) => string | undefined;\n\n /*\n * Color fill bars for the chart,\n */\n colorFillBars?: ColorFillBarsProps[];\n\n /**\n * if this is set to true, then for each line there will be a unique shape assigned to the point,\n * there are total 8 shapes which are as follow circle, square, triangele, diamond, pyramid,\n * hexagon, pentagon and octagon, which will get assigned as respectively, if there are more\n * than 8 lines in the line chart then it will again start from cicle to octagon.\n * setting this flag to true will also change the behavior of the points, like for a\n * line, last point shape and first point shape will be visible all the times, and all\n * other points will get enlarge only when hovered over them\n * if set to false default shape will be circle, with the existing behavior\n * @default false\n */\n allowMultipleShapesForPoints?: boolean;\n\n /*\n * Optimize line chart rendering for large data set. If this prop is enabled, line chart\n * can easily render over 10K datapoints with multiple lines smoothly.\n * This rendering mechanism does not support gaps in lines.\n */\n optimizeLargeData?: boolean;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * @default false\n * The prop used to enable the perf optimization\n */\n enablePerfOptimization?: boolean;\n}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface EventsAnnotationProps {\n events: EventAnnotation[];\n strokeColor?: string;\n labelColor?: string;\n labelHeight?: number;\n labelWidth?: number;\n mergedLabel: (count: number) => string;\n}\n\n/**\n * Line Chart styles\n * {@docCategory LineChart}\n */\nexport interface LineChartStyles extends CartesianChartStyles {\n /**\n * styles for line border\n */\n lineBorder?: string;\n}\n\n/**\n * Line Chart style properties\n * {@docCategory LineChart}\n */\nexport interface LineChartStyleProps extends CartesianChartStyleProps {}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface ColorFillBarsProps {\n legend: string;\n color: string;\n data: ColorFillBarData[];\n applyPattern?: boolean;\n onLegendClick?: (selectedLegend: string | string[] | null) => void | undefined;\n}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface ColorFillBarData {\n startX: number | Date;\n endX: number | Date;\n}\n"],"names":[],"mappings":"AAAA,uDAAuD,GAoIvD;;CAEC,GACD,WAGC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["EventAnnotation.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ScaleTime } from 'd3-scale';\nimport { tokens } from '@fluentui/react-theme';\nimport { findIndex } from '../../../utilities/index';\nimport { LineDef, LabelLink, LabelDef } from './LabelLink';\nimport { EventsAnnotationProps } from '../LineChart.types';\nimport { getColorFromToken } from '../../../utilities/colors';\n\ninterface IEventsAnnotationExtendProps extends EventsAnnotationProps {\n scale: ScaleTime<number, number>;\n chartYBottom: number;\n chartYTop: number;\n}\n\nexport const EventsAnnotation: React.FunctionComponent<IEventsAnnotationExtendProps> = props => {\n const textWidth = props.labelWidth ? props.labelWidth : 105;\n const textY = props.chartYTop - 20;\n const lineTopY = textY + 7;\n const textPadding = 5;\n const lineHeight = 18;\n const fontSize = '10pt';\n const axisRange = props.scale.range();\n\n const lineDefs: LineDef[] = props.events.map(e => ({ ...e, x: props.scale(e.date) }));\n\n lineDefs.sort((e1, e2) => +e1.date - +e2.date);\n\n const fill: string | undefined = props.strokeColor\n ? getColorFromToken(props.strokeColor, false /*ToDo fix */)\n : tokens.colorNeutralForeground1;\n\n const lines = uniqBy(lineDefs, x => x.date.toString()).map((x, i) => (\n <line key={i} x1={x.x} x2={x.x} y1={lineTopY} y2={props.chartYBottom} stroke={fill} strokeDasharray=\"8\" />\n ));\n\n const labelLinks = calculateLabels(lineDefs, textWidth + textPadding, axisRange[1], axisRange[0]).map((x, i) => (\n <LabelLink\n key={i}\n {...{\n lineDefs,\n labelDef: x,\n textY,\n textWidth,\n textLineHeight: lineHeight,\n textFontSize: fontSize,\n textColor: props.labelColor,\n mergedLabel: props.mergedLabel,\n }}\n />\n ));\n\n return (\n <>\n {lines}\n {labelLinks}\n </>\n );\n};\n\nfunction calculateLabels(lineDefs: LineDef[], textWidth: number, maxX: number, minX: number): LabelDef[] {\n const calculateLabel = (lastX: number, currentIdx: number): LabelDef[] => {\n // base case 1\n if (currentIdx === lineDefs.length) {\n return [];\n }\n\n const { x } = lineDefs[currentIdx];\n const leftXBoundary = x - textWidth;\n\n // cannot render on top of other text\n if (x < lastX) {\n return [];\n }\n\n // base case 2\n if (currentIdx === lineDefs.length - 1) {\n if (lastX < leftXBoundary) {\n return [{ x: x, anchor: 'end', aggregatedIdx: [currentIdx] }];\n } else if (x + textWidth < maxX) {\n return [{ x: x, anchor: 'start', aggregatedIdx: [currentIdx] }];\n }\n\n return [];\n }\n\n if (lastX < leftXBoundary) {\n // label on left side\n return backtrack(currentIdx, 'end');\n } else {\n // label on right side\n return backtrack(currentIdx, 'start');\n }\n };\n\n const backtrack = (currentIdx: number, anchor: 'start' | 'end'): LabelDef[] => {\n const bd = anchor === 'end' ? lineDefs[currentIdx].x : lineDefs[currentIdx].x + textWidth;\n\n let idx = findIndex(\n lineDefs,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ds => ds.x > bd && (ds.x - textWidth >= bd || ds.x + textWidth < maxX),\n currentIdx + 1,\n );\n if (idx === -1) {\n idx = lineDefs.length;\n }\n\n const aggregatedIdx: number[] = [];\n for (let i = currentIdx; i < idx; i++) {\n aggregatedIdx.push(i);\n }\n const next = calculateLabel(bd, idx);\n\n next.unshift({ x: lineDefs[currentIdx].x, anchor, aggregatedIdx });\n return next;\n };\n\n return calculateLabel(minX, 0);\n}\n\n/** Get unique items of `arr`, comparing based on the result of calling `iteratee` on each item. */\nfunction uniqBy<T>(arr: T[], iteratee: (x: T) => string): T[] {\n const seen: string[] = [];\n const result: T[] = [];\n for (const x of arr) {\n const comp = iteratee(x);\n if (seen.indexOf(comp) === -1) {\n result.push(x);\n seen.push(comp);\n }\n }\n return result;\n}\n"],"names":["React","tokens","findIndex","LabelLink","getColorFromToken","EventsAnnotation","props","textWidth","labelWidth","textY","chartYTop","lineTopY","textPadding","lineHeight","fontSize","axisRange","scale","range","lineDefs","events","map","e","x","date","sort","e1","e2","fill","strokeColor","colorNeutralForeground1","lines","uniqBy","toString","i","line","key","x1","x2","y1","y2","chartYBottom","stroke","strokeDasharray","labelLinks","calculateLabels","labelDef","textLineHeight","textFontSize","textColor","labelColor","mergedLabel","maxX","minX","calculateLabel","lastX","currentIdx","length","leftXBoundary","anchor","aggregatedIdx","backtrack","bd","idx","ds","push","next","unshift","arr","iteratee","seen","result","comp","indexOf"],"mappings":";;;;+BAcaK;;;;;;;iEAdU,QAAQ;4BAER,wBAAwB;uBACrB,2BAA2B;2BACR,cAAc;wBAEzB,4BAA4B;AAQvD,yBAAgFC,CAAAA;IACrF,MAAMC,YAAYD,MAAME,UAAU,GAAGF,MAAME,UAAU,GAAG;IACxD,MAAMC,QAAQH,MAAMI,SAAS,GAAG;IAChC,MAAMC,WAAWF,QAAQ;IACzB,MAAMG,cAAc;IACpB,MAAMC,aAAa;IACnB,MAAMC,WAAW;IACjB,MAAMC,YAAYT,MAAMU,KAAK,CAACC,KAAK;IAEnC,MAAMC,WAAsBZ,MAAMa,MAAM,CAACC,GAAG,CAACC,CAAAA,IAAM,CAAA;YAAE,GAAGA,CAAC;YAAEC,GAAGhB,MAAM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Ac;QAChE,OAAOM;IACT;IAEA,OAAOZ,eAAeD,MAAM;AAC9B;AAEA,iGAAiG,GACjG,SAASrB,OAAUoC,GAAQ,EAAEC,QAA0B;IACrD,MAAMC,OAAiB,EAAE;IACzB,MAAMC,SAAc,EAAE;IACtB,KAAK,MAAMhD,KAAK6C,IAAK;QACnB,MAAMI,OAAOH,SAAS9C;QACtB,IAAI+C,KAAKG,OAAO,CAACD,UAAU,CAAC,GAAG;YAC7BD,OAAON,IAAI,CAAC1C;YACZ+C,KAAKL,IAAI,CAACO;QACZ;IACF;IACA,OAAOD;AACT"}
1
+ {"version":3,"sources":["../src/components/LineChart/eventAnnotation/EventAnnotation.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ScaleTime } from 'd3-scale';\nimport { tokens } from '@fluentui/react-theme';\nimport { findIndex } from '../../../utilities/index';\nimport { LineDef, LabelLink, LabelDef } from './LabelLink';\nimport { EventsAnnotationProps } from '../LineChart.types';\nimport { getColorFromToken } from '../../../utilities/colors';\n\ninterface IEventsAnnotationExtendProps extends EventsAnnotationProps {\n scale: ScaleTime<number, number>;\n chartYBottom: number;\n chartYTop: number;\n}\n\nexport const EventsAnnotation: React.FunctionComponent<IEventsAnnotationExtendProps> = props => {\n const textWidth = props.labelWidth ? props.labelWidth : 105;\n const textY = props.chartYTop - 20;\n const lineTopY = textY + 7;\n const textPadding = 5;\n const lineHeight = 18;\n const fontSize = '10pt';\n const axisRange = props.scale.range();\n\n const lineDefs: LineDef[] = props.events.map(e => ({ ...e, x: props.scale(e.date) }));\n\n lineDefs.sort((e1, e2) => +e1.date - +e2.date);\n\n const fill: string | undefined = props.strokeColor\n ? getColorFromToken(props.strokeColor, false /*ToDo fix */)\n : tokens.colorNeutralForeground1;\n\n const lines = uniqBy(lineDefs, x => x.date.toString()).map((x, i) => (\n <line key={i} x1={x.x} x2={x.x} y1={lineTopY} y2={props.chartYBottom} stroke={fill} strokeDasharray=\"8\" />\n ));\n\n const labelLinks = calculateLabels(lineDefs, textWidth + textPadding, axisRange[1], axisRange[0]).map((x, i) => (\n <LabelLink\n key={i}\n {...{\n lineDefs,\n labelDef: x,\n textY,\n textWidth,\n textLineHeight: lineHeight,\n textFontSize: fontSize,\n textColor: props.labelColor,\n mergedLabel: props.mergedLabel,\n }}\n />\n ));\n\n return (\n <>\n {lines}\n {labelLinks}\n </>\n );\n};\n\nfunction calculateLabels(lineDefs: LineDef[], textWidth: number, maxX: number, minX: number): LabelDef[] {\n const calculateLabel = (lastX: number, currentIdx: number): LabelDef[] => {\n // base case 1\n if (currentIdx === lineDefs.length) {\n return [];\n }\n\n const { x } = lineDefs[currentIdx];\n const leftXBoundary = x - textWidth;\n\n // cannot render on top of other text\n if (x < lastX) {\n return [];\n }\n\n // base case 2\n if (currentIdx === lineDefs.length - 1) {\n if (lastX < leftXBoundary) {\n return [{ x: x, anchor: 'end', aggregatedIdx: [currentIdx] }];\n } else if (x + textWidth < maxX) {\n return [{ x: x, anchor: 'start', aggregatedIdx: [currentIdx] }];\n }\n\n return [];\n }\n\n if (lastX < leftXBoundary) {\n // label on left side\n return backtrack(currentIdx, 'end');\n } else {\n // label on right side\n return backtrack(currentIdx, 'start');\n }\n };\n\n const backtrack = (currentIdx: number, anchor: 'start' | 'end'): LabelDef[] => {\n const bd = anchor === 'end' ? lineDefs[currentIdx].x : lineDefs[currentIdx].x + textWidth;\n\n let idx = findIndex(\n lineDefs,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ds => ds.x > bd && (ds.x - textWidth >= bd || ds.x + textWidth < maxX),\n currentIdx + 1,\n );\n if (idx === -1) {\n idx = lineDefs.length;\n }\n\n const aggregatedIdx: number[] = [];\n for (let i = currentIdx; i < idx; i++) {\n aggregatedIdx.push(i);\n }\n const next = calculateLabel(bd, idx);\n\n next.unshift({ x: lineDefs[currentIdx].x, anchor, aggregatedIdx });\n return next;\n };\n\n return calculateLabel(minX, 0);\n}\n\n/** Get unique items of `arr`, comparing based on the result of calling `iteratee` on each item. */\nfunction uniqBy<T>(arr: T[], iteratee: (x: T) => string): T[] {\n const seen: string[] = [];\n const result: T[] = [];\n for (const x of arr) {\n const comp = iteratee(x);\n if (seen.indexOf(comp) === -1) {\n result.push(x);\n seen.push(comp);\n }\n }\n return result;\n}\n"],"names":["React","tokens","findIndex","LabelLink","getColorFromToken","EventsAnnotation","props","textWidth","labelWidth","textY","chartYTop","lineTopY","textPadding","lineHeight","fontSize","axisRange","scale","range","lineDefs","events","map","e","x","date","sort","e1","e2","fill","strokeColor","colorNeutralForeground1","lines","uniqBy","toString","i","line","key","x1","x2","y1","y2","chartYBottom","stroke","strokeDasharray","labelLinks","calculateLabels","labelDef","textLineHeight","textFontSize","textColor","labelColor","mergedLabel","maxX","minX","calculateLabel","lastX","currentIdx","length","leftXBoundary","anchor","aggregatedIdx","backtrack","bd","idx","ds","push","next","unshift","arr","iteratee","seen","result","comp","indexOf"],"mappings":";;;;+BAcaK;;;;;;;iEAdU,QAAQ;4BAER,wBAAwB;uBACrB,2BAA2B;2BACR,cAAc;wBAEzB,4BAA4B;AAQvD,yBAAgFC,CAAAA;IACrF,MAAMC,YAAYD,MAAME,UAAU,GAAGF,MAAME,UAAU,GAAG;IACxD,MAAMC,QAAQH,MAAMI,SAAS,GAAG;IAChC,MAAMC,WAAWF,QAAQ;IACzB,MAAMG,cAAc;IACpB,MAAMC,aAAa;IACnB,MAAMC,WAAW;IACjB,MAAMC,YAAYT,MAAMU,KAAK,CAACC,KAAK;IAEnC,MAAMC,WAAsBZ,MAAMa,MAAM,CAACC,GAAG,CAACC,CAAAA,IAAM,CAAA;YAAE,GAAGA,CAAC;YAAEC,GAAGhB,MAAMU,KAAK,CAACK,EAAEE,IAAI;SAAE,CAAA;IAElFL,SAASM,IAAI,CAAC,CAACC,IAAIC,KAAO,CAACD,GAAGF,IAAI,GAAG,CAACG,GAAGH,IAAI;IAE7C,MAAMI,OAA2BrB,MAAMsB,WAAW,OAC9CxB,yBAAAA,EAAkBE,MAAMsB,WAAW,EAAE,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OAAOH,SAAS9C;QACtB,IAAI+C,KAAKG,OAAO,CAACD,UAAU,CAAC,GAAG;YAC7BD,OAAON,IAAI,CAAC1C;YACZ+C,KAAKL,IAAI,CAACO;QACZ;IACF;IACA,OAAOD;AACT"}
@@ -1 +1 @@
1
- {"version":3,"sources":["LabelLink.tsx"],"sourcesContent":["import * as React from 'react';\nimport { EventAnnotation } from '../../../types/EventAnnotation';\nimport { Textbox } from './Textbox';\nimport { getColorFromToken } from '../../../utilities/colors';\nimport { tokens } from '@fluentui/react-theme';\n\nexport interface LineDef extends EventAnnotation {\n x: number;\n}\n\nexport interface LabelDef {\n x: number;\n aggregatedIdx: number[];\n anchor: 'start' | 'end';\n}\n\ninterface LabelLinkProps {\n lineDefs: LineDef[];\n labelDef: LabelDef;\n textY: number;\n textWidth: number;\n textLineHeight: number;\n textFontSize: string;\n textColor: string | undefined;\n mergedLabel: (count: number) => string;\n}\n\nexport const LabelLink: React.FunctionComponent<LabelLinkProps> = props => {\n const gRef = React.useRef<SVGGElement>(null);\n const [showCard, setShowCard] = React.useState(false);\n const onClick = () => setShowCard(true);\n\n let callout: React.ReactNode = null;\n if (showCard) {\n const cards = props.labelDef.aggregatedIdx.map(i => props.lineDefs[i].onRenderCard!).filter(c => !!c);\n if (cards.length > 0) {\n callout = null;\n // TODO - need to replace callout with popover\n /*callout = {\n /* <Callout\n target={gRef.current}\n // eslint-disable-next-line react/jsx-no-bind\n onDismiss={onDismiss}\n setInitialFocus={true}\n role=\"dialog\"\n >\n <FocusZone isCircularNavigation={true} direction={FocusZoneDirection.vertical}>\n <List<() => React.ReactNode>\n items={cards}\n // eslint-disable-next-line react/jsx-no-bind\n onRenderCell={onRenderCell}\n />\n </FocusZone>\n </Callout>\n };*/\n }\n }\n\n let text: string;\n const fill: string | undefined = props.textColor\n ? getColorFromToken(props.textColor, false)\n : tokens.colorNeutralForeground1;\n\n if (props.labelDef.aggregatedIdx.length === 1) {\n text = props.lineDefs[props.labelDef.aggregatedIdx[0]].event;\n } else {\n text = props.mergedLabel(props.labelDef.aggregatedIdx.length);\n }\n\n return (\n <>\n <g ref={gRef} onClick={onClick} data-is-focusable={false} style={{ cursor: 'pointer' }} role=\"button\">\n <Textbox\n text={text}\n x={props.labelDef.x}\n y={props.textY}\n width={props.textWidth}\n lineHeight={props.textLineHeight}\n textAnchor={props.labelDef.anchor}\n fontSize={props.textFontSize}\n fill={fill}\n />\n </g>\n {callout}\n </>\n );\n};\n"],"names":["React","Textbox","getColorFromToken","tokens","LabelLink","props","gRef","useRef","showCard","setShowCard","useState","onClick","callout","cards","labelDef","aggregatedIdx","map","i","lineDefs","onRenderCard","filter","c","length","text","fill","textColor","colorNeutralForeground1","event","mergedLabel","g","ref","data-is-focusable","style","cursor","role","x","y","textY","width","textWidth","lineHeight","textLineHeight","textAnchor","anchor","fontSize","textFontSize"],"mappings":";;;;+BA2BaI;;;;;;;iEA3BU,QAAQ;yBAEP,YAAY;wBACF,4BAA4B;4BACvC,wBAAwB;AAuBxC,kBAA2DC,CAAAA;IAChE,MAAMC,OAAON,OAAMO,MAAM,CAAc;IACvC,MAAM,CAACC,UAAUC,YAAY,GAAGT,OAAMU,QAAQ,CAAC;IAC/C,MAAMC,UAAU,IAAMF,YAAY;IAElC,IAAIG,UAA2B;IAC/B,IAAIJ,UAAU;QACZ,MAAMK,QAAQR,MAAMS,QAAQ,CAACC,aAAa,CAACC,GAAG,CAACC,CAAAA,IAAKZ,MAAMa,QAAQ,CAACD,EAAE,CAACE,YAAY,EAAGC,MAAM,CAACC,CAAAA,IAAK,CAAC,CAACA;QACnG,IAAIR,MAAMS,MAAM,GAAG,GAAG;YACpBV,UAAU;QACV,8CAA8C;QAC9C;;;;;;;;;;;;;;;;QAgBE,GACJ;IACF;IAEA,IAAIW;IACJ,MAAMC,OAA2BnB,MAAMoB,SAAS,OAC5CvB,yBAAAA,EAAkBG,MAAMoB,SAAS,EAAE,SACnCtB,kBAAAA,CAAOuB,uBAAuB;IAElC,IAAIrB,MAAMS,QAAQ,CAACC,aAAa,CAACO,MAAM,KAAK,GAAG;QAC7CC,OAAOlB,MAAMa,QAAQ,CAACb,MAAMS,QAAQ,CAACC,aAAa,CAAC,EAAE,CAAC,CAACY,KAAK;IAC9D,OAAO;QACLJ,OAAOlB,MAAMuB,WAAW,CAACvB,MAAMS,QAAQ,CAACC,aAAa,CAACO,MAAM;IAC9D;IAEA,OAAA,WAAA,GACE,OAAA,aAAA,CAAA,OAAA,QAAA,EAAA,MAAA,WAAA,GACE,OAAA,aAAA,CAACO,KAAAA;QAAEC,KAAKxB;QAAMK,SAASA;QAASoB,qBAAmB;QAAOC,OAAO;YAAEC,QAAQ;QAAU;QAAGC,MAAK;qBAC3F,OAAA,aAAA,CAACjC,gBAAAA,EAAAA;QACCsB,MAAMA;QACNY,GAAG9B,MAAMS,QAAQ,CAACqB,CAAC;QACnBC,GAAG/B,MAAMgC,KAAK;QACdC,OAAOjC,MAAMkC,SAAS;QACtBC,YAAYnC,MAAMoC,cAAc;QAChCC,YAAYrC,MAAMS,QAAQ,CAAC6B,MAAM;QACjCC,UAAUvC,MAAMwC,YAAY;QAC5BrB,MAAMA;SAGTZ;AAGP,EAAE"}
1
+ {"version":3,"sources":["../src/components/LineChart/eventAnnotation/LabelLink.tsx"],"sourcesContent":["import * as React from 'react';\nimport { EventAnnotation } from '../../../types/EventAnnotation';\nimport { Textbox } from './Textbox';\nimport { getColorFromToken } from '../../../utilities/colors';\nimport { tokens } from '@fluentui/react-theme';\n\nexport interface LineDef extends EventAnnotation {\n x: number;\n}\n\nexport interface LabelDef {\n x: number;\n aggregatedIdx: number[];\n anchor: 'start' | 'end';\n}\n\ninterface LabelLinkProps {\n lineDefs: LineDef[];\n labelDef: LabelDef;\n textY: number;\n textWidth: number;\n textLineHeight: number;\n textFontSize: string;\n textColor: string | undefined;\n mergedLabel: (count: number) => string;\n}\n\nexport const LabelLink: React.FunctionComponent<LabelLinkProps> = props => {\n const gRef = React.useRef<SVGGElement>(null);\n const [showCard, setShowCard] = React.useState(false);\n const onClick = () => setShowCard(true);\n\n let callout: React.ReactNode = null;\n if (showCard) {\n const cards = props.labelDef.aggregatedIdx.map(i => props.lineDefs[i].onRenderCard!).filter(c => !!c);\n if (cards.length > 0) {\n callout = null;\n // TODO - need to replace callout with popover\n /*callout = {\n /* <Callout\n target={gRef.current}\n // eslint-disable-next-line react/jsx-no-bind\n onDismiss={onDismiss}\n setInitialFocus={true}\n role=\"dialog\"\n >\n <FocusZone isCircularNavigation={true} direction={FocusZoneDirection.vertical}>\n <List<() => React.ReactNode>\n items={cards}\n // eslint-disable-next-line react/jsx-no-bind\n onRenderCell={onRenderCell}\n />\n </FocusZone>\n </Callout>\n };*/\n }\n }\n\n let text: string;\n const fill: string | undefined = props.textColor\n ? getColorFromToken(props.textColor, false)\n : tokens.colorNeutralForeground1;\n\n if (props.labelDef.aggregatedIdx.length === 1) {\n text = props.lineDefs[props.labelDef.aggregatedIdx[0]].event;\n } else {\n text = props.mergedLabel(props.labelDef.aggregatedIdx.length);\n }\n\n return (\n <>\n <g ref={gRef} onClick={onClick} data-is-focusable={false} style={{ cursor: 'pointer' }} role=\"button\">\n <Textbox\n text={text}\n x={props.labelDef.x}\n y={props.textY}\n width={props.textWidth}\n lineHeight={props.textLineHeight}\n textAnchor={props.labelDef.anchor}\n fontSize={props.textFontSize}\n fill={fill}\n />\n </g>\n {callout}\n </>\n );\n};\n"],"names":["React","Textbox","getColorFromToken","tokens","LabelLink","props","gRef","useRef","showCard","setShowCard","useState","onClick","callout","cards","labelDef","aggregatedIdx","map","i","lineDefs","onRenderCard","filter","c","length","text","fill","textColor","colorNeutralForeground1","event","mergedLabel","g","ref","data-is-focusable","style","cursor","role","x","y","textY","width","textWidth","lineHeight","textLineHeight","textAnchor","anchor","fontSize","textFontSize"],"mappings":";;;;+BA2BaI;;;;;;;iEA3BU,QAAQ;yBAEP,YAAY;wBACF,4BAA4B;4BACvC,wBAAwB;AAuBxC,kBAA2DC,CAAAA;IAChE,MAAMC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