@fluentui/react-charting 5.23.66 → 5.23.67
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 +22 -1
- package/CHANGELOG.md +12 -2
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/lib/components/AreaChart/AreaChart.base.js +3 -6
- package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +2 -2
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib/components/StackedBarChart/StackedBarChart.base.js +6 -4
- package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-amd/components/AreaChart/AreaChart.base.js +3 -6
- package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +2 -2
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +6 -4
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.js +3 -6
- package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +2 -2
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js +6 -4
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AreaChart.base.js","sourceRoot":"../src/","sources":["components/AreaChart/AreaChart.base.tsx"],"names":[],"mappings":";;;;IAoDA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA0C,CAAC;IAEnF,8DAA8D;IAC9D,IAAM,MAAM,GAAG,IAAA,mBAAQ,EAA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AC,CAAC,MAAM,KAAK,CAAC,CAClF;YACD,oCAAoC;YACpC,+FAA+F;YAC/F,iCAAiC;aAClC,CAAC;QACJ,CAAC;QAv8Ba,0BAAY,GAA6B;YACrD,MAAM,EAAE,IAAI;SACb,AAFyB,CAExB;QA28BJ,oBAAC;KAAA,AA98BD,CAAmC,KAAK,CAAC,SAAS,GA88BjD;IA98BY,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 {\n classNamesFunction,\n find,\n getId,\n getRTL,\n initializeComponentRef,\n memoizeFunction,\n} 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 findNumericMinMaxOfY,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfNumericForAreaChart,\n domainRangeOfDateForAreaLineVerticalBarChart,\n createStringYAxis,\n formatDate,\n getSecureProps,\n areArraysEqual,\n getCurveFactory,\n} from '../../utilities/index';\nimport { ILegend, ILegendContainer, Legends } from '../Legends/index';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { IChart, IImageExportOptions } from '../../types/index';\nimport { toImage } from '../../utilities/image-export-utils';\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 | number[];\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 selectedLegends: string[];\n}\n\nexport class AreaChartBase extends React.Component<IAreaChartProps, IAreaChartState> implements IChart {\n public static defaultProps: Partial<IAreaChartProps> = {\n useUTC: true,\n };\n\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 data: 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 _data: 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 private _cartesianChartRef: React.RefObject<IChart>;\n private _legendsRef: React.RefObject<ILegendContainer>;\n\n public constructor(props: IAreaChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this._createSet = memoizeFunction(this._createDataSet);\n this.state = {\n selectedLegends: props.legendProps?.selectedLegends || [],\n activeLegend: undefined,\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 this._cartesianChartRef = React.createRef();\n this._legendsRef = React.createRef();\n }\n\n public componentDidUpdate(prevProps: IAreaChartProps): void {\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, this.props.legendProps?.selectedLegends)) {\n this.setState({\n selectedLegends: this.props.legendProps?.selectedLegends || [],\n });\n }\n\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 } = this.props.data;\n const points = this._addDefaultColors(lineChartData);\n const { colors, opacity, data, calloutPoints } = this._createSet(points);\n this._calloutPoints = calloutPoints;\n const isXAxisDateType = getXAxisType(points);\n this._colors = colors;\n this._opacity = opacity;\n this._data = data.renderData;\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={this._getChartTitle()}\n points={points}\n chartType={ChartTypes.AreaChart}\n calloutProps={calloutProps}\n legendBars={legends}\n createYAxis={createNumericYAxis}\n isCalloutForStack\n xAxisType={isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n tickParams={tickParams}\n maxOfYVal={data.maxOfYVal}\n getGraphData={this._getGraphData}\n getDomainNRangeValues={this._getDomainNRangeValues}\n createStringYAxis={createStringYAxis}\n getmargins={this._getMargins}\n getMinMaxOfYAxis={findNumericMinMaxOfY}\n customizedCallout={this._getCustomizedCallout()}\n onChartMouseLeave={this._handleChartMouseLeave}\n enableFirstRenderOptimization={this.props.enablePerfOptimization && this._firstRenderOptimization}\n ref={this._cartesianChartRef}\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 public get chartContainer(): HTMLElement | null {\n return this._cartesianChartRef.current?.chartContainer || null;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._cartesianChartRef.current?.chartContainer, this._legendsRef.current?.toSVG, getRTL(), opts);\n };\n\n private _getDomainNRangeValues = (\n points: ILineChartPoints[],\n margins: IMargins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n ) => {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfNumericForAreaChart(points, margins, width, isRTL);\n } else if (xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = domainRangeOfDateForAreaLineVerticalBarChart(\n points,\n margins,\n width,\n isRTL,\n tickValues! as Date[],\n chartType,\n barWidth,\n );\n } else {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n }\n return domainNRangeValue;\n };\n\n 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 { selectedLegends } = this.state;\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 pointToHighlight: string | Date | number | null = null;\n let index: null | number = null;\n const axisType =\n lineChartData![0].data.length > 0 ? (getTypeOfAxis(lineChartData![0].data[0].x, true) as XAxisTypes) : 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 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 =\n pointToHighlight instanceof Date ? formatDate(pointToHighlight, this.props.useUTC) : 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 const filteredValues =\n selectedLegends.length > 0\n ? found.values.filter((value: { legend: string }) => selectedLegends.includes(value.legend))\n : found.values;\n this.setState({\n nearestCircleToHighlight,\n isCalloutVisible: false,\n isShowCalloutPending: true,\n lineXValue: this._xAxisRectScale(pointToHighlight),\n displayOfLine: InterceptVisibility.show,\n isCircleClicked: false,\n stackCalloutProps: { ...found, values: filteredValues },\n YValueHover: filteredValues,\n dataPointCalloutProps: { ...found, values: filteredValues },\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,\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 _getDataPoints = (keys: string[], dataSet: any) => {\n const renderPoints: Array<IAreaChartDataSetPoint[]> = [];\n let maxOfYVal = 0;\n\n if (this.props.mode === 'tozeroy') {\n keys.forEach((key, index) => {\n const currentLayer: IAreaChartDataSetPoint[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n dataSet.forEach((d: any) => {\n currentLayer.push({\n values: [0, d[key]], // Start from zero for \"tozeroy\" mode\n xVal: d.xVal,\n });\n if (d[key] > maxOfYVal) {\n maxOfYVal = d[key];\n }\n });\n renderPoints.push(currentLayer);\n });\n } else {\n const dataValues = d3Stack().keys(keys)(dataSet);\n maxOfYVal = d3Max(dataValues[dataValues.length - 1], dp => dp[1])!;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n dataValues.forEach((layer: any) => {\n const currentLayer: IAreaChartDataSetPoint[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n layer.forEach((d: any) => {\n currentLayer.push({\n values: d,\n xVal: d.data.xVal,\n });\n });\n renderPoints.push(currentLayer);\n });\n }\n\n this._isMultiStackChart = !!(this.props.legendProps?.selectedLegends\n ? renderPoints?.length >= 1\n : renderPoints?.length > 1);\n return {\n renderData: renderPoints,\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 render 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 // Data used to draw graph\n const data = this._getDataPoints(keys, dataSet);\n\n return {\n colors,\n opacity,\n keys,\n data,\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 // Data used to draw graph\n const data = this._getDataPoints(keys, dataSet);\n\n return {\n colors,\n opacity,\n keys,\n data,\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 _onLegendHover(legend: string): void {\n this.setState({\n activeLegend: legend,\n });\n }\n\n private _onLegendLeave(): void {\n this.setState({\n activeLegend: undefined,\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,\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 onChange={this._onLegendSelectionChange.bind(this)}\n ref={this._legendsRef}\n />\n );\n };\n\n private _onLegendSelectionChange(\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: ILegend,\n ): void {\n if (this.props.legendProps?.canSelectMultipleLegends) {\n this.setState({ selectedLegends });\n } else {\n this.setState({ selectedLegends: selectedLegends.slice(-1) });\n }\n if (this.props.legendProps?.onChange) {\n this.props.legendProps.onChange(selectedLegends, event, currentLegend);\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\n const graph: JSX.Element[] = [];\n let lineColor: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._data.forEach((singleStackedData: Array<any>, index: number) => {\n const curveFactory = getCurveFactory(points[index].lineOptions?.curve, d3CurveBasis);\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(curveFactory);\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(curveFactory);\n const layerOpacity = this.props.mode === 'tozeroy' ? 0.8 : this._opacity[index];\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={points[index].lineOptions?.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 strokeDasharray={points[index].lineOptions?.strokeDasharray}\n strokeDashoffset={points[index].lineOptions?.strokeDashoffset}\n strokeLinecap={points[index].lineOptions?.strokeLinecap}\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={layerOpacity}\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={layerOpacity}\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._data.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\n key={`${index}-dots-${this._uniqueIdForGraph}`}\n clipPath=\"url(#clip)\"\n role=\"region\"\n aria-label={`${points[index].legend}, series ${index + 1} of ${points.length} with ${\n points[index].data.length\n } data points.`}\n >\n {singleStackedData.map((singlePoint: IDPointType, pointIndex: number) => {\n const circleId = `${this._circleId}_${index * this._data[0].length + pointIndex}`;\n const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal;\n lineColor = points[index]!.color!;\n const legend = points[index]!.legend;\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 {...getSecureProps(pointOptions)}\n r={this._getCircleRadius(xDataPoint, circleRadius, circleId, legend)}\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._data[0].length + pointIndex}`;\n lineColor = points[index]!.color!;\n const legend = points[index]!.legend;\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 {...getSecureProps(pointOptions)}\n r={this._getCircleRadius(xDataPoint, circleRadius, circleId, legend)}\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 {...getSecureProps(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, legend: string): number => {\n const { isCircleClicked, nearestCircleToHighlight, activePoint } = this.state;\n\n // Show the circle if no legends are selected or if the point's legend is in the selected legends\n if (!this._legendHighlighted(legend)) {\n return 0;\n }\n\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 this._getHighlightedLegend().includes(legend!);\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this._getHighlightedLegend().length === 0;\n };\n\n private _getHighlightedLegend() {\n return this.state.selectedLegends.length > 0\n ? this.state.selectedLegends\n : this.state.activeLegend\n ? [this.state.activeLegend]\n : [];\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 ? formatDate(x, this.props.useUTC) : 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 const filteredValues = this._getFilteredLegendValues(found.values);\n\n this.setState({\n refSelected: `#${circleId}`,\n isCalloutVisible: true,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : formattedDate,\n YValueHover: filteredValues!,\n stackCalloutProps: { ...found, values: filteredValues },\n dataPointCalloutProps: { ...found, values: filteredValues },\n activePoint: circleId,\n });\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getFilteredLegendValues = (values: any) => {\n !this._noLegendHighlighted()\n ? values.filter((value: { legend: string }) => this._legendHighlighted(value.legend))\n : values;\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 ? formatDate(point.x, this.props.useUTC) : point.x;\n const xValue = point.xAxisCalloutData || formattedDate;\n const legend = line.legend;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n 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 private _getChartTitle = (): string => {\n const { chartTitle, lineChartData } = this.props.data;\n return (chartTitle ? `${chartTitle}. ` : '') + `Area chart with ${lineChartData?.length || 0} data series. `;\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AreaChart.base.js","sourceRoot":"../src/","sources":["components/AreaChart/AreaChart.base.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ACpC,+FAA+F;YAC/F,iCAAiC;aAClC,CAAC;QACJ,CAAC;QAn8Ba,0BAAY,GAA6B;YACrD,MAAM,EAAE,IAAI;SACb,AAFyB,CAExB;QAu8BJ,oBAAC;KAAA,AA18BD,CAAmC,KAAK,CAAC,SAAS,GA08BjD;IA18BY,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 {\n classNamesFunction,\n find,\n getId,\n getRTL,\n initializeComponentRef,\n memoizeFunction,\n} 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 findNumericMinMaxOfY,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfNumericForAreaChart,\n domainRangeOfDateForAreaLineVerticalBarChart,\n createStringYAxis,\n formatDate,\n getSecureProps,\n areArraysEqual,\n getCurveFactory,\n} from '../../utilities/index';\nimport { ILegend, ILegendContainer, Legends } from '../Legends/index';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { IChart, IImageExportOptions } from '../../types/index';\nimport { toImage } from '../../utilities/image-export-utils';\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 | number[];\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 selectedLegends: string[];\n}\n\nexport class AreaChartBase extends React.Component<IAreaChartProps, IAreaChartState> implements IChart {\n public static defaultProps: Partial<IAreaChartProps> = {\n useUTC: true,\n };\n\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 data: 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 _data: 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 private _cartesianChartRef: React.RefObject<IChart>;\n private _legendsRef: React.RefObject<ILegendContainer>;\n\n public constructor(props: IAreaChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this._createSet = memoizeFunction(this._createDataSet);\n this.state = {\n selectedLegends: props.legendProps?.selectedLegends || [],\n activeLegend: undefined,\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 this._cartesianChartRef = React.createRef();\n this._legendsRef = React.createRef();\n }\n\n public componentDidUpdate(prevProps: IAreaChartProps): void {\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, this.props.legendProps?.selectedLegends)) {\n this.setState({\n selectedLegends: this.props.legendProps?.selectedLegends || [],\n });\n }\n\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 } = this.props.data;\n const points = this._addDefaultColors(lineChartData);\n const { colors, opacity, data, calloutPoints } = this._createSet(points);\n this._calloutPoints = calloutPoints;\n const isXAxisDateType = getXAxisType(points);\n this._colors = colors;\n this._opacity = opacity;\n this._data = data.renderData;\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={this._getChartTitle()}\n points={points}\n chartType={ChartTypes.AreaChart}\n calloutProps={calloutProps}\n legendBars={legends}\n createYAxis={createNumericYAxis}\n isCalloutForStack\n xAxisType={isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n tickParams={tickParams}\n maxOfYVal={data.maxOfYVal}\n getGraphData={this._getGraphData}\n getDomainNRangeValues={this._getDomainNRangeValues}\n createStringYAxis={createStringYAxis}\n getmargins={this._getMargins}\n getMinMaxOfYAxis={findNumericMinMaxOfY}\n customizedCallout={this._getCustomizedCallout()}\n onChartMouseLeave={this._handleChartMouseLeave}\n enableFirstRenderOptimization={this.props.enablePerfOptimization && this._firstRenderOptimization}\n ref={this._cartesianChartRef}\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 public get chartContainer(): HTMLElement | null {\n return this._cartesianChartRef.current?.chartContainer || null;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._cartesianChartRef.current?.chartContainer, this._legendsRef.current?.toSVG, getRTL(), opts);\n };\n\n private _getDomainNRangeValues = (\n points: ILineChartPoints[],\n margins: IMargins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n ) => {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfNumericForAreaChart(points, margins, width, isRTL);\n } else if (xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = domainRangeOfDateForAreaLineVerticalBarChart(\n points,\n margins,\n width,\n isRTL,\n tickValues! as Date[],\n chartType,\n barWidth,\n );\n } else {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n }\n return domainNRangeValue;\n };\n\n 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 pointToHighlight: string | Date | number | null = null;\n let index: null | number = null;\n const axisType =\n lineChartData![0].data.length > 0 ? (getTypeOfAxis(lineChartData![0].data[0].x, true) as XAxisTypes) : 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 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 =\n pointToHighlight instanceof Date ? formatDate(pointToHighlight, this.props.useUTC) : 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 const filteredValues = this._getFilteredLegendValues(found.values);\n this.setState({\n nearestCircleToHighlight,\n isCalloutVisible: false,\n isShowCalloutPending: true,\n lineXValue: this._xAxisRectScale(pointToHighlight),\n displayOfLine: InterceptVisibility.show,\n isCircleClicked: false,\n stackCalloutProps: { ...found, values: filteredValues },\n YValueHover: filteredValues,\n dataPointCalloutProps: { ...found, values: filteredValues },\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,\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 _getDataPoints = (keys: string[], dataSet: any) => {\n const renderPoints: Array<IAreaChartDataSetPoint[]> = [];\n let maxOfYVal = 0;\n\n if (this.props.mode === 'tozeroy') {\n keys.forEach((key, index) => {\n const currentLayer: IAreaChartDataSetPoint[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n dataSet.forEach((d: any) => {\n currentLayer.push({\n values: [0, d[key]], // Start from zero for \"tozeroy\" mode\n xVal: d.xVal,\n });\n if (d[key] > maxOfYVal) {\n maxOfYVal = d[key];\n }\n });\n renderPoints.push(currentLayer);\n });\n } else {\n const dataValues = d3Stack().keys(keys)(dataSet);\n maxOfYVal = d3Max(dataValues[dataValues.length - 1], dp => dp[1])!;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n dataValues.forEach((layer: any) => {\n const currentLayer: IAreaChartDataSetPoint[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n layer.forEach((d: any) => {\n currentLayer.push({\n values: d,\n xVal: d.data.xVal,\n });\n });\n renderPoints.push(currentLayer);\n });\n }\n\n this._isMultiStackChart = !!(this.props.legendProps?.selectedLegends\n ? renderPoints?.length >= 1\n : renderPoints?.length > 1);\n return {\n renderData: renderPoints,\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 render 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 // Data used to draw graph\n const data = this._getDataPoints(keys, dataSet);\n\n return {\n colors,\n opacity,\n keys,\n data,\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 // Data used to draw graph\n const data = this._getDataPoints(keys, dataSet);\n\n return {\n colors,\n opacity,\n keys,\n data,\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 _onLegendHover(legend: string): void {\n this.setState({\n activeLegend: legend,\n });\n }\n\n private _onLegendLeave(): void {\n this.setState({\n activeLegend: undefined,\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,\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 onChange={this._onLegendSelectionChange.bind(this)}\n ref={this._legendsRef}\n />\n );\n };\n\n private _onLegendSelectionChange(\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: ILegend,\n ): void {\n if (this.props.legendProps?.canSelectMultipleLegends) {\n this.setState({ selectedLegends });\n } else {\n this.setState({ selectedLegends: selectedLegends.slice(-1) });\n }\n if (this.props.legendProps?.onChange) {\n this.props.legendProps.onChange(selectedLegends, event, currentLegend);\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\n const graph: JSX.Element[] = [];\n let lineColor: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._data.forEach((singleStackedData: Array<any>, index: number) => {\n const curveFactory = getCurveFactory(points[index].lineOptions?.curve, d3CurveBasis);\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(curveFactory);\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(curveFactory);\n const layerOpacity = this.props.mode === 'tozeroy' ? 0.8 : this._opacity[index];\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={points[index].lineOptions?.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 strokeDasharray={points[index].lineOptions?.strokeDasharray}\n strokeDashoffset={points[index].lineOptions?.strokeDashoffset}\n strokeLinecap={points[index].lineOptions?.strokeLinecap}\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={layerOpacity}\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={layerOpacity}\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._data.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\n key={`${index}-dots-${this._uniqueIdForGraph}`}\n clipPath=\"url(#clip)\"\n role=\"region\"\n aria-label={`${points[index].legend}, series ${index + 1} of ${points.length} with ${\n points[index].data.length\n } data points.`}\n >\n {singleStackedData.map((singlePoint: IDPointType, pointIndex: number) => {\n const circleId = `${this._circleId}_${index * this._data[0].length + pointIndex}`;\n const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal;\n lineColor = points[index]!.color!;\n const legend = points[index]!.legend;\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 {...getSecureProps(pointOptions)}\n r={this._getCircleRadius(xDataPoint, circleRadius, circleId, legend)}\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._data[0].length + pointIndex}`;\n lineColor = points[index]!.color!;\n const legend = points[index]!.legend;\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 {...getSecureProps(pointOptions)}\n r={this._getCircleRadius(xDataPoint, circleRadius, circleId, legend)}\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 {...getSecureProps(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, legend: string): number => {\n const { isCircleClicked, nearestCircleToHighlight, activePoint } = this.state;\n\n // Show the circle if no legends are selected or if the point's legend is in the selected legends\n if (!this._noLegendHighlighted() && !this._legendHighlighted(legend)) {\n return 0;\n }\n\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 this._getHighlightedLegend().includes(legend!);\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this._getHighlightedLegend().length === 0;\n };\n\n private _getHighlightedLegend() {\n return this.state.selectedLegends.length > 0\n ? this.state.selectedLegends\n : this.state.activeLegend\n ? [this.state.activeLegend]\n : [];\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 ? formatDate(x, this.props.useUTC) : 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 const filteredValues = this._getFilteredLegendValues(found.values);\n\n this.setState({\n refSelected: `#${circleId}`,\n isCalloutVisible: true,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : formattedDate,\n YValueHover: filteredValues!,\n stackCalloutProps: { ...found, values: filteredValues },\n dataPointCalloutProps: { ...found, values: filteredValues },\n activePoint: circleId,\n });\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getFilteredLegendValues = (values: any) => {\n return !this._noLegendHighlighted()\n ? values.filter((value: { legend: string }) => this._legendHighlighted(value.legend))\n : values;\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 ? formatDate(point.x, this.props.useUTC) : point.x;\n const xValue = point.xAxisCalloutData || formattedDate;\n const legend = line.legend;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n 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 private _getChartTitle = (): string => {\n const { chartTitle, lineChartData } = this.props.data;\n return (chartTitle ? `${chartTitle}. ` : '') + `Area chart with ${lineChartData?.length || 0} data series. `;\n };\n}\n"]}
|
|
@@ -355,7 +355,7 @@ define(["require", "exports", "tslib", "react", "@fluentui/react/lib/Utilities",
|
|
|
355
355
|
refSelected: obj.refElement,
|
|
356
356
|
/** Show the callout if highlighted bar is focused and Hide it if unhighlighted bar is focused */
|
|
357
357
|
isCalloutVisible: _this.state.selectedLegend === '' || _this.state.selectedLegend === point.legend,
|
|
358
|
-
calloutLegend: point.legend,
|
|
358
|
+
calloutLegend: point.legend ? point.legend : point.placeHolder ? 'Remaining' : '',
|
|
359
359
|
dataForHoverCard: pointData,
|
|
360
360
|
color: color,
|
|
361
361
|
xCalloutValue: point.xAxisCalloutData,
|
|
@@ -399,7 +399,7 @@ define(["require", "exports", "tslib", "react", "@fluentui/react/lib/Utilities",
|
|
|
399
399
|
refSelected: mouseEvent,
|
|
400
400
|
/** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */
|
|
401
401
|
isCalloutVisible: this.state.selectedLegend === '' || this.state.selectedLegend === point.legend,
|
|
402
|
-
calloutLegend: point.legend,
|
|
402
|
+
calloutLegend: point.legend ? point.legend : point.placeHolder ? 'Remaining' : '',
|
|
403
403
|
dataForHoverCard: pointData,
|
|
404
404
|
color: color,
|
|
405
405
|
xCalloutValue: point.xAxisCalloutData,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiStackedBarChart.base.js","sourceRoot":"../src/","sources":["components/StackedBarChart/MultiStackedBarChart.base.tsx"],"names":[],"mappings":";;;;IAwBA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAgE,CAAC;IAwBzG;QAA8C,oDAAuE;QAkBnH,kCAAmB,KAAiC;YAClD,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YARP,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;YAoa3B,kBAAY,GAAG;gBACf,IAAA,KAAiD,KAAI,CAAC,KAAK,EAAzD,KAAK,WAAA,EAAE,SAAS,eAAA,EAAE,MAAM,YAAA,EAAE,KAAK,WAAA,EAAE,SAAS,eAAe,CAAC;gBAClE,KAAI,CAAC,WAAW,GAAG,aAAa,CAAC,MAAO,EAAE;oBACxC,WAAW,EAAE,KAAI,CAAC,KAAK,CAAC,KAAK;oBAC7B,KAAK,EAAE,KAAM;oBACb,KAAK,OAAA;oBACL,SAA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AC,IAAI,CAAC,MAAM,CACpB,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,KAAK,EAAE,CAAC,EAA7F,CAA6F,CACtG,CAAC,MAAM,KAAK,CAAC,CACf,CAAC;QACJ,CAAC;QA/nBa,qCAAY,GAAwC;YAChE,SAAS,EAAE,EAAE;YACb,SAAS,EAAE,EAAE;YACb,eAAe,EAAE,EAAE;SACpB,AAJyB,CAIxB;QA4nBJ,+BAAC;KAAA,AAjoBD,CAA8C,KAAK,CAAC,SAAS,GAioB5D;IAjoBY,4DAAwB","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';\nimport { ILegend, Legends } from '../Legends/index';\nimport {\n IAccessibilityProps,\n IChartDataPoint,\n IChartProps,\n IMultiStackedBarChartProps,\n IMultiStackedBarChartStyles,\n IMultiStackedBarChartStyleProps,\n MultiStackedBarChartVariant,\n} from './index';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport { convertToLocaleString } from '../../utilities/locale-util';\nimport {\n ChartHoverCard,\n formatValueWithSIPrefix,\n getAccessibleDataObject,\n getNextGradient,\n} from '../../utilities/index';\nimport { FocusableTooltipText } from '../../utilities/FocusableTooltipText';\n\nconst getClassNames = classNamesFunction<IMultiStackedBarChartStyleProps, IMultiStackedBarChartStyles>();\n\nexport interface IRefArrayData {\n legendText?: string;\n refElement?: SVGGElement;\n}\n\nexport interface IMultiStackedBarChartState {\n isCalloutVisible: boolean;\n refArray: IRefArrayData[];\n selectedLegend: string;\n activeLegend: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n refSelected: any;\n dataForHoverCard: number;\n color: string;\n xCalloutValue?: string;\n yCalloutValue?: string;\n dataPointCalloutProps?: IChartDataPoint;\n callOutAccessibilityData?: IAccessibilityProps;\n calloutLegend: string;\n barSpacingInPercent: number;\n}\n\nexport class MultiStackedBarChartBase extends React.Component<IMultiStackedBarChartProps, IMultiStackedBarChartState> {\n public static defaultProps: Partial<IMultiStackedBarChartProps> = {\n barHeight: 12,\n hideRatio: [],\n hideDenominator: [],\n };\n\n private _classNames: IProcessedStyleSet<IMultiStackedBarChartStyles>;\n private _calloutId: string;\n private _calloutAnchorPoint: IChartDataPoint | null;\n private _longestBarTotalValue: number;\n private _isRTL: boolean = getRTL();\n private barChartSvgRef: React.RefObject<SVGSVGElement>;\n private _emptyChartId: string;\n private _barId: string;\n private _barIdPlaceholderPartToWhole: string;\n private _barIdEmpty: string;\n\n public constructor(props: IMultiStackedBarChartProps) {\n super(props);\n this.state = {\n isCalloutVisible: false,\n refArray: [],\n selectedLegend: '',\n activeLegend: '',\n refSelected: null,\n dataForHoverCard: 0,\n color: '',\n xCalloutValue: '',\n yCalloutValue: '',\n calloutLegend: '',\n barSpacingInPercent: 0,\n };\n this._onLeave = this._onLeave.bind(this);\n this._onBarLeave = this._onBarLeave.bind(this);\n this._calloutId = getId('callout');\n this.barChartSvgRef = React.createRef<SVGSVGElement>();\n this._emptyChartId = getId('_MSBC_empty');\n this._barId = getId('_MSBC_rect_');\n this._barIdPlaceholderPartToWhole = getId('_MSBC_rect_partToWhole_');\n this._barIdEmpty = getId('_MSBC_rect_empty');\n }\n\n public componentDidMount(): void {\n const svgWidth = this.barChartSvgRef.current?.getBoundingClientRect().width || 0;\n const MARGIN_WIDTH_IN_PX = 3;\n if (svgWidth) {\n const currentBarSpacing = (MARGIN_WIDTH_IN_PX / svgWidth) * 100;\n this.setState({ barSpacingInPercent: currentBarSpacing });\n }\n }\n\n public render(): JSX.Element {\n if (!this._isChartEmpty()) {\n const { data, theme, culture } = this.props;\n this._adjustProps();\n const { palette } = theme!;\n const legends = this._getLegendData(data!, this.props.hideRatio!, palette);\n const { isCalloutVisible } = this.state;\n\n this._classNames = getClassNames(this.props.styles!, {\n legendColor: this.state.color,\n theme: theme!,\n variant: this.props.variant,\n hideLabels: this.props.hideLabels,\n });\n\n const legendName = this.state.xCalloutValue ? this.state.xCalloutValue : this.state.calloutLegend;\n const calloutYVal = this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard;\n\n this._longestBarTotalValue = this._computeLongestBarTotalValue();\n\n const bars: JSX.Element[] = data!.map((singleChartData: IChartProps, index: number) => {\n const singleChartBars = this._createBarsAndLegends(\n singleChartData!,\n this.props.barHeight!,\n palette,\n this.props.hideRatio![index],\n this.props.hideDenominator![index],\n this.props.href,\n index,\n );\n return (\n <div key={index} id={`_MSBC_bar-${index}`}>\n {singleChartBars}\n </div>\n );\n });\n\n return (\n <div className={this._classNames.root} onMouseLeave={this._handleChartMouseLeave}>\n {bars}\n {!this.props.hideLegend && <div className={this._classNames.legendContainer}>{legends}</div>}\n <Callout\n gapSpace={15}\n isBeakVisible={false}\n target={this.state.refSelected}\n setInitialFocus={true}\n hidden={!(!this.props.hideTooltip && isCalloutVisible)}\n directionalHint={DirectionalHint.topAutoEdge}\n id={this._calloutId}\n onDismiss={this._closeCallout}\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n preventDismissOnLostFocus={true}\n /** Keep the callout updated with details of focused/hovered bar */\n shouldUpdateWhenHidden={true}\n {...this.props.calloutProps!}\n {...getAccessibleDataObject(this.state.callOutAccessibilityData, 'text', false)}\n >\n <>\n {this.props.onRenderCalloutPerDataPoint ? (\n this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)\n ) : (\n <ChartHoverCard Legend={legendName} YValue={calloutYVal} color={this.state.color} culture={culture} />\n )}\n </>\n </Callout>\n </div>\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 /**\n * The Create bar functions returns an array of <rect> elements, which form the bars\n * For each bar an x value, and a width needs to be specified\n * The computations are done based on percentages\n * Extra margin is also provided, in the x value to provide some spacing\n */\n\n private _createBarsAndLegends(\n data: IChartProps,\n barHeight: number,\n palette: IPalette,\n hideRatio: boolean,\n hideDenominator: boolean,\n href?: string,\n barNo?: number,\n ): JSX.Element {\n const noOfBars =\n data.chartData?.reduce((count: number, point: IChartDataPoint) => (count += (point.data || 0) > 0 ? 1 : 0), 0) ||\n 1;\n const totalMarginPercent = this.state.barSpacingInPercent * (noOfBars - 1);\n const { culture } = this.props;\n const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n // calculating starting point of each bar and it's range\n const startingPoint: number[] = [];\n const barTotalValue = data.chartData!.reduce(\n (acc: number, point: IChartDataPoint) => acc + (point.data ? point.data : 0),\n 0,\n );\n const total =\n this.props.variant === MultiStackedBarChartVariant.AbsoluteScale ? this._longestBarTotalValue : barTotalValue;\n\n let sumOfPercent = 0;\n data.chartData!.map((point: IChartDataPoint, index: number) => {\n const pointData = point.data ? point.data : 0;\n const currValue = (pointData / total) * 100;\n let value = currValue ? currValue : 0;\n\n if (value < 1 && value !== 0) {\n value = 1;\n } else if (value > 99 && value !== 100) {\n value = 99;\n }\n sumOfPercent += value;\n\n return sumOfPercent;\n });\n\n // Include an imaginary placeholder bar with value equal to\n // the difference between longestBarTotalValue and barTotalValue\n // while calculating sumOfPercent to get correct scalingRatio for absolute-scale variant\n if (this.props.variant === MultiStackedBarChartVariant.AbsoluteScale) {\n let value = total === 0 ? 0 : ((total - barTotalValue) / total) * 100;\n if (value < 1 && value !== 0) {\n value = 1;\n } else if (value > 99 && value !== 100) {\n value = 99;\n }\n sumOfPercent += value;\n }\n\n /**\n * The %age of the space occupied by the margin needs to subtracted\n * while computing the scaling ratio, since the margins are not being\n * scaled down, only the data is being scaled down from a higher percentage to lower percentage\n * Eg: 95% of the space is taken by the bars, 5% by the margins\n * Now if the sumOfPercent is 120% -> This needs to be scaled down to 95%, not 100%\n * since that's only space available to the bars\n */\n\n const scalingRatio = sumOfPercent !== 0 ? sumOfPercent / (100 - totalMarginPercent) : 1;\n\n let prevPosition = 0;\n let value = 0;\n\n const bars = data.chartData!.map((point: IChartDataPoint, index: number) => {\n let startColor: string = point.color\n ? point.color\n : point.placeHolder\n ? palette.neutralLight\n : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n let endColor: string = startColor;\n if (this.props.enableGradient) {\n startColor = point.gradient?.[0] || getNextGradient(index, 0, this.props.theme?.isInverted)[0];\n endColor = point.gradient?.[1] || getNextGradient(index, 0, this.props.theme?.isInverted)[1];\n }\n const pointData = point.data ? point.data : 0;\n if (index > 0) {\n prevPosition += value;\n }\n value = (pointData / total) * 100 ? (pointData / total) * 100 : 0;\n if (value < 1 && value !== 0) {\n value = 1 / scalingRatio;\n } else if (value > 99 && value !== 100) {\n value = 99 / scalingRatio;\n } else {\n value = value / scalingRatio;\n }\n\n startingPoint.push(prevPosition);\n\n const styles = this.props.styles;\n const shouldHighlight = this._legendHighlighted(point.legend!) || this._noLegendHighlighted() ? true : false;\n const hoverCardYColor = point.placeHolder ? this.props.theme!.semanticColors.bodyText : startColor;\n\n this._classNames = getClassNames(styles!, {\n theme: this.props.theme!,\n shouldHighlight,\n href,\n variant: this.props.variant,\n hideLabels: this.props.hideLabels,\n });\n\n const gradientId = getId('MSBC_Gradient') + `_${barNo}_${index}`;\n\n return (\n <g\n key={index}\n className={point.placeHolder ? this._classNames.placeHolderOnHover : this._classNames.opacityChangeOnHover}\n ref={(e: SVGGElement) => {\n this._refCallback(e, point.legend!);\n }}\n data-is-focusable={!this.props.hideTooltip && shouldHighlight}\n onFocus={this._onBarFocus.bind(this, pointData, hoverCardYColor, point)}\n onBlur={this._onBarLeave}\n role=\"img\"\n aria-label={this._getAriaLabel(point)}\n onMouseOver={this._onBarHover.bind(this, pointData, hoverCardYColor, point)}\n onMouseMove={this._onBarHover.bind(this, pointData, hoverCardYColor, point)}\n onMouseLeave={this._onBarLeave}\n onClick={href ? (point.placeHolder ? undefined : this._redirectToUrl.bind(this, href)) : point.onClick}\n >\n {this.props.enableGradient && (\n <defs>\n <linearGradient id={gradientId}>\n <stop offset=\"0\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>\n </defs>\n )}\n <rect\n key={index}\n id={`${this._barId}-${barNo}-${index}`}\n x={`${\n this._isRTL\n ? 100 - startingPoint[index] - value - this.state.barSpacingInPercent * index\n : startingPoint[index] + this.state.barSpacingInPercent * index\n }%`}\n y={0}\n width={value + '%'}\n height={barHeight}\n rx={this.props.roundCorners ? 3 : 0}\n fill={this.props.enableGradient ? `url(#${gradientId})` : startColor}\n />\n </g>\n );\n });\n if (this.props.variant === MultiStackedBarChartVariant.AbsoluteScale && !this.props.hideLabels) {\n let showLabel = false;\n let barLabel = 0;\n if (this._noLegendHighlighted()) {\n showLabel = true;\n barLabel = barTotalValue;\n } else {\n data.chartData?.forEach(point => {\n if (this._legendHighlighted(point.legend!)) {\n showLabel = true;\n barLabel += point.data ? point.data : 0;\n }\n });\n }\n if (showLabel) {\n bars.push(\n <text\n key=\"text\"\n x={`${\n this._isRTL\n ? 100 - (startingPoint[startingPoint.length - 1] || 0) - value - totalMarginPercent\n : (startingPoint[startingPoint.length - 1] || 0) + value + totalMarginPercent\n }%`}\n textAnchor={'start'}\n y={barHeight / 2}\n dominantBaseline=\"central\"\n transform={`translate(${this._isRTL ? -4 : 4})`}\n className={this._classNames.barLabel}\n aria-label={`Total: ${barLabel}`}\n role=\"img\"\n >\n {formatValueWithSIPrefix(barLabel)}\n </text>,\n );\n }\n } else {\n // Render placeholder bars only for part-to-whole variant\n if (data.chartData!.length === 0) {\n bars.push(\n <g key={0} className={this._classNames.noData} onClick={this._redirectToUrl.bind(this, href)}>\n <rect\n key={0}\n id={this._barIdPlaceholderPartToWhole}\n x={'0%'}\n y={0}\n width={'100%'}\n height={barHeight}\n fill={palette.neutralLight}\n rx={this.props.roundCorners ? 3 : 0}\n />\n </g>,\n );\n }\n if (barTotalValue === 0) {\n bars.push(\n <g key={'empty'} className={this._classNames.noData} onClick={this._redirectToUrl.bind(this, href)}>\n <rect\n key={0}\n id={this._barIdEmpty}\n x={'0%'}\n y={0}\n width={'100%'}\n height={barHeight}\n fill={palette.neutralLight}\n rx={this.props.roundCorners ? 3 : 0}\n />\n </g>,\n );\n }\n }\n const hideNumber = hideRatio === undefined ? false : hideRatio;\n\n // Hide right side text of chart title for absolute-scale variant\n const showRatio =\n this.props.variant !== MultiStackedBarChartVariant.AbsoluteScale && !hideNumber && data!.chartData!.length === 2;\n const showNumber =\n this.props.variant !== MultiStackedBarChartVariant.AbsoluteScale && !hideNumber && data!.chartData!.length === 1;\n\n const getChartData = () => convertToLocaleString(data!.chartData![0].data ? data!.chartData![0].data : 0, culture);\n return (\n <div className={this._classNames.singleChartRoot}>\n <FocusZone direction={FocusZoneDirection.horizontal}>\n <div className={this._classNames.chartTitle}>\n {data!.chartTitle && (\n <FocusableTooltipText\n className={this._classNames.chartTitleLeft}\n content={data!.chartTitle}\n accessibilityData={data!.chartTitleAccessibilityData}\n />\n )}\n {showRatio && (\n <div {...getAccessibleDataObject(data!.chartDataAccessibilityData, 'text', false)}>\n <span className={this._classNames.ratioNumerator}>{getChartData()}</span>\n {!hideDenominator && (\n <span className={this._classNames.ratioDenominator}>\n {' / ' + convertToLocaleString(barTotalValue, culture)}\n </span>\n )}\n </div>\n )}\n {showNumber && (\n <div\n className={this._classNames.ratioNumerator}\n {...getAccessibleDataObject(data!.chartDataAccessibilityData, 'text', false)}\n >\n {getChartData()}\n </div>\n )}\n </div>\n </FocusZone>\n <FocusZone direction={FocusZoneDirection.horizontal}>\n <div className={this._classNames.chartWrapper}>\n <svg ref={this.barChartSvgRef} className={this._classNames.chart} aria-label={data?.chartTitle}>\n {bars}\n </svg>\n </div>\n </FocusZone>\n </div>\n );\n }\n\n private _onBarFocus(pointData: number, color: string, point: IChartDataPoint): void {\n this.state.refArray.forEach((obj: IRefArrayData) => {\n if (obj.legendText === point.legend!) {\n this.setState({\n refSelected: obj.refElement,\n /** Show the callout if highlighted bar is focused and Hide it if unhighlighted bar is focused */\n isCalloutVisible: this.state.selectedLegend === '' || this.state.selectedLegend === point.legend!,\n calloutLegend: point.legend!,\n dataForHoverCard: pointData,\n color,\n xCalloutValue: point.xAxisCalloutData!,\n yCalloutValue: point.yAxisCalloutData!,\n dataPointCalloutProps: { ...point, color },\n callOutAccessibilityData: point.callOutAccessibilityData!,\n });\n }\n });\n }\n\n private _refCallback(element: SVGGElement, legendTitle: string): void {\n this.state.refArray.push({ legendText: legendTitle, refElement: element });\n }\n\n private _adjustProps = (): void => {\n const { theme, className, styles, width, barHeight } = this.props;\n this._classNames = getClassNames(styles!, {\n legendColor: this.state.color,\n theme: theme!,\n width,\n className,\n barHeight,\n });\n };\n\n private _onHover(legendTitle: string): void {\n this.setState({\n activeLegend: legendTitle,\n });\n }\n\n private _getLegendData = (data: IChartProps[], hideRatio: boolean[], palette: IPalette): JSX.Element => {\n const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n const actions: ILegend[] = [];\n data.forEach((singleChartData: IChartProps, index: number) => {\n const validChartData = singleChartData.chartData!.filter((_: IChartDataPoint) => !_.placeHolder);\n if (validChartData!.length < 3) {\n const hideNumber = hideRatio[index] === undefined ? false : hideRatio[index];\n if (hideNumber) {\n validChartData!.forEach((point: IChartDataPoint, pointIndex: number) => {\n let color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n if (this.props.enableGradient) {\n color = point.gradient?.[0] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[0];\n }\n\n const checkSimilarLegends = actions.filter(\n (leg: ILegend) => leg.title === point.legend! && leg.color === color,\n );\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n const legend: ILegend = {\n title: point.legend!,\n color,\n action: () => {\n this._onClick(point.legend!);\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onHover(point.legend!);\n },\n onMouseOutAction: () => {\n this._onLeave();\n },\n };\n actions.push(legend);\n });\n }\n } else {\n validChartData!.forEach((point: IChartDataPoint, pointIndex: number) => {\n let color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n if (this.props.enableGradient) {\n color = point.gradient?.[0] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[0];\n }\n\n const checkSimilarLegends = actions.filter(\n (leg: ILegend) => leg.title === point.legend! && leg.color === color,\n );\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n const legend: ILegend = {\n title: point.legend!,\n color,\n action: () => {\n this._onClick(point.legend!);\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onHover(point.legend!);\n },\n onMouseOutAction: () => {\n this._onLeave();\n },\n };\n actions.push(legend);\n });\n }\n });\n return (\n <Legends\n legends={actions}\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n />\n );\n };\n\n private _onClick(legendTitle: string): void {\n if (this.state.selectedLegend === legendTitle) {\n this.setState({\n selectedLegend: '',\n });\n } else {\n this.setState({\n selectedLegend: legendTitle,\n });\n }\n }\n\n private _onLeave(): void {\n this.setState({\n activeLegend: '',\n });\n }\n\n private _onBarHover(\n pointData: number,\n color: string,\n point: IChartDataPoint,\n mouseEvent: React.MouseEvent<SVGPathElement>,\n ): void {\n mouseEvent.persist();\n\n if (this._calloutAnchorPoint !== point) {\n this._calloutAnchorPoint = point;\n this.setState({\n refSelected: mouseEvent,\n /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */\n isCalloutVisible: this.state.selectedLegend === '' || this.state.selectedLegend === point.legend!,\n calloutLegend: point.legend!,\n dataForHoverCard: pointData,\n color,\n xCalloutValue: point.xAxisCalloutData!,\n yCalloutValue: point.yAxisCalloutData!,\n dataPointCalloutProps: { ...point, color },\n callOutAccessibilityData: point.callOutAccessibilityData!,\n });\n }\n }\n\n private _onBarLeave(): void {\n /**/\n }\n\n private _handleChartMouseLeave = () => {\n this._calloutAnchorPoint = null;\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _redirectToUrl(href: string | undefined): void {\n href ? (window.location.href = href) : '';\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 = (legendTitle: string) => {\n return (\n this.state.selectedLegend === legendTitle ||\n (this.state.selectedLegend === '' && this.state.activeLegend === legendTitle)\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 _getAriaLabel = (point: IChartDataPoint): string => {\n const legend = point.xAxisCalloutData || point.legend;\n const yValue = point.yAxisCalloutData || point.data || 0;\n return (\n point.callOutAccessibilityData?.ariaLabel ||\n (legend ? `${legend}, ` : point.placeHolder ? 'Remaining, ' : '') + `${yValue}.`\n );\n };\n\n private _computeLongestBarTotalValue = () => {\n let longestBarTotalValue = 0;\n this.props.data!.forEach(({ chartData }) => {\n const barTotalValue = chartData!.reduce(\n (acc: number, point: IChartDataPoint) => acc + (point.data ? point.data : 0),\n 0,\n );\n longestBarTotalValue = Math.max(longestBarTotalValue, barTotalValue);\n });\n return longestBarTotalValue;\n };\n\n private _isChartEmpty(): boolean {\n return !(\n this.props.data &&\n this.props.data.length > 0 &&\n this.props.data.filter(\n item => item.chartData && item.chartData.length === 0 && (!item.chartTitle || item.chartTitle === ''),\n ).length === 0\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"MultiStackedBarChart.base.js","sourceRoot":"../src/","sources":["components/StackedBarChart/MultiStackedBarChart.base.tsx"],"names":[],"mappings":";;;;IAwBA,IAAM,aAAa,G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react/lib/Utilities';\nimport { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';\nimport { ILegend, Legends } from '../Legends/index';\nimport {\n IAccessibilityProps,\n IChartDataPoint,\n IChartProps,\n IMultiStackedBarChartProps,\n IMultiStackedBarChartStyles,\n IMultiStackedBarChartStyleProps,\n MultiStackedBarChartVariant,\n} from './index';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport { convertToLocaleString } from '../../utilities/locale-util';\nimport {\n ChartHoverCard,\n formatValueWithSIPrefix,\n getAccessibleDataObject,\n getNextGradient,\n} from '../../utilities/index';\nimport { FocusableTooltipText } from '../../utilities/FocusableTooltipText';\n\nconst getClassNames = classNamesFunction<IMultiStackedBarChartStyleProps, IMultiStackedBarChartStyles>();\n\nexport interface IRefArrayData {\n legendText?: string;\n refElement?: SVGGElement;\n}\n\nexport interface IMultiStackedBarChartState {\n isCalloutVisible: boolean;\n refArray: IRefArrayData[];\n selectedLegend: string;\n activeLegend: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n refSelected: any;\n dataForHoverCard: number;\n color: string;\n xCalloutValue?: string;\n yCalloutValue?: string;\n dataPointCalloutProps?: IChartDataPoint;\n callOutAccessibilityData?: IAccessibilityProps;\n calloutLegend: string;\n barSpacingInPercent: number;\n}\n\nexport class MultiStackedBarChartBase extends React.Component<IMultiStackedBarChartProps, IMultiStackedBarChartState> {\n public static defaultProps: Partial<IMultiStackedBarChartProps> = {\n barHeight: 12,\n hideRatio: [],\n hideDenominator: [],\n };\n\n private _classNames: IProcessedStyleSet<IMultiStackedBarChartStyles>;\n private _calloutId: string;\n private _calloutAnchorPoint: IChartDataPoint | null;\n private _longestBarTotalValue: number;\n private _isRTL: boolean = getRTL();\n private barChartSvgRef: React.RefObject<SVGSVGElement>;\n private _emptyChartId: string;\n private _barId: string;\n private _barIdPlaceholderPartToWhole: string;\n private _barIdEmpty: string;\n\n public constructor(props: IMultiStackedBarChartProps) {\n super(props);\n this.state = {\n isCalloutVisible: false,\n refArray: [],\n selectedLegend: '',\n activeLegend: '',\n refSelected: null,\n dataForHoverCard: 0,\n color: '',\n xCalloutValue: '',\n yCalloutValue: '',\n calloutLegend: '',\n barSpacingInPercent: 0,\n };\n this._onLeave = this._onLeave.bind(this);\n this._onBarLeave = this._onBarLeave.bind(this);\n this._calloutId = getId('callout');\n this.barChartSvgRef = React.createRef<SVGSVGElement>();\n this._emptyChartId = getId('_MSBC_empty');\n this._barId = getId('_MSBC_rect_');\n this._barIdPlaceholderPartToWhole = getId('_MSBC_rect_partToWhole_');\n this._barIdEmpty = getId('_MSBC_rect_empty');\n }\n\n public componentDidMount(): void {\n const svgWidth = this.barChartSvgRef.current?.getBoundingClientRect().width || 0;\n const MARGIN_WIDTH_IN_PX = 3;\n if (svgWidth) {\n const currentBarSpacing = (MARGIN_WIDTH_IN_PX / svgWidth) * 100;\n this.setState({ barSpacingInPercent: currentBarSpacing });\n }\n }\n\n public render(): JSX.Element {\n if (!this._isChartEmpty()) {\n const { data, theme, culture } = this.props;\n this._adjustProps();\n const { palette } = theme!;\n const legends = this._getLegendData(data!, this.props.hideRatio!, palette);\n const { isCalloutVisible } = this.state;\n\n this._classNames = getClassNames(this.props.styles!, {\n legendColor: this.state.color,\n theme: theme!,\n variant: this.props.variant,\n hideLabels: this.props.hideLabels,\n });\n\n const legendName = this.state.xCalloutValue ? this.state.xCalloutValue : this.state.calloutLegend;\n const calloutYVal = this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard;\n\n this._longestBarTotalValue = this._computeLongestBarTotalValue();\n\n const bars: JSX.Element[] = data!.map((singleChartData: IChartProps, index: number) => {\n const singleChartBars = this._createBarsAndLegends(\n singleChartData!,\n this.props.barHeight!,\n palette,\n this.props.hideRatio![index],\n this.props.hideDenominator![index],\n this.props.href,\n index,\n );\n return (\n <div key={index} id={`_MSBC_bar-${index}`}>\n {singleChartBars}\n </div>\n );\n });\n\n return (\n <div className={this._classNames.root} onMouseLeave={this._handleChartMouseLeave}>\n {bars}\n {!this.props.hideLegend && <div className={this._classNames.legendContainer}>{legends}</div>}\n <Callout\n gapSpace={15}\n isBeakVisible={false}\n target={this.state.refSelected}\n setInitialFocus={true}\n hidden={!(!this.props.hideTooltip && isCalloutVisible)}\n directionalHint={DirectionalHint.topAutoEdge}\n id={this._calloutId}\n onDismiss={this._closeCallout}\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n preventDismissOnLostFocus={true}\n /** Keep the callout updated with details of focused/hovered bar */\n shouldUpdateWhenHidden={true}\n {...this.props.calloutProps!}\n {...getAccessibleDataObject(this.state.callOutAccessibilityData, 'text', false)}\n >\n <>\n {this.props.onRenderCalloutPerDataPoint ? (\n this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)\n ) : (\n <ChartHoverCard Legend={legendName} YValue={calloutYVal} color={this.state.color} culture={culture} />\n )}\n </>\n </Callout>\n </div>\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 /**\n * The Create bar functions returns an array of <rect> elements, which form the bars\n * For each bar an x value, and a width needs to be specified\n * The computations are done based on percentages\n * Extra margin is also provided, in the x value to provide some spacing\n */\n\n private _createBarsAndLegends(\n data: IChartProps,\n barHeight: number,\n palette: IPalette,\n hideRatio: boolean,\n hideDenominator: boolean,\n href?: string,\n barNo?: number,\n ): JSX.Element {\n const noOfBars =\n data.chartData?.reduce((count: number, point: IChartDataPoint) => (count += (point.data || 0) > 0 ? 1 : 0), 0) ||\n 1;\n const totalMarginPercent = this.state.barSpacingInPercent * (noOfBars - 1);\n const { culture } = this.props;\n const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n // calculating starting point of each bar and it's range\n const startingPoint: number[] = [];\n const barTotalValue = data.chartData!.reduce(\n (acc: number, point: IChartDataPoint) => acc + (point.data ? point.data : 0),\n 0,\n );\n const total =\n this.props.variant === MultiStackedBarChartVariant.AbsoluteScale ? this._longestBarTotalValue : barTotalValue;\n\n let sumOfPercent = 0;\n data.chartData!.map((point: IChartDataPoint, index: number) => {\n const pointData = point.data ? point.data : 0;\n const currValue = (pointData / total) * 100;\n let value = currValue ? currValue : 0;\n\n if (value < 1 && value !== 0) {\n value = 1;\n } else if (value > 99 && value !== 100) {\n value = 99;\n }\n sumOfPercent += value;\n\n return sumOfPercent;\n });\n\n // Include an imaginary placeholder bar with value equal to\n // the difference between longestBarTotalValue and barTotalValue\n // while calculating sumOfPercent to get correct scalingRatio for absolute-scale variant\n if (this.props.variant === MultiStackedBarChartVariant.AbsoluteScale) {\n let value = total === 0 ? 0 : ((total - barTotalValue) / total) * 100;\n if (value < 1 && value !== 0) {\n value = 1;\n } else if (value > 99 && value !== 100) {\n value = 99;\n }\n sumOfPercent += value;\n }\n\n /**\n * The %age of the space occupied by the margin needs to subtracted\n * while computing the scaling ratio, since the margins are not being\n * scaled down, only the data is being scaled down from a higher percentage to lower percentage\n * Eg: 95% of the space is taken by the bars, 5% by the margins\n * Now if the sumOfPercent is 120% -> This needs to be scaled down to 95%, not 100%\n * since that's only space available to the bars\n */\n\n const scalingRatio = sumOfPercent !== 0 ? sumOfPercent / (100 - totalMarginPercent) : 1;\n\n let prevPosition = 0;\n let value = 0;\n\n const bars = data.chartData!.map((point: IChartDataPoint, index: number) => {\n let startColor: string = point.color\n ? point.color\n : point.placeHolder\n ? palette.neutralLight\n : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n let endColor: string = startColor;\n if (this.props.enableGradient) {\n startColor = point.gradient?.[0] || getNextGradient(index, 0, this.props.theme?.isInverted)[0];\n endColor = point.gradient?.[1] || getNextGradient(index, 0, this.props.theme?.isInverted)[1];\n }\n const pointData = point.data ? point.data : 0;\n if (index > 0) {\n prevPosition += value;\n }\n value = (pointData / total) * 100 ? (pointData / total) * 100 : 0;\n if (value < 1 && value !== 0) {\n value = 1 / scalingRatio;\n } else if (value > 99 && value !== 100) {\n value = 99 / scalingRatio;\n } else {\n value = value / scalingRatio;\n }\n\n startingPoint.push(prevPosition);\n\n const styles = this.props.styles;\n const shouldHighlight = this._legendHighlighted(point.legend!) || this._noLegendHighlighted() ? true : false;\n const hoverCardYColor = point.placeHolder ? this.props.theme!.semanticColors.bodyText : startColor;\n\n this._classNames = getClassNames(styles!, {\n theme: this.props.theme!,\n shouldHighlight,\n href,\n variant: this.props.variant,\n hideLabels: this.props.hideLabels,\n });\n\n const gradientId = getId('MSBC_Gradient') + `_${barNo}_${index}`;\n\n return (\n <g\n key={index}\n className={point.placeHolder ? this._classNames.placeHolderOnHover : this._classNames.opacityChangeOnHover}\n ref={(e: SVGGElement) => {\n this._refCallback(e, point.legend!);\n }}\n data-is-focusable={!this.props.hideTooltip && shouldHighlight}\n onFocus={this._onBarFocus.bind(this, pointData, hoverCardYColor, point)}\n onBlur={this._onBarLeave}\n role=\"img\"\n aria-label={this._getAriaLabel(point)}\n onMouseOver={this._onBarHover.bind(this, pointData, hoverCardYColor, point)}\n onMouseMove={this._onBarHover.bind(this, pointData, hoverCardYColor, point)}\n onMouseLeave={this._onBarLeave}\n onClick={href ? (point.placeHolder ? undefined : this._redirectToUrl.bind(this, href)) : point.onClick}\n >\n {this.props.enableGradient && (\n <defs>\n <linearGradient id={gradientId}>\n <stop offset=\"0\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>\n </defs>\n )}\n <rect\n key={index}\n id={`${this._barId}-${barNo}-${index}`}\n x={`${\n this._isRTL\n ? 100 - startingPoint[index] - value - this.state.barSpacingInPercent * index\n : startingPoint[index] + this.state.barSpacingInPercent * index\n }%`}\n y={0}\n width={value + '%'}\n height={barHeight}\n rx={this.props.roundCorners ? 3 : 0}\n fill={this.props.enableGradient ? `url(#${gradientId})` : startColor}\n />\n </g>\n );\n });\n if (this.props.variant === MultiStackedBarChartVariant.AbsoluteScale && !this.props.hideLabels) {\n let showLabel = false;\n let barLabel = 0;\n if (this._noLegendHighlighted()) {\n showLabel = true;\n barLabel = barTotalValue;\n } else {\n data.chartData?.forEach(point => {\n if (this._legendHighlighted(point.legend!)) {\n showLabel = true;\n barLabel += point.data ? point.data : 0;\n }\n });\n }\n if (showLabel) {\n bars.push(\n <text\n key=\"text\"\n x={`${\n this._isRTL\n ? 100 - (startingPoint[startingPoint.length - 1] || 0) - value - totalMarginPercent\n : (startingPoint[startingPoint.length - 1] || 0) + value + totalMarginPercent\n }%`}\n textAnchor={'start'}\n y={barHeight / 2}\n dominantBaseline=\"central\"\n transform={`translate(${this._isRTL ? -4 : 4})`}\n className={this._classNames.barLabel}\n aria-label={`Total: ${barLabel}`}\n role=\"img\"\n >\n {formatValueWithSIPrefix(barLabel)}\n </text>,\n );\n }\n } else {\n // Render placeholder bars only for part-to-whole variant\n if (data.chartData!.length === 0) {\n bars.push(\n <g key={0} className={this._classNames.noData} onClick={this._redirectToUrl.bind(this, href)}>\n <rect\n key={0}\n id={this._barIdPlaceholderPartToWhole}\n x={'0%'}\n y={0}\n width={'100%'}\n height={barHeight}\n fill={palette.neutralLight}\n rx={this.props.roundCorners ? 3 : 0}\n />\n </g>,\n );\n }\n if (barTotalValue === 0) {\n bars.push(\n <g key={'empty'} className={this._classNames.noData} onClick={this._redirectToUrl.bind(this, href)}>\n <rect\n key={0}\n id={this._barIdEmpty}\n x={'0%'}\n y={0}\n width={'100%'}\n height={barHeight}\n fill={palette.neutralLight}\n rx={this.props.roundCorners ? 3 : 0}\n />\n </g>,\n );\n }\n }\n const hideNumber = hideRatio === undefined ? false : hideRatio;\n\n // Hide right side text of chart title for absolute-scale variant\n const showRatio =\n this.props.variant !== MultiStackedBarChartVariant.AbsoluteScale && !hideNumber && data!.chartData!.length === 2;\n const showNumber =\n this.props.variant !== MultiStackedBarChartVariant.AbsoluteScale && !hideNumber && data!.chartData!.length === 1;\n\n const getChartData = () => convertToLocaleString(data!.chartData![0].data ? data!.chartData![0].data : 0, culture);\n return (\n <div className={this._classNames.singleChartRoot}>\n <FocusZone direction={FocusZoneDirection.horizontal}>\n <div className={this._classNames.chartTitle}>\n {data!.chartTitle && (\n <FocusableTooltipText\n className={this._classNames.chartTitleLeft}\n content={data!.chartTitle}\n accessibilityData={data!.chartTitleAccessibilityData}\n />\n )}\n {showRatio && (\n <div {...getAccessibleDataObject(data!.chartDataAccessibilityData, 'text', false)}>\n <span className={this._classNames.ratioNumerator}>{getChartData()}</span>\n {!hideDenominator && (\n <span className={this._classNames.ratioDenominator}>\n {' / ' + convertToLocaleString(barTotalValue, culture)}\n </span>\n )}\n </div>\n )}\n {showNumber && (\n <div\n className={this._classNames.ratioNumerator}\n {...getAccessibleDataObject(data!.chartDataAccessibilityData, 'text', false)}\n >\n {getChartData()}\n </div>\n )}\n </div>\n </FocusZone>\n <FocusZone direction={FocusZoneDirection.horizontal}>\n <div className={this._classNames.chartWrapper}>\n <svg ref={this.barChartSvgRef} className={this._classNames.chart} aria-label={data?.chartTitle}>\n {bars}\n </svg>\n </div>\n </FocusZone>\n </div>\n );\n }\n\n private _onBarFocus(pointData: number, color: string, point: IChartDataPoint): void {\n this.state.refArray.forEach((obj: IRefArrayData) => {\n if (obj.legendText === point.legend!) {\n this.setState({\n refSelected: obj.refElement,\n /** Show the callout if highlighted bar is focused and Hide it if unhighlighted bar is focused */\n isCalloutVisible: this.state.selectedLegend === '' || this.state.selectedLegend === point.legend!,\n calloutLegend: point.legend ? point.legend : point.placeHolder ? 'Remaining' : '',\n dataForHoverCard: pointData,\n color,\n xCalloutValue: point.xAxisCalloutData!,\n yCalloutValue: point.yAxisCalloutData!,\n dataPointCalloutProps: { ...point, color },\n callOutAccessibilityData: point.callOutAccessibilityData!,\n });\n }\n });\n }\n\n private _refCallback(element: SVGGElement, legendTitle: string): void {\n this.state.refArray.push({ legendText: legendTitle, refElement: element });\n }\n\n private _adjustProps = (): void => {\n const { theme, className, styles, width, barHeight } = this.props;\n this._classNames = getClassNames(styles!, {\n legendColor: this.state.color,\n theme: theme!,\n width,\n className,\n barHeight,\n });\n };\n\n private _onHover(legendTitle: string): void {\n this.setState({\n activeLegend: legendTitle,\n });\n }\n\n private _getLegendData = (data: IChartProps[], hideRatio: boolean[], palette: IPalette): JSX.Element => {\n const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n const actions: ILegend[] = [];\n data.forEach((singleChartData: IChartProps, index: number) => {\n const validChartData = singleChartData.chartData!.filter((_: IChartDataPoint) => !_.placeHolder);\n if (validChartData!.length < 3) {\n const hideNumber = hideRatio[index] === undefined ? false : hideRatio[index];\n if (hideNumber) {\n validChartData!.forEach((point: IChartDataPoint, pointIndex: number) => {\n let color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n if (this.props.enableGradient) {\n color = point.gradient?.[0] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[0];\n }\n\n const checkSimilarLegends = actions.filter(\n (leg: ILegend) => leg.title === point.legend! && leg.color === color,\n );\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n const legend: ILegend = {\n title: point.legend!,\n color,\n action: () => {\n this._onClick(point.legend!);\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onHover(point.legend!);\n },\n onMouseOutAction: () => {\n this._onLeave();\n },\n };\n actions.push(legend);\n });\n }\n } else {\n validChartData!.forEach((point: IChartDataPoint, pointIndex: number) => {\n let color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n if (this.props.enableGradient) {\n color = point.gradient?.[0] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[0];\n }\n\n const checkSimilarLegends = actions.filter(\n (leg: ILegend) => leg.title === point.legend! && leg.color === color,\n );\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n const legend: ILegend = {\n title: point.legend!,\n color,\n action: () => {\n this._onClick(point.legend!);\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onHover(point.legend!);\n },\n onMouseOutAction: () => {\n this._onLeave();\n },\n };\n actions.push(legend);\n });\n }\n });\n return (\n <Legends\n legends={actions}\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n />\n );\n };\n\n private _onClick(legendTitle: string): void {\n if (this.state.selectedLegend === legendTitle) {\n this.setState({\n selectedLegend: '',\n });\n } else {\n this.setState({\n selectedLegend: legendTitle,\n });\n }\n }\n\n private _onLeave(): void {\n this.setState({\n activeLegend: '',\n });\n }\n\n private _onBarHover(\n pointData: number,\n color: string,\n point: IChartDataPoint,\n mouseEvent: React.MouseEvent<SVGPathElement>,\n ): void {\n mouseEvent.persist();\n\n if (this._calloutAnchorPoint !== point) {\n this._calloutAnchorPoint = point;\n this.setState({\n refSelected: mouseEvent,\n /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */\n isCalloutVisible: this.state.selectedLegend === '' || this.state.selectedLegend === point.legend!,\n calloutLegend: point.legend ? point.legend : point.placeHolder ? 'Remaining' : '',\n dataForHoverCard: pointData,\n color,\n xCalloutValue: point.xAxisCalloutData!,\n yCalloutValue: point.yAxisCalloutData!,\n dataPointCalloutProps: { ...point, color },\n callOutAccessibilityData: point.callOutAccessibilityData!,\n });\n }\n }\n\n private _onBarLeave(): void {\n /**/\n }\n\n private _handleChartMouseLeave = () => {\n this._calloutAnchorPoint = null;\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _redirectToUrl(href: string | undefined): void {\n href ? (window.location.href = href) : '';\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 = (legendTitle: string) => {\n return (\n this.state.selectedLegend === legendTitle ||\n (this.state.selectedLegend === '' && this.state.activeLegend === legendTitle)\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 _getAriaLabel = (point: IChartDataPoint): string => {\n const legend = point.xAxisCalloutData || point.legend;\n const yValue = point.yAxisCalloutData || point.data || 0;\n return (\n point.callOutAccessibilityData?.ariaLabel ||\n (legend ? `${legend}, ` : point.placeHolder ? 'Remaining, ' : '') + `${yValue}.`\n );\n };\n\n private _computeLongestBarTotalValue = () => {\n let longestBarTotalValue = 0;\n this.props.data!.forEach(({ chartData }) => {\n const barTotalValue = chartData!.reduce(\n (acc: number, point: IChartDataPoint) => acc + (point.data ? point.data : 0),\n 0,\n );\n longestBarTotalValue = Math.max(longestBarTotalValue, barTotalValue);\n });\n return longestBarTotalValue;\n };\n\n private _isChartEmpty(): boolean {\n return !(\n this.props.data &&\n this.props.data.length > 0 &&\n this.props.data.filter(\n item => item.chartData && item.chartData.length === 0 && (!item.chartTitle || item.chartTitle === ''),\n ).length === 0\n );\n }\n}\n"]}
|