@fluentui/react-charting 5.19.44 → 5.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/CHANGELOG.json +39 -1
  2. package/CHANGELOG.md +24 -2
  3. package/dist/react-charting.d.ts +4 -0
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +1 -0
  7. package/lib/components/AreaChart/AreaChart.base.js +2 -2
  8. package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
  9. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +5 -4
  10. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  11. package/lib/components/Legends/Legends.base.js +2 -2
  12. package/lib/components/Legends/Legends.base.js.map +1 -1
  13. package/lib/components/Legends/Legends.types.d.ts +4 -0
  14. package/lib/components/Legends/Legends.types.js.map +1 -1
  15. package/lib/components/LineChart/LineChart.base.js +2 -2
  16. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  17. package/lib/components/Sparkline/Sparkline.base.js +2 -2
  18. package/lib/components/Sparkline/Sparkline.base.js.map +1 -1
  19. package/lib/utilities/utilities.js +5 -4
  20. package/lib/utilities/utilities.js.map +1 -1
  21. package/lib/version.js +1 -1
  22. package/lib/version.js.map +1 -1
  23. package/lib-amd/components/AreaChart/AreaChart.base.js +1 -1
  24. package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
  25. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +4 -3
  26. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  27. package/lib-amd/components/Legends/Legends.base.js +2 -2
  28. package/lib-amd/components/Legends/Legends.base.js.map +1 -1
  29. package/lib-amd/components/Legends/Legends.types.d.ts +4 -0
  30. package/lib-amd/components/Legends/Legends.types.js.map +1 -1
  31. package/lib-amd/components/LineChart/LineChart.base.js +1 -1
  32. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  33. package/lib-amd/components/Sparkline/Sparkline.base.js +2 -2
  34. package/lib-amd/components/Sparkline/Sparkline.base.js.map +1 -1
  35. package/lib-amd/utilities/utilities.js +4 -3
  36. package/lib-amd/utilities/utilities.js.map +1 -1
  37. package/lib-amd/version.js +1 -1
  38. package/lib-amd/version.js.map +1 -1
  39. package/lib-commonjs/components/AreaChart/AreaChart.base.js +1 -1
  40. package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
  41. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +4 -3
  42. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  43. package/lib-commonjs/components/Legends/Legends.base.js +2 -2
  44. package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
  45. package/lib-commonjs/components/Legends/Legends.types.d.ts +4 -0
  46. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  47. package/lib-commonjs/components/LineChart/LineChart.base.js +1 -1
  48. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  49. package/lib-commonjs/components/Sparkline/Sparkline.base.js +2 -2
  50. package/lib-commonjs/components/Sparkline/Sparkline.base.js.map +1 -1
  51. package/lib-commonjs/utilities/utilities.js +4 -3
  52. package/lib-commonjs/utilities/utilities.js.map +1 -1
  53. package/lib-commonjs/version.js +1 -1
  54. package/lib-commonjs/version.js.map +1 -1
  55. package/package.json +17 -17
  56. package/src/components/Legends/Legends.types.ts +5 -0
