@fluentui/react-charts 9.1.7 → 9.1.8
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.
- package/CHANGELOG.md +12 -2
- package/dist/index.d.ts +60 -3
- package/lib/components/AreaChart/AreaChart.js +21 -1
- package/lib/components/AreaChart/AreaChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.js +8 -9
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +18 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +25 -1
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js +1 -2
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +4 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +22 -2
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.js +26 -1
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +16 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +15 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib/utilities/FocusableTooltipText.js +1 -2
- package/lib/utilities/FocusableTooltipText.js.map +1 -1
- package/lib/utilities/utilities.js +6 -144
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.js +20 -0
- package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +7 -7
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +17 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +24 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +1 -2
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +3 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +21 -1
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +25 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +15 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +14 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/utilities/FocusableTooltipText.js +1 -2
- package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +11 -132
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["LineChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { LineChartProps } from './LineChart.types';\nimport { useLineChartStyles } from './useLineChartStyles.styles';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select, pointer } from 'd3-selection';\nimport { bisector } from 'd3-array';\nimport { Legend, Legends } from '../Legends/index';\nimport { line as d3Line } from 'd3-shape';\nimport { useId } from '@fluentui/react-utilities';\nimport { find } from '../../utilities/index';\nimport {\n AccessibilityProps,\n CartesianChart,\n ChildProps,\n LineChartPoints,\n CustomizedCalloutData,\n Margins,\n RefArrayData,\n ColorFillBarsProps,\n LineChartGap,\n LineChartDataPoint,\n Chart,\n} from '../../index';\nimport { EventsAnnotation } from './eventAnnotation/EventAnnotation';\nimport { tokens } from '@fluentui/react-theme';\nimport {\n calloutData,\n ChartTypes,\n getXAxisType,\n XAxisTypes,\n tooltipOfAxislabels,\n Points,\n pointTypes,\n getMinMaxOfYAxis,\n getTypeOfAxis,\n getNextColor,\n getColorFromToken,\n useRtl,\n formatDate,\n getCurveFactory,\n} from '../../utilities/index';\nimport { ScaleLinear } from 'd3-scale';\n\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\nenum PointSize {\n hoverSize = 11,\n invisibleSize = 1,\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst bisect = bisector((d: any) => d.x).left;\n\nconst DEFAULT_LINE_STROKE_SIZE = 4;\n// The given shape of a icon must be 2.5 times bigger than line width (known as stroke width)\nconst PATH_MULTIPLY_SIZE = 2.5;\n\n/**\n *\n * @param x units from origin\n * @param y units from origin\n * @param w is the legnth of the each side of a shape\n * @param index index to get the shape path\n */\nconst _getPointPath = (x: number, y: number, w: number, index: number): string => {\n const allPointPaths = [\n // circle path\n `M${x - w / 2} ${y}\n A${w / 2} ${w / 2} 0 1 0 ${x + w / 2} ${y}\n M${x - w / 2} ${y}\n A ${w / 2} ${w / 2} 0 1 1 ${x + w / 2} ${y}\n `,\n //square\n `M${x - w / 2} ${y - w / 2}\n L${x + w / 2} ${y - w / 2}\n L${x + w / 2} ${y + w / 2}\n L${x - w / 2} ${y + w / 2}\n Z`,\n //triangle\n `M${x - w / 2} ${y - 0.2886 * w}\n H ${x + w / 2}\n L${x} ${y + 0.5774 * w} Z`,\n //diamond\n `M${x} ${y - w / 2}\n L${x + w / 2} ${y}\n L${x} ${y + w / 2}\n L${x - w / 2} ${y}\n Z`,\n //pyramid\n `M${x} ${y - 0.5774 * w}\n L${x + w / 2} ${y + 0.2886 * w}\n L${x - w / 2} ${y + 0.2886 * w} Z`,\n //hexagon\n `M${x - 0.5 * w} ${y - 0.866 * w}\n L${x + 0.5 * w} ${y - 0.866 * w}\n L${x + w} ${y}\n L${x + 0.5 * w} ${y + 0.866 * w}\n L${x - 0.5 * w} ${y + 0.866 * w}\n L${x - w} ${y}\n Z`,\n //pentagon\n `M${x} ${y - 0.851 * w}\n L${x + 0.6884 * w} ${y - 0.2633 * w}\n L${x + 0.5001 * w} ${y + 0.6884 * w}\n L${x - 0.5001 * w} ${y + 0.6884 * w}\n L${x - 0.6884 * w} ${y - 0.2633 * w}\n Z`,\n //octagon\n `M${x - 0.5001 * w} ${y - 1.207 * w}\n L${x + 0.5001 * w} ${y - 1.207 * w}\n L${x + 1.207 * w} ${y - 0.5001 * w}\n L${x + 1.207 * w} ${y + 0.5001 * w}\n L${x + 0.5001 * w} ${y + 1.207 * w}\n L${x - 0.5001 * w} ${y + 1.207 * w}\n L${x - 1.207 * w} ${y + 0.5001 * w}\n L${x - 1.207 * w} ${y - 0.5001 * w}\n Z`,\n ];\n return allPointPaths[index];\n};\n\ntype LineChartDataWithIndex = LineChartPoints & { index: number };\n\n// Create a LineChart variant which uses these default styles and this styled subcomponent.\n/**\n * Linechart component\n * {@docCategory LineChart}\n */\nexport const LineChart: React.FunctionComponent<LineChartProps> = React.forwardRef<HTMLDivElement, LineChartProps>(\n (props, forwardedRef) => {\n let _points: LineChartDataWithIndex[] = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _calloutPoints: any[] = calloutData(_points) || [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _xAxisScale: any = '';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _yScalePrimary: any = '';\n let _circleId: string = useId('circle');\n let _lineId: string = useId('lineID');\n let _borderId: string = useId('borderID');\n let _verticalLine: string = useId('verticalLine');\n let _colorFillBarPatternId: string = useId('colorFillBarPattern');\n let _uniqueCallOutID: string | null = '';\n let _refArray: RefArrayData[] = [];\n let margins: Margins;\n let eventLabelHeight: number = 36;\n let lines: JSX.Element[];\n let _renderedColorFillBars: JSX.Element[];\n const _colorFillBars = React.useRef<ColorFillBarsProps[]>([]);\n let _tooltipId: string = useId('LineChartTooltipId_');\n let _rectId: string = useId('containerRectLD');\n let _staticHighlightCircle: string = useId('staticHighlightCircle');\n let _firstRenderOptimization = true;\n let _emptyChartId: string = useId('_LineChart_empty');\n const _colorFillBarId = useId('_colorFillBarId');\n const _isRTL: boolean = useRtl();\n let xAxisCalloutAccessibilityData: AccessibilityProps = {};\n const cartesianChartRef = React.useRef<Chart>(null);\n let _yScaleSecondary: ScaleLinear<number, number> | undefined;\n\n props.eventAnnotationProps &&\n props.eventAnnotationProps.labelHeight &&\n (eventLabelHeight = props.eventAnnotationProps.labelHeight);\n\n const [hoverXValue, setHoverXValue] = React.useState<string | number>('');\n const [activeLegend, setActiveLegend] = React.useState<string>('');\n const [YValueHover, setYValueHover] = React.useState<[]>([]);\n const [selectedLegend, setSelectedLegend] = React.useState<string>('');\n const [selectedLegendPoints, setSelectedLegendPoints] = React.useState<any[]>(\n _injectIndexPropertyInLineChartData(props.data.lineChartData, true),\n );\n const [selectedColorBarLegend, setSelectedColorBarLegend] = React.useState<any[]>([]);\n const [isSelectedLegend, setIsSelectedLegend] = React.useState<boolean>(\n (props.legendProps?.selectedLegends?.length ?? 0) > 0,\n );\n const [activePoint, setActivePoint] = React.useState<string>('');\n const [nearestCircleToHighlight, setNearestCircleToHighlight] = React.useState<LineChartDataPoint | null>(null);\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<CustomizedCalloutData>();\n const [stackCalloutProps, setStackCalloutProps] = React.useState<CustomizedCalloutData>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n\n const pointsRef = React.useRef<LineChartDataWithIndex[] | []>([]);\n const calloutPointsRef = React.useRef<any[]>([]);\n const classes = useLineChartStyles(props);\n React.useEffect(() => {\n /** note that height and width are not used to resize or set as dimesions of the chart,\n * fitParentContainer is responisble for setting the height and width or resizing of the svg/chart\n */\n\n if (_points !== _injectIndexPropertyInLineChartData(props.data.lineChartData) || props.data !== _points) {\n pointsRef.current = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n calloutPointsRef.current = calloutData(pointsRef.current);\n }\n }, [props.height, props.width, props.data]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n }),\n [],\n );\n\n function _injectIndexPropertyInLineChartData(\n lineChartData?: LineChartPoints[],\n isFilterSelectedLegends: boolean = false,\n ): LineChartDataWithIndex[] | [] {\n const { allowMultipleShapesForPoints = false } = props;\n // Apply filter only if isPropChange is true\n const filteredData = isFilterSelectedLegends\n ? lineChartData?.filter(\n (item: LineChartPoints) =>\n props.legendProps?.selectedLegends?.includes(item.legend) ||\n props.legendProps?.selectedLegend === item.legend,\n )\n : lineChartData;\n return filteredData\n ? filteredData.map((item: LineChartPoints, index: number) => {\n let color: string;\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0);\n } else {\n color = getColorFromToken(item.color);\n }\n return {\n ...item,\n index: allowMultipleShapesForPoints ? index : -1,\n color,\n };\n })\n : [];\n }\n\n function updatePosition(newX: number, newY: number) {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n function _getCustomizedCallout() {\n return props.onRenderCalloutPerStack\n ? props.onRenderCalloutPerStack(stackCalloutProps)\n : props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps)\n : null;\n }\n\n function _getMargins(_margins: Margins) {\n margins = _margins;\n }\n\n function _initializeLineChartData(\n xScale: NumericAxis,\n yScalePrimary: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n yAxisElement?: SVGElement | null,\n yScaleSecondary?: ScaleLinear<number, number>,\n ) {\n _xAxisScale = xScale;\n _yScalePrimary = yScalePrimary;\n _yScaleSecondary = yScaleSecondary;\n _renderedColorFillBars = props.colorFillBars ? _createColorFillBars(containerHeight) : [];\n lines = _createLines(xElement!, containerHeight!);\n }\n\n function _handleSingleLegendSelectionAction(lineChartItem: LineChartDataWithIndex | ColorFillBarsProps) {\n if (selectedLegend === lineChartItem.legend) {\n setSelectedLegend('');\n _handleLegendClick(lineChartItem, null);\n } else {\n setSelectedLegend(lineChartItem.legend);\n _handleLegendClick(lineChartItem, lineChartItem.legend);\n }\n }\n\n function _onHoverCardHide() {\n setSelectedLegendPoints([]);\n setSelectedColorBarLegend([]);\n setIsSelectedLegend(false);\n }\n\n function _handleLegendClick(\n lineChartItem: LineChartDataWithIndex | ColorFillBarsProps,\n selectedLegend: string | null | string[],\n ): void {\n if (lineChartItem.onLegendClick) {\n lineChartItem.onLegendClick(selectedLegend);\n }\n }\n\n function _createLegends(data: LineChartDataWithIndex[]): JSX.Element {\n const { legendProps, allowMultipleShapesForPoints = false } = props;\n const isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);\n const legendDataItems = data.map((point: LineChartDataWithIndex) => {\n const color: string = point.color!;\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: point.legend!,\n color,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n _handleMultipleLineLegendSelectionAction(point);\n } else {\n _handleSingleLegendSelectionAction(point);\n }\n },\n onMouseOutAction: () => {\n setActiveLegend('');\n },\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(point.legend);\n },\n ...(point.legendShape && {\n shape: point.legendShape,\n }),\n ...(allowMultipleShapesForPoints && {\n shape: Points[point.index % Object.keys(pointTypes).length] as Legend['shape'],\n }),\n };\n return legend;\n });\n\n const colorFillBarsLegendDataItems = props.colorFillBars\n ? props.colorFillBars.map((colorFillBar: ColorFillBarsProps, index: number) => {\n const title = colorFillBar.legend;\n const color = getColorFromToken(colorFillBar.color);\n const legend: Legend = {\n title,\n color,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n _handleMultipleColorFillBarLegendSelectionAction(colorFillBar);\n } else {\n _handleSingleLegendSelectionAction(colorFillBar);\n }\n },\n onMouseOutAction: () => {\n setActiveLegend('');\n },\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(title);\n },\n opacity: _getColorFillBarOpacity(colorFillBar),\n stripePattern: colorFillBar.applyPattern,\n };\n return legend;\n })\n : [];\n\n return (\n <Legends\n legends={[...legendDataItems, ...colorFillBarsLegendDataItems]}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...(isLegendMultiSelectEnabled && { onLegendHoverCardLeave: _onHoverCardHide })}\n {...props.legendProps}\n />\n );\n }\n\n function _getBoxWidthOfShape(pointId: string, pointIndex: number, isLastPoint: boolean) {\n const { allowMultipleShapesForPoints = false, strokeWidth = DEFAULT_LINE_STROKE_SIZE } = props;\n if (allowMultipleShapesForPoints) {\n if (activePoint === pointId) {\n return PointSize.hoverSize;\n } else if (pointIndex === 1 || isLastPoint) {\n return strokeWidth * PATH_MULTIPLY_SIZE;\n } else {\n return PointSize.invisibleSize;\n }\n } else {\n if (activePoint === pointId) {\n return PointSize.hoverSize;\n } else {\n return PointSize.invisibleSize;\n }\n }\n }\n\n function _getPath(\n xPos: number,\n yPos: number,\n pointId: string,\n pointIndex: number,\n isLastPoint: boolean,\n pointOftheLine: number,\n ): string {\n const { allowMultipleShapesForPoints = false } = props;\n let w = _getBoxWidthOfShape(pointId, pointIndex, isLastPoint);\n const index: number = allowMultipleShapesForPoints ? pointOftheLine % Object.keys(pointTypes).length : 0;\n const widthRatio = pointTypes[index].widthRatio;\n w = widthRatio > 1 ? w / widthRatio : w;\n\n return _getPointPath(xPos, yPos, w, index);\n }\n function _getPointFill(lineColor: string, pointId: string, pointIndex: number, isLastPoint: boolean) {\n const { allowMultipleShapesForPoints = false } = props;\n if (allowMultipleShapesForPoints) {\n if (pointIndex === 1 || isLastPoint) {\n if (activePoint === pointId) {\n return tokens.colorNeutralBackground1;\n } else {\n return lineColor;\n }\n } else {\n if (activePoint === pointId) {\n return tokens.colorNeutralBackground1;\n } else {\n return lineColor;\n }\n }\n } else {\n if (activePoint === pointId) {\n return tokens.colorNeutralBackground1;\n } else {\n return lineColor;\n }\n }\n }\n\n function _createLines(xElement: SVGElement, containerHeight: number): JSX.Element[] {\n const lines: JSX.Element[] = [];\n if (isSelectedLegend) {\n _points = selectedLegendPoints;\n } else {\n _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n }\n for (let i = _points.length - 1; i >= 0; i--) {\n const linesForLine: JSX.Element[] = [];\n const bordersForLine: JSX.Element[] = [];\n const pointsForLine: JSX.Element[] = [];\n\n const legendVal: string = _points[i].legend;\n const lineColor: string = _points[i].color!;\n const verticaLineHeight = containerHeight - margins.bottom! + 6;\n const yScale = _points[i].useSecondaryYScale && _yScaleSecondary ? _yScaleSecondary : _yScalePrimary;\n if (_points[i].data.length === 1) {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const {\n x: x1,\n y: y1,\n xAxisCalloutData,\n xAxisCalloutAccessibilityData,\n } = _points[i].data[0] as LineChartDataPoint;\n const circleId = `${_circleId}_${i}`;\n const isLegendSelected: boolean = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n pointsForLine.push(\n <circle\n id={circleId}\n key={circleId}\n r={activePoint === circleId ? 5.5 : 3.5}\n cx={_xAxisScale(x1)}\n cy={yScale(y1)}\n fill={activePoint === circleId ? tokens.colorNeutralBackground1 : lineColor}\n opacity={isLegendSelected ? 1 : 0.1}\n tabIndex={isLegendSelected ? 0 : undefined}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseOut={_handleMouseOut}\n strokeWidth={activePoint === circleId ? DEFAULT_LINE_STROKE_SIZE : 0}\n stroke={activePoint === circleId ? lineColor : ''}\n role=\"img\"\n aria-label={_getAriaLabel(i, 0)}\n data-is-focusable={isLegendSelected}\n ref={(e: SVGCircleElement | null) => {\n _refCallback(e!, circleId);\n }}\n onFocus={() => _handleFocus(circleId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[0].onDataPointClick)}\n />,\n );\n }\n\n let gapIndex = 0;\n const gaps = _points[i].gaps?.sort((a, b) => a.startIndex - b.startIndex) ?? [];\n const lineCurve = _points[i].lineOptions?.curve;\n\n // Use path rendering technique for larger datasets to optimize performance.\n if ((props.optimizeLargeData || lineCurve) && _points[i].data.length > 1) {\n const line = d3Line()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => _xAxisScale(d[0]))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => yScale(d[1]))\n .curve(getCurveFactory(lineCurve));\n\n const lineId = `${_lineId}_${i}`;\n const borderId = `${_borderId}_${i}`;\n const strokeWidth = _points[i].lineOptions?.strokeWidth || props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;\n\n const isLegendSelected: boolean = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n\n const lineData: [number, number][] = [];\n for (let k = 0; k < _points[i].data.length; k++) {\n lineData.push([\n _points[i].data[k].x instanceof Date\n ? (_points[i].data[k].x as Date).getTime()\n : (_points[i].data[k].x as number),\n _points[i].data[k].y,\n ]);\n }\n\n if (isLegendSelected) {\n const lineBorderWidth = _points[i].lineOptions?.lineBorderWidth\n ? Number.parseFloat(_points[i].lineOptions!.lineBorderWidth!.toString())\n : 0;\n if (lineBorderWidth > 0) {\n bordersForLine.push(\n <path\n id={borderId}\n key={borderId}\n d={line(lineData)!}\n fill=\"transparent\"\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeWidth={Number.parseFloat(strokeWidth.toString()) + lineBorderWidth}\n stroke={_points[i].lineOptions?.lineBorderColor || tokens.colorNeutralBackground1}\n opacity={1}\n />,\n );\n }\n\n linesForLine.push(\n <path\n id={lineId}\n key={lineId}\n d={line(lineData)!}\n fill=\"transparent\"\n data-is-focusable={true}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n onMouseMove={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event, yScale)}\n onMouseOver={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event, yScale)}\n onMouseOut={_handleMouseOut}\n {..._getClickHandler(_points[i].onLineClick)}\n opacity={1}\n tabIndex={isLegendSelected ? 0 : undefined}\n />,\n );\n } else {\n linesForLine.push(\n <path\n id={lineId}\n key={lineId}\n d={line(lineData)!}\n fill=\"transparent\"\n data-is-focusable={false}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n opacity={0.1}\n />,\n );\n }\n\n pointsForLine.push(\n <circle\n id={`${_staticHighlightCircle}_${i}`}\n key={`${_staticHighlightCircle}_${i}`}\n r={5.5}\n cx={0}\n cy={0}\n fill={tokens.colorNeutralBackground1}\n strokeWidth={DEFAULT_LINE_STROKE_SIZE}\n stroke={lineColor}\n visibility={'hidden'}\n onMouseMove={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event, yScale)}\n onMouseOver={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event, yScale)}\n onMouseOut={_handleMouseOut}\n />,\n );\n } else if (!props.optimizeLargeData) {\n for (let j = 1; j < _points[i].data.length; j++) {\n const gapResult = _checkInGap(j, gaps, gapIndex);\n const isInGap = gapResult.isInGap;\n gapIndex = gapResult.gapIndex;\n\n const lineId = `${_lineId}_${i}_${j}`;\n const borderId = `${_borderId}_${i}_${j}`;\n const circleId = `${_circleId}_${i}_${j}`;\n const {\n x: x1,\n y: y1,\n xAxisCalloutData,\n xAxisCalloutAccessibilityData,\n } = _points[i].data[j - 1] as LineChartDataPoint;\n const { x: x2, y: y2 } = _points[i].data[j] as LineChartDataPoint;\n let path = _getPath(_xAxisScale(x1), yScale(y1), circleId, j, false, _points[i].index);\n const strokeWidth = _points[i].lineOptions?.strokeWidth || props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;\n\n const isLegendSelected: boolean =\n _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n\n const currentPointHidden = _points[i].hideNonActiveDots && activePoint !== circleId;\n pointsForLine.push(\n <path\n id={circleId}\n key={circleId}\n d={path}\n data-is-focusable={isLegendSelected}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={() => _handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[j - 1].onDataPointClick)}\n opacity={isLegendSelected && !currentPointHidden ? 1 : 0.01}\n fill={_getPointFill(lineColor, circleId, j, false)}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n role=\"img\"\n aria-label={_getAriaLabel(i, j - 1)}\n tabIndex={isLegendSelected ? 0 : undefined}\n />,\n );\n if (j + 1 === _points[i].data.length) {\n // If this is last point of the line segment.\n const lastCircleId = `${circleId}${j}L`;\n const hiddenHoverCircleId = `${circleId}${j}D`;\n const lastPointHidden = _points[i].hideNonActiveDots && activePoint !== lastCircleId;\n path = _getPath(_xAxisScale(x2), yScale(y2), lastCircleId, j, true, _points[i].index);\n const {\n xAxisCalloutData: lastCirlceXCallout,\n xAxisCalloutAccessibilityData: lastCirlceXCalloutAccessibilityData,\n } = _points[i].data[j];\n pointsForLine.push(\n <React.Fragment key={`${lastCircleId}_container`}>\n <path\n id={lastCircleId}\n key={lastCircleId}\n d={path}\n data-is-focusable={isLegendSelected}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={() =>\n _handleFocus(lineId, x2, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData)\n }\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[j].onDataPointClick)}\n opacity={isLegendSelected && !lastPointHidden ? 1 : 0.01}\n fill={_getPointFill(lineColor, lastCircleId, j, true)}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n role=\"img\"\n aria-label={_getAriaLabel(i, j)}\n tabIndex={isLegendSelected ? 0 : undefined}\n />\n {/* Dummy circle acting as magnetic latch for last callout point */}\n <circle\n id={hiddenHoverCircleId}\n key={hiddenHoverCircleId}\n r={8}\n cx={_xAxisScale(x2)}\n cy={yScale(y2)}\n opacity={0}\n width={0}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseOut={_handleMouseOut}\n strokeWidth={0}\n focusable={false}\n onBlur={_handleMouseOut}\n />\n </React.Fragment>,\n );\n /* eslint-enable react/jsx-no-bind */\n }\n\n if (isLegendSelected) {\n // don't draw line if it is in a gap\n if (!isInGap) {\n const lineBorderWidth = _points[i].lineOptions?.lineBorderWidth\n ? Number.parseFloat(_points[i].lineOptions!.lineBorderWidth!.toString())\n : 0;\n if (lineBorderWidth > 0) {\n bordersForLine.push(\n <line\n id={borderId}\n key={borderId}\n x1={_xAxisScale(x1)}\n y1={yScale(y1)}\n x2={_xAxisScale(x2)}\n y2={yScale(y2)}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeWidth={Number.parseFloat(strokeWidth.toString()) + lineBorderWidth}\n {...(_points[i].lineOptions?.lineBorderColor && {\n stroke: _points[i].lineOptions?.lineBorderColor,\n })}\n className={classes.lineBorder}\n opacity={1}\n />,\n );\n }\n\n linesForLine.push(\n <line\n id={lineId}\n key={lineId}\n x1={_xAxisScale(x1)}\n y1={yScale(y1)}\n x2={_xAxisScale(x2)}\n y2={yScale(y2)}\n strokeWidth={strokeWidth}\n ref={(e: SVGLineElement | null) => {\n _refCallback(e!, lineId);\n }}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseOut={_handleMouseOut}\n stroke={lineColor}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={_points[i].lineOptions?.strokeDasharray}\n strokeDashoffset={_points[i].lineOptions?.strokeDashoffset}\n opacity={1}\n {..._getClickHandler(_points[i].onLineClick)}\n />,\n );\n }\n } else {\n if (!isInGap) {\n linesForLine.push(\n <line\n id={lineId}\n key={lineId}\n x1={_xAxisScale(x1)}\n y1={yScale(y1)}\n x2={_xAxisScale(x2)}\n y2={yScale(y2)}\n strokeWidth={strokeWidth}\n stroke={lineColor}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={_points[i].lineOptions?.strokeDasharray}\n strokeDashoffset={_points[i].lineOptions?.strokeDashoffset}\n opacity={0.1}\n />,\n );\n }\n }\n }\n }\n\n lines.push(\n <g\n key={`line_${i}`}\n role=\"region\"\n aria-label={`${legendVal}, line ${i + 1} of ${_points.length} with ${_points[i].data.length} data points.`}\n >\n {bordersForLine}\n {linesForLine}\n {pointsForLine}\n </g>,\n );\n }\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(_xAxisScale);\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return lines;\n }\n\n function _createColorFillBars(containerHeight: number) {\n const colorFillBars: JSX.Element[] = [];\n if (isSelectedLegend) {\n _colorFillBars.current = selectedColorBarLegend;\n } else {\n _colorFillBars.current = props.colorFillBars!;\n }\n\n const yMinMaxValues = getMinMaxOfYAxis(_points, ChartTypes.LineChart);\n const FILL_Y_PADDING = 3;\n for (let i = 0; i < _colorFillBars.current.length; i++) {\n const colorFillBar = _colorFillBars.current[i];\n const colorFillBarId = `${_colorFillBarId}-${i}`;\n const color = getColorFromToken(colorFillBar.color);\n\n if (colorFillBar.applyPattern) {\n // Using a pattern element because CSS was unable to render diagonal stripes for rect elements\n colorFillBars.push(_getStripePattern(color, i));\n }\n\n for (let j = 0; j < colorFillBar.data.length; j++) {\n const startX = colorFillBar.data[j].startX;\n const endX = colorFillBar.data[j].endX;\n const opacity =\n _legendHighlighted(colorFillBar.legend) || _noLegendHighlighted() || isSelectedLegend\n ? _getColorFillBarOpacity(colorFillBar)\n : 0.1;\n colorFillBars.push(\n <rect\n fill={colorFillBar.applyPattern ? `url(#${_colorFillBarPatternId}_${i})` : color}\n fillOpacity={opacity}\n x={_isRTL ? _xAxisScale(endX) : _xAxisScale(startX)}\n y={_yScalePrimary(yMinMaxValues.endValue) - FILL_Y_PADDING}\n width={Math.abs(_xAxisScale(endX) - _xAxisScale(startX))}\n height={_yScalePrimary(props.yMinValue || 0) - _yScalePrimary(yMinMaxValues.endValue) + FILL_Y_PADDING}\n key={`${colorFillBarId}${j}`}\n />,\n );\n }\n }\n return colorFillBars;\n }\n\n function _getStripePattern(color: string, id: number) {\n // This describes a tile pattern that resembles diagonal stripes\n // For more information: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d\n const stripePath = 'M-4,4 l8,-8 M0,16 l16,-16 M12,20 l8,-8';\n return (\n <pattern\n id={`${_colorFillBarPatternId}_${id}`}\n width={16}\n height={16}\n key={`${_colorFillBarPatternId}_${id}`}\n patternUnits={'userSpaceOnUse'}\n >\n <path d={stripePath} stroke={color} strokeWidth={1.25} />\n </pattern>\n );\n }\n\n function _checkInGap(pointIndex: number, gaps: LineChartGap[], currentGapIndex: number) {\n let gapIndex = currentGapIndex;\n let isInGap = false;\n\n while (gapIndex < gaps.length && pointIndex > gaps[gapIndex].endIndex) {\n gapIndex++;\n }\n\n if (gapIndex < gaps.length && pointIndex > gaps[gapIndex].startIndex && pointIndex <= gaps[gapIndex].endIndex) {\n isInGap = true;\n }\n return { isInGap, gapIndex };\n }\n\n function _refCallback(element: SVGGElement, legendTitle: string): void {\n _refArray.push({ index: legendTitle, refElement: element });\n }\n\n const _onMouseOverLargeDataset = (\n linenumber: number,\n lineHeight: number,\n mouseEvent: React.MouseEvent<SVGRectElement | SVGPathElement | SVGCircleElement>,\n yScale: ScaleLinear<number, number>,\n ) => {\n mouseEvent.persist();\n const { data } = props;\n const { lineChartData } = data;\n\n // This will get the value of the X when mouse is on the chart\n const xOffset = _xAxisScale.invert(pointer(mouseEvent)[0], document.getElementById(_rectId)!);\n const i = bisect(lineChartData![linenumber].data, xOffset);\n const d0 = lineChartData![linenumber].data[i - 1] as LineChartDataPoint;\n const d1 = lineChartData![linenumber].data[i] as LineChartDataPoint;\n let axisType: XAxisTypes | null = null;\n let xPointToHighlight: string | Date | number = 0;\n let index: null | number = null;\n if (d0 === undefined && d1 !== undefined) {\n xPointToHighlight = d1.x;\n index = i;\n } else if (d0 !== undefined && d1 === undefined) {\n xPointToHighlight = d0.x;\n index = i - 1;\n } else {\n axisType = getTypeOfAxis(lineChartData![linenumber].data[0].x, true) as XAxisTypes;\n let x0;\n let point0;\n let point1;\n switch (axisType) {\n case XAxisTypes.DateAxis:\n x0 = new Date(xOffset).getTime();\n point0 = (d0.x as Date).getTime();\n point1 = (d1.x as Date).getTime();\n xPointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n case XAxisTypes.NumericAxis:\n x0 = xOffset as number;\n point0 = d0.x as number;\n point1 = d1.x as number;\n xPointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n default:\n break;\n }\n }\n\n const { xAxisCalloutData } = lineChartData![linenumber].data[index as number];\n const formattedDate =\n xPointToHighlight instanceof Date ? formatDate(xPointToHighlight, props.useUTC) : xPointToHighlight;\n const modifiedXVal = xPointToHighlight instanceof Date ? xPointToHighlight.getTime() : xPointToHighlight;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = find(_calloutPoints, (element: { x: string | number }) => {\n return element.x === modifiedXVal;\n });\n const pointToHighlight: LineChartDataPoint = lineChartData![linenumber].data[index!] as LineChartDataPoint;\n const pointToHighlightUpdated =\n nearestCircleToHighlight === null ||\n (nearestCircleToHighlight !== null &&\n pointToHighlight !== null &&\n (nearestCircleToHighlight.x !== pointToHighlight.x || nearestCircleToHighlight.y !== pointToHighlight.y));\n // if no points need to be called out then don't show vertical line and callout card\n if (found && pointToHighlightUpdated) {\n _uniqueCallOutID = `#${_staticHighlightCircle}_${linenumber}`;\n\n d3Select(`#${_staticHighlightCircle}_${linenumber}`)\n .attr('cx', `${_xAxisScale(pointToHighlight.x)}`)\n .attr('cy', `${yScale(pointToHighlight.y)}`)\n .attr('visibility', 'visibility');\n\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(pointToHighlight.x)}, ${yScale(pointToHighlight.y)})`)\n .attr('visibility', 'visibility')\n .attr('y2', `${lineHeight - 5 - yScale(pointToHighlight.y)}`);\n\n setNearestCircleToHighlight(pointToHighlight);\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setStackCalloutProps(found!);\n setYValueHover(found.values);\n setDataPointCalloutProps(found!);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue(formattedDate);\n setActivePoint('');\n }\n\n if (!found) {\n setPopoverOpen(false);\n setNearestCircleToHighlight(pointToHighlight);\n setActivePoint('');\n }\n };\n\n function _handleFocus(\n lineId: string,\n x: number | Date,\n\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData?: AccessibilityProps,\n ) {\n _uniqueCallOutID = circleId;\n const formattedData = x instanceof Date ? formatDate(x, props.useUTC) : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const found = find(_calloutPoints, (element: { x: string | number }) => element.x === xVal);\n // if no points need to be called out then don't show vertical line and callout card\n\n if (found) {\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(x)}, 0)`)\n .attr('visibility', 'visibility');\n _refArray.forEach((obj: RefArrayData) => {\n if (obj.index === lineId) {\n setPopoverOpen(true);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);\n setYValueHover(found.values);\n setStackCalloutProps(found!);\n setDataPointCalloutProps(found!);\n setActivePoint(circleId);\n }\n });\n } else {\n setActivePoint(circleId);\n }\n }\n\n function _handleHover(\n x: number | Date,\n y: number | Date,\n lineHeight: number,\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData: AccessibilityProps | undefined,\n mouseEvent: React.MouseEvent<SVGElement>,\n yScale: ScaleLinear<number, number>,\n ) {\n mouseEvent?.persist();\n const formattedData = x instanceof Date ? formatDate(x, props.useUTC) : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const found = find(_calloutPoints, (element: { x: string | number }) => element.x === xVal);\n // if no points need to be called out then don't show vertical line and callout card\n\n if (found) {\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(x)}, ${yScale(y)})`)\n .attr('visibility', 'visibility')\n .attr('y2', `${lineHeight - 5 - yScale(y)}`);\n\n if (_uniqueCallOutID !== circleId) {\n _uniqueCallOutID = circleId;\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);\n setYValueHover(found.values);\n setStackCalloutProps(found!);\n setDataPointCalloutProps(found!);\n setActivePoint(circleId);\n setNearestCircleToHighlight(null);\n }\n } else {\n setActivePoint(circleId);\n setNearestCircleToHighlight(null);\n }\n }\n\n /**\n * Screen readers announce an element as clickable if the onClick attribute is set.\n * This function sets the attribute only when a click event handler is provided.*/\n\n function _getClickHandler(func?: () => void): { onClick?: () => void } {\n if (func) {\n return {\n onClick: func,\n };\n }\n\n return {};\n }\n\n function _handleMouseOut() {\n d3Select(`#${_verticalLine}`).attr('visibility', 'hidden');\n }\n\n function _handleChartMouseLeave() {\n _uniqueCallOutID = null;\n setActivePoint('');\n if (isPopoverOpen) {\n setPopoverOpen(false);\n }\n }\n\n function _handleMultipleLineLegendSelectionAction(selectedLine: LineChartDataWithIndex) {\n const selectedLineIndex = selectedLegendPoints.reduce((acc, line, index) => {\n if (acc > -1 || line.legend !== selectedLine.legend) {\n return acc;\n } else {\n return index;\n }\n }, -1);\n\n let selectedLines: LineChartDataWithIndex[];\n if (selectedLineIndex === -1) {\n selectedLines = [...selectedLegendPoints, selectedLine];\n } else {\n selectedLines = selectedLegendPoints\n .slice(0, selectedLineIndex)\n .concat(selectedLegendPoints.slice(selectedLineIndex + 1));\n }\n\n const areAllLineLegendsSelected = props.data && selectedLines.length === props.data.lineChartData!.length;\n\n if (\n areAllLineLegendsSelected &&\n ((props.colorFillBars && props.colorFillBars.length === selectedColorBarLegend.length) || !props.colorFillBars)\n ) {\n // Clear all legends if all legends including color fill bar legends are selected\n // Or clear all legends if all legends are selected and there are no color fill bars\n _clearMultipleLegendSelections();\n } else if (!selectedLines.length && !selectedColorBarLegend.length) {\n // Clear all legends if no legends including color fill bar legends are selected\n _clearMultipleLegendSelections();\n } else {\n // Otherwise, set state when one or more legends are selected, including color fill bar legends\n setSelectedLegendPoints(selectedLines);\n setIsSelectedLegend(true);\n }\n\n const selectedLegendTitlesToPass = selectedLines.map((line: LineChartDataWithIndex) => line.legend);\n _handleLegendClick(selectedLine, selectedLegendTitlesToPass);\n }\n\n function _handleMultipleColorFillBarLegendSelectionAction(selectedColorFillBar: ColorFillBarsProps) {\n const selectedColorFillBarIndex = selectedColorBarLegend.reduce((acc, colorFillBar, index) => {\n if (acc > -1 || colorFillBar.legend !== selectedColorFillBar.legend) {\n return acc;\n } else {\n return index;\n }\n }, -1);\n\n let selectedColorFillBars: ColorFillBarsProps[];\n if (selectedColorFillBarIndex === -1) {\n selectedColorFillBars = [...selectedColorBarLegend, selectedColorFillBar];\n } else {\n selectedColorFillBars = selectedColorBarLegend\n .slice(0, selectedColorFillBarIndex)\n .concat(selectedColorBarLegend.slice(selectedColorFillBarIndex + 1));\n }\n\n const areAllColorFillBarLegendsSelected =\n selectedColorFillBars.length === (props.colorFillBars && props.colorFillBars!.length);\n\n if (\n areAllColorFillBarLegendsSelected &&\n ((props.data && props.data.lineChartData!.length === selectedLegendPoints.length) || !props.data)\n ) {\n // Clear all legends if all legends, including line legends, are selected\n // Or clear all legends if all legends are selected and there is no line data\n _clearMultipleLegendSelections();\n } else if (!selectedColorFillBars.length && !selectedLegendPoints.length) {\n // Clear all legends if no legends are selected, including line legends\n _clearMultipleLegendSelections();\n } else {\n // set state when one or more legends are selected, including line legends\n setSelectedColorBarLegend(selectedColorFillBars);\n setIsSelectedLegend(true);\n }\n\n const selectedLegendTitlesToPass = selectedColorFillBars.map(\n (colorFillBar: ColorFillBarsProps) => colorFillBar.legend,\n );\n _handleLegendClick(selectedColorFillBar, selectedLegendTitlesToPass);\n }\n\n function _clearMultipleLegendSelections() {\n setSelectedColorBarLegend([]);\n setSelectedLegendPoints([]);\n setIsSelectedLegend(false);\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it*/\n\n function _legendHighlighted(legend: string) {\n return selectedLegend === legend || (selectedLegend === '' && activeLegend === legend);\n }\n\n /**\n * This function checks if none of the legends is selected or hovered.*/\n\n function _noLegendHighlighted() {\n return selectedLegend === '' && activeLegend === '';\n }\n\n function _getColorFillBarOpacity(colorFillBar: ColorFillBarsProps) {\n return colorFillBar.applyPattern ? 1 : 0.4;\n }\n\n function _getAriaLabel(lineIndex: number, pointIndex: number): string {\n const line = _points[lineIndex];\n const point = line.data[pointIndex];\n const formattedDate = point.x instanceof Date ? formatDate(point.x, props.useUTC) : point.x;\n const xValue = point.xAxisCalloutData || formattedDate;\n const legend = line.legend;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n function _isChartEmpty(): boolean {\n return !(\n props.data &&\n props.data.lineChartData &&\n props.data.lineChartData.length > 0 &&\n props.data.lineChartData.filter((item: LineChartPoints) => item.data.length).length > 0\n );\n }\n\n const { legendProps, tickValues, tickFormat, eventAnnotationProps } = props;\n _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n\n const isXAxisDateType = getXAxisType(_points);\n let points = _points;\n if (legendProps && !!legendProps.canSelectMultipleLegends) {\n points = selectedLegendPoints.length >= 1 ? selectedLegendPoints : _points;\n _calloutPoints = calloutData(points);\n }\n\n let legendBars = null;\n // reduce computation cost by only creating legendBars\n // if when hideLegend is false.\n // NOTE: they are rendered only when hideLegend is false in CartesianChart.\n if (!props.hideLegend) {\n legendBars = _createLegends(_points!); // ToDo: Memoize legends to improve performance.\n }\n const calloutProps = {\n YValueHover: YValueHover,\n hoverXValue: hoverXValue,\n descriptionMessage:\n props.getCalloutDescriptionMessage && stackCalloutProps\n ? props.getCalloutDescriptionMessage(stackCalloutProps)\n : undefined,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData: xAxisCalloutAccessibilityData,\n ...props.calloutProps,\n clickPosition: clickPosition,\n isPopoverOpen: isPopoverOpen,\n isCalloutForStack: true,\n culture: props.culture ?? 'en-us',\n isCartesian: true,\n customCallout: {\n customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n };\n const tickParams = {\n tickValues,\n tickFormat,\n };\n\n return !_isChartEmpty() ? (\n <CartesianChart\n {...props}\n chartTitle={props.data.chartTitle}\n points={points}\n chartType={ChartTypes.LineChart}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n getmargins={_getMargins}\n getGraphData={_initializeLineChartData}\n xAxisType={isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\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":["LineChart","PointSize","bisect","bisector","d","x","left","DEFAULT_LINE_STROKE_SIZE","PATH_MULTIPLY_SIZE","_getPointPath","y","w","index","allPointPaths","React","forwardRef","props","forwardedRef","_points","_injectIndexPropertyInLineChartData","data","lineChartData","_calloutPoints","calloutData","_xAxisScale","_yScalePrimary","_circleId","useId","_lineId","_borderId","_verticalLine","_colorFillBarPatternId","_uniqueCallOutID","_refArray","margins","eventLabelHeight","lines","_renderedColorFillBars","_colorFillBars","useRef","_tooltipId","_rectId","_staticHighlightCircle","_firstRenderOptimization","_emptyChartId","_colorFillBarId","_isRTL","useRtl","xAxisCalloutAccessibilityData","cartesianChartRef","_yScaleSecondary","eventAnnotationProps","labelHeight","hoverXValue","setHoverXValue","useState","activeLegend","setActiveLegend","YValueHover","setYValueHover","selectedLegend","setSelectedLegend","selectedLegendPoints","setSelectedLegendPoints","selectedColorBarLegend","setSelectedColorBarLegend","isSelectedLegend","setIsSelectedLegend","legendProps","selectedLegends","length","activePoint","setActivePoint","nearestCircleToHighlight","setNearestCircleToHighlight","dataPointCalloutProps","setDataPointCalloutProps","stackCalloutProps","setStackCalloutProps","clickPosition","setClickPosition","isPopoverOpen","setPopoverOpen","pointsRef","calloutPointsRef","classes","useLineChartStyles","useEffect","current","height","width","useImperativeHandle","componentRef","chartContainer","isFilterSelectedLegends","allowMultipleShapesForPoints","filteredData","filter","item","includes","legend","map","color","getNextColor","getColorFromToken","updatePosition","newX","newY","threshold","distance","Math","sqrt","pow","_getCustomizedCallout","onRenderCalloutPerStack","onRenderCalloutPerDataPoint","_getMargins","_margins","_initializeLineChartData","xScale","yScalePrimary","containerHeight","containerWidth","xElement","yAxisElement","yScaleSecondary","colorFillBars","_createColorFillBars","_createLines","_handleSingleLegendSelectionAction","lineChartItem","_handleLegendClick","_onHoverCardHide","onLegendClick","_createLegends","isLegendMultiSelectEnabled","canSelectMultipleLegends","legendDataItems","point","title","action","_handleMultipleLineLegendSelectionAction","onMouseOutAction","hoverAction","_handleChartMouseLeave","legendShape","shape","Points","Object","keys","pointTypes","colorFillBarsLegendDataItems","colorFillBar","_handleMultipleColorFillBarLegendSelectionAction","opacity","_getColorFillBarOpacity","stripePattern","applyPattern","createElement","Legends","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onLegendHoverCardLeave","_getBoxWidthOfShape","pointId","pointIndex","isLastPoint","strokeWidth","_getPath","xPos","yPos","pointOftheLine","widthRatio","_getPointFill","lineColor","tokens","colorNeutralBackground1","i","linesForLine","bordersForLine","pointsForLine","legendVal","verticaLineHeight","bottom","yScale","useSecondaryYScale","x1","y1","xAxisCalloutData","circleId","isLegendSelected","_legendHighlighted","_noLegendHighlighted","push","circle","id","key","r","cx","cy","fill","tabIndex","undefined","onMouseOver","event","_handleHover","onMouseMove","onMouseOut","_handleMouseOut","stroke","role","aria-label","_getAriaLabel","data-is-focusable","ref","e","_refCallback","onFocus","_handleFocus","onBlur","_getClickHandler","onDataPointClick","gapIndex","gaps","sort","a","b","startIndex","lineCurve","lineOptions","curve","optimizeLargeData","line","d3Line","getCurveFactory","lineId","borderId","lineData","k","Date","getTime","lineBorderWidth","Number","parseFloat","toString","path","strokeLinecap","lineBorderColor","_onMouseOverLargeDataset","bind","onLineClick","visibility","j","gapResult","_checkInGap","isInGap","x2","y2","currentPointHidden","hideNonActiveDots","lastCircleId","hiddenHoverCircleId","lastPointHidden","lastCirlceXCallout","lastCirlceXCalloutAccessibilityData","Fragment","focusable","className","lineBorder","strokeDasharray","strokeDashoffset","g","showXAxisLablesTooltip","document","getElementById","remove","wrapXAxisLables","xAxisElement","d3Select","call","tooltipProps","tooltipCls","tooltip","axis","tooltipOfAxislabels","yMinMaxValues","getMinMaxOfYAxis","ChartTypes","FILL_Y_PADDING","colorFillBarId","_getStripePattern","startX","endX","rect","fillOpacity","endValue","abs","yMinValue","stripePath","pattern","patternUnits","currentGapIndex","endIndex","element","legendTitle","refElement","linenumber","lineHeight","mouseEvent","persist","xOffset","invert","pointer","d0","d1","axisType","xPointToHighlight","getTypeOfAxis","x0","point0","point1","XAxisTypes","DateAxis","NumericAxis","formattedDate","formatDate","useUTC","modifiedXVal","found","find","pointToHighlight","pointToHighlightUpdated","attr","clientX","clientY","values","formattedData","xVal","forEach","obj","func","onClick","selectedLine","selectedLineIndex","reduce","acc","selectedLines","slice","concat","areAllLineLegendsSelected","_clearMultipleLegendSelections","selectedLegendTitlesToPass","selectedColorFillBar","selectedColorFillBarIndex","selectedColorFillBars","areAllColorFillBarLegendsSelected","lineIndex","xValue","yValue","yAxisCalloutData","callOutAccessibilityData","ariaLabel","_isChartEmpty","tickValues","tickFormat","isXAxisDateType","getXAxisType","points","legendBars","hideLegend","calloutProps","descriptionMessage","getCalloutDescriptionMessage","isCalloutForStack","culture","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","CartesianChart","chartTitle","chartType","getmargins","getGraphData","xAxisType","onChartMouseLeave","enableFirstRenderOptimization","enablePerfOptimization","children","EventsAnnotation","scale","chartYTop","top","chartYBottom","div","style","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AI;gBACJqE,IAAI;gBACJC,IAAIpP,MAAMyG,eAAe;gBACzB2F,QAAQ;gBACRd,IAAIxK;gBACJgO,YAAY;gBACZkB,iBAAiB;gBAElBhQ,MAAM0N,iBAAiB,GAAA,WAAA,GACtB5N,OAAAgJ,aAAA,CAAC0I,QAAAA;gBAAKlG,IAAI7J;gBAASiD,OAAO1E,MAAM0G,cAAc;gBAAEjC,QAAQzE,MAAMyG,eAAe;gBAAEkF,MAAM;+BAErF7L,OAAAgJ,aAAA,CAAAhJ,OAAA8P,QAAA,EAAA,OAAA,WAAA,GAEF9P,OAAAgJ,aAAA,CAACoH,KAAAA,MACE7O,wBACAD,QAEFe,wBAAAA,WAAAA,GACCrC,OAAAgJ,aAAA,CAAC4O,iCAAAA,EAAAA;gBACE,GAAGvV,oBAAoB;gBACxBwV,OAAO3X,MAAMuG,MAAM;gBACnBqR,WAAW1W,QAAQ2W,GAAG,GAAI1W;gBAC1B2W,cAAc9X,MAAMyG,eAAe,GAAI;;QAMnD;uBAGF3G,OAAAgJ,aAAA,CAACiP,OAAAA;QAAIzM,IAAI1J;QAAeyK,MAAM;QAAS2L,OAAO;YAAEtP,SAAS;QAAI;QAAG4D,cAAY;;AAEhF;AAEFtN,UAAUiZ,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["LineChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { LineChartProps } from './LineChart.types';\nimport { useLineChartStyles } from './useLineChartStyles.styles';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select, pointer } from 'd3-selection';\nimport { bisector } from 'd3-array';\nimport { Legend, Legends } from '../Legends/index';\nimport { line as d3Line } from 'd3-shape';\nimport { useId } from '@fluentui/react-utilities';\nimport { find } from '../../utilities/index';\nimport {\n AccessibilityProps,\n CartesianChart,\n ChildProps,\n LineChartPoints,\n CustomizedCalloutData,\n Margins,\n RefArrayData,\n ColorFillBarsProps,\n LineChartGap,\n LineChartDataPoint,\n Chart,\n} from '../../index';\nimport { EventsAnnotation } from './eventAnnotation/EventAnnotation';\nimport { tokens } from '@fluentui/react-theme';\nimport {\n calloutData,\n ChartTypes,\n getXAxisType,\n XAxisTypes,\n tooltipOfAxislabels,\n Points,\n pointTypes,\n getTypeOfAxis,\n getNextColor,\n getColorFromToken,\n findNumericMinMaxOfY,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfDateForAreaLineVerticalBarChart,\n domainRangeOfNumericForAreaChart,\n createStringYAxis,\n useRtl,\n formatDate,\n getCurveFactory,\n} from '../../utilities/index';\nimport { ScaleLinear } from 'd3-scale';\n\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\nenum PointSize {\n hoverSize = 11,\n invisibleSize = 1,\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst bisect = bisector((d: any) => d.x).left;\n\nconst DEFAULT_LINE_STROKE_SIZE = 4;\n// The given shape of a icon must be 2.5 times bigger than line width (known as stroke width)\nconst PATH_MULTIPLY_SIZE = 2.5;\n\n/**\n *\n * @param x units from origin\n * @param y units from origin\n * @param w is the legnth of the each side of a shape\n * @param index index to get the shape path\n */\nconst _getPointPath = (x: number, y: number, w: number, index: number): string => {\n const allPointPaths = [\n // circle path\n `M${x - w / 2} ${y}\n A${w / 2} ${w / 2} 0 1 0 ${x + w / 2} ${y}\n M${x - w / 2} ${y}\n A ${w / 2} ${w / 2} 0 1 1 ${x + w / 2} ${y}\n `,\n //square\n `M${x - w / 2} ${y - w / 2}\n L${x + w / 2} ${y - w / 2}\n L${x + w / 2} ${y + w / 2}\n L${x - w / 2} ${y + w / 2}\n Z`,\n //triangle\n `M${x - w / 2} ${y - 0.2886 * w}\n H ${x + w / 2}\n L${x} ${y + 0.5774 * w} Z`,\n //diamond\n `M${x} ${y - w / 2}\n L${x + w / 2} ${y}\n L${x} ${y + w / 2}\n L${x - w / 2} ${y}\n Z`,\n //pyramid\n `M${x} ${y - 0.5774 * w}\n L${x + w / 2} ${y + 0.2886 * w}\n L${x - w / 2} ${y + 0.2886 * w} Z`,\n //hexagon\n `M${x - 0.5 * w} ${y - 0.866 * w}\n L${x + 0.5 * w} ${y - 0.866 * w}\n L${x + w} ${y}\n L${x + 0.5 * w} ${y + 0.866 * w}\n L${x - 0.5 * w} ${y + 0.866 * w}\n L${x - w} ${y}\n Z`,\n //pentagon\n `M${x} ${y - 0.851 * w}\n L${x + 0.6884 * w} ${y - 0.2633 * w}\n L${x + 0.5001 * w} ${y + 0.6884 * w}\n L${x - 0.5001 * w} ${y + 0.6884 * w}\n L${x - 0.6884 * w} ${y - 0.2633 * w}\n Z`,\n //octagon\n `M${x - 0.5001 * w} ${y - 1.207 * w}\n L${x + 0.5001 * w} ${y - 1.207 * w}\n L${x + 1.207 * w} ${y - 0.5001 * w}\n L${x + 1.207 * w} ${y + 0.5001 * w}\n L${x + 0.5001 * w} ${y + 1.207 * w}\n L${x - 0.5001 * w} ${y + 1.207 * w}\n L${x - 1.207 * w} ${y + 0.5001 * w}\n L${x - 1.207 * w} ${y - 0.5001 * w}\n Z`,\n ];\n return allPointPaths[index];\n};\n\ntype LineChartDataWithIndex = LineChartPoints & { index: number };\n\n// Create a LineChart variant which uses these default styles and this styled subcomponent.\n/**\n * Linechart component\n * {@docCategory LineChart}\n */\nexport const LineChart: React.FunctionComponent<LineChartProps> = React.forwardRef<HTMLDivElement, LineChartProps>(\n (props, forwardedRef) => {\n let _points: LineChartDataWithIndex[] = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _calloutPoints: any[] = calloutData(_points) || [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _xAxisScale: any = '';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _yScalePrimary: any = '';\n let _circleId: string = useId('circle');\n let _lineId: string = useId('lineID');\n let _borderId: string = useId('borderID');\n let _verticalLine: string = useId('verticalLine');\n let _colorFillBarPatternId: string = useId('colorFillBarPattern');\n let _uniqueCallOutID: string | null = '';\n let _refArray: RefArrayData[] = [];\n let margins: Margins;\n let eventLabelHeight: number = 36;\n let lines: JSX.Element[];\n let _renderedColorFillBars: JSX.Element[];\n const _colorFillBars = React.useRef<ColorFillBarsProps[]>([]);\n let _tooltipId: string = useId('LineChartTooltipId_');\n let _rectId: string = useId('containerRectLD');\n let _staticHighlightCircle: string = useId('staticHighlightCircle');\n let _firstRenderOptimization = true;\n let _emptyChartId: string = useId('_LineChart_empty');\n const _colorFillBarId = useId('_colorFillBarId');\n const _isRTL: boolean = useRtl();\n let xAxisCalloutAccessibilityData: AccessibilityProps = {};\n const cartesianChartRef = React.useRef<Chart>(null);\n let _yScaleSecondary: ScaleLinear<number, number> | undefined;\n\n props.eventAnnotationProps &&\n props.eventAnnotationProps.labelHeight &&\n (eventLabelHeight = props.eventAnnotationProps.labelHeight);\n\n const [hoverXValue, setHoverXValue] = React.useState<string | number>('');\n const [activeLegend, setActiveLegend] = React.useState<string>('');\n const [YValueHover, setYValueHover] = React.useState<[]>([]);\n const [selectedLegend, setSelectedLegend] = React.useState<string>('');\n const [selectedLegendPoints, setSelectedLegendPoints] = React.useState<any[]>(\n _injectIndexPropertyInLineChartData(props.data.lineChartData, true),\n );\n const [selectedColorBarLegend, setSelectedColorBarLegend] = React.useState<any[]>([]);\n const [isSelectedLegend, setIsSelectedLegend] = React.useState<boolean>(\n (props.legendProps?.selectedLegends?.length ?? 0) > 0,\n );\n const [activePoint, setActivePoint] = React.useState<string>('');\n const [nearestCircleToHighlight, setNearestCircleToHighlight] = React.useState<LineChartDataPoint | null>(null);\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<CustomizedCalloutData>();\n const [stackCalloutProps, setStackCalloutProps] = React.useState<CustomizedCalloutData>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n\n const pointsRef = React.useRef<LineChartDataWithIndex[] | []>([]);\n const calloutPointsRef = React.useRef<any[]>([]);\n const classes = useLineChartStyles(props);\n React.useEffect(() => {\n /** note that height and width are not used to resize or set as dimesions of the chart,\n * fitParentContainer is responisble for setting the height and width or resizing of the svg/chart\n */\n\n if (_points !== _injectIndexPropertyInLineChartData(props.data.lineChartData) || props.data !== _points) {\n pointsRef.current = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n calloutPointsRef.current = calloutData(pointsRef.current);\n }\n }, [props.height, props.width, props.data]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n }),\n [],\n );\n\n function _getDomainNRangeValues(\n points: LineChartPoints[],\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfNumericForAreaChart(points, margins, width, isRTL);\n } else if (xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = domainRangeOfDateForAreaLineVerticalBarChart(\n points,\n margins,\n width,\n isRTL,\n tickValues! as Date[],\n chartType,\n barWidth,\n );\n } else {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n }\n return domainNRangeValue;\n }\n\n function _injectIndexPropertyInLineChartData(\n lineChartData?: LineChartPoints[],\n isFilterSelectedLegends: boolean = false,\n ): LineChartDataWithIndex[] | [] {\n const { allowMultipleShapesForPoints = false } = props;\n // Apply filter only if isPropChange is true\n const filteredData = isFilterSelectedLegends\n ? lineChartData?.filter(\n (item: LineChartPoints) =>\n props.legendProps?.selectedLegends?.includes(item.legend) ||\n props.legendProps?.selectedLegend === item.legend,\n )\n : lineChartData;\n return filteredData\n ? filteredData.map((item: LineChartPoints, index: number) => {\n let color: string;\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0);\n } else {\n color = getColorFromToken(item.color);\n }\n return {\n ...item,\n index: allowMultipleShapesForPoints ? index : -1,\n color,\n };\n })\n : [];\n }\n\n function updatePosition(newX: number, newY: number) {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n function _getCustomizedCallout() {\n return props.onRenderCalloutPerStack\n ? props.onRenderCalloutPerStack(stackCalloutProps)\n : props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps)\n : null;\n }\n\n function _getMargins(_margins: Margins) {\n margins = _margins;\n }\n\n function _initializeLineChartData(\n xScale: NumericAxis,\n yScalePrimary: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n yAxisElement?: SVGElement | null,\n yScaleSecondary?: ScaleLinear<number, number>,\n ) {\n _xAxisScale = xScale;\n _yScalePrimary = yScalePrimary;\n _yScaleSecondary = yScaleSecondary;\n _renderedColorFillBars = props.colorFillBars ? _createColorFillBars(containerHeight) : [];\n lines = _createLines(xElement!, containerHeight!);\n }\n\n function _handleSingleLegendSelectionAction(lineChartItem: LineChartDataWithIndex | ColorFillBarsProps) {\n if (selectedLegend === lineChartItem.legend) {\n setSelectedLegend('');\n _handleLegendClick(lineChartItem, null);\n } else {\n setSelectedLegend(lineChartItem.legend);\n _handleLegendClick(lineChartItem, lineChartItem.legend);\n }\n }\n\n function _onHoverCardHide() {\n setSelectedLegendPoints([]);\n setSelectedColorBarLegend([]);\n setIsSelectedLegend(false);\n }\n\n function _handleLegendClick(\n lineChartItem: LineChartDataWithIndex | ColorFillBarsProps,\n selectedLegend: string | null | string[],\n ): void {\n if (lineChartItem.onLegendClick) {\n lineChartItem.onLegendClick(selectedLegend);\n }\n }\n\n function _createLegends(data: LineChartDataWithIndex[]): JSX.Element {\n const { legendProps, allowMultipleShapesForPoints = false } = props;\n const isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);\n const legendDataItems = data.map((point: LineChartDataWithIndex) => {\n const color: string = point.color!;\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: point.legend!,\n color,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n _handleMultipleLineLegendSelectionAction(point);\n } else {\n _handleSingleLegendSelectionAction(point);\n }\n },\n onMouseOutAction: () => {\n setActiveLegend('');\n },\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(point.legend);\n },\n ...(point.legendShape && {\n shape: point.legendShape,\n }),\n ...(allowMultipleShapesForPoints && {\n shape: Points[point.index % Object.keys(pointTypes).length] as Legend['shape'],\n }),\n };\n return legend;\n });\n\n const colorFillBarsLegendDataItems = props.colorFillBars\n ? props.colorFillBars.map((colorFillBar: ColorFillBarsProps, index: number) => {\n const title = colorFillBar.legend;\n const color = getColorFromToken(colorFillBar.color);\n const legend: Legend = {\n title,\n color,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n _handleMultipleColorFillBarLegendSelectionAction(colorFillBar);\n } else {\n _handleSingleLegendSelectionAction(colorFillBar);\n }\n },\n onMouseOutAction: () => {\n setActiveLegend('');\n },\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(title);\n },\n opacity: _getColorFillBarOpacity(colorFillBar),\n stripePattern: colorFillBar.applyPattern,\n };\n return legend;\n })\n : [];\n\n return (\n <Legends\n legends={[...legendDataItems, ...colorFillBarsLegendDataItems]}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...(isLegendMultiSelectEnabled && { onLegendHoverCardLeave: _onHoverCardHide })}\n {...props.legendProps}\n />\n );\n }\n\n function _getBoxWidthOfShape(pointId: string, pointIndex: number, isLastPoint: boolean) {\n const { allowMultipleShapesForPoints = false, strokeWidth = DEFAULT_LINE_STROKE_SIZE } = props;\n if (allowMultipleShapesForPoints) {\n if (activePoint === pointId) {\n return PointSize.hoverSize;\n } else if (pointIndex === 1 || isLastPoint) {\n return strokeWidth * PATH_MULTIPLY_SIZE;\n } else {\n return PointSize.invisibleSize;\n }\n } else {\n if (activePoint === pointId) {\n return PointSize.hoverSize;\n } else {\n return PointSize.invisibleSize;\n }\n }\n }\n\n function _getPath(\n xPos: number,\n yPos: number,\n pointId: string,\n pointIndex: number,\n isLastPoint: boolean,\n pointOftheLine: number,\n ): string {\n const { allowMultipleShapesForPoints = false } = props;\n let w = _getBoxWidthOfShape(pointId, pointIndex, isLastPoint);\n const index: number = allowMultipleShapesForPoints ? pointOftheLine % Object.keys(pointTypes).length : 0;\n const widthRatio = pointTypes[index].widthRatio;\n w = widthRatio > 1 ? w / widthRatio : w;\n\n return _getPointPath(xPos, yPos, w, index);\n }\n function _getPointFill(lineColor: string, pointId: string, pointIndex: number, isLastPoint: boolean) {\n const { allowMultipleShapesForPoints = false } = props;\n if (allowMultipleShapesForPoints) {\n if (pointIndex === 1 || isLastPoint) {\n if (activePoint === pointId) {\n return tokens.colorNeutralBackground1;\n } else {\n return lineColor;\n }\n } else {\n if (activePoint === pointId) {\n return tokens.colorNeutralBackground1;\n } else {\n return lineColor;\n }\n }\n } else {\n if (activePoint === pointId) {\n return tokens.colorNeutralBackground1;\n } else {\n return lineColor;\n }\n }\n }\n\n function _createLines(xElement: SVGElement, containerHeight: number): JSX.Element[] {\n const lines: JSX.Element[] = [];\n if (isSelectedLegend) {\n _points = selectedLegendPoints;\n } else {\n _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n }\n for (let i = _points.length - 1; i >= 0; i--) {\n const linesForLine: JSX.Element[] = [];\n const bordersForLine: JSX.Element[] = [];\n const pointsForLine: JSX.Element[] = [];\n\n const legendVal: string = _points[i].legend;\n const lineColor: string = _points[i].color!;\n const verticaLineHeight = containerHeight - margins.bottom! + 6;\n const yScale = _points[i].useSecondaryYScale && _yScaleSecondary ? _yScaleSecondary : _yScalePrimary;\n if (_points[i].data.length === 1) {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const {\n x: x1,\n y: y1,\n xAxisCalloutData,\n xAxisCalloutAccessibilityData,\n } = _points[i].data[0] as LineChartDataPoint;\n const circleId = `${_circleId}_${i}`;\n const isLegendSelected: boolean = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n pointsForLine.push(\n <circle\n id={circleId}\n key={circleId}\n r={activePoint === circleId ? 5.5 : 3.5}\n cx={_xAxisScale(x1)}\n cy={yScale(y1)}\n fill={activePoint === circleId ? tokens.colorNeutralBackground1 : lineColor}\n opacity={isLegendSelected ? 1 : 0.1}\n tabIndex={isLegendSelected ? 0 : undefined}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseOut={_handleMouseOut}\n strokeWidth={activePoint === circleId ? DEFAULT_LINE_STROKE_SIZE : 0}\n stroke={activePoint === circleId ? lineColor : ''}\n role=\"img\"\n aria-label={_getAriaLabel(i, 0)}\n data-is-focusable={isLegendSelected}\n ref={(e: SVGCircleElement | null) => {\n _refCallback(e!, circleId);\n }}\n onFocus={() => _handleFocus(circleId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[0].onDataPointClick)}\n />,\n );\n }\n\n let gapIndex = 0;\n const gaps = _points[i].gaps?.sort((a, b) => a.startIndex - b.startIndex) ?? [];\n const lineCurve = _points[i].lineOptions?.curve;\n\n // Use path rendering technique for larger datasets to optimize performance.\n if ((props.optimizeLargeData || lineCurve) && _points[i].data.length > 1) {\n const line = d3Line()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => _xAxisScale(d[0]))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => yScale(d[1]))\n .curve(getCurveFactory(lineCurve));\n\n const lineId = `${_lineId}_${i}`;\n const borderId = `${_borderId}_${i}`;\n const strokeWidth = _points[i].lineOptions?.strokeWidth || props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;\n\n const isLegendSelected: boolean = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n\n const lineData: [number, number][] = [];\n for (let k = 0; k < _points[i].data.length; k++) {\n lineData.push([\n _points[i].data[k].x instanceof Date\n ? (_points[i].data[k].x as Date).getTime()\n : (_points[i].data[k].x as number),\n _points[i].data[k].y,\n ]);\n }\n\n if (isLegendSelected) {\n const lineBorderWidth = _points[i].lineOptions?.lineBorderWidth\n ? Number.parseFloat(_points[i].lineOptions!.lineBorderWidth!.toString())\n : 0;\n if (lineBorderWidth > 0) {\n bordersForLine.push(\n <path\n id={borderId}\n key={borderId}\n d={line(lineData)!}\n fill=\"transparent\"\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeWidth={Number.parseFloat(strokeWidth.toString()) + lineBorderWidth}\n stroke={_points[i].lineOptions?.lineBorderColor || tokens.colorNeutralBackground1}\n opacity={1}\n />,\n );\n }\n\n linesForLine.push(\n <path\n id={lineId}\n key={lineId}\n d={line(lineData)!}\n fill=\"transparent\"\n data-is-focusable={true}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n onMouseMove={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event, yScale)}\n onMouseOver={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event, yScale)}\n onMouseOut={_handleMouseOut}\n {..._getClickHandler(_points[i].onLineClick)}\n opacity={1}\n tabIndex={isLegendSelected ? 0 : undefined}\n />,\n );\n } else {\n linesForLine.push(\n <path\n id={lineId}\n key={lineId}\n d={line(lineData)!}\n fill=\"transparent\"\n data-is-focusable={false}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n opacity={0.1}\n />,\n );\n }\n\n pointsForLine.push(\n <circle\n id={`${_staticHighlightCircle}_${i}`}\n key={`${_staticHighlightCircle}_${i}`}\n r={5.5}\n cx={0}\n cy={0}\n fill={tokens.colorNeutralBackground1}\n strokeWidth={DEFAULT_LINE_STROKE_SIZE}\n stroke={lineColor}\n visibility={'hidden'}\n onMouseMove={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event, yScale)}\n onMouseOver={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event, yScale)}\n onMouseOut={_handleMouseOut}\n />,\n );\n } else if (!props.optimizeLargeData) {\n for (let j = 1; j < _points[i].data.length; j++) {\n const gapResult = _checkInGap(j, gaps, gapIndex);\n const isInGap = gapResult.isInGap;\n gapIndex = gapResult.gapIndex;\n\n const lineId = `${_lineId}_${i}_${j}`;\n const borderId = `${_borderId}_${i}_${j}`;\n const circleId = `${_circleId}_${i}_${j}`;\n const {\n x: x1,\n y: y1,\n xAxisCalloutData,\n xAxisCalloutAccessibilityData,\n } = _points[i].data[j - 1] as LineChartDataPoint;\n const { x: x2, y: y2 } = _points[i].data[j] as LineChartDataPoint;\n let path = _getPath(_xAxisScale(x1), yScale(y1), circleId, j, false, _points[i].index);\n const strokeWidth = _points[i].lineOptions?.strokeWidth || props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;\n\n const isLegendSelected: boolean =\n _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n\n const currentPointHidden = _points[i].hideNonActiveDots && activePoint !== circleId;\n pointsForLine.push(\n <path\n id={circleId}\n key={circleId}\n d={path}\n data-is-focusable={isLegendSelected}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={() => _handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[j - 1].onDataPointClick)}\n opacity={isLegendSelected && !currentPointHidden ? 1 : 0.01}\n fill={_getPointFill(lineColor, circleId, j, false)}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n role=\"img\"\n aria-label={_getAriaLabel(i, j - 1)}\n tabIndex={isLegendSelected ? 0 : undefined}\n />,\n );\n if (j + 1 === _points[i].data.length) {\n // If this is last point of the line segment.\n const lastCircleId = `${circleId}${j}L`;\n const hiddenHoverCircleId = `${circleId}${j}D`;\n const lastPointHidden = _points[i].hideNonActiveDots && activePoint !== lastCircleId;\n path = _getPath(_xAxisScale(x2), yScale(y2), lastCircleId, j, true, _points[i].index);\n const {\n xAxisCalloutData: lastCirlceXCallout,\n xAxisCalloutAccessibilityData: lastCirlceXCalloutAccessibilityData,\n } = _points[i].data[j];\n pointsForLine.push(\n <React.Fragment key={`${lastCircleId}_container`}>\n <path\n id={lastCircleId}\n key={lastCircleId}\n d={path}\n data-is-focusable={isLegendSelected}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={() =>\n _handleFocus(lineId, x2, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData)\n }\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[j].onDataPointClick)}\n opacity={isLegendSelected && !lastPointHidden ? 1 : 0.01}\n fill={_getPointFill(lineColor, lastCircleId, j, true)}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n role=\"img\"\n aria-label={_getAriaLabel(i, j)}\n tabIndex={isLegendSelected ? 0 : undefined}\n />\n {/* Dummy circle acting as magnetic latch for last callout point */}\n <circle\n id={hiddenHoverCircleId}\n key={hiddenHoverCircleId}\n r={8}\n cx={_xAxisScale(x2)}\n cy={yScale(y2)}\n opacity={0}\n width={0}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseOut={_handleMouseOut}\n strokeWidth={0}\n focusable={false}\n onBlur={_handleMouseOut}\n />\n </React.Fragment>,\n );\n /* eslint-enable react/jsx-no-bind */\n }\n\n if (isLegendSelected) {\n // don't draw line if it is in a gap\n if (!isInGap) {\n const lineBorderWidth = _points[i].lineOptions?.lineBorderWidth\n ? Number.parseFloat(_points[i].lineOptions!.lineBorderWidth!.toString())\n : 0;\n if (lineBorderWidth > 0) {\n bordersForLine.push(\n <line\n id={borderId}\n key={borderId}\n x1={_xAxisScale(x1)}\n y1={yScale(y1)}\n x2={_xAxisScale(x2)}\n y2={yScale(y2)}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeWidth={Number.parseFloat(strokeWidth.toString()) + lineBorderWidth}\n {...(_points[i].lineOptions?.lineBorderColor && {\n stroke: _points[i].lineOptions?.lineBorderColor,\n })}\n className={classes.lineBorder}\n opacity={1}\n />,\n );\n }\n\n linesForLine.push(\n <line\n id={lineId}\n key={lineId}\n x1={_xAxisScale(x1)}\n y1={yScale(y1)}\n x2={_xAxisScale(x2)}\n y2={yScale(y2)}\n strokeWidth={strokeWidth}\n ref={(e: SVGLineElement | null) => {\n _refCallback(e!, lineId);\n }}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n yScale,\n )\n }\n onMouseOut={_handleMouseOut}\n stroke={lineColor}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={_points[i].lineOptions?.strokeDasharray}\n strokeDashoffset={_points[i].lineOptions?.strokeDashoffset}\n opacity={1}\n {..._getClickHandler(_points[i].onLineClick)}\n />,\n );\n }\n } else {\n if (!isInGap) {\n linesForLine.push(\n <line\n id={lineId}\n key={lineId}\n x1={_xAxisScale(x1)}\n y1={yScale(y1)}\n x2={_xAxisScale(x2)}\n y2={yScale(y2)}\n strokeWidth={strokeWidth}\n stroke={lineColor}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={_points[i].lineOptions?.strokeDasharray}\n strokeDashoffset={_points[i].lineOptions?.strokeDashoffset}\n opacity={0.1}\n />,\n );\n }\n }\n }\n }\n\n lines.push(\n <g\n key={`line_${i}`}\n role=\"region\"\n aria-label={`${legendVal}, line ${i + 1} of ${_points.length} with ${_points[i].data.length} data points.`}\n >\n {bordersForLine}\n {linesForLine}\n {pointsForLine}\n </g>,\n );\n }\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(_xAxisScale);\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return lines;\n }\n\n function _createColorFillBars(containerHeight: number) {\n const colorFillBars: JSX.Element[] = [];\n if (isSelectedLegend) {\n _colorFillBars.current = selectedColorBarLegend;\n } else {\n _colorFillBars.current = props.colorFillBars!;\n }\n\n const yMinMaxValues = findNumericMinMaxOfY(_points);\n const FILL_Y_PADDING = 3;\n for (let i = 0; i < _colorFillBars.current.length; i++) {\n const colorFillBar = _colorFillBars.current[i];\n const colorFillBarId = `${_colorFillBarId}-${i}`;\n const color = getColorFromToken(colorFillBar.color);\n\n if (colorFillBar.applyPattern) {\n // Using a pattern element because CSS was unable to render diagonal stripes for rect elements\n colorFillBars.push(_getStripePattern(color, i));\n }\n\n for (let j = 0; j < colorFillBar.data.length; j++) {\n const startX = colorFillBar.data[j].startX;\n const endX = colorFillBar.data[j].endX;\n const opacity =\n _legendHighlighted(colorFillBar.legend) || _noLegendHighlighted() || isSelectedLegend\n ? _getColorFillBarOpacity(colorFillBar)\n : 0.1;\n colorFillBars.push(\n <rect\n fill={colorFillBar.applyPattern ? `url(#${_colorFillBarPatternId}_${i})` : color}\n fillOpacity={opacity}\n x={_isRTL ? _xAxisScale(endX) : _xAxisScale(startX)}\n y={_yScalePrimary(yMinMaxValues.endValue) - FILL_Y_PADDING}\n width={Math.abs(_xAxisScale(endX) - _xAxisScale(startX))}\n height={_yScalePrimary(props.yMinValue || 0) - _yScalePrimary(yMinMaxValues.endValue) + FILL_Y_PADDING}\n key={`${colorFillBarId}${j}`}\n />,\n );\n }\n }\n return colorFillBars;\n }\n\n function _getStripePattern(color: string, id: number) {\n // This describes a tile pattern that resembles diagonal stripes\n // For more information: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d\n const stripePath = 'M-4,4 l8,-8 M0,16 l16,-16 M12,20 l8,-8';\n return (\n <pattern\n id={`${_colorFillBarPatternId}_${id}`}\n width={16}\n height={16}\n key={`${_colorFillBarPatternId}_${id}`}\n patternUnits={'userSpaceOnUse'}\n >\n <path d={stripePath} stroke={color} strokeWidth={1.25} />\n </pattern>\n );\n }\n\n function _checkInGap(pointIndex: number, gaps: LineChartGap[], currentGapIndex: number) {\n let gapIndex = currentGapIndex;\n let isInGap = false;\n\n while (gapIndex < gaps.length && pointIndex > gaps[gapIndex].endIndex) {\n gapIndex++;\n }\n\n if (gapIndex < gaps.length && pointIndex > gaps[gapIndex].startIndex && pointIndex <= gaps[gapIndex].endIndex) {\n isInGap = true;\n }\n return { isInGap, gapIndex };\n }\n\n function _refCallback(element: SVGGElement, legendTitle: string): void {\n _refArray.push({ index: legendTitle, refElement: element });\n }\n\n const _onMouseOverLargeDataset = (\n linenumber: number,\n lineHeight: number,\n mouseEvent: React.MouseEvent<SVGRectElement | SVGPathElement | SVGCircleElement>,\n yScale: ScaleLinear<number, number>,\n ) => {\n mouseEvent.persist();\n const { data } = props;\n const { lineChartData } = data;\n\n // This will get the value of the X when mouse is on the chart\n const xOffset = _xAxisScale.invert(pointer(mouseEvent)[0], document.getElementById(_rectId)!);\n const i = bisect(lineChartData![linenumber].data, xOffset);\n const d0 = lineChartData![linenumber].data[i - 1] as LineChartDataPoint;\n const d1 = lineChartData![linenumber].data[i] as LineChartDataPoint;\n let axisType: XAxisTypes | null = null;\n let xPointToHighlight: string | Date | number = 0;\n let index: null | number = null;\n if (d0 === undefined && d1 !== undefined) {\n xPointToHighlight = d1.x;\n index = i;\n } else if (d0 !== undefined && d1 === undefined) {\n xPointToHighlight = d0.x;\n index = i - 1;\n } else {\n axisType = getTypeOfAxis(lineChartData![linenumber].data[0].x, true) as XAxisTypes;\n let x0;\n let point0;\n let point1;\n switch (axisType) {\n case XAxisTypes.DateAxis:\n x0 = new Date(xOffset).getTime();\n point0 = (d0.x as Date).getTime();\n point1 = (d1.x as Date).getTime();\n xPointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n case XAxisTypes.NumericAxis:\n x0 = xOffset as number;\n point0 = d0.x as number;\n point1 = d1.x as number;\n xPointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n default:\n break;\n }\n }\n\n const { xAxisCalloutData } = lineChartData![linenumber].data[index as number];\n const formattedDate =\n xPointToHighlight instanceof Date ? formatDate(xPointToHighlight, props.useUTC) : xPointToHighlight;\n const modifiedXVal = xPointToHighlight instanceof Date ? xPointToHighlight.getTime() : xPointToHighlight;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = find(_calloutPoints, (element: { x: string | number }) => {\n return element.x === modifiedXVal;\n });\n const pointToHighlight: LineChartDataPoint = lineChartData![linenumber].data[index!] as LineChartDataPoint;\n const pointToHighlightUpdated =\n nearestCircleToHighlight === null ||\n (nearestCircleToHighlight !== null &&\n pointToHighlight !== null &&\n (nearestCircleToHighlight.x !== pointToHighlight.x || nearestCircleToHighlight.y !== pointToHighlight.y));\n // if no points need to be called out then don't show vertical line and callout card\n if (found && pointToHighlightUpdated) {\n _uniqueCallOutID = `#${_staticHighlightCircle}_${linenumber}`;\n\n d3Select(`#${_staticHighlightCircle}_${linenumber}`)\n .attr('cx', `${_xAxisScale(pointToHighlight.x)}`)\n .attr('cy', `${yScale(pointToHighlight.y)}`)\n .attr('visibility', 'visibility');\n\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(pointToHighlight.x)}, ${yScale(pointToHighlight.y)})`)\n .attr('visibility', 'visibility')\n .attr('y2', `${lineHeight - 5 - yScale(pointToHighlight.y)}`);\n\n setNearestCircleToHighlight(pointToHighlight);\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setStackCalloutProps(found!);\n setYValueHover(found.values);\n setDataPointCalloutProps(found!);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue(formattedDate);\n setActivePoint('');\n }\n\n if (!found) {\n setPopoverOpen(false);\n setNearestCircleToHighlight(pointToHighlight);\n setActivePoint('');\n }\n };\n\n function _handleFocus(\n lineId: string,\n x: number | Date,\n\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData?: AccessibilityProps,\n ) {\n _uniqueCallOutID = circleId;\n const formattedData = x instanceof Date ? formatDate(x, props.useUTC) : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const found = find(_calloutPoints, (element: { x: string | number }) => element.x === xVal);\n // if no points need to be called out then don't show vertical line and callout card\n\n if (found) {\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(x)}, 0)`)\n .attr('visibility', 'visibility');\n _refArray.forEach((obj: RefArrayData) => {\n if (obj.index === lineId) {\n setPopoverOpen(true);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);\n setYValueHover(found.values);\n setStackCalloutProps(found!);\n setDataPointCalloutProps(found!);\n setActivePoint(circleId);\n }\n });\n } else {\n setActivePoint(circleId);\n }\n }\n\n function _handleHover(\n x: number | Date,\n y: number | Date,\n lineHeight: number,\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData: AccessibilityProps | undefined,\n mouseEvent: React.MouseEvent<SVGElement>,\n yScale: ScaleLinear<number, number>,\n ) {\n mouseEvent?.persist();\n const formattedData = x instanceof Date ? formatDate(x, props.useUTC) : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const found = find(_calloutPoints, (element: { x: string | number }) => element.x === xVal);\n // if no points need to be called out then don't show vertical line and callout card\n\n if (found) {\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(x)}, ${yScale(y)})`)\n .attr('visibility', 'visibility')\n .attr('y2', `${lineHeight - 5 - yScale(y)}`);\n\n if (_uniqueCallOutID !== circleId) {\n _uniqueCallOutID = circleId;\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);\n setYValueHover(found.values);\n setStackCalloutProps(found!);\n setDataPointCalloutProps(found!);\n setActivePoint(circleId);\n setNearestCircleToHighlight(null);\n }\n } else {\n setActivePoint(circleId);\n setNearestCircleToHighlight(null);\n }\n }\n\n /**\n * Screen readers announce an element as clickable if the onClick attribute is set.\n * This function sets the attribute only when a click event handler is provided.*/\n\n function _getClickHandler(func?: () => void): { onClick?: () => void } {\n if (func) {\n return {\n onClick: func,\n };\n }\n\n return {};\n }\n\n function _handleMouseOut() {\n d3Select(`#${_verticalLine}`).attr('visibility', 'hidden');\n }\n\n function _handleChartMouseLeave() {\n _uniqueCallOutID = null;\n setActivePoint('');\n if (isPopoverOpen) {\n setPopoverOpen(false);\n }\n }\n\n function _handleMultipleLineLegendSelectionAction(selectedLine: LineChartDataWithIndex) {\n const selectedLineIndex = selectedLegendPoints.reduce((acc, line, index) => {\n if (acc > -1 || line.legend !== selectedLine.legend) {\n return acc;\n } else {\n return index;\n }\n }, -1);\n\n let selectedLines: LineChartDataWithIndex[];\n if (selectedLineIndex === -1) {\n selectedLines = [...selectedLegendPoints, selectedLine];\n } else {\n selectedLines = selectedLegendPoints\n .slice(0, selectedLineIndex)\n .concat(selectedLegendPoints.slice(selectedLineIndex + 1));\n }\n\n const areAllLineLegendsSelected = props.data && selectedLines.length === props.data.lineChartData!.length;\n\n if (\n areAllLineLegendsSelected &&\n ((props.colorFillBars && props.colorFillBars.length === selectedColorBarLegend.length) || !props.colorFillBars)\n ) {\n // Clear all legends if all legends including color fill bar legends are selected\n // Or clear all legends if all legends are selected and there are no color fill bars\n _clearMultipleLegendSelections();\n } else if (!selectedLines.length && !selectedColorBarLegend.length) {\n // Clear all legends if no legends including color fill bar legends are selected\n _clearMultipleLegendSelections();\n } else {\n // Otherwise, set state when one or more legends are selected, including color fill bar legends\n setSelectedLegendPoints(selectedLines);\n setIsSelectedLegend(true);\n }\n\n const selectedLegendTitlesToPass = selectedLines.map((line: LineChartDataWithIndex) => line.legend);\n _handleLegendClick(selectedLine, selectedLegendTitlesToPass);\n }\n\n function _handleMultipleColorFillBarLegendSelectionAction(selectedColorFillBar: ColorFillBarsProps) {\n const selectedColorFillBarIndex = selectedColorBarLegend.reduce((acc, colorFillBar, index) => {\n if (acc > -1 || colorFillBar.legend !== selectedColorFillBar.legend) {\n return acc;\n } else {\n return index;\n }\n }, -1);\n\n let selectedColorFillBars: ColorFillBarsProps[];\n if (selectedColorFillBarIndex === -1) {\n selectedColorFillBars = [...selectedColorBarLegend, selectedColorFillBar];\n } else {\n selectedColorFillBars = selectedColorBarLegend\n .slice(0, selectedColorFillBarIndex)\n .concat(selectedColorBarLegend.slice(selectedColorFillBarIndex + 1));\n }\n\n const areAllColorFillBarLegendsSelected =\n selectedColorFillBars.length === (props.colorFillBars && props.colorFillBars!.length);\n\n if (\n areAllColorFillBarLegendsSelected &&\n ((props.data && props.data.lineChartData!.length === selectedLegendPoints.length) || !props.data)\n ) {\n // Clear all legends if all legends, including line legends, are selected\n // Or clear all legends if all legends are selected and there is no line data\n _clearMultipleLegendSelections();\n } else if (!selectedColorFillBars.length && !selectedLegendPoints.length) {\n // Clear all legends if no legends are selected, including line legends\n _clearMultipleLegendSelections();\n } else {\n // set state when one or more legends are selected, including line legends\n setSelectedColorBarLegend(selectedColorFillBars);\n setIsSelectedLegend(true);\n }\n\n const selectedLegendTitlesToPass = selectedColorFillBars.map(\n (colorFillBar: ColorFillBarsProps) => colorFillBar.legend,\n );\n _handleLegendClick(selectedColorFillBar, selectedLegendTitlesToPass);\n }\n\n function _clearMultipleLegendSelections() {\n setSelectedColorBarLegend([]);\n setSelectedLegendPoints([]);\n setIsSelectedLegend(false);\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it*/\n\n function _legendHighlighted(legend: string) {\n return selectedLegend === legend || (selectedLegend === '' && activeLegend === legend);\n }\n\n /**\n * This function checks if none of the legends is selected or hovered.*/\n\n function _noLegendHighlighted() {\n return selectedLegend === '' && activeLegend === '';\n }\n\n function _getColorFillBarOpacity(colorFillBar: ColorFillBarsProps) {\n return colorFillBar.applyPattern ? 1 : 0.4;\n }\n\n function _getAriaLabel(lineIndex: number, pointIndex: number): string {\n const line = _points[lineIndex];\n const point = line.data[pointIndex];\n const formattedDate = point.x instanceof Date ? formatDate(point.x, props.useUTC) : point.x;\n const xValue = point.xAxisCalloutData || formattedDate;\n const legend = line.legend;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n function _isChartEmpty(): boolean {\n return !(\n props.data &&\n props.data.lineChartData &&\n props.data.lineChartData.length > 0 &&\n props.data.lineChartData.filter((item: LineChartPoints) => item.data.length).length > 0\n );\n }\n\n const { legendProps, tickValues, tickFormat, eventAnnotationProps } = props;\n _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n\n const isXAxisDateType = getXAxisType(_points);\n let points = _points;\n if (legendProps && !!legendProps.canSelectMultipleLegends) {\n points = selectedLegendPoints.length >= 1 ? selectedLegendPoints : _points;\n _calloutPoints = calloutData(points);\n }\n\n let legendBars = null;\n // reduce computation cost by only creating legendBars\n // if when hideLegend is false.\n // NOTE: they are rendered only when hideLegend is false in CartesianChart.\n if (!props.hideLegend) {\n legendBars = _createLegends(_points!); // ToDo: Memoize legends to improve performance.\n }\n const calloutProps = {\n YValueHover: YValueHover,\n hoverXValue: hoverXValue,\n descriptionMessage:\n props.getCalloutDescriptionMessage && stackCalloutProps\n ? props.getCalloutDescriptionMessage(stackCalloutProps)\n : undefined,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData: xAxisCalloutAccessibilityData,\n ...props.calloutProps,\n clickPosition: clickPosition,\n isPopoverOpen: isPopoverOpen,\n isCalloutForStack: true,\n culture: props.culture ?? 'en-us',\n isCartesian: true,\n customCallout: {\n customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n };\n const tickParams = {\n tickValues,\n tickFormat,\n };\n\n return !_isChartEmpty() ? (\n <CartesianChart\n {...props}\n chartTitle={props.data.chartTitle}\n points={points}\n chartType={ChartTypes.LineChart}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n createYAxis={createNumericYAxis}\n getmargins={_getMargins}\n getMinMaxOfYAxis={findNumericMinMaxOfY}\n getGraphData={_initializeLineChartData}\n xAxisType={isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n getDomainNRangeValues={_getDomainNRangeValues}\n createStringYAxis={createStringYAxis}\n onChartMouseLeave={_handleChartMouseLeave}\n enableFirstRenderOptimization={props.enablePerfOptimization && _firstRenderOptimization}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: ChildProps) => {\n _xAxisScale = props.xScale!;\n _yScalePrimary = props.yScalePrimary!;\n _yScaleSecondary = props.yScaleSecondary;\n return (\n <>\n <g>\n <line\n x1={0}\n y1={0}\n x2={0}\n y2={props.containerHeight}\n stroke={'#323130'}\n id={_verticalLine}\n visibility={'hidden'}\n strokeDasharray={'5,5'}\n />\n {props.optimizeLargeData ? (\n <rect id={_rectId} width={props.containerWidth} height={props.containerHeight} fill={'transparent'} />\n ) : (\n <></>\n )}\n <g>\n {_renderedColorFillBars}\n {lines}\n </g>\n {eventAnnotationProps && (\n <EventsAnnotation\n {...eventAnnotationProps}\n scale={props.xScale!}\n chartYTop={margins.top! + eventLabelHeight}\n chartYBottom={props.containerHeight! - 35}\n />\n )}\n </g>\n </>\n );\n }}\n />\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n },\n);\nLineChart.displayName = 'LineChart';\n"],"names":["LineChart","PointSize","bisect","bisector","d","x","left","DEFAULT_LINE_STROKE_SIZE","PATH_MULTIPLY_SIZE","_getPointPath","y","w","index","allPointPaths","React","forwardRef","props","forwardedRef","_points","_injectIndexPropertyInLineChartData","data","lineChartData","_calloutPoints","calloutData","_xAxisScale","_yScalePrimary","_circleId","useId","_lineId","_borderId","_verticalLine","_colorFillBarPatternId","_uniqueCallOutID","_refArray","margins","eventLabelHeight","lines","_renderedColorFillBars","_colorFillBars","useRef","_tooltipId","_rectId","_staticHighlightCircle","_firstRenderOptimization","_emptyChartId","_colorFillBarId","_isRTL","useRtl","xAxisCalloutAccessibilityData","cartesianChartRef","_yScaleSecondary","eventAnnotationProps","labelHeight","hoverXValue","setHoverXValue","useState","activeLegend","setActiveLegend","YValueHover","setYValueHover","selectedLegend","setSelectedLegend","selectedLegendPoints","setSelectedLegendPoints","selectedColorBarLegend","setSelectedColorBarLegend","isSelectedLegend","setIsSelectedLegend","legendProps","selectedLegends","length","activePoint","setActivePoint","nearestCircleToHighlight","setNearestCircleToHighlight","dataPointCalloutProps","setDataPointCalloutProps","stackCalloutProps","setStackCalloutProps","clickPosition","setClickPosition","isPopoverOpen","setPopoverOpen","pointsRef","calloutPointsRef","classes","useLineChartStyles","useEffect","current","height","width","useImperativeHandle","componentRef","chartContainer","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","barWidth","tickValues","shiftX","domainNRangeValue","XAxisTypes","NumericAxis","domainRangeOfNumericForAreaChart","DateAxis","domainRangeOfDateForAreaLineVerticalBarChart","dStartValue","dEndValue","rStartValue","rEndValue","isFilterSelectedLegends","allowMultipleShapesForPoints","filteredData","filter","item","includes","legend","map","color","getNextColor","getColorFromToken","updatePosition","newX","newY","threshold","distance","Math","sqrt","pow","_getCustomizedCallout","onRenderCalloutPerStack","onRenderCalloutPerDataPoint","_getMargins","_margins","_initializeLineChartData","xScale","yScalePrimary","containerHeight","containerWidth","xElement","yAxisElement","yScaleSecondary","colorFillBars","_createColorFillBars","_createLines","_handleSingleLegendSelectionAction","lineChartItem","_handleLegendClick","_onHoverCardHide","onLegendClick","_createLegends","isLegendMultiSelectEnabled","canSelectMultipleLegends","legendDataItems","point","title","action","_handleMultipleLineLegendSelectionAction","onMouseOutAction","hoverAction","_handleChartMouseLeave","legendShape","shape","Points","Object","keys","pointTypes","colorFillBarsLegendDataItems","colorFillBar","_handleMultipleColorFillBarLegendSelectionAction","opacity","_getColorFillBarOpacity","stripePattern","applyPattern","createElement","Legends","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onLegendHoverCardLeave","_getBoxWidthOfShape","pointId","pointIndex","isLastPoint","strokeWidth","_getPath","xPos","yPos","pointOftheLine","widthRatio","_getPointFill","lineColor","tokens","colorNeutralBackground1","i","linesForLine","bordersForLine","pointsForLine","legendVal","verticaLineHeight","bottom","yScale","useSecondaryYScale","x1","y1","xAxisCalloutData","circleId","isLegendSelected","_legendHighlighted","_noLegendHighlighted","push","circle","id","key","r","cx","cy","fill","tabIndex","undefined","onMouseOver","event","_handleHover","onMouseMove","onMouseOut","_handleMouseOut","stroke","role","aria-label","_getAriaLabel","data-is-focusable","ref","e","_refCallback","onFocus","_handleFocus","onBlur","_getClickHandler","onDataPointClick","gapIndex","gaps","sort","a","b","startIndex","lineCurve","lineOptions","curve","optimizeLargeData","line","d3Line","getCurveFactory","lineId","borderId","lineData","k","Date","getTime","lineBorderWidth","Number","parseFloat","toString","path","strokeLinecap","lineBorderColor","_onMouseOverLargeDataset","bind","onLineClick","visibility","j","gapResult","_checkInGap","isInGap","x2","y2","currentPointHidden","hideNonActiveDots","lastCircleId","hiddenHoverCircleId","lastPointHidden","lastCirlceXCallout","lastCirlceXCalloutAccessibilityData","Fragment","focusable","className","lineBorder","strokeDasharray","strokeDashoffset","g","showXAxisLablesTooltip","document","getElementById","remove","wrapXAxisLables","xAxisElement","d3Select","call","tooltipProps","tooltipCls","tooltip","axis","tooltipOfAxislabels","yMinMaxValues","findNumericMinMaxOfY","FILL_Y_PADDING","colorFillBarId","_getStripePattern","startX","endX","rect","fillOpacity","endValue","abs","yMinValue","stripePath","pattern","patternUnits","currentGapIndex","endIndex","element","legendTitle","refElement","linenumber","lineHeight","mouseEvent","persist","xOffset","invert","pointer","d0","d1","axisType","xPointToHighlight","getTypeOfAxis","x0","point0","point1","formattedDate","formatDate","useUTC","modifiedXVal","found","find","pointToHighlight","pointToHighlightUpdated","attr","clientX","clientY","values","formattedData","xVal","forEach","obj","func","onClick","selectedLine","selectedLineIndex","reduce","acc","selectedLines","slice","concat","areAllLineLegendsSelected","_clearMultipleLegendSelections","selectedLegendTitlesToPass","selectedColorFillBar","selectedColorFillBarIndex","selectedColorFillBars","areAllColorFillBarLegendsSelected","lineIndex","xValue","yValue","yAxisCalloutData","callOutAccessibilityData","ariaLabel","_isChartEmpty","tickFormat","isXAxisDateType","getXAxisType","legendBars","hideLegend","calloutProps","descriptionMessage","getCalloutDescriptionMessage","isCalloutForStack","culture","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","CartesianChart","chartTitle","ChartTypes","createYAxis","createNumericYAxis","getmargins","getMinMaxOfYAxis","getGraphData","getDomainNRangeValues","createStringYAxis","onChartMouseLeave","enableFirstRenderOptimization","enablePerfOptimization","children","EventsAnnotation","scale","chartYTop","top","chartYBottom","div","style","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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JkP,YAAY;gBACZkB,iBAAiB;gBAElBlR,MAAM4O,iBAAiB,GAAA,WAAA,GACtB9O,OAAAkK,aAAA,CAACyI,QAAAA;gBAAKjG,IAAI/K;gBAASiD,OAAO1E,MAAM4H,cAAc;gBAAEnD,QAAQzE,MAAM2H,eAAe;gBAAEkF,MAAM;+BAErF/M,OAAAkK,aAAA,CAAAlK,OAAAgR,QAAA,EAAA,OAAA,WAAA,GAEFhR,OAAAkK,aAAA,CAACoH,KAAAA,MACE/P,wBACAD,QAEFe,wBAAAA,WAAAA,GACCrC,OAAAkK,aAAA,CAAC0O,iCAAAA,EAAAA;gBACE,GAAGvW,oBAAoB;gBACxBwW,OAAO3Y,MAAMyH,MAAM;gBACnBmR,WAAW1X,QAAQ2X,GAAG,GAAI1X;gBAC1B2X,cAAc9Y,MAAM2H,eAAe,GAAI;;QAMnD;uBAGF7H,OAAAkK,aAAA,CAAC+O,OAAAA;QAAIvM,IAAI5K;QAAe2L,MAAM;QAASyL,OAAO;YAAEpP,SAAS;QAAI;QAAG4D,cAAY;;AAEhF;AAEFxO,UAAUia,WAAW,GAAG"}
|
|
@@ -120,6 +120,27 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
120
120
|
setPopoverOpen(true);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
+
function _getNumericMinMaxOfY(points, yAxisType) {
|
|
124
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
125
|
+
const { startValue, endValue } = (0, _index1.findNumericMinMaxOfY)(points, yAxisType);
|
|
126
|
+
let yPadding = 0;
|
|
127
|
+
yPadding = (endValue - startValue) * 0.1;
|
|
128
|
+
return {
|
|
129
|
+
startValue: startValue - yPadding,
|
|
130
|
+
endValue: endValue + yPadding
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
function _getDomainNRangeValues(points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues, shiftX) {
|
|
134
|
+
let domainNRangeValue;
|
|
135
|
+
if (xAxisType === _index1.XAxisTypes.NumericAxis) {
|
|
136
|
+
domainNRangeValue = (0, _index1.domainRangeOfNumericForScatterChart)(points, margins, width, isRTL);
|
|
137
|
+
} else if (xAxisType === _index1.XAxisTypes.DateAxis) {
|
|
138
|
+
domainNRangeValue = (0, _index1.domainRangeOfDateForScatterChart)(points, margins, width, isRTL, tickValues);
|
|
139
|
+
} else {
|
|
140
|
+
domainNRangeValue = (0, _index1.domainRangeOfXStringAxis)(margins, width, isRTL);
|
|
141
|
+
}
|
|
142
|
+
return domainNRangeValue;
|
|
143
|
+
}
|
|
123
144
|
function _getMargins(_margins) {
|
|
124
145
|
margins = _margins;
|
|
125
146
|
}
|
|
@@ -438,6 +459,10 @@ const ScatterChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
438
459
|
getmargins: _getMargins,
|
|
439
460
|
getGraphData: _initializeScatterChartData,
|
|
440
461
|
xAxisType: _xAxisType,
|
|
462
|
+
getMinMaxOfYAxis: _getNumericMinMaxOfY,
|
|
463
|
+
getDomainNRangeValues: _getDomainNRangeValues,
|
|
464
|
+
createYAxis: _index1.createNumericYAxis,
|
|
465
|
+
createStringYAxis: _index1.createStringYAxis,
|
|
441
466
|
onChartMouseLeave: _handleChartMouseLeave,
|
|
442
467
|
enableFirstRenderOptimization: _firstRenderOptimization,
|
|
443
468
|
datasetForXAxisDomain: _xAxisLabels,
|