@fluentui/react-charting 5.6.14 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +73 -1
- package/CHANGELOG.md +40 -2
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/lib/components/AreaChart/AreaChart.base.d.ts +1 -0
- package/lib/components/AreaChart/AreaChart.base.js +10 -5
- package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.base.js +6 -7
- package/lib/components/LineChart/LineChart.base.js.map +1 -1
- package/lib/types/IDataPoint.d.ts +14 -1
- package/lib/types/IDataPoint.js.map +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/lib-amd/components/AreaChart/AreaChart.base.d.ts +1 -0
- package/lib-amd/components/AreaChart/AreaChart.base.js +10 -5
- package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.base.js +6 -7
- package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-amd/types/IDataPoint.d.ts +14 -1
- package/lib-amd/types/IDataPoint.js.map +1 -1
- package/lib-amd/version.js +1 -1
- package/lib-amd/version.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.d.ts +1 -0
- package/lib-commonjs/components/AreaChart/AreaChart.base.js +10 -5
- package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.js +6 -7
- package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-commonjs/types/IDataPoint.d.ts +14 -1
- package/lib-commonjs/types/IDataPoint.js.map +1 -1
- package/lib-commonjs/version.js +1 -1
- package/lib-commonjs/version.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AreaChart.base.js","sourceRoot":"../src/","sources":["components/AreaChart/AreaChart.base.tsx"],"names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ACZ,YAAY,EAAE,aAAa;iBAC5B,CAAC,CAAC;aACJ;QACH,CAAC;QAEO,sCAAc,GAAtB,UAAuB,aAAqB;YAC1C,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,KAAK,KAAK,EAAE;gBACzC,IAAI,CAAC,QAAQ,CAAC;oBACZ,YAAY,EAAE,aAAa;oBAC3B,eAAe,EAAE,IAAI;iBACtB,CAAC,CAAC;aACJ;QACH,CAAC;QAEO,sCAAc,GAAtB,UAAuB,eAAyB;YAC9C,IAAI,CAAC,CAAC,eAAe,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,KAAK,KAAK,EAAE;gBAC9D,IAAI,CAAC,QAAQ,CAAC;oBACZ,YAAY,EAAE,EAAE;oBAChB,eAAe,EAAE,KAAK;oBACtB,gBAAgB,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB;iBACxE,CAAC,CAAC;aACJ;QACH,CAAC;QAiOH,oBAAC;IAAD,CAAC,AA9jBD,CAAmC,KAAK,CAAC,SAAS,GA8jBjD;IA9jBY,sCAAa","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, bisector } from 'd3-array';\nimport { clientPoint } from 'd3-selection';\nimport { select as d3Select } from 'd3-selection';\nimport { area as d3Area, stack as d3Stack, curveMonotoneX as d3CurveBasis, line as d3Line } from 'd3-shape';\nimport { IPalette } from '@fluentui/react/lib/Styling';\nimport { classNamesFunction, find, getId, memoizeFunction } from '@fluentui/react/lib/Utilities';\nimport {\n IAccessibilityProps,\n CartesianChart,\n IChartProps,\n ICustomizedCalloutData,\n IAreaChartProps,\n IBasestate,\n ILineChartDataPoint,\n ILineChartPoints,\n IChildProps,\n IMargins,\n IAreaChartStyleProps,\n IAreaChartStyles,\n} from '../../index';\nimport { warnDeprecations } from '@fluentui/react/lib/Utilities';\nimport {\n calloutData,\n getXAxisType,\n ChartTypes,\n XAxisTypes,\n getTypeOfAxis,\n tooltipOfXAxislabels,\n} from '../../utilities/index';\nimport { ILegend, Legends } from '../Legends/index';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\n\nconst getClassNames = classNamesFunction<IAreaChartStyleProps, IAreaChartStyles>();\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst bisect = bisector((d: any) => d.x).left;\n\nconst COMPONENT_NAME = 'AREA CHART';\n\nenum InterceptVisibility {\n show = 'visibility',\n hide = 'hidden',\n}\n\nexport interface IAreaChartAreaPoint {\n xVal: string | number;\n values: IAreaChartDataSetPoint;\n}\nexport interface IAreaChartDataSetPoint {\n [key: string]: number | string;\n}\nexport interface IDPointType {\n values: { 0: number; 1: number; data: {} };\n xVal: number | Date;\n}\n\nexport interface IAreaChartState extends IBasestate {\n lineXValue: number;\n displayOfLine: InterceptVisibility;\n isCircleClicked: boolean;\n dataPointCalloutProps?: ICustomizedCalloutData;\n stackCalloutProps?: ICustomizedCalloutData;\n nearestCircleToHighlight: number | string | Date | null;\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n}\n\nexport class AreaChartBase extends React.Component<IAreaChartProps, IAreaChartState> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _calloutPoints: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _createSet: (data: IChartProps) => { colors: string[]; stackedInfo: any; calloutPoints: any };\n private _colors: string[];\n private _uniqueIdForGraph: string;\n private _verticalLineId: string;\n private _circleId: string;\n private _uniqueCallOutID: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _stackedData: any;\n private _chart: JSX.Element[];\n private margins: IMargins;\n private _rectId: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _xAxisRectScale: any;\n // determines if the given area chart has multiple stacked bar charts\n private _isMultiStackChart: boolean;\n private _tooltipId: string;\n\n public constructor(props: IAreaChartProps) {\n super(props);\n this._createSet = memoizeFunction((data: IChartProps) => this._createDataSet(data.lineChartData!));\n this.state = {\n activeLegend: '',\n hoverXValue: '',\n isCalloutVisible: false,\n isLegendSelected: false,\n isLegendHovered: false,\n refSelected: null,\n YValueHover: [],\n lineXValue: 0,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n nearestCircleToHighlight: null,\n };\n warnDeprecations(COMPONENT_NAME, props, {\n showYAxisGridLines: 'Dont use this property. Lines are drawn by default',\n });\n this._uniqueIdForGraph = getId('areaChart_');\n this._verticalLineId = getId('verticalLine_');\n this._circleId = getId('circle');\n this._rectId = getId('rectangle');\n this._tooltipId = getId('AreaChartTooltipID');\n }\n\n public render(): JSX.Element {\n const { lineChartData, chartTitle } = this.props.data;\n const { colors, stackedInfo, calloutPoints } = this._createSet(this.props.data);\n this._calloutPoints = calloutPoints;\n const isXAxisDateType = getXAxisType(lineChartData!);\n this._colors = colors;\n this._stackedData = stackedInfo.stackedData;\n const legends: JSX.Element = this._getLegendData(this.props.theme!.palette, lineChartData!);\n\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n\n const calloutProps = {\n target: this.state.refSelected,\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topRightEdge,\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n id: `toolTip${this._uniqueCallOutID}`,\n gapSpace: 15,\n isBeakVisible: false,\n setInitialFocus: true,\n onDismiss: this._closeCallout,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData: this.state.xAxisCalloutAccessibilityData,\n ...this.props.calloutProps,\n };\n return (\n <CartesianChart\n {...this.props}\n chartTitle={chartTitle}\n points={lineChartData!}\n chartType={ChartTypes.AreaChart}\n calloutProps={calloutProps}\n legendBars={legends}\n isCalloutForStack\n xAxisType={isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n tickParams={tickParams}\n maxOfYVal={stackedInfo.maxOfYVal}\n getGraphData={this._getGraphData}\n getmargins={this._getMargins}\n customizedCallout={this._getCustomizedCallout()}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n this._xAxisRectScale = props.xScale;\n const ticks = this._xAxisRectScale.ticks();\n const width1 = this._xAxisRectScale(ticks[ticks.length - 1]);\n const rectHeight = props.containerHeight! - this.margins.top!;\n return (\n <>\n <g>\n <rect\n id={this._rectId}\n width={width1}\n height={rectHeight}\n fill={'transparent'}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n />\n </g>\n <g>{this._chart}</g>\n </>\n );\n }}\n />\n );\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _onRectMouseMove = (mouseEvent: React.MouseEvent<SVGRectElement | SVGPathElement | SVGCircleElement>) => {\n mouseEvent.persist();\n const { data } = this.props;\n const { lineChartData } = data;\n // This will get the value of the X when mouse is on the chart\n const xOffset = this._xAxisRectScale.invert(clientPoint(document.getElementById(this._rectId)!, mouseEvent)[0]);\n const i = bisect(lineChartData![0].data, xOffset);\n const d0 = lineChartData![0].data[i - 1] as ILineChartDataPoint;\n const d1 = lineChartData![0].data[i] as ILineChartDataPoint;\n let axisType: XAxisTypes | null = null;\n let pointToHighlight: string | Date | number | null = null;\n let index: null | number = null;\n if (d0 === undefined && d1 !== undefined) {\n pointToHighlight = d1.x;\n index = i;\n } else if (d0 !== undefined && d1 === undefined) {\n pointToHighlight = d0.x;\n index = i - 1;\n } else {\n axisType = getTypeOfAxis(lineChartData![0].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 pointToHighlight = 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 pointToHighlight = 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, xAxisCalloutAccessibilityData } = lineChartData![0].data[index as number];\n const formattedDate = pointToHighlight instanceof Date ? pointToHighlight.toLocaleString() : pointToHighlight;\n const modifiedXVal = pointToHighlight instanceof Date ? pointToHighlight.getTime() : pointToHighlight;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = find(this._calloutPoints, (element: { x: string | number }) => {\n return element.x === modifiedXVal;\n });\n const nearestCircleToHighlight =\n axisType === XAxisTypes.DateAxis ? (pointToHighlight as Date).getTime() : pointToHighlight;\n // if no points need to be called out then don't show vertical line and callout card\n if (found) {\n this.setState({\n refSelected: mouseEvent,\n isCalloutVisible: true,\n nearestCircleToHighlight: nearestCircleToHighlight,\n lineXValue: this._xAxisRectScale(pointToHighlight),\n displayOfLine: InterceptVisibility.show,\n isCircleClicked: false,\n stackCalloutProps: found!,\n YValueHover: found.values,\n dataPointCalloutProps: found!,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : formattedDate,\n xAxisCalloutAccessibilityData,\n });\n } else {\n this.setState({\n isCalloutVisible: false,\n nearestCircleToHighlight: nearestCircleToHighlight,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n });\n }\n };\n /**\n * just cleaning up the state which we have set in the mouse move event\n */\n private _onRectMouseOut = () => {\n this.setState({\n refSelected: null,\n isCalloutVisible: false,\n nearestCircleToHighlight: null,\n lineXValue: 0,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n stackCalloutProps: undefined,\n dataPointCalloutProps: undefined,\n hoverXValue: undefined,\n YValueHover: [],\n });\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getStackedData = (keys: string[], dataSet: any) => {\n const stackedValues = d3Stack().keys(keys)(dataSet);\n const maxOfYVal = d3Max(stackedValues[stackedValues.length - 1], dp => dp[1])!;\n const stackedData: Array<IAreaChartDataSetPoint[]> = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n stackedValues.forEach((layer: any) => {\n const currentStack: IAreaChartDataSetPoint[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n layer.forEach((d: any) => {\n currentStack.push({\n values: d,\n xVal: d.data.xVal,\n });\n });\n stackedData.push(currentStack);\n });\n this._isMultiStackChart = stackedData && stackedData.length > 1 ? true : false;\n return {\n stackedData,\n maxOfYVal,\n };\n };\n\n private _createDataSet = (points: ILineChartPoints[]) => {\n const allChartPoints: ILineChartDataPoint[] = [];\n const dataSet: IAreaChartDataSetPoint[] = [];\n const colors: string[] = [];\n const calloutPoints = calloutData(points!);\n\n points &&\n points.length &&\n points.forEach((singleChartPoint: ILineChartPoints) => {\n colors.push(singleChartPoint.color);\n allChartPoints.push(...singleChartPoint.data);\n });\n\n let tempArr = allChartPoints;\n while (tempArr.length) {\n const valToCheck = tempArr[0].x instanceof Date ? tempArr[0].x.toLocaleString() : tempArr[0].x;\n const filteredChartPoints: ILineChartDataPoint[] = tempArr.filter(\n (point: ILineChartDataPoint) => (point.x instanceof Date ? point.x.toLocaleString() : point.x) === valToCheck,\n );\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDataset: any = {};\n filteredChartPoints.forEach((singleDataPoint: ILineChartDataPoint, index: number) => {\n singleDataset.xVal = singleDataPoint.x;\n singleDataset[`chart${index}`] = singleDataPoint.y;\n });\n dataSet.push(singleDataset);\n // removing compared objects from array\n const val = tempArr[0].x instanceof Date ? tempArr[0].x.toLocaleString() : tempArr[0].x;\n tempArr = tempArr.filter(\n (point: ILineChartDataPoint) => (point.x instanceof Date ? point.x.toLocaleString() : point.x) !== val,\n );\n }\n\n // get keys from dataset, used to create stacked data\n const keysLength: number = dataSet && Object.keys(dataSet[0])!.length;\n const keys: string[] = [];\n for (let i = 0; i < keysLength - 1; i++) {\n const keyVal = `chart${i}`;\n keys.push(keyVal);\n }\n\n // Stacked Info used to draw graph\n const stackedInfo = this._getStackedData(keys, dataSet);\n\n return {\n colors,\n keys,\n stackedInfo,\n calloutPoints,\n };\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerStack\n ? this.props.onRenderCalloutPerStack(this.state.stackCalloutProps)\n : this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)\n : null;\n };\n\n private _getGraphData = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xAxis: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yAxis: any,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) => {\n this._chart = this._drawGraph(containerHeight, xAxis, yAxis, xElement!);\n };\n\n private _onLegendClick(customMessage: string): void {\n if (this.state.isLegendSelected) {\n if (this.state.activeLegend === customMessage) {\n this.setState({\n isLegendSelected: false,\n activeLegend: '',\n });\n } else {\n this.setState({\n activeLegend: customMessage,\n });\n }\n } else {\n this.setState({\n activeLegend: customMessage,\n });\n }\n }\n\n private _onLegendHover(customMessage: string): void {\n if (this.state.isLegendSelected === false) {\n this.setState({\n activeLegend: customMessage,\n isLegendHovered: true,\n });\n }\n }\n\n private _onLegendLeave(isLegendFocused?: boolean): void {\n if (!!isLegendFocused || this.state.isLegendSelected === false) {\n this.setState({\n activeLegend: '',\n isLegendHovered: false,\n isLegendSelected: isLegendFocused ? false : this.state.isLegendSelected,\n });\n }\n }\n\n private _getLegendData = (palette: IPalette, points: ILineChartPoints[]): JSX.Element => {\n const data = points;\n const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n const actions: ILegend[] = [];\n\n data.forEach((singleChartData: ILineChartPoints) => {\n const color: string = singleChartData.color\n ? singleChartData.color\n : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n const checkSimilarLegends = actions.filter(\n (leg: ILegend) => leg.title === singleChartData.legend && leg.color === color,\n );\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n\n const legend: ILegend = {\n title: singleChartData.legend,\n color: color,\n action: () => {\n this._onLegendClick(singleChartData.legend);\n },\n hoverAction: () => {\n this._onLegendHover(singleChartData.legend);\n },\n onMouseOutAction: (isLegendSelected?: boolean) => {\n this._onLegendLeave(isLegendSelected);\n },\n };\n\n actions.push(legend);\n });\n return (\n <Legends\n legends={actions}\n overflowProps={this.props.legendsOverflowProps}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n {...this.props.legendProps}\n />\n );\n };\n\n private _onDataPointClick = (func: (() => void) | undefined) => {\n if (func) {\n func();\n }\n this.setState({ isCircleClicked: true });\n };\n\n private _getOpacity = (selectedArea: string): number => {\n if (!this._isMultiStackChart) {\n return 0.7;\n } else {\n let opacity = 0.7;\n if (this.state.isLegendHovered || this.state.isLegendSelected) {\n opacity = this.state.activeLegend === selectedArea ? 0.7 : 0.1;\n }\n return opacity;\n }\n };\n\n private _getLineOpacity = (legend: string): number => {\n if (!this._isMultiStackChart) {\n return 1;\n } else {\n let opacity = 0.3;\n if (this.state.isCalloutVisible) {\n opacity = 1;\n }\n if (this.state.isLegendHovered || this.state.isLegendSelected) {\n opacity = this.state.activeLegend === legend ? 0 : 0.1;\n }\n return opacity;\n }\n };\n\n private _updateCircleFillColor = (xDataPoint: number | Date, lineColor: string): string => {\n if (this.state.isCircleClicked && this.state.nearestCircleToHighlight === xDataPoint) {\n return lineColor;\n } else {\n return this.state.nearestCircleToHighlight === xDataPoint ? this.props.theme!.palette.white : lineColor;\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _drawGraph = (containerHeight: number, xScale: any, yScale: any, xElement: SVGElement): JSX.Element[] => {\n const points = this.props.data.lineChartData!;\n const area = d3Area()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => xScale(d.xVal))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y0((d: any) => yScale(d.values[0]))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y1((d: any) => yScale(d.values[1]))\n .curve(d3CurveBasis);\n const line = d3Line()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => xScale(d.xVal))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => yScale(d.values[1]))\n .curve(d3CurveBasis);\n\n const graph: JSX.Element[] = [];\n let lineColor: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._stackedData.forEach((singleStackedData: Array<any>, index: number) => {\n graph.push(\n <React.Fragment key={`${index}-graph-${this._uniqueIdForGraph}`}>\n <path\n id={`${index}-line-${this._uniqueIdForGraph}`}\n d={line(singleStackedData)!}\n fill={'transparent'}\n strokeWidth={3}\n stroke={this._colors[index]}\n opacity={this._getLineOpacity(points[index]!.legend)}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n />\n <path\n id={`${index}-graph-${this._uniqueIdForGraph}`}\n d={area(singleStackedData)!}\n fill={this._colors[index]}\n fillOpacity={this._getOpacity(points[index]!.legend)}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n />\n </React.Fragment>,\n );\n });\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._stackedData.forEach((singleStackedData: Array<any>, index: number) => {\n if (points.length === index) {\n return;\n }\n graph.push(\n <g key={`${index}-dots-${this._uniqueIdForGraph}`} d={area(singleStackedData)!} clipPath=\"url(#clip)\">\n {singleStackedData.map((singlePoint: IDPointType, pointIndex: number) => {\n const circleId = `${this._circleId}_${index * this._stackedData[0].length + pointIndex}`;\n const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal;\n lineColor = points[index]!.color;\n return (\n <circle\n key={circleId}\n id={circleId}\n data-is-focusable={true}\n cx={xScale(singlePoint.xVal)}\n cy={yScale(singlePoint.values[1])}\n r={this._getCircleRadius(xDataPoint)}\n stroke={lineColor}\n strokeWidth={3}\n visibility={this.state.nearestCircleToHighlight ? 'visibility' : 'hidden'}\n fill={this._updateCircleFillColor(xDataPoint, lineColor)}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n onClick={this._onDataPointClick.bind(this, points[index]!.data[pointIndex].onDataPointClick!)}\n />\n );\n })}\n </g>,\n );\n });\n graph.push(\n <line\n id={this._verticalLineId}\n key={this._verticalLineId}\n x1={this.state.lineXValue}\n y1={0}\n x2={this.state.lineXValue}\n y2={containerHeight}\n strokeWidth={1}\n strokeDasharray={5.5}\n stroke={lineColor!}\n opacity={0.5}\n visibility={this.state.displayOfLine}\n />,\n );\n const classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!this.props.showXAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return graph;\n };\n\n private _getCircleRadius = (xDataPoint: number): number => {\n const { isCircleClicked, nearestCircleToHighlight } = this.state;\n if (isCircleClicked && nearestCircleToHighlight === xDataPoint) {\n return 1;\n } else if (nearestCircleToHighlight === xDataPoint) {\n return 8;\n } else {\n return 0;\n }\n };\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n}\n"]}
|
|
1
|
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as d3Max, bisector } from 'd3-array';\nimport { clientPoint } from 'd3-selection';\nimport { select as d3Select } from 'd3-selection';\nimport { area as d3Area, stack as d3Stack, curveMonotoneX as d3CurveBasis, line as d3Line } from 'd3-shape';\nimport { IPalette } from '@fluentui/react/lib/Styling';\nimport { classNamesFunction, find, getId, memoizeFunction } from '@fluentui/react/lib/Utilities';\nimport {\n IAccessibilityProps,\n CartesianChart,\n IChartProps,\n ICustomizedCalloutData,\n IAreaChartProps,\n IBasestate,\n ILineChartDataPoint,\n ILineChartPoints,\n IChildProps,\n IMargins,\n IAreaChartStyleProps,\n IAreaChartStyles,\n} from '../../index';\nimport { warnDeprecations } from '@fluentui/react/lib/Utilities';\nimport {\n calloutData,\n getXAxisType,\n ChartTypes,\n XAxisTypes,\n getTypeOfAxis,\n tooltipOfXAxislabels,\n} from '../../utilities/index';\nimport { ILegend, Legends } from '../Legends/index';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\n\nconst getClassNames = classNamesFunction<IAreaChartStyleProps, IAreaChartStyles>();\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst bisect = bisector((d: any) => d.x).left;\n\nconst COMPONENT_NAME = 'AREA CHART';\n\nenum InterceptVisibility {\n show = 'visibility',\n hide = 'hidden',\n}\n\nexport interface IAreaChartAreaPoint {\n xVal: string | number;\n values: IAreaChartDataSetPoint;\n}\nexport interface IAreaChartDataSetPoint {\n [key: string]: number | string;\n}\nexport interface IDPointType {\n values: { 0: number; 1: number; data: {} };\n xVal: number | Date;\n}\n\nexport interface IAreaChartState extends IBasestate {\n lineXValue: number;\n displayOfLine: InterceptVisibility;\n isCircleClicked: boolean;\n dataPointCalloutProps?: ICustomizedCalloutData;\n stackCalloutProps?: ICustomizedCalloutData;\n nearestCircleToHighlight: number | string | Date | null;\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n}\n\nexport class AreaChartBase extends React.Component<IAreaChartProps, IAreaChartState> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _calloutPoints: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _createSet: (\n data: IChartProps,\n ) => {\n colors: string[];\n opacity: number[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n stackedInfo: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n calloutPoints: any;\n };\n private _colors: string[];\n private _opacity: number[];\n private _uniqueIdForGraph: string;\n private _verticalLineId: string;\n private _circleId: string;\n private _uniqueCallOutID: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _stackedData: any;\n private _chart: JSX.Element[];\n private margins: IMargins;\n private _rectId: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _xAxisRectScale: any;\n // determines if the given area chart has multiple stacked bar charts\n private _isMultiStackChart: boolean;\n private _tooltipId: string;\n\n public constructor(props: IAreaChartProps) {\n super(props);\n this._createSet = memoizeFunction((data: IChartProps) => this._createDataSet(data.lineChartData!));\n this.state = {\n activeLegend: '',\n hoverXValue: '',\n isCalloutVisible: false,\n isLegendSelected: false,\n isLegendHovered: false,\n refSelected: null,\n YValueHover: [],\n lineXValue: 0,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n nearestCircleToHighlight: null,\n };\n warnDeprecations(COMPONENT_NAME, props, {\n showYAxisGridLines: 'Dont use this property. Lines are drawn by default',\n });\n this._uniqueIdForGraph = getId('areaChart_');\n this._verticalLineId = getId('verticalLine_');\n this._circleId = getId('circle');\n this._rectId = getId('rectangle');\n this._tooltipId = getId('AreaChartTooltipID');\n }\n\n public render(): JSX.Element {\n const { lineChartData, chartTitle } = this.props.data;\n const { colors, opacity, stackedInfo, calloutPoints } = this._createSet(this.props.data);\n this._calloutPoints = calloutPoints;\n const isXAxisDateType = getXAxisType(lineChartData!);\n this._colors = colors;\n this._opacity = opacity;\n this._stackedData = stackedInfo.stackedData;\n const legends: JSX.Element = this._getLegendData(this.props.theme!.palette, lineChartData!);\n\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n\n const calloutProps = {\n target: this.state.refSelected,\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topRightEdge,\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n id: `toolTip${this._uniqueCallOutID}`,\n gapSpace: 15,\n isBeakVisible: false,\n setInitialFocus: true,\n onDismiss: this._closeCallout,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData: this.state.xAxisCalloutAccessibilityData,\n ...this.props.calloutProps,\n };\n return (\n <CartesianChart\n {...this.props}\n chartTitle={chartTitle}\n points={lineChartData!}\n chartType={ChartTypes.AreaChart}\n calloutProps={calloutProps}\n legendBars={legends}\n isCalloutForStack\n xAxisType={isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n tickParams={tickParams}\n maxOfYVal={stackedInfo.maxOfYVal}\n getGraphData={this._getGraphData}\n getmargins={this._getMargins}\n customizedCallout={this._getCustomizedCallout()}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n this._xAxisRectScale = props.xScale;\n const ticks = this._xAxisRectScale.ticks();\n const width1 = this._xAxisRectScale(ticks[ticks.length - 1]);\n const rectHeight = props.containerHeight! - this.margins.top!;\n return (\n <>\n <g>\n <rect\n id={this._rectId}\n width={width1}\n height={rectHeight}\n fill={'transparent'}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n />\n </g>\n <g>{this._chart}</g>\n </>\n );\n }}\n />\n );\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _onRectMouseMove = (mouseEvent: React.MouseEvent<SVGRectElement | SVGPathElement | SVGCircleElement>) => {\n mouseEvent.persist();\n const { data } = this.props;\n const { lineChartData } = data;\n // This will get the value of the X when mouse is on the chart\n const xOffset = this._xAxisRectScale.invert(clientPoint(document.getElementById(this._rectId)!, mouseEvent)[0]);\n const i = bisect(lineChartData![0].data, xOffset);\n const d0 = lineChartData![0].data[i - 1] as ILineChartDataPoint;\n const d1 = lineChartData![0].data[i] as ILineChartDataPoint;\n let axisType: XAxisTypes | null = null;\n let pointToHighlight: string | Date | number | null = null;\n let index: null | number = null;\n if (d0 === undefined && d1 !== undefined) {\n pointToHighlight = d1.x;\n index = i;\n } else if (d0 !== undefined && d1 === undefined) {\n pointToHighlight = d0.x;\n index = i - 1;\n } else {\n axisType = getTypeOfAxis(lineChartData![0].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 pointToHighlight = 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 pointToHighlight = 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, xAxisCalloutAccessibilityData } = lineChartData![0].data[index as number];\n const formattedDate = pointToHighlight instanceof Date ? pointToHighlight.toLocaleString() : pointToHighlight;\n const modifiedXVal = pointToHighlight instanceof Date ? pointToHighlight.getTime() : pointToHighlight;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = find(this._calloutPoints, (element: { x: string | number }) => {\n return element.x === modifiedXVal;\n });\n const nearestCircleToHighlight =\n axisType === XAxisTypes.DateAxis ? (pointToHighlight as Date).getTime() : pointToHighlight;\n // if no points need to be called out then don't show vertical line and callout card\n if (found) {\n this.setState({\n refSelected: mouseEvent,\n isCalloutVisible: true,\n nearestCircleToHighlight: nearestCircleToHighlight,\n lineXValue: this._xAxisRectScale(pointToHighlight),\n displayOfLine: InterceptVisibility.show,\n isCircleClicked: false,\n stackCalloutProps: found!,\n YValueHover: found.values,\n dataPointCalloutProps: found!,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : formattedDate,\n xAxisCalloutAccessibilityData,\n });\n } else {\n this.setState({\n isCalloutVisible: false,\n nearestCircleToHighlight: nearestCircleToHighlight,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n });\n }\n };\n /**\n * just cleaning up the state which we have set in the mouse move event\n */\n private _onRectMouseOut = () => {\n this.setState({\n refSelected: null,\n isCalloutVisible: false,\n nearestCircleToHighlight: null,\n lineXValue: 0,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n stackCalloutProps: undefined,\n dataPointCalloutProps: undefined,\n hoverXValue: undefined,\n YValueHover: [],\n });\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getStackedData = (keys: string[], dataSet: any) => {\n const stackedValues = d3Stack().keys(keys)(dataSet);\n const maxOfYVal = d3Max(stackedValues[stackedValues.length - 1], dp => dp[1])!;\n const stackedData: Array<IAreaChartDataSetPoint[]> = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n stackedValues.forEach((layer: any) => {\n const currentStack: IAreaChartDataSetPoint[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n layer.forEach((d: any) => {\n currentStack.push({\n values: d,\n xVal: d.data.xVal,\n });\n });\n stackedData.push(currentStack);\n });\n this._isMultiStackChart = stackedData && stackedData.length > 1 ? true : false;\n return {\n stackedData,\n maxOfYVal,\n };\n };\n\n private _createDataSet = (points: ILineChartPoints[]) => {\n const allChartPoints: ILineChartDataPoint[] = [];\n const dataSet: IAreaChartDataSetPoint[] = [];\n const colors: string[] = [];\n const opacity: number[] = [];\n const calloutPoints = calloutData(points!);\n\n points &&\n points.length &&\n points.forEach((singleChartPoint: ILineChartPoints) => {\n colors.push(singleChartPoint.color);\n opacity.push(singleChartPoint.opacity || 1);\n allChartPoints.push(...singleChartPoint.data);\n });\n\n let tempArr = allChartPoints;\n while (tempArr.length) {\n const valToCheck = tempArr[0].x instanceof Date ? tempArr[0].x.toLocaleString() : tempArr[0].x;\n const filteredChartPoints: ILineChartDataPoint[] = tempArr.filter(\n (point: ILineChartDataPoint) => (point.x instanceof Date ? point.x.toLocaleString() : point.x) === valToCheck,\n );\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDataset: any = {};\n filteredChartPoints.forEach((singleDataPoint: ILineChartDataPoint, index: number) => {\n singleDataset.xVal = singleDataPoint.x;\n singleDataset[`chart${index}`] = singleDataPoint.y;\n });\n dataSet.push(singleDataset);\n // removing compared objects from array\n const val = tempArr[0].x instanceof Date ? tempArr[0].x.toLocaleString() : tempArr[0].x;\n tempArr = tempArr.filter(\n (point: ILineChartDataPoint) => (point.x instanceof Date ? point.x.toLocaleString() : point.x) !== val,\n );\n }\n\n // get keys from dataset, used to create stacked data\n const keysLength: number = dataSet && Object.keys(dataSet[0])!.length;\n const keys: string[] = [];\n for (let i = 0; i < keysLength - 1; i++) {\n const keyVal = `chart${i}`;\n keys.push(keyVal);\n }\n\n // Stacked Info used to draw graph\n const stackedInfo = this._getStackedData(keys, dataSet);\n\n return {\n colors,\n opacity,\n keys,\n stackedInfo,\n calloutPoints,\n };\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerStack\n ? this.props.onRenderCalloutPerStack(this.state.stackCalloutProps)\n : this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)\n : null;\n };\n\n private _getGraphData = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xAxis: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yAxis: any,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) => {\n this._chart = this._drawGraph(containerHeight, xAxis, yAxis, xElement!);\n };\n\n private _onLegendClick(customMessage: string): void {\n if (this.state.isLegendSelected) {\n if (this.state.activeLegend === customMessage) {\n this.setState({\n isLegendSelected: false,\n activeLegend: '',\n });\n } else {\n this.setState({\n activeLegend: customMessage,\n });\n }\n } else {\n this.setState({\n activeLegend: customMessage,\n });\n }\n }\n\n private _onLegendHover(customMessage: string): void {\n if (this.state.isLegendSelected === false) {\n this.setState({\n activeLegend: customMessage,\n isLegendHovered: true,\n });\n }\n }\n\n private _onLegendLeave(isLegendFocused?: boolean): void {\n if (!!isLegendFocused || this.state.isLegendSelected === false) {\n this.setState({\n activeLegend: '',\n isLegendHovered: false,\n isLegendSelected: isLegendFocused ? false : this.state.isLegendSelected,\n });\n }\n }\n\n private _getLegendData = (palette: IPalette, points: ILineChartPoints[]): JSX.Element => {\n const data = points;\n const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n const actions: ILegend[] = [];\n\n data.forEach((singleChartData: ILineChartPoints) => {\n const color: string = singleChartData.color\n ? singleChartData.color\n : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n const checkSimilarLegends = actions.filter(\n (leg: ILegend) => leg.title === singleChartData.legend && leg.color === color,\n );\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n\n const legend: ILegend = {\n title: singleChartData.legend,\n color: color,\n action: () => {\n this._onLegendClick(singleChartData.legend);\n },\n hoverAction: () => {\n this._onLegendHover(singleChartData.legend);\n },\n onMouseOutAction: (isLegendSelected?: boolean) => {\n this._onLegendLeave(isLegendSelected);\n },\n };\n\n actions.push(legend);\n });\n return (\n <Legends\n legends={actions}\n overflowProps={this.props.legendsOverflowProps}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n {...this.props.legendProps}\n />\n );\n };\n\n private _onDataPointClick = (func: (() => void) | undefined) => {\n if (func) {\n func();\n }\n this.setState({ isCircleClicked: true });\n };\n\n private _getOpacity = (selectedArea: string): number => {\n if (!this._isMultiStackChart) {\n return 0.7;\n } else {\n let opacity = 0.7;\n if (this.state.isLegendHovered || this.state.isLegendSelected) {\n opacity = this.state.activeLegend === selectedArea ? 0.7 : 0.1;\n }\n return opacity;\n }\n };\n\n private _getLineOpacity = (legend: string): number => {\n if (!this._isMultiStackChart) {\n return 1;\n } else {\n let opacity = 0.3;\n if (this.state.isCalloutVisible) {\n opacity = 1;\n }\n if (this.state.isLegendHovered || this.state.isLegendSelected) {\n opacity = this.state.activeLegend === legend ? 0 : 0.1;\n }\n return opacity;\n }\n };\n\n private _updateCircleFillColor = (xDataPoint: number | Date, lineColor: string): string => {\n if (this.state.isCircleClicked && this.state.nearestCircleToHighlight === xDataPoint) {\n return lineColor;\n } else {\n return this.state.nearestCircleToHighlight === xDataPoint ? this.props.theme!.palette.white : lineColor;\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _drawGraph = (containerHeight: number, xScale: any, yScale: any, xElement: SVGElement): JSX.Element[] => {\n const points = this.props.data.lineChartData!;\n const { pointOptions, pointLineOptions } = this.props.data;\n const area = d3Area()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => xScale(d.xVal))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y0((d: any) => yScale(d.values[0]))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y1((d: any) => yScale(d.values[1]))\n .curve(d3CurveBasis);\n const line = d3Line()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => xScale(d.xVal))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => yScale(d.values[1]))\n .curve(d3CurveBasis);\n\n const graph: JSX.Element[] = [];\n let lineColor: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._stackedData.forEach((singleStackedData: Array<any>, index: number) => {\n graph.push(\n <React.Fragment key={`${index}-graph-${this._uniqueIdForGraph}`}>\n <path\n id={`${index}-line-${this._uniqueIdForGraph}`}\n d={line(singleStackedData)!}\n fill={'transparent'}\n strokeWidth={3}\n stroke={this._colors[index]}\n opacity={this._getLineOpacity(points[index]!.legend)}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n {...points[index]!.lineOptions}\n />\n <path\n id={`${index}-graph-${this._uniqueIdForGraph}`}\n d={area(singleStackedData)!}\n fill={this._colors[index]}\n opacity={this._opacity[index]}\n fillOpacity={this._getOpacity(points[index]!.legend)}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n />\n </React.Fragment>,\n );\n });\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._stackedData.forEach((singleStackedData: Array<any>, index: number) => {\n if (points.length === index) {\n return;\n }\n graph.push(\n <g key={`${index}-dots-${this._uniqueIdForGraph}`} d={area(singleStackedData)!} clipPath=\"url(#clip)\">\n {singleStackedData.map((singlePoint: IDPointType, pointIndex: number) => {\n const circleId = `${this._circleId}_${index * this._stackedData[0].length + pointIndex}`;\n const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal;\n lineColor = points[index]!.color;\n return (\n <circle\n key={circleId}\n id={circleId}\n data-is-focusable={true}\n cx={xScale(singlePoint.xVal)}\n cy={yScale(singlePoint.values[1])}\n r={this._getCircleRadius(xDataPoint)}\n stroke={lineColor}\n strokeWidth={3}\n visibility={this.state.nearestCircleToHighlight ? 'visibility' : 'hidden'}\n fill={this._updateCircleFillColor(xDataPoint, lineColor)}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n onClick={this._onDataPointClick.bind(this, points[index]!.data[pointIndex].onDataPointClick!)}\n {...pointOptions}\n />\n );\n })}\n </g>,\n );\n });\n graph.push(\n <line\n id={this._verticalLineId}\n key={this._verticalLineId}\n x1={this.state.lineXValue}\n y1={0}\n x2={this.state.lineXValue}\n y2={containerHeight}\n strokeWidth={1}\n strokeDasharray={5.5}\n stroke={lineColor!}\n opacity={0.5}\n visibility={this.state.displayOfLine}\n {...pointLineOptions}\n />,\n );\n const classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!this.props.showXAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return graph;\n };\n\n private _getCircleRadius = (xDataPoint: number): number => {\n const { isCircleClicked, nearestCircleToHighlight } = this.state;\n if (isCircleClicked && nearestCircleToHighlight === xDataPoint) {\n return 1;\n } else if (nearestCircleToHighlight === xDataPoint) {\n return 8;\n } else {\n return 0;\n }\n };\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n}\n"]}
|
|
@@ -503,7 +503,6 @@ define(["require", "exports", "tslib", "react", "d3-selection", "../Legends/inde
|
|
|
503
503
|
var _this_1 = this;
|
|
504
504
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
505
505
|
var lines = [];
|
|
506
|
-
var points = [];
|
|
507
506
|
if (this.state.isSelectedLegend) {
|
|
508
507
|
this._points = this.state.selectedLegendPoints;
|
|
509
508
|
}
|
|
@@ -537,15 +536,16 @@ define(["require", "exports", "tslib", "react", "d3-selection", "../Legends/inde
|
|
|
537
536
|
var path = this_1._getPath(this_1._xAxisScale(x1), this_1._yAxisScale(y1), circleId, j, false, this_1._points[i].index);
|
|
538
537
|
var strokeWidth = ((_c = this_1._points[i].lineOptions) === null || _c === void 0 ? void 0 : _c.strokeWidth) || this_1.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
|
|
539
538
|
var isLegendSelected = this_1.state.activeLegend === legendVal || this_1.state.activeLegend === '' || this_1.state.isSelectedLegend;
|
|
540
|
-
var
|
|
541
|
-
pointsForLine.push(React.createElement("path", { id: circleId, key: circleId, d: path, "data-is-focusable": i === 0 ? true : false, onMouseOver: this_1._handleHover.bind(this_1, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData), onMouseMove: this_1._handleHover.bind(this_1, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData), onMouseOut: this_1._handleMouseOut, onFocus: function () { return _this_1._handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData); }, onBlur: this_1._handleMouseOut, onClick: this_1._onDataPointClick.bind(this_1, this_1._points[i].data[j - 1].onDataPointClick),
|
|
539
|
+
var currentPointHidden = this_1._points[i].hideNonActiveDots && activePoint !== circleId;
|
|
540
|
+
pointsForLine.push(React.createElement("path", { id: circleId, key: circleId, d: path, "data-is-focusable": i === 0 ? true : false, onMouseOver: this_1._handleHover.bind(this_1, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData), onMouseMove: this_1._handleHover.bind(this_1, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData), onMouseOut: this_1._handleMouseOut, onFocus: function () { return _this_1._handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData); }, onBlur: this_1._handleMouseOut, onClick: this_1._onDataPointClick.bind(this_1, this_1._points[i].data[j - 1].onDataPointClick), opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01, fill: this_1._getPointFill(lineColor, circleId, j, false), stroke: lineColor, strokeWidth: 2 }));
|
|
542
541
|
if (j + 1 === this_1._points[i].data.length) {
|
|
543
542
|
var lastCircleId_1 = "" + circleId + j + "L";
|
|
543
|
+
var lastPointHidden = this_1._points[i].hideNonActiveDots && activePoint !== lastCircleId_1;
|
|
544
544
|
path = this_1._getPath(this_1._xAxisScale(x2), this_1._yAxisScale(y2), lastCircleId_1, j, true, this_1._points[i].index);
|
|
545
545
|
var _u = this_1._points[i].data[j], lastCirlceXCallout_1 = _u.xAxisCalloutData, lastCirlceXCalloutAccessibilityData_1 = _u.xAxisCalloutAccessibilityData;
|
|
546
546
|
pointsForLine.push(React.createElement("path", { id: lastCircleId_1, key: lastCircleId_1, d: path, "data-is-focusable": i === 0 ? true : false, onMouseOver: this_1._handleHover.bind(this_1, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1), onMouseMove: this_1._handleHover.bind(this_1, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1), onMouseOut: this_1._handleMouseOut, onFocus: function () {
|
|
547
547
|
return _this_1._handleFocus(lineId, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1);
|
|
548
|
-
}, onBlur: this_1._handleMouseOut, onClick: this_1._onDataPointClick.bind(this_1, this_1._points[i].data[j].onDataPointClick),
|
|
548
|
+
}, onBlur: this_1._handleMouseOut, onClick: this_1._onDataPointClick.bind(this_1, this_1._points[i].data[j].onDataPointClick), opacity: isLegendSelected && !lastPointHidden ? 1 : 0.01, fill: this_1._getPointFill(lineColor, lastCircleId_1, j, true), stroke: lineColor, strokeWidth: 2 }));
|
|
549
549
|
/* eslint-enable react/jsx-no-bind */
|
|
550
550
|
}
|
|
551
551
|
if (isLegendSelected) {
|
|
@@ -572,8 +572,7 @@ define(["require", "exports", "tslib", "react", "d3-selection", "../Legends/inde
|
|
|
572
572
|
for (var j = 1; j < this._points[i].data.length; j++) {
|
|
573
573
|
_loop_1(j);
|
|
574
574
|
}
|
|
575
|
-
lines.push.apply(lines, tslib_1.__spreadArray(tslib_1.__spreadArray([], bordersForLine), linesForLine));
|
|
576
|
-
points.push.apply(points, pointsForLine);
|
|
575
|
+
lines.push.apply(lines, tslib_1.__spreadArray(tslib_1.__spreadArray(tslib_1.__spreadArray([], bordersForLine), linesForLine), pointsForLine));
|
|
577
576
|
}
|
|
578
577
|
var classNames = getClassNames(this.props.styles, {
|
|
579
578
|
theme: this.props.theme,
|
|
@@ -601,7 +600,7 @@ define(["require", "exports", "tslib", "react", "d3-selection", "../Legends/inde
|
|
|
601
600
|
};
|
|
602
601
|
xAxisElement && index_3.tooltipOfXAxislabels(tooltipProps);
|
|
603
602
|
}
|
|
604
|
-
return lines
|
|
603
|
+
return lines;
|
|
605
604
|
};
|
|
606
605
|
LineChartBase.prototype._refCallback = function (element, legendTitle) {
|
|
607
606
|
this._refArray.push({ index: legendTitle, refElement: element });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineChart.base.js","sourceRoot":"../src/","sources":["components/LineChart/LineChart.base.tsx"],"names":[],"mappings":";;;;IAiCA,IAAM,aAAa,GAAG,8BAAkB,EAA0C,CAAC;IAEnF,IAAK,SAGJ;IAHD,WAAK,SAAS;QACZ,oDAAc,CAAA;QACd,2DAAiB,CAAA;IACnB,CAAC,EAHI,SAAS,KAAT,SAAS,QAGb;IAED,IAAM,wBAAwB,GAAG,CAAC,CAAC;IACnC,6FAA6F;IAC7F,IAAM,kBAAkB,GAAG,GAAG,CAAC;IAE/B;;;;;;OAMG;IACH,IAAM,aAAa,GAAG,UAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,KAAa;QACnE,IAAM,aAAa,GAAG;YACpB,cAAc;YACd,OAAI,CAAC,GAAG,CAAC,GAAG,CAAC,UAAI,CAAC,gBACd,CAAC,GAAG,CAAC,SAAI,CAAC,GAAG,CAAC,gBAAU,CAAC,GAAG,CAAC,GAAG,CAAC,UAAI,CAAC,iBACtC,CAAC,GAAG,CAAC,GAAG,CAAC,UAAI,CAAC,iBACb,CAAC,GAAG,CAAC,SAAI,CAAC,GAAG,CAAC,gBAAU,CAAC,GAAG,CAAC,GAAG,CAAC,UAAI,CAAC,YACzC;YACF,QAAQ;YACR,OAAI,C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CAAC,IAAI,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAE,CAAC,MAAM,EAAE,CAAC;oBAC/F,oCAAoC;iBACrC;gBAAC,OAAO,CAAC,EAAE,GAAE;aACf;YACD,4CAA4C;YAC5C,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,IAAI,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAAE;gBACpE,IAAM,YAAY,GAAG,qBAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC/D,IAAI;oBACF,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAE,CAAC,MAAM,EAAE,CAAC;oBAC/F,oCAAoC;iBACrC;gBAAC,OAAO,CAAC,EAAE,GAAE;gBACd,IAAM,YAAY,GAAG;oBACnB,UAAU,EAAE,UAAU,CAAC,OAAQ;oBAC/B,EAAE,EAAE,IAAI,CAAC,UAAU;oBACnB,KAAK,EAAE,YAAY;iBACpB,CAAC;gBACF,YAAY,IAAI,4BAAoB,CAAC,YAAY,CAAC,CAAC;aACpD;YACD,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC9B,CAAC;QA0EO,oCAAY,GAApB,UAAqB,OAAoB,EAAE,WAAmB;YAC5D,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;QACnE,CAAC;QA0MH,oBAAC;IAAD,CAAC,AAh2BD,CAAmC,KAAK,CAAC,SAAS,GAg2BjD;IAh2BY,sCAAa","sourcesContent":["import * as React from 'react';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select } from 'd3-selection';\nimport { ILegend, Legends } from '../Legends/index';\nimport { classNamesFunction, getId, find } from '@fluentui/react/lib/Utilities';\nimport {\n IAccessibilityProps,\n CartesianChart,\n IBasestate,\n IChildProps,\n ILineChartProps,\n ILineChartPoints,\n ICustomizedCalloutData,\n IMargins,\n IRefArrayData,\n IColorFillBarsProps,\n ILineChartStyleProps,\n ILineChartStyles,\n ILineChartGap,\n} from '../../index';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { EventsAnnotation } from './eventAnnotation/EventAnnotation';\nimport {\n calloutData,\n ChartTypes,\n getXAxisType,\n XAxisTypes,\n tooltipOfXAxislabels,\n Points,\n pointTypes,\n} from '../../utilities/index';\n\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\nconst getClassNames = classNamesFunction<ILineChartStyleProps, ILineChartStyles>();\n\nenum PointSize {\n hoverSize = 11,\n invisibleSize = 1,\n}\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 = ILineChartPoints & { index: number };\n\nexport interface ILineChartState extends IBasestate {\n // This array contains data of selected legends for points\n selectedLegendPoints: LineChartDataWithIndex[];\n // This array contains data of selected legends for color bars\n selectedColorBarLegend: IColorFillBarsProps[];\n // This is a boolean value which is set to true\n // when at least one legend is selected\n isSelectedLegend: boolean;\n // This value will be used as customized callout props - point callout.\n dataPointCalloutProps?: ICustomizedCalloutData;\n // This value will be used as Customized callout props - For stack callout.\n stackCalloutProps?: ICustomizedCalloutData;\n // active or hovered point\n activePoint?: string;\n // x-axis callout accessibility data\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n}\n\nexport class LineChartBase extends React.Component<ILineChartProps, ILineChartState> {\n private _points: LineChartDataWithIndex[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _calloutPoints: any[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _xAxisScale: any = '';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _yAxisScale: any = '';\n private _circleId: string;\n private _lineId: string;\n private _borderId: string;\n private _verticalLine: string;\n private _colorFillBarPatternId: string;\n private _uniqueCallOutID: string;\n private _refArray: IRefArrayData[];\n private margins: IMargins;\n private eventLabelHeight: number = 36;\n private lines: JSX.Element[];\n private _renderedColorFillBars: JSX.Element[];\n private _colorFillBars: IColorFillBarsProps[];\n private _colorFillBarsOpacity: number;\n private _tooltipId: string;\n\n constructor(props: ILineChartProps) {\n super(props);\n this.state = {\n hoverXValue: '',\n activeLegend: '',\n YValueHover: [],\n refSelected: '',\n selectedLegend: '',\n isCalloutVisible: false,\n selectedLegendPoints: [],\n selectedColorBarLegend: [],\n isSelectedLegend: false,\n activePoint: '',\n };\n this._refArray = [];\n this._points = this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);\n this._colorFillBars = [];\n this._colorFillBarsOpacity = 0.4;\n this._calloutPoints = calloutData(this._points) || [];\n this._circleId = getId('circle');\n this._lineId = getId('lineID');\n this._borderId = getId('borderID');\n this._verticalLine = getId('verticalLine');\n this._colorFillBarPatternId = getId('colorFillBarPattern');\n this._tooltipId = getId('LineChartTooltipId_');\n props.eventAnnotationProps &&\n props.eventAnnotationProps.labelHeight &&\n (this.eventLabelHeight = props.eventAnnotationProps.labelHeight);\n }\n\n public componentDidUpdate(prevProps: ILineChartProps): void {\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 if (\n prevProps.height !== this.props.height ||\n prevProps.width !== this.props.width ||\n prevProps.data !== this.props.data\n ) {\n this._points = this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);\n this._calloutPoints = calloutData(this._points) || [];\n }\n }\n\n public render(): JSX.Element {\n const { tickValues, tickFormat, eventAnnotationProps, legendProps, data } = this.props;\n this._points = this._injectIndexPropertyInLineChartData(data.lineChartData);\n\n const isXAxisDateType = getXAxisType(this._points);\n let points = this._points;\n if (legendProps && !!legendProps.canSelectMultipleLegends) {\n points = this.state.selectedLegendPoints.length >= 1 ? this.state.selectedLegendPoints : this._points;\n this._calloutPoints = calloutData(points);\n }\n\n const legendBars = this._createLegends(this._points!);\n const calloutProps = {\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n id: `toolTip${this._uniqueCallOutID}`,\n target: this.state.refSelected,\n isBeakVisible: false,\n gapSpace: 15,\n onDismiss: this._closeCallout,\n preventDismissOnEvent: () => true,\n hidden: !(!this.props.hideTooltip && this.state.isCalloutVisible),\n descriptionMessage:\n this.props.getCalloutDescriptionMessage && this.state.stackCalloutProps\n ? this.props.getCalloutDescriptionMessage(this.state.stackCalloutProps)\n : undefined,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData: this.state.xAxisCalloutAccessibilityData,\n ...this.props.calloutProps,\n };\n const tickParams = {\n tickValues: tickValues,\n tickFormat: tickFormat,\n };\n\n return (\n <CartesianChart\n {...this.props}\n chartTitle={data.chartTitle}\n points={points}\n chartType={ChartTypes.LineChart}\n isCalloutForStack\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n getmargins={this._getMargins}\n getGraphData={this._initializeLineChartData}\n xAxisType={isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n customizedCallout={this._getCustomizedCallout()}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n this._xAxisScale = props.xScale!;\n this._yAxisScale = props.yScale!;\n return (\n <>\n <g>\n <line\n x1={0}\n y1={0}\n x2={0}\n y2={props.containerHeight}\n stroke={'steelblue'}\n id={this._verticalLine}\n visibility={'hidden'}\n strokeDasharray={'5,5'}\n />\n <g>\n {this._renderedColorFillBars}\n {this.lines}\n </g>\n {eventAnnotationProps && (\n <EventsAnnotation\n {...eventAnnotationProps}\n scale={props.xScale!}\n chartYTop={this.margins.top! + this.eventLabelHeight}\n chartYBottom={props.containerHeight! - 35}\n />\n )}\n </g>\n </>\n );\n }}\n />\n );\n }\n\n private _injectIndexPropertyInLineChartData = (lineChartData?: ILineChartPoints[]): LineChartDataWithIndex[] | [] => {\n const { allowMultipleShapesForPoints = false } = this.props;\n return lineChartData\n ? lineChartData.map((item: ILineChartPoints, index: number) => ({\n ...item,\n index: allowMultipleShapesForPoints ? index : -1,\n }))\n : [];\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerStack\n ? this.props.onRenderCalloutPerStack(this.state.stackCalloutProps)\n : this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)\n : null;\n };\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _initializeLineChartData = (\n xScale: NumericAxis,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) => {\n this._xAxisScale = xScale;\n this._yAxisScale = yScale;\n this._renderedColorFillBars = this.props.colorFillBars ? this._createColorFillBars(containerHeight) : [];\n this.lines = this._createLines(xElement!);\n };\n\n private _handleSingleLegendSelectionAction = (lineChartItem: LineChartDataWithIndex | IColorFillBarsProps) => {\n if (this.state.selectedLegend === lineChartItem.legend) {\n this.setState({ selectedLegend: '', activeLegend: lineChartItem.legend });\n this._handleLegendClick(lineChartItem, null);\n } else {\n this.setState({\n selectedLegend: lineChartItem.legend,\n activeLegend: lineChartItem.legend,\n });\n this._handleLegendClick(lineChartItem, lineChartItem.legend);\n }\n };\n\n private _onHoverCardHide = () => {\n this.setState({\n selectedLegendPoints: [],\n selectedColorBarLegend: [],\n isSelectedLegend: false,\n });\n };\n\n private _createLegends(data: LineChartDataWithIndex[]): JSX.Element {\n const { legendProps, allowMultipleShapesForPoints = false } = this.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: ILegend = {\n title: point.legend!,\n color: color,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n this._handleMultipleLineLegendSelectionAction(point);\n } else {\n this._handleSingleLegendSelectionAction(point);\n }\n },\n onMouseOutAction: () => {\n this.setState({ activeLegend: '' });\n },\n hoverAction: () => {\n this.setState({ activeLegend: point.legend });\n },\n ...(point.legendShape && {\n shape: point.legendShape,\n }),\n ...(allowMultipleShapesForPoints && {\n shape: Points[point.index % Object.keys(pointTypes).length] as ILegend['shape'],\n }),\n };\n return legend;\n });\n\n const colorFillBarsLegendDataItems = this.props.colorFillBars\n ? this.props.colorFillBars.map((colorFillBar: IColorFillBarsProps, index: number) => {\n const title = colorFillBar.legend;\n const legend: ILegend = {\n title,\n color: colorFillBar.color,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n this._handleMultipleColorFillBarLegendSelectionAction(colorFillBar);\n } else {\n this._handleSingleLegendSelectionAction(colorFillBar);\n }\n },\n onMouseOutAction: () => {\n this.setState({ activeLegend: '' });\n },\n hoverAction: () => {\n this.setState({ activeLegend: title });\n },\n opacity: this._colorFillBarsOpacity,\n stripePattern: colorFillBar.applyPattern,\n };\n return legend;\n })\n : [];\n\n const legends = (\n <Legends\n legends={[...legendDataItems, ...colorFillBarsLegendDataItems]}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...(isLegendMultiSelectEnabled && { onLegendHoverCardLeave: this._onHoverCardHide })}\n {...this.props.legendProps}\n />\n );\n return legends;\n }\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _getBoxWidthOfShape = (pointId: string, pointIndex: number, isLastPoint: boolean) => {\n const { allowMultipleShapesForPoints = false, strokeWidth = DEFAULT_LINE_STROKE_SIZE } = this.props;\n const { activePoint } = this.state;\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 private _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 } = this.props;\n let w = this._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 private _getPointFill = (lineColor: string, pointId: string, pointIndex: number, isLastPoint: boolean) => {\n const { activePoint } = this.state;\n const { theme, allowMultipleShapesForPoints = false } = this.props;\n if (allowMultipleShapesForPoints) {\n if (pointIndex === 1 || isLastPoint) {\n if (activePoint === pointId) {\n return theme!.palette.white;\n } else {\n return lineColor;\n }\n } else {\n if (activePoint === pointId) {\n return theme!.palette.white;\n } else {\n return lineColor;\n }\n }\n } else {\n if (activePoint === pointId) {\n return theme!.palette.white;\n } else {\n return lineColor;\n }\n }\n };\n private _createLines(xElement: SVGElement): JSX.Element[] {\n const lines: JSX.Element[] = [];\n const points: JSX.Element[] = [];\n if (this.state.isSelectedLegend) {\n this._points = this.state.selectedLegendPoints;\n } else {\n this._points = this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);\n }\n for (let i = 0; i < this._points.length; i++) {\n const linesForLine: JSX.Element[] = [];\n const bordersForLine: JSX.Element[] = [];\n const pointsForLine: JSX.Element[] = [];\n\n const legendVal: string = this._points[i].legend;\n const lineColor: string = this._points[i].color;\n const { activePoint } = this.state;\n const { theme } = this.props;\n if (this._points[i].data.length === 1) {\n const { x: x1, y: y1, xAxisCalloutData, xAxisCalloutAccessibilityData } = this._points[i].data[0];\n const circleId = `${this._circleId}${i}`;\n pointsForLine.push(\n <circle\n id={`${this._circleId}${i}`}\n key={`${this._circleId}${i}`}\n r={activePoint === circleId ? 5.5 : 3.5}\n cx={this._xAxisScale(x1)}\n cy={this._yAxisScale(y1)}\n fill={activePoint === circleId ? theme!.palette.white : lineColor}\n onMouseOver={this._handleHover.bind(this, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onMouseMove={this._handleHover.bind(this, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onMouseOut={this._handleMouseOut}\n strokeWidth={activePoint === circleId ? 2 : 0}\n stroke={activePoint === circleId ? lineColor : ''}\n />,\n );\n }\n\n let gapIndex = 0;\n const gaps = this._points[i].gaps?.sort((a, b) => a.startIndex - b.startIndex) ?? [];\n\n for (let j = 1; j < this._points[i].data.length; j++) {\n const gapResult = this._checkInGap(j, gaps, gapIndex);\n const isInGap = gapResult.isInGap;\n gapIndex = gapResult.gapIndex;\n\n const lineId = `${this._lineId}${i}${j}`;\n const borderId = `${this._borderId}${i}${j}`;\n const circleId = `${this._circleId}${i}${j}`;\n const { x: x1, y: y1, xAxisCalloutData, xAxisCalloutAccessibilityData } = this._points[i].data[j - 1];\n const { x: x2, y: y2 } = this._points[i].data[j];\n let path = this._getPath(this._xAxisScale(x1), this._yAxisScale(y1), circleId, j, false, this._points[i].index);\n const strokeWidth =\n this._points[i].lineOptions?.strokeWidth || this.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;\n\n const isLegendSelected: boolean =\n this.state.activeLegend === legendVal || this.state.activeLegend === '' || this.state.isSelectedLegend;\n\n const hideNonActiveDots = activePoint !== circleId && this._points[i].hideNonActiveDots;\n pointsForLine.push(\n <path\n id={circleId}\n key={circleId}\n d={path}\n data-is-focusable={i === 0 ? true : false}\n onMouseOver={this._handleHover.bind(this, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onMouseMove={this._handleHover.bind(this, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onMouseOut={this._handleMouseOut}\n onFocus={() => this._handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onBlur={this._handleMouseOut}\n onClick={this._onDataPointClick.bind(this, this._points[i].data[j - 1].onDataPointClick)}\n visibility={hideNonActiveDots ? 'hidden' : 'visible'}\n opacity={isLegendSelected ? 1 : 0.01}\n fill={this._getPointFill(lineColor, circleId, j, false)}\n stroke={lineColor}\n strokeWidth={2}\n />,\n );\n if (j + 1 === this._points[i].data.length) {\n const lastCircleId = `${circleId}${j}L`;\n path = this._getPath(\n this._xAxisScale(x2),\n this._yAxisScale(y2),\n lastCircleId,\n j,\n true,\n this._points[i].index,\n );\n const {\n xAxisCalloutData: lastCirlceXCallout,\n xAxisCalloutAccessibilityData: lastCirlceXCalloutAccessibilityData,\n } = this._points[i].data[j];\n pointsForLine.push(\n <path\n id={lastCircleId}\n key={lastCircleId}\n d={path}\n data-is-focusable={i === 0 ? true : false}\n onMouseOver={this._handleHover.bind(\n this,\n x2,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n )}\n onMouseMove={this._handleHover.bind(\n this,\n x2,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n )}\n onMouseOut={this._handleMouseOut}\n onFocus={() =>\n this._handleFocus(lineId, x2, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData)\n }\n onBlur={this._handleMouseOut}\n onClick={this._onDataPointClick.bind(this, this._points[i].data[j].onDataPointClick)}\n visibility={hideNonActiveDots ? 'hidden' : 'visible'}\n opacity={isLegendSelected ? 1 : 0.01}\n fill={this._getPointFill(lineColor, lastCircleId, j, true)}\n stroke={lineColor}\n strokeWidth={2}\n />,\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 = this._points[i].lineOptions?.lineBorderWidth\n ? Number.parseFloat(this._points[i].lineOptions!.lineBorderWidth!.toString())\n : 0;\n if (lineBorderWidth > 0) {\n bordersForLine.push(\n <line\n id={borderId}\n key={borderId}\n x1={this._xAxisScale(x1)}\n y1={this._yAxisScale(y1)}\n x2={this._xAxisScale(x2)}\n y2={this._yAxisScale(y2)}\n strokeLinecap={this._points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeWidth={Number.parseFloat(strokeWidth.toString()) + lineBorderWidth}\n stroke={this._points[i].lineOptions?.lineBorderColor || theme!.palette.white}\n opacity={1}\n />,\n );\n }\n\n linesForLine.push(\n <line\n id={lineId}\n key={lineId}\n x1={this._xAxisScale(x1)}\n y1={this._yAxisScale(y1)}\n x2={this._xAxisScale(x2)}\n y2={this._yAxisScale(y2)}\n strokeWidth={strokeWidth}\n ref={(e: SVGLineElement | null) => {\n this._refCallback(e!, lineId);\n }}\n onMouseOver={this._handleHover.bind(\n this,\n x1,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n )}\n onMouseMove={this._handleHover.bind(\n this,\n x1,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n )}\n onMouseOut={this._handleMouseOut}\n stroke={lineColor}\n strokeLinecap={this._points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={this._points[i].lineOptions?.strokeDasharray}\n strokeDashoffset={this._points[i].lineOptions?.strokeDashoffset}\n opacity={1}\n onClick={this._onLineClick.bind(this, this._points[i].onLineClick)}\n />,\n );\n }\n } else {\n if (!isInGap) {\n linesForLine.push(\n <line\n id={lineId}\n key={lineId}\n x1={this._xAxisScale(x1)}\n y1={this._yAxisScale(y1)}\n x2={this._xAxisScale(x2)}\n y2={this._yAxisScale(y2)}\n strokeWidth={strokeWidth}\n stroke={lineColor}\n strokeLinecap={this._points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={this._points[i].lineOptions?.strokeDasharray}\n strokeDashoffset={this._points[i].lineOptions?.strokeDashoffset}\n opacity={0.1}\n />,\n );\n }\n }\n }\n lines.push(...bordersForLine, ...linesForLine);\n points.push(...pointsForLine);\n }\n const classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!this.props.showXAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(this._xAxisScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return lines.concat(points);\n }\n\n private _createColorFillBars = (containerHeight: number) => {\n const colorFillBars: JSX.Element[] = [];\n if (this.state.isSelectedLegend) {\n this._colorFillBars = this.state.selectedColorBarLegend;\n } else {\n this._colorFillBars = this.props.colorFillBars!;\n }\n for (let i = 0; i < this._colorFillBars.length; i++) {\n const colorFillBar = this._colorFillBars[i];\n const colorFillBarId = getId(colorFillBar.legend.replace(/\\W/g, ''));\n\n if (colorFillBar.applyPattern) {\n // Using a pattern element because CSS was unable to render diagonal stripes for rect elements\n colorFillBars.push(this._getStripePattern(colorFillBar.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 this.state.activeLegend === colorFillBar.legend ||\n this.state.activeLegend === '' ||\n this.state.isSelectedLegend\n ? this._colorFillBarsOpacity\n : 0.1;\n colorFillBars.push(\n <rect\n fill={colorFillBar.applyPattern ? `url(#${this._colorFillBarPatternId}${i})` : colorFillBar.color}\n fillOpacity={opacity}\n x={this._xAxisScale(startX)}\n y={this._yAxisScale(0) - containerHeight}\n width={Math.abs(this._xAxisScale(endX) - this._xAxisScale(startX))}\n height={containerHeight}\n key={`${colorFillBarId}${j}`}\n />,\n );\n }\n }\n return colorFillBars;\n };\n\n private _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={`${this._colorFillBarPatternId}${id}`}\n width={16}\n height={16}\n key={`${this._colorFillBarPatternId}${id}`}\n patternUnits={'userSpaceOnUse'}\n >\n <path d={stripePath} stroke={color} strokeWidth={2} />\n </pattern>\n );\n };\n\n private _checkInGap = (pointIndex: number, gaps: ILineChartGap[], 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 private _refCallback(element: SVGGElement, legendTitle: string): void {\n this._refArray.push({ index: legendTitle, refElement: element });\n }\n\n private _handleFocus = (\n lineId: string,\n x: number | Date,\n\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData?: IAccessibilityProps,\n ) => {\n this._uniqueCallOutID = circleId;\n const formattedData = x instanceof Date ? x.toLocaleDateString() : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const found = find(this._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 if (found) {\n const _this = this;\n d3Select('#' + circleId).attr('aria-labelledby', `toolTip${this._uniqueCallOutID}`);\n d3Select(`#${this._verticalLine}`)\n .attr('transform', () => `translate(${_this._xAxisScale(x)}, 0)`)\n .attr('visibility', 'visibility');\n this._refArray.forEach((obj: IRefArrayData) => {\n if (obj.index === lineId) {\n this.setState({\n isCalloutVisible: true,\n refSelected: obj.refElement,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : '' + formattedData,\n YValueHover: found.values,\n stackCalloutProps: found!,\n dataPointCalloutProps: found!,\n activePoint: circleId,\n xAxisCalloutAccessibilityData,\n });\n }\n });\n } else {\n this.setState({\n activePoint: circleId,\n });\n }\n };\n\n private _handleHover = (\n x: number | Date,\n xAxisCalloutData: string,\n circleId: string,\n xAxisCalloutAccessibilityData: IAccessibilityProps,\n mouseEvent: React.MouseEvent<SVGElement>,\n ) => {\n mouseEvent.persist();\n this._uniqueCallOutID = circleId;\n const formattedData = x instanceof Date ? x.toLocaleDateString() : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const _this = this;\n const found = find(this._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 if (found) {\n d3Select(`#${this._verticalLine}`)\n .attr('transform', () => `translate(${_this._xAxisScale(x)}, 0)`)\n .attr('visibility', 'visibility');\n this.setState({\n isCalloutVisible: true,\n refSelected: mouseEvent,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : '' + formattedData,\n YValueHover: found.values,\n stackCalloutProps: found!,\n dataPointCalloutProps: found!,\n activePoint: circleId,\n xAxisCalloutAccessibilityData,\n });\n } else {\n this.setState({\n activePoint: circleId,\n });\n }\n };\n\n private _onLineClick = (func: () => void) => {\n if (func) {\n func();\n }\n };\n\n private _onDataPointClick = (func: () => void) => {\n if (func) {\n func();\n }\n };\n\n private _handleMouseOut = () => {\n d3Select(`#${this._verticalLine}`).attr('visibility', 'hidden');\n this.setState({\n isCalloutVisible: false,\n activePoint: '',\n });\n };\n\n private _handleLegendClick = (\n lineChartItem: LineChartDataWithIndex | IColorFillBarsProps,\n selectedLegend: string | null | string[],\n ): void => {\n if (lineChartItem.onLegendClick) {\n lineChartItem.onLegendClick(selectedLegend);\n }\n };\n\n private _handleMultipleLineLegendSelectionAction = (selectedLine: LineChartDataWithIndex) => {\n const selectedLineIndex = this.state.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 = [...this.state.selectedLegendPoints, selectedLine];\n } else {\n selectedLines = this.state.selectedLegendPoints\n .slice(0, selectedLineIndex)\n .concat(this.state.selectedLegendPoints.slice(selectedLineIndex + 1));\n }\n\n const areAllLineLegendsSelected = this.props.data && selectedLines.length === this.props.data.lineChartData!.length;\n\n if (\n areAllLineLegendsSelected &&\n ((this.props.colorFillBars && this.props.colorFillBars.length === this.state.selectedColorBarLegend.length) ||\n !this.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 this._clearMultipleLegendSelections();\n } else if (!selectedLines.length && !this.state.selectedColorBarLegend.length) {\n // Clear all legends if no legends including color fill bar legends are selected\n this._clearMultipleLegendSelections();\n } else {\n // Otherwise, set state when one or more legends are selected, including color fill bar legends\n this.setState({\n selectedLegendPoints: selectedLines,\n isSelectedLegend: true,\n });\n }\n\n const selectedLegendTitlesToPass = selectedLines.map((line: LineChartDataWithIndex) => line.legend);\n this._handleLegendClick(selectedLine, selectedLegendTitlesToPass);\n };\n\n private _handleMultipleColorFillBarLegendSelectionAction = (selectedColorFillBar: IColorFillBarsProps) => {\n const selectedColorFillBarIndex = this.state.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: IColorFillBarsProps[];\n if (selectedColorFillBarIndex === -1) {\n selectedColorFillBars = [...this.state.selectedColorBarLegend, selectedColorFillBar];\n } else {\n selectedColorFillBars = this.state.selectedColorBarLegend\n .slice(0, selectedColorFillBarIndex)\n .concat(this.state.selectedColorBarLegend.slice(selectedColorFillBarIndex + 1));\n }\n\n const areAllColorFillBarLegendsSelected =\n selectedColorFillBars.length === (this.props.colorFillBars && this.props.colorFillBars!.length);\n\n if (\n areAllColorFillBarLegendsSelected &&\n ((this.props.data && this.props.data.lineChartData!.length === this.state.selectedLegendPoints.length) ||\n !this.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 this._clearMultipleLegendSelections();\n } else if (!selectedColorFillBars.length && !this.state.selectedLegendPoints.length) {\n // Clear all legends if no legends are selected, including line legends\n this._clearMultipleLegendSelections();\n } else {\n // set state when one or more legends are selected, including line legends\n this.setState({\n selectedColorBarLegend: selectedColorFillBars,\n isSelectedLegend: true,\n });\n }\n\n const selectedLegendTitlesToPass = selectedColorFillBars.map(\n (colorFillBar: IColorFillBarsProps) => colorFillBar.legend,\n );\n this._handleLegendClick(selectedColorFillBar, selectedLegendTitlesToPass);\n };\n\n private _clearMultipleLegendSelections = () => {\n this.setState({\n selectedColorBarLegend: [],\n selectedLegendPoints: [],\n isSelectedLegend: false,\n });\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"LineChart.base.js","sourceRoot":"../src/","sources":["components/LineChart/LineChart.base.tsx"],"names":[],"mappings":";;;;IAiCA,IAAM,aAAa,GAAG,8BAAkB,EAA0C,CAAC;IAEnF,IAAK,SAGJ;IAHD,WAAK,SAAS;QACZ,oDAAc,CAAA;QACd,2DAAiB,CAAA;IACnB,CAAC,EAHI,SAAS,KAAT,SAAS,QAGb;IAED,IAAM,wBAAwB,GAAG,CAAC,CAAC;IACnC,6FAA6F;IAC7F,IAAM,kBAAkB,GAAG,GAAG,CAAC;IAE/B;;;;;;OAMG;IACH,IAAM,aAAa,GAAG,UAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,KAAa;QACnE,IAAM,aAAa,GAAG;YACpB,cAAc;YACd,OAAI,CAAC,GAAG,CAAC,GAAG,CAAC,UAA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esContent":["import * as React from 'react';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select } from 'd3-selection';\nimport { ILegend, Legends } from '../Legends/index';\nimport { classNamesFunction, getId, find } from '@fluentui/react/lib/Utilities';\nimport {\n IAccessibilityProps,\n CartesianChart,\n IBasestate,\n IChildProps,\n ILineChartProps,\n ILineChartPoints,\n ICustomizedCalloutData,\n IMargins,\n IRefArrayData,\n IColorFillBarsProps,\n ILineChartStyleProps,\n ILineChartStyles,\n ILineChartGap,\n} from '../../index';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { EventsAnnotation } from './eventAnnotation/EventAnnotation';\nimport {\n calloutData,\n ChartTypes,\n getXAxisType,\n XAxisTypes,\n tooltipOfXAxislabels,\n Points,\n pointTypes,\n} from '../../utilities/index';\n\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\nconst getClassNames = classNamesFunction<ILineChartStyleProps, ILineChartStyles>();\n\nenum PointSize {\n hoverSize = 11,\n invisibleSize = 1,\n}\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 = ILineChartPoints & { index: number };\n\nexport interface ILineChartState extends IBasestate {\n // This array contains data of selected legends for points\n selectedLegendPoints: LineChartDataWithIndex[];\n // This array contains data of selected legends for color bars\n selectedColorBarLegend: IColorFillBarsProps[];\n // This is a boolean value which is set to true\n // when at least one legend is selected\n isSelectedLegend: boolean;\n // This value will be used as customized callout props - point callout.\n dataPointCalloutProps?: ICustomizedCalloutData;\n // This value will be used as Customized callout props - For stack callout.\n stackCalloutProps?: ICustomizedCalloutData;\n // active or hovered point\n activePoint?: string;\n // x-axis callout accessibility data\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n}\n\nexport class LineChartBase extends React.Component<ILineChartProps, ILineChartState> {\n private _points: LineChartDataWithIndex[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _calloutPoints: any[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _xAxisScale: any = '';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _yAxisScale: any = '';\n private _circleId: string;\n private _lineId: string;\n private _borderId: string;\n private _verticalLine: string;\n private _colorFillBarPatternId: string;\n private _uniqueCallOutID: string;\n private _refArray: IRefArrayData[];\n private margins: IMargins;\n private eventLabelHeight: number = 36;\n private lines: JSX.Element[];\n private _renderedColorFillBars: JSX.Element[];\n private _colorFillBars: IColorFillBarsProps[];\n private _colorFillBarsOpacity: number;\n private _tooltipId: string;\n\n constructor(props: ILineChartProps) {\n super(props);\n this.state = {\n hoverXValue: '',\n activeLegend: '',\n YValueHover: [],\n refSelected: '',\n selectedLegend: '',\n isCalloutVisible: false,\n selectedLegendPoints: [],\n selectedColorBarLegend: [],\n isSelectedLegend: false,\n activePoint: '',\n };\n this._refArray = [];\n this._points = this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);\n this._colorFillBars = [];\n this._colorFillBarsOpacity = 0.4;\n this._calloutPoints = calloutData(this._points) || [];\n this._circleId = getId('circle');\n this._lineId = getId('lineID');\n this._borderId = getId('borderID');\n this._verticalLine = getId('verticalLine');\n this._colorFillBarPatternId = getId('colorFillBarPattern');\n this._tooltipId = getId('LineChartTooltipId_');\n props.eventAnnotationProps &&\n props.eventAnnotationProps.labelHeight &&\n (this.eventLabelHeight = props.eventAnnotationProps.labelHeight);\n }\n\n public componentDidUpdate(prevProps: ILineChartProps): void {\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 if (\n prevProps.height !== this.props.height ||\n prevProps.width !== this.props.width ||\n prevProps.data !== this.props.data\n ) {\n this._points = this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);\n this._calloutPoints = calloutData(this._points) || [];\n }\n }\n\n public render(): JSX.Element {\n const { tickValues, tickFormat, eventAnnotationProps, legendProps, data } = this.props;\n this._points = this._injectIndexPropertyInLineChartData(data.lineChartData);\n\n const isXAxisDateType = getXAxisType(this._points);\n let points = this._points;\n if (legendProps && !!legendProps.canSelectMultipleLegends) {\n points = this.state.selectedLegendPoints.length >= 1 ? this.state.selectedLegendPoints : this._points;\n this._calloutPoints = calloutData(points);\n }\n\n const legendBars = this._createLegends(this._points!);\n const calloutProps = {\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n id: `toolTip${this._uniqueCallOutID}`,\n target: this.state.refSelected,\n isBeakVisible: false,\n gapSpace: 15,\n onDismiss: this._closeCallout,\n preventDismissOnEvent: () => true,\n hidden: !(!this.props.hideTooltip && this.state.isCalloutVisible),\n descriptionMessage:\n this.props.getCalloutDescriptionMessage && this.state.stackCalloutProps\n ? this.props.getCalloutDescriptionMessage(this.state.stackCalloutProps)\n : undefined,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData: this.state.xAxisCalloutAccessibilityData,\n ...this.props.calloutProps,\n };\n const tickParams = {\n tickValues: tickValues,\n tickFormat: tickFormat,\n };\n\n return (\n <CartesianChart\n {...this.props}\n chartTitle={data.chartTitle}\n points={points}\n chartType={ChartTypes.LineChart}\n isCalloutForStack\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n getmargins={this._getMargins}\n getGraphData={this._initializeLineChartData}\n xAxisType={isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n customizedCallout={this._getCustomizedCallout()}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n this._xAxisScale = props.xScale!;\n this._yAxisScale = props.yScale!;\n return (\n <>\n <g>\n <line\n x1={0}\n y1={0}\n x2={0}\n y2={props.containerHeight}\n stroke={'steelblue'}\n id={this._verticalLine}\n visibility={'hidden'}\n strokeDasharray={'5,5'}\n />\n <g>\n {this._renderedColorFillBars}\n {this.lines}\n </g>\n {eventAnnotationProps && (\n <EventsAnnotation\n {...eventAnnotationProps}\n scale={props.xScale!}\n chartYTop={this.margins.top! + this.eventLabelHeight}\n chartYBottom={props.containerHeight! - 35}\n />\n )}\n </g>\n </>\n );\n }}\n />\n );\n }\n\n private _injectIndexPropertyInLineChartData = (lineChartData?: ILineChartPoints[]): LineChartDataWithIndex[] | [] => {\n const { allowMultipleShapesForPoints = false } = this.props;\n return lineChartData\n ? lineChartData.map((item: ILineChartPoints, index: number) => ({\n ...item,\n index: allowMultipleShapesForPoints ? index : -1,\n }))\n : [];\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerStack\n ? this.props.onRenderCalloutPerStack(this.state.stackCalloutProps)\n : this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)\n : null;\n };\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _initializeLineChartData = (\n xScale: NumericAxis,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) => {\n this._xAxisScale = xScale;\n this._yAxisScale = yScale;\n this._renderedColorFillBars = this.props.colorFillBars ? this._createColorFillBars(containerHeight) : [];\n this.lines = this._createLines(xElement!);\n };\n\n private _handleSingleLegendSelectionAction = (lineChartItem: LineChartDataWithIndex | IColorFillBarsProps) => {\n if (this.state.selectedLegend === lineChartItem.legend) {\n this.setState({ selectedLegend: '', activeLegend: lineChartItem.legend });\n this._handleLegendClick(lineChartItem, null);\n } else {\n this.setState({\n selectedLegend: lineChartItem.legend,\n activeLegend: lineChartItem.legend,\n });\n this._handleLegendClick(lineChartItem, lineChartItem.legend);\n }\n };\n\n private _onHoverCardHide = () => {\n this.setState({\n selectedLegendPoints: [],\n selectedColorBarLegend: [],\n isSelectedLegend: false,\n });\n };\n\n private _createLegends(data: LineChartDataWithIndex[]): JSX.Element {\n const { legendProps, allowMultipleShapesForPoints = false } = this.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: ILegend = {\n title: point.legend!,\n color: color,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n this._handleMultipleLineLegendSelectionAction(point);\n } else {\n this._handleSingleLegendSelectionAction(point);\n }\n },\n onMouseOutAction: () => {\n this.setState({ activeLegend: '' });\n },\n hoverAction: () => {\n this.setState({ activeLegend: point.legend });\n },\n ...(point.legendShape && {\n shape: point.legendShape,\n }),\n ...(allowMultipleShapesForPoints && {\n shape: Points[point.index % Object.keys(pointTypes).length] as ILegend['shape'],\n }),\n };\n return legend;\n });\n\n const colorFillBarsLegendDataItems = this.props.colorFillBars\n ? this.props.colorFillBars.map((colorFillBar: IColorFillBarsProps, index: number) => {\n const title = colorFillBar.legend;\n const legend: ILegend = {\n title,\n color: colorFillBar.color,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n this._handleMultipleColorFillBarLegendSelectionAction(colorFillBar);\n } else {\n this._handleSingleLegendSelectionAction(colorFillBar);\n }\n },\n onMouseOutAction: () => {\n this.setState({ activeLegend: '' });\n },\n hoverAction: () => {\n this.setState({ activeLegend: title });\n },\n opacity: this._colorFillBarsOpacity,\n stripePattern: colorFillBar.applyPattern,\n };\n return legend;\n })\n : [];\n\n const legends = (\n <Legends\n legends={[...legendDataItems, ...colorFillBarsLegendDataItems]}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...(isLegendMultiSelectEnabled && { onLegendHoverCardLeave: this._onHoverCardHide })}\n {...this.props.legendProps}\n />\n );\n return legends;\n }\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _getBoxWidthOfShape = (pointId: string, pointIndex: number, isLastPoint: boolean) => {\n const { allowMultipleShapesForPoints = false, strokeWidth = DEFAULT_LINE_STROKE_SIZE } = this.props;\n const { activePoint } = this.state;\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 private _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 } = this.props;\n let w = this._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 private _getPointFill = (lineColor: string, pointId: string, pointIndex: number, isLastPoint: boolean) => {\n const { activePoint } = this.state;\n const { theme, allowMultipleShapesForPoints = false } = this.props;\n if (allowMultipleShapesForPoints) {\n if (pointIndex === 1 || isLastPoint) {\n if (activePoint === pointId) {\n return theme!.palette.white;\n } else {\n return lineColor;\n }\n } else {\n if (activePoint === pointId) {\n return theme!.palette.white;\n } else {\n return lineColor;\n }\n }\n } else {\n if (activePoint === pointId) {\n return theme!.palette.white;\n } else {\n return lineColor;\n }\n }\n };\n private _createLines(xElement: SVGElement): JSX.Element[] {\n const lines: JSX.Element[] = [];\n if (this.state.isSelectedLegend) {\n this._points = this.state.selectedLegendPoints;\n } else {\n this._points = this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);\n }\n for (let i = 0; i < this._points.length; i++) {\n const linesForLine: JSX.Element[] = [];\n const bordersForLine: JSX.Element[] = [];\n const pointsForLine: JSX.Element[] = [];\n\n const legendVal: string = this._points[i].legend;\n const lineColor: string = this._points[i].color;\n const { activePoint } = this.state;\n const { theme } = this.props;\n if (this._points[i].data.length === 1) {\n const { x: x1, y: y1, xAxisCalloutData, xAxisCalloutAccessibilityData } = this._points[i].data[0];\n const circleId = `${this._circleId}${i}`;\n pointsForLine.push(\n <circle\n id={`${this._circleId}${i}`}\n key={`${this._circleId}${i}`}\n r={activePoint === circleId ? 5.5 : 3.5}\n cx={this._xAxisScale(x1)}\n cy={this._yAxisScale(y1)}\n fill={activePoint === circleId ? theme!.palette.white : lineColor}\n onMouseOver={this._handleHover.bind(this, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onMouseMove={this._handleHover.bind(this, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onMouseOut={this._handleMouseOut}\n strokeWidth={activePoint === circleId ? 2 : 0}\n stroke={activePoint === circleId ? lineColor : ''}\n />,\n );\n }\n\n let gapIndex = 0;\n const gaps = this._points[i].gaps?.sort((a, b) => a.startIndex - b.startIndex) ?? [];\n\n for (let j = 1; j < this._points[i].data.length; j++) {\n const gapResult = this._checkInGap(j, gaps, gapIndex);\n const isInGap = gapResult.isInGap;\n gapIndex = gapResult.gapIndex;\n\n const lineId = `${this._lineId}${i}${j}`;\n const borderId = `${this._borderId}${i}${j}`;\n const circleId = `${this._circleId}${i}${j}`;\n const { x: x1, y: y1, xAxisCalloutData, xAxisCalloutAccessibilityData } = this._points[i].data[j - 1];\n const { x: x2, y: y2 } = this._points[i].data[j];\n let path = this._getPath(this._xAxisScale(x1), this._yAxisScale(y1), circleId, j, false, this._points[i].index);\n const strokeWidth =\n this._points[i].lineOptions?.strokeWidth || this.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;\n\n const isLegendSelected: boolean =\n this.state.activeLegend === legendVal || this.state.activeLegend === '' || this.state.isSelectedLegend;\n\n const currentPointHidden = this._points[i].hideNonActiveDots && activePoint !== circleId;\n pointsForLine.push(\n <path\n id={circleId}\n key={circleId}\n d={path}\n data-is-focusable={i === 0 ? true : false}\n onMouseOver={this._handleHover.bind(this, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onMouseMove={this._handleHover.bind(this, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onMouseOut={this._handleMouseOut}\n onFocus={() => this._handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onBlur={this._handleMouseOut}\n onClick={this._onDataPointClick.bind(this, this._points[i].data[j - 1].onDataPointClick)}\n opacity={isLegendSelected && !currentPointHidden ? 1 : 0.01}\n fill={this._getPointFill(lineColor, circleId, j, false)}\n stroke={lineColor}\n strokeWidth={2}\n />,\n );\n if (j + 1 === this._points[i].data.length) {\n const lastCircleId = `${circleId}${j}L`;\n const lastPointHidden = this._points[i].hideNonActiveDots && activePoint !== lastCircleId;\n path = this._getPath(\n this._xAxisScale(x2),\n this._yAxisScale(y2),\n lastCircleId,\n j,\n true,\n this._points[i].index,\n );\n const {\n xAxisCalloutData: lastCirlceXCallout,\n xAxisCalloutAccessibilityData: lastCirlceXCalloutAccessibilityData,\n } = this._points[i].data[j];\n pointsForLine.push(\n <path\n id={lastCircleId}\n key={lastCircleId}\n d={path}\n data-is-focusable={i === 0 ? true : false}\n onMouseOver={this._handleHover.bind(\n this,\n x2,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n )}\n onMouseMove={this._handleHover.bind(\n this,\n x2,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n )}\n onMouseOut={this._handleMouseOut}\n onFocus={() =>\n this._handleFocus(lineId, x2, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData)\n }\n onBlur={this._handleMouseOut}\n onClick={this._onDataPointClick.bind(this, this._points[i].data[j].onDataPointClick)}\n opacity={isLegendSelected && !lastPointHidden ? 1 : 0.01}\n fill={this._getPointFill(lineColor, lastCircleId, j, true)}\n stroke={lineColor}\n strokeWidth={2}\n />,\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 = this._points[i].lineOptions?.lineBorderWidth\n ? Number.parseFloat(this._points[i].lineOptions!.lineBorderWidth!.toString())\n : 0;\n if (lineBorderWidth > 0) {\n bordersForLine.push(\n <line\n id={borderId}\n key={borderId}\n x1={this._xAxisScale(x1)}\n y1={this._yAxisScale(y1)}\n x2={this._xAxisScale(x2)}\n y2={this._yAxisScale(y2)}\n strokeLinecap={this._points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeWidth={Number.parseFloat(strokeWidth.toString()) + lineBorderWidth}\n stroke={this._points[i].lineOptions?.lineBorderColor || theme!.palette.white}\n opacity={1}\n />,\n );\n }\n\n linesForLine.push(\n <line\n id={lineId}\n key={lineId}\n x1={this._xAxisScale(x1)}\n y1={this._yAxisScale(y1)}\n x2={this._xAxisScale(x2)}\n y2={this._yAxisScale(y2)}\n strokeWidth={strokeWidth}\n ref={(e: SVGLineElement | null) => {\n this._refCallback(e!, lineId);\n }}\n onMouseOver={this._handleHover.bind(\n this,\n x1,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n )}\n onMouseMove={this._handleHover.bind(\n this,\n x1,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n )}\n onMouseOut={this._handleMouseOut}\n stroke={lineColor}\n strokeLinecap={this._points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={this._points[i].lineOptions?.strokeDasharray}\n strokeDashoffset={this._points[i].lineOptions?.strokeDashoffset}\n opacity={1}\n onClick={this._onLineClick.bind(this, this._points[i].onLineClick)}\n />,\n );\n }\n } else {\n if (!isInGap) {\n linesForLine.push(\n <line\n id={lineId}\n key={lineId}\n x1={this._xAxisScale(x1)}\n y1={this._yAxisScale(y1)}\n x2={this._xAxisScale(x2)}\n y2={this._yAxisScale(y2)}\n strokeWidth={strokeWidth}\n stroke={lineColor}\n strokeLinecap={this._points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={this._points[i].lineOptions?.strokeDasharray}\n strokeDashoffset={this._points[i].lineOptions?.strokeDashoffset}\n opacity={0.1}\n />,\n );\n }\n }\n }\n lines.push(...bordersForLine, ...linesForLine, ...pointsForLine);\n }\n const classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!this.props.showXAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(this._xAxisScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return lines;\n }\n\n private _createColorFillBars = (containerHeight: number) => {\n const colorFillBars: JSX.Element[] = [];\n if (this.state.isSelectedLegend) {\n this._colorFillBars = this.state.selectedColorBarLegend;\n } else {\n this._colorFillBars = this.props.colorFillBars!;\n }\n for (let i = 0; i < this._colorFillBars.length; i++) {\n const colorFillBar = this._colorFillBars[i];\n const colorFillBarId = getId(colorFillBar.legend.replace(/\\W/g, ''));\n\n if (colorFillBar.applyPattern) {\n // Using a pattern element because CSS was unable to render diagonal stripes for rect elements\n colorFillBars.push(this._getStripePattern(colorFillBar.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 this.state.activeLegend === colorFillBar.legend ||\n this.state.activeLegend === '' ||\n this.state.isSelectedLegend\n ? this._colorFillBarsOpacity\n : 0.1;\n colorFillBars.push(\n <rect\n fill={colorFillBar.applyPattern ? `url(#${this._colorFillBarPatternId}${i})` : colorFillBar.color}\n fillOpacity={opacity}\n x={this._xAxisScale(startX)}\n y={this._yAxisScale(0) - containerHeight}\n width={Math.abs(this._xAxisScale(endX) - this._xAxisScale(startX))}\n height={containerHeight}\n key={`${colorFillBarId}${j}`}\n />,\n );\n }\n }\n return colorFillBars;\n };\n\n private _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={`${this._colorFillBarPatternId}${id}`}\n width={16}\n height={16}\n key={`${this._colorFillBarPatternId}${id}`}\n patternUnits={'userSpaceOnUse'}\n >\n <path d={stripePath} stroke={color} strokeWidth={2} />\n </pattern>\n );\n };\n\n private _checkInGap = (pointIndex: number, gaps: ILineChartGap[], 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 private _refCallback(element: SVGGElement, legendTitle: string): void {\n this._refArray.push({ index: legendTitle, refElement: element });\n }\n\n private _handleFocus = (\n lineId: string,\n x: number | Date,\n\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData?: IAccessibilityProps,\n ) => {\n this._uniqueCallOutID = circleId;\n const formattedData = x instanceof Date ? x.toLocaleDateString() : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const found = find(this._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 if (found) {\n const _this = this;\n d3Select('#' + circleId).attr('aria-labelledby', `toolTip${this._uniqueCallOutID}`);\n d3Select(`#${this._verticalLine}`)\n .attr('transform', () => `translate(${_this._xAxisScale(x)}, 0)`)\n .attr('visibility', 'visibility');\n this._refArray.forEach((obj: IRefArrayData) => {\n if (obj.index === lineId) {\n this.setState({\n isCalloutVisible: true,\n refSelected: obj.refElement,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : '' + formattedData,\n YValueHover: found.values,\n stackCalloutProps: found!,\n dataPointCalloutProps: found!,\n activePoint: circleId,\n xAxisCalloutAccessibilityData,\n });\n }\n });\n } else {\n this.setState({\n activePoint: circleId,\n });\n }\n };\n\n private _handleHover = (\n x: number | Date,\n xAxisCalloutData: string,\n circleId: string,\n xAxisCalloutAccessibilityData: IAccessibilityProps,\n mouseEvent: React.MouseEvent<SVGElement>,\n ) => {\n mouseEvent.persist();\n this._uniqueCallOutID = circleId;\n const formattedData = x instanceof Date ? x.toLocaleDateString() : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const _this = this;\n const found = find(this._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 if (found) {\n d3Select(`#${this._verticalLine}`)\n .attr('transform', () => `translate(${_this._xAxisScale(x)}, 0)`)\n .attr('visibility', 'visibility');\n this.setState({\n isCalloutVisible: true,\n refSelected: mouseEvent,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : '' + formattedData,\n YValueHover: found.values,\n stackCalloutProps: found!,\n dataPointCalloutProps: found!,\n activePoint: circleId,\n xAxisCalloutAccessibilityData,\n });\n } else {\n this.setState({\n activePoint: circleId,\n });\n }\n };\n\n private _onLineClick = (func: () => void) => {\n if (func) {\n func();\n }\n };\n\n private _onDataPointClick = (func: () => void) => {\n if (func) {\n func();\n }\n };\n\n private _handleMouseOut = () => {\n d3Select(`#${this._verticalLine}`).attr('visibility', 'hidden');\n this.setState({\n isCalloutVisible: false,\n activePoint: '',\n });\n };\n\n private _handleLegendClick = (\n lineChartItem: LineChartDataWithIndex | IColorFillBarsProps,\n selectedLegend: string | null | string[],\n ): void => {\n if (lineChartItem.onLegendClick) {\n lineChartItem.onLegendClick(selectedLegend);\n }\n };\n\n private _handleMultipleLineLegendSelectionAction = (selectedLine: LineChartDataWithIndex) => {\n const selectedLineIndex = this.state.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 = [...this.state.selectedLegendPoints, selectedLine];\n } else {\n selectedLines = this.state.selectedLegendPoints\n .slice(0, selectedLineIndex)\n .concat(this.state.selectedLegendPoints.slice(selectedLineIndex + 1));\n }\n\n const areAllLineLegendsSelected = this.props.data && selectedLines.length === this.props.data.lineChartData!.length;\n\n if (\n areAllLineLegendsSelected &&\n ((this.props.colorFillBars && this.props.colorFillBars.length === this.state.selectedColorBarLegend.length) ||\n !this.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 this._clearMultipleLegendSelections();\n } else if (!selectedLines.length && !this.state.selectedColorBarLegend.length) {\n // Clear all legends if no legends including color fill bar legends are selected\n this._clearMultipleLegendSelections();\n } else {\n // Otherwise, set state when one or more legends are selected, including color fill bar legends\n this.setState({\n selectedLegendPoints: selectedLines,\n isSelectedLegend: true,\n });\n }\n\n const selectedLegendTitlesToPass = selectedLines.map((line: LineChartDataWithIndex) => line.legend);\n this._handleLegendClick(selectedLine, selectedLegendTitlesToPass);\n };\n\n private _handleMultipleColorFillBarLegendSelectionAction = (selectedColorFillBar: IColorFillBarsProps) => {\n const selectedColorFillBarIndex = this.state.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: IColorFillBarsProps[];\n if (selectedColorFillBarIndex === -1) {\n selectedColorFillBars = [...this.state.selectedColorBarLegend, selectedColorFillBar];\n } else {\n selectedColorFillBars = this.state.selectedColorBarLegend\n .slice(0, selectedColorFillBarIndex)\n .concat(this.state.selectedColorBarLegend.slice(selectedColorFillBarIndex + 1));\n }\n\n const areAllColorFillBarLegendsSelected =\n selectedColorFillBars.length === (this.props.colorFillBars && this.props.colorFillBars!.length);\n\n if (\n areAllColorFillBarLegendsSelected &&\n ((this.props.data && this.props.data.lineChartData!.length === this.state.selectedLegendPoints.length) ||\n !this.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 this._clearMultipleLegendSelections();\n } else if (!selectedColorFillBars.length && !this.state.selectedLegendPoints.length) {\n // Clear all legends if no legends are selected, including line legends\n this._clearMultipleLegendSelections();\n } else {\n // set state when one or more legends are selected, including line legends\n this.setState({\n selectedColorBarLegend: selectedColorFillBars,\n isSelectedLegend: true,\n });\n }\n\n const selectedLegendTitlesToPass = selectedColorFillBars.map(\n (colorFillBar: IColorFillBarsProps) => colorFillBar.legend,\n );\n this._handleLegendClick(selectedColorFillBar, selectedLegendTitlesToPass);\n };\n\n private _clearMultipleLegendSelections = () => {\n this.setState({\n selectedColorBarLegend: [],\n selectedLegendPoints: [],\n isSelectedLegend: false,\n });\n };\n}\n"]}
|