@fluentui/react-charting 5.21.0 → 5.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +16 -1
- package/CHANGELOG.md +11 -2
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/lib/components/DonutChart/Arc/Arc.js +1 -1
- package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.js +1 -1
- package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.base.js +1 -1
- package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.js +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.base.js +4 -4
- package/lib/components/LineChart/LineChart.base.js.map +1 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +1 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib/components/StackedBarChart/StackedBarChart.base.js +1 -1
- package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js +2 -2
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/lib-amd/components/DonutChart/Arc/Arc.js +1 -1
- package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/DonutChart/Pie/Pie.js +1 -1
- package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-amd/components/GaugeChart/GaugeChart.base.js +1 -1
- package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +1 -1
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.base.js +4 -4
- package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +1 -1
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +1 -1
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +2 -2
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-amd/version.js +1 -1
- package/lib-amd/version.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.js +4 -4
- package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +1 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js +1 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +2 -2
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/version.js +1 -1
- package/lib-commonjs/version.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalStackedBarChart.base.js","sourceRoot":"../src/","sources":["components/VerticalStackedBarChart/VerticalStackedBarChart.base.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,IAAI,KAAK,EAAE,GAAG,IAAI,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtD,OAAO,EAAE,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AM,GAAG,CAAC;YAC1B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAA3B,CAA2B,CAAC,CAAC,MAAM,KAAK,CAAC,CACzE,CAAC;IACJ,CAAC;IA3+Ba,wCAAY,GAA2C;QACnE,WAAW,EAAE,EAAE;KAChB,CAAC;IA0+BJ,kCAAC;CAAA,AAh/BD,CAAiD,KAAK,CAAC,SAAS,GAg/B/D;SAh/BY,2BAA2B","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select } from 'd3-selection';\nimport {\n scaleLinear as d3ScaleLinear,\n ScaleLinear as D3ScaleLinear,\n scaleBand as d3ScaleBand,\n scaleUtc as d3ScaleUtc,\n} from 'd3-scale';\nimport { classNamesFunction, getId, getRTL, warnDeprecations, memoizeFunction } from '@fluentui/react/lib/Utilities';\nimport { IPalette, IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { ILegend, Legends } from '../Legends/index';\nimport {\n IAccessibilityProps,\n CartesianChart,\n ChartHoverCard,\n IBasestate,\n IChildProps,\n IVerticalStackedBarDataPoint,\n IMargins,\n IVerticalStackedBarChartProps,\n IVerticalStackedBarChartStyleProps,\n IVerticalStackedBarChartStyles,\n IVerticalStackedChartProps,\n IVSChartDataPoint,\n ILineDataInVerticalStackedBarChart,\n IModifiedCartesianChartProps,\n} from '../../index';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n getTypeOfAxis,\n tooltipOfXAxislabels,\n formatValueWithSIPrefix,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n calculateAppropriateBarWidth,\n} from '../../utilities/index';\n\nconst getClassNames = classNamesFunction<IVerticalStackedBarChartStyleProps, IVerticalStackedBarChartStyles>();\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\ntype NumericScale = D3ScaleLinear<number, number>;\nconst COMPONENT_NAME = 'VERTICAL STACKED BAR CHART';\n\n// When displaying gaps between bars, the max height of the gap is given in the\n// props. The actual gap is calculated with this multiplier, with a minimum gap\n// of 1 pixel. (If these values are changed, update the comment for barGapMax.)\nconst barGapMultiplier = 0.2;\nconst barGapMin = 1;\n\nconst MIN_DOMAIN_MARGIN = 8;\n\ninterface IRefArrayData {\n refElement?: SVGGElement | null;\n}\n\ntype LinePoint = ILineDataInVerticalStackedBarChart & { index: number; xItem: IVerticalStackedChartProps };\ntype LineObject = { [key: string]: LinePoint[] };\ntype LineLegends = {\n title: string;\n color: string;\n};\nenum CircleVisbility {\n show = 'visibility',\n hide = 'hidden',\n}\n\ntype CalloutAnchorPointData = {\n xAxisDataPoint: string;\n chartDataPoint: IVSChartDataPoint;\n};\n\nexport interface IVerticalStackedBarChartState extends IBasestate {\n dataPointCalloutProps?: IVSChartDataPoint;\n stackCalloutProps?: IVerticalStackedChartProps;\n activeXAxisDataPoint: number | string | Date;\n callOutAccessibilityData?: IAccessibilityProps;\n calloutLegend: string;\n}\nexport class VerticalStackedBarChartBase extends React.Component<\n IVerticalStackedBarChartProps,\n IVerticalStackedBarChartState\n> {\n public static defaultProps: Partial<IVerticalStackedBarChartProps> = {\n maxBarWidth: 24,\n };\n\n private _points: IVerticalStackedChartProps[];\n private _dataset: IVerticalStackedBarDataPoint[];\n private _xAxisLabels: string[];\n private _bars: JSX.Element[];\n private _xAxisType: XAxisTypes;\n private _barWidth: number;\n private _calloutId: string;\n private _colors: string[];\n private margins: IMargins;\n private _isRtl: boolean = getRTL();\n private _createLegendsForLine: (data: IVerticalStackedChartProps[]) => LineLegends[];\n private _lineObject: LineObject;\n private _tooltipId: string;\n private _yMax: number;\n private _calloutAnchorPoint: CalloutAnchorPointData | null;\n private _domainMargin: number;\n private _classNames: IProcessedStyleSet<IVerticalStackedBarChartStyles>;\n private _emptyChartId: string;\n private _xAxisInnerPadding: number;\n private _xAxisOuterPadding: number;\n\n public constructor(props: IVerticalStackedBarChartProps) {\n super(props);\n this.state = {\n isCalloutVisible: false,\n selectedLegend: '',\n activeLegend: '',\n refSelected: null,\n dataForHoverCard: 0,\n color: '',\n hoverXValue: '',\n YValueHover: [],\n xCalloutValue: '',\n yCalloutValue: '',\n activeXAxisDataPoint: '',\n calloutLegend: '',\n };\n warnDeprecations(COMPONENT_NAME, props, {\n colors: 'IVSChartDataPoint.color',\n chartLabel: 'use your own title for chart',\n });\n this._handleMouseOut = this._handleMouseOut.bind(this);\n this._calloutId = getId('callout');\n this._tooltipId = getId('VSBCTooltipId_');\n if (!this._isChartEmpty()) {\n this._adjustProps();\n this._dataset = this._createDataSetLayer();\n }\n this._createLegendsForLine = memoizeFunction((data: IVerticalStackedChartProps[]) => this._getLineLegends(data));\n this._emptyChartId = getId('_VSBC_empty');\n }\n\n public componentDidUpdate(prevProps: IVerticalStackedBarChartProps): void {\n if (\n prevProps.height !== this.props.height ||\n prevProps.width !== this.props.width ||\n prevProps.data !== this.props.data\n ) {\n this._adjustProps();\n this._dataset = this._createDataSetLayer();\n }\n }\n\n public render(): React.ReactNode {\n if (!this._isChartEmpty()) {\n this._adjustProps();\n const _isHavingLines = this.props.data.some(\n (item: IVerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = this._toFocusWholeStack(_isHavingLines);\n const { isCalloutForStack = false } = this.props;\n this._dataset = this._createDataSetLayer();\n const legendBars: JSX.Element = this._getLegendData(\n this._points,\n this.props.theme!.palette,\n this._createLegendsForLine(this.props.data),\n );\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n href: this.props.href!,\n });\n const calloutProps: IModifiedCartesianChartProps['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.calloutLegend,\n XValue: this.state.xCalloutValue!,\n YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard,\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\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\n return (\n <CartesianChart\n {...this.props}\n points={this._dataset}\n chartType={ChartTypes.VerticalStackedBarChart}\n xAxisType={this._xAxisType}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n datasetForXAxisDomain={this._xAxisLabels}\n isCalloutForStack={shouldFocusWholeStack}\n barwidth={this._barWidth}\n focusZoneDirection={\n isCalloutForStack || _isHavingLines ? FocusZoneDirection.horizontal : FocusZoneDirection.vertical\n }\n getmargins={this._getMargins}\n getGraphData={this._getGraphData}\n getAxisData={this._getAxisData}\n customizedCallout={this._getCustomizedCallout()}\n onChartMouseLeave={this._handleChartMouseLeave}\n getDomainMargins={this._getDomainMargins}\n {...(this._xAxisType === XAxisTypes.StringAxis && {\n xAxisInnerPadding: this._xAxisInnerPadding,\n xAxisOuterPadding: this._xAxisOuterPadding,\n })}\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 <g>\n {_isHavingLines &&\n this._createLines(\n props.xScale!,\n props.yScale!,\n props.containerHeight!,\n props.containerWidth!,\n props.yScaleSecondary,\n )}\n </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 /**\n * This function tells us what to focus either the whole stack as focusable item.\n * or each individual item in the stack as focusable item. basically it depends\n * on the prop `isCalloutForStack` if it's false user can focus each individual bar\n * within the bar if it's true then user can focus whole bar as item.\n * but if we have lines in the chart then we force the user to focus only the whole\n * bar, even if isCalloutForStack is false\n */\n private _toFocusWholeStack = (_isHavingLines: boolean): boolean => {\n const { isCalloutForStack = false } = this.props;\n let shouldFocusStackOnly: boolean = false;\n if (_isHavingLines) {\n if (this.state.selectedLegend !== '') {\n shouldFocusStackOnly = false;\n } else {\n shouldFocusStackOnly = true;\n }\n } else {\n shouldFocusStackOnly = isCalloutForStack;\n }\n return shouldFocusStackOnly;\n };\n\n private _getFormattedLineData = (data: IVerticalStackedChartProps[]): LineObject => {\n const linesData: LinePoint[] = [];\n const formattedLineData: LineObject = {};\n data.forEach((item: IVerticalStackedChartProps, index: number) => {\n if (item.lineData) {\n // injecting corresponding x data point in each of the line data\n // we inject index also , it will be helpful to draw lines when x axis is\n // of string type\n item.lineData.forEach(line => {\n linesData.push({\n ...line,\n index,\n xItem: item,\n });\n });\n }\n });\n linesData.forEach(item => {\n if (formattedLineData[item.legend]) {\n formattedLineData[item.legend].push(item);\n } else {\n formattedLineData[item.legend] = [item];\n }\n });\n return formattedLineData;\n };\n\n private _getLineLegends = (data: IVerticalStackedChartProps[]): LineLegends[] => {\n const lineObject: LineObject = this._lineObject;\n const lineLegends: LineLegends[] = [];\n Object.keys(lineObject).forEach((item: string) => {\n lineLegends.push({\n title: item,\n color: lineObject[item][0].color,\n });\n });\n return lineLegends;\n };\n\n private _createLines = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale: any,\n yScale: NumericScale,\n containerHeight: number,\n containerWidth: number,\n secondaryYScale?: NumericScale,\n ): JSX.Element => {\n const lineObject: LineObject = this._getFormattedLineData(this.props.data);\n const lines: React.ReactNode[] = [];\n const borderForLines: React.ReactNode[] = [];\n const dots: React.ReactNode[] = [];\n const { theme } = this.props;\n const lineBorderWidth = this.props.lineOptions?.lineBorderWidth\n ? Number.parseFloat(this.props.lineOptions!.lineBorderWidth!.toString())\n : 0;\n\n const xScaleBandwidthTranslate = this._xAxisType !== XAxisTypes.StringAxis ? 0 : xScale.bandwidth() / 2;\n Object.keys(lineObject).forEach((item: string, index: number) => {\n const shouldHighlight = this._legendHighlighted(item) || this._noLegendHighlighted(); // item is legend name\n for (let i = 1; i < lineObject[item].length; i++) {\n const x1 = xScale(lineObject[item][i - 1].xItem.xAxisPoint);\n const useSecondaryYScale =\n lineObject[item][i - 1].useSecondaryYScale && lineObject[item][i].useSecondaryYScale && secondaryYScale;\n const y1 = useSecondaryYScale ? secondaryYScale!(lineObject[item][i - 1].y) : yScale(lineObject[item][i - 1].y);\n const x2 = xScale(lineObject[item][i].xItem.xAxisPoint);\n const y2 = useSecondaryYScale ? secondaryYScale!(lineObject[item][i].y) : yScale(lineObject[item][i].y);\n\n if (lineBorderWidth > 0) {\n borderForLines.push(\n <line\n key={`${index}-${i}-BorderLine`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={3 + lineBorderWidth * 2}\n fill=\"transparent\"\n strokeLinecap=\"round\"\n stroke={theme!.semanticColors.bodyBackground}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />,\n );\n }\n lines.push(\n <line\n key={`${index}-${i}-line`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={3}\n strokeLinecap=\"round\"\n stroke={lineObject[item][i].color}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n {...(this.state.selectedLegend === item && {\n onMouseOver: this._lineHover.bind(this, lineObject[item][i - 1]),\n onMouseLeave: this._lineHoverOut,\n })}\n />,\n );\n }\n });\n Object.keys(lineObject).forEach((item: string, index: number) => {\n lineObject[item].forEach((circlePoint: LinePoint, subIndex: number) => {\n dots.push(\n <circle\n key={`${index}-${subIndex}-dot`}\n cx={xScale(circlePoint.xItem.xAxisPoint)}\n cy={\n circlePoint.useSecondaryYScale && secondaryYScale ? secondaryYScale(circlePoint.y) : yScale(circlePoint.y)\n }\n onMouseOver={\n this.state.selectedLegend === item\n ? this._lineHover.bind(this, circlePoint)\n : this._onStackHover.bind(this, circlePoint.xItem)\n }\n {...(this.state.selectedLegend === item && {\n onMouseLeave: this._lineHoverOut,\n })}\n r={this._getCircleVisibilityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).radius}\n stroke={circlePoint.color}\n fill={this.props.theme!.semanticColors.bodyBackground}\n strokeWidth={3}\n visibility={this._getCircleVisibilityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).visibility}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />,\n );\n });\n });\n return (\n <>\n {borderForLines}\n {lines}\n {dots}\n </>\n );\n };\n\n private _getCircleVisibilityAndRadius = (\n xAxisPoint: string | number | Date,\n legend: string,\n ): { visibility: CircleVisbility; radius: number } => {\n const { selectedLegend, activeXAxisDataPoint } = this.state;\n if (selectedLegend !== '') {\n if (xAxisPoint === activeXAxisDataPoint && selectedLegend === legend) {\n return { visibility: CircleVisbility.show, radius: 8 };\n } else if (selectedLegend === legend) {\n return { visibility: CircleVisbility.show, radius: 0.3 };\n } else {\n return { visibility: CircleVisbility.hide, radius: 0 };\n }\n } else {\n return {\n visibility: activeXAxisDataPoint === xAxisPoint ? CircleVisbility.show : CircleVisbility.hide,\n radius: 8,\n };\n }\n };\n\n private _adjustProps(): void {\n this._points = this.props.data || [];\n this._barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth);\n const { theme } = this.props;\n const { palette } = theme!;\n // eslint-disable-next-line deprecation/deprecation\n this._colors = this.props.colors || [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n this._xAxisType = getTypeOfAxis(this.props.data[0].xAxisPoint, true) as XAxisTypes;\n this._lineObject = this._getFormattedLineData(this.props.data);\n this._xAxisInnerPadding = getScalePadding(this.props.xAxisInnerPadding, this.props.xAxisPadding, 2 / 3);\n this._xAxisOuterPadding = getScalePadding(this.props.xAxisOuterPadding, this.props.xAxisPadding, 0);\n }\n\n private _createDataSetLayer(): IVerticalStackedBarDataPoint[] {\n const tempArr: string[] = [];\n const dataset: IVerticalStackedBarDataPoint[] = this._points.map(singlePointData => {\n let total: number = 0;\n singlePointData.chartData!.forEach((point: IVSChartDataPoint) => {\n total = total + point.data;\n });\n tempArr.push(singlePointData.xAxisPoint as string);\n return {\n x: singlePointData.xAxisPoint,\n y: total,\n };\n });\n this._xAxisLabels = tempArr;\n return dataset;\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _renderCallout(props?: IVSChartDataPoint): JSX.Element | null {\n return props ? (\n <ChartHoverCard\n XValue={props.xAxisCalloutData}\n Legend={props.legend}\n YValue={props.yAxisCalloutData}\n color={props.color}\n culture={this.props.culture}\n />\n ) : null;\n }\n\n private _getCustomizedCallout = () => {\n const _isHavingLines = this.props.data.some(\n (item: IVerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n return this.props.onRenderCalloutPerStack\n ? this.props.onRenderCalloutPerStack(this.state.stackCalloutProps)\n : this.props.onRenderCalloutPerDataPoint && !_isHavingLines\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps, this._renderCallout)\n : null;\n };\n\n private _onLegendClick(legendTitle: string): void {\n if (this.state.selectedLegend === legendTitle) {\n this.setState({\n selectedLegend: '',\n });\n } else {\n this.setState({\n selectedLegend: legendTitle,\n });\n }\n }\n\n private _onLegendHover(legendTitle: string): void {\n this.setState({\n activeLegend: legendTitle,\n });\n }\n\n private _onLegendLeave(): void {\n this.setState({\n activeLegend: '',\n });\n }\n\n private _getLegendData(\n data: IVerticalStackedChartProps[],\n palette: IPalette,\n lineLegends: LineLegends[],\n ): JSX.Element {\n if (this.props.hideLegend) {\n return <></>;\n }\n const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n const actions: ILegend[] = [];\n const { allowHoverOnLegend = true } = this.props;\n\n data.forEach((singleChartData: IVerticalStackedChartProps) => {\n singleChartData.chartData.forEach((point: IVSChartDataPoint) => {\n const color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n const checkSimilarLegends = actions.filter((leg: ILegend) => leg.title === point.legend && leg.color === color);\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n\n const legend: ILegend = {\n title: point.legend,\n color: color,\n action: () => {\n this._onLegendClick(point.legend);\n },\n hoverAction: allowHoverOnLegend\n ? () => {\n this._handleChartMouseLeave();\n this._onLegendHover(point.legend);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => this._onLegendLeave() : undefined,\n };\n\n actions.push(legend);\n });\n });\n const legendsOfLine: ILegend[] = [];\n if (lineLegends && lineLegends.length > 0) {\n lineLegends.forEach((point: LineLegends) => {\n const legend: ILegend = {\n title: point.title,\n color: point.color,\n isLineLegendInBarChart: true,\n action: () => {\n this._onLegendClick(point.title);\n },\n hoverAction: allowHoverOnLegend\n ? () => {\n this._handleChartMouseLeave();\n this._onLegendHover(point.title);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => this._onLegendLeave() : undefined,\n };\n legendsOfLine.push(legend);\n });\n }\n const totalLegends: ILegend[] = legendsOfLine.concat(actions);\n return (\n <Legends\n legends={totalLegends}\n overflowProps={this.props.legendsOverflowProps}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n />\n );\n }\n\n private _onRectHover(\n xAxisPoint: string,\n point: IVSChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n this._onRectFocusHover(xAxisPoint, point, color, mouseEvent);\n }\n\n private _onRectFocusHover(\n xAxisPoint: string,\n point: IVSChartDataPoint,\n color: string,\n refSelected: React.MouseEvent<SVGElement> | SVGGElement,\n ): void {\n if (this._calloutAnchorPoint?.chartDataPoint !== point || this._calloutAnchorPoint?.xAxisDataPoint !== xAxisPoint) {\n this._calloutAnchorPoint = {\n chartDataPoint: point,\n xAxisDataPoint: xAxisPoint,\n };\n this.setState({\n refSelected,\n /**\n * Show the callout if highlighted bar is focused/hovered\n * and Hide it if unhighlighted bar is focused/hovered\n */\n isCalloutVisible: this.state.selectedLegend === '' || this.state.selectedLegend === point.legend,\n calloutLegend: point.legend,\n dataForHoverCard: point.data,\n color,\n xCalloutValue: point.xAxisCalloutData ? point.xAxisCalloutData : xAxisPoint,\n yCalloutValue: point.yAxisCalloutData,\n dataPointCalloutProps: point,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n }\n\n private _lineHover = (lineData: LinePoint, mouseEvent: React.MouseEvent<SVGElement>) => {\n mouseEvent.persist();\n this.setState({\n refSelected: mouseEvent,\n isCalloutVisible: true,\n xCalloutValue: `${lineData.xItem.xAxisPoint}`,\n yCalloutValue: `${lineData.yAxisCalloutData || lineData.data || lineData.y}`,\n activeXAxisDataPoint: lineData.xItem.xAxisPoint,\n color: lineData.color,\n });\n };\n\n private _lineHoverOut = () => {\n this.setState({\n refSelected: null,\n isCalloutVisible: false,\n xCalloutValue: '',\n yCalloutValue: '',\n activeXAxisDataPoint: '',\n color: '',\n });\n };\n\n private _onStackHover(stack: IVerticalStackedChartProps, mouseEvent: React.MouseEvent<SVGElement>): void {\n mouseEvent.persist();\n this._onStackHoverFocus(stack, mouseEvent);\n }\n\n private _onStackHoverFocus(\n stack: IVerticalStackedChartProps,\n refSelected: React.MouseEvent<SVGElement> | SVGGElement,\n ): void {\n const lineData = stack.lineData;\n const isLinesPresent: boolean = lineData !== undefined && lineData.length > 0;\n if (isLinesPresent) {\n lineData!.forEach((item: ILineDataInVerticalStackedBarChart & { shouldDrawBorderBottom?: boolean }) => {\n item.data = item.data || item.y;\n item.shouldDrawBorderBottom = true;\n });\n }\n this.setState({\n refSelected,\n isCalloutVisible: true,\n YValueHover: isLinesPresent\n ? [...lineData!.sort((a, b) => (a.data! < b.data! ? 1 : -1)), ...stack.chartData.slice().reverse()]\n : stack.chartData.slice().reverse(),\n hoverXValue: stack.xAxisPoint instanceof Date ? stack.xAxisPoint.toLocaleDateString() : stack.xAxisPoint,\n stackCalloutProps: stack,\n activeXAxisDataPoint: stack.xAxisPoint,\n callOutAccessibilityData: stack.stackCallOutAccessibilityData,\n });\n }\n\n private _onRectFocus(point: IVSChartDataPoint, xAxisPoint: string, color: string, ref: IRefArrayData): void {\n if (ref.refElement) {\n this._onRectFocusHover(xAxisPoint, point, color, ref.refElement);\n }\n }\n\n private _onStackFocus(stack: IVerticalStackedChartProps, groupRef: IRefArrayData): void {\n if (groupRef.refElement) {\n this._onStackHoverFocus(stack, groupRef.refElement);\n }\n }\n\n private _handleMouseOut = (): void => {\n /**/\n };\n\n private _handleChartMouseLeave = (): void => {\n this._calloutAnchorPoint = null;\n this.setState({\n isCalloutVisible: false,\n activeXAxisDataPoint: '',\n });\n };\n\n private _onClick(\n data: IVerticalStackedChartProps | IVSChartDataPoint,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n this.props.onBarClick?.(mouseEvent, data);\n this.props.href ? (window.location.href = this.props.href) : '';\n }\n\n private _getBarGapAndScale(\n bars: IVSChartDataPoint[],\n yBarScale: NumericScale,\n defaultTotalHeight?: number,\n ): {\n readonly gapHeight: number;\n readonly heightValueScale: number;\n } {\n const { barGapMax = 0 } = this.props;\n\n // When displaying gaps between the bars, the height of each bar is\n // adjusted so that the total of all bars is not changed by the gaps\n const totalData = bars.reduce((iter, value) => iter + value.data, 0);\n const totalHeight = defaultTotalHeight ?? yBarScale(totalData);\n const gaps = barGapMax && bars.length - 1;\n const gapHeight = gaps && Math.max(barGapMin, Math.min(barGapMax, (totalHeight * barGapMultiplier) / gaps));\n const heightValueScale = (totalHeight - gapHeight * gaps) / totalData;\n\n return {\n gapHeight,\n heightValueScale,\n } as const;\n }\n\n private _createBar = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xBarScale: any,\n yBarScale: NumericScale,\n containerHeight: number,\n xElement: SVGElement,\n ): JSX.Element[] => {\n const { barCornerRadius = 0, barMinimumHeight = 0 } = this.props;\n const _isHavingLines = this.props.data.some(\n (item: IVerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = this._toFocusWholeStack(_isHavingLines);\n\n if (this._xAxisType === XAxisTypes.StringAxis) {\n // Setting the bar width here is safe because there are no dependencies earlier in the code\n // that rely on the width of bars in vertical bar charts with string x-axis.\n this._barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth, xBarScale.bandwidth());\n }\n\n const bars = this._points.map((singleChartData: IVerticalStackedChartProps, indexNumber: number) => {\n let yPoint = containerHeight - this.margins.bottom!;\n const xPoint = xBarScale(\n this._xAxisType === XAxisTypes.NumericAxis\n ? (singleChartData.xAxisPoint as number)\n : this._xAxisType === XAxisTypes.DateAxis\n ? (singleChartData.xAxisPoint as Date)\n : (singleChartData.xAxisPoint as string),\n );\n const xScaleBandwidthTranslate =\n this._xAxisType !== XAxisTypes.StringAxis ? -this._barWidth / 2 : (xBarScale.bandwidth() - this._barWidth) / 2;\n\n let barTotalValue = 0;\n\n // Removing datapoints with zero data\n const barsToDisplay = singleChartData.chartData.filter(point => point.data > 0);\n\n if (!barsToDisplay.length) {\n return undefined;\n }\n\n const { gapHeight, heightValueScale } = this._getBarGapAndScale(barsToDisplay, yBarScale);\n\n if (heightValueScale < 0) {\n return undefined;\n }\n\n const singleBar = barsToDisplay.map((point: IVSChartDataPoint, index: number) => {\n const color = point.color ? point.color : this._colors[index];\n const ref: IRefArrayData = {};\n\n const shouldHighlight = this._legendHighlighted(point.legend) || this._noLegendHighlighted() ? true : false;\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n shouldHighlight: shouldHighlight,\n href: this.props.href,\n });\n const rectFocusProps = !shouldFocusWholeStack && {\n 'data-is-focusable': !this.props.hideTooltip,\n 'aria-label': this._getAriaLabel(singleChartData, point),\n onMouseOver: this._onRectHover.bind(this, singleChartData.xAxisPoint, point, color),\n onMouseMove: this._onRectHover.bind(this, singleChartData.xAxisPoint, point, color),\n onMouseLeave: this._handleMouseOut,\n onFocus: this._onRectFocus.bind(this, point, singleChartData.xAxisPoint, color, ref),\n onBlur: this._handleMouseOut,\n onClick: this._onClick.bind(this, point),\n role: 'img',\n };\n\n let barHeight = heightValueScale * point.data;\n if (barHeight < Math.max(Math.ceil((heightValueScale * this._yMax) / 100.0), barMinimumHeight)) {\n barHeight = Math.max(Math.ceil((heightValueScale * this._yMax) / 100.0), barMinimumHeight);\n }\n yPoint = yPoint - barHeight - (index ? gapHeight : 0);\n barTotalValue += point.data;\n\n // If set, apply the corner radius to the top of the final bar\n if (barCornerRadius && barHeight > barCornerRadius && index === barsToDisplay.length - 1) {\n return (\n <path\n key={index + indexNumber + `${shouldFocusWholeStack}`}\n className={this._classNames.opacityChangeOnHover}\n d={`\n M ${xPoint} ${yPoint + barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${-barCornerRadius}\n h ${this._barWidth - 2 * barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${barCornerRadius}\n v ${barHeight - barCornerRadius}\n h ${-this._barWidth}\n z\n `}\n fill={color}\n ref={e => (ref.refElement = e)}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n {...rectFocusProps}\n />\n );\n }\n if (barHeight < 0) {\n return <React.Fragment key={index + indexNumber}> </React.Fragment>;\n }\n return (\n <rect\n key={index + indexNumber}\n className={this._classNames.opacityChangeOnHover}\n x={xPoint}\n y={yPoint}\n width={this._barWidth}\n height={barHeight}\n fill={color}\n ref={e => (ref.refElement = e)}\n {...rectFocusProps}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />\n );\n });\n const groupRef: IRefArrayData = {};\n const stackFocusProps = shouldFocusWholeStack && {\n 'data-is-focusable': !this.props.hideTooltip,\n 'aria-label': this._getAriaLabel(singleChartData),\n onMouseOver: this._onStackHover.bind(this, singleChartData),\n onMouseMove: this._onStackHover.bind(this, singleChartData),\n onMouseLeave: this._handleMouseOut,\n onFocus: this._onStackFocus.bind(this, singleChartData, groupRef),\n onBlur: this._handleMouseOut,\n onClick: this._onClick.bind(this, singleChartData),\n role: 'img',\n };\n let showLabel = false;\n let barLabel = 0;\n if (!this.props.hideLabels) {\n if (this._noLegendHighlighted()) {\n showLabel = true;\n barLabel = barTotalValue;\n } else {\n barsToDisplay.forEach(point => {\n if (this._legendHighlighted(point.legend)) {\n showLabel = true;\n barLabel += point.data;\n }\n });\n }\n }\n return (\n <g key={indexNumber + `${shouldFocusWholeStack}`}>\n <g id={`${indexNumber}-singleBar`} ref={e => (groupRef.refElement = e)} {...stackFocusProps}>\n {singleBar}\n </g>\n {!this.props.hideLabels && this._barWidth >= 16 && showLabel && (\n <text\n x={xPoint + this._barWidth / 2}\n y={yPoint - 6}\n textAnchor=\"middle\"\n className={this._classNames.barLabel}\n aria-label={`Total: ${barLabel}`}\n role=\"img\"\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n >\n {formatValueWithSIPrefix(barLabel)}\n </text>\n )}\n </g>\n );\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(xBarScale);\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: this._classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return bars.filter((bar): bar is JSX.Element => !!bar);\n };\n\n private _getScales = (containerHeight: number, containerWidth: number) => {\n const yMax = this._yMax;\n const yBarScale = d3ScaleLinear()\n .domain([0, yMax])\n .range([0, containerHeight - this.margins.bottom! - this.margins.top!]);\n if (this._xAxisType === XAxisTypes.NumericAxis) {\n const xMax = d3Max(this._dataset, (point: IVerticalStackedBarDataPoint) => point.x as number)!;\n const xMin = d3Min(this._dataset, (point: IVerticalStackedBarDataPoint) => point.x as number)!;\n\n const xBarScale = d3ScaleLinear()\n .domain(this._isRtl ? [xMax, xMin] : [xMin, xMax])\n .nice()\n .range([this.margins.left! + this._domainMargin, containerWidth - this.margins.right! - this._domainMargin]);\n\n return { xBarScale, yBarScale };\n }\n if (this._xAxisType === XAxisTypes.DateAxis) {\n const sDate = d3Min(this._dataset, (point: IVerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const lDate = d3Max(this._dataset, (point: IVerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const xBarScale = d3ScaleUtc()\n .domain(this._isRtl ? [lDate, sDate] : [sDate, lDate])\n .range([this.margins.left! + this._domainMargin, containerWidth - this.margins.right! - this._domainMargin]);\n\n return { xBarScale, yBarScale };\n }\n const xBarScale = d3ScaleBand()\n .domain(this._xAxisLabels)\n .range(\n this._isRtl\n ? [containerWidth - this.margins.right! - this._domainMargin, this.margins.left! + this._domainMargin]\n : [this.margins.left! + this._domainMargin, containerWidth - this.margins.right! - this._domainMargin],\n )\n .paddingInner(this._xAxisInnerPadding)\n .paddingOuter(this._xAxisOuterPadding);\n\n return { xBarScale, yBarScale };\n };\n\n private _getGraphData = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale: any,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) => {\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth);\n return (this._bars = this._createBar(xBarScale, yBarScale, containerHeight, xElement!));\n };\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _getAxisData = (yAxisData: IAxisData) => {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n this._yMax = Math.max(domainValue[domainValue.length - 1], this.props.yMaxValue || 0);\n }\n };\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legendTitle: string) => {\n return (\n this.state.selectedLegend === legendTitle ||\n (this.state.selectedLegend === '' && this.state.activeLegend === legendTitle)\n );\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this.state.selectedLegend === '' && this.state.activeLegend === '';\n };\n\n private _getAriaLabel = (singleChartData: IVerticalStackedChartProps, point?: IVSChartDataPoint): string => {\n if (!point) {\n /** if shouldFocusWholeStack is true */\n const xValue = singleChartData.xAxisCalloutData || singleChartData.xAxisPoint;\n const pointValues = singleChartData.chartData\n .map(pt => {\n const legend = pt.legend;\n const yValue = pt.yAxisCalloutData || pt.data;\n return `${legend}, ${yValue}.`;\n })\n .join(' ');\n const lineValues = singleChartData.lineData\n ?.map(ln => {\n const legend = ln.legend;\n const yValue = ln.yAxisCalloutData || ln.data || ln.y;\n return `${legend}, ${yValue}.`;\n })\n .join(' ');\n return (\n singleChartData.stackCallOutAccessibilityData?.ariaLabel ||\n `${xValue}. ${pointValues}` + (lineValues ? ` ${lineValues}` : '')\n );\n }\n /** if shouldFocusWholeStack is false */\n const xValue = singleChartData.xAxisCalloutData || point.xAxisCalloutData || singleChartData.xAxisPoint;\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.data;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n };\n\n private _getDomainMargins = (containerWidth: number): IMargins => {\n this._domainMargin = MIN_DOMAIN_MARGIN;\n\n /** Total width available to render the bars */\n const totalWidth =\n containerWidth - (this.margins.left! + MIN_DOMAIN_MARGIN) - (this.margins.right! + MIN_DOMAIN_MARGIN);\n\n if (this._xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(this.props.xAxisOuterPadding, this.props.xAxisPadding)) {\n // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available\n // to adjust the space before the first bar and after the last bar.\n this._domainMargin = 0;\n } else if (this.props.barWidth !== 'auto') {\n /** Rate at which the space between the bars changes wrt the bar width */\n const barGapRate = this._xAxisInnerPadding / (1 - this._xAxisInnerPadding);\n // Update the bar width so that when CartesianChart rerenders,\n // the following calculations don't use the previous bar width.\n this._barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth);\n /** Total width required to render the bars. Directly proportional to bar width */\n const reqWidth = (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * barGapRate) * this._barWidth;\n\n if (totalWidth >= reqWidth) {\n // Center align the chart by setting equal left and right margins for domain\n this._domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;\n }\n }\n } else {\n const data = (this.props.data?.map(point => point.xAxisPoint) as number[] | Date[] | undefined) || [];\n this._barWidth = getBarWidth(\n this.props.barWidth,\n this.props.maxBarWidth,\n calculateAppropriateBarWidth(data, totalWidth),\n );\n this._domainMargin = MIN_DOMAIN_MARGIN + this._barWidth / 2;\n }\n\n return {\n ...this.margins,\n left: this.margins.left! + this._domainMargin,\n right: this.margins.right! + this._domainMargin,\n };\n };\n\n private _isChartEmpty(): boolean {\n return !(\n this.props.data &&\n this.props.data.length > 0 &&\n this.props.data.filter(item => item.chartData.length === 0).length === 0\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"VerticalStackedBarChart.base.js","sourceRoot":"../src/","sources":["components/VerticalStackedBarChart/VerticalStackedBarChart.base.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,IAAI,KAAK,EAAE,GAAG,IAAI,KAAK,EAAE,MAAM,UAAU,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AAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;YAC1B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAA3B,CAA2B,CAAC,CAAC,MAAM,KAAK,CAAC,CACzE,CAAC;IACJ,CAAC;IA3+Ba,wCAAY,GAA2C;QACnE,WAAW,EAAE,EAAE;KAChB,CAAC;IA0+BJ,kCAAC;CAAA,AAh/BD,CAAiD,KAAK,CAAC,SAAS,GAg/B/D;SAh/BY,2BAA2B","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select } from 'd3-selection';\nimport {\n scaleLinear as d3ScaleLinear,\n ScaleLinear as D3ScaleLinear,\n scaleBand as d3ScaleBand,\n scaleUtc as d3ScaleUtc,\n} from 'd3-scale';\nimport { classNamesFunction, getId, getRTL, warnDeprecations, memoizeFunction } from '@fluentui/react/lib/Utilities';\nimport { IPalette, IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { ILegend, Legends } from '../Legends/index';\nimport {\n IAccessibilityProps,\n CartesianChart,\n ChartHoverCard,\n IBasestate,\n IChildProps,\n IVerticalStackedBarDataPoint,\n IMargins,\n IVerticalStackedBarChartProps,\n IVerticalStackedBarChartStyleProps,\n IVerticalStackedBarChartStyles,\n IVerticalStackedChartProps,\n IVSChartDataPoint,\n ILineDataInVerticalStackedBarChart,\n IModifiedCartesianChartProps,\n} from '../../index';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n getTypeOfAxis,\n tooltipOfXAxislabels,\n formatValueWithSIPrefix,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n calculateAppropriateBarWidth,\n} from '../../utilities/index';\n\nconst getClassNames = classNamesFunction<IVerticalStackedBarChartStyleProps, IVerticalStackedBarChartStyles>();\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\ntype NumericScale = D3ScaleLinear<number, number>;\nconst COMPONENT_NAME = 'VERTICAL STACKED BAR CHART';\n\n// When displaying gaps between bars, the max height of the gap is given in the\n// props. The actual gap is calculated with this multiplier, with a minimum gap\n// of 1 pixel. (If these values are changed, update the comment for barGapMax.)\nconst barGapMultiplier = 0.2;\nconst barGapMin = 1;\n\nconst MIN_DOMAIN_MARGIN = 8;\n\ninterface IRefArrayData {\n refElement?: SVGGElement | null;\n}\n\ntype LinePoint = ILineDataInVerticalStackedBarChart & { index: number; xItem: IVerticalStackedChartProps };\ntype LineObject = { [key: string]: LinePoint[] };\ntype LineLegends = {\n title: string;\n color: string;\n};\nenum CircleVisbility {\n show = 'visibility',\n hide = 'hidden',\n}\n\ntype CalloutAnchorPointData = {\n xAxisDataPoint: string;\n chartDataPoint: IVSChartDataPoint;\n};\n\nexport interface IVerticalStackedBarChartState extends IBasestate {\n dataPointCalloutProps?: IVSChartDataPoint;\n stackCalloutProps?: IVerticalStackedChartProps;\n activeXAxisDataPoint: number | string | Date;\n callOutAccessibilityData?: IAccessibilityProps;\n calloutLegend: string;\n}\nexport class VerticalStackedBarChartBase extends React.Component<\n IVerticalStackedBarChartProps,\n IVerticalStackedBarChartState\n> {\n public static defaultProps: Partial<IVerticalStackedBarChartProps> = {\n maxBarWidth: 24,\n };\n\n private _points: IVerticalStackedChartProps[];\n private _dataset: IVerticalStackedBarDataPoint[];\n private _xAxisLabels: string[];\n private _bars: JSX.Element[];\n private _xAxisType: XAxisTypes;\n private _barWidth: number;\n private _calloutId: string;\n private _colors: string[];\n private margins: IMargins;\n private _isRtl: boolean = getRTL();\n private _createLegendsForLine: (data: IVerticalStackedChartProps[]) => LineLegends[];\n private _lineObject: LineObject;\n private _tooltipId: string;\n private _yMax: number;\n private _calloutAnchorPoint: CalloutAnchorPointData | null;\n private _domainMargin: number;\n private _classNames: IProcessedStyleSet<IVerticalStackedBarChartStyles>;\n private _emptyChartId: string;\n private _xAxisInnerPadding: number;\n private _xAxisOuterPadding: number;\n\n public constructor(props: IVerticalStackedBarChartProps) {\n super(props);\n this.state = {\n isCalloutVisible: false,\n selectedLegend: '',\n activeLegend: '',\n refSelected: null,\n dataForHoverCard: 0,\n color: '',\n hoverXValue: '',\n YValueHover: [],\n xCalloutValue: '',\n yCalloutValue: '',\n activeXAxisDataPoint: '',\n calloutLegend: '',\n };\n warnDeprecations(COMPONENT_NAME, props, {\n colors: 'IVSChartDataPoint.color',\n chartLabel: 'use your own title for chart',\n });\n this._handleMouseOut = this._handleMouseOut.bind(this);\n this._calloutId = getId('callout');\n this._tooltipId = getId('VSBCTooltipId_');\n if (!this._isChartEmpty()) {\n this._adjustProps();\n this._dataset = this._createDataSetLayer();\n }\n this._createLegendsForLine = memoizeFunction((data: IVerticalStackedChartProps[]) => this._getLineLegends(data));\n this._emptyChartId = getId('_VSBC_empty');\n }\n\n public componentDidUpdate(prevProps: IVerticalStackedBarChartProps): void {\n if (\n prevProps.height !== this.props.height ||\n prevProps.width !== this.props.width ||\n prevProps.data !== this.props.data\n ) {\n this._adjustProps();\n this._dataset = this._createDataSetLayer();\n }\n }\n\n public render(): React.ReactNode {\n if (!this._isChartEmpty()) {\n this._adjustProps();\n const _isHavingLines = this.props.data.some(\n (item: IVerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = this._toFocusWholeStack(_isHavingLines);\n const { isCalloutForStack = false } = this.props;\n this._dataset = this._createDataSetLayer();\n const legendBars: JSX.Element = this._getLegendData(\n this._points,\n this.props.theme!.palette,\n this._createLegendsForLine(this.props.data),\n );\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n href: this.props.href!,\n });\n const calloutProps: IModifiedCartesianChartProps['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.calloutLegend,\n XValue: this.state.xCalloutValue!,\n YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard,\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\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\n return (\n <CartesianChart\n {...this.props}\n points={this._dataset}\n chartType={ChartTypes.VerticalStackedBarChart}\n xAxisType={this._xAxisType}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n datasetForXAxisDomain={this._xAxisLabels}\n isCalloutForStack={shouldFocusWholeStack}\n barwidth={this._barWidth}\n focusZoneDirection={\n isCalloutForStack || _isHavingLines ? FocusZoneDirection.horizontal : FocusZoneDirection.vertical\n }\n getmargins={this._getMargins}\n getGraphData={this._getGraphData}\n getAxisData={this._getAxisData}\n customizedCallout={this._getCustomizedCallout()}\n onChartMouseLeave={this._handleChartMouseLeave}\n getDomainMargins={this._getDomainMargins}\n {...(this._xAxisType === XAxisTypes.StringAxis && {\n xAxisInnerPadding: this._xAxisInnerPadding,\n xAxisOuterPadding: this._xAxisOuterPadding,\n })}\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 <g>\n {_isHavingLines &&\n this._createLines(\n props.xScale!,\n props.yScale!,\n props.containerHeight!,\n props.containerWidth!,\n props.yScaleSecondary,\n )}\n </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 /**\n * This function tells us what to focus either the whole stack as focusable item.\n * or each individual item in the stack as focusable item. basically it depends\n * on the prop `isCalloutForStack` if it's false user can focus each individual bar\n * within the bar if it's true then user can focus whole bar as item.\n * but if we have lines in the chart then we force the user to focus only the whole\n * bar, even if isCalloutForStack is false\n */\n private _toFocusWholeStack = (_isHavingLines: boolean): boolean => {\n const { isCalloutForStack = false } = this.props;\n let shouldFocusStackOnly: boolean = false;\n if (_isHavingLines) {\n if (this.state.selectedLegend !== '') {\n shouldFocusStackOnly = false;\n } else {\n shouldFocusStackOnly = true;\n }\n } else {\n shouldFocusStackOnly = isCalloutForStack;\n }\n return shouldFocusStackOnly;\n };\n\n private _getFormattedLineData = (data: IVerticalStackedChartProps[]): LineObject => {\n const linesData: LinePoint[] = [];\n const formattedLineData: LineObject = {};\n data.forEach((item: IVerticalStackedChartProps, index: number) => {\n if (item.lineData) {\n // injecting corresponding x data point in each of the line data\n // we inject index also , it will be helpful to draw lines when x axis is\n // of string type\n item.lineData.forEach(line => {\n linesData.push({\n ...line,\n index,\n xItem: item,\n });\n });\n }\n });\n linesData.forEach(item => {\n if (formattedLineData[item.legend]) {\n formattedLineData[item.legend].push(item);\n } else {\n formattedLineData[item.legend] = [item];\n }\n });\n return formattedLineData;\n };\n\n private _getLineLegends = (data: IVerticalStackedChartProps[]): LineLegends[] => {\n const lineObject: LineObject = this._lineObject;\n const lineLegends: LineLegends[] = [];\n Object.keys(lineObject).forEach((item: string) => {\n lineLegends.push({\n title: item,\n color: lineObject[item][0].color,\n });\n });\n return lineLegends;\n };\n\n private _createLines = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale: any,\n yScale: NumericScale,\n containerHeight: number,\n containerWidth: number,\n secondaryYScale?: NumericScale,\n ): JSX.Element => {\n const lineObject: LineObject = this._getFormattedLineData(this.props.data);\n const lines: React.ReactNode[] = [];\n const borderForLines: React.ReactNode[] = [];\n const dots: React.ReactNode[] = [];\n const { theme } = this.props;\n const lineBorderWidth = this.props.lineOptions?.lineBorderWidth\n ? Number.parseFloat(this.props.lineOptions!.lineBorderWidth!.toString())\n : 0;\n\n const xScaleBandwidthTranslate = this._xAxisType !== XAxisTypes.StringAxis ? 0 : xScale.bandwidth() / 2;\n Object.keys(lineObject).forEach((item: string, index: number) => {\n const shouldHighlight = this._legendHighlighted(item) || this._noLegendHighlighted(); // item is legend name\n for (let i = 1; i < lineObject[item].length; i++) {\n const x1 = xScale(lineObject[item][i - 1].xItem.xAxisPoint);\n const useSecondaryYScale =\n lineObject[item][i - 1].useSecondaryYScale && lineObject[item][i].useSecondaryYScale && secondaryYScale;\n const y1 = useSecondaryYScale ? secondaryYScale!(lineObject[item][i - 1].y) : yScale(lineObject[item][i - 1].y);\n const x2 = xScale(lineObject[item][i].xItem.xAxisPoint);\n const y2 = useSecondaryYScale ? secondaryYScale!(lineObject[item][i].y) : yScale(lineObject[item][i].y);\n\n if (lineBorderWidth > 0) {\n borderForLines.push(\n <line\n key={`${index}-${i}-BorderLine`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={3 + lineBorderWidth * 2}\n fill=\"transparent\"\n strokeLinecap=\"round\"\n stroke={theme!.semanticColors.bodyBackground}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />,\n );\n }\n lines.push(\n <line\n key={`${index}-${i}-line`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={3}\n strokeLinecap=\"round\"\n stroke={lineObject[item][i].color}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n {...(this.state.selectedLegend === item && {\n onMouseOver: this._lineHover.bind(this, lineObject[item][i - 1]),\n onMouseLeave: this._lineHoverOut,\n })}\n />,\n );\n }\n });\n Object.keys(lineObject).forEach((item: string, index: number) => {\n lineObject[item].forEach((circlePoint: LinePoint, subIndex: number) => {\n dots.push(\n <circle\n key={`${index}-${subIndex}-dot`}\n cx={xScale(circlePoint.xItem.xAxisPoint)}\n cy={\n circlePoint.useSecondaryYScale && secondaryYScale ? secondaryYScale(circlePoint.y) : yScale(circlePoint.y)\n }\n onMouseOver={\n this.state.selectedLegend === item\n ? this._lineHover.bind(this, circlePoint)\n : this._onStackHover.bind(this, circlePoint.xItem)\n }\n {...(this.state.selectedLegend === item && {\n onMouseLeave: this._lineHoverOut,\n })}\n r={this._getCircleVisibilityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).radius}\n stroke={circlePoint.color}\n fill={this.props.theme!.semanticColors.bodyBackground}\n strokeWidth={3}\n visibility={this._getCircleVisibilityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).visibility}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />,\n );\n });\n });\n return (\n <>\n {borderForLines}\n {lines}\n {dots}\n </>\n );\n };\n\n private _getCircleVisibilityAndRadius = (\n xAxisPoint: string | number | Date,\n legend: string,\n ): { visibility: CircleVisbility; radius: number } => {\n const { selectedLegend, activeXAxisDataPoint } = this.state;\n if (selectedLegend !== '') {\n if (xAxisPoint === activeXAxisDataPoint && selectedLegend === legend) {\n return { visibility: CircleVisbility.show, radius: 8 };\n } else if (selectedLegend === legend) {\n return { visibility: CircleVisbility.show, radius: 0.3 };\n } else {\n return { visibility: CircleVisbility.hide, radius: 0 };\n }\n } else {\n return {\n visibility: activeXAxisDataPoint === xAxisPoint ? CircleVisbility.show : CircleVisbility.hide,\n radius: 8,\n };\n }\n };\n\n private _adjustProps(): void {\n this._points = this.props.data || [];\n this._barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth);\n const { theme } = this.props;\n const { palette } = theme!;\n // eslint-disable-next-line deprecation/deprecation\n this._colors = this.props.colors || [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n this._xAxisType = getTypeOfAxis(this.props.data[0].xAxisPoint, true) as XAxisTypes;\n this._lineObject = this._getFormattedLineData(this.props.data);\n this._xAxisInnerPadding = getScalePadding(this.props.xAxisInnerPadding, this.props.xAxisPadding, 2 / 3);\n this._xAxisOuterPadding = getScalePadding(this.props.xAxisOuterPadding, this.props.xAxisPadding, 0);\n }\n\n private _createDataSetLayer(): IVerticalStackedBarDataPoint[] {\n const tempArr: string[] = [];\n const dataset: IVerticalStackedBarDataPoint[] = this._points.map(singlePointData => {\n let total: number = 0;\n singlePointData.chartData!.forEach((point: IVSChartDataPoint) => {\n total = total + point.data;\n });\n tempArr.push(singlePointData.xAxisPoint as string);\n return {\n x: singlePointData.xAxisPoint,\n y: total,\n };\n });\n this._xAxisLabels = tempArr;\n return dataset;\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _renderCallout(props?: IVSChartDataPoint): JSX.Element | null {\n return props ? (\n <ChartHoverCard\n XValue={props.xAxisCalloutData}\n Legend={props.legend}\n YValue={props.yAxisCalloutData}\n color={props.color}\n culture={this.props.culture}\n />\n ) : null;\n }\n\n private _getCustomizedCallout = () => {\n const _isHavingLines = this.props.data.some(\n (item: IVerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n return this.props.onRenderCalloutPerStack\n ? this.props.onRenderCalloutPerStack(this.state.stackCalloutProps)\n : this.props.onRenderCalloutPerDataPoint && !_isHavingLines\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps, this._renderCallout)\n : null;\n };\n\n private _onLegendClick(legendTitle: string): void {\n if (this.state.selectedLegend === legendTitle) {\n this.setState({\n selectedLegend: '',\n });\n } else {\n this.setState({\n selectedLegend: legendTitle,\n });\n }\n }\n\n private _onLegendHover(legendTitle: string): void {\n this.setState({\n activeLegend: legendTitle,\n });\n }\n\n private _onLegendLeave(): void {\n this.setState({\n activeLegend: '',\n });\n }\n\n private _getLegendData(\n data: IVerticalStackedChartProps[],\n palette: IPalette,\n lineLegends: LineLegends[],\n ): JSX.Element {\n if (this.props.hideLegend) {\n return <></>;\n }\n const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n const actions: ILegend[] = [];\n const { allowHoverOnLegend = true } = this.props;\n\n data.forEach((singleChartData: IVerticalStackedChartProps) => {\n singleChartData.chartData.forEach((point: IVSChartDataPoint) => {\n const color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n const checkSimilarLegends = actions.filter((leg: ILegend) => leg.title === point.legend && leg.color === color);\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n\n const legend: ILegend = {\n title: point.legend,\n color: color,\n action: () => {\n this._onLegendClick(point.legend);\n },\n hoverAction: allowHoverOnLegend\n ? () => {\n this._handleChartMouseLeave();\n this._onLegendHover(point.legend);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => this._onLegendLeave() : undefined,\n };\n\n actions.push(legend);\n });\n });\n const legendsOfLine: ILegend[] = [];\n if (lineLegends && lineLegends.length > 0) {\n lineLegends.forEach((point: LineLegends) => {\n const legend: ILegend = {\n title: point.title,\n color: point.color,\n isLineLegendInBarChart: true,\n action: () => {\n this._onLegendClick(point.title);\n },\n hoverAction: allowHoverOnLegend\n ? () => {\n this._handleChartMouseLeave();\n this._onLegendHover(point.title);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => this._onLegendLeave() : undefined,\n };\n legendsOfLine.push(legend);\n });\n }\n const totalLegends: ILegend[] = legendsOfLine.concat(actions);\n return (\n <Legends\n legends={totalLegends}\n overflowProps={this.props.legendsOverflowProps}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n />\n );\n }\n\n private _onRectHover(\n xAxisPoint: string,\n point: IVSChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n this._onRectFocusHover(xAxisPoint, point, color, mouseEvent);\n }\n\n private _onRectFocusHover(\n xAxisPoint: string,\n point: IVSChartDataPoint,\n color: string,\n refSelected: React.MouseEvent<SVGElement> | SVGGElement,\n ): void {\n if (this._calloutAnchorPoint?.chartDataPoint !== point || this._calloutAnchorPoint?.xAxisDataPoint !== xAxisPoint) {\n this._calloutAnchorPoint = {\n chartDataPoint: point,\n xAxisDataPoint: xAxisPoint,\n };\n this.setState({\n refSelected,\n /**\n * Show the callout if highlighted bar is focused/hovered\n * and Hide it if unhighlighted bar is focused/hovered\n */\n isCalloutVisible: this.state.selectedLegend === '' || this.state.selectedLegend === point.legend,\n calloutLegend: point.legend,\n dataForHoverCard: point.data,\n color,\n xCalloutValue: point.xAxisCalloutData ? point.xAxisCalloutData : xAxisPoint,\n yCalloutValue: point.yAxisCalloutData,\n dataPointCalloutProps: point,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n }\n\n private _lineHover = (lineData: LinePoint, mouseEvent: React.MouseEvent<SVGElement>) => {\n mouseEvent.persist();\n this.setState({\n refSelected: mouseEvent,\n isCalloutVisible: true,\n xCalloutValue: `${lineData.xItem.xAxisPoint}`,\n yCalloutValue: `${lineData.yAxisCalloutData || lineData.data || lineData.y}`,\n activeXAxisDataPoint: lineData.xItem.xAxisPoint,\n color: lineData.color,\n });\n };\n\n private _lineHoverOut = () => {\n this.setState({\n refSelected: null,\n isCalloutVisible: false,\n xCalloutValue: '',\n yCalloutValue: '',\n activeXAxisDataPoint: '',\n color: '',\n });\n };\n\n private _onStackHover(stack: IVerticalStackedChartProps, mouseEvent: React.MouseEvent<SVGElement>): void {\n mouseEvent.persist();\n this._onStackHoverFocus(stack, mouseEvent);\n }\n\n private _onStackHoverFocus(\n stack: IVerticalStackedChartProps,\n refSelected: React.MouseEvent<SVGElement> | SVGGElement,\n ): void {\n const lineData = stack.lineData;\n const isLinesPresent: boolean = lineData !== undefined && lineData.length > 0;\n if (isLinesPresent) {\n lineData!.forEach((item: ILineDataInVerticalStackedBarChart & { shouldDrawBorderBottom?: boolean }) => {\n item.data = item.data || item.y;\n item.shouldDrawBorderBottom = true;\n });\n }\n this.setState({\n refSelected,\n isCalloutVisible: true,\n YValueHover: isLinesPresent\n ? [...lineData!.sort((a, b) => (a.data! < b.data! ? 1 : -1)), ...stack.chartData.slice().reverse()]\n : stack.chartData.slice().reverse(),\n hoverXValue: stack.xAxisPoint instanceof Date ? stack.xAxisPoint.toLocaleDateString() : stack.xAxisPoint,\n stackCalloutProps: stack,\n activeXAxisDataPoint: stack.xAxisPoint,\n callOutAccessibilityData: stack.stackCallOutAccessibilityData,\n });\n }\n\n private _onRectFocus(point: IVSChartDataPoint, xAxisPoint: string, color: string, ref: IRefArrayData): void {\n if (ref.refElement) {\n this._onRectFocusHover(xAxisPoint, point, color, ref.refElement);\n }\n }\n\n private _onStackFocus(stack: IVerticalStackedChartProps, groupRef: IRefArrayData): void {\n if (groupRef.refElement) {\n this._onStackHoverFocus(stack, groupRef.refElement);\n }\n }\n\n private _handleMouseOut = (): void => {\n /**/\n };\n\n private _handleChartMouseLeave = (): void => {\n this._calloutAnchorPoint = null;\n this.setState({\n isCalloutVisible: false,\n activeXAxisDataPoint: '',\n });\n };\n\n private _onClick(\n data: IVerticalStackedChartProps | IVSChartDataPoint,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n this.props.onBarClick?.(mouseEvent, data);\n this.props.href ? (window.location.href = this.props.href) : '';\n }\n\n private _getBarGapAndScale(\n bars: IVSChartDataPoint[],\n yBarScale: NumericScale,\n defaultTotalHeight?: number,\n ): {\n readonly gapHeight: number;\n readonly heightValueScale: number;\n } {\n const { barGapMax = 0 } = this.props;\n\n // When displaying gaps between the bars, the height of each bar is\n // adjusted so that the total of all bars is not changed by the gaps\n const totalData = bars.reduce((iter, value) => iter + value.data, 0);\n const totalHeight = defaultTotalHeight ?? yBarScale(totalData);\n const gaps = barGapMax && bars.length - 1;\n const gapHeight = gaps && Math.max(barGapMin, Math.min(barGapMax, (totalHeight * barGapMultiplier) / gaps));\n const heightValueScale = (totalHeight - gapHeight * gaps) / totalData;\n\n return {\n gapHeight,\n heightValueScale,\n } as const;\n }\n\n private _createBar = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xBarScale: any,\n yBarScale: NumericScale,\n containerHeight: number,\n xElement: SVGElement,\n ): JSX.Element[] => {\n const { barCornerRadius = 0, barMinimumHeight = 0 } = this.props;\n const _isHavingLines = this.props.data.some(\n (item: IVerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = this._toFocusWholeStack(_isHavingLines);\n\n if (this._xAxisType === XAxisTypes.StringAxis) {\n // Setting the bar width here is safe because there are no dependencies earlier in the code\n // that rely on the width of bars in vertical bar charts with string x-axis.\n this._barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth, xBarScale.bandwidth());\n }\n\n const bars = this._points.map((singleChartData: IVerticalStackedChartProps, indexNumber: number) => {\n let yPoint = containerHeight - this.margins.bottom!;\n const xPoint = xBarScale(\n this._xAxisType === XAxisTypes.NumericAxis\n ? (singleChartData.xAxisPoint as number)\n : this._xAxisType === XAxisTypes.DateAxis\n ? (singleChartData.xAxisPoint as Date)\n : (singleChartData.xAxisPoint as string),\n );\n const xScaleBandwidthTranslate =\n this._xAxisType !== XAxisTypes.StringAxis ? -this._barWidth / 2 : (xBarScale.bandwidth() - this._barWidth) / 2;\n\n let barTotalValue = 0;\n\n // Removing datapoints with zero data\n const barsToDisplay = singleChartData.chartData.filter(point => point.data > 0);\n\n if (!barsToDisplay.length) {\n return undefined;\n }\n\n const { gapHeight, heightValueScale } = this._getBarGapAndScale(barsToDisplay, yBarScale);\n\n if (heightValueScale < 0) {\n return undefined;\n }\n\n const singleBar = barsToDisplay.map((point: IVSChartDataPoint, index: number) => {\n const color = point.color ? point.color : this._colors[index];\n const ref: IRefArrayData = {};\n\n const shouldHighlight = this._legendHighlighted(point.legend) || this._noLegendHighlighted() ? true : false;\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n shouldHighlight: shouldHighlight,\n href: this.props.href,\n });\n const rectFocusProps = !shouldFocusWholeStack && {\n 'data-is-focusable': !this.props.hideTooltip && shouldHighlight,\n 'aria-label': this._getAriaLabel(singleChartData, point),\n onMouseOver: this._onRectHover.bind(this, singleChartData.xAxisPoint, point, color),\n onMouseMove: this._onRectHover.bind(this, singleChartData.xAxisPoint, point, color),\n onMouseLeave: this._handleMouseOut,\n onFocus: this._onRectFocus.bind(this, point, singleChartData.xAxisPoint, color, ref),\n onBlur: this._handleMouseOut,\n onClick: this._onClick.bind(this, point),\n role: 'img',\n };\n\n let barHeight = heightValueScale * point.data;\n if (barHeight < Math.max(Math.ceil((heightValueScale * this._yMax) / 100.0), barMinimumHeight)) {\n barHeight = Math.max(Math.ceil((heightValueScale * this._yMax) / 100.0), barMinimumHeight);\n }\n yPoint = yPoint - barHeight - (index ? gapHeight : 0);\n barTotalValue += point.data;\n\n // If set, apply the corner radius to the top of the final bar\n if (barCornerRadius && barHeight > barCornerRadius && index === barsToDisplay.length - 1) {\n return (\n <path\n key={index + indexNumber + `${shouldFocusWholeStack}`}\n className={this._classNames.opacityChangeOnHover}\n d={`\n M ${xPoint} ${yPoint + barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${-barCornerRadius}\n h ${this._barWidth - 2 * barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${barCornerRadius}\n v ${barHeight - barCornerRadius}\n h ${-this._barWidth}\n z\n `}\n fill={color}\n ref={e => (ref.refElement = e)}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n {...rectFocusProps}\n />\n );\n }\n if (barHeight < 0) {\n return <React.Fragment key={index + indexNumber}> </React.Fragment>;\n }\n return (\n <rect\n key={index + indexNumber}\n className={this._classNames.opacityChangeOnHover}\n x={xPoint}\n y={yPoint}\n width={this._barWidth}\n height={barHeight}\n fill={color}\n ref={e => (ref.refElement = e)}\n {...rectFocusProps}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />\n );\n });\n const groupRef: IRefArrayData = {};\n const stackFocusProps = shouldFocusWholeStack && {\n 'data-is-focusable': !this.props.hideTooltip,\n 'aria-label': this._getAriaLabel(singleChartData),\n onMouseOver: this._onStackHover.bind(this, singleChartData),\n onMouseMove: this._onStackHover.bind(this, singleChartData),\n onMouseLeave: this._handleMouseOut,\n onFocus: this._onStackFocus.bind(this, singleChartData, groupRef),\n onBlur: this._handleMouseOut,\n onClick: this._onClick.bind(this, singleChartData),\n role: 'img',\n };\n let showLabel = false;\n let barLabel = 0;\n if (!this.props.hideLabels) {\n if (this._noLegendHighlighted()) {\n showLabel = true;\n barLabel = barTotalValue;\n } else {\n barsToDisplay.forEach(point => {\n if (this._legendHighlighted(point.legend)) {\n showLabel = true;\n barLabel += point.data;\n }\n });\n }\n }\n return (\n <g key={indexNumber + `${shouldFocusWholeStack}`}>\n <g id={`${indexNumber}-singleBar`} ref={e => (groupRef.refElement = e)} {...stackFocusProps}>\n {singleBar}\n </g>\n {!this.props.hideLabels && this._barWidth >= 16 && showLabel && (\n <text\n x={xPoint + this._barWidth / 2}\n y={yPoint - 6}\n textAnchor=\"middle\"\n className={this._classNames.barLabel}\n aria-label={`Total: ${barLabel}`}\n role=\"img\"\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n >\n {formatValueWithSIPrefix(barLabel)}\n </text>\n )}\n </g>\n );\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(xBarScale);\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: this._classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return bars.filter((bar): bar is JSX.Element => !!bar);\n };\n\n private _getScales = (containerHeight: number, containerWidth: number) => {\n const yMax = this._yMax;\n const yBarScale = d3ScaleLinear()\n .domain([0, yMax])\n .range([0, containerHeight - this.margins.bottom! - this.margins.top!]);\n if (this._xAxisType === XAxisTypes.NumericAxis) {\n const xMax = d3Max(this._dataset, (point: IVerticalStackedBarDataPoint) => point.x as number)!;\n const xMin = d3Min(this._dataset, (point: IVerticalStackedBarDataPoint) => point.x as number)!;\n\n const xBarScale = d3ScaleLinear()\n .domain(this._isRtl ? [xMax, xMin] : [xMin, xMax])\n .nice()\n .range([this.margins.left! + this._domainMargin, containerWidth - this.margins.right! - this._domainMargin]);\n\n return { xBarScale, yBarScale };\n }\n if (this._xAxisType === XAxisTypes.DateAxis) {\n const sDate = d3Min(this._dataset, (point: IVerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const lDate = d3Max(this._dataset, (point: IVerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const xBarScale = d3ScaleUtc()\n .domain(this._isRtl ? [lDate, sDate] : [sDate, lDate])\n .range([this.margins.left! + this._domainMargin, containerWidth - this.margins.right! - this._domainMargin]);\n\n return { xBarScale, yBarScale };\n }\n const xBarScale = d3ScaleBand()\n .domain(this._xAxisLabels)\n .range(\n this._isRtl\n ? [containerWidth - this.margins.right! - this._domainMargin, this.margins.left! + this._domainMargin]\n : [this.margins.left! + this._domainMargin, containerWidth - this.margins.right! - this._domainMargin],\n )\n .paddingInner(this._xAxisInnerPadding)\n .paddingOuter(this._xAxisOuterPadding);\n\n return { xBarScale, yBarScale };\n };\n\n private _getGraphData = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale: any,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) => {\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth);\n return (this._bars = this._createBar(xBarScale, yBarScale, containerHeight, xElement!));\n };\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _getAxisData = (yAxisData: IAxisData) => {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n this._yMax = Math.max(domainValue[domainValue.length - 1], this.props.yMaxValue || 0);\n }\n };\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legendTitle: string) => {\n return (\n this.state.selectedLegend === legendTitle ||\n (this.state.selectedLegend === '' && this.state.activeLegend === legendTitle)\n );\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this.state.selectedLegend === '' && this.state.activeLegend === '';\n };\n\n private _getAriaLabel = (singleChartData: IVerticalStackedChartProps, point?: IVSChartDataPoint): string => {\n if (!point) {\n /** if shouldFocusWholeStack is true */\n const xValue = singleChartData.xAxisCalloutData || singleChartData.xAxisPoint;\n const pointValues = singleChartData.chartData\n .map(pt => {\n const legend = pt.legend;\n const yValue = pt.yAxisCalloutData || pt.data;\n return `${legend}, ${yValue}.`;\n })\n .join(' ');\n const lineValues = singleChartData.lineData\n ?.map(ln => {\n const legend = ln.legend;\n const yValue = ln.yAxisCalloutData || ln.data || ln.y;\n return `${legend}, ${yValue}.`;\n })\n .join(' ');\n return (\n singleChartData.stackCallOutAccessibilityData?.ariaLabel ||\n `${xValue}. ${pointValues}` + (lineValues ? ` ${lineValues}` : '')\n );\n }\n /** if shouldFocusWholeStack is false */\n const xValue = singleChartData.xAxisCalloutData || point.xAxisCalloutData || singleChartData.xAxisPoint;\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.data;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n };\n\n private _getDomainMargins = (containerWidth: number): IMargins => {\n this._domainMargin = MIN_DOMAIN_MARGIN;\n\n /** Total width available to render the bars */\n const totalWidth =\n containerWidth - (this.margins.left! + MIN_DOMAIN_MARGIN) - (this.margins.right! + MIN_DOMAIN_MARGIN);\n\n if (this._xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(this.props.xAxisOuterPadding, this.props.xAxisPadding)) {\n // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available\n // to adjust the space before the first bar and after the last bar.\n this._domainMargin = 0;\n } else if (this.props.barWidth !== 'auto') {\n /** Rate at which the space between the bars changes wrt the bar width */\n const barGapRate = this._xAxisInnerPadding / (1 - this._xAxisInnerPadding);\n // Update the bar width so that when CartesianChart rerenders,\n // the following calculations don't use the previous bar width.\n this._barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth);\n /** Total width required to render the bars. Directly proportional to bar width */\n const reqWidth = (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * barGapRate) * this._barWidth;\n\n if (totalWidth >= reqWidth) {\n // Center align the chart by setting equal left and right margins for domain\n this._domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;\n }\n }\n } else {\n const data = (this.props.data?.map(point => point.xAxisPoint) as number[] | Date[] | undefined) || [];\n this._barWidth = getBarWidth(\n this.props.barWidth,\n this.props.maxBarWidth,\n calculateAppropriateBarWidth(data, totalWidth),\n );\n this._domainMargin = MIN_DOMAIN_MARGIN + this._barWidth / 2;\n }\n\n return {\n ...this.margins,\n left: this.margins.left! + this._domainMargin,\n right: this.margins.right! + this._domainMargin,\n };\n };\n\n private _isChartEmpty(): boolean {\n return !(\n this.props.data &&\n this.props.data.length > 0 &&\n this.props.data.filter(item => item.chartData.length === 0).length === 0\n );\n }\n}\n"]}
|
package/lib/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Do not modify this file; it is generated as part of publish.
|
|
2
2
|
// The checked in version is a placeholder only and will not be updated.
|
|
3
3
|
import { setVersion } from '@fluentui/set-version';
|
|
4
|
-
setVersion('@fluentui/react-charting', '5.21.
|
|
4
|
+
setVersion('@fluentui/react-charting', '5.21.1');
|
|
5
5
|
//# sourceMappingURL=version.js.map
|
package/lib/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"../src/","sources":["version.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,wEAAwE;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,UAAU,CAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["// Do not modify this file; it is generated as part of publish.\n// The checked in version is a placeholder only and will not be updated.\nimport { setVersion } from '@fluentui/set-version';\nsetVersion('@fluentui/react-charting', '5.21.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"../src/","sources":["version.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,wEAAwE;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,UAAU,CAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["// Do not modify this file; it is generated as part of publish.\n// The checked in version is a placeholder only and will not be updated.\nimport { setVersion } from '@fluentui/set-version';\nsetVersion('@fluentui/react-charting', '5.21.1');"]}
|
|
@@ -60,7 +60,7 @@ define(["require", "exports", "tslib", "react", "d3-shape", "@fluentui/react/lib
|
|
|
60
60
|
var opacity = this.props.activeArc === this.props.data.data.legend || this.props.activeArc === '' ? 1 : 0.1;
|
|
61
61
|
return (React.createElement("g", { ref: this.currentRef },
|
|
62
62
|
!!focusedArcId && focusedArcId === id && (React.createElement("path", { id: id + 'focusRing', d: arc(this.props.focusData), className: classNames.focusRing })),
|
|
63
|
-
React.createElement("path", { id: id, d: arc(this.props.data), onFocus: this._onFocus.bind(this, this.props.data.data, id), className: classNames.root, "data-is-focusable":
|
|
63
|
+
React.createElement("path", { id: id, d: arc(this.props.data), onFocus: this._onFocus.bind(this, this.props.data.data, id), className: classNames.root, "data-is-focusable": this.props.activeArc === this.props.data.data.legend || this.props.activeArc === '', onMouseOver: this._hoverOn.bind(this, this.props.data.data), onMouseMove: this._hoverOn.bind(this, this.props.data.data), onMouseLeave: this._hoverOff, onBlur: this._onBlur, opacity: opacity, onClick: href ? this._redirectToUrl.bind(this, href) : (_a = this.props.data) === null || _a === void 0 ? void 0 : _a.data.onClick, "aria-label": this._getAriaLabel(), role: "img" }),
|
|
64
64
|
this._renderArcLabel(classNames.arcLabel)));
|
|
65
65
|
};
|
|
66
66
|
Arc.prototype._onFocus = function (data, id) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Arc.js","sourceRoot":"../src/","sources":["components/DonutChart/Arc/Arc.tsx"],"names":[],"mappings":";;;;IAaA;QAAyB,+BAAqC;QAA9D;YAAA,qEAmHC;YA9GQ,WAAK,GAAO,EAAE,CAAC;YAEd,gBAAU,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAC;YAC/C,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;YAwD3B,eAAS,GAAG;gBAClB,KAAI,CAAC,KAAK,CAAC,kBAAmB,EAAE,CAAC;YACnC,CAAC,CAAC;YAEM,aAAO,GAAG;gBAChB,KAAI,CAAC,KAAK,CAAC,cAAe,EAAE,CAAC;YAC/B,CAAC,CAAC;YAMM,mBAAa,GAAG;;gBACtB,IAAM,KAAK,GAAG,KAAI,CAAC,KAAK,CAAC,IAAK,CAAC,IAAI,CAAC;gBACpC,IAAM,MAAM,GAAG,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,MAAM,CAAC;gBACtD,IAAM,MAAM,GAAG,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC;gBACzD,OAAO,CAAA,MAAA,KAAK,CAAC,wBAAwB,0CAAE,SAAS,KAAI,CAAC,MAAM,CAAC,CAAC,CAAC,UAAG,MAAM,OAAI,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,UAAG,MAAM,MAAG,CAAC;YACnG,CAAC,CAA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CAAC,eAAgB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAChD,CAAC;QAUO,4BAAc,GAAtB,UAAuB,IAAwB;YAC7C,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5C,CAAC;QAzEa,gBAAY,GAAuB;YAC/C,GAAG,EAAE,IAAA,cAAK,GAAE;SACb,CAAC;QAgHJ,UAAC;KAAA,AAnHD,CAAyB,KAAK,CAAC,SAAS,GAmHvC;IAnHY,kBAAG;IAqHhB,SAAS,YAAY,CAAC,QAAmB;QACvC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAC/C,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACjD,CAAC","sourcesContent":["import * as React from 'react';\nimport { arc as d3Arc } from 'd3-shape';\nimport { classNamesFunction, getRTL } from '@fluentui/react/lib/Utilities';\nimport { getStyles } from './Arc.styles';\nimport { IChartDataPoint } from '../index';\nimport { IArcProps, IArcStyles } from './index';\nimport { format as d3Format } from 'd3-format';\nimport { formatValueWithSIPrefix } from '../../../utilities/index';\n\nexport interface IArcState {\n isCalloutVisible?: boolean;\n}\n\nexport class Arc extends React.Component<IArcProps, IArcState> {\n public static defaultProps: Partial<IArcProps> = {\n arc: d3Arc(),\n };\n\n public state: {} = {};\n\n private currentRef = React.createRef<SVGPathElement>();\n private _isRTL: boolean = getRTL();\n\n public static getDerivedStateFromProps(nextProps: Readonly<IArcProps>): Partial<IArcState> | null {\n _updateChart(nextProps);\n return null;\n }\n\n public updateChart(newProps: IArcProps): void {\n _updateChart(newProps);\n }\n\n public render(): JSX.Element {\n const { arc, href, focusedArcId } = this.props;\n const getClassNames = classNamesFunction<IArcProps, IArcStyles>();\n const classNames = getClassNames(getStyles, {\n color: this.props.color,\n href: href!,\n theme: this.props.theme!,\n });\n const id = this.props.uniqText! + this.props.data!.data.legend!.replace(/\\s+/, '') + this.props.data!.data.data;\n const opacity: number =\n this.props.activeArc === this.props.data!.data.legend || this.props.activeArc === '' ? 1 : 0.1;\n return (\n <g ref={this.currentRef}>\n {!!focusedArcId && focusedArcId === id && (\n <path id={id + 'focusRing'} d={arc(this.props.focusData)} className={classNames.focusRing} />\n )}\n <path\n id={id}\n d={arc(this.props.data)}\n onFocus={this._onFocus.bind(this, this.props.data!.data, id)}\n className={classNames.root}\n data-is-focusable={this.props.activeArc === this.props.data!.data.legend || this.props.activeArc === ''}\n onMouseOver={this._hoverOn.bind(this, this.props.data!.data)}\n onMouseMove={this._hoverOn.bind(this, this.props.data!.data)}\n onMouseLeave={this._hoverOff}\n onBlur={this._onBlur}\n opacity={opacity}\n onClick={href ? this._redirectToUrl.bind(this, href) : this.props.data?.data.onClick}\n aria-label={this._getAriaLabel()}\n role=\"img\"\n />\n {this._renderArcLabel(classNames.arcLabel)}\n </g>\n );\n }\n\n private _onFocus(data: IChartDataPoint, id: string): void {\n this.props.onFocusCallback!(data, id, this.currentRef.current);\n }\n\n private _hoverOn(data: IChartDataPoint, mouseEvent: React.MouseEvent<SVGPathElement>): void {\n mouseEvent.persist();\n this.props.hoverOnCallback!(data, mouseEvent);\n }\n\n private _hoverOff = (): void => {\n this.props.hoverLeaveCallback!();\n };\n\n private _onBlur = (): void => {\n this.props.onBlurCallback!();\n };\n\n private _redirectToUrl(href: string | undefined): void {\n href ? (window.location.href = href) : '';\n }\n\n private _getAriaLabel = (): string => {\n const point = this.props.data!.data;\n const legend = point.xAxisCalloutData || point.legend;\n const yValue = point.yAxisCalloutData || point.data || 0;\n return point.callOutAccessibilityData?.ariaLabel || (legend ? `${legend}, ` : '') + `${yValue}.`;\n };\n\n private _renderArcLabel = (className: string) => {\n const { arc, data, innerRadius, outerRadius, showLabelsInPercent, totalValue, hideLabels, activeArc } = this.props;\n\n if (\n hideLabels ||\n Math.abs(data!.endAngle - data!.startAngle) < Math.PI / 12 ||\n (activeArc !== data!.data.legend && activeArc !== '')\n ) {\n return null;\n }\n\n const [base, perp] = arc.centroid(data);\n const hyp = Math.sqrt(base * base + perp * perp);\n const labelRadius = Math.max(innerRadius!, outerRadius!) + 2;\n const angle = (data!.startAngle + data!.endAngle) / 2;\n const arcValue = data!.value;\n\n return (\n <text\n x={(hyp === 0 ? 0 : base / hyp) * labelRadius}\n y={(hyp === 0 ? 0 : perp / hyp) * labelRadius}\n textAnchor={angle > Math.PI !== this._isRTL ? 'end' : 'start'}\n dominantBaseline={angle > Math.PI / 2 && angle < (3 * Math.PI) / 2 ? 'hanging' : 'auto'}\n className={className}\n aria-hidden={true}\n >\n {showLabelsInPercent\n ? d3Format('.0%')(totalValue! === 0 ? 0 : arcValue / totalValue!)\n : formatValueWithSIPrefix(arcValue)}\n </text>\n );\n };\n}\n\nfunction _updateChart(newProps: IArcProps): void {\n newProps.arc.innerRadius(newProps.innerRadius);\n newProps.arc.outerRadius(newProps.outerRadius);\n}\n"]}
|
|
@@ -42,7 +42,7 @@ define(["require", "exports", "tslib", "react", "d3-shape", "../Arc/index", "@fl
|
|
|
42
42
|
this._totalValue = this._computeTotalValue();
|
|
43
43
|
return (React.createElement("g", { transform: translate },
|
|
44
44
|
piechart.map(function (d, i) { return _this.arcGenerator(d, i, focusData[i], _this.props.href); }),
|
|
45
|
-
this.props.valueInsideDonut && (React.createElement("text", { y: 5, textAnchor: "middle", dominantBaseline: "middle", className: classNames.insideDonutString
|
|
45
|
+
this.props.valueInsideDonut && (React.createElement("text", { y: 5, textAnchor: "middle", dominantBaseline: "middle", className: classNames.insideDonutString }, this.props.valueInsideDonut))));
|
|
46
46
|
};
|
|
47
47
|
Pie.prototype.componentDidUpdate = function () {
|
|
48
48
|
var classNames = getClassNames(Pie_styles_1.getStyles, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pie.js","sourceRoot":"../src/","sources":["components/DonutChart/Pie/Pie.tsx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QAAQ,CAAC,IAAI,CAAC;SAClB,CAAC;QA0FJ,UAAC;KAAA,AAjGD,CAAyB,KAAK,CAAC,SAAS,GAiGvC;IAjGY,kBAAG","sourcesContent":["import * as React from 'react';\nimport { pie as d3Pie } from 'd3-shape';\nimport { IPieProps, IPieStyleProps, IPieStyles } from './index';\nimport { Arc, IArcData } from '../Arc/index';\nimport { IChartDataPoint } from '../index';\nimport { classNamesFunction } from '@fluentui/react/lib/Utilities';\nimport { getStyles } from './Pie.styles';\nimport { wrapTextInsideDonut } from '../../../utilities/index';\n\nconst getClassNames = classNamesFunction<IPieStyleProps, IPieStyles>();\nconst TEXT_PADDING: number = 5;\n\nexport class Pie extends React.Component<IPieProps, {}> {\n public static defaultProps: Partial<IPieProps> = {\n pie: d3Pie()\n .sort(null)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .value((d: any) => d.data)\n .padAngle(0.02),\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _pieForFocusRing: any;\n private _totalValue: number;\n\n constructor(props: IPieProps) {\n super(props);\n this._hoverCallback = this._hoverCallback.bind(this);\n this._pieForFocusRing = d3Pie()\n .sort(null)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .value((d: any) => d.data)\n .padAngle(0);\n }\n\n public arcGenerator = (d: IArcData, i: number, focusData: IArcData, href?: string): JSX.Element => {\n const color = d && d.data && d.data.color;\n return (\n <Arc\n key={i}\n data={d}\n focusData={focusData}\n innerRadius={this.props.innerRadius}\n outerRadius={this.props.outerRadius}\n color={color!}\n onFocusCallback={this._focusCallback}\n hoverOnCallback={this._hoverCallback}\n onBlurCallback={this.props.onBlurCallback}\n hoverLeaveCallback={this.props.hoverLeaveCallback}\n uniqText={this.props.uniqText}\n activeArc={this.props.activeArc}\n href={href}\n calloutId={this.props.calloutId}\n valueInsideDonut={this.props.valueInsideDonut}\n theme={this.props.theme!}\n focusedArcId={this.props.focusedArcId}\n showLabelsInPercent={this.props.showLabelsInPercent}\n totalValue={this._totalValue}\n hideLabels={this.props.hideLabels}\n />\n );\n };\n\n public render(): JSX.Element {\n const { pie, data } = this.props;\n const focusData = this._pieForFocusRing(data);\n const piechart = pie(data);\n const translate = `translate(${this.props.width / 2}, ${this.props.height / 2})`;\n const classNames = getClassNames(getStyles, {\n theme: this.props.theme!,\n });\n\n this._totalValue = this._computeTotalValue();\n\n return (\n <g transform={translate}>\n {piechart.map((d: IArcData, i: number) => this.arcGenerator(d, i, focusData[i], this.props.href))}\n {this.props.valueInsideDonut && (\n <text y={5} textAnchor=\"middle\" dominantBaseline=\"middle\" className={classNames.insideDonutString}>\n {this.props.valueInsideDonut}\n </text>\n )}\n </g>\n );\n }\n\n public componentDidUpdate(): void {\n const classNames = getClassNames(getStyles, {\n theme: this.props.theme!,\n });\n\n wrapTextInsideDonut(classNames.insideDonutString, this.props.innerRadius! * 2 - TEXT_PADDING);\n }\n\n private _focusCallback = (data: IChartDataPoint, id: string, e: SVGPathElement): void => {\n this.props.onFocusCallback!(data, id, e);\n };\n\n private _hoverCallback(data: IChartDataPoint, e: React.MouseEvent<SVGPathElement>): void {\n this.props.hoverOnCallback!(data, e);\n }\n\n private _computeTotalValue = () => {\n let totalValue = 0;\n this.props.data.forEach((arc: IChartDataPoint) => {\n totalValue += arc.data!;\n });\n return totalValue;\n };\n}\n"]}
|
|
@@ -324,7 +324,7 @@ define(["require", "exports", "tslib", "react", "d3-shape", "@fluentui/react/lib
|
|
|
324
324
|
React.createElement("text", { x: (this._isRTL ? -1 : 1) * (this._outerRadius + LABEL_OFFSET), y: 0, textAnchor: "start", className: this._classNames.limits, role: "img", "aria-label": "Max value: ".concat(this._maxValue) }, (0, index_1.formatValueWithSIPrefix)(this._maxValue)))),
|
|
325
325
|
arcs.map(function (arc, index) {
|
|
326
326
|
var segment = _this._segments[arc.segmentIndex];
|
|
327
|
-
return (React.createElement("path", tslib_1.__assign({ key: index, d: arc.d, fill: segment.color, fillOpacity: _this._legendHighlighted(segment.legend) || _this._noLegendHighlighted() ? 1 : 0.1, strokeWidth: _this.state.focusedElement === segment.legend ? exports.ARC_PADDING : 0, className: _this._classNames.segment }, (0, index_1.getAccessibleDataObject)(tslib_1.__assign({ ariaLabel: (0, exports.getSegmentLabel)(segment, _this._minValue, _this._maxValue, _this.props.variant, true) }, segment.accessibilityData), 'img', true), { onFocus: function (e) { return _this._handleFocus(e, segment.legend); }, onBlur: _this._handleBlur, onMouseEnter: function (e) { return _this._handleMouseOver(e, segment.legend); }, onMouseMove: function (e) { return _this._handleMouseOver(e, segment.legend); } })));
|
|
327
|
+
return (React.createElement("path", tslib_1.__assign({ key: index, d: arc.d, fill: segment.color, fillOpacity: _this._legendHighlighted(segment.legend) || _this._noLegendHighlighted() ? 1 : 0.1, strokeWidth: _this.state.focusedElement === segment.legend ? exports.ARC_PADDING : 0, className: _this._classNames.segment }, (0, index_1.getAccessibleDataObject)(tslib_1.__assign({ ariaLabel: (0, exports.getSegmentLabel)(segment, _this._minValue, _this._maxValue, _this.props.variant, true) }, segment.accessibilityData), 'img', true), { onFocus: function (e) { return _this._handleFocus(e, segment.legend); }, onBlur: _this._handleBlur, onMouseEnter: function (e) { return _this._handleMouseOver(e, segment.legend); }, onMouseMove: function (e) { return _this._handleMouseOver(e, segment.legend); }, "data-is-focusable": _this._legendHighlighted(segment.legend) || _this._noLegendHighlighted() })));
|
|
328
328
|
}),
|
|
329
329
|
this._renderNeedle(),
|
|
330
330
|
React.createElement("g", { onMouseEnter: function (e) { return _this._handleMouseOver(e, 'Chart value'); }, onMouseMove: function (e) { return _this._handleMouseOver(e, 'Chart value'); } },
|