@fluentui/react-charts 9.3.4 → 9.3.5

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 (80) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/dist/index.d.ts +2 -2
  3. package/lib/components/ChartTable/ChartTable.js +3 -1
  4. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  5. package/lib/components/CommonComponents/CartesianChart.js +25 -21
  6. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  7. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  8. package/lib/components/DeclarativeChart/DeclarativeChart.js +3 -6
  9. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  10. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +8 -4
  11. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  12. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +42 -17
  13. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  14. package/lib/components/DonutChart/DonutChart.js +12 -7
  15. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  16. package/lib/components/FunnelChart/FunnelChart.js +5 -5
  17. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  18. package/lib/components/GaugeChart/GaugeChart.js +3 -1
  19. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  20. package/lib/components/HeatMapChart/HeatMapChart.js +5 -5
  21. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  22. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +3 -1
  23. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  24. package/lib/components/Legends/Legends.js +3 -1
  25. package/lib/components/Legends/Legends.js.map +1 -1
  26. package/lib/components/Legends/Legends.types.js.map +1 -1
  27. package/lib/components/LineChart/LineChart.js +5 -4
  28. package/lib/components/LineChart/LineChart.js.map +1 -1
  29. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  30. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +1 -1
  31. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  32. package/lib/components/SankeyChart/SankeyChart.js +1 -1
  33. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  34. package/lib/components/VerticalBarChart/VerticalBarChart.js +3 -1
  35. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  36. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +12 -4
  37. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  38. package/lib/utilities/FocusableTooltipText.js +1 -1
  39. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  40. package/lib/utilities/SVGTooltipText.js +8 -8
  41. package/lib/utilities/SVGTooltipText.js.map +1 -1
  42. package/lib-commonjs/components/ChartTable/ChartTable.js +3 -1
  43. package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
  44. package/lib-commonjs/components/CommonComponents/CartesianChart.js +25 -21
  45. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  46. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  47. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +3 -6
  48. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  49. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  50. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +8 -0
  51. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  52. package/lib-commonjs/components/DonutChart/DonutChart.js +12 -7
  53. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  54. package/lib-commonjs/components/FunnelChart/FunnelChart.js +5 -5
  55. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
  56. package/lib-commonjs/components/GaugeChart/GaugeChart.js +3 -1
  57. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  58. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +5 -5
  59. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  60. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +3 -1
  61. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  62. package/lib-commonjs/components/Legends/Legends.js +3 -1
  63. package/lib-commonjs/components/Legends/Legends.js.map +1 -1
  64. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  65. package/lib-commonjs/components/LineChart/LineChart.js +5 -4
  66. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  67. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  68. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +1 -1
  69. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  70. package/lib-commonjs/components/SankeyChart/SankeyChart.js +1 -1
  71. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  72. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +3 -1
  73. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  74. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +12 -4
  75. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  76. package/lib-commonjs/utilities/FocusableTooltipText.js +1 -1
  77. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  78. package/lib-commonjs/utilities/SVGTooltipText.js +8 -8
  79. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  80. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/LineChart/LineChart.tsx"],"sourcesContent":["'use client';\n\nimport * 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 { max as d3Max } from 'd3-array';\nimport { useId } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { find, findCalloutPoints, YAxisType } from '../../utilities/index';\nimport {\n AccessibilityProps,\n CartesianChart,\n ChildProps,\n LineChartPoints,\n CustomizedCalloutData,\n CustomizedCalloutDataPoint,\n Margins,\n RefArrayData,\n ColorFillBarsProps,\n LineChartGap,\n LineChartDataPoint,\n Chart,\n ImageExportOptions,\n YValueHover,\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 domainRangeOfDateForAreaLineScatterVerticalBarCharts,\n domainRangeOfNumericForAreaLineScatterCharts,\n createStringYAxis,\n useRtl,\n getCurveFactory,\n isScatterPolarSeries,\n getDomainPaddingForMarkers,\n isPlottable,\n getRangeForScatterMarkerSize,\n} from '../../utilities/index';\nimport { ScaleLinear } from 'd3-scale';\nimport { toImage } from '../../utilities/image-export-utils';\nimport { renderScatterPolarCategoryLabels } from '../../utilities/scatterpolar-utils';\nimport { formatDateToLocaleString } from '@fluentui/chart-utilities';\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 _hasMarkersMode: boolean = false;\n let _isXAxisDateType: boolean = false;\n let _isScatterPolar: boolean = false;\n let _points: LineChartDataWithIndex[] = _injectIndexPropertyInLineChartData(props.data.lineChartData);\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: JSXElement[];\n let _renderedColorFillBars: JSXElement[];\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<YValueHover[]>([]);\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 const [YValue, setYValue] = React.useState<number | string>('');\n const [legendVal, setLegendVal] = React.useState<string>('');\n const [lineColor, setLineColor] = React.useState<string>('');\n const [refSelected, setRefSelected] = React.useState<HTMLElement | null>(null);\n\n const pointsRef = React.useRef<LineChartDataWithIndex[] | []>([]);\n const calloutPointsRef = React.useRef<Record<string, YValueHover[]>>({});\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 = domainRangeOfNumericForAreaLineScatterCharts(\n points,\n margins,\n width,\n isRTL,\n props.xScaleType,\n _hasMarkersMode,\n );\n } else if (xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = domainRangeOfDateForAreaLineScatterVerticalBarCharts(\n points,\n margins,\n width,\n isRTL,\n tickValues! as Date[],\n chartType,\n barWidth,\n _hasMarkersMode,\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 _hasMarkersMode =\n filteredData?.some((item: LineChartPoints) => item.lineOptions?.mode?.includes?.('markers')) ?? false;\n _isScatterPolar = isScatterPolarSeries(filteredData!);\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 _getNumericMinMaxOfY(\n points: LineChartPoints[],\n yAxisType?: YAxisType,\n useSecondaryYScale?: boolean,\n ): { startValue: number; endValue: number } {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { startValue, endValue } = findNumericMinMaxOfY(\n points,\n yAxisType,\n useSecondaryYScale,\n useSecondaryYScale ? props.secondaryYScaleType : props.yScaleType,\n );\n let yPadding = { start: 0, end: 0 };\n if (_hasMarkersMode) {\n yPadding = getDomainPaddingForMarkers(\n startValue,\n endValue,\n useSecondaryYScale ? props.secondaryYScaleType : props.yScaleType,\n );\n }\n return {\n startValue: startValue - yPadding.start,\n endValue: endValue + yPadding.end,\n };\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[]): JSXElement {\n const { legendProps, allowMultipleShapesForPoints = false } = props;\n const isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);\n const mapLegendToPoints: Record<string, LineChartDataWithIndex[]> = {};\n data.forEach((point: LineChartDataWithIndex) => {\n if (point.legend) {\n if (!mapLegendToPoints[point.legend]) {\n mapLegendToPoints[point.legend] = [];\n }\n mapLegendToPoints[point.legend].push(point);\n }\n });\n const legendDataItems: Legend[] = Object.entries(mapLegendToPoints).map(([legendTitle, points]) => {\n const representativePoint = points[0];\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: legendTitle,\n color: representativePoint.color!,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n points.forEach(p => _handleMultipleLineLegendSelectionAction(p));\n } else {\n points.forEach(p => _handleSingleLegendSelectionAction(p));\n }\n },\n onMouseOutAction: () => {\n setActiveLegend('');\n },\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(legendTitle);\n },\n ...(representativePoint.legendShape && {\n shape: representativePoint.legendShape,\n }),\n ...(allowMultipleShapesForPoints && {\n shape: Points[representativePoint.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): JSXElement[] {\n const lines: JSXElement[] = [];\n if (isSelectedLegend) {\n _points = selectedLegendPoints;\n } else {\n _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n }\n const maxMarkerSize = d3Max(_points, (point: LineChartPoints) => {\n return d3Max(point.data, (item: LineChartDataPoint) => {\n return item.markerSize as number;\n });\n })!;\n for (let i = _points.length - 1; i >= 0; i--) {\n const linesForLine: JSXElement[] = [];\n const bordersForLine: JSXElement[] = [];\n const pointsForLine: JSXElement[] = [];\n\n const legendVal: string = _points[i].legend;\n const lineColor: string = _points[i].color!;\n const verticaLineHeight = containerHeight - margins.bottom! + 6;\n const useSecondaryYScale = !!(_points[i].useSecondaryYScale && _yScaleSecondary);\n const yScale = useSecondaryYScale ? _yScaleSecondary : _yScalePrimary;\n const extraMaxPixels = _hasMarkersMode\n ? getRangeForScatterMarkerSize({\n data: _points,\n xScale: _xAxisScale,\n yScalePrimary: _yScalePrimary,\n yScaleSecondary: _yScaleSecondary,\n useSecondaryYScale,\n xScaleType: props.xScaleType,\n yScaleType: props.yScaleType,\n secondaryYScaleType: props.secondaryYScaleType,\n })\n : 0;\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 xPoint = _xAxisScale(x1);\n const yPoint = yScale(y1);\n if (isPlottable(xPoint, yPoint)) {\n const circleId = `${_circleId}_${i}`;\n const isLegendSelected: boolean =\n _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n const currentMarkerSize = _points[i].data[0].markerSize!;\n const supportsTextMode = _points[i].lineOptions?.mode?.includes('text');\n const text = _points[i].data[0].text;\n const targetElement = document.getElementById(circleId);\n pointsForLine.push(\n <>\n <React.Fragment key={`${circleId}_fragment`}>\n <circle\n id={circleId}\n key={circleId}\n r={\n currentMarkerSize\n ? (currentMarkerSize! * extraMaxPixels) / maxMarkerSize\n : activePoint === circleId\n ? 5.5\n : 3.5\n }\n cx={xPoint}\n cy={yPoint}\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 legendVal,\n lineColor,\n targetElement,\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 legendVal,\n lineColor,\n targetElement,\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={_points[i].data[0].text ?? _getAriaLabel(i, 0)}\n data-is-focusable={isLegendSelected}\n ref={(e: SVGCircleElement | null) => {\n _refCallback(e!, circleId);\n }}\n onFocus={event =>\n _handleFocus(\n event,\n circleId,\n x1,\n xAxisCalloutData,\n circleId,\n targetElement,\n xAxisCalloutAccessibilityData,\n )\n }\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[0].onDataPointClick)}\n />\n {!_isScatterPolar && supportsTextMode && text && (\n <text\n key={`${circleId}-label`}\n x={xPoint}\n y={\n yPoint +\n Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 3.5, 4) +\n 12\n }\n className={classes.markerLabel}\n opacity={isLegendSelected ? 1 : 0.1}\n >\n {text}\n </text>\n )}\n </React.Fragment>\n </>,\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 .defined(d => isPlottable(_xAxisScale(d[0]), yScale(d[1])));\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 // Check if lines should be drawn based on mode\n const lineMode = _points[i].lineOptions?.mode;\n const shouldDrawLines = lineMode !== 'markers';\n if (shouldDrawLines && 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 strokeDasharray={_points[i].lineOptions?.strokeDasharray}\n onMouseMove={event => _onMouseOverLargeDataset(i, verticaLineHeight, event, yScale)}\n onMouseOver={event => _onMouseOverLargeDataset(i, verticaLineHeight, event, yScale)}\n onMouseOut={_handleMouseOut}\n {..._getClickHandler(_points[i].onLineClick)}\n opacity={1}\n tabIndex={isLegendSelected ? 0 : undefined}\n />,\n );\n } else if (shouldDrawLines) {\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 strokeDasharray={_points[i].lineOptions?.strokeDasharray}\n opacity={0.1}\n />,\n );\n }\n\n // Always add the highlight circle for large dataset hover\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(i, verticaLineHeight, event, yScale)}\n onMouseOver={event => _onMouseOverLargeDataset(i, verticaLineHeight, event, yScale)}\n onMouseOut={_handleMouseOut}\n />,\n );\n\n // Add individual markers if mode includes 'markers'\n const showMarkers = !!lineMode?.includes('markers');\n if (showMarkers) {\n for (let k = 0; k < _points[i].data.length; k++) {\n const { x, y } = _points[i].data[k];\n const xPoint = _xAxisScale(x instanceof Date ? x.getTime() : x);\n const yPoint = yScale(y);\n\n if (isPlottable(xPoint, yPoint)) {\n const markerSize = _points[i].data[k].markerSize;\n const perPointColor = _points[i].data[k]?.markerColor;\n pointsForLine.push(\n <circle\n key={`${_circleId}_${i}_${k}_marker`}\n r={\n markerSize\n ? (markerSize! * extraMaxPixels * 0.3) / maxMarkerSize\n : activePoint === _circleId\n ? 5.5\n : 3.5\n }\n cx={xPoint}\n cy={yPoint}\n fill={\n activePoint === _circleId\n ? tokens.colorNeutralBackground1\n : perPointColor || _points[i]?.color || lineColor\n }\n stroke={perPointColor || lineColor}\n strokeWidth={1}\n opacity={isLegendSelected ? 1 : 0.1}\n onMouseMove={_onMouseOverLargeDataset.bind(i, verticaLineHeight, yScale)}\n onMouseOver={_onMouseOverLargeDataset.bind(i, verticaLineHeight, yScale)}\n onMouseOut={_handleMouseOut}\n />,\n );\n }\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 const xPoint1 = _xAxisScale(x1);\n const yPoint1 = yScale(y1);\n const xPoint2 = _xAxisScale(x2);\n const yPoint2 = yScale(y2);\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 const supportsTextMode = _points[i].lineOptions?.mode?.includes('text');\n const text = _points[i].data[j - 1].text;\n let currentMarkerSize = _points[i].data[j - 1].markerSize!;\n if (isPlottable(xPoint1, yPoint1)) {\n const path = _getPath(xPoint1, yPoint1, circleId, j, false, _points[i].index);\n const targetElement = document.getElementById(circleId);\n pointsForLine.push(\n _points[i].lineOptions?.mode?.includes('markers') || supportsTextMode ? (\n <>\n <circle\n id={circleId}\n key={circleId}\n r={currentMarkerSize ? (currentMarkerSize! * extraMaxPixels) / maxMarkerSize : 4}\n cx={xPoint1}\n cy={yPoint1}\n data-is-focusable={isLegendSelected}\n onMouseOver={event =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n legendVal,\n lineColor,\n targetElement,\n )\n }\n onMouseMove={event =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n legendVal,\n lineColor,\n targetElement,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={event =>\n _handleFocus(\n event,\n lineId,\n x1,\n xAxisCalloutData,\n circleId,\n targetElement,\n xAxisCalloutAccessibilityData,\n )\n }\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[j - 1].onDataPointClick)}\n opacity={isLegendSelected && !currentPointHidden ? 1 : 0.01}\n fill={_points[i].data[j - 1]?.markerColor || _getPointFill(lineColor, circleId, j, false)}\n stroke={_points[i].data[j - 1]?.markerColor || lineColor}\n strokeWidth={strokeWidth}\n role=\"img\"\n aria-label={_points[i].data[j - 1].text ?? _getAriaLabel(i, j - 1)}\n />\n {!_isScatterPolar && supportsTextMode && text && (\n <text\n key={`${circleId}-label`}\n x={xPoint1}\n y={\n yPoint1 +\n Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4, 4) +\n 12\n }\n className={classes.markerLabel}\n opacity={isLegendSelected && !currentPointHidden ? 1 : 0.01}\n >\n {text}\n </text>\n )}\n </>\n ) : (\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 legendVal,\n lineColor,\n targetElement,\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 legendVal,\n lineColor,\n targetElement,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={event =>\n _handleFocus(\n event,\n lineId,\n x1,\n xAxisCalloutData,\n circleId,\n targetElement,\n xAxisCalloutAccessibilityData,\n )\n }\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[j - 1].onDataPointClick)}\n opacity={isLegendSelected && !currentPointHidden ? 1 : 0.01}\n fill={_points[i].data[j - 1]?.markerColor || _getPointFill(lineColor, circleId, j, false)}\n stroke={_points[i].data[j - 1]?.markerColor || lineColor}\n strokeWidth={strokeWidth}\n role=\"img\"\n aria-label={_getAriaLabel(i, j - 1)}\n tabIndex={isLegendSelected ? 0 : undefined}\n />\n ),\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 const {\n xAxisCalloutData: lastCirlceXCallout,\n xAxisCalloutAccessibilityData: lastCirlceXCalloutAccessibilityData,\n } = _points[i].data[j];\n currentMarkerSize = _points[i].data[j].markerSize!;\n const lastSupportsTextMode = _points[i].lineOptions?.mode?.includes('text');\n const lastText = _points[i].data[j].text;\n if (isPlottable(xPoint2, yPoint2)) {\n const path = _getPath(xPoint2, yPoint2, lastCircleId, j, true, _points[i].index);\n const targetElement = document.getElementById(lastCircleId);\n pointsForLine.push(\n <React.Fragment key={`${lastCircleId}_container`}>\n {_points[i].lineOptions?.mode?.includes('markers') || lastSupportsTextMode ? (\n <>\n <circle\n id={lastCircleId}\n key={lastCircleId}\n r={currentMarkerSize ? (currentMarkerSize! * extraMaxPixels) / maxMarkerSize : 4}\n cx={xPoint2}\n cy={yPoint2}\n data-is-focusable={isLegendSelected}\n onMouseOver={event =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n legendVal,\n lineColor,\n targetElement,\n )\n }\n onMouseMove={event =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n legendVal,\n lineColor,\n targetElement,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={event =>\n _handleFocus(\n event,\n lineId,\n x2,\n lastCirlceXCallout,\n lastCircleId,\n targetElement,\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={_points[i].data[j].text ?? _getAriaLabel(i, j)}\n />\n {!_isScatterPolar && lastSupportsTextMode && lastText && (\n <text\n key={`${lastCircleId}-label`}\n x={xPoint2}\n y={\n yPoint2 +\n Math.max(\n currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4,\n 4,\n ) +\n 12\n }\n className={classes.markerLabel}\n >\n {text}\n </text>\n )}\n </>\n ) : (\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 legendVal,\n lineColor,\n targetElement,\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 legendVal,\n lineColor,\n targetElement,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={event =>\n _handleFocus(\n event,\n lineId,\n x2,\n lastCirlceXCallout,\n lastCircleId,\n targetElement,\n lastCirlceXCalloutAccessibilityData,\n )\n }\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[j].onDataPointClick)}\n opacity={isLegendSelected && !lastPointHidden ? 1 : 0.01}\n fill={_points[i].data[j]?.markerColor || _getPointFill(lineColor, lastCircleId, j, true)}\n stroke={_points[i].data[j]?.markerColor || lineColor}\n strokeWidth={strokeWidth}\n role=\"img\"\n aria-label={_getAriaLabel(i, j)}\n tabIndex={isLegendSelected ? 0 : undefined}\n />\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={xPoint2}\n cy={yPoint2}\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 legendVal,\n lineColor,\n targetElement,\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 legendVal,\n lineColor,\n targetElement,\n )\n }\n onMouseOut={_handleMouseOut}\n strokeWidth={0}\n focusable={false}\n onBlur={_handleMouseOut}\n />\n </React.Fragment>,\n );\n }\n }\n\n if (\n isPlottable(xPoint1, yPoint1) &&\n isPlottable(xPoint2, yPoint2) &&\n (!_hasMarkersMode || _points[i].lineOptions?.mode?.includes('lines'))\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 const targetElement = document.getElementById(circleId);\n if (lineBorderWidth > 0) {\n bordersForLine.push(\n <line\n id={borderId}\n key={borderId}\n x1={xPoint1}\n y1={yPoint1}\n x2={xPoint2}\n y2={yPoint2}\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 <line\n id={lineId}\n key={lineId}\n x1={xPoint1}\n y1={yPoint1}\n x2={xPoint2}\n y2={yPoint2}\n strokeWidth={strokeWidth}\n ref={(e: SVGLineElement | null) => {\n _refCallback(e!, lineId);\n }}\n onMouseOver={event =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n legendVal,\n lineColor,\n targetElement,\n )\n }\n onMouseMove={event =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n legendVal,\n lineColor,\n targetElement,\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={xPoint1}\n y1={yPoint1}\n x2={xPoint2}\n y2={yPoint2}\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\n // Add filled area for scatterpolar charts\n const fillMode = _points[i].lineOptions?.fill;\n const isLegendSelected: boolean = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n if (fillMode === 'toself' && _points[i].data.length >= 3 && isLegendSelected && _isScatterPolar) {\n const getScaledXValue = (dataPoint: LineChartDataPoint) =>\n _xAxisScale(dataPoint.x instanceof Date ? dataPoint.x : (dataPoint.x as number));\n\n const fillPathGenerator = d3Line<LineChartDataPoint>()\n .x(dataPoint => getScaledXValue(dataPoint))\n .y(dataPoint => yScale(dataPoint.y))\n .curve(getCurveFactory(lineCurve))\n .defined(dataPoint => isPlottable(getScaledXValue(dataPoint), yScale(dataPoint.y)));\n\n const fillPath = fillPathGenerator(_points[i].data as LineChartDataPoint[]);\n\n if (fillPath) {\n linesForLine.push(\n <path\n key={`scatterpolar_fill_${i}`}\n d={`${fillPath}Z`}\n fill={lineColor}\n fillOpacity={0.5}\n stroke={lineColor}\n strokeWidth={2}\n strokeOpacity={0.8}\n pointerEvents=\"none\"\n />,\n );\n }\n }\n\n if (_isScatterPolar) {\n pointsForLine.push(\n ...renderScatterPolarCategoryLabels({\n xAxisScale: _xAxisScale,\n yAxisScale: yScale,\n className: classes.markerLabel || '',\n lineOptions: (_points[i] as Partial<LineChartPoints>)?.lineOptions,\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: JSXElement[] = [];\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\n ? formatDateToLocaleString(xPointToHighlight, props.culture, props.useUTC as boolean)\n : xPointToHighlight;\n const found = findCalloutPoints(calloutPointsRef.current, xPointToHighlight) as CustomizedCalloutData | undefined;\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 const targetElement = document.getElementById(`${_staticHighlightCircle}_${linenumber}`);\n const rect = targetElement!.getBoundingClientRect();\n setNearestCircleToHighlight(pointToHighlight);\n updatePosition(rect.x, rect.y);\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 xAxisCalloutData: string | undefined,\n circleId: string,\n targetElement: HTMLElement | null,\n xAxisCalloutAccessibilityData?: AccessibilityProps,\n ) {\n _uniqueCallOutID = circleId;\n const formattedData = x instanceof Date ? formatDateToLocaleString(x, props.culture, props.useUTC as boolean) : x;\n const found = findCalloutPoints(calloutPointsRef.current, x) as CustomizedCalloutData | undefined;\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 setRefSelected(targetElement);\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,\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 legendVal: string,\n lineColor: string,\n targetElement: HTMLElement | null,\n ) {\n mouseEvent?.persist();\n const formattedData = x instanceof Date ? formatDateToLocaleString(x, props.culture, props.useUTC as boolean) : x;\n const found = findCalloutPoints(calloutPointsRef.current, x) as CustomizedCalloutData | undefined;\n let hoverDp: CustomizedCalloutData | undefined = undefined;\n\n if (props.isCalloutForStack === false && found?.values) {\n const dp = find(found.values, (val: CustomizedCalloutDataPoint) => val?.y === y);\n if (dp) {\n hoverDp = {\n x,\n values: [dp],\n };\n }\n }\n // if no points need to be called out then don't show vertical line and callout card\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 setRefSelected(targetElement);\n setPopoverOpen(true);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);\n setYValueHover(found.values);\n setYValue(y);\n setLegendVal(legendVal);\n setLineColor(lineColor);\n setStackCalloutProps(found!);\n setDataPointCalloutProps(hoverDp);\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 =\n point.x instanceof Date ? formatDateToLocaleString(point.x, props.culture, props.useUTC as boolean) : 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 _isXAxisDateType = getXAxisType(_points);\n let points = _points;\n if (legendProps && !!legendProps.canSelectMultipleLegends) {\n points = selectedLegendPoints.length >= 1 ? selectedLegendPoints : _points;\n calloutPointsRef.current = 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 YValue: YValue,\n legend: legendVal,\n color: lineColor,\n XValue: hoverXValue! as string,\n descriptionMessage:\n props.getCalloutDescriptionMessage && stackCalloutProps\n ? props.getCalloutDescriptionMessage(stackCalloutProps)\n : undefined,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData: xAxisCalloutAccessibilityData,\n ...props.calloutProps,\n isPopoverOpen: isPopoverOpen,\n clickPosition: clickPosition,\n positioning: {\n target: refSelected,\n },\n isCalloutForStack: props.isCalloutForStack,\n culture: props.culture,\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={_getNumericMinMaxOfY}\n getGraphData={_initializeLineChartData}\n xAxisType={_isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n {...(_isScatterPolar ? { yMaxValue: 1, yMinValue: -1 } : {})}\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';\nLineChart.defaultProps = {\n isCalloutForStack: true,\n};\n"],"names":["React","useLineChartStyles","select","d3Select","pointer","bisector","Legends","line","d3Line","max","d3Max","useId","find","findCalloutPoints","CartesianChart","EventsAnnotation","tokens","calloutData","ChartTypes","getXAxisType","XAxisTypes","tooltipOfAxislabels","Points","pointTypes","getTypeOfAxis","getNextColor","getColorFromToken","findNumericMinMaxOfY","createNumericYAxis","domainRangeOfDateForAreaLineScatterVerticalBarCharts","domainRangeOfNumericForAreaLineScatterCharts","createStringYAxis","useRtl","getCurveFactory","isScatterPolarSeries","getDomainPaddingForMarkers","isPlottable","getRangeForScatterMarkerSize","toImage","renderScatterPolarCategoryLabels","formatDateToLocaleString","PointSize","bisect","d","x","left","DEFAULT_LINE_STROKE_SIZE","PATH_MULTIPLY_SIZE","_getPointPath","y","w","index","allPointPaths","LineChart","forwardRef","props","forwardedRef","_hasMarkersMode","_isXAxisDateType","_isScatterPolar","_points","_injectIndexPropertyInLineChartData","data","lineChartData","_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","YValue","setYValue","legendVal","setLegendVal","lineColor","setLineColor","refSelected","setRefSelected","pointsRef","calloutPointsRef","classes","useEffect","current","height","width","useImperativeHandle","componentRef","chartContainer","opts","toSVG","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","barWidth","tickValues","shiftX","domainNRangeValue","NumericAxis","xScaleType","DateAxis","dStartValue","dEndValue","rStartValue","rEndValue","isFilterSelectedLegends","allowMultipleShapesForPoints","filteredData","filter","item","includes","legend","some","lineOptions","mode","map","color","updatePosition","newX","newY","threshold","distance","Math","sqrt","pow","_getCustomizedCallout","onRenderCalloutPerStack","onRenderCalloutPerDataPoint","_getNumericMinMaxOfY","yAxisType","useSecondaryYScale","startValue","endValue","secondaryYScaleType","yScaleType","yPadding","start","end","_getMargins","_margins","_initializeLineChartData","xScale","yScalePrimary","containerHeight","containerWidth","xElement","yAxisElement","yScaleSecondary","colorFillBars","_createColorFillBars","_createLines","_handleSingleLegendSelectionAction","lineChartItem","_handleLegendClick","_onHoverCardHide","onLegendClick","_createLegends","isLegendMultiSelectEnabled","canSelectMultipleLegends","mapLegendToPoints","forEach","point","push","legendDataItems","Object","entries","legendTitle","representativePoint","title","action","p","_handleMultipleLineLegendSelectionAction","onMouseOutAction","hoverAction","_handleChartMouseLeave","legendShape","shape","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","colorNeutralBackground1","maxMarkerSize","markerSize","i","linesForLine","bordersForLine","pointsForLine","verticaLineHeight","bottom","yScale","extraMaxPixels","x1","y1","xAxisCalloutData","xPoint","yPoint","circleId","isLegendSelected","_legendHighlighted","_noLegendHighlighted","currentMarkerSize","supportsTextMode","text","targetElement","document","getElementById","Fragment","key","circle","id","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","className","markerLabel","gapIndex","gaps","sort","a","b","startIndex","lineCurve","curve","optimizeLargeData","defined","lineId","borderId","lineData","k","Date","getTime","lineMode","shouldDrawLines","lineBorderWidth","Number","parseFloat","toString","path","strokeLinecap","lineBorderColor","strokeDasharray","_onMouseOverLargeDataset","onLineClick","visibility","showMarkers","perPointColor","markerColor","bind","j","gapResult","_checkInGap","isInGap","x2","y2","xPoint1","yPoint1","xPoint2","yPoint2","currentPointHidden","hideNonActiveDots","lastCircleId","hiddenHoverCircleId","lastPointHidden","lastCirlceXCallout","lastCirlceXCalloutAccessibilityData","lastSupportsTextMode","lastText","focusable","strokeDashoffset","fillMode","getScaledXValue","dataPoint","fillPathGenerator","fillPath","fillOpacity","strokeOpacity","pointerEvents","xAxisScale","yAxisScale","g","showXAxisLablesTooltip","remove","wrapXAxisLables","xAxisElement","call","tooltipProps","tooltipCls","tooltip","axis","yMinMaxValues","FILL_Y_PADDING","colorFillBarId","_getStripePattern","startX","endX","rect","abs","yMinValue","stripePath","pattern","patternUnits","currentGapIndex","endIndex","element","refElement","linenumber","lineHeight","mouseEvent","persist","xOffset","invert","d0","d1","axisType","xPointToHighlight","x0","point0","point1","formattedDate","culture","useUTC","found","pointToHighlight","pointToHighlightUpdated","attr","getBoundingClientRect","values","formattedData","obj","hoverDp","isCalloutForStack","dp","val","func","onClick","selectedLine","selectedLineIndex","reduce","acc","selectedLines","slice","concat","areAllLineLegendsSelected","_clearMultipleLegendSelections","selectedLegendTitlesToPass","selectedColorFillBar","selectedColorFillBarIndex","selectedColorFillBars","areAllColorFillBarLegendsSelected","lineIndex","xValue","yValue","yAxisCalloutData","callOutAccessibilityData","ariaLabel","_isChartEmpty","tickFormat","legendBars","hideLegend","calloutProps","YValueHover","XValue","descriptionMessage","getCalloutDescriptionMessage","positioning","target","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","chartTitle","createYAxis","getmargins","getMinMaxOfYAxis","getGraphData","yMaxValue","getDomainNRangeValues","onChartMouseLeave","enableFirstRenderOptimization","enablePerfOptimization","children","scale","chartYTop","top","chartYBottom","div","style","displayName","defaultProps"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,kBAAkB,QAAQ,8BAA8B;AAEjE,SAASC,UAAUC,QAAQ,EAAEC,OAAO,QAAQ,eAAe;AAC3D,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAAiBC,OAAO,QAAyB,mBAAmB;AACpE,SAASC,QAAQC,MAAM,QAAQ,WAAW;AAC1C,SAASC,OAAOC,KAAK,QAAQ,WAAW;AACxC,SAASC,KAAK,QAAQ,4BAA4B;AAElD,SAASC,IAAI,EAAEC,iBAAiB,QAAmB,wBAAwB;AAC3E,SAEEC,cAAc,QAaT,cAAc;AACrB,SAASC,gBAAgB,QAAQ,oCAAoC;AACrE,SAASC,MAAM,QAAQ,wBAAwB;A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GAAG2E,oBAAoB;gBACxBuY,OAAO1a,MAAM2I,MAAM;gBACnBgS,WAAWzZ,QAAQ0Z,GAAG,GAAIzZ;gBAC1B0Z,cAAc7a,MAAM6I,eAAe,GAAI;;QAMnD;uBAGF,oBAACiS;QAAIxM,IAAI1M;QAAewN,MAAM;QAAS2L,OAAO;YAAE5P,SAAS;QAAI;QAAGkE,cAAY;;AAEhF,GACA;AACFvP,UAAUkb,WAAW,GAAG;AACxBlb,UAAUmb,YAAY,GAAG;IACvB5D,mBAAmB;AACrB"}
1
+ {"version":3,"sources":["../src/components/LineChart/LineChart.tsx"],"sourcesContent":["'use client';\n\nimport * 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 { max as d3Max } from 'd3-array';\nimport { useId } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { find, findCalloutPoints, YAxisType } from '../../utilities/index';\nimport {\n AccessibilityProps,\n CartesianChart,\n ChildProps,\n LineChartPoints,\n CustomizedCalloutData,\n CustomizedCalloutDataPoint,\n Margins,\n RefArrayData,\n ColorFillBarsProps,\n LineChartGap,\n LineChartDataPoint,\n Chart,\n ImageExportOptions,\n YValueHover,\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 domainRangeOfDateForAreaLineScatterVerticalBarCharts,\n domainRangeOfNumericForAreaLineScatterCharts,\n createStringYAxis,\n useRtl,\n getCurveFactory,\n isScatterPolarSeries,\n getDomainPaddingForMarkers,\n isPlottable,\n getRangeForScatterMarkerSize,\n} from '../../utilities/index';\nimport { ScaleLinear } from 'd3-scale';\nimport { toImage } from '../../utilities/image-export-utils';\nimport { renderScatterPolarCategoryLabels } from '../../utilities/scatterpolar-utils';\nimport { formatDateToLocaleString } from '@fluentui/chart-utilities';\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 ({ isCalloutForStack = true, ...restProps }, forwardedRef) => {\n const props = { isCalloutForStack, ...restProps };\n let _hasMarkersMode: boolean = false;\n let _isXAxisDateType: boolean = false;\n let _isScatterPolar: boolean = false;\n let _points: LineChartDataWithIndex[] = _injectIndexPropertyInLineChartData(props.data.lineChartData);\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: JSXElement[];\n let _renderedColorFillBars: JSXElement[];\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<YValueHover[]>([]);\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 const [YValue, setYValue] = React.useState<number | string>('');\n const [legendVal, setLegendVal] = React.useState<string>('');\n const [lineColor, setLineColor] = React.useState<string>('');\n const [refSelected, setRefSelected] = React.useState<HTMLElement | null>(null);\n\n const pointsRef = React.useRef<LineChartDataWithIndex[] | []>([]);\n const calloutPointsRef = React.useRef<Record<string, YValueHover[]>>({});\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 = domainRangeOfNumericForAreaLineScatterCharts(\n points,\n margins,\n width,\n isRTL,\n props.xScaleType,\n _hasMarkersMode,\n );\n } else if (xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = domainRangeOfDateForAreaLineScatterVerticalBarCharts(\n points,\n margins,\n width,\n isRTL,\n tickValues! as Date[],\n chartType,\n barWidth,\n _hasMarkersMode,\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 _hasMarkersMode =\n filteredData?.some((item: LineChartPoints) => item.lineOptions?.mode?.includes?.('markers')) ?? false;\n _isScatterPolar = isScatterPolarSeries(filteredData!);\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 _getNumericMinMaxOfY(\n points: LineChartPoints[],\n yAxisType?: YAxisType,\n useSecondaryYScale?: boolean,\n ): { startValue: number; endValue: number } {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { startValue, endValue } = findNumericMinMaxOfY(\n points,\n yAxisType,\n useSecondaryYScale,\n useSecondaryYScale ? props.secondaryYScaleType : props.yScaleType,\n );\n let yPadding = { start: 0, end: 0 };\n if (_hasMarkersMode) {\n yPadding = getDomainPaddingForMarkers(\n startValue,\n endValue,\n useSecondaryYScale ? props.secondaryYScaleType : props.yScaleType,\n );\n }\n return {\n startValue: startValue - yPadding.start,\n endValue: endValue + yPadding.end,\n };\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[]): JSXElement {\n const { legendProps, allowMultipleShapesForPoints = false } = props;\n const isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);\n const mapLegendToPoints: Record<string, LineChartDataWithIndex[]> = {};\n data.forEach((point: LineChartDataWithIndex) => {\n if (point.legend) {\n if (!mapLegendToPoints[point.legend]) {\n mapLegendToPoints[point.legend] = [];\n }\n mapLegendToPoints[point.legend].push(point);\n }\n });\n const legendDataItems: Legend[] = Object.entries(mapLegendToPoints).map(([legendTitle, points]) => {\n const representativePoint = points[0];\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: legendTitle,\n color: representativePoint.color!,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n points.forEach(p => _handleMultipleLineLegendSelectionAction(p));\n } else {\n points.forEach(p => _handleSingleLegendSelectionAction(p));\n }\n },\n onMouseOutAction: () => {\n setActiveLegend('');\n },\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(legendTitle);\n },\n ...(representativePoint.legendShape && {\n shape: representativePoint.legendShape,\n }),\n ...(allowMultipleShapesForPoints && {\n shape: Points[representativePoint.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): JSXElement[] {\n const lines: JSXElement[] = [];\n if (isSelectedLegend) {\n _points = selectedLegendPoints;\n } else {\n _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n }\n const maxMarkerSize = d3Max(_points, (point: LineChartPoints) => {\n return d3Max(point.data, (item: LineChartDataPoint) => {\n return item.markerSize as number;\n });\n })!;\n for (let i = _points.length - 1; i >= 0; i--) {\n const linesForLine: JSXElement[] = [];\n const bordersForLine: JSXElement[] = [];\n const pointsForLine: JSXElement[] = [];\n\n const legendVal: string = _points[i].legend;\n const lineColor: string = _points[i].color!;\n const verticaLineHeight = containerHeight - margins.bottom! + 6;\n const useSecondaryYScale = !!(_points[i].useSecondaryYScale && _yScaleSecondary);\n const yScale = useSecondaryYScale ? _yScaleSecondary : _yScalePrimary;\n const extraMaxPixels = _hasMarkersMode\n ? getRangeForScatterMarkerSize({\n data: _points,\n xScale: _xAxisScale,\n yScalePrimary: _yScalePrimary,\n yScaleSecondary: _yScaleSecondary,\n useSecondaryYScale,\n xScaleType: props.xScaleType,\n yScaleType: props.yScaleType,\n secondaryYScaleType: props.secondaryYScaleType,\n })\n : 0;\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 xPoint = _xAxisScale(x1);\n const yPoint = yScale(y1);\n if (isPlottable(xPoint, yPoint)) {\n const circleId = `${_circleId}_${i}`;\n const isLegendSelected: boolean =\n _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n const currentMarkerSize = _points[i].data[0].markerSize!;\n const supportsTextMode = _points[i].lineOptions?.mode?.includes('text');\n const text = _points[i].data[0].text;\n const targetElement = document.getElementById(circleId);\n pointsForLine.push(\n <>\n <React.Fragment key={`${circleId}_fragment`}>\n <circle\n id={circleId}\n key={circleId}\n r={\n currentMarkerSize\n ? (currentMarkerSize! * extraMaxPixels) / maxMarkerSize\n : activePoint === circleId\n ? 5.5\n : 3.5\n }\n cx={xPoint}\n cy={yPoint}\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 legendVal,\n lineColor,\n targetElement,\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 legendVal,\n lineColor,\n targetElement,\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={_points[i].data[0].text ?? _getAriaLabel(i, 0)}\n data-is-focusable={isLegendSelected}\n ref={(e: SVGCircleElement | null) => {\n _refCallback(e!, circleId);\n }}\n onFocus={event =>\n _handleFocus(\n event,\n circleId,\n x1,\n xAxisCalloutData,\n circleId,\n targetElement,\n xAxisCalloutAccessibilityData,\n )\n }\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[0].onDataPointClick)}\n />\n {!_isScatterPolar && supportsTextMode && text && (\n <text\n key={`${circleId}-label`}\n x={xPoint}\n y={\n yPoint +\n Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 3.5, 4) +\n 12\n }\n className={classes.markerLabel}\n opacity={isLegendSelected ? 1 : 0.1}\n >\n {text}\n </text>\n )}\n </React.Fragment>\n </>,\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 .defined(d => isPlottable(_xAxisScale(d[0]), yScale(d[1])));\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 // Check if lines should be drawn based on mode\n const lineMode = _points[i].lineOptions?.mode;\n const shouldDrawLines = lineMode !== 'markers';\n if (shouldDrawLines && 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 strokeDasharray={_points[i].lineOptions?.strokeDasharray}\n onMouseMove={event => _onMouseOverLargeDataset(i, verticaLineHeight, event, yScale)}\n onMouseOver={event => _onMouseOverLargeDataset(i, verticaLineHeight, event, yScale)}\n onMouseOut={_handleMouseOut}\n {..._getClickHandler(_points[i].onLineClick)}\n opacity={1}\n tabIndex={isLegendSelected ? 0 : undefined}\n />,\n );\n } else if (shouldDrawLines) {\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 strokeDasharray={_points[i].lineOptions?.strokeDasharray}\n opacity={0.1}\n />,\n );\n }\n\n // Always add the highlight circle for large dataset hover\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(i, verticaLineHeight, event, yScale)}\n onMouseOver={event => _onMouseOverLargeDataset(i, verticaLineHeight, event, yScale)}\n onMouseOut={_handleMouseOut}\n />,\n );\n\n // Add individual markers if mode includes 'markers'\n const showMarkers = !!lineMode?.includes('markers');\n if (showMarkers) {\n for (let k = 0; k < _points[i].data.length; k++) {\n const { x, y } = _points[i].data[k];\n const xPoint = _xAxisScale(x instanceof Date ? x.getTime() : x);\n const yPoint = yScale(y);\n\n if (isPlottable(xPoint, yPoint)) {\n const markerSize = _points[i].data[k].markerSize;\n const perPointColor = _points[i].data[k]?.markerColor;\n pointsForLine.push(\n <circle\n key={`${_circleId}_${i}_${k}_marker`}\n r={\n markerSize\n ? (markerSize! * extraMaxPixels * 0.3) / maxMarkerSize\n : activePoint === _circleId\n ? 5.5\n : 3.5\n }\n cx={xPoint}\n cy={yPoint}\n fill={\n activePoint === _circleId\n ? tokens.colorNeutralBackground1\n : perPointColor || _points[i]?.color || lineColor\n }\n stroke={perPointColor || lineColor}\n strokeWidth={1}\n opacity={isLegendSelected ? 1 : 0.1}\n onMouseMove={_onMouseOverLargeDataset.bind(i, verticaLineHeight, yScale)}\n onMouseOver={_onMouseOverLargeDataset.bind(i, verticaLineHeight, yScale)}\n onMouseOut={_handleMouseOut}\n />,\n );\n }\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 const xPoint1 = _xAxisScale(x1);\n const yPoint1 = yScale(y1);\n const xPoint2 = _xAxisScale(x2);\n const yPoint2 = yScale(y2);\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 const supportsTextMode = _points[i].lineOptions?.mode?.includes('text');\n const text = _points[i].data[j - 1].text;\n let currentMarkerSize = _points[i].data[j - 1].markerSize!;\n if (isPlottable(xPoint1, yPoint1)) {\n const path = _getPath(xPoint1, yPoint1, circleId, j, false, _points[i].index);\n const targetElement = document.getElementById(circleId);\n pointsForLine.push(\n _points[i].lineOptions?.mode?.includes('markers') || supportsTextMode ? (\n <>\n <circle\n id={circleId}\n key={circleId}\n r={currentMarkerSize ? (currentMarkerSize! * extraMaxPixels) / maxMarkerSize : 4}\n cx={xPoint1}\n cy={yPoint1}\n data-is-focusable={isLegendSelected}\n onMouseOver={event =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n legendVal,\n lineColor,\n targetElement,\n )\n }\n onMouseMove={event =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n legendVal,\n lineColor,\n targetElement,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={event =>\n _handleFocus(\n event,\n lineId,\n x1,\n xAxisCalloutData,\n circleId,\n targetElement,\n xAxisCalloutAccessibilityData,\n )\n }\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[j - 1].onDataPointClick)}\n opacity={isLegendSelected && !currentPointHidden ? 1 : 0.01}\n fill={_points[i].data[j - 1]?.markerColor || _getPointFill(lineColor, circleId, j, false)}\n stroke={_points[i].data[j - 1]?.markerColor || lineColor}\n strokeWidth={strokeWidth}\n role=\"img\"\n aria-label={_points[i].data[j - 1].text ?? _getAriaLabel(i, j - 1)}\n />\n {!_isScatterPolar && supportsTextMode && text && (\n <text\n key={`${circleId}-label`}\n x={xPoint1}\n y={\n yPoint1 +\n Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4, 4) +\n 12\n }\n className={classes.markerLabel}\n opacity={isLegendSelected && !currentPointHidden ? 1 : 0.01}\n >\n {text}\n </text>\n )}\n </>\n ) : (\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 legendVal,\n lineColor,\n targetElement,\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 legendVal,\n lineColor,\n targetElement,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={event =>\n _handleFocus(\n event,\n lineId,\n x1,\n xAxisCalloutData,\n circleId,\n targetElement,\n xAxisCalloutAccessibilityData,\n )\n }\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[j - 1].onDataPointClick)}\n opacity={isLegendSelected && !currentPointHidden ? 1 : 0.01}\n fill={_points[i].data[j - 1]?.markerColor || _getPointFill(lineColor, circleId, j, false)}\n stroke={_points[i].data[j - 1]?.markerColor || lineColor}\n strokeWidth={strokeWidth}\n role=\"img\"\n aria-label={_getAriaLabel(i, j - 1)}\n tabIndex={isLegendSelected ? 0 : undefined}\n />\n ),\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 const {\n xAxisCalloutData: lastCirlceXCallout,\n xAxisCalloutAccessibilityData: lastCirlceXCalloutAccessibilityData,\n } = _points[i].data[j];\n currentMarkerSize = _points[i].data[j].markerSize!;\n const lastSupportsTextMode = _points[i].lineOptions?.mode?.includes('text');\n const lastText = _points[i].data[j].text;\n if (isPlottable(xPoint2, yPoint2)) {\n const path = _getPath(xPoint2, yPoint2, lastCircleId, j, true, _points[i].index);\n const targetElement = document.getElementById(lastCircleId);\n pointsForLine.push(\n <React.Fragment key={`${lastCircleId}_container`}>\n {_points[i].lineOptions?.mode?.includes('markers') || lastSupportsTextMode ? (\n <>\n <circle\n id={lastCircleId}\n key={lastCircleId}\n r={currentMarkerSize ? (currentMarkerSize! * extraMaxPixels) / maxMarkerSize : 4}\n cx={xPoint2}\n cy={yPoint2}\n data-is-focusable={isLegendSelected}\n onMouseOver={event =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n legendVal,\n lineColor,\n targetElement,\n )\n }\n onMouseMove={event =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n legendVal,\n lineColor,\n targetElement,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={event =>\n _handleFocus(\n event,\n lineId,\n x2,\n lastCirlceXCallout,\n lastCircleId,\n targetElement,\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={_points[i].data[j].text ?? _getAriaLabel(i, j)}\n />\n {!_isScatterPolar && lastSupportsTextMode && lastText && (\n <text\n key={`${lastCircleId}-label`}\n x={xPoint2}\n y={\n yPoint2 +\n Math.max(\n currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4,\n 4,\n ) +\n 12\n }\n className={classes.markerLabel}\n >\n {text}\n </text>\n )}\n </>\n ) : (\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 legendVal,\n lineColor,\n targetElement,\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 legendVal,\n lineColor,\n targetElement,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={event =>\n _handleFocus(\n event,\n lineId,\n x2,\n lastCirlceXCallout,\n lastCircleId,\n targetElement,\n lastCirlceXCalloutAccessibilityData,\n )\n }\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[j].onDataPointClick)}\n opacity={isLegendSelected && !lastPointHidden ? 1 : 0.01}\n fill={_points[i].data[j]?.markerColor || _getPointFill(lineColor, lastCircleId, j, true)}\n stroke={_points[i].data[j]?.markerColor || lineColor}\n strokeWidth={strokeWidth}\n role=\"img\"\n aria-label={_getAriaLabel(i, j)}\n tabIndex={isLegendSelected ? 0 : undefined}\n />\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={xPoint2}\n cy={yPoint2}\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 legendVal,\n lineColor,\n targetElement,\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 legendVal,\n lineColor,\n targetElement,\n )\n }\n onMouseOut={_handleMouseOut}\n strokeWidth={0}\n focusable={false}\n onBlur={_handleMouseOut}\n />\n </React.Fragment>,\n );\n }\n }\n\n if (\n isPlottable(xPoint1, yPoint1) &&\n isPlottable(xPoint2, yPoint2) &&\n (!_hasMarkersMode || _points[i].lineOptions?.mode?.includes('lines'))\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 const targetElement = document.getElementById(circleId);\n if (lineBorderWidth > 0) {\n bordersForLine.push(\n <line\n id={borderId}\n key={borderId}\n x1={xPoint1}\n y1={yPoint1}\n x2={xPoint2}\n y2={yPoint2}\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 <line\n id={lineId}\n key={lineId}\n x1={xPoint1}\n y1={yPoint1}\n x2={xPoint2}\n y2={yPoint2}\n strokeWidth={strokeWidth}\n ref={(e: SVGLineElement | null) => {\n _refCallback(e!, lineId);\n }}\n onMouseOver={event =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n legendVal,\n lineColor,\n targetElement,\n )\n }\n onMouseMove={event =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n legendVal,\n lineColor,\n targetElement,\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={xPoint1}\n y1={yPoint1}\n x2={xPoint2}\n y2={yPoint2}\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\n // Add filled area for scatterpolar charts\n const fillMode = _points[i].lineOptions?.fill;\n const isLegendSelected: boolean = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n if (fillMode === 'toself' && _points[i].data.length >= 3 && isLegendSelected && _isScatterPolar) {\n const getScaledXValue = (dataPoint: LineChartDataPoint) =>\n _xAxisScale(dataPoint.x instanceof Date ? dataPoint.x : (dataPoint.x as number));\n\n const fillPathGenerator = d3Line<LineChartDataPoint>()\n .x(dataPoint => getScaledXValue(dataPoint))\n .y(dataPoint => yScale(dataPoint.y))\n .curve(getCurveFactory(lineCurve))\n .defined(dataPoint => isPlottable(getScaledXValue(dataPoint), yScale(dataPoint.y)));\n\n const fillPath = fillPathGenerator(_points[i].data as LineChartDataPoint[]);\n\n if (fillPath) {\n linesForLine.push(\n <path\n key={`scatterpolar_fill_${i}`}\n d={`${fillPath}Z`}\n fill={lineColor}\n fillOpacity={0.5}\n stroke={lineColor}\n strokeWidth={2}\n strokeOpacity={0.8}\n pointerEvents=\"none\"\n />,\n );\n }\n }\n\n if (_isScatterPolar) {\n pointsForLine.push(\n ...renderScatterPolarCategoryLabels({\n xAxisScale: _xAxisScale,\n yAxisScale: yScale,\n className: classes.markerLabel || '',\n lineOptions: (_points[i] as Partial<LineChartPoints>)?.lineOptions,\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: JSXElement[] = [];\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\n ? formatDateToLocaleString(xPointToHighlight, props.culture, props.useUTC as boolean)\n : xPointToHighlight;\n const found = findCalloutPoints(calloutPointsRef.current, xPointToHighlight) as CustomizedCalloutData | undefined;\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 const targetElement = document.getElementById(`${_staticHighlightCircle}_${linenumber}`);\n const rect = targetElement!.getBoundingClientRect();\n setNearestCircleToHighlight(pointToHighlight);\n updatePosition(rect.x, rect.y);\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 xAxisCalloutData: string | undefined,\n circleId: string,\n targetElement: HTMLElement | null,\n xAxisCalloutAccessibilityData?: AccessibilityProps,\n ) {\n _uniqueCallOutID = circleId;\n const formattedData = x instanceof Date ? formatDateToLocaleString(x, props.culture, props.useUTC as boolean) : x;\n const found = findCalloutPoints(calloutPointsRef.current, x) as CustomizedCalloutData | undefined;\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 setRefSelected(targetElement);\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,\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 legendVal: string,\n lineColor: string,\n targetElement: HTMLElement | null,\n ) {\n mouseEvent?.persist();\n const formattedData = x instanceof Date ? formatDateToLocaleString(x, props.culture, props.useUTC as boolean) : x;\n const found = findCalloutPoints(calloutPointsRef.current, x) as CustomizedCalloutData | undefined;\n let hoverDp: CustomizedCalloutData | undefined = undefined;\n\n if (props.isCalloutForStack === false && found?.values) {\n const dp = find(found.values, (val: CustomizedCalloutDataPoint) => val?.y === y);\n if (dp) {\n hoverDp = {\n x,\n values: [dp],\n };\n }\n }\n // if no points need to be called out then don't show vertical line and callout card\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 setRefSelected(targetElement);\n setPopoverOpen(true);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);\n setYValueHover(found.values);\n setYValue(y);\n setLegendVal(legendVal);\n setLineColor(lineColor);\n setStackCalloutProps(found!);\n setDataPointCalloutProps(hoverDp);\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 =\n point.x instanceof Date ? formatDateToLocaleString(point.x, props.culture, props.useUTC as boolean) : 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 _isXAxisDateType = getXAxisType(_points);\n let points = _points;\n if (legendProps && !!legendProps.canSelectMultipleLegends) {\n points = selectedLegendPoints.length >= 1 ? selectedLegendPoints : _points;\n calloutPointsRef.current = 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 YValue: YValue,\n legend: legendVal,\n color: lineColor,\n XValue: hoverXValue! as string,\n descriptionMessage:\n props.getCalloutDescriptionMessage && stackCalloutProps\n ? props.getCalloutDescriptionMessage(stackCalloutProps)\n : undefined,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData: xAxisCalloutAccessibilityData,\n ...props.calloutProps,\n isPopoverOpen: isPopoverOpen,\n clickPosition: clickPosition,\n positioning: {\n target: refSelected,\n },\n isCalloutForStack: props.isCalloutForStack,\n culture: props.culture,\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={_getNumericMinMaxOfY}\n getGraphData={_initializeLineChartData}\n xAxisType={_isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n {...(_isScatterPolar ? { yMaxValue: 1, yMinValue: -1 } : {})}\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","max","d3Max","useId","find","findCalloutPoints","CartesianChart","EventsAnnotation","tokens","calloutData","ChartTypes","getXAxisType","XAxisTypes","tooltipOfAxislabels","Points","pointTypes","getTypeOfAxis","getNextColor","getColorFromToken","findNumericMinMaxOfY","createNumericYAxis","domainRangeOfDateForAreaLineScatterVerticalBarCharts","domainRangeOfNumericForAreaLineScatterCharts","createStringYAxis","useRtl","getCurveFactory","isScatterPolarSeries","getDomainPaddingForMarkers","isPlottable","getRangeForScatterMarkerSize","toImage","renderScatterPolarCategoryLabels","formatDateToLocaleString","PointSize","bisect","d","x","left","DEFAULT_LINE_STROKE_SIZE","PATH_MULTIPLY_SIZE","_getPointPath","y","w","index","allPointPaths","LineChart","forwardRef","isCalloutForStack","restProps","forwardedRef","props","_hasMarkersMode","_isXAxisDateType","_isScatterPolar","_points","_injectIndexPropertyInLineChartData","data","lineChartData","_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","YValue","setYValue","legendVal","setLegendVal","lineColor","setLineColor","refSelected","setRefSelected","pointsRef","calloutPointsRef","classes","useEffect","current","height","width","useImperativeHandle","componentRef","chartContainer","opts","toSVG","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","barWidth","tickValues","shiftX","domainNRangeValue","NumericAxis","xScaleType","DateAxis","dStartValue","dEndValue","rStartValue","rEndValue","isFilterSelectedLegends","allowMultipleShapesForPoints","filteredData","filter","item","includes","legend","some","lineOptions","mode","map","color","updatePosition","newX","newY","threshold","distance","Math","sqrt","pow","_getCustomizedCallout","onRenderCalloutPerStack","onRenderCalloutPerDataPoint","_getNumericMinMaxOfY","yAxisType","useSecondaryYScale","startValue","endValue","secondaryYScaleType","yScaleType","yPadding","start","end","_getMargins","_margins","_initializeLineChartData","xScale","yScalePrimary","containerHeight","containerWidth","xElement","yAxisElement","yScaleSecondary","colorFillBars","_createColorFillBars","_createLines","_handleSingleLegendSelectionAction","lineChartItem","_handleLegendClick","_onHoverCardHide","onLegendClick","_createLegends","isLegendMultiSelectEnabled","canSelectMultipleLegends","mapLegendToPoints","forEach","point","push","legendDataItems","Object","entries","legendTitle","representativePoint","title","action","p","_handleMultipleLineLegendSelectionAction","onMouseOutAction","hoverAction","_handleChartMouseLeave","legendShape","shape","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","colorNeutralBackground1","maxMarkerSize","markerSize","i","linesForLine","bordersForLine","pointsForLine","verticaLineHeight","bottom","yScale","extraMaxPixels","x1","y1","xAxisCalloutData","xPoint","yPoint","circleId","isLegendSelected","_legendHighlighted","_noLegendHighlighted","currentMarkerSize","supportsTextMode","text","targetElement","document","getElementById","Fragment","key","circle","id","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","className","markerLabel","gapIndex","gaps","sort","a","b","startIndex","lineCurve","curve","optimizeLargeData","defined","lineId","borderId","lineData","k","Date","getTime","lineMode","shouldDrawLines","lineBorderWidth","Number","parseFloat","toString","path","strokeLinecap","lineBorderColor","strokeDasharray","_onMouseOverLargeDataset","onLineClick","visibility","showMarkers","perPointColor","markerColor","bind","j","gapResult","_checkInGap","isInGap","x2","y2","xPoint1","yPoint1","xPoint2","yPoint2","currentPointHidden","hideNonActiveDots","lastCircleId","hiddenHoverCircleId","lastPointHidden","lastCirlceXCallout","lastCirlceXCalloutAccessibilityData","lastSupportsTextMode","lastText","focusable","strokeDashoffset","fillMode","getScaledXValue","dataPoint","fillPathGenerator","fillPath","fillOpacity","strokeOpacity","pointerEvents","xAxisScale","yAxisScale","g","showXAxisLablesTooltip","remove","wrapXAxisLables","xAxisElement","call","tooltipProps","tooltipCls","tooltip","axis","yMinMaxValues","FILL_Y_PADDING","colorFillBarId","_getStripePattern","startX","endX","rect","abs","yMinValue","stripePath","pattern","patternUnits","currentGapIndex","endIndex","element","refElement","linenumber","lineHeight","mouseEvent","persist","xOffset","invert","d0","d1","axisType","xPointToHighlight","x0","point0","point1","formattedDate","culture","useUTC","found","pointToHighlight","pointToHighlightUpdated","attr","getBoundingClientRect","values","formattedData","obj","hoverDp","dp","val","func","onClick","selectedLine","selectedLineIndex","reduce","acc","selectedLines","slice","concat","areAllLineLegendsSelected","_clearMultipleLegendSelections","selectedLegendTitlesToPass","selectedColorFillBar","selectedColorFillBarIndex","selectedColorFillBars","areAllColorFillBarLegendsSelected","lineIndex","xValue","yValue","yAxisCalloutData","callOutAccessibilityData","ariaLabel","_isChartEmpty","tickFormat","legendBars","hideLegend","calloutProps","YValueHover","XValue","descriptionMessage","getCalloutDescriptionMessage","positioning","target","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","chartTitle","createYAxis","getmargins","getMinMaxOfYAxis","getGraphData","yMaxValue","getDomainNRangeValues","onChartMouseLeave","enableFirstRenderOptimization","enablePerfOptimization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