@@ -1 +1 @@
1
- {"version":3,"file":"AreaChart.base.js","sourceRoot":"../src/","sources":["components/AreaChart/AreaChart.base.tsx"],"names":[],"mappings":";;;;IAiCA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA0C,CAAC;IAEnF,8DAA8D;IAC9D,IAAM,MAAM,GAAG,IAAA,mBAAQ,EAAC,UAAC,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QAEO,qCAAa,GAArB;YACE,OAAO,CAAC,CACN,CACE,IAAI,CAAC,KAAK,CAAC,IAAI;gBACf,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa;gBAC7B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC;gBACxC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAtB,CAAsB,CAAC,CAAC,MAAM,KAAK,CAAC,CAClF;YACD,oCAAoC;YACpC,+FAA+F;YAC/F,iCAAiC;aAClC,CAAC;QACJ,CAAC;QACH,oBAAC;IAAD,CAAC,AA/0BD,CAAmC,KAAK,CAAC,SAAS,GA+0BjD;IA/0BY,sCAAa","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, bisector } from 'd3-array';\nimport { clientPoint } from 'd3-selection';\nimport { select as d3Select } from 'd3-selection';\nimport { area as d3Area, stack as d3Stack, curveMonotoneX as d3CurveBasis, line as d3Line } from 'd3-shape';\nimport { classNamesFunction, find, getId, memoizeFunction } from '@fluentui/react/lib/Utilities';\nimport {\n IAccessibilityProps,\n CartesianChart,\n ICustomizedCalloutData,\n IAreaChartProps,\n IBasestate,\n ILineChartDataPoint,\n ILineChartPoints,\n IChildProps,\n IMargins,\n IAreaChartStyleProps,\n IAreaChartStyles,\n} from '../../index';\nimport { warnDeprecations } from '@fluentui/react/lib/Utilities';\nimport {\n calloutData,\n getXAxisType,\n ChartTypes,\n XAxisTypes,\n getTypeOfAxis,\n tooltipOfXAxislabels,\n getNextColor,\n getColorFromToken,\n} from '../../utilities/index';\nimport { ILegend, Legends } from '../Legends/index';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\n\nconst getClassNames = classNamesFunction<IAreaChartStyleProps, IAreaChartStyles>();\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst bisect = bisector((d: any) => d.x).left;\n\nconst COMPONENT_NAME = 'AREA CHART';\n\nenum InterceptVisibility {\n show = 'visibility',\n hide = 'hidden',\n}\n\nexport interface IAreaChartAreaPoint {\n xVal: string | number;\n values: IAreaChartDataSetPoint;\n}\nexport interface IAreaChartDataSetPoint {\n [key: string]: number | string;\n}\nexport interface IDPointType {\n values: { 0: number; 1: number; data: {} };\n xVal: number | Date;\n}\nexport interface IMapXToDataSet {\n [key: string]: ILineChartDataPoint[];\n [key: number]: ILineChartDataPoint[];\n}\n\n//by default d3-shape 3.2.0 limits the< path> data point precision to 3 digits(d3/d3-path#10)\n\nexport interface IAreaChartState extends IBasestate {\n lineXValue: number;\n displayOfLine: InterceptVisibility;\n isCircleClicked: boolean;\n dataPointCalloutProps?: ICustomizedCalloutData;\n stackCalloutProps?: ICustomizedCalloutData;\n nearestCircleToHighlight: number | string | Date | null;\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n isShowCalloutPending: boolean;\n /** focused point */\n activePoint: string;\n}\n\nexport class AreaChartBase extends React.Component<IAreaChartProps, IAreaChartState> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _calloutPoints: any;\n private _createSet: (data: ILineChartPoints[]) => {\n colors: string[];\n opacity: number[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n stackedInfo: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n calloutPoints: any;\n };\n private _colors: string[];\n private _opacity: number[];\n private _uniqueIdForGraph: string;\n private _verticalLineId: string;\n private _circleId: string;\n private _uniqueCallOutID: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _stackedData: any;\n private _chart: JSX.Element[];\n private margins: IMargins;\n private _rectId: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _xAxisRectScale: any;\n // determines if the given area chart has multiple stacked bar charts\n private _isMultiStackChart: boolean;\n private _tooltipId: string;\n private _highlightedCircleId: string;\n //enableComputationOptimization is used for optimized code to group data points by x value\n //from O(n^2) to O(n) using a map.\n private _enableComputationOptimization: boolean;\n private _firstRenderOptimization: boolean;\n private _emptyChartId: string;\n\n public constructor(props: IAreaChartProps) {\n super(props);\n this._createSet = memoizeFunction(this._createDataSet);\n this.state = {\n selectedLegend: '',\n activeLegend: '',\n hoverXValue: '',\n isCalloutVisible: false,\n refSelected: null,\n YValueHover: [],\n lineXValue: 0,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n nearestCircleToHighlight: null,\n isShowCalloutPending: false,\n activePoint: '',\n };\n warnDeprecations(COMPONENT_NAME, props, {\n showYAxisGridLines: 'Dont use this property. Lines are drawn by default',\n });\n this._uniqueIdForGraph = getId('areaChart_');\n this._verticalLineId = getId('verticalLine_');\n this._circleId = getId('circle');\n this._rectId = getId('rectangle');\n this._tooltipId = getId('AreaChartTooltipID');\n this._enableComputationOptimization = true;\n this._firstRenderOptimization = true;\n this._emptyChartId = getId('_AreaChart_empty');\n }\n\n public componentDidUpdate() {\n if (this.state.isShowCalloutPending) {\n this.setState({\n refSelected: `#${this._highlightedCircleId}`,\n isCalloutVisible: true,\n isShowCalloutPending: false,\n });\n }\n }\n\n public render(): JSX.Element {\n if (!this._isChartEmpty()) {\n const { lineChartData, chartTitle } = this.props.data;\n const points = this._addDefaultColors(lineChartData);\n const { colors, opacity, stackedInfo, calloutPoints } = this._createSet(points);\n this._calloutPoints = calloutPoints;\n const isXAxisDateType = getXAxisType(points);\n this._colors = colors;\n this._opacity = opacity;\n this._stackedData = stackedInfo.stackedData;\n const legends: JSX.Element = this._getLegendData(points);\n\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n\n const calloutProps = {\n target: this.state.refSelected,\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n id: `toolTip${this._uniqueCallOutID}`,\n gapSpace: 15,\n isBeakVisible: false,\n onDismiss: this._closeCallout,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData: this.state.xAxisCalloutAccessibilityData,\n ...this.props.calloutProps,\n };\n return (\n <CartesianChart\n {...this.props}\n chartTitle={chartTitle}\n points={points}\n chartType={ChartTypes.AreaChart}\n calloutProps={calloutProps}\n legendBars={legends}\n isCalloutForStack\n xAxisType={isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n tickParams={tickParams}\n maxOfYVal={stackedInfo.maxOfYVal}\n getGraphData={this._getGraphData}\n getmargins={this._getMargins}\n customizedCallout={this._getCustomizedCallout()}\n onChartMouseLeave={this._handleChartMouseLeave}\n enableFirstRenderOptimization={this.props.enablePerfOptimization && this._firstRenderOptimization}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n this._xAxisRectScale = props.xScale;\n const ticks = this._xAxisRectScale.ticks();\n const width1 = this._xAxisRectScale(ticks[ticks.length - 1]);\n const rectHeight = props.containerHeight! - this.margins.top!;\n return (\n <>\n <g>\n <rect\n id={this._rectId}\n width={width1}\n height={rectHeight}\n fill={'transparent'}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n />\n </g>\n <g>{this._chart}</g>\n </>\n );\n }}\n />\n );\n }\n return (\n <div\n id={this._emptyChartId}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\n />\n );\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _onRectMouseMove = (mouseEvent: React.MouseEvent<SVGRectElement | SVGPathElement | SVGCircleElement>) => {\n mouseEvent.persist();\n const { data } = this.props;\n const { lineChartData } = data;\n // This will get the value of the X when mouse is on the chart\n const xOffset = this._xAxisRectScale.invert(clientPoint(document.getElementById(this._rectId)!, mouseEvent)[0]);\n const i = bisect(lineChartData![0].data, xOffset);\n const d0 = lineChartData![0].data[i - 1] as ILineChartDataPoint;\n const d1 = lineChartData![0].data[i] as ILineChartDataPoint;\n let axisType: XAxisTypes | null = null;\n let pointToHighlight: string | Date | number | null = null;\n let index: null | number = null;\n if (d0 === undefined && d1 !== undefined) {\n pointToHighlight = d1.x;\n index = i;\n } else if (d0 !== undefined && d1 === undefined) {\n pointToHighlight = d0.x;\n index = i - 1;\n } else {\n axisType = getTypeOfAxis(lineChartData![0].data[0].x, true) as XAxisTypes;\n let x0;\n let point0;\n let point1;\n switch (axisType) {\n case XAxisTypes.DateAxis:\n x0 = new Date(xOffset).getTime();\n point0 = (d0.x as Date).getTime();\n point1 = (d1.x as Date).getTime();\n pointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n case XAxisTypes.NumericAxis:\n x0 = xOffset as number;\n point0 = d0.x as number;\n point1 = d1.x as number;\n pointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n default:\n break;\n }\n }\n\n const { xAxisCalloutData, xAxisCalloutAccessibilityData } = lineChartData![0].data[index as number];\n const formattedDate = pointToHighlight instanceof Date ? pointToHighlight.toLocaleString() : pointToHighlight;\n const modifiedXVal = pointToHighlight instanceof Date ? pointToHighlight.getTime() : pointToHighlight;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = find(this._calloutPoints, (element: { x: string | number }) => {\n return element.x === modifiedXVal;\n });\n const nearestCircleToHighlight =\n axisType === XAxisTypes.DateAxis ? (pointToHighlight as Date).getTime() : pointToHighlight;\n const pointToHighlightUpdated = this.state.nearestCircleToHighlight !== nearestCircleToHighlight;\n // if no points need to be called out then don't show vertical line and callout card\n if (found && pointToHighlightUpdated && !this.state.isShowCalloutPending) {\n this.setState({\n nearestCircleToHighlight: nearestCircleToHighlight,\n isCalloutVisible: false,\n isShowCalloutPending: true,\n lineXValue: this._xAxisRectScale(pointToHighlight),\n displayOfLine: InterceptVisibility.show,\n isCircleClicked: false,\n stackCalloutProps: found!,\n YValueHover: found.values,\n dataPointCalloutProps: found!,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : formattedDate,\n xAxisCalloutAccessibilityData,\n activePoint: '',\n });\n } else {\n /*\n When above if condition is false but found=true, it means either\n\n 1). pointToHighlightUpdated is false.\n For this case we dont need to do anything.\n\n 2). isShowCalloutPending is true.\n For this case there will be no callout updation for the event.\n This condition has been added to prevent repeated callout flashing.\n Currently there is a fraction of second delay between hover event and subsequent callout refresh.\n In the meantime if another event is received, the callout continues to flash for the set of\n intermediate hover events.\n\n This does not cause any issue as the user interaction takes atleast a fraction of second and the final\n callout state is ultimately achieved.\n If a user performs very swift mouse maneuver, the intermediate events will be lost but the callout experience\n remains smooth.\n */\n }\n if (!found) {\n this.setState({\n isCalloutVisible: false,\n nearestCircleToHighlight: nearestCircleToHighlight,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n });\n }\n };\n /**\n * just cleaning up the state which we have set in the mouse move event\n */\n private _onRectMouseOut = () => {\n /**/\n };\n\n private _handleChartMouseLeave = () => {\n this.setState({\n refSelected: null,\n isCalloutVisible: false,\n nearestCircleToHighlight: null,\n lineXValue: 0,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n stackCalloutProps: undefined,\n dataPointCalloutProps: undefined,\n hoverXValue: undefined,\n YValueHover: [],\n });\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getStackedData = (keys: string[], dataSet: any) => {\n const stackedValues = d3Stack().keys(keys)(dataSet);\n const maxOfYVal = d3Max(stackedValues[stackedValues.length - 1], dp => dp[1])!;\n const stackedData: Array<IAreaChartDataSetPoint[]> = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n stackedValues.forEach((layer: any) => {\n const currentStack: IAreaChartDataSetPoint[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n layer.forEach((d: any) => {\n currentStack.push({\n values: d,\n xVal: d.data.xVal,\n });\n });\n stackedData.push(currentStack);\n });\n this._isMultiStackChart = stackedData && stackedData.length > 1 ? true : false;\n return {\n stackedData,\n maxOfYVal,\n };\n };\n\n private _createDataSet = (points: ILineChartPoints[]) => {\n if (this.props.enablePerfOptimization && this._enableComputationOptimization) {\n const allChartPoints: ILineChartDataPoint[] = [];\n const dataSet: IAreaChartDataSetPoint[] = [];\n const colors: string[] = [];\n const opacity: number[] = [];\n const calloutPoints = calloutData(points!);\n\n points &&\n points.length &&\n points.forEach((singleChartPoint: ILineChartPoints) => {\n colors.push(singleChartPoint.color!);\n opacity.push(singleChartPoint.opacity || 1);\n allChartPoints.push(...singleChartPoint.data);\n });\n\n const mapOfXvalToListOfDataPoints: IMapXToDataSet = {};\n allChartPoints.forEach((dataPoint: ILineChartDataPoint) => {\n const xValue = dataPoint.x instanceof Date ? dataPoint.x.toLocaleString() : dataPoint.x;\n // map of x value to the list of data points which share the same x value .\n if (mapOfXvalToListOfDataPoints[xValue]) {\n mapOfXvalToListOfDataPoints[xValue].push(dataPoint);\n } else {\n mapOfXvalToListOfDataPoints[xValue] = [dataPoint];\n }\n });\n\n Object.keys(mapOfXvalToListOfDataPoints).forEach((key: number | string) => {\n const value: ILineChartDataPoint[] = mapOfXvalToListOfDataPoints[key];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDataset: any = {};\n value.forEach((singleDataPoint: ILineChartDataPoint, index: number) => {\n singleDataset.xVal = singleDataPoint.x;\n singleDataset[`chart${index}`] = singleDataPoint.y;\n });\n dataSet.push(singleDataset);\n });\n\n // get keys from dataset, used to create stacked data\n const keysLength: number = dataSet && Object.keys(dataSet[0])!.length;\n const keys: string[] = [];\n for (let i = 0; i < keysLength - 1; i++) {\n const keyVal = `chart${i}`;\n keys.push(keyVal);\n }\n\n // Stacked Info used to draw graph\n const stackedInfo = this._getStackedData(keys, dataSet);\n\n return {\n colors,\n opacity,\n keys,\n stackedInfo,\n calloutPoints,\n };\n } else {\n const allChartPoints: ILineChartDataPoint[] = [];\n const dataSet: IAreaChartDataSetPoint[] = [];\n const colors: string[] = [];\n const opacity: number[] = [];\n const calloutPoints = calloutData(points!);\n\n points &&\n points.length &&\n points.forEach((singleChartPoint: ILineChartPoints) => {\n colors.push(singleChartPoint.color!);\n opacity.push(singleChartPoint.opacity || 1);\n allChartPoints.push(...singleChartPoint.data);\n });\n\n let tempArr = allChartPoints;\n while (tempArr.length) {\n const valToCheck = tempArr[0].x instanceof Date ? tempArr[0].x.toLocaleString() : tempArr[0].x;\n const filteredChartPoints: ILineChartDataPoint[] = tempArr.filter(\n (point: ILineChartDataPoint) => (point.x instanceof Date ? point.x.toLocaleString() : point.x) === valToCheck,\n );\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDataset: any = {};\n filteredChartPoints.forEach((singleDataPoint: ILineChartDataPoint, index: number) => {\n singleDataset.xVal = singleDataPoint.x;\n singleDataset[`chart${index}`] = singleDataPoint.y;\n });\n dataSet.push(singleDataset);\n // removing compared objects from array\n const val = tempArr[0].x instanceof Date ? tempArr[0].x.toLocaleString() : tempArr[0].x;\n tempArr = tempArr.filter(\n (point: ILineChartDataPoint) => (point.x instanceof Date ? point.x.toLocaleString() : point.x) !== val,\n );\n }\n\n // get keys from dataset, used to create stacked data\n const keysLength: number = dataSet && Object.keys(dataSet[0])!.length;\n const keys: string[] = [];\n for (let i = 0; i < keysLength - 1; i++) {\n const keyVal = `chart${i}`;\n keys.push(keyVal);\n }\n\n // Stacked Info used to draw graph\n const stackedInfo = this._getStackedData(keys, dataSet);\n\n return {\n colors,\n opacity,\n keys,\n stackedInfo,\n calloutPoints,\n };\n }\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerStack\n ? this.props.onRenderCalloutPerStack(this.state.stackCalloutProps)\n : this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)\n : null;\n };\n\n private _getGraphData = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xAxis: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yAxis: any,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) => {\n this._chart = this._drawGraph(containerHeight, xAxis, yAxis, xElement!);\n };\n\n private _onLegendClick(legend: string): void {\n if (this.state.selectedLegend === legend) {\n this.setState({\n selectedLegend: '',\n });\n } else {\n this.setState({\n selectedLegend: legend,\n });\n }\n }\n\n private _onLegendHover(legend: string): void {\n this.setState({\n activeLegend: legend,\n });\n }\n\n private _onLegendLeave(): void {\n this.setState({\n activeLegend: '',\n });\n }\n\n private _getLegendData = (points: ILineChartPoints[]): JSX.Element => {\n const data = points;\n const actions: ILegend[] = [];\n\n data.forEach((singleChartData: ILineChartPoints) => {\n const color: string = singleChartData.color!;\n const checkSimilarLegends = actions.filter(\n (leg: ILegend) => leg.title === singleChartData.legend && leg.color === color,\n );\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n\n const legend: ILegend = {\n title: singleChartData.legend,\n color: color,\n action: () => {\n this._onLegendClick(singleChartData.legend);\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(singleChartData.legend);\n },\n onMouseOutAction: () => {\n this._onLegendLeave();\n },\n };\n\n actions.push(legend);\n });\n return (\n <Legends\n legends={actions}\n overflowProps={this.props.legendsOverflowProps}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n {...this.props.legendProps}\n />\n );\n };\n\n private _onDataPointClick = (func: (() => void) | undefined) => {\n if (func) {\n func();\n }\n this.setState({ isCircleClicked: true });\n };\n\n private _getOpacity = (legend: string): number => {\n if (!this._isMultiStackChart) {\n return 0.7;\n } else {\n const opacity = this._legendHighlighted(legend) || this._noLegendHighlighted() ? 0.7 : 0.1;\n return opacity;\n }\n };\n\n private _getLineOpacity = (legend: string): number => {\n if (!this._isMultiStackChart) {\n return 1;\n } else {\n let opacity = 0.3;\n if (this.state.isCalloutVisible) {\n opacity = 1;\n }\n if (!this._noLegendHighlighted()) {\n opacity = this._legendHighlighted(legend) ? 0 : 0.1;\n }\n return opacity;\n }\n };\n\n private _updateCircleFillColor = (xDataPoint: number | Date, lineColor: string, circleId: string): string => {\n let fillColor = lineColor;\n if (this.state.nearestCircleToHighlight === xDataPoint || this.state.activePoint === circleId) {\n this._highlightedCircleId = circleId;\n if (!this.state.isCircleClicked) {\n fillColor = this.props.theme!.semanticColors.bodyBackground;\n }\n }\n\n return fillColor;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _drawGraph = (containerHeight: number, xScale: any, yScale: any, xElement: SVGElement): JSX.Element[] => {\n const points = this._addDefaultColors(this.props.data.lineChartData);\n const { pointOptions, pointLineOptions } = this.props.data;\n const area = d3Area()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => xScale(d.xVal))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y0((d: any) => yScale(d.values[0]))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y1((d: any) => yScale(d.values[1]))\n .curve(d3CurveBasis);\n const line = d3Line()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => xScale(d.xVal))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => yScale(d.values[1]))\n .curve(d3CurveBasis);\n\n const graph: JSX.Element[] = [];\n let lineColor: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._stackedData.forEach((singleStackedData: Array<any>, index: number) => {\n graph.push(\n <React.Fragment key={`${index}-graph-${this._uniqueIdForGraph}`}>\n {this.props.enableGradient && (\n <defs>\n <linearGradient id={`gradient_${index}`} x1=\"0%\" x2=\"0%\" y1=\"0%\" y2=\"100%\">\n <stop offset=\"0\" stopColor={this._colors[index]} />\n <stop offset=\"100%\" stopColor=\"transparent\" />\n </linearGradient>\n </defs>\n )}\n <path\n id={`${index}-line-${this._uniqueIdForGraph}`}\n d={line(singleStackedData)!}\n fill={'transparent'}\n strokeWidth={3}\n stroke={this._colors[index]}\n opacity={this._getLineOpacity(points[index]!.legend)}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n {...points[index]!.lineOptions}\n />\n {singleStackedData.length === 1 ? (\n <circle\n id={`${index}-graph-${this._uniqueIdForGraph}`}\n cx={xScale(singleStackedData[0].xVal)}\n cy={yScale(singleStackedData[0].values[1])}\n r={6}\n stroke={this._colors[index]}\n strokeWidth={3}\n fill={this._colors[index]}\n opacity={this._opacity[index]}\n fillOpacity={this._getOpacity(points[index]!.legend)}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n />\n ) : (\n <path\n id={`${index}-graph-${this._uniqueIdForGraph}`}\n d={area(singleStackedData)!}\n fill={this.props.enableGradient ? `url(#gradient_${index})` : this._colors[index]}\n opacity={this._opacity[index]}\n fillOpacity={this._getOpacity(points[index]!.legend)}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n {...(this.props.optimizeLargeData && {\n 'data-is-focusable': this._legendHighlighted(points[index]!.legend) || this._noLegendHighlighted(),\n role: 'img',\n 'aria-label': `${points[index].legend}, series ${index + 1} of ${points.length} with ${\n points[index].data.length\n } data points.`,\n })}\n />\n )}\n </React.Fragment>,\n );\n });\n\n const circleRadius = pointOptions && pointOptions.r ? Number(pointOptions.r) : 8;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._stackedData.forEach((singleStackedData: Array<any>, index: number) => {\n if (points.length === index) {\n return;\n }\n\n if (!this.props.optimizeLargeData || singleStackedData.length === 1) {\n // Render circles for all data points\n graph.push(\n <g key={`${index}-dots-${this._uniqueIdForGraph}`} d={area(singleStackedData)!} clipPath=\"url(#clip)\">\n {singleStackedData.map((singlePoint: IDPointType, pointIndex: number) => {\n const circleId = `${this._circleId}_${index * this._stackedData[0].length + pointIndex}`;\n const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal;\n lineColor = points[index]!.color!;\n return (\n <circle\n key={circleId}\n id={circleId}\n data-is-focusable={this._legendHighlighted(points[index]!.legend) || this._noLegendHighlighted()}\n cx={xScale(singlePoint.xVal)}\n cy={yScale(singlePoint.values[1])}\n stroke={lineColor}\n strokeWidth={3}\n fill={this._updateCircleFillColor(xDataPoint, lineColor, circleId)}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n onClick={this._onDataPointClick.bind(this, points[index]!.data[pointIndex].onDataPointClick!)}\n onFocus={() => this._handleFocus(index, pointIndex, circleId)}\n onBlur={this._handleBlur}\n {...pointOptions}\n r={this._getCircleRadius(xDataPoint, circleRadius, circleId)}\n role=\"img\"\n aria-label={this._getAriaLabel(index, pointIndex)}\n />\n );\n })}\n </g>,\n );\n } else {\n // Render circles for data points close to the mouse pointer only\n singleStackedData.forEach((singlePoint: IDPointType, pointIndex: number) => {\n const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal;\n if (this.state.nearestCircleToHighlight === xDataPoint) {\n const circleId = `${this._circleId}_${index * this._stackedData[0].length + pointIndex}`;\n lineColor = points[index]!.color!;\n graph.push(\n <circle\n key={circleId}\n id={circleId}\n cx={xScale(singlePoint.xVal)}\n cy={yScale(singlePoint.values[1])}\n stroke={lineColor}\n strokeWidth={3}\n fill={this._updateCircleFillColor(xDataPoint, lineColor, circleId)}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n onClick={this._onDataPointClick.bind(this, points[index]!.data[pointIndex].onDataPointClick!)}\n {...pointOptions}\n r={this._getCircleRadius(xDataPoint, circleRadius, circleId)}\n />,\n );\n }\n });\n }\n });\n graph.push(\n <line\n id={this._verticalLineId}\n key={this._verticalLineId}\n x1={this.state.lineXValue}\n y1={0}\n x2={this.state.lineXValue}\n y2={containerHeight}\n strokeWidth={1}\n strokeDasharray={5.5}\n stroke={lineColor!}\n opacity={0.5}\n visibility={this.state.displayOfLine}\n {...pointLineOptions}\n />,\n );\n const classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!this.props.showXAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return graph;\n };\n\n private _getCircleRadius = (xDataPoint: number, circleRadius: number, circleId: string): number => {\n const { isCircleClicked, nearestCircleToHighlight, activePoint } = this.state;\n if (isCircleClicked && nearestCircleToHighlight === xDataPoint) {\n return 1;\n } else if (nearestCircleToHighlight === xDataPoint || activePoint === circleId) {\n return circleRadius;\n } else {\n return 0;\n }\n };\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legend: string) => {\n return (\n this.state.selectedLegend === legend || (this.state.selectedLegend === '' && this.state.activeLegend === legend)\n );\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this.state.selectedLegend === '' && this.state.activeLegend === '';\n };\n\n private _addDefaultColors = (lineChartData?: ILineChartPoints[]): ILineChartPoints[] => {\n return lineChartData\n ? lineChartData.map((item, index) => {\n let color: string;\n // isInverted property is applicable to v8 themes only\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0, this.props.theme?.isInverted);\n } else {\n color = getColorFromToken(item.color, this.props.theme?.isInverted);\n }\n\n return { ...item, color };\n })\n : [];\n };\n\n private _handleFocus = (lineIndex: number, pointIndex: number, circleId: string) => {\n const { x, y, xAxisCalloutData } = this.props.data.lineChartData![lineIndex].data[pointIndex];\n const formattedDate = x instanceof Date ? x.toLocaleString() : x;\n const modifiedXVal = x instanceof Date ? x.getTime() : x;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = this._calloutPoints.find((e: { x: string | number }) => e.x === modifiedXVal);\n // Show details in the callout for the focused point only\n found.values = found.values.filter((e: { y: number }) => e.y === y);\n\n this.setState({\n refSelected: `#${circleId}`,\n isCalloutVisible: true,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : formattedDate,\n YValueHover: found.values,\n stackCalloutProps: found,\n dataPointCalloutProps: found,\n activePoint: circleId,\n });\n };\n\n private _handleBlur = () => {\n this.setState({\n refSelected: null,\n isCalloutVisible: false,\n hoverXValue: undefined,\n YValueHover: [],\n stackCalloutProps: undefined,\n dataPointCalloutProps: undefined,\n activePoint: '',\n });\n };\n\n private _getAriaLabel(lineIndex: number, pointIndex: number): string {\n const line = this.props.data.lineChartData![lineIndex];\n const point = line.data[pointIndex];\n const formattedDate = point.x instanceof Date ? point.x.toLocaleString() : point.x;\n const xValue = point.xAxisCalloutData || formattedDate;\n const legend = line.legend;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n private _isChartEmpty(): boolean {\n return !(\n (\n this.props.data &&\n this.props.data.lineChartData &&\n this.props.data.lineChartData.length > 0 &&\n this.props.data.lineChartData.filter(item => item.data.length === 0).length === 0\n )\n // if all the data sets have no data\n // filtering all items which have no data and checking if the length of the filtered array is 0\n // which means chart is not empty\n );\n }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AAI,CAAC,MAAM,CAAC;YAC3B,IAAM,MAAM,GAAG,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,CAAC,CAAC;YACjD,OAAO,CAAA,MAAA,KAAK,CAAC,wBAAwB,0CAAE,SAAS,KAAI,UAAG,MAAM,eAAK,MAAM,eAAK,MAAM,MAAG,CAAC;QACzF,CAAC;QAEO,qCAAa,GAArB;YACE,OAAO,CAAC,CACN,CACE,IAAI,CAAC,KAAK,CAAC,IAAI;gBACf,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa;gBAC7B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC;gBACxC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAtB,CAAsB,CAAC,CAAC,MAAM,KAAK,CAAC,CAClF;YACD,oCAAoC;YACpC,+FAA+F;YAC/F,iCAAiC;aAClC,CAAC;QACJ,CAAC;QACH,oBAAC;IAAD,CAAC,AA/0BD,CAAmC,KAAK,CAAC,SAAS,GA+0BjD;IA/0BY,sCAAa","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, bisector } from 'd3-array';\nimport { pointer } from 'd3-selection';\nimport { select as d3Select } from 'd3-selection';\nimport { area as d3Area, stack as d3Stack, curveMonotoneX as d3CurveBasis, line as d3Line } from 'd3-shape';\nimport { classNamesFunction, find, getId, memoizeFunction } from '@fluentui/react/lib/Utilities';\nimport {\n IAccessibilityProps,\n CartesianChart,\n ICustomizedCalloutData,\n IAreaChartProps,\n IBasestate,\n ILineChartDataPoint,\n ILineChartPoints,\n IChildProps,\n IMargins,\n IAreaChartStyleProps,\n IAreaChartStyles,\n} from '../../index';\nimport { warnDeprecations } from '@fluentui/react/lib/Utilities';\nimport {\n calloutData,\n getXAxisType,\n ChartTypes,\n XAxisTypes,\n getTypeOfAxis,\n tooltipOfXAxislabels,\n getNextColor,\n getColorFromToken,\n} from '../../utilities/index';\nimport { ILegend, Legends } from '../Legends/index';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\n\nconst getClassNames = classNamesFunction<IAreaChartStyleProps, IAreaChartStyles>();\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst bisect = bisector((d: any) => d.x).left;\n\nconst COMPONENT_NAME = 'AREA CHART';\n\nenum InterceptVisibility {\n show = 'visibility',\n hide = 'hidden',\n}\n\nexport interface IAreaChartAreaPoint {\n xVal: string | number;\n values: IAreaChartDataSetPoint;\n}\nexport interface IAreaChartDataSetPoint {\n [key: string]: number | string;\n}\nexport interface IDPointType {\n values: { 0: number; 1: number; data: {} };\n xVal: number | Date;\n}\nexport interface IMapXToDataSet {\n [key: string]: ILineChartDataPoint[];\n [key: number]: ILineChartDataPoint[];\n}\n\n//by default d3-shape 3.2.0 limits the< path> data point precision to 3 digits(d3/d3-path#10)\n\nexport interface IAreaChartState extends IBasestate {\n lineXValue: number;\n displayOfLine: InterceptVisibility;\n isCircleClicked: boolean;\n dataPointCalloutProps?: ICustomizedCalloutData;\n stackCalloutProps?: ICustomizedCalloutData;\n nearestCircleToHighlight: number | string | Date | null;\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n isShowCalloutPending: boolean;\n /** focused point */\n activePoint: string;\n}\n\nexport class AreaChartBase extends React.Component<IAreaChartProps, IAreaChartState> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _calloutPoints: any;\n private _createSet: (data: ILineChartPoints[]) => {\n colors: string[];\n opacity: number[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n stackedInfo: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n calloutPoints: any;\n };\n private _colors: string[];\n private _opacity: number[];\n private _uniqueIdForGraph: string;\n private _verticalLineId: string;\n private _circleId: string;\n private _uniqueCallOutID: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _stackedData: any;\n private _chart: JSX.Element[];\n private margins: IMargins;\n private _rectId: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _xAxisRectScale: any;\n // determines if the given area chart has multiple stacked bar charts\n private _isMultiStackChart: boolean;\n private _tooltipId: string;\n private _highlightedCircleId: string;\n //enableComputationOptimization is used for optimized code to group data points by x value\n //from O(n^2) to O(n) using a map.\n private _enableComputationOptimization: boolean;\n private _firstRenderOptimization: boolean;\n private _emptyChartId: string;\n\n public constructor(props: IAreaChartProps) {\n super(props);\n this._createSet = memoizeFunction(this._createDataSet);\n this.state = {\n selectedLegend: '',\n activeLegend: '',\n hoverXValue: '',\n isCalloutVisible: false,\n refSelected: null,\n YValueHover: [],\n lineXValue: 0,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n nearestCircleToHighlight: null,\n isShowCalloutPending: false,\n activePoint: '',\n };\n warnDeprecations(COMPONENT_NAME, props, {\n showYAxisGridLines: 'Dont use this property. Lines are drawn by default',\n });\n this._uniqueIdForGraph = getId('areaChart_');\n this._verticalLineId = getId('verticalLine_');\n this._circleId = getId('circle');\n this._rectId = getId('rectangle');\n this._tooltipId = getId('AreaChartTooltipID');\n this._enableComputationOptimization = true;\n this._firstRenderOptimization = true;\n this._emptyChartId = getId('_AreaChart_empty');\n }\n\n public componentDidUpdate() {\n if (this.state.isShowCalloutPending) {\n this.setState({\n refSelected: `#${this._highlightedCircleId}`,\n isCalloutVisible: true,\n isShowCalloutPending: false,\n });\n }\n }\n\n public render(): JSX.Element {\n if (!this._isChartEmpty()) {\n const { lineChartData, chartTitle } = this.props.data;\n const points = this._addDefaultColors(lineChartData);\n const { colors, opacity, stackedInfo, calloutPoints } = this._createSet(points);\n this._calloutPoints = calloutPoints;\n const isXAxisDateType = getXAxisType(points);\n this._colors = colors;\n this._opacity = opacity;\n this._stackedData = stackedInfo.stackedData;\n const legends: JSX.Element = this._getLegendData(points);\n\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n\n const calloutProps = {\n target: this.state.refSelected,\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n id: `toolTip${this._uniqueCallOutID}`,\n gapSpace: 15,\n isBeakVisible: false,\n onDismiss: this._closeCallout,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData: this.state.xAxisCalloutAccessibilityData,\n ...this.props.calloutProps,\n };\n return (\n <CartesianChart\n {...this.props}\n chartTitle={chartTitle}\n points={points}\n chartType={ChartTypes.AreaChart}\n calloutProps={calloutProps}\n legendBars={legends}\n isCalloutForStack\n xAxisType={isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n tickParams={tickParams}\n maxOfYVal={stackedInfo.maxOfYVal}\n getGraphData={this._getGraphData}\n getmargins={this._getMargins}\n customizedCallout={this._getCustomizedCallout()}\n onChartMouseLeave={this._handleChartMouseLeave}\n enableFirstRenderOptimization={this.props.enablePerfOptimization && this._firstRenderOptimization}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n this._xAxisRectScale = props.xScale;\n const ticks = this._xAxisRectScale.ticks();\n const width1 = this._xAxisRectScale(ticks[ticks.length - 1]);\n const rectHeight = props.containerHeight! - this.margins.top!;\n return (\n <>\n <g>\n <rect\n id={this._rectId}\n width={width1}\n height={rectHeight}\n fill={'transparent'}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n />\n </g>\n <g>{this._chart}</g>\n </>\n );\n }}\n />\n );\n }\n return (\n <div\n id={this._emptyChartId}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\n />\n );\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _onRectMouseMove = (mouseEvent: React.MouseEvent<SVGRectElement | SVGPathElement | SVGCircleElement>) => {\n mouseEvent.persist();\n const { data } = this.props;\n const { lineChartData } = data;\n // This will get the value of the X when mouse is on the chart\n const xOffset = this._xAxisRectScale.invert(pointer(mouseEvent)[0], document.getElementById(this._rectId)!);\n const i = bisect(lineChartData![0].data, xOffset);\n const d0 = lineChartData![0].data[i - 1] as ILineChartDataPoint;\n const d1 = lineChartData![0].data[i] as ILineChartDataPoint;\n let axisType: XAxisTypes | null = null;\n let pointToHighlight: string | Date | number | null = null;\n let index: null | number = null;\n if (d0 === undefined && d1 !== undefined) {\n pointToHighlight = d1.x;\n index = i;\n } else if (d0 !== undefined && d1 === undefined) {\n pointToHighlight = d0.x;\n index = i - 1;\n } else {\n axisType = getTypeOfAxis(lineChartData![0].data[0].x, true) as XAxisTypes;\n let x0;\n let point0;\n let point1;\n switch (axisType) {\n case XAxisTypes.DateAxis:\n x0 = new Date(xOffset).getTime();\n point0 = (d0.x as Date).getTime();\n point1 = (d1.x as Date).getTime();\n pointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n case XAxisTypes.NumericAxis:\n x0 = xOffset as number;\n point0 = d0.x as number;\n point1 = d1.x as number;\n pointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n default:\n break;\n }\n }\n\n const { xAxisCalloutData, xAxisCalloutAccessibilityData } = lineChartData![0].data[index as number];\n const formattedDate = pointToHighlight instanceof Date ? pointToHighlight.toLocaleString() : pointToHighlight;\n const modifiedXVal = pointToHighlight instanceof Date ? pointToHighlight.getTime() : pointToHighlight;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = find(this._calloutPoints, (element: { x: string | number }) => {\n return element.x === modifiedXVal;\n });\n const nearestCircleToHighlight =\n axisType === XAxisTypes.DateAxis ? (pointToHighlight as Date).getTime() : pointToHighlight;\n const pointToHighlightUpdated = this.state.nearestCircleToHighlight !== nearestCircleToHighlight;\n // if no points need to be called out then don't show vertical line and callout card\n if (found && pointToHighlightUpdated && !this.state.isShowCalloutPending) {\n this.setState({\n nearestCircleToHighlight: nearestCircleToHighlight,\n isCalloutVisible: false,\n isShowCalloutPending: true,\n lineXValue: this._xAxisRectScale(pointToHighlight),\n displayOfLine: InterceptVisibility.show,\n isCircleClicked: false,\n stackCalloutProps: found!,\n YValueHover: found.values,\n dataPointCalloutProps: found!,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : formattedDate,\n xAxisCalloutAccessibilityData,\n activePoint: '',\n });\n } else {\n /*\n When above if condition is false but found=true, it means either\n\n 1). pointToHighlightUpdated is false.\n For this case we dont need to do anything.\n\n 2). isShowCalloutPending is true.\n For this case there will be no callout updation for the event.\n This condition has been added to prevent repeated callout flashing.\n Currently there is a fraction of second delay between hover event and subsequent callout refresh.\n In the meantime if another event is received, the callout continues to flash for the set of\n intermediate hover events.\n\n This does not cause any issue as the user interaction takes atleast a fraction of second and the final\n callout state is ultimately achieved.\n If a user performs very swift mouse maneuver, the intermediate events will be lost but the callout experience\n remains smooth.\n */\n }\n if (!found) {\n this.setState({\n isCalloutVisible: false,\n nearestCircleToHighlight: nearestCircleToHighlight,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n });\n }\n };\n /**\n * just cleaning up the state which we have set in the mouse move event\n */\n private _onRectMouseOut = () => {\n /**/\n };\n\n private _handleChartMouseLeave = () => {\n this.setState({\n refSelected: null,\n isCalloutVisible: false,\n nearestCircleToHighlight: null,\n lineXValue: 0,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n stackCalloutProps: undefined,\n dataPointCalloutProps: undefined,\n hoverXValue: undefined,\n YValueHover: [],\n });\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getStackedData = (keys: string[], dataSet: any) => {\n const stackedValues = d3Stack().keys(keys)(dataSet);\n const maxOfYVal = d3Max(stackedValues[stackedValues.length - 1], dp => dp[1])!;\n const stackedData: Array<IAreaChartDataSetPoint[]> = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n stackedValues.forEach((layer: any) => {\n const currentStack: IAreaChartDataSetPoint[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n layer.forEach((d: any) => {\n currentStack.push({\n values: d,\n xVal: d.data.xVal,\n });\n });\n stackedData.push(currentStack);\n });\n this._isMultiStackChart = stackedData && stackedData.length > 1 ? true : false;\n return {\n stackedData,\n maxOfYVal,\n };\n };\n\n private _createDataSet = (points: ILineChartPoints[]) => {\n if (this.props.enablePerfOptimization && this._enableComputationOptimization) {\n const allChartPoints: ILineChartDataPoint[] = [];\n const dataSet: IAreaChartDataSetPoint[] = [];\n const colors: string[] = [];\n const opacity: number[] = [];\n const calloutPoints = calloutData(points!);\n\n points &&\n points.length &&\n points.forEach((singleChartPoint: ILineChartPoints) => {\n colors.push(singleChartPoint.color!);\n opacity.push(singleChartPoint.opacity || 1);\n allChartPoints.push(...singleChartPoint.data);\n });\n\n const mapOfXvalToListOfDataPoints: IMapXToDataSet = {};\n allChartPoints.forEach((dataPoint: ILineChartDataPoint) => {\n const xValue = dataPoint.x instanceof Date ? dataPoint.x.toLocaleString() : dataPoint.x;\n // map of x value to the list of data points which share the same x value .\n if (mapOfXvalToListOfDataPoints[xValue]) {\n mapOfXvalToListOfDataPoints[xValue].push(dataPoint);\n } else {\n mapOfXvalToListOfDataPoints[xValue] = [dataPoint];\n }\n });\n\n Object.keys(mapOfXvalToListOfDataPoints).forEach((key: number | string) => {\n const value: ILineChartDataPoint[] = mapOfXvalToListOfDataPoints[key];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDataset: any = {};\n value.forEach((singleDataPoint: ILineChartDataPoint, index: number) => {\n singleDataset.xVal = singleDataPoint.x;\n singleDataset[`chart${index}`] = singleDataPoint.y;\n });\n dataSet.push(singleDataset);\n });\n\n // get keys from dataset, used to create stacked data\n const keysLength: number = dataSet && Object.keys(dataSet[0])!.length;\n const keys: string[] = [];\n for (let i = 0; i < keysLength - 1; i++) {\n const keyVal = `chart${i}`;\n keys.push(keyVal);\n }\n\n // Stacked Info used to draw graph\n const stackedInfo = this._getStackedData(keys, dataSet);\n\n return {\n colors,\n opacity,\n keys,\n stackedInfo,\n calloutPoints,\n };\n } else {\n const allChartPoints: ILineChartDataPoint[] = [];\n const dataSet: IAreaChartDataSetPoint[] = [];\n const colors: string[] = [];\n const opacity: number[] = [];\n const calloutPoints = calloutData(points!);\n\n points &&\n points.length &&\n points.forEach((singleChartPoint: ILineChartPoints) => {\n colors.push(singleChartPoint.color!);\n opacity.push(singleChartPoint.opacity || 1);\n allChartPoints.push(...singleChartPoint.data);\n });\n\n let tempArr = allChartPoints;\n while (tempArr.length) {\n const valToCheck = tempArr[0].x instanceof Date ? tempArr[0].x.toLocaleString() : tempArr[0].x;\n const filteredChartPoints: ILineChartDataPoint[] = tempArr.filter(\n (point: ILineChartDataPoint) => (point.x instanceof Date ? point.x.toLocaleString() : point.x) === valToCheck,\n );\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDataset: any = {};\n filteredChartPoints.forEach((singleDataPoint: ILineChartDataPoint, index: number) => {\n singleDataset.xVal = singleDataPoint.x;\n singleDataset[`chart${index}`] = singleDataPoint.y;\n });\n dataSet.push(singleDataset);\n // removing compared objects from array\n const val = tempArr[0].x instanceof Date ? tempArr[0].x.toLocaleString() : tempArr[0].x;\n tempArr = tempArr.filter(\n (point: ILineChartDataPoint) => (point.x instanceof Date ? point.x.toLocaleString() : point.x) !== val,\n );\n }\n\n // get keys from dataset, used to create stacked data\n const keysLength: number = dataSet && Object.keys(dataSet[0])!.length;\n const keys: string[] = [];\n for (let i = 0; i < keysLength - 1; i++) {\n const keyVal = `chart${i}`;\n keys.push(keyVal);\n }\n\n // Stacked Info used to draw graph\n const stackedInfo = this._getStackedData(keys, dataSet);\n\n return {\n colors,\n opacity,\n keys,\n stackedInfo,\n calloutPoints,\n };\n }\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerStack\n ? this.props.onRenderCalloutPerStack(this.state.stackCalloutProps)\n : this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)\n : null;\n };\n\n private _getGraphData = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xAxis: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yAxis: any,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) => {\n this._chart = this._drawGraph(containerHeight, xAxis, yAxis, xElement!);\n };\n\n private _onLegendClick(legend: string): void {\n if (this.state.selectedLegend === legend) {\n this.setState({\n selectedLegend: '',\n });\n } else {\n this.setState({\n selectedLegend: legend,\n });\n }\n }\n\n private _onLegendHover(legend: string): void {\n this.setState({\n activeLegend: legend,\n });\n }\n\n private _onLegendLeave(): void {\n this.setState({\n activeLegend: '',\n });\n }\n\n private _getLegendData = (points: ILineChartPoints[]): JSX.Element => {\n const data = points;\n const actions: ILegend[] = [];\n\n data.forEach((singleChartData: ILineChartPoints) => {\n const color: string = singleChartData.color!;\n const checkSimilarLegends = actions.filter(\n (leg: ILegend) => leg.title === singleChartData.legend && leg.color === color,\n );\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n\n const legend: ILegend = {\n title: singleChartData.legend,\n color: color,\n action: () => {\n this._onLegendClick(singleChartData.legend);\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(singleChartData.legend);\n },\n onMouseOutAction: () => {\n this._onLegendLeave();\n },\n };\n\n actions.push(legend);\n });\n return (\n <Legends\n legends={actions}\n overflowProps={this.props.legendsOverflowProps}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n {...this.props.legendProps}\n />\n );\n };\n\n private _onDataPointClick = (func: (() => void) | undefined) => {\n if (func) {\n func();\n }\n this.setState({ isCircleClicked: true });\n };\n\n private _getOpacity = (legend: string): number => {\n if (!this._isMultiStackChart) {\n return 0.7;\n } else {\n const opacity = this._legendHighlighted(legend) || this._noLegendHighlighted() ? 0.7 : 0.1;\n return opacity;\n }\n };\n\n private _getLineOpacity = (legend: string): number => {\n if (!this._isMultiStackChart) {\n return 1;\n } else {\n let opacity = 0.3;\n if (this.state.isCalloutVisible) {\n opacity = 1;\n }\n if (!this._noLegendHighlighted()) {\n opacity = this._legendHighlighted(legend) ? 0 : 0.1;\n }\n return opacity;\n }\n };\n\n private _updateCircleFillColor = (xDataPoint: number | Date, lineColor: string, circleId: string): string => {\n let fillColor = lineColor;\n if (this.state.nearestCircleToHighlight === xDataPoint || this.state.activePoint === circleId) {\n this._highlightedCircleId = circleId;\n if (!this.state.isCircleClicked) {\n fillColor = this.props.theme!.semanticColors.bodyBackground;\n }\n }\n\n return fillColor;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _drawGraph = (containerHeight: number, xScale: any, yScale: any, xElement: SVGElement): JSX.Element[] => {\n const points = this._addDefaultColors(this.props.data.lineChartData);\n const { pointOptions, pointLineOptions } = this.props.data;\n const area = d3Area()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => xScale(d.xVal))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y0((d: any) => yScale(d.values[0]))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y1((d: any) => yScale(d.values[1]))\n .curve(d3CurveBasis);\n const line = d3Line()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => xScale(d.xVal))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => yScale(d.values[1]))\n .curve(d3CurveBasis);\n\n const graph: JSX.Element[] = [];\n let lineColor: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._stackedData.forEach((singleStackedData: Array<any>, index: number) => {\n graph.push(\n <React.Fragment key={`${index}-graph-${this._uniqueIdForGraph}`}>\n {this.props.enableGradient && (\n <defs>\n <linearGradient id={`gradient_${index}`} x1=\"0%\" x2=\"0%\" y1=\"0%\" y2=\"100%\">\n <stop offset=\"0\" stopColor={this._colors[index]} />\n <stop offset=\"100%\" stopColor=\"transparent\" />\n </linearGradient>\n </defs>\n )}\n <path\n id={`${index}-line-${this._uniqueIdForGraph}`}\n d={line(singleStackedData)!}\n fill={'transparent'}\n strokeWidth={3}\n stroke={this._colors[index]}\n opacity={this._getLineOpacity(points[index]!.legend)}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n {...points[index]!.lineOptions}\n />\n {singleStackedData.length === 1 ? (\n <circle\n id={`${index}-graph-${this._uniqueIdForGraph}`}\n cx={xScale(singleStackedData[0].xVal)}\n cy={yScale(singleStackedData[0].values[1])}\n r={6}\n stroke={this._colors[index]}\n strokeWidth={3}\n fill={this._colors[index]}\n opacity={this._opacity[index]}\n fillOpacity={this._getOpacity(points[index]!.legend)}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n />\n ) : (\n <path\n id={`${index}-graph-${this._uniqueIdForGraph}`}\n d={area(singleStackedData)!}\n fill={this.props.enableGradient ? `url(#gradient_${index})` : this._colors[index]}\n opacity={this._opacity[index]}\n fillOpacity={this._getOpacity(points[index]!.legend)}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n {...(this.props.optimizeLargeData && {\n 'data-is-focusable': this._legendHighlighted(points[index]!.legend) || this._noLegendHighlighted(),\n role: 'img',\n 'aria-label': `${points[index].legend}, series ${index + 1} of ${points.length} with ${\n points[index].data.length\n } data points.`,\n })}\n />\n )}\n </React.Fragment>,\n );\n });\n\n const circleRadius = pointOptions && pointOptions.r ? Number(pointOptions.r) : 8;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._stackedData.forEach((singleStackedData: Array<any>, index: number) => {\n if (points.length === index) {\n return;\n }\n\n if (!this.props.optimizeLargeData || singleStackedData.length === 1) {\n // Render circles for all data points\n graph.push(\n <g key={`${index}-dots-${this._uniqueIdForGraph}`} d={area(singleStackedData)!} clipPath=\"url(#clip)\">\n {singleStackedData.map((singlePoint: IDPointType, pointIndex: number) => {\n const circleId = `${this._circleId}_${index * this._stackedData[0].length + pointIndex}`;\n const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal;\n lineColor = points[index]!.color!;\n return (\n <circle\n key={circleId}\n id={circleId}\n data-is-focusable={this._legendHighlighted(points[index]!.legend) || this._noLegendHighlighted()}\n cx={xScale(singlePoint.xVal)}\n cy={yScale(singlePoint.values[1])}\n stroke={lineColor}\n strokeWidth={3}\n fill={this._updateCircleFillColor(xDataPoint, lineColor, circleId)}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n onClick={this._onDataPointClick.bind(this, points[index]!.data[pointIndex].onDataPointClick!)}\n onFocus={() => this._handleFocus(index, pointIndex, circleId)}\n onBlur={this._handleBlur}\n {...pointOptions}\n r={this._getCircleRadius(xDataPoint, circleRadius, circleId)}\n role=\"img\"\n aria-label={this._getAriaLabel(index, pointIndex)}\n />\n );\n })}\n </g>,\n );\n } else {\n // Render circles for data points close to the mouse pointer only\n singleStackedData.forEach((singlePoint: IDPointType, pointIndex: number) => {\n const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal;\n if (this.state.nearestCircleToHighlight === xDataPoint) {\n const circleId = `${this._circleId}_${index * this._stackedData[0].length + pointIndex}`;\n lineColor = points[index]!.color!;\n graph.push(\n <circle\n key={circleId}\n id={circleId}\n cx={xScale(singlePoint.xVal)}\n cy={yScale(singlePoint.values[1])}\n stroke={lineColor}\n strokeWidth={3}\n fill={this._updateCircleFillColor(xDataPoint, lineColor, circleId)}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n onClick={this._onDataPointClick.bind(this, points[index]!.data[pointIndex].onDataPointClick!)}\n {...pointOptions}\n r={this._getCircleRadius(xDataPoint, circleRadius, circleId)}\n />,\n );\n }\n });\n }\n });\n graph.push(\n <line\n id={this._verticalLineId}\n key={this._verticalLineId}\n x1={this.state.lineXValue}\n y1={0}\n x2={this.state.lineXValue}\n y2={containerHeight}\n strokeWidth={1}\n strokeDasharray={5.5}\n stroke={lineColor!}\n opacity={0.5}\n visibility={this.state.displayOfLine}\n {...pointLineOptions}\n />,\n );\n const classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!this.props.showXAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return graph;\n };\n\n private _getCircleRadius = (xDataPoint: number, circleRadius: number, circleId: string): number => {\n const { isCircleClicked, nearestCircleToHighlight, activePoint } = this.state;\n if (isCircleClicked && nearestCircleToHighlight === xDataPoint) {\n return 1;\n } else if (nearestCircleToHighlight === xDataPoint || activePoint === circleId) {\n return circleRadius;\n } else {\n return 0;\n }\n };\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legend: string) => {\n return (\n this.state.selectedLegend === legend || (this.state.selectedLegend === '' && this.state.activeLegend === legend)\n );\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this.state.selectedLegend === '' && this.state.activeLegend === '';\n };\n\n private _addDefaultColors = (lineChartData?: ILineChartPoints[]): ILineChartPoints[] => {\n return lineChartData\n ? lineChartData.map((item, index) => {\n let color: string;\n // isInverted property is applicable to v8 themes only\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0, this.props.theme?.isInverted);\n } else {\n color = getColorFromToken(item.color, this.props.theme?.isInverted);\n }\n\n return { ...item, color };\n })\n : [];\n };\n\n private _handleFocus = (lineIndex: number, pointIndex: number, circleId: string) => {\n const { x, y, xAxisCalloutData } = this.props.data.lineChartData![lineIndex].data[pointIndex];\n const formattedDate = x instanceof Date ? x.toLocaleString() : x;\n const modifiedXVal = x instanceof Date ? x.getTime() : x;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = this._calloutPoints.find((e: { x: string | number }) => e.x === modifiedXVal);\n // Show details in the callout for the focused point only\n found.values = found.values.filter((e: { y: number }) => e.y === y);\n\n this.setState({\n refSelected: `#${circleId}`,\n isCalloutVisible: true,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : formattedDate,\n YValueHover: found.values,\n stackCalloutProps: found,\n dataPointCalloutProps: found,\n activePoint: circleId,\n });\n };\n\n private _handleBlur = () => {\n this.setState({\n refSelected: null,\n isCalloutVisible: false,\n hoverXValue: undefined,\n YValueHover: [],\n stackCalloutProps: undefined,\n dataPointCalloutProps: undefined,\n activePoint: '',\n });\n };\n\n private _getAriaLabel(lineIndex: number, pointIndex: number): string {\n const line = this.props.data.lineChartData![lineIndex];\n const point = line.data[pointIndex];\n const formattedDate = point.x instanceof Date ? point.x.toLocaleString() : point.x;\n const xValue = point.xAxisCalloutData || formattedDate;\n const legend = line.legend;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n private _isChartEmpty(): boolean {\n return !(\n (\n this.props.data &&\n this.props.data.lineChartData &&\n this.props.data.lineChartData.length > 0 &&\n this.props.data.lineChartData.filter(item => item.data.length === 0).length === 0\n )\n // if all the data sets have no data\n // filtering all items which have no data and checking if the length of the filtered array is 0\n // which means chart is not empty\n );\n }\n}\n"]}
@@ -365,13 +365,14 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-selection", "d3-
365
365
  var _loop_1 = function (i) {
366
366
  var d1 = tickObject[i];
367
367
  (0, d3_selection_1.select)(d1)
368
- .on('mouseover', function (d) {
368
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
369
+ .on('mouseover', function (event, d) {
369
370
  if (!_this.state.tooltipElement) {
370
371
  div.style('opacity', 0.9);
371
372
  div
372
373
  .html(originalDataArray[i])
373
- .style('left', d3_selection_1.event.pageX + 'px')
374
- .style('top', d3_selection_1.event.pageY - 28 + 'px');
374
+ .style('left', event.pageX + 'px')
375
+ .style('top', event.pageY - 28 + 'px');
375
376
  }
376
377
  })
377
378
  .on('mouseout', function (d) {
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalBarChartWithAxis.base.js","sourceRoot":"../src/","sources":["components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.tsx"],"names":[],"mappings":";;;;IAqCA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA4E,CAAC;IAiBrH;QAAoD,0DAGnD;QAiBC,wCAAmB,KAAuC;YAA1D,YACE,kBAAM,KAAK,CAAC,SA0Bb;YApCO,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;YA6G3B,iBAAW,GAAG,UAAC,OAAiB;gBACtC,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACzB,CAAC,CAAC;YAEM,+BAAyB,GAAG,UAAC,KAA2C;;gBACtE,IAAA,KAA2B,KAAI,CAAC,KAAK,eAAf,EAAtB,cAAc,mBAAG,KAAK,KAAA,CAAgB;gBAC9C,IAA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as d3Max } from 'd3-array';\nimport { select as d3Select, event as d3Event } from 'd3-selection';\nimport { scaleLinear as d3ScaleLinear, ScaleLinear as D3ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\nimport { classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { ILegend } from '../../components/Legends/Legends.types';\nimport { Legends } from '../../components/Legends/Legends';\nimport {\n IAccessibilityProps,\n IBasestate,\n IHorizontalBarChartWithAxisDataPoint,\n IRefArrayData,\n IMargins,\n} from '../../types/IDataPoint';\nimport { IChildProps, IYValueHover } from '../CommonComponents/CartesianChart.types';\nimport { CartesianChart } from '../CommonComponents/CartesianChart';\nimport {\n IHorizontalBarChartWithAxisProps,\n IHorizontalBarChartWithAxisStyleProps,\n IHorizontalBarChartWithAxisStyles,\n} from './HorizontalBarChartWithAxis.types';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartHoverCard,\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n YAxisType,\n XAxisTypes,\n NumericAxis,\n StringAxis,\n getTypeOfAxis,\n getNextColor,\n} from '../../utilities/index';\n\nconst getClassNames = classNamesFunction<IHorizontalBarChartWithAxisStyleProps, IHorizontalBarChartWithAxisStyles>();\nexport interface IHorizontalBarChartWithAxisState extends IBasestate {\n selectedLegendTitle: string;\n dataPointCalloutProps?: IHorizontalBarChartWithAxisDataPoint; // define this in hover and focus\n /**\n * data point of x, where rectangle is hovered or focused\n */\n activeXdataPoint: number | null;\n YValueHover: IYValueHover[];\n hoverXValue?: string | number | null;\n callOutAccessibilityData?: IAccessibilityProps;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n tooltipElement?: any;\n}\n\ntype ColorScale = (_p?: number) => string;\n\nexport class HorizontalBarChartWithAxisBase extends React.Component<\n IHorizontalBarChartWithAxisProps,\n IHorizontalBarChartWithAxisState\n> {\n private _points: IHorizontalBarChartWithAxisDataPoint[];\n private _barHeight: number;\n private _colors: string[];\n private _classNames: IProcessedStyleSet<IHorizontalBarChartWithAxisStyles>;\n private _refArray: IRefArrayData[];\n private _calloutId: string;\n private margins: IMargins;\n private _isRtl: boolean = getRTL();\n private _bars: JSX.Element[];\n private _yAxisLabels: string[];\n private _xMax: number;\n private _tooltipId: string;\n private _xAxisType: XAxisTypes;\n private _yAxisType: YAxisType;\n private _calloutAnchorPoint: IHorizontalBarChartWithAxisDataPoint | null;\n\n public constructor(props: IHorizontalBarChartWithAxisProps) {\n super(props);\n this.state = {\n color: '',\n dataForHoverCard: 0,\n isCalloutVisible: false,\n isLegendSelected: false,\n isLegendHovered: false,\n refSelected: null,\n selectedLegendTitle: '',\n xCalloutValue: '',\n yCalloutValue: '',\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n };\n this._calloutId = getId('callout');\n this._tooltipId = getId('HBCWATooltipID_');\n this._refArray = [];\n this._xAxisType =\n this.props.data! && this.props.data!.length > 0\n ? (getTypeOfAxis(this.props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.NumericAxis;\n this._yAxisType =\n this.props.data! && this.props.data!.length > 0\n ? (getTypeOfAxis(this.props.data![0].y, false) as YAxisType)\n : YAxisType.StringAxis;\n }\n\n public render(): JSX.Element {\n this._adjustProps();\n const reversedBars = [...this._points].reverse();\n this._yAxisLabels = reversedBars.map((point: IHorizontalBarChartWithAxisDataPoint) => point.y as string);\n this._xMax = Math.max(\n d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.x)!,\n this.props.xMaxValue || 0,\n );\n const legendBars: JSX.Element = this._getLegendData(this._points, this.props.theme!.palette);\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n });\n const calloutProps = {\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${this._calloutId}`,\n target: this.state.refSelected,\n isBeakVisible: false,\n gapSpace: 15,\n color: this.state.color,\n legend: this.state.selectedLegendTitle,\n XValue: this.state.xCalloutValue,\n YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard,\n onDismiss: this._closeCallout,\n preventDismissOnLostFocus: true,\n ...this.props.calloutProps,\n ...getAccessibleDataObject(this.state.callOutAccessibilityData),\n };\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n return (\n <CartesianChart\n {...this.props}\n points={this._points}\n chartType={ChartTypes.HorizontalBarChartWithAxis}\n xAxisType={this._xAxisType}\n yAxisType={this._yAxisType}\n stringDatasetForYAxisDomain={this._yAxisLabels}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n barwidth={this._barHeight}\n focusZoneDirection={FocusZoneDirection.vertical}\n customizedCallout={this._getCustomizedCallout()}\n getmargins={this._getMargins}\n getGraphData={this._getGraphData}\n getAxisData={this._getAxisData}\n onChartMouseLeave={this._handleChartMouseLeave}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n return (\n <>\n <g>{this._bars}</g>\n </>\n );\n }}\n />\n );\n }\n\n private _adjustProps(): void {\n this._points = this.props.data || [];\n this._barHeight = this.props.barHeight || 32;\n const { palette } = this.props.theme!;\n this._colors = this.props.colors || [palette.blueLight, palette.blue, palette.blueMid, palette.blueDark];\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _renderContentForOnlyBars = (point: IHorizontalBarChartWithAxisDataPoint): JSX.Element => {\n const { useSingleColor = false } = this.props;\n let selectedPointIndex = 0;\n this.props.data!.forEach((yDataPoint: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n if (yDataPoint.y === point.y) {\n selectedPointIndex = index;\n }\n });\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n color = point.color\n ? point.color\n : this.props.colors\n ? this._createColors()(point.x)\n : getNextColor(selectedPointIndex, 0, this.props.theme?.isInverted);\n }\n return (\n <>\n <ChartHoverCard\n XValue={point.xAxisCalloutData || point.x.toString()}\n Legend={point.legend}\n YValue={point.yAxisCalloutData || point.y}\n color={color}\n culture={this.props.culture}\n />\n </>\n );\n };\n\n private _renderCallout = (props?: IHorizontalBarChartWithAxisDataPoint): JSX.Element | null => {\n return props ? this._renderContentForOnlyBars(props) : null;\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps, this._renderCallout)\n : null;\n };\n\n private _getGraphData = (\n xScale: NumericAxis,\n yScale: NumericAxis | StringAxis,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yElement?: SVGElement | null,\n ) => {\n return (this._bars =\n this._yAxisType === YAxisType.NumericAxis\n ? this._createNumericBars(containerHeight, containerWidth, xElement!, yElement!)\n : this._createStringBars(containerHeight, containerWidth, xElement!, yElement!));\n };\n\n private _createColors(): D3ScaleLinear<string, string> | ColorScale {\n const increment = this._colors.length <= 1 ? 1 : 1 / (this._colors.length - 1);\n const { useSingleColor = false } = this.props;\n if (useSingleColor) {\n return (_p?: number) => {\n const { theme, colors } = this.props;\n return colors && colors.length > 0 ? colors[0] : theme!.palette.blueLight;\n };\n }\n const domainValues = [];\n for (let i = 0; i < this._colors.length; i++) {\n domainValues.push(increment * i * this._xMax);\n }\n const colorScale = d3ScaleLinear<string>().domain(domainValues).range(this._colors);\n return colorScale;\n }\n\n private _refCallback = (element: SVGRectElement, legendTitle: string): void => {\n this._refArray.push({ index: legendTitle, refElement: element });\n };\n\n private _getCalloutContentForBar = (\n point: IHorizontalBarChartWithAxisDataPoint,\n ): { YValueHover: IYValueHover[]; hoverXValue: string | number | null } => {\n const YValueHover: IYValueHover[] = [];\n const { useSingleColor = false } = this.props;\n const { data } = this.props;\n const selectedPoint = data!.filter((yDataPoint: IHorizontalBarChartWithAxisDataPoint) => yDataPoint.y === point.y);\n let selectedPointIndex = 0;\n data!.forEach((yDataPoint: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n if (yDataPoint.y === point.y) {\n selectedPointIndex = index;\n }\n });\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n color = selectedPoint[0].color\n ? selectedPoint[0].color\n : this.props.colors\n ? this._createColors()(selectedPoint[0].x)\n : getNextColor(selectedPointIndex, 0, this.props.theme?.isInverted);\n }\n // callout data for the bar\n YValueHover.push({\n legend: selectedPoint[0].legend,\n // For HBCWA x and y Values are swapped\n y: selectedPoint[0].x,\n color,\n data: selectedPoint[0].yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].yAxisCalloutData,\n });\n return { YValueHover, hoverXValue: point.yAxisCalloutData || point.y.toString() };\n };\n\n private _onBarHover(\n point: IHorizontalBarChartWithAxisDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n\n const { YValueHover, hoverXValue } = this._getCalloutContentForBar(point);\n if (\n (this.state.isLegendSelected === false ||\n (this.state.isLegendSelected && this.state.selectedLegendTitle === point.legend)) &&\n this._calloutAnchorPoint !== point\n ) {\n this._calloutAnchorPoint = point;\n this.setState({\n refSelected: mouseEvent,\n isCalloutVisible: true,\n dataForHoverCard: point.x,\n selectedLegendTitle: point.legend!,\n color: this.props.useSingleColor ? color : point.color,\n // To display callout value, if no callout value given, taking given point.x value as a string.\n xCalloutValue: point.yAxisCalloutData! || point.y.toString(),\n yCalloutValue: point.xAxisCalloutData || point.x.toString(),\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n }\n\n private _onBarLeave = (): void => {\n /**/\n };\n\n private _handleChartMouseLeave = (): void => {\n this._calloutAnchorPoint = null;\n this.setState({\n isCalloutVisible: false,\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n });\n };\n\n private _onBarFocus = (\n point: IHorizontalBarChartWithAxisDataPoint,\n refArrayIndexNumber: number,\n color: string,\n ): void => {\n if (\n this.state.isLegendSelected === false ||\n (this.state.isLegendSelected && this.state.selectedLegendTitle === point.legend)\n ) {\n const { YValueHover, hoverXValue } = this._getCalloutContentForBar(point);\n this._refArray.forEach((obj: IRefArrayData, index: number) => {\n if (refArrayIndexNumber === index) {\n this.setState({\n refSelected: obj.refElement,\n isCalloutVisible: true,\n selectedLegendTitle: point.legend!,\n dataForHoverCard: point.x,\n color: this.props.useSingleColor ? color : point.color,\n xCalloutValue: point.yAxisCalloutData || point.y.toString(),\n yCalloutValue: point.xAxisCalloutData! || point.x.toString(),\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n });\n }\n };\n\n private _getScales = (\n containerHeight: number,\n containerWidth: number,\n isNumericScale: boolean,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): { xBarScale: any; yBarScale: any } => {\n if (isNumericScale) {\n const xMax = d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.x as number)!;\n const yMax = d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n const xBarScale = d3ScaleLinear()\n .domain(this._isRtl ? [xMax, 0] : [0, xMax])\n .nice()\n .range([this.margins.left!, containerWidth - this.margins.right!]);\n const yBarScale = d3ScaleLinear()\n .domain([0, yMax])\n .range([containerHeight - this.margins.bottom!, this.margins.top!]);\n return { xBarScale, yBarScale };\n } else {\n const xMax = d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.x as number)!;\n // please note these padding default values must be consistent in here\n // and CatrtesianChartBase w for more details refer example\n // http://using-d3js.com/04_07_ordinal_scales.html\n const yBarScale = d3ScaleBand()\n .domain(this._yAxisLabels)\n .range([containerHeight - this.margins.bottom! - this._barHeight / 2, this.margins.top! + this._barHeight / 2])\n .padding(this.props.yAxisPadding || 0);\n\n const xBarScale = d3ScaleLinear()\n .domain(this._isRtl ? [xMax, 0] : [0, xMax])\n .nice()\n .range([this.margins.left!, containerWidth - this.margins.right!]);\n return { xBarScale, yBarScale };\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _createNumericBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n ): JSX.Element[] {\n const { useSingleColor = false } = this.props;\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth, true);\n const sortedBars: IHorizontalBarChartWithAxisDataPoint[] = [...this._points];\n sortedBars.sort((a, b) => {\n const aValue = typeof a.y === 'number' ? a.y : parseFloat(a.y);\n const bValue = typeof b.y === 'number' ? b.y : parseFloat(b.y);\n return bValue - aValue;\n });\n const bars = sortedBars.map((point: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n let shouldHighlight = true;\n if (this.state.isLegendHovered || this.state.isLegendSelected) {\n shouldHighlight = this.state.selectedLegendTitle === point.legend;\n }\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n shouldHighlight,\n });\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n color = this.props.colors\n ? this._createColors()(point.x)\n : getNextColor(index, 0, this.props.theme?.isInverted);\n }\n return (\n <rect\n key={point.y}\n x={this._isRtl ? xBarScale(point.x) : this.margins.left!}\n className={this._classNames.opacityChangeOnHover}\n y={yBarScale(point.y) - this._barHeight / 2}\n data-is-focusable={true}\n width={\n this._isRtl\n ? containerWidth - this.margins.right! - Math.max(xBarScale(point.x), 0)\n : Math.max(xBarScale(point.x), 0) - this.margins.left!\n }\n height={this._barHeight}\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, color)}\n aria-label={this._getAriaLabel(point)}\n role=\"img\"\n aria-labelledby={`toolTip${this._calloutId}`}\n onMouseLeave={this._onBarLeave}\n onFocus={this._onBarFocus.bind(this, point, index, color)}\n onBlur={this._onBarLeave}\n fill={point.color && !useSingleColor ? point.color : color}\n />\n );\n });\n return bars;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _tooltipOfYAxislabels(ytooltipProps: any) {\n const { tooltipCls, yAxis, id } = ytooltipProps;\n if (yAxis === null) {\n return null;\n }\n const div = d3Select('body').append('div').attr('id', id).attr('class', tooltipCls).style('opacity', 0);\n const aa = yAxis!.selectAll('#BaseSpan')._groups[0];\n const baseSpanLength = aa && Object.keys(aa)!.length;\n const originalDataArray: string[] = [];\n for (let i = 0; i < baseSpanLength; i++) {\n const originalData = aa[i].dataset && (Object.values(aa[i].dataset)[0] as string);\n originalDataArray.push(originalData);\n }\n const tickObject = yAxis!.selectAll('.tick')._groups[0];\n const tickObjectLength = tickObject && Object.keys(tickObject)!.length;\n for (let i = 0; i < tickObjectLength; i++) {\n const d1 = tickObject[i];\n d3Select(d1)\n .on('mouseover', d => {\n if (!this.state.tooltipElement) {\n div.style('opacity', 0.9);\n div\n .html(originalDataArray[i])\n .style('left', d3Event.pageX + 'px')\n .style('top', d3Event.pageY - 28 + 'px');\n }\n })\n .on('mouseout', d => {\n div.style('opacity', 0);\n });\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _createStringBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n ): JSX.Element[] {\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth, false);\n const { useSingleColor = false } = this.props;\n const bars = this._points.map((point: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n color = this.props.colors\n ? this._createColors()(point.x)\n : getNextColor(index, 0, this.props.theme?.isInverted);\n }\n\n return (\n <rect\n transform={`translate(0,${0.5 * (yBarScale.bandwidth() - this._barHeight)})`}\n key={point.x}\n x={this._isRtl ? xBarScale(point.x) : this.margins.left!}\n y={yBarScale(point.y)}\n width={\n this._isRtl\n ? containerWidth - this.margins.right! - Math.max(xBarScale(point.x), 0)\n : Math.max(xBarScale(point.x), 0) - this.margins.left!\n }\n height={this._barHeight}\n aria-labelledby={`toolTip${this._calloutId}`}\n aria-label={this._getAriaLabel(point)}\n role=\"img\"\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, color)}\n onMouseLeave={this._onBarLeave}\n onBlur={this._onBarLeave}\n data-is-focusable={true}\n onFocus={this._onBarFocus.bind(this, point, index, color)}\n fill={point.color && !useSingleColor ? point.color : color}\n />\n );\n });\n\n // Removing un wanted tooltip div from DOM, when prop not provided, for proper cleanup\n // of unwanted DOM elements, to prevent flacky behaviour in tooltips , that might occur\n // in creating tooltips when tooltips are enabled( as we try to recreate a tspan with this._tooltipId)\n if (!this.props.showYAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n //eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at y axis labels.\n if (this.props.showYAxisLablesTooltip) {\n const yAxisElement = d3Select(yElement).call(yBarScale);\n if (!this.state.tooltipElement) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n //eslint-disable-next-line no-empty\n } catch (e) {}\n }\n const ytooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n yAxis: yAxisElement,\n };\n yAxisElement && this._tooltipOfYAxislabels(ytooltipProps);\n }\n return bars;\n }\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _onLegendClick(customMessage: string): void {\n if (this.state.isLegendSelected) {\n if (this.state.selectedLegendTitle === customMessage) {\n this.setState({\n isLegendSelected: false,\n selectedLegendTitle: customMessage,\n });\n } else {\n this.setState({\n selectedLegendTitle: customMessage,\n });\n }\n } else {\n this.setState({\n isLegendSelected: true,\n selectedLegendTitle: customMessage,\n });\n }\n }\n\n private _onLegendHover(customMessage: string): void {\n if (this.state.isLegendSelected === false) {\n this.setState({\n isLegendHovered: true,\n selectedLegendTitle: customMessage,\n });\n }\n }\n\n private _onLegendLeave(isLegendFocused?: boolean): void {\n if (!!isLegendFocused || this.state.isLegendSelected === false) {\n this.setState({\n isLegendHovered: false,\n selectedLegendTitle: '',\n isLegendSelected: isLegendFocused ? false : this.state.isLegendSelected,\n });\n }\n }\n\n private _getLegendData = (data: IHorizontalBarChartWithAxisDataPoint[], palette: IPalette): JSX.Element => {\n const { useSingleColor } = this.props;\n const actions: ILegend[] = [];\n data.forEach((point: IHorizontalBarChartWithAxisDataPoint, _index: number) => {\n const color: string = useSingleColor\n ? this.props.colors\n ? this._createColors()(1)\n : getNextColor(1, 0, this.props.theme?.isInverted)\n : point.color!;\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: point.legend!,\n color,\n action: () => {\n this._onLegendClick(point.legend!);\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(point.legend!);\n },\n onMouseOutAction: (isLegendSelected?: boolean) => {\n this._onLegendLeave(isLegendSelected);\n },\n };\n actions.push(legend);\n });\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n />\n );\n return legends;\n };\n\n private _getAxisData = (yAxisData: IAxisData) => {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n // For HBCWA x and y Values are swapped\n const { yAxisDomainValues: domainValue } = yAxisData;\n this._xMax = Math.max(domainValue[domainValue.length - 1], this.props.xMaxValue || 0);\n }\n };\n private _getAriaLabel = (point: IHorizontalBarChartWithAxisDataPoint): string => {\n const xValue = point.xAxisCalloutData || point.x;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ` + `${yValue}.`;\n };\n}\n"]}
1
+ {"version":3,"file":"HorizontalBarChartWithAxis.base.js","sourceRoot":"../src/","sources":["components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.tsx"],"names":[],"mappings":";;;;IAqCA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA4E,CAAC;IAiBrH;QAAoD,0DAGnD;QAiBC,wCAAmB,KAAuC;YAA1D,YACE,kBAAM,KAAK,CAAC,SA0Bb;YApCO,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;YA6G3B,iBAAW,GAAG,UAAC,OAAiB;gBACtC,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACzB,CAAC,CAAC;YAEM,+BAAyB,GAAG,UAAC,KAA2C;;gBACtE,IAAA,KAA2B,KAAI,CAAC,KAAK,eAAf,EAAtB,cAAc,mBAAG,KAAK,KAAA,CAAgB;gBAC9C,IAAI,kBAAkB,GAAG,CAAC,CAAC;gBAC3B,KAAI,CAAC,KAAK,CAAC,IAAK,CAAC,OAAO,CAAC,UAAC,UAAgD,EAAE,KAAa;oBACvF,IAAI,UAAU,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,EAAE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;gBAC/B,IAAI,IAAI,CAAC,KAAK,CAAC,mBAAmB,KAAK,aAAa,EAAE;oBACpD,IAAI,CAAC,QAAQ,CAAC;wBACZ,gBAAgB,EAAE,KAAK;wBACvB,mBAAmB,EAAE,aAAa;qBACnC,CAAC,CAAC;iBACJ;qBAAM;oBACL,IAAI,CAAC,QAAQ,CAAC;wBACZ,mBAAmB,EAAE,aAAa;qBACnC,CAAC,CAAC;iBACJ;aACF;iBAAM;gBACL,IAAI,CAAC,QAAQ,CAAC;oBACZ,gBAAgB,EAAE,IAAI;oBACtB,mBAAmB,EAAE,aAAa;iBACnC,CAAC,CAAC;aACJ;QACH,CAAC;QAEO,uDAAc,GAAtB,UAAuB,aAAqB;YAC1C,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,KAAK,KAAK,EAAE;gBACzC,IAAI,CAAC,QAAQ,CAAC;oBACZ,eAAe,EAAE,IAAI;oBACrB,mBAAmB,EAAE,aAAa;iBACnC,CAAC,CAAC;aACJ;QACH,CAAC;QAEO,uDAAc,GAAtB,UAAuB,eAAyB;YAC9C,IAAI,CAAC,CAAC,eAAe,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,KAAK,KAAK,EAAE;gBAC9D,IAAI,CAAC,QAAQ,CAAC;oBACZ,eAAe,EAAE,KAAK;oBACtB,mBAAmB,EAAE,EAAE;oBACvB,gBAAgB,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB;iBACxE,CAAC,CAAC;aACJ;QACH,CAAC;QAqDH,qCAAC;IAAD,CAAC,AAznBD,CAAoD,KAAK,CAAC,SAAS,GAynBlE;IAznBY,wEAA8B","sourcesContent":["import * as React from 'react';\nimport { max as d3Max } from 'd3-array';\nimport { select as d3Select } from 'd3-selection';\nimport { scaleLinear as d3ScaleLinear, ScaleLinear as D3ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\nimport { classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { ILegend } from '../../components/Legends/Legends.types';\nimport { Legends } from '../../components/Legends/Legends';\nimport {\n IAccessibilityProps,\n IBasestate,\n IHorizontalBarChartWithAxisDataPoint,\n IRefArrayData,\n IMargins,\n} from '../../types/IDataPoint';\nimport { IChildProps, IYValueHover } from '../CommonComponents/CartesianChart.types';\nimport { CartesianChart } from '../CommonComponents/CartesianChart';\nimport {\n IHorizontalBarChartWithAxisProps,\n IHorizontalBarChartWithAxisStyleProps,\n IHorizontalBarChartWithAxisStyles,\n} from './HorizontalBarChartWithAxis.types';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartHoverCard,\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n YAxisType,\n XAxisTypes,\n NumericAxis,\n StringAxis,\n getTypeOfAxis,\n getNextColor,\n} from '../../utilities/index';\n\nconst getClassNames = classNamesFunction<IHorizontalBarChartWithAxisStyleProps, IHorizontalBarChartWithAxisStyles>();\nexport interface IHorizontalBarChartWithAxisState extends IBasestate {\n selectedLegendTitle: string;\n dataPointCalloutProps?: IHorizontalBarChartWithAxisDataPoint; // define this in hover and focus\n /**\n * data point of x, where rectangle is hovered or focused\n */\n activeXdataPoint: number | null;\n YValueHover: IYValueHover[];\n hoverXValue?: string | number | null;\n callOutAccessibilityData?: IAccessibilityProps;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n tooltipElement?: any;\n}\n\ntype ColorScale = (_p?: number) => string;\n\nexport class HorizontalBarChartWithAxisBase extends React.Component<\n IHorizontalBarChartWithAxisProps,\n IHorizontalBarChartWithAxisState\n> {\n private _points: IHorizontalBarChartWithAxisDataPoint[];\n private _barHeight: number;\n private _colors: string[];\n private _classNames: IProcessedStyleSet<IHorizontalBarChartWithAxisStyles>;\n private _refArray: IRefArrayData[];\n private _calloutId: string;\n private margins: IMargins;\n private _isRtl: boolean = getRTL();\n private _bars: JSX.Element[];\n private _yAxisLabels: string[];\n private _xMax: number;\n private _tooltipId: string;\n private _xAxisType: XAxisTypes;\n private _yAxisType: YAxisType;\n private _calloutAnchorPoint: IHorizontalBarChartWithAxisDataPoint | null;\n\n public constructor(props: IHorizontalBarChartWithAxisProps) {\n super(props);\n this.state = {\n color: '',\n dataForHoverCard: 0,\n isCalloutVisible: false,\n isLegendSelected: false,\n isLegendHovered: false,\n refSelected: null,\n selectedLegendTitle: '',\n xCalloutValue: '',\n yCalloutValue: '',\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n };\n this._calloutId = getId('callout');\n this._tooltipId = getId('HBCWATooltipID_');\n this._refArray = [];\n this._xAxisType =\n this.props.data! && this.props.data!.length > 0\n ? (getTypeOfAxis(this.props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.NumericAxis;\n this._yAxisType =\n this.props.data! && this.props.data!.length > 0\n ? (getTypeOfAxis(this.props.data![0].y, false) as YAxisType)\n : YAxisType.StringAxis;\n }\n\n public render(): JSX.Element {\n this._adjustProps();\n const reversedBars = [...this._points].reverse();\n this._yAxisLabels = reversedBars.map((point: IHorizontalBarChartWithAxisDataPoint) => point.y as string);\n this._xMax = Math.max(\n d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.x)!,\n this.props.xMaxValue || 0,\n );\n const legendBars: JSX.Element = this._getLegendData(this._points, this.props.theme!.palette);\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n });\n const calloutProps = {\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${this._calloutId}`,\n target: this.state.refSelected,\n isBeakVisible: false,\n gapSpace: 15,\n color: this.state.color,\n legend: this.state.selectedLegendTitle,\n XValue: this.state.xCalloutValue,\n YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard,\n onDismiss: this._closeCallout,\n preventDismissOnLostFocus: true,\n ...this.props.calloutProps,\n ...getAccessibleDataObject(this.state.callOutAccessibilityData),\n };\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n return (\n <CartesianChart\n {...this.props}\n points={this._points}\n chartType={ChartTypes.HorizontalBarChartWithAxis}\n xAxisType={this._xAxisType}\n yAxisType={this._yAxisType}\n stringDatasetForYAxisDomain={this._yAxisLabels}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n barwidth={this._barHeight}\n focusZoneDirection={FocusZoneDirection.vertical}\n customizedCallout={this._getCustomizedCallout()}\n getmargins={this._getMargins}\n getGraphData={this._getGraphData}\n getAxisData={this._getAxisData}\n onChartMouseLeave={this._handleChartMouseLeave}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n return (\n <>\n <g>{this._bars}</g>\n </>\n );\n }}\n />\n );\n }\n\n private _adjustProps(): void {\n this._points = this.props.data || [];\n this._barHeight = this.props.barHeight || 32;\n const { palette } = this.props.theme!;\n this._colors = this.props.colors || [palette.blueLight, palette.blue, palette.blueMid, palette.blueDark];\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _renderContentForOnlyBars = (point: IHorizontalBarChartWithAxisDataPoint): JSX.Element => {\n const { useSingleColor = false } = this.props;\n let selectedPointIndex = 0;\n this.props.data!.forEach((yDataPoint: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n if (yDataPoint.y === point.y) {\n selectedPointIndex = index;\n }\n });\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n color = point.color\n ? point.color\n : this.props.colors\n ? this._createColors()(point.x)\n : getNextColor(selectedPointIndex, 0, this.props.theme?.isInverted);\n }\n return (\n <>\n <ChartHoverCard\n XValue={point.xAxisCalloutData || point.x.toString()}\n Legend={point.legend}\n YValue={point.yAxisCalloutData || point.y}\n color={color}\n culture={this.props.culture}\n />\n </>\n );\n };\n\n private _renderCallout = (props?: IHorizontalBarChartWithAxisDataPoint): JSX.Element | null => {\n return props ? this._renderContentForOnlyBars(props) : null;\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps, this._renderCallout)\n : null;\n };\n\n private _getGraphData = (\n xScale: NumericAxis,\n yScale: NumericAxis | StringAxis,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yElement?: SVGElement | null,\n ) => {\n return (this._bars =\n this._yAxisType === YAxisType.NumericAxis\n ? this._createNumericBars(containerHeight, containerWidth, xElement!, yElement!)\n : this._createStringBars(containerHeight, containerWidth, xElement!, yElement!));\n };\n\n private _createColors(): D3ScaleLinear<string, string> | ColorScale {\n const increment = this._colors.length <= 1 ? 1 : 1 / (this._colors.length - 1);\n const { useSingleColor = false } = this.props;\n if (useSingleColor) {\n return (_p?: number) => {\n const { theme, colors } = this.props;\n return colors && colors.length > 0 ? colors[0] : theme!.palette.blueLight;\n };\n }\n const domainValues = [];\n for (let i = 0; i < this._colors.length; i++) {\n domainValues.push(increment * i * this._xMax);\n }\n const colorScale = d3ScaleLinear<string>().domain(domainValues).range(this._colors);\n return colorScale;\n }\n\n private _refCallback = (element: SVGRectElement, legendTitle: string): void => {\n this._refArray.push({ index: legendTitle, refElement: element });\n };\n\n private _getCalloutContentForBar = (\n point: IHorizontalBarChartWithAxisDataPoint,\n ): { YValueHover: IYValueHover[]; hoverXValue: string | number | null } => {\n const YValueHover: IYValueHover[] = [];\n const { useSingleColor = false } = this.props;\n const { data } = this.props;\n const selectedPoint = data!.filter((yDataPoint: IHorizontalBarChartWithAxisDataPoint) => yDataPoint.y === point.y);\n let selectedPointIndex = 0;\n data!.forEach((yDataPoint: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n if (yDataPoint.y === point.y) {\n selectedPointIndex = index;\n }\n });\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n color = selectedPoint[0].color\n ? selectedPoint[0].color\n : this.props.colors\n ? this._createColors()(selectedPoint[0].x)\n : getNextColor(selectedPointIndex, 0, this.props.theme?.isInverted);\n }\n // callout data for the bar\n YValueHover.push({\n legend: selectedPoint[0].legend,\n // For HBCWA x and y Values are swapped\n y: selectedPoint[0].x,\n color,\n data: selectedPoint[0].yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].yAxisCalloutData,\n });\n return { YValueHover, hoverXValue: point.yAxisCalloutData || point.y.toString() };\n };\n\n private _onBarHover(\n point: IHorizontalBarChartWithAxisDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n\n const { YValueHover, hoverXValue } = this._getCalloutContentForBar(point);\n if (\n (this.state.isLegendSelected === false ||\n (this.state.isLegendSelected && this.state.selectedLegendTitle === point.legend)) &&\n this._calloutAnchorPoint !== point\n ) {\n this._calloutAnchorPoint = point;\n this.setState({\n refSelected: mouseEvent,\n isCalloutVisible: true,\n dataForHoverCard: point.x,\n selectedLegendTitle: point.legend!,\n color: this.props.useSingleColor ? color : point.color,\n // To display callout value, if no callout value given, taking given point.x value as a string.\n xCalloutValue: point.yAxisCalloutData! || point.y.toString(),\n yCalloutValue: point.xAxisCalloutData || point.x.toString(),\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n }\n\n private _onBarLeave = (): void => {\n /**/\n };\n\n private _handleChartMouseLeave = (): void => {\n this._calloutAnchorPoint = null;\n this.setState({\n isCalloutVisible: false,\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n });\n };\n\n private _onBarFocus = (\n point: IHorizontalBarChartWithAxisDataPoint,\n refArrayIndexNumber: number,\n color: string,\n ): void => {\n if (\n this.state.isLegendSelected === false ||\n (this.state.isLegendSelected && this.state.selectedLegendTitle === point.legend)\n ) {\n const { YValueHover, hoverXValue } = this._getCalloutContentForBar(point);\n this._refArray.forEach((obj: IRefArrayData, index: number) => {\n if (refArrayIndexNumber === index) {\n this.setState({\n refSelected: obj.refElement,\n isCalloutVisible: true,\n selectedLegendTitle: point.legend!,\n dataForHoverCard: point.x,\n color: this.props.useSingleColor ? color : point.color,\n xCalloutValue: point.yAxisCalloutData || point.y.toString(),\n yCalloutValue: point.xAxisCalloutData! || point.x.toString(),\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n });\n }\n };\n\n private _getScales = (\n containerHeight: number,\n containerWidth: number,\n isNumericScale: boolean,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): { xBarScale: any; yBarScale: any } => {\n if (isNumericScale) {\n const xMax = d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.x as number)!;\n const yMax = d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n const xBarScale = d3ScaleLinear()\n .domain(this._isRtl ? [xMax, 0] : [0, xMax])\n .nice()\n .range([this.margins.left!, containerWidth - this.margins.right!]);\n const yBarScale = d3ScaleLinear()\n .domain([0, yMax])\n .range([containerHeight - this.margins.bottom!, this.margins.top!]);\n return { xBarScale, yBarScale };\n } else {\n const xMax = d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.x as number)!;\n // please note these padding default values must be consistent in here\n // and CatrtesianChartBase w for more details refer example\n // http://using-d3js.com/04_07_ordinal_scales.html\n const yBarScale = d3ScaleBand()\n .domain(this._yAxisLabels)\n .range([containerHeight - this.margins.bottom! - this._barHeight / 2, this.margins.top! + this._barHeight / 2])\n .padding(this.props.yAxisPadding || 0);\n\n const xBarScale = d3ScaleLinear()\n .domain(this._isRtl ? [xMax, 0] : [0, xMax])\n .nice()\n .range([this.margins.left!, containerWidth - this.margins.right!]);\n return { xBarScale, yBarScale };\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _createNumericBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n ): JSX.Element[] {\n const { useSingleColor = false } = this.props;\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth, true);\n const sortedBars: IHorizontalBarChartWithAxisDataPoint[] = [...this._points];\n sortedBars.sort((a, b) => {\n const aValue = typeof a.y === 'number' ? a.y : parseFloat(a.y);\n const bValue = typeof b.y === 'number' ? b.y : parseFloat(b.y);\n return bValue - aValue;\n });\n const bars = sortedBars.map((point: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n let shouldHighlight = true;\n if (this.state.isLegendHovered || this.state.isLegendSelected) {\n shouldHighlight = this.state.selectedLegendTitle === point.legend;\n }\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n shouldHighlight,\n });\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n color = this.props.colors\n ? this._createColors()(point.x)\n : getNextColor(index, 0, this.props.theme?.isInverted);\n }\n return (\n <rect\n key={point.y}\n x={this._isRtl ? xBarScale(point.x) : this.margins.left!}\n className={this._classNames.opacityChangeOnHover}\n y={yBarScale(point.y) - this._barHeight / 2}\n data-is-focusable={true}\n width={\n this._isRtl\n ? containerWidth - this.margins.right! - Math.max(xBarScale(point.x), 0)\n : Math.max(xBarScale(point.x), 0) - this.margins.left!\n }\n height={this._barHeight}\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, color)}\n aria-label={this._getAriaLabel(point)}\n role=\"img\"\n aria-labelledby={`toolTip${this._calloutId}`}\n onMouseLeave={this._onBarLeave}\n onFocus={this._onBarFocus.bind(this, point, index, color)}\n onBlur={this._onBarLeave}\n fill={point.color && !useSingleColor ? point.color : color}\n />\n );\n });\n return bars;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _tooltipOfYAxislabels(ytooltipProps: any) {\n const { tooltipCls, yAxis, id } = ytooltipProps;\n if (yAxis === null) {\n return null;\n }\n const div = d3Select('body').append('div').attr('id', id).attr('class', tooltipCls).style('opacity', 0);\n const aa = yAxis!.selectAll('#BaseSpan')._groups[0];\n const baseSpanLength = aa && Object.keys(aa)!.length;\n const originalDataArray: string[] = [];\n for (let i = 0; i < baseSpanLength; i++) {\n const originalData = aa[i].dataset && (Object.values(aa[i].dataset)[0] as string);\n originalDataArray.push(originalData);\n }\n const tickObject = yAxis!.selectAll('.tick')._groups[0];\n const tickObjectLength = tickObject && Object.keys(tickObject)!.length;\n for (let i = 0; i < tickObjectLength; i++) {\n const d1 = tickObject[i];\n d3Select(d1)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .on('mouseover', (event: any, d) => {\n if (!this.state.tooltipElement) {\n div.style('opacity', 0.9);\n div\n .html(originalDataArray[i])\n .style('left', event.pageX + 'px')\n .style('top', event.pageY - 28 + 'px');\n }\n })\n .on('mouseout', d => {\n div.style('opacity', 0);\n });\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _createStringBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n ): JSX.Element[] {\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth, false);\n const { useSingleColor = false } = this.props;\n const bars = this._points.map((point: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n color = this.props.colors\n ? this._createColors()(point.x)\n : getNextColor(index, 0, this.props.theme?.isInverted);\n }\n\n return (\n <rect\n transform={`translate(0,${0.5 * (yBarScale.bandwidth() - this._barHeight)})`}\n key={point.x}\n x={this._isRtl ? xBarScale(point.x) : this.margins.left!}\n y={yBarScale(point.y)}\n width={\n this._isRtl\n ? containerWidth - this.margins.right! - Math.max(xBarScale(point.x), 0)\n : Math.max(xBarScale(point.x), 0) - this.margins.left!\n }\n height={this._barHeight}\n aria-labelledby={`toolTip${this._calloutId}`}\n aria-label={this._getAriaLabel(point)}\n role=\"img\"\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, color)}\n onMouseLeave={this._onBarLeave}\n onBlur={this._onBarLeave}\n data-is-focusable={true}\n onFocus={this._onBarFocus.bind(this, point, index, color)}\n fill={point.color && !useSingleColor ? point.color : color}\n />\n );\n });\n\n // Removing un wanted tooltip div from DOM, when prop not provided, for proper cleanup\n // of unwanted DOM elements, to prevent flacky behaviour in tooltips , that might occur\n // in creating tooltips when tooltips are enabled( as we try to recreate a tspan with this._tooltipId)\n if (!this.props.showYAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n //eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at y axis labels.\n if (this.props.showYAxisLablesTooltip) {\n const yAxisElement = d3Select(yElement).call(yBarScale);\n if (!this.state.tooltipElement) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n //eslint-disable-next-line no-empty\n } catch (e) {}\n }\n const ytooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n yAxis: yAxisElement,\n };\n yAxisElement && this._tooltipOfYAxislabels(ytooltipProps);\n }\n return bars;\n }\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _onLegendClick(customMessage: string): void {\n if (this.state.isLegendSelected) {\n if (this.state.selectedLegendTitle === customMessage) {\n this.setState({\n isLegendSelected: false,\n selectedLegendTitle: customMessage,\n });\n } else {\n this.setState({\n selectedLegendTitle: customMessage,\n });\n }\n } else {\n this.setState({\n isLegendSelected: true,\n selectedLegendTitle: customMessage,\n });\n }\n }\n\n private _onLegendHover(customMessage: string): void {\n if (this.state.isLegendSelected === false) {\n this.setState({\n isLegendHovered: true,\n selectedLegendTitle: customMessage,\n });\n }\n }\n\n private _onLegendLeave(isLegendFocused?: boolean): void {\n if (!!isLegendFocused || this.state.isLegendSelected === false) {\n this.setState({\n isLegendHovered: false,\n selectedLegendTitle: '',\n isLegendSelected: isLegendFocused ? false : this.state.isLegendSelected,\n });\n }\n }\n\n private _getLegendData = (data: IHorizontalBarChartWithAxisDataPoint[], palette: IPalette): JSX.Element => {\n const { useSingleColor } = this.props;\n const actions: ILegend[] = [];\n data.forEach((point: IHorizontalBarChartWithAxisDataPoint, _index: number) => {\n const color: string = useSingleColor\n ? this.props.colors\n ? this._createColors()(1)\n : getNextColor(1, 0, this.props.theme?.isInverted)\n : point.color!;\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: point.legend!,\n color,\n action: () => {\n this._onLegendClick(point.legend!);\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(point.legend!);\n },\n onMouseOutAction: (isLegendSelected?: boolean) => {\n this._onLegendLeave(isLegendSelected);\n },\n };\n actions.push(legend);\n });\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n />\n );\n return legends;\n };\n\n private _getAxisData = (yAxisData: IAxisData) => {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n // For HBCWA x and y Values are swapped\n const { yAxisDomainValues: domainValue } = yAxisData;\n this._xMax = Math.max(domainValue[domainValue.length - 1], this.props.xMaxValue || 0);\n }\n };\n private _getAriaLabel = (point: IHorizontalBarChartWithAxisDataPoint): string => {\n const xValue = point.xAxisCalloutData || point.x;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ` + `${yValue}.`;\n };\n}\n"]}
@@ -245,7 +245,7 @@ define(["require", "exports", "tslib", "react", "@fluentui/react/lib/HoverCard",
245
245
  };
246
246
  LegendsBase.prototype._generateData = function () {
247
247
  var _this = this;
248
- var _a = this.props.allowFocusOnLegends, allowFocusOnLegends = _a === void 0 ? true : _a;
248
+ var _a = this.props, _b = _a.allowFocusOnLegends, allowFocusOnLegends = _b === void 0 ? true : _b, shape = _a.shape;
249
249
  var dataItems = this.props.legends.map(function (legend, index) {
250
250
  return tslib_1.__assign(tslib_1.__assign({}, (allowFocusOnLegends && {
251
251
  nativeButtonProps: (0, Utilities_1.getNativeProps)(legend, Utilities_1.buttonProperties, [
@@ -253,7 +253,7 @@ define(["require", "exports", "tslib", "react", "@fluentui/react/lib/HoverCard",
253
253
  ]),
254
254
  'aria-setsize': _this.props.legends.length,
255
255
  'aria-posinset': index + 1,
256
- })), { title: legend.title, action: legend.action, hoverAction: legend.hoverAction, onMouseOutAction: legend.onMouseOutAction, color: legend.color, shape: legend.shape, stripePattern: legend.stripePattern, isLineLegendInBarChart: legend.isLineLegendInBarChart, opacity: legend.opacity, key: index });
256
+ })), { title: legend.title, action: legend.action, hoverAction: legend.hoverAction, onMouseOutAction: legend.onMouseOutAction, color: legend.color, shape: shape ? shape : legend.shape, stripePattern: legend.stripePattern, isLineLegendInBarChart: legend.isLineLegendInBarChart, opacity: legend.opacity, key: index });
257
257
  });
258
258
  var result = {
259
259
  primary: dataItems,