@fluentui/react-charting 5.19.44 → 5.20.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 +39 -1
- package/CHANGELOG.md +24 -2
- package/dist/react-charting.d.ts +4 -0
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +1 -0
- package/lib/components/AreaChart/AreaChart.base.js +2 -2
- package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +5 -4
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib/components/Legends/Legends.base.js +2 -2
- package/lib/components/Legends/Legends.base.js.map +1 -1
- package/lib/components/Legends/Legends.types.d.ts +4 -0
- package/lib/components/Legends/Legends.types.js.map +1 -1
- package/lib/components/LineChart/LineChart.base.js +2 -2
- package/lib/components/LineChart/LineChart.base.js.map +1 -1
- package/lib/components/Sparkline/Sparkline.base.js +2 -2
- package/lib/components/Sparkline/Sparkline.base.js.map +1 -1
- package/lib/utilities/utilities.js +5 -4
- package/lib/utilities/utilities.js.map +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/lib-amd/components/AreaChart/AreaChart.base.js +1 -1
- package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +4 -3
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-amd/components/Legends/Legends.base.js +2 -2
- package/lib-amd/components/Legends/Legends.base.js.map +1 -1
- package/lib-amd/components/Legends/Legends.types.d.ts +4 -0
- package/lib-amd/components/Legends/Legends.types.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.base.js +1 -1
- package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-amd/components/Sparkline/Sparkline.base.js +2 -2
- package/lib-amd/components/Sparkline/Sparkline.base.js.map +1 -1
- package/lib-amd/utilities/utilities.js +4 -3
- package/lib-amd/utilities/utilities.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.js +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +4 -3
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.base.js +2 -2
- package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.types.d.ts +4 -0
- package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.js +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-commonjs/components/Sparkline/Sparkline.base.js +2 -2
- package/lib-commonjs/components/Sparkline/Sparkline.base.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +4 -3
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/lib-commonjs/version.js +1 -1
- package/lib-commonjs/version.js.map +1 -1
- package/package.json +17 -17
- package/src/components/Legends/Legends.types.ts +5 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AreaChart.base.js","sourceRoot":"../src/","sources":["components/AreaChart/AreaChart.base.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAC/B,qCAAkD;AAClD,6CAA2C;AAC3C,6CAAkD;AAClD,qCAA4G;AAC5G,2DAAiG;AACjG,qCAYqB;AACrB,2DAAiE;AACjE,+CAS+B;AAC/B,0CAAoD;AACpD,uDAA8D;AAE9D,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA0C,CAAC;AAEnF,8DAA8D;AAC9D,IAAM,MAAM,GAA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AK,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC;YACxC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAtB,CAAsB,CAAC,CAAC,MAAM,KAAK,CAAC,CAClF;QACD,oCAAoC;QACpC,+FAA+F;QAC/F,iCAAiC;SAClC,CAAC;IACJ,CAAC;IACH,oBAAC;AAAD,CAAC,AA/0BD,CAAmC,KAAK,CAAC,SAAS,GA+0BjD;AA/0BY,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 { classNamesFunction, find, getId, memoizeFunction } from '@fluentui/react/lib/Utilities';\nimport {\n IAccessibilityProps,\n CartesianChart,\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 getNextColor,\n getColorFromToken,\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}\nexport interface IMapXToDataSet {\n [key: string]: ILineChartDataPoint[];\n [key: number]: ILineChartDataPoint[];\n}\n\n//by default d3-shape 3.2.0 limits the< path> data point precision to 3 digits(d3/d3-path#10)\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 isShowCalloutPending: boolean;\n /** focused point */\n activePoint: string;\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 private _createSet: (data: ILineChartPoints[]) => {\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 private _highlightedCircleId: string;\n //enableComputationOptimization is used for optimized code to group data points by x value\n //from O(n^2) to O(n) using a map.\n private _enableComputationOptimization: boolean;\n private _firstRenderOptimization: boolean;\n private _emptyChartId: string;\n\n public constructor(props: IAreaChartProps) {\n super(props);\n this._createSet = memoizeFunction(this._createDataSet);\n this.state = {\n selectedLegend: '',\n activeLegend: '',\n hoverXValue: '',\n isCalloutVisible: false,\n refSelected: null,\n YValueHover: [],\n lineXValue: 0,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n nearestCircleToHighlight: null,\n isShowCalloutPending: false,\n activePoint: '',\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 this._enableComputationOptimization = true;\n this._firstRenderOptimization = true;\n this._emptyChartId = getId('_AreaChart_empty');\n }\n\n public componentDidUpdate() {\n if (this.state.isShowCalloutPending) {\n this.setState({\n refSelected: `#${this._highlightedCircleId}`,\n isCalloutVisible: true,\n isShowCalloutPending: false,\n });\n }\n }\n\n public render(): JSX.Element {\n if (!this._isChartEmpty()) {\n const { lineChartData, chartTitle } = this.props.data;\n const points = this._addDefaultColors(lineChartData);\n const { colors, opacity, stackedInfo, calloutPoints } = this._createSet(points);\n this._calloutPoints = calloutPoints;\n const isXAxisDateType = getXAxisType(points);\n this._colors = colors;\n this._opacity = opacity;\n this._stackedData = stackedInfo.stackedData;\n const legends: JSX.Element = this._getLegendData(points);\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.topAutoEdge,\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n id: `toolTip${this._uniqueCallOutID}`,\n gapSpace: 15,\n isBeakVisible: false,\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={points}\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 onChartMouseLeave={this._handleChartMouseLeave}\n enableFirstRenderOptimization={this.props.enablePerfOptimization && this._firstRenderOptimization}\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 return (\n <div\n id={this._emptyChartId}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\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 const pointToHighlightUpdated = this.state.nearestCircleToHighlight !== nearestCircleToHighlight;\n // if no points need to be called out then don't show vertical line and callout card\n if (found && pointToHighlightUpdated && !this.state.isShowCalloutPending) {\n this.setState({\n nearestCircleToHighlight: nearestCircleToHighlight,\n isCalloutVisible: false,\n isShowCalloutPending: true,\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 activePoint: '',\n });\n } else {\n /*\n When above if condition is false but found=true, it means either\n\n 1). pointToHighlightUpdated is false.\n For this case we dont need to do anything.\n\n 2). isShowCalloutPending is true.\n For this case there will be no callout updation for the event.\n This condition has been added to prevent repeated callout flashing.\n Currently there is a fraction of second delay between hover event and subsequent callout refresh.\n In the meantime if another event is received, the callout continues to flash for the set of\n intermediate hover events.\n\n This does not cause any issue as the user interaction takes atleast a fraction of second and the final\n callout state is ultimately achieved.\n If a user performs very swift mouse maneuver, the intermediate events will be lost but the callout experience\n remains smooth.\n */\n }\n if (!found) {\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 /**/\n };\n\n private _handleChartMouseLeave = () => {\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 if (this.props.enablePerfOptimization && this._enableComputationOptimization) {\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 const mapOfXvalToListOfDataPoints: IMapXToDataSet = {};\n allChartPoints.forEach((dataPoint: ILineChartDataPoint) => {\n const xValue = dataPoint.x instanceof Date ? dataPoint.x.toLocaleString() : dataPoint.x;\n // map of x value to the list of data points which share the same x value .\n if (mapOfXvalToListOfDataPoints[xValue]) {\n mapOfXvalToListOfDataPoints[xValue].push(dataPoint);\n } else {\n mapOfXvalToListOfDataPoints[xValue] = [dataPoint];\n }\n });\n\n Object.keys(mapOfXvalToListOfDataPoints).forEach((key: number | string) => {\n const value: ILineChartDataPoint[] = mapOfXvalToListOfDataPoints[key];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDataset: any = {};\n value.forEach((singleDataPoint: ILineChartDataPoint, index: number) => {\n singleDataset.xVal = singleDataPoint.x;\n singleDataset[`chart${index}`] = singleDataPoint.y;\n });\n dataSet.push(singleDataset);\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 } else {\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\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(legend: string): void {\n if (this.state.selectedLegend === legend) {\n this.setState({\n selectedLegend: '',\n });\n } else {\n this.setState({\n selectedLegend: legend,\n });\n }\n }\n\n private _onLegendHover(legend: string): void {\n this.setState({\n activeLegend: legend,\n });\n }\n\n private _onLegendLeave(): void {\n this.setState({\n activeLegend: '',\n });\n }\n\n private _getLegendData = (points: ILineChartPoints[]): JSX.Element => {\n const data = points;\n const actions: ILegend[] = [];\n\n data.forEach((singleChartData: ILineChartPoints) => {\n const color: string = singleChartData.color!;\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._handleChartMouseLeave();\n this._onLegendHover(singleChartData.legend);\n },\n onMouseOutAction: () => {\n this._onLegendLeave();\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 = (legend: string): number => {\n if (!this._isMultiStackChart) {\n return 0.7;\n } else {\n const opacity = this._legendHighlighted(legend) || this._noLegendHighlighted() ? 0.7 : 0.1;\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._noLegendHighlighted()) {\n opacity = this._legendHighlighted(legend) ? 0 : 0.1;\n }\n return opacity;\n }\n };\n\n private _updateCircleFillColor = (xDataPoint: number | Date, lineColor: string, circleId: string): string => {\n let fillColor = lineColor;\n if (this.state.nearestCircleToHighlight === xDataPoint || this.state.activePoint === circleId) {\n this._highlightedCircleId = circleId;\n if (!this.state.isCircleClicked) {\n fillColor = this.props.theme!.semanticColors.bodyBackground;\n }\n }\n\n return fillColor;\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._addDefaultColors(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 {this.props.enableGradient && (\n <defs>\n <linearGradient id={`gradient_${index}`} x1=\"0%\" x2=\"0%\" y1=\"0%\" y2=\"100%\">\n <stop offset=\"0\" stopColor={this._colors[index]} />\n <stop offset=\"100%\" stopColor=\"transparent\" />\n </linearGradient>\n </defs>\n )}\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 {singleStackedData.length === 1 ? (\n <circle\n id={`${index}-graph-${this._uniqueIdForGraph}`}\n cx={xScale(singleStackedData[0].xVal)}\n cy={yScale(singleStackedData[0].values[1])}\n r={6}\n stroke={this._colors[index]}\n strokeWidth={3}\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 ) : (\n <path\n id={`${index}-graph-${this._uniqueIdForGraph}`}\n d={area(singleStackedData)!}\n fill={this.props.enableGradient ? `url(#gradient_${index})` : 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 {...(this.props.optimizeLargeData && {\n 'data-is-focusable': this._legendHighlighted(points[index]!.legend) || this._noLegendHighlighted(),\n role: 'img',\n 'aria-label': `${points[index].legend}, series ${index + 1} of ${points.length} with ${\n points[index].data.length\n } data points.`,\n })}\n />\n )}\n </React.Fragment>,\n );\n });\n\n const circleRadius = pointOptions && pointOptions.r ? Number(pointOptions.r) : 8;\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\n if (!this.props.optimizeLargeData || singleStackedData.length === 1) {\n // Render circles for all data points\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={this._legendHighlighted(points[index]!.legend) || this._noLegendHighlighted()}\n cx={xScale(singlePoint.xVal)}\n cy={yScale(singlePoint.values[1])}\n stroke={lineColor}\n strokeWidth={3}\n fill={this._updateCircleFillColor(xDataPoint, lineColor, circleId)}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n onClick={this._onDataPointClick.bind(this, points[index]!.data[pointIndex].onDataPointClick!)}\n onFocus={() => this._handleFocus(index, pointIndex, circleId)}\n onBlur={this._handleBlur}\n {...pointOptions}\n r={this._getCircleRadius(xDataPoint, circleRadius, circleId)}\n role=\"img\"\n aria-label={this._getAriaLabel(index, pointIndex)}\n />\n );\n })}\n </g>,\n );\n } else {\n // Render circles for data points close to the mouse pointer only\n singleStackedData.forEach((singlePoint: IDPointType, pointIndex: number) => {\n const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal;\n if (this.state.nearestCircleToHighlight === xDataPoint) {\n const circleId = `${this._circleId}_${index * this._stackedData[0].length + pointIndex}`;\n lineColor = points[index]!.color!;\n graph.push(\n <circle\n key={circleId}\n id={circleId}\n cx={xScale(singlePoint.xVal)}\n cy={yScale(singlePoint.values[1])}\n stroke={lineColor}\n strokeWidth={3}\n fill={this._updateCircleFillColor(xDataPoint, lineColor, circleId)}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n onClick={this._onDataPointClick.bind(this, points[index]!.data[pointIndex].onDataPointClick!)}\n {...pointOptions}\n r={this._getCircleRadius(xDataPoint, circleRadius, circleId)}\n />,\n );\n }\n });\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, circleRadius: number, circleId: string): number => {\n const { isCircleClicked, nearestCircleToHighlight, activePoint } = this.state;\n if (isCircleClicked && nearestCircleToHighlight === xDataPoint) {\n return 1;\n } else if (nearestCircleToHighlight === xDataPoint || activePoint === circleId) {\n return circleRadius;\n } else {\n return 0;\n }\n };\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legend: string) => {\n return (\n this.state.selectedLegend === legend || (this.state.selectedLegend === '' && this.state.activeLegend === legend)\n );\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this.state.selectedLegend === '' && this.state.activeLegend === '';\n };\n\n private _addDefaultColors = (lineChartData?: ILineChartPoints[]): ILineChartPoints[] => {\n return lineChartData\n ? lineChartData.map((item, index) => {\n let color: string;\n // isInverted property is applicable to v8 themes only\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0, this.props.theme?.isInverted);\n } else {\n color = getColorFromToken(item.color, this.props.theme?.isInverted);\n }\n\n return { ...item, color };\n })\n : [];\n };\n\n private _handleFocus = (lineIndex: number, pointIndex: number, circleId: string) => {\n const { x, y, xAxisCalloutData } = this.props.data.lineChartData![lineIndex].data[pointIndex];\n const formattedDate = x instanceof Date ? x.toLocaleString() : x;\n const modifiedXVal = x instanceof Date ? x.getTime() : x;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = this._calloutPoints.find((e: { x: string | number }) => e.x === modifiedXVal);\n // Show details in the callout for the focused point only\n found.values = found.values.filter((e: { y: number }) => e.y === y);\n\n this.setState({\n refSelected: `#${circleId}`,\n isCalloutVisible: true,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : formattedDate,\n YValueHover: found.values,\n stackCalloutProps: found,\n dataPointCalloutProps: found,\n activePoint: circleId,\n });\n };\n\n private _handleBlur = () => {\n this.setState({\n refSelected: null,\n isCalloutVisible: false,\n hoverXValue: undefined,\n YValueHover: [],\n stackCalloutProps: undefined,\n dataPointCalloutProps: undefined,\n activePoint: '',\n });\n };\n\n private _getAriaLabel(lineIndex: number, pointIndex: number): string {\n const line = this.props.data.lineChartData![lineIndex];\n const point = line.data[pointIndex];\n const formattedDate = point.x instanceof Date ? point.x.toLocaleString() : point.x;\n const xValue = point.xAxisCalloutData || formattedDate;\n const legend = line.legend;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n private _isChartEmpty(): boolean {\n return !(\n (\n this.props.data &&\n this.props.data.lineChartData &&\n this.props.data.lineChartData.length > 0 &&\n this.props.data.lineChartData.filter(item => item.data.length === 0).length === 0\n )\n // if all the data sets have no data\n // filtering all items which have no data and checking if the length of the filtered array is 0\n // which means chart is not empty\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AreaChart.base.js","sourceRoot":"../src/","sources":["components/AreaChart/AreaChart.base.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAC/B,qCAAkD;AAClD,6CA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AAS,KAAI,UAAG,MAAM,eAAK,MAAM,eAAK,MAAM,MAAG,CAAC;IACzF,CAAC;IAEO,qCAAa,GAArB;QACE,OAAO,CAAC,CACN,CACE,IAAI,CAAC,KAAK,CAAC,IAAI;YACf,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa;YAC7B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC;YACxC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAtB,CAAsB,CAAC,CAAC,MAAM,KAAK,CAAC,CAClF;QACD,oCAAoC;QACpC,+FAA+F;QAC/F,iCAAiC;SAClC,CAAC;IACJ,CAAC;IACH,oBAAC;AAAD,CAAC,AA/0BD,CAAmC,KAAK,CAAC,SAAS,GA+0BjD;AA/0BY,sCAAa","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, bisector } from 'd3-array';\nimport { pointer } 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 { classNamesFunction, find, getId, memoizeFunction } from '@fluentui/react/lib/Utilities';\nimport {\n IAccessibilityProps,\n CartesianChart,\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 getNextColor,\n getColorFromToken,\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}\nexport interface IMapXToDataSet {\n [key: string]: ILineChartDataPoint[];\n [key: number]: ILineChartDataPoint[];\n}\n\n//by default d3-shape 3.2.0 limits the< path> data point precision to 3 digits(d3/d3-path#10)\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 isShowCalloutPending: boolean;\n /** focused point */\n activePoint: string;\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 private _createSet: (data: ILineChartPoints[]) => {\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 private _highlightedCircleId: string;\n //enableComputationOptimization is used for optimized code to group data points by x value\n //from O(n^2) to O(n) using a map.\n private _enableComputationOptimization: boolean;\n private _firstRenderOptimization: boolean;\n private _emptyChartId: string;\n\n public constructor(props: IAreaChartProps) {\n super(props);\n this._createSet = memoizeFunction(this._createDataSet);\n this.state = {\n selectedLegend: '',\n activeLegend: '',\n hoverXValue: '',\n isCalloutVisible: false,\n refSelected: null,\n YValueHover: [],\n lineXValue: 0,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n nearestCircleToHighlight: null,\n isShowCalloutPending: false,\n activePoint: '',\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 this._enableComputationOptimization = true;\n this._firstRenderOptimization = true;\n this._emptyChartId = getId('_AreaChart_empty');\n }\n\n public componentDidUpdate() {\n if (this.state.isShowCalloutPending) {\n this.setState({\n refSelected: `#${this._highlightedCircleId}`,\n isCalloutVisible: true,\n isShowCalloutPending: false,\n });\n }\n }\n\n public render(): JSX.Element {\n if (!this._isChartEmpty()) {\n const { lineChartData, chartTitle } = this.props.data;\n const points = this._addDefaultColors(lineChartData);\n const { colors, opacity, stackedInfo, calloutPoints } = this._createSet(points);\n this._calloutPoints = calloutPoints;\n const isXAxisDateType = getXAxisType(points);\n this._colors = colors;\n this._opacity = opacity;\n this._stackedData = stackedInfo.stackedData;\n const legends: JSX.Element = this._getLegendData(points);\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.topAutoEdge,\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n id: `toolTip${this._uniqueCallOutID}`,\n gapSpace: 15,\n isBeakVisible: false,\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={points}\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 onChartMouseLeave={this._handleChartMouseLeave}\n enableFirstRenderOptimization={this.props.enablePerfOptimization && this._firstRenderOptimization}\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 return (\n <div\n id={this._emptyChartId}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\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(pointer(mouseEvent)[0], document.getElementById(this._rectId)!);\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 const pointToHighlightUpdated = this.state.nearestCircleToHighlight !== nearestCircleToHighlight;\n // if no points need to be called out then don't show vertical line and callout card\n if (found && pointToHighlightUpdated && !this.state.isShowCalloutPending) {\n this.setState({\n nearestCircleToHighlight: nearestCircleToHighlight,\n isCalloutVisible: false,\n isShowCalloutPending: true,\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 activePoint: '',\n });\n } else {\n /*\n When above if condition is false but found=true, it means either\n\n 1). pointToHighlightUpdated is false.\n For this case we dont need to do anything.\n\n 2). isShowCalloutPending is true.\n For this case there will be no callout updation for the event.\n This condition has been added to prevent repeated callout flashing.\n Currently there is a fraction of second delay between hover event and subsequent callout refresh.\n In the meantime if another event is received, the callout continues to flash for the set of\n intermediate hover events.\n\n This does not cause any issue as the user interaction takes atleast a fraction of second and the final\n callout state is ultimately achieved.\n If a user performs very swift mouse maneuver, the intermediate events will be lost but the callout experience\n remains smooth.\n */\n }\n if (!found) {\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 /**/\n };\n\n private _handleChartMouseLeave = () => {\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 if (this.props.enablePerfOptimization && this._enableComputationOptimization) {\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 const mapOfXvalToListOfDataPoints: IMapXToDataSet = {};\n allChartPoints.forEach((dataPoint: ILineChartDataPoint) => {\n const xValue = dataPoint.x instanceof Date ? dataPoint.x.toLocaleString() : dataPoint.x;\n // map of x value to the list of data points which share the same x value .\n if (mapOfXvalToListOfDataPoints[xValue]) {\n mapOfXvalToListOfDataPoints[xValue].push(dataPoint);\n } else {\n mapOfXvalToListOfDataPoints[xValue] = [dataPoint];\n }\n });\n\n Object.keys(mapOfXvalToListOfDataPoints).forEach((key: number | string) => {\n const value: ILineChartDataPoint[] = mapOfXvalToListOfDataPoints[key];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDataset: any = {};\n value.forEach((singleDataPoint: ILineChartDataPoint, index: number) => {\n singleDataset.xVal = singleDataPoint.x;\n singleDataset[`chart${index}`] = singleDataPoint.y;\n });\n dataSet.push(singleDataset);\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 } else {\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\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(legend: string): void {\n if (this.state.selectedLegend === legend) {\n this.setState({\n selectedLegend: '',\n });\n } else {\n this.setState({\n selectedLegend: legend,\n });\n }\n }\n\n private _onLegendHover(legend: string): void {\n this.setState({\n activeLegend: legend,\n });\n }\n\n private _onLegendLeave(): void {\n this.setState({\n activeLegend: '',\n });\n }\n\n private _getLegendData = (points: ILineChartPoints[]): JSX.Element => {\n const data = points;\n const actions: ILegend[] = [];\n\n data.forEach((singleChartData: ILineChartPoints) => {\n const color: string = singleChartData.color!;\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._handleChartMouseLeave();\n this._onLegendHover(singleChartData.legend);\n },\n onMouseOutAction: () => {\n this._onLegendLeave();\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 = (legend: string): number => {\n if (!this._isMultiStackChart) {\n return 0.7;\n } else {\n const opacity = this._legendHighlighted(legend) || this._noLegendHighlighted() ? 0.7 : 0.1;\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._noLegendHighlighted()) {\n opacity = this._legendHighlighted(legend) ? 0 : 0.1;\n }\n return opacity;\n }\n };\n\n private _updateCircleFillColor = (xDataPoint: number | Date, lineColor: string, circleId: string): string => {\n let fillColor = lineColor;\n if (this.state.nearestCircleToHighlight === xDataPoint || this.state.activePoint === circleId) {\n this._highlightedCircleId = circleId;\n if (!this.state.isCircleClicked) {\n fillColor = this.props.theme!.semanticColors.bodyBackground;\n }\n }\n\n return fillColor;\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._addDefaultColors(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 {this.props.enableGradient && (\n <defs>\n <linearGradient id={`gradient_${index}`} x1=\"0%\" x2=\"0%\" y1=\"0%\" y2=\"100%\">\n <stop offset=\"0\" stopColor={this._colors[index]} />\n <stop offset=\"100%\" stopColor=\"transparent\" />\n </linearGradient>\n </defs>\n )}\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 {singleStackedData.length === 1 ? (\n <circle\n id={`${index}-graph-${this._uniqueIdForGraph}`}\n cx={xScale(singleStackedData[0].xVal)}\n cy={yScale(singleStackedData[0].values[1])}\n r={6}\n stroke={this._colors[index]}\n strokeWidth={3}\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 ) : (\n <path\n id={`${index}-graph-${this._uniqueIdForGraph}`}\n d={area(singleStackedData)!}\n fill={this.props.enableGradient ? `url(#gradient_${index})` : 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 {...(this.props.optimizeLargeData && {\n 'data-is-focusable': this._legendHighlighted(points[index]!.legend) || this._noLegendHighlighted(),\n role: 'img',\n 'aria-label': `${points[index].legend}, series ${index + 1} of ${points.length} with ${\n points[index].data.length\n } data points.`,\n })}\n />\n )}\n </React.Fragment>,\n );\n });\n\n const circleRadius = pointOptions && pointOptions.r ? Number(pointOptions.r) : 8;\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\n if (!this.props.optimizeLargeData || singleStackedData.length === 1) {\n // Render circles for all data points\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={this._legendHighlighted(points[index]!.legend) || this._noLegendHighlighted()}\n cx={xScale(singlePoint.xVal)}\n cy={yScale(singlePoint.values[1])}\n stroke={lineColor}\n strokeWidth={3}\n fill={this._updateCircleFillColor(xDataPoint, lineColor, circleId)}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n onClick={this._onDataPointClick.bind(this, points[index]!.data[pointIndex].onDataPointClick!)}\n onFocus={() => this._handleFocus(index, pointIndex, circleId)}\n onBlur={this._handleBlur}\n {...pointOptions}\n r={this._getCircleRadius(xDataPoint, circleRadius, circleId)}\n role=\"img\"\n aria-label={this._getAriaLabel(index, pointIndex)}\n />\n );\n })}\n </g>,\n );\n } else {\n // Render circles for data points close to the mouse pointer only\n singleStackedData.forEach((singlePoint: IDPointType, pointIndex: number) => {\n const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal;\n if (this.state.nearestCircleToHighlight === xDataPoint) {\n const circleId = `${this._circleId}_${index * this._stackedData[0].length + pointIndex}`;\n lineColor = points[index]!.color!;\n graph.push(\n <circle\n key={circleId}\n id={circleId}\n cx={xScale(singlePoint.xVal)}\n cy={yScale(singlePoint.values[1])}\n stroke={lineColor}\n strokeWidth={3}\n fill={this._updateCircleFillColor(xDataPoint, lineColor, circleId)}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n onClick={this._onDataPointClick.bind(this, points[index]!.data[pointIndex].onDataPointClick!)}\n {...pointOptions}\n r={this._getCircleRadius(xDataPoint, circleRadius, circleId)}\n />,\n );\n }\n });\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, circleRadius: number, circleId: string): number => {\n const { isCircleClicked, nearestCircleToHighlight, activePoint } = this.state;\n if (isCircleClicked && nearestCircleToHighlight === xDataPoint) {\n return 1;\n } else if (nearestCircleToHighlight === xDataPoint || activePoint === circleId) {\n return circleRadius;\n } else {\n return 0;\n }\n };\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legend: string) => {\n return (\n this.state.selectedLegend === legend || (this.state.selectedLegend === '' && this.state.activeLegend === legend)\n );\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this.state.selectedLegend === '' && this.state.activeLegend === '';\n };\n\n private _addDefaultColors = (lineChartData?: ILineChartPoints[]): ILineChartPoints[] => {\n return lineChartData\n ? lineChartData.map((item, index) => {\n let color: string;\n // isInverted property is applicable to v8 themes only\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0, this.props.theme?.isInverted);\n } else {\n color = getColorFromToken(item.color, this.props.theme?.isInverted);\n }\n\n return { ...item, color };\n })\n : [];\n };\n\n private _handleFocus = (lineIndex: number, pointIndex: number, circleId: string) => {\n const { x, y, xAxisCalloutData } = this.props.data.lineChartData![lineIndex].data[pointIndex];\n const formattedDate = x instanceof Date ? x.toLocaleString() : x;\n const modifiedXVal = x instanceof Date ? x.getTime() : x;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = this._calloutPoints.find((e: { x: string | number }) => e.x === modifiedXVal);\n // Show details in the callout for the focused point only\n found.values = found.values.filter((e: { y: number }) => e.y === y);\n\n this.setState({\n refSelected: `#${circleId}`,\n isCalloutVisible: true,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : formattedDate,\n YValueHover: found.values,\n stackCalloutProps: found,\n dataPointCalloutProps: found,\n activePoint: circleId,\n });\n };\n\n private _handleBlur = () => {\n this.setState({\n refSelected: null,\n isCalloutVisible: false,\n hoverXValue: undefined,\n YValueHover: [],\n stackCalloutProps: undefined,\n dataPointCalloutProps: undefined,\n activePoint: '',\n });\n };\n\n private _getAriaLabel(lineIndex: number, pointIndex: number): string {\n const line = this.props.data.lineChartData![lineIndex];\n const point = line.data[pointIndex];\n const formattedDate = point.x instanceof Date ? point.x.toLocaleString() : point.x;\n const xValue = point.xAxisCalloutData || formattedDate;\n const legend = line.legend;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n private _isChartEmpty(): boolean {\n return !(\n (\n this.props.data &&\n this.props.data.lineChartData &&\n this.props.data.lineChartData.length > 0 &&\n this.props.data.lineChartData.filter(item => item.data.length === 0).length === 0\n )\n // if all the data sets have no data\n // filtering all items which have no data and checking if the length of the filtered array is 0\n // which means chart is not empty\n );\n }\n}\n"]}
|
package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js
CHANGED
|
@@ -375,13 +375,14 @@ var HorizontalBarChartWithAxisBase = /** @class */ (function (_super) {
|
|
|
375
375
|
var _loop_1 = function (i) {
|
|
376
376
|
var d1 = tickObject[i];
|
|
377
377
|
(0, d3_selection_1.select)(d1)
|
|
378
|
-
|
|
378
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
379
|
+
.on('mouseover', function (event, d) {
|
|
379
380
|
if (!_this.state.tooltipElement) {
|
|
380
381
|
div.style('opacity', 0.9);
|
|
381
382
|
div
|
|
382
383
|
.html(originalDataArray[i])
|
|
383
|
-
.style('left',
|
|
384
|
-
.style('top',
|
|
384
|
+
.style('left', event.pageX + 'px')
|
|
385
|
+
.style('top', event.pageY - 28 + 'px');
|
|
385
386
|
}
|
|
386
387
|
})
|
|
387
388
|
.on('mouseout', function (d) {
|
package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalBarChartWithAxis.base.js","sourceRoot":"../src/","sources":["components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAC/B,qCAAwC;AACxC,6CAAoE;AACpE,qCAAgH;AAChH,2DAAkF;AAElF,uDAA8D;AAE9D,4DAA2D;AAS3D,qEAAoE;AAMpE,qDAA2D;AAC3D,+CAW+B;AAE/B,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA4E,CAAC;AAiBrH;IAAoD,0DAGnD;IAiBC,wCAAmB,KAAuC;QAA1D,YACE,kBAAM,KAAK,CAAC,SA0Bb;QApCO,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;QA6G3B,iBAAW,GAAG,UAAC,OAAiB;Y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AA8B","sourcesContent":["import * as React from 'react';\nimport { max as d3Max } from 'd3-array';\nimport { select as d3Select, event as d3Event } from 'd3-selection';\nimport { scaleLinear as d3ScaleLinear, ScaleLinear as D3ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\nimport { classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { ILegend } from '../../components/Legends/Legends.types';\nimport { Legends } from '../../components/Legends/Legends';\nimport {\n IAccessibilityProps,\n IBasestate,\n IHorizontalBarChartWithAxisDataPoint,\n IRefArrayData,\n IMargins,\n} from '../../types/IDataPoint';\nimport { IChildProps, IYValueHover } from '../CommonComponents/CartesianChart.types';\nimport { CartesianChart } from '../CommonComponents/CartesianChart';\nimport {\n IHorizontalBarChartWithAxisProps,\n IHorizontalBarChartWithAxisStyleProps,\n IHorizontalBarChartWithAxisStyles,\n} from './HorizontalBarChartWithAxis.types';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartHoverCard,\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n YAxisType,\n XAxisTypes,\n NumericAxis,\n StringAxis,\n getTypeOfAxis,\n getNextColor,\n} from '../../utilities/index';\n\nconst getClassNames = classNamesFunction<IHorizontalBarChartWithAxisStyleProps, IHorizontalBarChartWithAxisStyles>();\nexport interface IHorizontalBarChartWithAxisState extends IBasestate {\n selectedLegendTitle: string;\n dataPointCalloutProps?: IHorizontalBarChartWithAxisDataPoint; // define this in hover and focus\n /**\n * data point of x, where rectangle is hovered or focused\n */\n activeXdataPoint: number | null;\n YValueHover: IYValueHover[];\n hoverXValue?: string | number | null;\n callOutAccessibilityData?: IAccessibilityProps;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n tooltipElement?: any;\n}\n\ntype ColorScale = (_p?: number) => string;\n\nexport class HorizontalBarChartWithAxisBase extends React.Component<\n IHorizontalBarChartWithAxisProps,\n IHorizontalBarChartWithAxisState\n> {\n private _points: IHorizontalBarChartWithAxisDataPoint[];\n private _barHeight: number;\n private _colors: string[];\n private _classNames: IProcessedStyleSet<IHorizontalBarChartWithAxisStyles>;\n private _refArray: IRefArrayData[];\n private _calloutId: string;\n private margins: IMargins;\n private _isRtl: boolean = getRTL();\n private _bars: JSX.Element[];\n private _yAxisLabels: string[];\n private _xMax: number;\n private _tooltipId: string;\n private _xAxisType: XAxisTypes;\n private _yAxisType: YAxisType;\n private _calloutAnchorPoint: IHorizontalBarChartWithAxisDataPoint | null;\n\n public constructor(props: IHorizontalBarChartWithAxisProps) {\n super(props);\n this.state = {\n color: '',\n dataForHoverCard: 0,\n isCalloutVisible: false,\n isLegendSelected: false,\n isLegendHovered: false,\n refSelected: null,\n selectedLegendTitle: '',\n xCalloutValue: '',\n yCalloutValue: '',\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n };\n this._calloutId = getId('callout');\n this._tooltipId = getId('HBCWATooltipID_');\n this._refArray = [];\n this._xAxisType =\n this.props.data! && this.props.data!.length > 0\n ? (getTypeOfAxis(this.props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.NumericAxis;\n this._yAxisType =\n this.props.data! && this.props.data!.length > 0\n ? (getTypeOfAxis(this.props.data![0].y, false) as YAxisType)\n : YAxisType.StringAxis;\n }\n\n public render(): JSX.Element {\n this._adjustProps();\n const reversedBars = [...this._points].reverse();\n this._yAxisLabels = reversedBars.map((point: IHorizontalBarChartWithAxisDataPoint) => point.y as string);\n this._xMax = Math.max(\n d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.x)!,\n this.props.xMaxValue || 0,\n );\n const legendBars: JSX.Element = this._getLegendData(this._points, this.props.theme!.palette);\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n });\n const calloutProps = {\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${this._calloutId}`,\n target: this.state.refSelected,\n isBeakVisible: false,\n gapSpace: 15,\n color: this.state.color,\n legend: this.state.selectedLegendTitle,\n XValue: this.state.xCalloutValue,\n YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard,\n onDismiss: this._closeCallout,\n preventDismissOnLostFocus: true,\n ...this.props.calloutProps,\n ...getAccessibleDataObject(this.state.callOutAccessibilityData),\n };\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n return (\n <CartesianChart\n {...this.props}\n points={this._points}\n chartType={ChartTypes.HorizontalBarChartWithAxis}\n xAxisType={this._xAxisType}\n yAxisType={this._yAxisType}\n stringDatasetForYAxisDomain={this._yAxisLabels}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n barwidth={this._barHeight}\n focusZoneDirection={FocusZoneDirection.vertical}\n customizedCallout={this._getCustomizedCallout()}\n getmargins={this._getMargins}\n getGraphData={this._getGraphData}\n getAxisData={this._getAxisData}\n onChartMouseLeave={this._handleChartMouseLeave}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n return (\n <>\n <g>{this._bars}</g>\n </>\n );\n }}\n />\n );\n }\n\n private _adjustProps(): void {\n this._points = this.props.data || [];\n this._barHeight = this.props.barHeight || 32;\n const { palette } = this.props.theme!;\n this._colors = this.props.colors || [palette.blueLight, palette.blue, palette.blueMid, palette.blueDark];\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _renderContentForOnlyBars = (point: IHorizontalBarChartWithAxisDataPoint): JSX.Element => {\n const { useSingleColor = false } = this.props;\n let selectedPointIndex = 0;\n this.props.data!.forEach((yDataPoint: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n if (yDataPoint.y === point.y) {\n selectedPointIndex = index;\n }\n });\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n color = point.color\n ? point.color\n : this.props.colors\n ? this._createColors()(point.x)\n : getNextColor(selectedPointIndex, 0, this.props.theme?.isInverted);\n }\n return (\n <>\n <ChartHoverCard\n XValue={point.xAxisCalloutData || point.x.toString()}\n Legend={point.legend}\n YValue={point.yAxisCalloutData || point.y}\n color={color}\n culture={this.props.culture}\n />\n </>\n );\n };\n\n private _renderCallout = (props?: IHorizontalBarChartWithAxisDataPoint): JSX.Element | null => {\n return props ? this._renderContentForOnlyBars(props) : null;\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps, this._renderCallout)\n : null;\n };\n\n private _getGraphData = (\n xScale: NumericAxis,\n yScale: NumericAxis | StringAxis,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yElement?: SVGElement | null,\n ) => {\n return (this._bars =\n this._yAxisType === YAxisType.NumericAxis\n ? this._createNumericBars(containerHeight, containerWidth, xElement!, yElement!)\n : this._createStringBars(containerHeight, containerWidth, xElement!, yElement!));\n };\n\n private _createColors(): D3ScaleLinear<string, string> | ColorScale {\n const increment = this._colors.length <= 1 ? 1 : 1 / (this._colors.length - 1);\n const { useSingleColor = false } = this.props;\n if (useSingleColor) {\n return (_p?: number) => {\n const { theme, colors } = this.props;\n return colors && colors.length > 0 ? colors[0] : theme!.palette.blueLight;\n };\n }\n const domainValues = [];\n for (let i = 0; i < this._colors.length; i++) {\n domainValues.push(increment * i * this._xMax);\n }\n const colorScale = d3ScaleLinear<string>().domain(domainValues).range(this._colors);\n return colorScale;\n }\n\n private _refCallback = (element: SVGRectElement, legendTitle: string): void => {\n this._refArray.push({ index: legendTitle, refElement: element });\n };\n\n private _getCalloutContentForBar = (\n point: IHorizontalBarChartWithAxisDataPoint,\n ): { YValueHover: IYValueHover[]; hoverXValue: string | number | null } => {\n const YValueHover: IYValueHover[] = [];\n const { useSingleColor = false } = this.props;\n const { data } = this.props;\n const selectedPoint = data!.filter((yDataPoint: IHorizontalBarChartWithAxisDataPoint) => yDataPoint.y === point.y);\n let selectedPointIndex = 0;\n data!.forEach((yDataPoint: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n if (yDataPoint.y === point.y) {\n selectedPointIndex = index;\n }\n });\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n color = selectedPoint[0].color\n ? selectedPoint[0].color\n : this.props.colors\n ? this._createColors()(selectedPoint[0].x)\n : getNextColor(selectedPointIndex, 0, this.props.theme?.isInverted);\n }\n // callout data for the bar\n YValueHover.push({\n legend: selectedPoint[0].legend,\n // For HBCWA x and y Values are swapped\n y: selectedPoint[0].x,\n color,\n data: selectedPoint[0].yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].yAxisCalloutData,\n });\n return { YValueHover, hoverXValue: point.yAxisCalloutData || point.y.toString() };\n };\n\n private _onBarHover(\n point: IHorizontalBarChartWithAxisDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n\n const { YValueHover, hoverXValue } = this._getCalloutContentForBar(point);\n if (\n (this.state.isLegendSelected === false ||\n (this.state.isLegendSelected && this.state.selectedLegendTitle === point.legend)) &&\n this._calloutAnchorPoint !== point\n ) {\n this._calloutAnchorPoint = point;\n this.setState({\n refSelected: mouseEvent,\n isCalloutVisible: true,\n dataForHoverCard: point.x,\n selectedLegendTitle: point.legend!,\n color: this.props.useSingleColor ? color : point.color,\n // To display callout value, if no callout value given, taking given point.x value as a string.\n xCalloutValue: point.yAxisCalloutData! || point.y.toString(),\n yCalloutValue: point.xAxisCalloutData || point.x.toString(),\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n }\n\n private _onBarLeave = (): void => {\n /**/\n };\n\n private _handleChartMouseLeave = (): void => {\n this._calloutAnchorPoint = null;\n this.setState({\n isCalloutVisible: false,\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n });\n };\n\n private _onBarFocus = (\n point: IHorizontalBarChartWithAxisDataPoint,\n refArrayIndexNumber: number,\n color: string,\n ): void => {\n if (\n this.state.isLegendSelected === false ||\n (this.state.isLegendSelected && this.state.selectedLegendTitle === point.legend)\n ) {\n const { YValueHover, hoverXValue } = this._getCalloutContentForBar(point);\n this._refArray.forEach((obj: IRefArrayData, index: number) => {\n if (refArrayIndexNumber === index) {\n this.setState({\n refSelected: obj.refElement,\n isCalloutVisible: true,\n selectedLegendTitle: point.legend!,\n dataForHoverCard: point.x,\n color: this.props.useSingleColor ? color : point.color,\n xCalloutValue: point.yAxisCalloutData || point.y.toString(),\n yCalloutValue: point.xAxisCalloutData! || point.x.toString(),\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n });\n }\n };\n\n private _getScales = (\n containerHeight: number,\n containerWidth: number,\n isNumericScale: boolean,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): { xBarScale: any; yBarScale: any } => {\n if (isNumericScale) {\n const xMax = d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.x as number)!;\n const yMax = d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n const xBarScale = d3ScaleLinear()\n .domain(this._isRtl ? [xMax, 0] : [0, xMax])\n .nice()\n .range([this.margins.left!, containerWidth - this.margins.right!]);\n const yBarScale = d3ScaleLinear()\n .domain([0, yMax])\n .range([containerHeight - this.margins.bottom!, this.margins.top!]);\n return { xBarScale, yBarScale };\n } else {\n const xMax = d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.x as number)!;\n // please note these padding default values must be consistent in here\n // and CatrtesianChartBase w for more details refer example\n // http://using-d3js.com/04_07_ordinal_scales.html\n const yBarScale = d3ScaleBand()\n .domain(this._yAxisLabels)\n .range([containerHeight - this.margins.bottom! - this._barHeight / 2, this.margins.top! + this._barHeight / 2])\n .padding(this.props.yAxisPadding || 0);\n\n const xBarScale = d3ScaleLinear()\n .domain(this._isRtl ? [xMax, 0] : [0, xMax])\n .nice()\n .range([this.margins.left!, containerWidth - this.margins.right!]);\n return { xBarScale, yBarScale };\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _createNumericBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n ): JSX.Element[] {\n const { useSingleColor = false } = this.props;\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth, true);\n const sortedBars: IHorizontalBarChartWithAxisDataPoint[] = [...this._points];\n sortedBars.sort((a, b) => {\n const aValue = typeof a.y === 'number' ? a.y : parseFloat(a.y);\n const bValue = typeof b.y === 'number' ? b.y : parseFloat(b.y);\n return bValue - aValue;\n });\n const bars = sortedBars.map((point: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n let shouldHighlight = true;\n if (this.state.isLegendHovered || this.state.isLegendSelected) {\n shouldHighlight = this.state.selectedLegendTitle === point.legend;\n }\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n shouldHighlight,\n });\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n color = this.props.colors\n ? this._createColors()(point.x)\n : getNextColor(index, 0, this.props.theme?.isInverted);\n }\n return (\n <rect\n key={point.y}\n x={this._isRtl ? xBarScale(point.x) : this.margins.left!}\n className={this._classNames.opacityChangeOnHover}\n y={yBarScale(point.y) - this._barHeight / 2}\n data-is-focusable={true}\n width={\n this._isRtl\n ? containerWidth - this.margins.right! - Math.max(xBarScale(point.x), 0)\n : Math.max(xBarScale(point.x), 0) - this.margins.left!\n }\n height={this._barHeight}\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, color)}\n aria-label={this._getAriaLabel(point)}\n role=\"img\"\n aria-labelledby={`toolTip${this._calloutId}`}\n onMouseLeave={this._onBarLeave}\n onFocus={this._onBarFocus.bind(this, point, index, color)}\n onBlur={this._onBarLeave}\n fill={point.color && !useSingleColor ? point.color : color}\n />\n );\n });\n return bars;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _tooltipOfYAxislabels(ytooltipProps: any) {\n const { tooltipCls, yAxis, id } = ytooltipProps;\n if (yAxis === null) {\n return null;\n }\n const div = d3Select('body').append('div').attr('id', id).attr('class', tooltipCls).style('opacity', 0);\n const aa = yAxis!.selectAll('#BaseSpan')._groups[0];\n const baseSpanLength = aa && Object.keys(aa)!.length;\n const originalDataArray: string[] = [];\n for (let i = 0; i < baseSpanLength; i++) {\n const originalData = aa[i].dataset && (Object.values(aa[i].dataset)[0] as string);\n originalDataArray.push(originalData);\n }\n const tickObject = yAxis!.selectAll('.tick')._groups[0];\n const tickObjectLength = tickObject && Object.keys(tickObject)!.length;\n for (let i = 0; i < tickObjectLength; i++) {\n const d1 = tickObject[i];\n d3Select(d1)\n .on('mouseover', d => {\n if (!this.state.tooltipElement) {\n div.style('opacity', 0.9);\n div\n .html(originalDataArray[i])\n .style('left', d3Event.pageX + 'px')\n .style('top', d3Event.pageY - 28 + 'px');\n }\n })\n .on('mouseout', d => {\n div.style('opacity', 0);\n });\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _createStringBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n ): JSX.Element[] {\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth, false);\n const { useSingleColor = false } = this.props;\n const bars = this._points.map((point: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n color = this.props.colors\n ? this._createColors()(point.x)\n : getNextColor(index, 0, this.props.theme?.isInverted);\n }\n\n return (\n <rect\n transform={`translate(0,${0.5 * (yBarScale.bandwidth() - this._barHeight)})`}\n key={point.x}\n x={this._isRtl ? xBarScale(point.x) : this.margins.left!}\n y={yBarScale(point.y)}\n width={\n this._isRtl\n ? containerWidth - this.margins.right! - Math.max(xBarScale(point.x), 0)\n : Math.max(xBarScale(point.x), 0) - this.margins.left!\n }\n height={this._barHeight}\n aria-labelledby={`toolTip${this._calloutId}`}\n aria-label={this._getAriaLabel(point)}\n role=\"img\"\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, color)}\n onMouseLeave={this._onBarLeave}\n onBlur={this._onBarLeave}\n data-is-focusable={true}\n onFocus={this._onBarFocus.bind(this, point, index, color)}\n fill={point.color && !useSingleColor ? point.color : color}\n />\n );\n });\n\n // Removing un wanted tooltip div from DOM, when prop not provided, for proper cleanup\n // of unwanted DOM elements, to prevent flacky behaviour in tooltips , that might occur\n // in creating tooltips when tooltips are enabled( as we try to recreate a tspan with this._tooltipId)\n if (!this.props.showYAxisLablesTooltip) {\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 y axis labels.\n if (this.props.showYAxisLablesTooltip) {\n const yAxisElement = d3Select(yElement).call(yBarScale);\n if (!this.state.tooltipElement) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n //eslint-disable-next-line no-empty\n } catch (e) {}\n }\n const ytooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n yAxis: yAxisElement,\n };\n yAxisElement && this._tooltipOfYAxislabels(ytooltipProps);\n }\n return bars;\n }\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _onLegendClick(customMessage: string): void {\n if (this.state.isLegendSelected) {\n if (this.state.selectedLegendTitle === customMessage) {\n this.setState({\n isLegendSelected: false,\n selectedLegendTitle: customMessage,\n });\n } else {\n this.setState({\n selectedLegendTitle: customMessage,\n });\n }\n } else {\n this.setState({\n isLegendSelected: true,\n selectedLegendTitle: customMessage,\n });\n }\n }\n\n private _onLegendHover(customMessage: string): void {\n if (this.state.isLegendSelected === false) {\n this.setState({\n isLegendHovered: true,\n selectedLegendTitle: customMessage,\n });\n }\n }\n\n private _onLegendLeave(isLegendFocused?: boolean): void {\n if (!!isLegendFocused || this.state.isLegendSelected === false) {\n this.setState({\n isLegendHovered: false,\n selectedLegendTitle: '',\n isLegendSelected: isLegendFocused ? false : this.state.isLegendSelected,\n });\n }\n }\n\n private _getLegendData = (data: IHorizontalBarChartWithAxisDataPoint[], palette: IPalette): JSX.Element => {\n const { useSingleColor } = this.props;\n const actions: ILegend[] = [];\n data.forEach((point: IHorizontalBarChartWithAxisDataPoint, _index: number) => {\n const color: string = useSingleColor\n ? this.props.colors\n ? this._createColors()(1)\n : getNextColor(1, 0, this.props.theme?.isInverted)\n : point.color!;\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: point.legend!,\n color,\n action: () => {\n this._onLegendClick(point.legend!);\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(point.legend!);\n },\n onMouseOutAction: (isLegendSelected?: boolean) => {\n this._onLegendLeave(isLegendSelected);\n },\n };\n actions.push(legend);\n });\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n />\n );\n return legends;\n };\n\n private _getAxisData = (yAxisData: IAxisData) => {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n // For HBCWA x and y Values are swapped\n const { yAxisDomainValues: domainValue } = yAxisData;\n this._xMax = Math.max(domainValue[domainValue.length - 1], this.props.xMaxValue || 0);\n }\n };\n private _getAriaLabel = (point: IHorizontalBarChartWithAxisDataPoint): string => {\n const xValue = point.xAxisCalloutData || point.x;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ` + `${yValue}.`;\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"HorizontalBarChartWithAxis.base.js","sourceRoot":"../src/","sources":["components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAC/B,qCAAwC;AACxC,6CAAkD;AAClD,qCAAgH;AAChH,2DAAkF;AAElF,uDAA8D;AAE9D,4DAA2D;AAS3D,qEAAoE;AAMpE,qDAA2D;AAC3D,+CAW+B;AAE/B,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA4E,CAAC;AAiBrH;IAAoD,0DAGnD;IAiBC,wCAAmB,KAAuC;QAA1D,YACE,kBAAM,KAAK,CAAC,SA0Bb;QApCO,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;QA6G3B,iBAAW,GAAG,UAAC,OAAiB;YACtC,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACzB,CAAC,CAAC;QAEM,+BAAyB,GAAG,UAAC,KAA2C;;YACtE,IAAA,KAA2B,KAAI,CAAC,KAAK,eAAf,EAAtB,cAAc,mBAAG,KAAK,KAAA,C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C,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;YAC/B,IAAI,IAAI,CAAC,KAAK,CAAC,mBAAmB,KAAK,aAAa,EAAE;gBACpD,IAAI,CAAC,QAAQ,CAAC;oBACZ,gBAAgB,EAAE,KAAK;oBACvB,mBAAmB,EAAE,aAAa;iBACnC,CAAC,CAAC;aACJ;iBAAM;gBACL,IAAI,CAAC,QAAQ,CAAC;oBACZ,mBAAmB,EAAE,aAAa;iBACnC,CAAC,CAAC;aACJ;SACF;aAAM;YACL,IAAI,CAAC,QAAQ,CAAC;gBACZ,gBAAgB,EAAE,IAAI;gBACtB,mBAAmB,EAAE,aAAa;aACnC,CAAC,CAAC;SACJ;IACH,CAAC;IAEO,uDAAc,GAAtB,UAAuB,aAAqB;QAC1C,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,KAAK,KAAK,EAAE;YACzC,IAAI,CAAC,QAAQ,CAAC;gBACZ,eAAe,EAAE,IAAI;gBACrB,mBAAmB,EAAE,aAAa;aACnC,CAAC,CAAC;SACJ;IACH,CAAC;IAEO,uDAAc,GAAtB,UAAuB,eAAyB;QAC9C,IAAI,CAAC,CAAC,eAAe,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,KAAK,KAAK,EAAE;YAC9D,IAAI,CAAC,QAAQ,CAAC;gBACZ,eAAe,EAAE,KAAK;gBACtB,mBAAmB,EAAE,EAAE;gBACvB,gBAAgB,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB;aACxE,CAAC,CAAC;SACJ;IACH,CAAC;IAqDH,qCAAC;AAAD,CAAC,AAznBD,CAAoD,KAAK,CAAC,SAAS,GAynBlE;AAznBY,wEAA8B","sourcesContent":["import * as React from 'react';\nimport { max as d3Max } from 'd3-array';\nimport { select as d3Select } from 'd3-selection';\nimport { scaleLinear as d3ScaleLinear, ScaleLinear as D3ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\nimport { classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { ILegend } from '../../components/Legends/Legends.types';\nimport { Legends } from '../../components/Legends/Legends';\nimport {\n IAccessibilityProps,\n IBasestate,\n IHorizontalBarChartWithAxisDataPoint,\n IRefArrayData,\n IMargins,\n} from '../../types/IDataPoint';\nimport { IChildProps, IYValueHover } from '../CommonComponents/CartesianChart.types';\nimport { CartesianChart } from '../CommonComponents/CartesianChart';\nimport {\n IHorizontalBarChartWithAxisProps,\n IHorizontalBarChartWithAxisStyleProps,\n IHorizontalBarChartWithAxisStyles,\n} from './HorizontalBarChartWithAxis.types';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartHoverCard,\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n YAxisType,\n XAxisTypes,\n NumericAxis,\n StringAxis,\n getTypeOfAxis,\n getNextColor,\n} from '../../utilities/index';\n\nconst getClassNames = classNamesFunction<IHorizontalBarChartWithAxisStyleProps, IHorizontalBarChartWithAxisStyles>();\nexport interface IHorizontalBarChartWithAxisState extends IBasestate {\n selectedLegendTitle: string;\n dataPointCalloutProps?: IHorizontalBarChartWithAxisDataPoint; // define this in hover and focus\n /**\n * data point of x, where rectangle is hovered or focused\n */\n activeXdataPoint: number | null;\n YValueHover: IYValueHover[];\n hoverXValue?: string | number | null;\n callOutAccessibilityData?: IAccessibilityProps;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n tooltipElement?: any;\n}\n\ntype ColorScale = (_p?: number) => string;\n\nexport class HorizontalBarChartWithAxisBase extends React.Component<\n IHorizontalBarChartWithAxisProps,\n IHorizontalBarChartWithAxisState\n> {\n private _points: IHorizontalBarChartWithAxisDataPoint[];\n private _barHeight: number;\n private _colors: string[];\n private _classNames: IProcessedStyleSet<IHorizontalBarChartWithAxisStyles>;\n private _refArray: IRefArrayData[];\n private _calloutId: string;\n private margins: IMargins;\n private _isRtl: boolean = getRTL();\n private _bars: JSX.Element[];\n private _yAxisLabels: string[];\n private _xMax: number;\n private _tooltipId: string;\n private _xAxisType: XAxisTypes;\n private _yAxisType: YAxisType;\n private _calloutAnchorPoint: IHorizontalBarChartWithAxisDataPoint | null;\n\n public constructor(props: IHorizontalBarChartWithAxisProps) {\n super(props);\n this.state = {\n color: '',\n dataForHoverCard: 0,\n isCalloutVisible: false,\n isLegendSelected: false,\n isLegendHovered: false,\n refSelected: null,\n selectedLegendTitle: '',\n xCalloutValue: '',\n yCalloutValue: '',\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n };\n this._calloutId = getId('callout');\n this._tooltipId = getId('HBCWATooltipID_');\n this._refArray = [];\n this._xAxisType =\n this.props.data! && this.props.data!.length > 0\n ? (getTypeOfAxis(this.props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.NumericAxis;\n this._yAxisType =\n this.props.data! && this.props.data!.length > 0\n ? (getTypeOfAxis(this.props.data![0].y, false) as YAxisType)\n : YAxisType.StringAxis;\n }\n\n public render(): JSX.Element {\n this._adjustProps();\n const reversedBars = [...this._points].reverse();\n this._yAxisLabels = reversedBars.map((point: IHorizontalBarChartWithAxisDataPoint) => point.y as string);\n this._xMax = Math.max(\n d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.x)!,\n this.props.xMaxValue || 0,\n );\n const legendBars: JSX.Element = this._getLegendData(this._points, this.props.theme!.palette);\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n });\n const calloutProps = {\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${this._calloutId}`,\n target: this.state.refSelected,\n isBeakVisible: false,\n gapSpace: 15,\n color: this.state.color,\n legend: this.state.selectedLegendTitle,\n XValue: this.state.xCalloutValue,\n YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard,\n onDismiss: this._closeCallout,\n preventDismissOnLostFocus: true,\n ...this.props.calloutProps,\n ...getAccessibleDataObject(this.state.callOutAccessibilityData),\n };\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n return (\n <CartesianChart\n {...this.props}\n points={this._points}\n chartType={ChartTypes.HorizontalBarChartWithAxis}\n xAxisType={this._xAxisType}\n yAxisType={this._yAxisType}\n stringDatasetForYAxisDomain={this._yAxisLabels}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n barwidth={this._barHeight}\n focusZoneDirection={FocusZoneDirection.vertical}\n customizedCallout={this._getCustomizedCallout()}\n getmargins={this._getMargins}\n getGraphData={this._getGraphData}\n getAxisData={this._getAxisData}\n onChartMouseLeave={this._handleChartMouseLeave}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n return (\n <>\n <g>{this._bars}</g>\n </>\n );\n }}\n />\n );\n }\n\n private _adjustProps(): void {\n this._points = this.props.data || [];\n this._barHeight = this.props.barHeight || 32;\n const { palette } = this.props.theme!;\n this._colors = this.props.colors || [palette.blueLight, palette.blue, palette.blueMid, palette.blueDark];\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _renderContentForOnlyBars = (point: IHorizontalBarChartWithAxisDataPoint): JSX.Element => {\n const { useSingleColor = false } = this.props;\n let selectedPointIndex = 0;\n this.props.data!.forEach((yDataPoint: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n if (yDataPoint.y === point.y) {\n selectedPointIndex = index;\n }\n });\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n color = point.color\n ? point.color\n : this.props.colors\n ? this._createColors()(point.x)\n : getNextColor(selectedPointIndex, 0, this.props.theme?.isInverted);\n }\n return (\n <>\n <ChartHoverCard\n XValue={point.xAxisCalloutData || point.x.toString()}\n Legend={point.legend}\n YValue={point.yAxisCalloutData || point.y}\n color={color}\n culture={this.props.culture}\n />\n </>\n );\n };\n\n private _renderCallout = (props?: IHorizontalBarChartWithAxisDataPoint): JSX.Element | null => {\n return props ? this._renderContentForOnlyBars(props) : null;\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps, this._renderCallout)\n : null;\n };\n\n private _getGraphData = (\n xScale: NumericAxis,\n yScale: NumericAxis | StringAxis,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yElement?: SVGElement | null,\n ) => {\n return (this._bars =\n this._yAxisType === YAxisType.NumericAxis\n ? this._createNumericBars(containerHeight, containerWidth, xElement!, yElement!)\n : this._createStringBars(containerHeight, containerWidth, xElement!, yElement!));\n };\n\n private _createColors(): D3ScaleLinear<string, string> | ColorScale {\n const increment = this._colors.length <= 1 ? 1 : 1 / (this._colors.length - 1);\n const { useSingleColor = false } = this.props;\n if (useSingleColor) {\n return (_p?: number) => {\n const { theme, colors } = this.props;\n return colors && colors.length > 0 ? colors[0] : theme!.palette.blueLight;\n };\n }\n const domainValues = [];\n for (let i = 0; i < this._colors.length; i++) {\n domainValues.push(increment * i * this._xMax);\n }\n const colorScale = d3ScaleLinear<string>().domain(domainValues).range(this._colors);\n return colorScale;\n }\n\n private _refCallback = (element: SVGRectElement, legendTitle: string): void => {\n this._refArray.push({ index: legendTitle, refElement: element });\n };\n\n private _getCalloutContentForBar = (\n point: IHorizontalBarChartWithAxisDataPoint,\n ): { YValueHover: IYValueHover[]; hoverXValue: string | number | null } => {\n const YValueHover: IYValueHover[] = [];\n const { useSingleColor = false } = this.props;\n const { data } = this.props;\n const selectedPoint = data!.filter((yDataPoint: IHorizontalBarChartWithAxisDataPoint) => yDataPoint.y === point.y);\n let selectedPointIndex = 0;\n data!.forEach((yDataPoint: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n if (yDataPoint.y === point.y) {\n selectedPointIndex = index;\n }\n });\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n color = selectedPoint[0].color\n ? selectedPoint[0].color\n : this.props.colors\n ? this._createColors()(selectedPoint[0].x)\n : getNextColor(selectedPointIndex, 0, this.props.theme?.isInverted);\n }\n // callout data for the bar\n YValueHover.push({\n legend: selectedPoint[0].legend,\n // For HBCWA x and y Values are swapped\n y: selectedPoint[0].x,\n color,\n data: selectedPoint[0].yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].yAxisCalloutData,\n });\n return { YValueHover, hoverXValue: point.yAxisCalloutData || point.y.toString() };\n };\n\n private _onBarHover(\n point: IHorizontalBarChartWithAxisDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n\n const { YValueHover, hoverXValue } = this._getCalloutContentForBar(point);\n if (\n (this.state.isLegendSelected === false ||\n (this.state.isLegendSelected && this.state.selectedLegendTitle === point.legend)) &&\n this._calloutAnchorPoint !== point\n ) {\n this._calloutAnchorPoint = point;\n this.setState({\n refSelected: mouseEvent,\n isCalloutVisible: true,\n dataForHoverCard: point.x,\n selectedLegendTitle: point.legend!,\n color: this.props.useSingleColor ? color : point.color,\n // To display callout value, if no callout value given, taking given point.x value as a string.\n xCalloutValue: point.yAxisCalloutData! || point.y.toString(),\n yCalloutValue: point.xAxisCalloutData || point.x.toString(),\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n }\n\n private _onBarLeave = (): void => {\n /**/\n };\n\n private _handleChartMouseLeave = (): void => {\n this._calloutAnchorPoint = null;\n this.setState({\n isCalloutVisible: false,\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n });\n };\n\n private _onBarFocus = (\n point: IHorizontalBarChartWithAxisDataPoint,\n refArrayIndexNumber: number,\n color: string,\n ): void => {\n if (\n this.state.isLegendSelected === false ||\n (this.state.isLegendSelected && this.state.selectedLegendTitle === point.legend)\n ) {\n const { YValueHover, hoverXValue } = this._getCalloutContentForBar(point);\n this._refArray.forEach((obj: IRefArrayData, index: number) => {\n if (refArrayIndexNumber === index) {\n this.setState({\n refSelected: obj.refElement,\n isCalloutVisible: true,\n selectedLegendTitle: point.legend!,\n dataForHoverCard: point.x,\n color: this.props.useSingleColor ? color : point.color,\n xCalloutValue: point.yAxisCalloutData || point.y.toString(),\n yCalloutValue: point.xAxisCalloutData! || point.x.toString(),\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n });\n }\n };\n\n private _getScales = (\n containerHeight: number,\n containerWidth: number,\n isNumericScale: boolean,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): { xBarScale: any; yBarScale: any } => {\n if (isNumericScale) {\n const xMax = d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.x as number)!;\n const yMax = d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n const xBarScale = d3ScaleLinear()\n .domain(this._isRtl ? [xMax, 0] : [0, xMax])\n .nice()\n .range([this.margins.left!, containerWidth - this.margins.right!]);\n const yBarScale = d3ScaleLinear()\n .domain([0, yMax])\n .range([containerHeight - this.margins.bottom!, this.margins.top!]);\n return { xBarScale, yBarScale };\n } else {\n const xMax = d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.x as number)!;\n // please note these padding default values must be consistent in here\n // and CatrtesianChartBase w for more details refer example\n // http://using-d3js.com/04_07_ordinal_scales.html\n const yBarScale = d3ScaleBand()\n .domain(this._yAxisLabels)\n .range([containerHeight - this.margins.bottom! - this._barHeight / 2, this.margins.top! + this._barHeight / 2])\n .padding(this.props.yAxisPadding || 0);\n\n const xBarScale = d3ScaleLinear()\n .domain(this._isRtl ? [xMax, 0] : [0, xMax])\n .nice()\n .range([this.margins.left!, containerWidth - this.margins.right!]);\n return { xBarScale, yBarScale };\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _createNumericBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n ): JSX.Element[] {\n const { useSingleColor = false } = this.props;\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth, true);\n const sortedBars: IHorizontalBarChartWithAxisDataPoint[] = [...this._points];\n sortedBars.sort((a, b) => {\n const aValue = typeof a.y === 'number' ? a.y : parseFloat(a.y);\n const bValue = typeof b.y === 'number' ? b.y : parseFloat(b.y);\n return bValue - aValue;\n });\n const bars = sortedBars.map((point: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n let shouldHighlight = true;\n if (this.state.isLegendHovered || this.state.isLegendSelected) {\n shouldHighlight = this.state.selectedLegendTitle === point.legend;\n }\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n shouldHighlight,\n });\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n color = this.props.colors\n ? this._createColors()(point.x)\n : getNextColor(index, 0, this.props.theme?.isInverted);\n }\n return (\n <rect\n key={point.y}\n x={this._isRtl ? xBarScale(point.x) : this.margins.left!}\n className={this._classNames.opacityChangeOnHover}\n y={yBarScale(point.y) - this._barHeight / 2}\n data-is-focusable={true}\n width={\n this._isRtl\n ? containerWidth - this.margins.right! - Math.max(xBarScale(point.x), 0)\n : Math.max(xBarScale(point.x), 0) - this.margins.left!\n }\n height={this._barHeight}\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, color)}\n aria-label={this._getAriaLabel(point)}\n role=\"img\"\n aria-labelledby={`toolTip${this._calloutId}`}\n onMouseLeave={this._onBarLeave}\n onFocus={this._onBarFocus.bind(this, point, index, color)}\n onBlur={this._onBarLeave}\n fill={point.color && !useSingleColor ? point.color : color}\n />\n );\n });\n return bars;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _tooltipOfYAxislabels(ytooltipProps: any) {\n const { tooltipCls, yAxis, id } = ytooltipProps;\n if (yAxis === null) {\n return null;\n }\n const div = d3Select('body').append('div').attr('id', id).attr('class', tooltipCls).style('opacity', 0);\n const aa = yAxis!.selectAll('#BaseSpan')._groups[0];\n const baseSpanLength = aa && Object.keys(aa)!.length;\n const originalDataArray: string[] = [];\n for (let i = 0; i < baseSpanLength; i++) {\n const originalData = aa[i].dataset && (Object.values(aa[i].dataset)[0] as string);\n originalDataArray.push(originalData);\n }\n const tickObject = yAxis!.selectAll('.tick')._groups[0];\n const tickObjectLength = tickObject && Object.keys(tickObject)!.length;\n for (let i = 0; i < tickObjectLength; i++) {\n const d1 = tickObject[i];\n d3Select(d1)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .on('mouseover', (event: any, d) => {\n if (!this.state.tooltipElement) {\n div.style('opacity', 0.9);\n div\n .html(originalDataArray[i])\n .style('left', event.pageX + 'px')\n .style('top', event.pageY - 28 + 'px');\n }\n })\n .on('mouseout', d => {\n div.style('opacity', 0);\n });\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _createStringBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n ): JSX.Element[] {\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth, false);\n const { useSingleColor = false } = this.props;\n const bars = this._points.map((point: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n color = this.props.colors\n ? this._createColors()(point.x)\n : getNextColor(index, 0, this.props.theme?.isInverted);\n }\n\n return (\n <rect\n transform={`translate(0,${0.5 * (yBarScale.bandwidth() - this._barHeight)})`}\n key={point.x}\n x={this._isRtl ? xBarScale(point.x) : this.margins.left!}\n y={yBarScale(point.y)}\n width={\n this._isRtl\n ? containerWidth - this.margins.right! - Math.max(xBarScale(point.x), 0)\n : Math.max(xBarScale(point.x), 0) - this.margins.left!\n }\n height={this._barHeight}\n aria-labelledby={`toolTip${this._calloutId}`}\n aria-label={this._getAriaLabel(point)}\n role=\"img\"\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, color)}\n onMouseLeave={this._onBarLeave}\n onBlur={this._onBarLeave}\n data-is-focusable={true}\n onFocus={this._onBarFocus.bind(this, point, index, color)}\n fill={point.color && !useSingleColor ? point.color : color}\n />\n );\n });\n\n // Removing un wanted tooltip div from DOM, when prop not provided, for proper cleanup\n // of unwanted DOM elements, to prevent flacky behaviour in tooltips , that might occur\n // in creating tooltips when tooltips are enabled( as we try to recreate a tspan with this._tooltipId)\n if (!this.props.showYAxisLablesTooltip) {\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 y axis labels.\n if (this.props.showYAxisLablesTooltip) {\n const yAxisElement = d3Select(yElement).call(yBarScale);\n if (!this.state.tooltipElement) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n //eslint-disable-next-line no-empty\n } catch (e) {}\n }\n const ytooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n yAxis: yAxisElement,\n };\n yAxisElement && this._tooltipOfYAxislabels(ytooltipProps);\n }\n return bars;\n }\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _onLegendClick(customMessage: string): void {\n if (this.state.isLegendSelected) {\n if (this.state.selectedLegendTitle === customMessage) {\n this.setState({\n isLegendSelected: false,\n selectedLegendTitle: customMessage,\n });\n } else {\n this.setState({\n selectedLegendTitle: customMessage,\n });\n }\n } else {\n this.setState({\n isLegendSelected: true,\n selectedLegendTitle: customMessage,\n });\n }\n }\n\n private _onLegendHover(customMessage: string): void {\n if (this.state.isLegendSelected === false) {\n this.setState({\n isLegendHovered: true,\n selectedLegendTitle: customMessage,\n });\n }\n }\n\n private _onLegendLeave(isLegendFocused?: boolean): void {\n if (!!isLegendFocused || this.state.isLegendSelected === false) {\n this.setState({\n isLegendHovered: false,\n selectedLegendTitle: '',\n isLegendSelected: isLegendFocused ? false : this.state.isLegendSelected,\n });\n }\n }\n\n private _getLegendData = (data: IHorizontalBarChartWithAxisDataPoint[], palette: IPalette): JSX.Element => {\n const { useSingleColor } = this.props;\n const actions: ILegend[] = [];\n data.forEach((point: IHorizontalBarChartWithAxisDataPoint, _index: number) => {\n const color: string = useSingleColor\n ? this.props.colors\n ? this._createColors()(1)\n : getNextColor(1, 0, this.props.theme?.isInverted)\n : point.color!;\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: point.legend!,\n color,\n action: () => {\n this._onLegendClick(point.legend!);\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(point.legend!);\n },\n onMouseOutAction: (isLegendSelected?: boolean) => {\n this._onLegendLeave(isLegendSelected);\n },\n };\n actions.push(legend);\n });\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n />\n );\n return legends;\n };\n\n private _getAxisData = (yAxisData: IAxisData) => {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n // For HBCWA x and y Values are swapped\n const { yAxisDomainValues: domainValue } = yAxisData;\n this._xMax = Math.max(domainValue[domainValue.length - 1], this.props.xMaxValue || 0);\n }\n };\n private _getAriaLabel = (point: IHorizontalBarChartWithAxisDataPoint): string => {\n const xValue = point.xAxisCalloutData || point.x;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ` + `${yValue}.`;\n };\n}\n"]}
|
|
@@ -252,7 +252,7 @@ var LegendsBase = /** @class */ (function (_super) {
|
|
|
252
252
|
};
|
|
253
253
|
LegendsBase.prototype._generateData = function () {
|
|
254
254
|
var _this = this;
|
|
255
|
-
var _a = this.props.allowFocusOnLegends, allowFocusOnLegends =
|
|
255
|
+
var _a = this.props, _b = _a.allowFocusOnLegends, allowFocusOnLegends = _b === void 0 ? true : _b, shape = _a.shape;
|
|
256
256
|
var dataItems = this.props.legends.map(function (legend, index) {
|
|
257
257
|
return tslib_1.__assign(tslib_1.__assign({}, (allowFocusOnLegends && {
|
|
258
258
|
nativeButtonProps: (0, Utilities_1.getNativeProps)(legend, Utilities_1.buttonProperties, [
|
|
@@ -260,7 +260,7 @@ var LegendsBase = /** @class */ (function (_super) {
|
|
|
260
260
|
]),
|
|
261
261
|
'aria-setsize': _this.props.legends.length,
|
|
262
262
|
'aria-posinset': index + 1,
|
|
263
|
-
})), { title: legend.title, action: legend.action, hoverAction: legend.hoverAction, onMouseOutAction: legend.onMouseOutAction, color: legend.color, shape: legend.shape, stripePattern: legend.stripePattern, isLineLegendInBarChart: legend.isLineLegendInBarChart, opacity: legend.opacity, key: index });
|
|
263
|
+
})), { title: legend.title, action: legend.action, hoverAction: legend.hoverAction, onMouseOutAction: legend.onMouseOutAction, color: legend.color, shape: shape ? shape : legend.shape, stripePattern: legend.stripePattern, isLineLegendInBarChart: legend.isLineLegendInBarChart, opacity: legend.opacity, key: index });
|
|
264
264
|
});
|
|
265
265
|
var result = {
|
|
266
266
|
primary: dataItems,
|