@fluentui/react-charting 5.23.97 → 5.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +36 -1
- package/CHANGELOG.md +17 -2
- package/dist/react-charting.d.ts +16 -7
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +9 -7
- package/lib/components/AreaChart/AreaChart.base.js +7 -4
- package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.base.d.ts +1 -2
- package/lib/components/CommonComponents/CartesianChart.base.js +31 -27
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.d.ts +2 -2
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +3 -2
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +1 -0
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +10 -8
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.js +2 -2
- package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.base.js +6 -4
- package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.base.js +9 -9
- package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +2 -2
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.js +2 -2
- package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js +7 -7
- package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.base.js +8 -5
- package/lib/components/LineChart/LineChart.base.js.map +1 -1
- package/lib/components/PieChart/Arc/Arc.js +3 -3
- package/lib/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +5 -5
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib/components/StackedBarChart/StackedBarChart.base.js +3 -5
- package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js +16 -7
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +4 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +155 -40
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +9 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib/types/IDataPoint.d.ts +5 -5
- package/lib/types/IDataPoint.js.map +1 -1
- package/lib/utilities/ChartHoverCard/ChartHoverCard.base.js +5 -5
- package/lib/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -1
- package/lib/utilities/utilities.d.ts +3 -6
- package/lib/utilities/utilities.js +22 -49
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-amd/components/AreaChart/AreaChart.base.js +6 -4
- package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.base.d.ts +1 -2
- package/lib-amd/components/CommonComponents/CartesianChart.base.js +31 -27
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +2 -2
- package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +2 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +1 -0
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +15 -12
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.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/DonutChart.base.js +5 -3
- package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-amd/components/GaugeChart/GaugeChart.base.js +8 -8
- 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 +2 -2
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js +6 -6
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.base.js +7 -5
- package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-amd/components/PieChart/Arc/Arc.js +3 -3
- package/lib-amd/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +4 -4
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +3 -5
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +15 -7
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +4 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +154 -40
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +9 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib-amd/types/IDataPoint.d.ts +5 -5
- package/lib-amd/types/IDataPoint.js.map +1 -1
- package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.base.js +5 -5
- package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -1
- package/lib-amd/utilities/utilities.d.ts +3 -6
- package/lib-amd/utilities/utilities.js +25 -55
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.js +6 -3
- package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.d.ts +1 -2
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +31 -27
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +2 -2
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +2 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +1 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +15 -12
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.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/DonutChart.base.js +5 -3
- package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +8 -8
- 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 +2 -2
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js +6 -6
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.js +7 -4
- package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-commonjs/components/PieChart/Arc/Arc.js +3 -3
- package/lib-commonjs/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +4 -4
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js +3 -5
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +15 -6
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +4 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +154 -39
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +9 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib-commonjs/types/IDataPoint.d.ts +5 -5
- package/lib-commonjs/types/IDataPoint.js.map +1 -1
- package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.base.js +5 -5
- package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -1
- package/lib-commonjs/utilities/utilities.d.ts +3 -6
- package/lib-commonjs/utilities/utilities.js +26 -55
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +2 -2
- package/src/components/CommonComponents/CartesianChart.types.ts +2 -1
- package/src/components/VerticalStackedBarChart/VerticalStackedBarChart.types.ts +11 -0
- package/lib/utilities/locale-util.d.ts +0 -3
- package/lib/utilities/locale-util.js +0 -18
- package/lib/utilities/locale-util.js.map +0 -1
- package/lib-amd/utilities/locale-util.d.ts +0 -3
- package/lib-amd/utilities/locale-util.js +0 -24
- package/lib-amd/utilities/locale-util.js.map +0 -1
- package/lib-commonjs/utilities/locale-util.d.ts +0 -3
- package/lib-commonjs/utilities/locale-util.js +0 -22
- package/lib-commonjs/utilities/locale-util.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupedVerticalBarChart.base.js","sourceRoot":"../src/","sources":["components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAC/B,qCAAsD;AACtD,6CAAkD;AAElD,qCAA+F;AAC/F,2DAOuC;AAEvC,uDAA8D;AAC9D,qDAA2D;AAC3D,+CAoB+B;AAC/B,qCAYqB;AAErB,yEAA6D;AAE7D,qCAA+B;AAE/B,IAAM,cAAc,GAAG,4BAA4B,CAAC;AACpD,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAsE,CAAC;AAI/G,IAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,IAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,2EAA2E;AAC3E,kFAAkF;AAClF,oFAAoF;AACpF,IAAM,YAAY,GAAG,gBAAgB,GAAG,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC;AAC/D,IAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,IAAM,cAAc,GAAG,CAAC,CA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'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { select as d3Select } from 'd3-selection';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { scaleLinear as d3ScaleLinear, ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\nimport {\n classNamesFunction,\n getId,\n getRTL,\n initializeComponentRef,\n memoizeFunction,\n warnDeprecations,\n} from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n tooltipOfAxislabels,\n XAxisTypes,\n getTypeOfAxis,\n formatValueLimitWidth,\n getScalePadding,\n getBarWidth,\n isScalePaddingDefined,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfXStringAxis,\n createStringYAxis,\n getNextGradient,\n getNextColor,\n areArraysEqual,\n calculateLongestLabelWidth,\n YAxisType,\n} from '../../utilities/index';\nimport {\n IAccessibilityProps,\n CartesianChart,\n ILegend,\n IGroupedVerticalBarChartData,\n IGroupedVerticalBarChartProps,\n IGroupedVerticalBarChartStyleProps,\n IGroupedVerticalBarChartStyles,\n IGVBarChartSeriesPoint,\n IMargins,\n IBasestate,\n Legends,\n} from '../../index';\nimport { IChart, IImageExportOptions } from '../../types/index';\nimport { toImage } from '../../utilities/image-export-utils';\nimport { ILegendContainer } from '../Legends/index';\nimport { rgb } from 'd3-color';\n\nconst COMPONENT_NAME = 'GROUPED VERTICAL BAR CHART';\nconst getClassNames = classNamesFunction<IGroupedVerticalBarChartStyleProps, IGroupedVerticalBarChartStyles>();\ntype StringAxis = D3Axis<string>;\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\n\nconst MIN_DOMAIN_MARGIN = 8;\nconst X1_INNER_PADDING = 0.1;\n// x1_inner_padding = space_between_bars / (space_between_bars + bar_width)\n// => space_between_bars = (x1_inner_padding / (1 - x1_inner_padding)) * bar_width\n/** Rate at which the space between the bars in a group changes wrt the bar width */\nconst BAR_GAP_RATE = X1_INNER_PADDING / (1 - X1_INNER_PADDING);\nconst VERTICAL_BAR_GAP = 1;\nconst MIN_BAR_HEIGHT = 1;\n\n// This interface used for - While forming datapoints from given prop \"data\" in code\ninterface IGVDataPoint {\n [key: string]: number | string;\n}\n\n// While forming datapoints from given prop \"data\" in code. These datapoints are used for to draw graph easily.\ninterface IGVSingleDataPoint {\n [key: string]: IGVDataPoint;\n}\nexport interface IGroupedVerticalBarChartState extends IBasestate {\n dataPointCalloutProps?: IGVBarChartSeriesPoint;\n callOutAccessibilityData?: IAccessibilityProps;\n calloutLegend: string;\n selectedLegends: string[];\n}\n\nexport class GroupedVerticalBarChartBase\n extends React.Component<IGroupedVerticalBarChartProps, IGroupedVerticalBarChartState>\n implements IChart\n{\n public static defaultProps: Partial<IGroupedVerticalBarChartProps> = {\n maxBarWidth: 24,\n };\n\n private _createSet: (\n data: IGroupedVerticalBarChartData[],\n ) => // eslint-disable-next-line @typescript-eslint/no-explicit-any\n { legends: string[]; xAxisLabels: string[]; datasetForBars: any };\n private _legends: string[];\n private _xAxisLabels: string[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _datasetForBars: any;\n private margins: IMargins;\n private _groupedVerticalBarGraph: JSX.Element[];\n private _classNames: IProcessedStyleSet<IGroupedVerticalBarChartStyles>;\n private _yMax: number;\n private _calloutId: string;\n private _tooltipId: string;\n private _xAxisType: XAxisTypes;\n private _isRtl: boolean = getRTL();\n private _calloutAnchorPoint: IGVBarChartSeriesPoint | null;\n private _barWidth: number;\n private _domainMargin: number;\n private _emptyChartId: string;\n private _groupWidth: number;\n private _xAxisInnerPadding: number;\n private _xAxisOuterPadding: number;\n private _cartesianChartRef: React.RefObject<IChart>;\n private _legendsRef: React.RefObject<ILegendContainer>;\n private _legendColorMap: Record<string, [string, string]> = {};\n private readonly Y_ORIGIN: number = 0;\n\n public constructor(props: IGroupedVerticalBarChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this._createSet = memoizeFunction((data: IGroupedVerticalBarChartData[]) => this._createDataSetOfGVBC(data));\n this.state = {\n color: '',\n dataForHoverCard: 0,\n isCalloutVisible: false,\n refSelected: null,\n selectedLegends: props.legendProps?.selectedLegends || [],\n xCalloutValue: '',\n yCalloutValue: '',\n YValueHover: [],\n hoverXValue: '',\n calloutLegend: '',\n activeLegend: '',\n };\n warnDeprecations(COMPONENT_NAME, props, {\n showYAxisGridLines: 'Dont use this property. Lines are drawn by default',\n showXAxisPath: 'Dont use this property. Axis line removed default.',\n showYAxisPath: 'Dont use this property. No need to display Y axis path. Handling default',\n showXAxisGridLines: 'Dont use this property. Handling with default value.',\n legendColor: 'Dont use this property. colour will pick from given data.',\n });\n this._calloutId = getId('callout');\n this._tooltipId = getId('GVBCTooltipId_');\n this._emptyChartId = getId('_GVBC_empty');\n this._domainMargin = MIN_DOMAIN_MARGIN;\n this._cartesianChartRef = React.createRef();\n this._legendsRef = React.createRef();\n }\n\n public componentDidUpdate(prevProps: IGroupedVerticalBarChartProps): void {\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, this.props.legendProps?.selectedLegends)) {\n this.setState({\n selectedLegends: this.props.legendProps?.selectedLegends || [],\n });\n }\n }\n\n public render(): React.ReactNode {\n const points = this._addDefaultColors(this.props.data);\n const { legends, xAxisLabels, datasetForBars } = this._createSet(points);\n this._legends = legends;\n this._xAxisLabels = xAxisLabels;\n this._datasetForBars = datasetForBars;\n this._xAxisType = getTypeOfAxis(points[0].name, true) as XAxisTypes;\n const legendBars: JSX.Element = this._getLegendData();\n this._adjustProps();\n\n // The maxOfYVal prop is only required for the primary y-axis, so yMax should be calculated\n // using only the data points associated with the primary y-axis.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const yMax = this._getMinMaxOfYAxis(this._datasetForBars).endValue;\n this._yMax = Math.max(yMax, this.props.yMaxValue || 0);\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n href: this.props.href!,\n });\n const calloutProps = {\n target: this.state.refSelected,\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${this._calloutId}`,\n gapSpace: 15,\n isBeakVisible: false,\n setInitialFocus: true,\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 ...this.props.calloutProps,\n preventDismissOnLostFocus: true,\n ...getAccessibleDataObject(this.state.callOutAccessibilityData, 'text', false),\n };\n const tickParams = {\n tickValues: this.props.tickValues!,\n tickFormat: this.props.tickFormat!,\n };\n\n return !this._isChartEmpty() ? (\n <CartesianChart\n {...this.props}\n chartTitle={this._getChartTitle()}\n points={this._datasetForBars}\n chartType={ChartTypes.GroupedVerticalBarChart}\n calloutProps={calloutProps}\n legendBars={legendBars}\n xAxisType={this._xAxisType}\n createYAxis={createNumericYAxis}\n datasetForXAxisDomain={this._xAxisLabels}\n tickParams={tickParams}\n getDomainNRangeValues={this._getDomainNRangeValues}\n getMinMaxOfYAxis={this._getMinMaxOfYAxis}\n createStringYAxis={createStringYAxis}\n tickPadding={this.props.tickPadding || 5}\n maxOfYVal={this._yMax}\n svgFocusZoneProps={{\n direction: FocusZoneDirection.horizontal,\n }}\n customizedCallout={this._getCustomizedCallout()}\n getmargins={this._getMargins}\n getGraphData={this._getGraphData}\n getAxisData={this._getAxisData}\n onChartMouseLeave={this._handleChartMouseLeave}\n getDomainMargins={this._getDomainMargins}\n {...(this._xAxisType === XAxisTypes.StringAxis && {\n xAxisInnerPadding: this._xAxisInnerPadding,\n xAxisOuterPadding: this._xAxisOuterPadding,\n })}\n barwidth={this._barWidth}\n ref={this._cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n children={() => {\n return <g>{this._groupedVerticalBarGraph}</g>;\n }}\n />\n ) : (\n <div\n id={this._emptyChartId}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\n />\n );\n }\n\n public get chartContainer(): HTMLElement | null {\n return this._cartesianChartRef.current?.chartContainer || null;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._cartesianChartRef.current?.chartContainer, this._legendsRef.current?.toSVG, this._isRtl, opts);\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getMinMaxOfYAxis = (datasetForBars: any, yAxisType?: YAxisType, useSecondaryYScale?: boolean) => {\n const values: number[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n datasetForBars.forEach((data: any) => {\n data.groupSeries.forEach((point: IGVBarChartSeriesPoint) => {\n if (!useSecondaryYScale === !point.useSecondaryYScale) {\n values.push(point.data);\n }\n });\n });\n\n return { startValue: d3Min(values)!, endValue: d3Max(values)! };\n };\n\n private _getDomainNRangeValues = (\n points: IGroupedVerticalBarChartData[],\n margins: IMargins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) => {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis || xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\n };\n\n private _getGraphData = (\n xScale: StringAxis | NumericAxis,\n yScalePrimary: ScaleLinear<number, number>,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yAxisElement?: SVGElement | null,\n yScaleSecondary?: ScaleLinear<number, number>,\n ) => {\n const xScale0 = this._createX0Scale(containerWidth);\n\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(\n this.props.barwidth,\n this.props.maxBarWidth,\n xScale0.bandwidth() / (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE),\n );\n this._groupWidth = (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE) * this._barWidth;\n\n const xScale1 = this._createX1Scale();\n const allGroupsBars: JSX.Element[] = [];\n this._datasetForBars.forEach((singleSet: IGVSingleDataPoint) => {\n allGroupsBars.push(\n this._buildGraph(singleSet, xScale0, xScale1, yScalePrimary, yScaleSecondary, containerHeight, xElement!),\n );\n });\n this._groupedVerticalBarGraph = allGroupsBars;\n };\n\n private _getMargins = (margins: IMargins) => (this.margins = margins);\n\n private _createDataSetOfGVBC = (points: IGroupedVerticalBarChartData[]) => {\n const legends = new Set<string>();\n const xAxisLabels: string[] = points.map(singlePoint => singlePoint.name);\n points.forEach((point: IGroupedVerticalBarChartData) => {\n point.series.forEach((seriesPoint: IGVBarChartSeriesPoint) => {\n legends.add(seriesPoint.legend);\n });\n });\n const datasetForBars = this._createDataset(points);\n return {\n legends: Array.from(legends),\n xAxisLabels,\n datasetForBars,\n };\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)\n : null;\n };\n\n private _onBarHover = (\n pointData: IGVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void => {\n mouseEvent.persist();\n if (this._calloutAnchorPoint !== pointData) {\n this._calloutAnchorPoint = pointData;\n this.setState({\n refSelected: mouseEvent,\n /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */\n isCalloutVisible: this._noLegendHighlighted() || this._legendHighlighted(pointData.legend),\n calloutLegend: pointData.legend,\n dataForHoverCard: pointData.data,\n color: pointData.color,\n xCalloutValue: pointData.xAxisCalloutData,\n yCalloutValue: pointData.yAxisCalloutData,\n dataPointCalloutProps: pointData,\n callOutAccessibilityData: this.props.isCalloutForStack\n ? groupData.stackCallOutAccessibilityData\n : pointData.callOutAccessibilityData,\n YValueHover: groupData.groupSeries,\n hoverXValue: pointData.xAxisCalloutData,\n });\n }\n };\n\n private _onBarLeave = (): void => {\n /**/\n };\n\n private _handleChartMouseLeave = (): void => {\n this._calloutAnchorPoint = null;\n this.setState({ isCalloutVisible: false });\n };\n\n private _onBarFocus = (\n pointData: IGVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n focusEvent: React.FocusEvent<SVGElement>,\n ): void => {\n this.setState({\n refSelected: focusEvent.currentTarget,\n /** Show the callout if highlighted bar is focused and Hide it if unhighlighted bar is focused */\n isCalloutVisible: this._noLegendHighlighted() || this._legendHighlighted(pointData.legend),\n calloutLegend: pointData.legend,\n dataForHoverCard: pointData.data,\n color: pointData.color,\n xCalloutValue: pointData.xAxisCalloutData,\n yCalloutValue: pointData.yAxisCalloutData,\n dataPointCalloutProps: pointData,\n callOutAccessibilityData: this.props.isCalloutForStack\n ? groupData.stackCallOutAccessibilityData\n : pointData.callOutAccessibilityData,\n YValueHover: groupData.groupSeries,\n hoverXValue: pointData.xAxisCalloutData,\n });\n };\n\n private _redirectToUrl = (href: string | undefined): void => {\n href ? (window.location.href = href) : '';\n };\n\n private _buildGraph = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n singleSet: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale0: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale1: any,\n yScalePrimary: ScaleLinear<number, number>,\n yScaleSecondary: ScaleLinear<number, number> | undefined,\n containerHeight: number,\n xElement: SVGElement,\n ): JSX.Element => {\n const singleGroup: JSX.Element[] = [];\n const barLabelsForGroup: JSX.Element[] = [];\n\n this._legends.forEach((legendTitle: string, legendIndex: number) => {\n const barPoints = singleSet[legendTitle];\n if (barPoints) {\n const yBarScale = barPoints[0].useSecondaryYScale && yScaleSecondary ? yScaleSecondary : yScalePrimary;\n\n // To align the centers of the generated bandwidth and the calculated one when they differ,\n // use the following addend.\n const xPoint = xScale1(legendTitle) + (xScale1.bandwidth() - this._barWidth) / 2;\n const isLegendActive = this._legendHighlighted(legendTitle) || this._noLegendHighlighted();\n const barOpacity = isLegendActive ? '' : '0.1';\n\n let barTotalValue = 0;\n const yBaseline = yBarScale(this.Y_ORIGIN);\n let yPositiveStart = yBaseline;\n let yNegativeStart = yBaseline;\n let yPoint = this.Y_ORIGIN;\n\n barPoints.forEach((pointData: IGVBarChartSeriesPoint, pointIndex: number) => {\n if (!pointData.data) {\n // Not rendering data with 0.\n return;\n }\n const gradientId = getId('GVBC_Gradient') + `_${singleSet.indexNum}_${legendIndex}_${pointIndex}`;\n if (this.props.enableGradient) {\n const startColor = pointData.gradient?.[0] || pointData.color;\n const endColor = pointData.gradient?.[1] || pointData.color;\n\n singleGroup.push(\n <defs key={`defs_${gradientId}`}>\n <linearGradient id={gradientId} x1=\"0%\" y1=\"100%\" x2=\"0%\" y2=\"0%\">\n <stop offset=\"0%\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>\n </defs>,\n );\n }\n\n const barGap = (VERTICAL_BAR_GAP / 2) * (pointIndex > 0 ? 2 : 0);\n const height = Math.max(yBarScale(this.Y_ORIGIN) - yBarScale(Math.abs(pointData.data)), MIN_BAR_HEIGHT);\n const pointColor = pointData.color; // Use the color of the current point\n\n if (pointData.data >= this.Y_ORIGIN) {\n yPositiveStart -= height + barGap;\n yPoint = yPositiveStart;\n } else {\n yPoint = yNegativeStart + barGap;\n yNegativeStart = yPoint + height;\n }\n\n singleGroup.push(\n <rect\n key={`${singleSet.indexNum}-${legendIndex}-${pointIndex}`}\n className={this._classNames.opacityChangeOnHover}\n height={height}\n width={this._barWidth}\n x={xPoint}\n y={yPoint}\n data-is-focusable={!this.props.hideTooltip && isLegendActive}\n opacity={barOpacity}\n fill={this.props.enableGradient ? `url(#${gradientId})` : pointColor}\n rx={this.props.roundCorners ? 3 : 0}\n onMouseOver={this._onBarHover.bind(this, pointData, singleSet)}\n onMouseMove={this._onBarHover.bind(this, pointData, singleSet)}\n onMouseOut={this._onBarLeave}\n onFocus={this._onBarFocus.bind(this, pointData, singleSet)}\n onBlur={this._onBarLeave}\n onClick={this.props.href ? this._redirectToUrl.bind(this, this.props.href!) : pointData.onClick}\n aria-label={this._getAriaLabel(pointData, singleSet.xAxisPoint)}\n role=\"img\"\n />,\n );\n\n barTotalValue += pointData.data;\n });\n if (barTotalValue !== null && !this.props.hideLabels && this._barWidth >= 16 && isLegendActive) {\n barLabelsForGroup.push(\n <text\n key={`${singleSet.indexNum}-${legendIndex}`}\n x={xPoint + this._barWidth / 2}\n y={barTotalValue >= this.Y_ORIGIN ? yPositiveStart - 6 : yNegativeStart + 12}\n textAnchor=\"middle\"\n className={this._classNames.barLabel}\n aria-hidden={true}\n >\n {formatValueLimitWidth(barTotalValue)}\n </text>,\n );\n }\n }\n });\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xScale0);\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 axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return (\n <g\n key={singleSet.indexNum}\n transform={`translate(${xScale0(singleSet.xAxisPoint) + (xScale0.bandwidth() - this._groupWidth) / 2}, 0)`}\n >\n {singleGroup}\n {barLabelsForGroup}\n </g>\n );\n };\n\n private _createDataset = (points: IGroupedVerticalBarChartData[]) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const datasetForBars: any = [];\n\n points.forEach((point: IGroupedVerticalBarChartData, index: number) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDatasetPointForBars: any = {};\n const legendToBarPoint: Record<string, IGVBarChartSeriesPoint> = {};\n\n point.series.forEach((seriesPoint: IGVBarChartSeriesPoint) => {\n if (!singleDatasetPointForBars[seriesPoint.legend]) {\n singleDatasetPointForBars[seriesPoint.legend] = [{ ...seriesPoint }];\n legendToBarPoint[seriesPoint.legend] = { ...seriesPoint };\n } else {\n singleDatasetPointForBars[seriesPoint.legend].push({ ...seriesPoint });\n legendToBarPoint[seriesPoint.legend].data += seriesPoint.data;\n }\n });\n\n singleDatasetPointForBars.xAxisPoint = point.name;\n singleDatasetPointForBars.indexNum = index;\n singleDatasetPointForBars.groupSeries = Object.values(legendToBarPoint);\n singleDatasetPointForBars.stackCallOutAccessibilityData = point.stackCallOutAccessibilityData;\n datasetForBars.push(singleDatasetPointForBars);\n });\n return datasetForBars;\n };\n\n // For grouped vertical bar chart, First need to define total scale (from start to end)\n // From that need to define scale for single group of bars - done by createX1Scale\n private _createX0Scale = (containerWidth: number) => {\n const x0Axis = 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 return x0Axis;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _createX1Scale = (): any => {\n return (\n d3ScaleBand()\n .domain(this._legends)\n // When there is only one group, xScale0 adds padding around it,\n // causing the bandwidth to become smaller than the actual group width.\n // So to render bars in the group correctly, use groupWidth instead of the generated scale bandwidth.\n .range(this._isRtl ? [this._groupWidth, 0] : [0, this._groupWidth])\n .paddingInner(X1_INNER_PADDING)\n );\n };\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\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 = (): JSX.Element => {\n const actions: ILegend[] = [];\n\n this._legends.forEach((legendTitle: string) => {\n const legend: ILegend = {\n title: legendTitle,\n color: this._legendColorMap[legendTitle][0],\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(legendTitle);\n },\n onMouseOutAction: () => {\n this._onLegendLeave();\n },\n };\n\n actions.push(legend);\n });\n return (\n <Legends\n legends={actions}\n overflowProps={this.props.legendsOverflowProps}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n {...this.props.legendProps}\n onChange={this._onLegendSelectionChange.bind(this)}\n ref={this._legendsRef}\n />\n );\n };\n\n private _onLegendSelectionChange(\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: ILegend,\n ): void {\n if (this.props.legendProps?.canSelectMultipleLegends) {\n this.setState({ selectedLegends });\n } else {\n this.setState({ selectedLegends: selectedLegends.slice(-1) });\n }\n if (this.props.legendProps?.onChange) {\n this.props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n private _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 this._getHighlightedLegend().includes(legendTitle!);\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this._getHighlightedLegend().length === 0;\n };\n\n private _getHighlightedLegend() {\n return this.state.selectedLegends.length > 0\n ? this.state.selectedLegends\n : this.state.activeLegend\n ? [this.state.activeLegend]\n : [];\n }\n\n private _getAriaLabel = (point: IGVBarChartSeriesPoint, xAxisPoint: string): string => {\n const xValue = point.xAxisCalloutData || 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 /** Rate at which the space between the groups changes wrt the group width */\n const groupGapRate = this._xAxisInnerPadding / (1 - this._xAxisInnerPadding);\n\n if (this._xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(this.props.xAxisOuterPadding)) {\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 group and after the last group.\n this._domainMargin = 0;\n } else if (this.props.barwidth !== 'auto') {\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 const groupWidth = (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE) * this._barWidth;\n /** Total width required to render the groups. Directly proportional to group width */\n const reqWidth = (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * groupGapRate) * groupWidth;\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 } else if (this.props.mode === 'plotly' && this._xAxisLabels.length > 1) {\n // Calculate the remaining width after rendering groups at their maximum allowable width\n const groupBandwidth = totalWidth / (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * groupGapRate);\n const barBandwidth = groupBandwidth / (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE);\n const barWidth = getBarWidth(this.props.barwidth, this.props.maxBarWidth, barBandwidth);\n const groupWidth = (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE) * barWidth;\n let reqWidth = (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * groupGapRate) * groupWidth;\n const margin1 = (totalWidth - reqWidth) / 2;\n\n let margin2 = Number.POSITIVE_INFINITY;\n if (!this.props.hideTickOverlap) {\n // Calculate the remaining width after accounting for the space required to render x-axis labels\n const step = calculateLongestLabelWidth(this._xAxisLabels) + 20;\n reqWidth = (this._xAxisLabels.length - this._xAxisInnerPadding) * step;\n margin2 = (totalWidth - reqWidth) / 2;\n }\n\n this._domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));\n }\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: IGroupedVerticalBarChartData) => item.series.length).length > 0\n );\n }\n\n private _adjustProps(): void {\n this._barWidth = getBarWidth(this.props.barwidth, this.props.maxBarWidth);\n // x0_inner_padding = space_between_groups / (space_between_groups + group_width)\n // space_between_groups = 2 * bar_width\n // group_width = this._legends.length * bar_width + (this._legends.length - 1) * space_between_bars\n this._xAxisInnerPadding = getScalePadding(\n this.props.xAxisInnerPadding,\n undefined,\n 2 / (2 + this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE),\n );\n this._xAxisOuterPadding = getScalePadding(this.props.xAxisOuterPadding);\n }\n\n private _getChartTitle = (): string => {\n const { chartTitle } = this.props;\n return (\n (chartTitle ? `${chartTitle}. ` : '') +\n `Vertical bar chart with ${this._xAxisLabels.length} groups of ${this._legends.length} bars each. `\n );\n };\n\n // Lighten/Darken a color by a given percentage using d3-scale\n private _adjustColor = (color: string, percentage: number, lightenColor: boolean, isDarkTheme: boolean): string => {\n const targetColor = lightenColor ? (isDarkTheme ? '#000000' : '#ffffff') : isDarkTheme ? '#ffffff' : '#000000';\n const colorInterpolator = d3ScaleLinear<string>().domain([0, 1]).range([color, targetColor]);\n return rgb(colorInterpolator(percentage)).formatRgb();\n };\n\n private _addDefaultColors = (data?: IGroupedVerticalBarChartData[]): IGroupedVerticalBarChartData[] => {\n this._legendColorMap = {};\n let colorIndex = 0;\n\n return (\n data?.map(point => {\n return {\n ...point,\n series:\n point.series?.map(seriesPoint => {\n let startColor = seriesPoint.color\n ? seriesPoint.color\n : getNextColor(colorIndex, 0, this.props.theme?.isInverted);\n let endColor = startColor;\n\n if (this.props.enableGradient) {\n if (seriesPoint.color) {\n // Generate gradient colors based on seriesPoint.color\n startColor = this._adjustColor(\n seriesPoint.color || endColor,\n 0.2,\n false,\n this.props.theme?.isInverted!,\n );\n endColor = this._adjustColor(\n seriesPoint.color || startColor,\n 0.2,\n true,\n this.props.theme?.isInverted!,\n );\n } else {\n const nextGradient = getNextGradient(colorIndex, 0, this.props.theme?.isInverted);\n startColor = seriesPoint.gradient?.[0] || nextGradient[0];\n endColor = seriesPoint.gradient?.[1] || nextGradient[1];\n }\n }\n const pointGradient: [string, string] = [startColor, endColor];\n if (!this._legendColorMap[seriesPoint.legend]) {\n this._legendColorMap[seriesPoint.legend] = [startColor, endColor];\n }\n colorIndex += 1;\n\n return {\n ...seriesPoint,\n color: seriesPoint.color ?? this._legendColorMap[seriesPoint.legend][0],\n ...(this.props.enableGradient ? { gradient: pointGradient } : {}),\n };\n }) ?? [],\n };\n }) ?? []\n );\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"GroupedVerticalBarChart.base.js","sourceRoot":"../src/","sources":["components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAC/B,qCAAsD;AACtD,6CAAkD;AAElD,qCAA+F;AAC/F,2DAOuC;AAEvC,uDAA8D;AAC9D,qDAA2D;AAC3D,+CAoB+B;AAC/B,qCAYqB;AAErB,yEAA6D;AAE7D,qCAA+B;AAE/B,IAAM,cAAc,GAAG,4BAA4B,CAAC;AACpD,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAs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AC3E,CAAC;QACF,IAAI,CAAC,kBAAkB,GAAG,IAAA,uBAAe,EAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC1E,CAAC;IAhrBa,wCAAY,GAA2C;QACnE,WAAW,EAAE,EAAE;KAChB,AAFyB,CAExB;IAmvBJ,kCAAC;CAAA,AAzvBD,CACU,KAAK,CAAC,SAAS,GAwvBxB;AAzvBY,kEAA2B","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { select as d3Select } from 'd3-selection';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { scaleLinear as d3ScaleLinear, ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\nimport {\n classNamesFunction,\n getId,\n getRTL,\n initializeComponentRef,\n memoizeFunction,\n warnDeprecations,\n} from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n tooltipOfAxislabels,\n XAxisTypes,\n getTypeOfAxis,\n formatScientificLimitWidth,\n getScalePadding,\n getBarWidth,\n isScalePaddingDefined,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfXStringAxis,\n createStringYAxis,\n getNextGradient,\n getNextColor,\n areArraysEqual,\n calculateLongestLabelWidth,\n YAxisType,\n} from '../../utilities/index';\nimport {\n IAccessibilityProps,\n CartesianChart,\n ILegend,\n IGroupedVerticalBarChartData,\n IGroupedVerticalBarChartProps,\n IGroupedVerticalBarChartStyleProps,\n IGroupedVerticalBarChartStyles,\n IGVBarChartSeriesPoint,\n IMargins,\n IBasestate,\n Legends,\n} from '../../index';\nimport { IChart, IImageExportOptions } from '../../types/index';\nimport { toImage } from '../../utilities/image-export-utils';\nimport { ILegendContainer } from '../Legends/index';\nimport { rgb } from 'd3-color';\n\nconst COMPONENT_NAME = 'GROUPED VERTICAL BAR CHART';\nconst getClassNames = classNamesFunction<IGroupedVerticalBarChartStyleProps, IGroupedVerticalBarChartStyles>();\ntype StringAxis = D3Axis<string>;\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\n\nconst MIN_DOMAIN_MARGIN = 8;\nconst X1_INNER_PADDING = 0.1;\n// x1_inner_padding = space_between_bars / (space_between_bars + bar_width)\n// => space_between_bars = (x1_inner_padding / (1 - x1_inner_padding)) * bar_width\n/** Rate at which the space between the bars in a group changes wrt the bar width */\nconst BAR_GAP_RATE = X1_INNER_PADDING / (1 - X1_INNER_PADDING);\nconst VERTICAL_BAR_GAP = 1;\nconst MIN_BAR_HEIGHT = 1;\n\n// This interface used for - While forming datapoints from given prop \"data\" in code\ninterface IGVDataPoint {\n [key: string]: number | string;\n}\n\n// While forming datapoints from given prop \"data\" in code. These datapoints are used for to draw graph easily.\ninterface IGVSingleDataPoint {\n [key: string]: IGVDataPoint;\n}\nexport interface IGroupedVerticalBarChartState extends IBasestate {\n dataPointCalloutProps?: IGVBarChartSeriesPoint;\n callOutAccessibilityData?: IAccessibilityProps;\n calloutLegend: string;\n selectedLegends: string[];\n}\n\nexport class GroupedVerticalBarChartBase\n extends React.Component<IGroupedVerticalBarChartProps, IGroupedVerticalBarChartState>\n implements IChart\n{\n public static defaultProps: Partial<IGroupedVerticalBarChartProps> = {\n maxBarWidth: 24,\n };\n\n private _createSet: (\n data: IGroupedVerticalBarChartData[],\n ) => // eslint-disable-next-line @typescript-eslint/no-explicit-any\n { legends: string[]; xAxisLabels: string[]; datasetForBars: any };\n private _legends: string[];\n private _xAxisLabels: string[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _datasetForBars: any;\n private margins: IMargins;\n private _groupedVerticalBarGraph: JSX.Element[];\n private _classNames: IProcessedStyleSet<IGroupedVerticalBarChartStyles>;\n private _yMax: number;\n private _calloutId: string;\n private _tooltipId: string;\n private _xAxisType: XAxisTypes;\n private _isRtl: boolean = getRTL();\n private _calloutAnchorPoint: IGVBarChartSeriesPoint | null;\n private _barWidth: number;\n private _domainMargin: number;\n private _emptyChartId: string;\n private _groupWidth: number;\n private _xAxisInnerPadding: number;\n private _xAxisOuterPadding: number;\n private _cartesianChartRef: React.RefObject<IChart>;\n private _legendsRef: React.RefObject<ILegendContainer>;\n private _legendColorMap: Record<string, [string, string]> = {};\n private readonly Y_ORIGIN: number = 0;\n\n public constructor(props: IGroupedVerticalBarChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this._createSet = memoizeFunction((data: IGroupedVerticalBarChartData[]) => this._createDataSetOfGVBC(data));\n this.state = {\n color: '',\n dataForHoverCard: 0,\n isCalloutVisible: false,\n refSelected: null,\n selectedLegends: props.legendProps?.selectedLegends || [],\n xCalloutValue: '',\n yCalloutValue: '',\n YValueHover: [],\n hoverXValue: '',\n calloutLegend: '',\n activeLegend: '',\n };\n warnDeprecations(COMPONENT_NAME, props, {\n showYAxisGridLines: 'Dont use this property. Lines are drawn by default',\n showXAxisPath: 'Dont use this property. Axis line removed default.',\n showYAxisPath: 'Dont use this property. No need to display Y axis path. Handling default',\n showXAxisGridLines: 'Dont use this property. Handling with default value.',\n legendColor: 'Dont use this property. colour will pick from given data.',\n });\n this._calloutId = getId('callout');\n this._tooltipId = getId('GVBCTooltipId_');\n this._emptyChartId = getId('_GVBC_empty');\n this._domainMargin = MIN_DOMAIN_MARGIN;\n this._cartesianChartRef = React.createRef();\n this._legendsRef = React.createRef();\n }\n\n public componentDidUpdate(prevProps: IGroupedVerticalBarChartProps): void {\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, this.props.legendProps?.selectedLegends)) {\n this.setState({\n selectedLegends: this.props.legendProps?.selectedLegends || [],\n });\n }\n }\n\n public render(): React.ReactNode {\n const points = this._addDefaultColors(this.props.data);\n const { legends, xAxisLabels, datasetForBars } = this._createSet(points);\n this._legends = legends;\n this._xAxisLabels = xAxisLabels;\n this._datasetForBars = datasetForBars;\n this._xAxisType = getTypeOfAxis(points[0].name, true) as XAxisTypes;\n const legendBars: JSX.Element = this._getLegendData();\n this._adjustProps();\n\n // The maxOfYVal prop is only required for the primary y-axis, so yMax should be calculated\n // using only the data points associated with the primary y-axis.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const yMax = this._getMinMaxOfYAxis(this._datasetForBars).endValue;\n this._yMax = Math.max(yMax, this.props.yMaxValue || 0);\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n href: this.props.href!,\n });\n const calloutProps = {\n target: this.state.refSelected,\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${this._calloutId}`,\n gapSpace: 15,\n isBeakVisible: false,\n setInitialFocus: true,\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 ...this.props.calloutProps,\n preventDismissOnLostFocus: true,\n ...getAccessibleDataObject(this.state.callOutAccessibilityData, 'text', false),\n };\n const tickParams = {\n tickValues: this.props.tickValues!,\n tickFormat: this.props.tickFormat!,\n };\n\n return !this._isChartEmpty() ? (\n <CartesianChart\n {...this.props}\n chartTitle={this._getChartTitle()}\n points={this._datasetForBars}\n chartType={ChartTypes.GroupedVerticalBarChart}\n calloutProps={calloutProps}\n legendBars={legendBars}\n xAxisType={this._xAxisType}\n createYAxis={createNumericYAxis}\n datasetForXAxisDomain={this._xAxisLabels}\n tickParams={tickParams}\n getDomainNRangeValues={this._getDomainNRangeValues}\n getMinMaxOfYAxis={this._getMinMaxOfYAxis}\n createStringYAxis={createStringYAxis}\n tickPadding={this.props.tickPadding || 5}\n maxOfYVal={this._yMax}\n svgFocusZoneProps={{\n direction: FocusZoneDirection.horizontal,\n }}\n customizedCallout={this._getCustomizedCallout()}\n getmargins={this._getMargins}\n getGraphData={this._getGraphData}\n getAxisData={this._getAxisData}\n onChartMouseLeave={this._handleChartMouseLeave}\n getDomainMargins={this._getDomainMargins}\n {...(this._xAxisType === XAxisTypes.StringAxis && {\n xAxisInnerPadding: this._xAxisInnerPadding,\n xAxisOuterPadding: this._xAxisOuterPadding,\n })}\n barwidth={this._barWidth}\n ref={this._cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n children={() => {\n return <g>{this._groupedVerticalBarGraph}</g>;\n }}\n />\n ) : (\n <div\n id={this._emptyChartId}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\n />\n );\n }\n\n public get chartContainer(): HTMLElement | null {\n return this._cartesianChartRef.current?.chartContainer || null;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._cartesianChartRef.current?.chartContainer, this._legendsRef.current?.toSVG, this._isRtl, opts);\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getMinMaxOfYAxis = (datasetForBars: any, yAxisType?: YAxisType, useSecondaryYScale?: boolean) => {\n const values: number[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n datasetForBars.forEach((data: any) => {\n data.groupSeries.forEach((point: IGVBarChartSeriesPoint) => {\n if (!useSecondaryYScale === !point.useSecondaryYScale) {\n values.push(point.data);\n }\n });\n });\n\n return { startValue: d3Min(values)!, endValue: d3Max(values)! };\n };\n\n private _getDomainNRangeValues = (\n points: IGroupedVerticalBarChartData[],\n margins: IMargins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) => {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis || xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\n };\n\n private _getGraphData = (\n xScale: StringAxis | NumericAxis,\n yScalePrimary: ScaleLinear<number, number>,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yAxisElement?: SVGElement | null,\n yScaleSecondary?: ScaleLinear<number, number>,\n ) => {\n const xScale0 = this._createX0Scale(containerWidth);\n\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(\n this.props.barwidth,\n this.props.maxBarWidth,\n xScale0.bandwidth() / (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE),\n );\n this._groupWidth = (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE) * this._barWidth;\n\n const xScale1 = this._createX1Scale();\n const allGroupsBars: JSX.Element[] = [];\n this._datasetForBars.forEach((singleSet: IGVSingleDataPoint) => {\n allGroupsBars.push(\n this._buildGraph(singleSet, xScale0, xScale1, yScalePrimary, yScaleSecondary, containerHeight, xElement!),\n );\n });\n this._groupedVerticalBarGraph = allGroupsBars;\n };\n\n private _getMargins = (margins: IMargins) => (this.margins = margins);\n\n private _createDataSetOfGVBC = (points: IGroupedVerticalBarChartData[]) => {\n const legends = new Set<string>();\n const xAxisLabels: string[] = points.map(singlePoint => singlePoint.name);\n points.forEach((point: IGroupedVerticalBarChartData) => {\n point.series.forEach((seriesPoint: IGVBarChartSeriesPoint) => {\n legends.add(seriesPoint.legend);\n });\n });\n const datasetForBars = this._createDataset(points);\n return {\n legends: Array.from(legends),\n xAxisLabels,\n datasetForBars,\n };\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)\n : null;\n };\n\n private _onBarHover = (\n pointData: IGVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void => {\n mouseEvent.persist();\n if (this._calloutAnchorPoint !== pointData) {\n this._calloutAnchorPoint = pointData;\n this.setState({\n refSelected: mouseEvent,\n /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */\n isCalloutVisible: this._noLegendHighlighted() || this._legendHighlighted(pointData.legend),\n calloutLegend: pointData.legend,\n dataForHoverCard: pointData.data,\n color: pointData.color,\n xCalloutValue: pointData.xAxisCalloutData,\n yCalloutValue: pointData.yAxisCalloutData,\n dataPointCalloutProps: pointData,\n callOutAccessibilityData: this.props.isCalloutForStack\n ? groupData.stackCallOutAccessibilityData\n : pointData.callOutAccessibilityData,\n YValueHover: groupData.groupSeries,\n hoverXValue: pointData.xAxisCalloutData,\n });\n }\n };\n\n private _onBarLeave = (): void => {\n /**/\n };\n\n private _handleChartMouseLeave = (): void => {\n this._calloutAnchorPoint = null;\n this.setState({ isCalloutVisible: false });\n };\n\n private _onBarFocus = (\n pointData: IGVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n focusEvent: React.FocusEvent<SVGElement>,\n ): void => {\n this.setState({\n refSelected: focusEvent.currentTarget,\n /** Show the callout if highlighted bar is focused and Hide it if unhighlighted bar is focused */\n isCalloutVisible: this._noLegendHighlighted() || this._legendHighlighted(pointData.legend),\n calloutLegend: pointData.legend,\n dataForHoverCard: pointData.data,\n color: pointData.color,\n xCalloutValue: pointData.xAxisCalloutData,\n yCalloutValue: pointData.yAxisCalloutData,\n dataPointCalloutProps: pointData,\n callOutAccessibilityData: this.props.isCalloutForStack\n ? groupData.stackCallOutAccessibilityData\n : pointData.callOutAccessibilityData,\n YValueHover: groupData.groupSeries,\n hoverXValue: pointData.xAxisCalloutData,\n });\n };\n\n private _redirectToUrl = (href: string | undefined): void => {\n href ? (window.location.href = href) : '';\n };\n\n private _buildGraph = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n singleSet: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale0: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale1: any,\n yScalePrimary: ScaleLinear<number, number>,\n yScaleSecondary: ScaleLinear<number, number> | undefined,\n containerHeight: number,\n xElement: SVGElement,\n ): JSX.Element => {\n const singleGroup: JSX.Element[] = [];\n const barLabelsForGroup: JSX.Element[] = [];\n\n this._legends.forEach((legendTitle: string, legendIndex: number) => {\n const barPoints = singleSet[legendTitle];\n if (barPoints) {\n const yBarScale = barPoints[0].useSecondaryYScale && yScaleSecondary ? yScaleSecondary : yScalePrimary;\n\n // To align the centers of the generated bandwidth and the calculated one when they differ,\n // use the following addend.\n const xPoint = xScale1(legendTitle) + (xScale1.bandwidth() - this._barWidth) / 2;\n const isLegendActive = this._legendHighlighted(legendTitle) || this._noLegendHighlighted();\n const barOpacity = isLegendActive ? '' : '0.1';\n\n let barTotalValue = 0;\n const yBaseline = yBarScale(this.Y_ORIGIN);\n let yPositiveStart = yBaseline;\n let yNegativeStart = yBaseline;\n let yPoint = this.Y_ORIGIN;\n\n barPoints.forEach((pointData: IGVBarChartSeriesPoint, pointIndex: number) => {\n if (!pointData.data) {\n // Not rendering data with 0.\n return;\n }\n const gradientId = getId('GVBC_Gradient') + `_${singleSet.indexNum}_${legendIndex}_${pointIndex}`;\n if (this.props.enableGradient) {\n const startColor = pointData.gradient?.[0] || pointData.color;\n const endColor = pointData.gradient?.[1] || pointData.color;\n\n singleGroup.push(\n <defs key={`defs_${gradientId}`}>\n <linearGradient id={gradientId} x1=\"0%\" y1=\"100%\" x2=\"0%\" y2=\"0%\">\n <stop offset=\"0%\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>\n </defs>,\n );\n }\n\n const barGap = (VERTICAL_BAR_GAP / 2) * (pointIndex > 0 ? 2 : 0);\n const height = Math.max(yBarScale(this.Y_ORIGIN) - yBarScale(Math.abs(pointData.data)), MIN_BAR_HEIGHT);\n const pointColor = pointData.color; // Use the color of the current point\n\n if (pointData.data >= this.Y_ORIGIN) {\n yPositiveStart -= height + barGap;\n yPoint = yPositiveStart;\n } else {\n yPoint = yNegativeStart + barGap;\n yNegativeStart = yPoint + height;\n }\n\n singleGroup.push(\n <rect\n key={`${singleSet.indexNum}-${legendIndex}-${pointIndex}`}\n className={this._classNames.opacityChangeOnHover}\n height={height}\n width={this._barWidth}\n x={xPoint}\n y={yPoint}\n data-is-focusable={!this.props.hideTooltip && isLegendActive}\n opacity={barOpacity}\n fill={this.props.enableGradient ? `url(#${gradientId})` : pointColor}\n rx={this.props.roundCorners ? 3 : 0}\n onMouseOver={this._onBarHover.bind(this, pointData, singleSet)}\n onMouseMove={this._onBarHover.bind(this, pointData, singleSet)}\n onMouseOut={this._onBarLeave}\n onFocus={this._onBarFocus.bind(this, pointData, singleSet)}\n onBlur={this._onBarLeave}\n onClick={this.props.href ? this._redirectToUrl.bind(this, this.props.href!) : pointData.onClick}\n aria-label={this._getAriaLabel(pointData, singleSet.xAxisPoint)}\n role=\"img\"\n />,\n );\n\n barTotalValue += pointData.data;\n });\n if (barTotalValue !== null && !this.props.hideLabels && this._barWidth >= 16 && isLegendActive) {\n barLabelsForGroup.push(\n <text\n key={`${singleSet.indexNum}-${legendIndex}`}\n x={xPoint + this._barWidth / 2}\n y={barTotalValue >= this.Y_ORIGIN ? yPositiveStart - 6 : yNegativeStart + 12}\n textAnchor=\"middle\"\n className={this._classNames.barLabel}\n aria-hidden={true}\n >\n {formatScientificLimitWidth(barTotalValue)}\n </text>,\n );\n }\n }\n });\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xScale0);\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 axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return (\n <g\n key={singleSet.indexNum}\n transform={`translate(${xScale0(singleSet.xAxisPoint) + (xScale0.bandwidth() - this._groupWidth) / 2}, 0)`}\n >\n {singleGroup}\n {barLabelsForGroup}\n </g>\n );\n };\n\n private _createDataset = (points: IGroupedVerticalBarChartData[]) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const datasetForBars: any = [];\n\n points.forEach((point: IGroupedVerticalBarChartData, index: number) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDatasetPointForBars: any = {};\n const legendToBarPoint: Record<string, IGVBarChartSeriesPoint> = {};\n\n point.series.forEach((seriesPoint: IGVBarChartSeriesPoint) => {\n if (!singleDatasetPointForBars[seriesPoint.legend]) {\n singleDatasetPointForBars[seriesPoint.legend] = [{ ...seriesPoint }];\n legendToBarPoint[seriesPoint.legend] = { ...seriesPoint };\n } else {\n singleDatasetPointForBars[seriesPoint.legend].push({ ...seriesPoint });\n legendToBarPoint[seriesPoint.legend].data += seriesPoint.data;\n }\n });\n\n singleDatasetPointForBars.xAxisPoint = point.name;\n singleDatasetPointForBars.indexNum = index;\n singleDatasetPointForBars.groupSeries = Object.values(legendToBarPoint);\n singleDatasetPointForBars.stackCallOutAccessibilityData = point.stackCallOutAccessibilityData;\n datasetForBars.push(singleDatasetPointForBars);\n });\n return datasetForBars;\n };\n\n // For grouped vertical bar chart, First need to define total scale (from start to end)\n // From that need to define scale for single group of bars - done by createX1Scale\n private _createX0Scale = (containerWidth: number) => {\n const x0Axis = 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 return x0Axis;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _createX1Scale = (): any => {\n return (\n d3ScaleBand()\n .domain(this._legends)\n // When there is only one group, xScale0 adds padding around it,\n // causing the bandwidth to become smaller than the actual group width.\n // So to render bars in the group correctly, use groupWidth instead of the generated scale bandwidth.\n .range(this._isRtl ? [this._groupWidth, 0] : [0, this._groupWidth])\n .paddingInner(X1_INNER_PADDING)\n );\n };\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\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 = (): JSX.Element => {\n const actions: ILegend[] = [];\n\n this._legends.forEach((legendTitle: string) => {\n const legend: ILegend = {\n title: legendTitle,\n color: this._legendColorMap[legendTitle][0],\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(legendTitle);\n },\n onMouseOutAction: () => {\n this._onLegendLeave();\n },\n };\n\n actions.push(legend);\n });\n return (\n <Legends\n legends={actions}\n overflowProps={this.props.legendsOverflowProps}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n {...this.props.legendProps}\n onChange={this._onLegendSelectionChange.bind(this)}\n ref={this._legendsRef}\n />\n );\n };\n\n private _onLegendSelectionChange(\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: ILegend,\n ): void {\n if (this.props.legendProps?.canSelectMultipleLegends) {\n this.setState({ selectedLegends });\n } else {\n this.setState({ selectedLegends: selectedLegends.slice(-1) });\n }\n if (this.props.legendProps?.onChange) {\n this.props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n private _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 this._getHighlightedLegend().includes(legendTitle!);\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this._getHighlightedLegend().length === 0;\n };\n\n private _getHighlightedLegend() {\n return this.state.selectedLegends.length > 0\n ? this.state.selectedLegends\n : this.state.activeLegend\n ? [this.state.activeLegend]\n : [];\n }\n\n private _getAriaLabel = (point: IGVBarChartSeriesPoint, xAxisPoint: string): string => {\n const xValue = point.xAxisCalloutData || 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 /** Rate at which the space between the groups changes wrt the group width */\n const groupGapRate = this._xAxisInnerPadding / (1 - this._xAxisInnerPadding);\n\n if (this._xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(this.props.xAxisOuterPadding)) {\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 group and after the last group.\n this._domainMargin = 0;\n } else if (this.props.barwidth !== 'auto') {\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 const groupWidth = (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE) * this._barWidth;\n /** Total width required to render the groups. Directly proportional to group width */\n const reqWidth = (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * groupGapRate) * groupWidth;\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 } else if (this.props.mode === 'plotly' && this._xAxisLabels.length > 1) {\n // Calculate the remaining width after rendering groups at their maximum allowable width\n const groupBandwidth = totalWidth / (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * groupGapRate);\n const barBandwidth = groupBandwidth / (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE);\n const barWidth = getBarWidth(this.props.barwidth, this.props.maxBarWidth, barBandwidth);\n const groupWidth = (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE) * barWidth;\n let reqWidth = (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * groupGapRate) * groupWidth;\n const margin1 = (totalWidth - reqWidth) / 2;\n\n let margin2 = Number.POSITIVE_INFINITY;\n if (!this.props.hideTickOverlap) {\n // Calculate the remaining width after accounting for the space required to render x-axis labels\n const step = calculateLongestLabelWidth(this._xAxisLabels) + 20;\n reqWidth = (this._xAxisLabels.length - this._xAxisInnerPadding) * step;\n margin2 = (totalWidth - reqWidth) / 2;\n }\n\n this._domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));\n }\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: IGroupedVerticalBarChartData) => item.series.length).length > 0\n );\n }\n\n private _adjustProps(): void {\n this._barWidth = getBarWidth(this.props.barwidth, this.props.maxBarWidth);\n // x0_inner_padding = space_between_groups / (space_between_groups + group_width)\n // space_between_groups = 2 * bar_width\n // group_width = this._legends.length * bar_width + (this._legends.length - 1) * space_between_bars\n this._xAxisInnerPadding = getScalePadding(\n this.props.xAxisInnerPadding,\n undefined,\n 2 / (2 + this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE),\n );\n this._xAxisOuterPadding = getScalePadding(this.props.xAxisOuterPadding);\n }\n\n private _getChartTitle = (): string => {\n const { chartTitle } = this.props;\n return (\n (chartTitle ? `${chartTitle}. ` : '') +\n `Vertical bar chart with ${this._xAxisLabels.length} groups of ${this._legends.length} bars each. `\n );\n };\n\n // Lighten/Darken a color by a given percentage using d3-scale\n private _adjustColor = (color: string, percentage: number, lightenColor: boolean, isDarkTheme: boolean): string => {\n const targetColor = lightenColor ? (isDarkTheme ? '#000000' : '#ffffff') : isDarkTheme ? '#ffffff' : '#000000';\n const colorInterpolator = d3ScaleLinear<string>().domain([0, 1]).range([color, targetColor]);\n return rgb(colorInterpolator(percentage)).formatRgb();\n };\n\n private _addDefaultColors = (data?: IGroupedVerticalBarChartData[]): IGroupedVerticalBarChartData[] => {\n this._legendColorMap = {};\n let colorIndex = 0;\n\n return (\n data?.map(point => {\n return {\n ...point,\n series:\n point.series?.map(seriesPoint => {\n let startColor = seriesPoint.color\n ? seriesPoint.color\n : getNextColor(colorIndex, 0, this.props.theme?.isInverted);\n let endColor = startColor;\n\n if (this.props.enableGradient) {\n if (seriesPoint.color) {\n // Generate gradient colors based on seriesPoint.color\n startColor = this._adjustColor(\n seriesPoint.color || endColor,\n 0.2,\n false,\n this.props.theme?.isInverted!,\n );\n endColor = this._adjustColor(\n seriesPoint.color || startColor,\n 0.2,\n true,\n this.props.theme?.isInverted!,\n );\n } else {\n const nextGradient = getNextGradient(colorIndex, 0, this.props.theme?.isInverted);\n startColor = seriesPoint.gradient?.[0] || nextGradient[0];\n endColor = seriesPoint.gradient?.[1] || nextGradient[1];\n }\n }\n const pointGradient: [string, string] = [startColor, endColor];\n if (!this._legendColorMap[seriesPoint.legend]) {\n this._legendColorMap[seriesPoint.legend] = [startColor, endColor];\n }\n colorIndex += 1;\n\n return {\n ...seriesPoint,\n color: seriesPoint.color ?? this._legendColorMap[seriesPoint.legend][0],\n ...(this.props.enableGradient ? { gradient: pointGradient } : {}),\n };\n }) ?? [],\n };\n }) ?? []\n );\n };\n}\n"]}
|
|
@@ -9,7 +9,7 @@ var react_focus_1 = require("@fluentui/react-focus");
|
|
|
9
9
|
var Callout_1 = require("@fluentui/react/lib/Callout");
|
|
10
10
|
var React = require("react");
|
|
11
11
|
var index_2 = require("../Legends/index");
|
|
12
|
-
var
|
|
12
|
+
var chart_utilities_1 = require("@fluentui/chart-utilities");
|
|
13
13
|
var utilities_1 = require("../../utilities/utilities");
|
|
14
14
|
var d3_format_1 = require("d3-format");
|
|
15
15
|
var d3_time_format_1 = require("d3-time-format");
|
|
@@ -153,7 +153,7 @@ var HeatMapChartBase = /** @class */ (function (_super) {
|
|
|
153
153
|
_this._rectRefCallback(gElement, id, dataPointObject_1);
|
|
154
154
|
}, onFocus: _this._onRectFocus.bind(_this, id, dataPointObject_1), onBlur: _this._onRectBlurOrMouseOut, onMouseOver: _this._onRectMouseOver.bind(_this, id, dataPointObject_1), onMouseOut: _this._onRectBlurOrMouseOut },
|
|
155
155
|
React.createElement("rect", { fill: _this._colorScale(dataPointObject_1.value), width: _this._xAxisScale.bandwidth(), height: _this._yAxisScale.bandwidth(), onClick: dataPointObject_1.onClick }),
|
|
156
|
-
React.createElement("text", { dominantBaseline: 'middle', textAnchor: 'middle', className: _this._classNames.text, transform: "translate(".concat(_this._xAxisScale.bandwidth() / 2, ", ").concat(_this._yAxisScale.bandwidth() / 2, ")"), fill: foregroundColor }, (0,
|
|
156
|
+
React.createElement("text", { dominantBaseline: 'middle', textAnchor: 'middle', className: _this._classNames.text, transform: "translate(".concat(_this._xAxisScale.bandwidth() / 2, ", ").concat(_this._yAxisScale.bandwidth() / 2, ")"), fill: foregroundColor }, (0, chart_utilities_1.formatToLocaleString)(dataPointObject_1.rectText, _this.props.culture, _this.props.useUTC))));
|
|
157
157
|
index++;
|
|
158
158
|
}
|
|
159
159
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeatMapChart.base.js","sourceRoot":"../src/","sources":["components/HeatMapChart/HeatMapChart.base.tsx"],"names":[],"mappings":";;;;AAAA,iEAAoH;AAQpH,qCAAwD;AACxD,2DAMuC;AACvC,qDAA2D;AAC3D,uDAA8D;AAE9D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,WAAW;aAC5B,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAmTO,wCAAa,GAArB;QACE,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC1D,CAAC;IAOH,uBAAC;AAAD,CAAC,AApuBD,CAAsC,KAAK,CAAC,SAAS,GAouBpD;AApuBY,4CAAgB","sourcesContent":["import { CartesianChart, IChildProps, IModifiedCartesianChartProps } from '../../components/CommonComponents/index';\nimport {\n IAccessibilityProps,\n IChart,\n IHeatMapChartData,\n IHeatMapChartDataPoint,\n IImageExportOptions,\n} from '../../types/IDataPoint';\nimport { scaleLinear as d3ScaleLinear } from 'd3-scale';\nimport {\n classNamesFunction,\n getId,\n getRTL,\n initializeComponentRef,\n memoizeFunction,\n} from '@fluentui/react/lib/Utilities';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport * as React from 'react';\nimport { IHeatMapChartProps, IHeatMapChartStyleProps, IHeatMapChartStyles } from './HeatMapChart.types';\nimport { ILegend, ILegendContainer, Legends } from '../Legends/index';\nimport { convertToLocaleString } from '../../utilities/locale-util';\nimport {\n ChartTypes,\n createNumericYAxis,\n getAccessibleDataObject,\n XAxisTypes,\n YAxisType,\n getTypeOfAxis,\n IMargins,\n IDomainNRange,\n domainRangeOfXStringAxis,\n createStringYAxis,\n resolveCSSVariables,\n} from '../../utilities/utilities';\nimport { Target } from '@fluentui/react';\nimport { format as d3Format } from 'd3-format';\nimport { timeFormat as d3TimeFormat } from 'd3-time-format';\nimport { getColorContrast } from '../../utilities/colors';\nimport { toImage } from '../../utilities/image-export-utils';\n\ntype DataSet = {\n dataSet: RectanglesGraphData;\n yAxisPoints: string[];\n xAxisPoints: string[];\n};\ntype FlattenData = IHeatMapChartDataPoint & {\n legend: string;\n};\ninterface IRectRef {\n data: FlattenData;\n refElement: SVGGElement;\n}\ntype RectanglesGraphData = { [key: string]: FlattenData[] };\nexport interface IHeatMapChartState {\n /**\n * contains the selected legend string\n */\n selectedLegend: string;\n /**\n * contains the hovered legend string\n */\n activeLegend: string;\n /**\n * determines wethere to show or hide the callout\n * @default false\n */\n isCalloutVisible: boolean;\n /**\n * y value to be shown in callout\n */\n calloutYValue: string;\n /**\n * legend title to be shown in callout\n */\n calloutLegend: string;\n /**\n * color of the text in the callout\n */\n calloutTextColor: string;\n /**\n * The target that the Callout should try to position itself based on\n */\n target: Target;\n /**\n * ratio to show in the callout\n */\n ratio: [number, number] | null;\n\n /**\n * description message to show in the callout\n */\n descriptionMessage: string;\n /**\n * id to give to callout for accesiblity purpose\n */\n calloutId: string;\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\nconst getClassNames = classNamesFunction<IHeatMapChartStyleProps, IHeatMapChartStyles>();\nexport class HeatMapChartBase extends React.Component<IHeatMapChartProps, IHeatMapChartState> implements IChart {\n private _classNames: IProcessedStyleSet<IHeatMapChartStyles>;\n private _stringXAxisDataPoints: string[];\n private _stringYAxisDataPoints: string[];\n private _createSet: (\n data: IHeatMapChartData[],\n xDate: string | undefined,\n xNum: string | undefined,\n yDate: string | undefined,\n yNum: string | undefined,\n ) => DataSet;\n private _dataSet: RectanglesGraphData;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _colorScale: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _xAxisScale: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _yAxisScale: any;\n /**\n * This array contains ref for all the rectangles\n * drawn inside the chard\n */\n private _rectRefArray: { [key: string]: IRectRef } = {};\n private _xAxisType: XAxisTypes;\n private _yAxisType: YAxisType;\n private _calloutAnchorPoint: FlattenData | null;\n private _emptyChartId: string;\n private margins: IMargins;\n private _cartesianChartRef: React.RefObject<IChart>;\n private _legendsRef: React.RefObject<ILegendContainer>;\n\n public constructor(props: IHeatMapChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n /**\n * below funciton creates a new data set from the prop\n * @data and also finds all the unique x-axis datapoints\n * and y-axis datapoints(which will render in the axis in graph)\n * we store this in a memoized function, because we want to calulate\n * this set whenever props changes.\n */\n this._createSet = memoizeFunction(\n (\n data: IHeatMapChartData[],\n xDate: string | undefined,\n xNum: string | undefined,\n yDate: string | undefined,\n yNum: string | undefined,\n ): DataSet => this._createNewDataSet(data, xDate, xNum, yDate, yNum),\n );\n this.state = {\n selectedLegend: props.legendProps?.selectedLegend ?? '',\n activeLegend: '',\n isCalloutVisible: false,\n target: null,\n calloutLegend: '',\n calloutTextColor: '',\n calloutYValue: '',\n ratio: null,\n descriptionMessage: '',\n calloutId: '',\n };\n this._emptyChartId = getId('_HeatMap_empty');\n this._cartesianChartRef = React.createRef();\n this._legendsRef = React.createRef();\n }\n\n public componentDidUpdate(prevProps: IHeatMapChartProps): void {\n if (prevProps.legendProps?.selectedLegend !== this.props.legendProps?.selectedLegend) {\n this.setState({\n selectedLegend: this.props.legendProps?.selectedLegend ?? '',\n });\n }\n }\n\n public render(): React.ReactNode {\n const { x, y } = this._getXandY();\n this._xAxisType = getTypeOfAxis(x, true) as XAxisTypes;\n this._yAxisType = getTypeOfAxis(y, false) as YAxisType;\n const { data, xAxisDateFormatString, xAxisNumberFormatString, yAxisDateFormatString, yAxisNumberFormatString } =\n this.props;\n this._colorScale = this._getColorScale();\n const { dataSet, xAxisPoints, yAxisPoints } = this._createSet(\n data,\n xAxisDateFormatString,\n xAxisNumberFormatString,\n yAxisDateFormatString,\n yAxisNumberFormatString,\n );\n this._dataSet = dataSet;\n this._stringYAxisDataPoints = yAxisPoints;\n this._stringXAxisDataPoints = xAxisPoints;\n this._classNames = getClassNames(this.props.styles!, { theme: this.props.theme! });\n const calloutProps: IModifiedCartesianChartProps['calloutProps'] = {\n isBeakVisible: false,\n gapSpace: 8,\n ...this.props.calloutProps,\n isCalloutVisible: this.state.isCalloutVisible,\n id: this.state.calloutId,\n YValue: this.state.calloutYValue,\n legend: this.state.calloutLegend,\n color: this.state.calloutTextColor,\n target: this.state.target,\n styles: this._classNames.subComponentStyles.calloutStyles,\n directionalHint: DirectionalHint.topAutoEdge,\n onDismiss: this._closeCallout,\n ...getAccessibleDataObject(this.state.callOutAccessibilityData, 'text', false),\n preventDismissOnLostFocus: true,\n };\n const chartHoverProps: IModifiedCartesianChartProps['chartHoverProps'] = {\n ...(this.state.ratio && {\n ratio: this.state.ratio,\n }),\n descriptionMessage: this.state.descriptionMessage,\n };\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n return !this._isChartEmpty() ? (\n <CartesianChart\n {...this.props}\n chartTitle={this._getChartTitle()}\n points={data}\n chartType={ChartTypes.HeatMapChart}\n xAxisType={XAxisTypes.StringAxis}\n yAxisType={YAxisType.StringAxis}\n calloutProps={calloutProps}\n createYAxis={createNumericYAxis}\n chartHoverProps={chartHoverProps}\n styles={this._classNames.subComponentStyles!.cartesianStyles}\n datasetForXAxisDomain={this._stringXAxisDataPoints}\n stringDatasetForYAxisDomain={this._stringYAxisDataPoints}\n createStringYAxis={createStringYAxis}\n getDomainNRangeValues={this._getDomainNRangeValues}\n getMinMaxOfYAxis={this._getMinMaxOfYAxis}\n getmargins={this._getMargins}\n xAxisTickCount={this._stringXAxisDataPoints.length}\n xAxistickSize={0}\n xAxisPadding={0.02}\n yAxisPadding={0.02}\n svgFocusZoneProps={{\n direction: FocusZoneDirection.bidirectional,\n }}\n legendBars={this._createLegendBars()}\n onChartMouseLeave={this._handleChartMouseLeave}\n ref={this._cartesianChartRef}\n tickParams={tickParams}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n this._xAxisScale = props.xScale;\n this._yAxisScale = props.yScalePrimary;\n return this._createRectangles();\n }}\n />\n ) : (\n <div\n id={this._emptyChartId}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\n />\n );\n }\n\n public get chartContainer(): HTMLElement | null {\n return this._cartesianChartRef.current?.chartContainer || null;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._cartesianChartRef.current?.chartContainer, this._legendsRef.current?.toSVG, getRTL(), opts);\n };\n\n private _getMinMaxOfYAxis = () => {\n return { startValue: 0, endValue: 0 };\n };\n\n private _getDomainNRangeValues = (\n points: IHeatMapChartDataPoint[],\n margins: IMargins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) => {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis || xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(this.margins, width, isRTL);\n }\n return domainNRangeValue;\n };\n\n private _getXandY = (): { x: string | Date | number; y: string | Date | number } => {\n let x: string | Date | number = '';\n let y: string | Date | number = '';\n this.props.data.forEach((item: IHeatMapChartData) => {\n if (item.data && item.data.length > 0) {\n x = item.data[0].x;\n y = item.data[0].y;\n return { x, y };\n }\n });\n return { x, y };\n };\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _getOpacity = (legendTitle: string): string => {\n const opacity = this._legendHighlighted(legendTitle) || this._noLegendHighlighted() ? '1' : '0.1';\n return opacity;\n };\n\n private _rectRefCallback = (rectElement: SVGGElement, index: number | string, dataPointObject: FlattenData): void => {\n this._rectRefArray[index] = { data: dataPointObject, refElement: rectElement };\n };\n\n private _onRectFocus = (id: string, data: FlattenData): void => {\n this.setState({\n target: this._rectRefArray[id].refElement,\n /** Show the callout if highlighted rectangle is focused and Hide it if unhighlighted rectangle is focused */\n isCalloutVisible: this.state.selectedLegend === '' || this.state.selectedLegend === data.legend,\n calloutYValue: `${data.rectText}`,\n calloutTextColor: Number.isNaN(data.value)\n ? this.props.theme!.semanticColors.bodyText\n : this._colorScale(data.value),\n calloutLegend: data.legend,\n ratio: data.ratio || null,\n descriptionMessage: data.descriptionMessage || '',\n calloutId: id,\n callOutAccessibilityData: data.callOutAccessibilityData,\n });\n };\n\n private _onRectMouseOver = (id: string, data: FlattenData, mouseEvent: React.MouseEvent<SVGGElement>): void => {\n mouseEvent.persist();\n if (this._calloutAnchorPoint !== data) {\n this._calloutAnchorPoint = data;\n this.setState({\n target: this._rectRefArray[id].refElement,\n /** Show the callout if highlighted rectangle is hovered and Hide it if unhighlighted rectangle is hovered */\n isCalloutVisible: this.state.selectedLegend === '' || this.state.selectedLegend === data.legend,\n calloutYValue: `${data.rectText}`,\n calloutTextColor: Number.isNaN(data.value)\n ? this.props.theme!.semanticColors.bodyText\n : this._colorScale(data.value),\n calloutLegend: data.legend,\n ratio: data.ratio || null,\n descriptionMessage: data.descriptionMessage || '',\n calloutId: id,\n callOutAccessibilityData: data.callOutAccessibilityData,\n });\n }\n };\n\n private _onRectBlurOrMouseOut = (): void => {\n /**/\n };\n\n private _handleChartMouseLeave = (): void => {\n this._calloutAnchorPoint = null;\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _getInvertedTextColor = (color: string): string => {\n return color === this.props.theme!.semanticColors.bodyText\n ? this.props.theme!.semanticColors.bodyBackground\n : this.props.theme!.semanticColors.bodyText;\n };\n\n /**\n * This is the function which is responsible for\n * drawing the rectangle in the graph and also\n * attaching dom events to that rectangles\n */\n private _createRectangles = (): React.ReactNode => {\n const rectangles: JSX.Element[] = [];\n const yAxisDataPoints = this._stringYAxisDataPoints.slice().reverse();\n /**\n * yAxisDataPoint is noting but the DataPoint\n * which will be rendered on the y-axis\n */\n yAxisDataPoints.forEach((yAxisDataPoint: string) => {\n let index = 0;\n this._stringXAxisDataPoints.forEach((xAxisDataPoint: string) => {\n let rectElement: JSX.Element;\n const id = `x${xAxisDataPoint}y${yAxisDataPoint}`;\n if (\n this._dataSet[yAxisDataPoint][index]?.x === xAxisDataPoint &&\n typeof this._dataSet[yAxisDataPoint][index]?.value === 'number'\n ) {\n /**\n * dataPointObject is an object where it contains information on single\n * data point such as x, y , value, rectText property of the rectangle\n */\n const dataPointObject = this._dataSet[yAxisDataPoint][index];\n let styleRules = '';\n let foregroundColor = this.props.theme!.semanticColors.bodyText;\n if (this.chartContainer) {\n styleRules = resolveCSSVariables(this.chartContainer!, foregroundColor);\n }\n const contrastRatio = getColorContrast(styleRules, this._colorScale(dataPointObject.value));\n if (contrastRatio < 3) {\n foregroundColor = this._getInvertedTextColor(foregroundColor);\n }\n rectElement = (\n <g\n key={id}\n role=\"img\"\n aria-label={this._getAriaLabel(dataPointObject)}\n data-is-focusable={this._legendHighlighted(dataPointObject.legend) || this._noLegendHighlighted()}\n fillOpacity={this._getOpacity(dataPointObject.legend)}\n transform={`translate(${this._xAxisScale(dataPointObject.x)}, ${this._yAxisScale(dataPointObject.y)})`}\n ref={(gElement: SVGGElement) => {\n this._rectRefCallback(gElement, id, dataPointObject);\n }}\n onFocus={this._onRectFocus.bind(this, id, dataPointObject)}\n onBlur={this._onRectBlurOrMouseOut}\n onMouseOver={this._onRectMouseOver.bind(this, id, dataPointObject)}\n onMouseOut={this._onRectBlurOrMouseOut}\n >\n <rect\n fill={this._colorScale(dataPointObject.value)}\n width={this._xAxisScale.bandwidth()}\n height={this._yAxisScale.bandwidth()}\n onClick={dataPointObject.onClick}\n />\n <text\n dominantBaseline={'middle'}\n textAnchor={'middle'}\n className={this._classNames.text}\n transform={`translate(${this._xAxisScale.bandwidth() / 2}, ${this._yAxisScale.bandwidth() / 2})`}\n fill={foregroundColor}\n >\n {convertToLocaleString(dataPointObject.rectText, this.props.culture)}\n </text>\n </g>\n );\n index++;\n } else {\n const dataPointObject: FlattenData = {\n x: xAxisDataPoint,\n y: yAxisDataPoint,\n value: NaN,\n rectText: 'No data available',\n legend: '',\n };\n rectElement = (\n <g\n key={id}\n role=\"img\"\n aria-label={this._getAriaLabel(dataPointObject)}\n data-is-focusable={this._noLegendHighlighted()}\n transform={`translate(${this._xAxisScale(dataPointObject.x)}, ${this._yAxisScale(dataPointObject.y)})`}\n ref={(gElement: SVGGElement) => {\n this._rectRefCallback(gElement, id, dataPointObject);\n }}\n onFocus={this._onRectFocus.bind(this, id, dataPointObject)}\n onBlur={this._onRectBlurOrMouseOut}\n onMouseOver={this._onRectMouseOver.bind(this, id, dataPointObject)}\n onMouseOut={this._onRectBlurOrMouseOut}\n >\n <rect fill=\"transparent\" width={this._xAxisScale.bandwidth()} height={this._yAxisScale.bandwidth()} />\n </g>\n );\n }\n rectangles.push(rectElement);\n });\n });\n return rectangles;\n };\n /**\n * when the legend is hovered we need to highlight\n * all the rectangles which fall under that category\n * and un-highlight the rest of them\n * @param legendTitle\n */\n private _onLegendHover(legendTitle: string): void {\n this.setState({\n activeLegend: legendTitle,\n });\n }\n\n /**\n * when the mouse is out from the legend , we need\n * to show the graph in initial mode.\n */\n private _onLegendLeave(): void {\n this.setState({\n activeLegend: '',\n });\n }\n /**\n * @param legendTitle\n * when the legend is clicked we need to highlight\n * all the rectangles which fall under that category\n * and un highlight the rest of them\n */\n private _onLegendClick(legendTitle: string): void {\n /**\n * check if the legend is already selceted,\n * if yes, un-select the legend, else\n * set the selected legend state to legendTitle\n */\n if (this.state.selectedLegend === legendTitle) {\n this.setState({\n selectedLegend: '',\n });\n } else {\n this.setState({\n selectedLegend: legendTitle,\n });\n }\n }\n private _createLegendBars = (): JSX.Element => {\n const { data, legendProps } = this.props;\n const legends: ILegend[] = [];\n data.forEach((item: IHeatMapChartData) => {\n const legend: ILegend = {\n title: item.legend,\n color: this._colorScale(item.value),\n action: () => {\n this._onLegendClick(item.legend);\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(item.legend);\n },\n onMouseOutAction: () => {\n this._onLegendLeave();\n },\n };\n legends.push(legend);\n });\n return <Legends {...legendProps} legends={legends} ref={this._legendsRef} />;\n };\n\n private _getColorScale = () => {\n const { domainValuesForColorScale, rangeValuesForColorScale } = this.props;\n return d3ScaleLinear()\n .domain(domainValuesForColorScale)\n .range(rangeValuesForColorScale as unknown as number[]);\n };\n\n private _getXIndex = (value: string | Date | number): string => {\n if (this._xAxisType === XAxisTypes.DateAxis) {\n return `${(value as Date).getTime()}`;\n } else if (this._xAxisType === XAxisTypes.StringAxis) {\n return value as string;\n } else if (this._xAxisType === XAxisTypes.NumericAxis) {\n return `${value}`;\n } else {\n return '';\n }\n };\n private _getYIndex = (value: string | Date | number): string => {\n if (this._yAxisType === YAxisType.DateAxis) {\n return `${(value as Date).getTime()}`;\n } else if (this._yAxisType === YAxisType.StringAxis) {\n return value as string;\n } else if (this._yAxisType === YAxisType.NumericAxis) {\n return `${value}`;\n } else {\n return '';\n }\n };\n\n /**\n * This will create a new data set based on the prop\n * @data\n * We will be using This data set to contsruct our rectangles\n * in the chart, we use this data set becuase, when we loop in this\n * data and build the heat map, it will support accessibility as\n * specified in the figma\n */\n\n private _createNewDataSet = (\n data: IHeatMapChartData[],\n xAxisDateFormatString: string | undefined,\n xAxisNumberFormatString: string | undefined,\n yAxisDateFormatString: string | undefined,\n yAxisNumberFormatString: string | undefined,\n ): DataSet => {\n /**\n * please do not destructure any of the props here,\n * instead send them as parameter to this functions so that\n * this functions get called whenever the prop changes\n */\n const flattenData: FlattenData[] = [];\n /**\n * below for each loop will store all the datapoints in the one array.\n * basically it will flatten the nestesd array (data prop) into single array\n * of object. where each object contains x, y, rectText , value and legend propety of single\n * data point.\n */\n data.forEach((item: IHeatMapChartData) => {\n item.data.forEach((point: IHeatMapChartDataPoint) => {\n flattenData.push({ ...point, legend: item.legend });\n });\n });\n const yPoints: RectanglesGraphData = {};\n const uniqueYPoints: { [key: string]: '1' } = {};\n const uniqueXPoints: { [key: string]: '1' } = {};\n flattenData.forEach((item: FlattenData) => {\n const posX = this._getXIndex(item.x);\n const posY = this._getYIndex(item.y);\n\n uniqueXPoints[posX] = '1';\n uniqueYPoints[posY] = '1';\n /** we will check if the property(posY) is already there in object, if Yes,\n * then we will append the item in the Array related to the pos, if not\n * then we will simply append the item in the new Array and\n * assign that array to the property (posY) in the Object\n * and finally we will get the array of Objects associated to each\n * property (which is nothing but y data point) and object in the\n * array are noting but x data points associated to the property y\n */\n if (yPoints[posY]) {\n yPoints[posY] = [...yPoints[posY], item];\n } else {\n yPoints[posY] = [item];\n }\n });\n /**\n * we will now sort(ascending) the array's of y data point based on the x value\n * sorting is important to achive the accessibility order of the\n * rectangles and then format the x and y datapoints respectively\n */\n Object.keys(yPoints).forEach((item: string) => {\n yPoints[item]\n .sort((a: IHeatMapChartDataPoint, b: IHeatMapChartDataPoint) => {\n if (this._xAxisType === XAxisTypes.StringAxis) {\n return this.props.sortOrder === 'none'\n ? 0\n : (a.x as string).toLowerCase() > (b.x as string).toLowerCase()\n ? 1\n : -1;\n } else if (this._xAxisType === XAxisTypes.DateAxis) {\n return (a.x as Date).getTime() - (b.x as Date).getTime();\n } else if (this._xAxisType === XAxisTypes.NumericAxis) {\n return +(a.x as string) > +(b.x as string) ? 1 : -1;\n } else {\n return a.x > b.x ? 1 : -1;\n }\n })\n .forEach((datapoint: IHeatMapChartDataPoint) => {\n if (this._xAxisType === XAxisTypes.DateAxis) {\n datapoint.x = this._getStringFormattedDate(datapoint.x as string, xAxisDateFormatString);\n }\n if (this._xAxisType === XAxisTypes.NumericAxis) {\n datapoint.x = this._getStringFormattedNumber(datapoint.x as string, xAxisNumberFormatString);\n }\n if (this._xAxisType === XAxisTypes.StringAxis) {\n datapoint.x = this._getFormattedLabelForXAxisDataPoint(datapoint.x as string);\n }\n if (this._yAxisType === YAxisType.DateAxis) {\n datapoint.y = this._getStringFormattedDate(datapoint.y as string, yAxisDateFormatString);\n }\n if (this._yAxisType === YAxisType.NumericAxis) {\n datapoint.y = this._getStringFormattedNumber(datapoint.y as string, yAxisNumberFormatString);\n }\n if (this._yAxisType === YAxisType.StringAxis) {\n datapoint.y = this._getFormattedLabelForYAxisDataPoint(datapoint.y as string);\n }\n });\n });\n /**\n * if y-axis data points are of type date or number or if we have string formatter,\n * then we need to change data points to their respective string\n * format, becuase in the private variable this._stringYAxisDatapoints, points will be stored in\n * string format. and in here `yPoint` are not so we need to change, so that\n * function `this._createRectangles` should work perfetcly while looping, and if we don't change\n * then `this._createRectangles` will fail while looping, causing the error\n * Cannot read property 'forEach' of undefined\n */\n\n Object.keys(yPoints).forEach((yPoint: string) => {\n if (this._yAxisType === YAxisType.DateAxis) {\n yPoints[this._getStringFormattedDate(yPoint, yAxisDateFormatString)] = yPoints[yPoint];\n } else if (this._yAxisType === YAxisType.NumericAxis) {\n yPoints[`${this._getStringFormattedNumber(yPoint, yAxisNumberFormatString)}`] = yPoints[yPoint];\n } else {\n yPoints[this._getFormattedLabelForYAxisDataPoint(yPoint)] = yPoints[yPoint];\n }\n });\n /**\n * assigning new data set\n */\n const dataSet = yPoints;\n /**\n * These are the Y axis data points which will get rendered in the\n * Y axis in graph\n */\n const yAxisPoints = this._getYAxisDataPoints(uniqueYPoints);\n /**\n * These are the x axis data points which will get rendered in the\n * x axis in the graph\n */\n\n const xAxisPoints = this._getXAxisDataPoints(uniqueXPoints);\n return {\n dataSet,\n yAxisPoints,\n xAxisPoints,\n };\n };\n\n /**\n * This function will return the final sorted and formatted x-axis points\n * which will be rendered on the x-axis\n * @param points\n * @returns x-axis points\n */\n private _getXAxisDataPoints = (points: { [key: string]: '1' }): string[] => {\n let xAxisPoints: string[] = [];\n const unFormattedXAxisDataPoints = Object.keys(points).sort((a: string, b: string) => {\n if (this._xAxisType === XAxisTypes.DateAxis || this._xAxisType === XAxisTypes.NumericAxis) {\n return +a - +b;\n } else {\n return this.props.sortOrder === 'none' ? 0 : a.toLowerCase() > b.toLowerCase() ? 1 : -1;\n }\n });\n xAxisPoints = unFormattedXAxisDataPoints.map((xPoint: string) => {\n if (this._xAxisType === XAxisTypes.DateAxis) {\n return this._getStringFormattedDate(xPoint, this.props.xAxisDateFormatString);\n } else if (this._xAxisType === XAxisTypes.NumericAxis) {\n return this._getStringFormattedNumber(xPoint, this.props.xAxisNumberFormatString);\n } else {\n return this._getFormattedLabelForXAxisDataPoint(xPoint);\n }\n });\n\n return xAxisPoints;\n };\n /**\n * This function will return the final sorted and formatted y-axis points\n * which will be rendered on the y-axis\n * @param points\n * @returns yaxis points\n */\n private _getYAxisDataPoints = (points: { [key: string]: '1' }): string[] => {\n let yAxisPoints: string[] = [];\n const unFormattedYAxisDataPoints = Object.keys(points).sort((a: string, b: string) => {\n if (this._yAxisType === YAxisType.DateAxis || this._yAxisType === YAxisType.NumericAxis) {\n return +a - +b;\n } else {\n return this.props.sortOrder === 'none' ? 0 : a.toLowerCase() > b.toLowerCase() ? 1 : -1;\n }\n });\n yAxisPoints = unFormattedYAxisDataPoints.map((yPoint: string) => {\n if (this._yAxisType === YAxisType.DateAxis) {\n return this._getStringFormattedDate(yPoint, this.props.yAxisDateFormatString);\n } else if (this._yAxisType === YAxisType.NumericAxis) {\n return this._getStringFormattedNumber(yPoint, this.props.yAxisNumberFormatString);\n } else {\n return this._getFormattedLabelForYAxisDataPoint(yPoint);\n }\n });\n\n return yAxisPoints;\n };\n\n private _getStringFormattedDate = (point: string, formatString?: string): string => {\n const date = new Date();\n date.setTime(+point);\n return d3TimeFormat(formatString || '%b/%d')(date);\n };\n\n private _getStringFormattedNumber = (point: string, formatString?: string): string => {\n return d3Format(formatString || '.2~s')(+point);\n };\n\n private _getFormattedLabelForXAxisDataPoint = (point: string): string => {\n const { xAxisStringFormatter } = this.props;\n return xAxisStringFormatter ? xAxisStringFormatter(point) : point;\n };\n\n private _getFormattedLabelForYAxisDataPoint = (point: string): string => {\n const { yAxisStringFormatter } = this.props;\n return yAxisStringFormatter ? yAxisStringFormatter(point) : point;\n };\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legendTitle: string) => {\n return (\n this.state.selectedLegend === legendTitle ||\n (this.state.selectedLegend === '' && this.state.activeLegend === legendTitle)\n );\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this.state.selectedLegend === '' && this.state.activeLegend === '';\n };\n\n private _getAriaLabel = (point: FlattenData): string => {\n const xValue = point.x;\n const yValue = point.y;\n const legend = point.legend;\n const zValue = point.ratio ? `${point.ratio[0]}/${point.ratio[1]}` : point.rectText || point.value;\n const description = point.descriptionMessage;\n return (\n point.callOutAccessibilityData?.ariaLabel ||\n `${xValue}, ${yValue}. ${legend}, ${zValue}.` + (description ? ` ${description}.` : '')\n );\n };\n\n private _isChartEmpty(): boolean {\n return !(this.props.data && this.props.data.length > 0);\n }\n\n private _getChartTitle = (): string => {\n const { chartTitle } = this.props;\n const numDataPoints = this.props.data.reduce((acc, curr) => acc + curr.data.length, 0);\n return (chartTitle ? `${chartTitle}. ` : '') + `Heat map chart with ${numDataPoints} data points. `;\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"HeatMapChart.base.js","sourceRoot":"../src/","sources":["components/HeatMapChart/HeatMapChart.base.tsx"],"names":[],"mappings":";;;;AAAA,iEAAoH;AAQpH,qCAAwD;AACxD,2DAMuC;AACvC,qDAA2D;AAC3D,uDAA8D;AAE9D,6BAA+B;AAE/B,0CAAsE;AACtE,6DAAiE;AACjE,uDAYmC;AAEnC,uCAA+C;AAC/C,iDAA4D;AAC5D,iDAA0D;AAC1D,yEAA6D;AA+D7D,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAgD,CAAC;AACzF;IAAsC,4CAAuD;IA+B3F,0BAAmB,KAAyB;;QAC1C,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;QAdf;;;WAGG;QACK,mBAAa,GAAgC,EAAE,CAAC;QAsJjD,aAAO,GAAG,UAAC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["import { CartesianChart, IChildProps, IModifiedCartesianChartProps } from '../../components/CommonComponents/index';\nimport {\n IAccessibilityProps,\n IChart,\n IHeatMapChartData,\n IHeatMapChartDataPoint,\n IImageExportOptions,\n} from '../../types/IDataPoint';\nimport { scaleLinear as d3ScaleLinear } from 'd3-scale';\nimport {\n classNamesFunction,\n getId,\n getRTL,\n initializeComponentRef,\n memoizeFunction,\n} from '@fluentui/react/lib/Utilities';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport * as React from 'react';\nimport { IHeatMapChartProps, IHeatMapChartStyleProps, IHeatMapChartStyles } from './HeatMapChart.types';\nimport { ILegend, ILegendContainer, Legends } from '../Legends/index';\nimport { formatToLocaleString } from '@fluentui/chart-utilities';\nimport {\n ChartTypes,\n createNumericYAxis,\n getAccessibleDataObject,\n XAxisTypes,\n YAxisType,\n getTypeOfAxis,\n IMargins,\n IDomainNRange,\n domainRangeOfXStringAxis,\n createStringYAxis,\n resolveCSSVariables,\n} from '../../utilities/utilities';\nimport { Target } from '@fluentui/react';\nimport { format as d3Format } from 'd3-format';\nimport { timeFormat as d3TimeFormat } from 'd3-time-format';\nimport { getColorContrast } from '../../utilities/colors';\nimport { toImage } from '../../utilities/image-export-utils';\n\ntype DataSet = {\n dataSet: RectanglesGraphData;\n yAxisPoints: string[];\n xAxisPoints: string[];\n};\ntype FlattenData = IHeatMapChartDataPoint & {\n legend: string;\n};\ninterface IRectRef {\n data: FlattenData;\n refElement: SVGGElement;\n}\ntype RectanglesGraphData = { [key: string]: FlattenData[] };\nexport interface IHeatMapChartState {\n /**\n * contains the selected legend string\n */\n selectedLegend: string;\n /**\n * contains the hovered legend string\n */\n activeLegend: string;\n /**\n * determines wethere to show or hide the callout\n * @default false\n */\n isCalloutVisible: boolean;\n /**\n * y value to be shown in callout\n */\n calloutYValue: string;\n /**\n * legend title to be shown in callout\n */\n calloutLegend: string;\n /**\n * color of the text in the callout\n */\n calloutTextColor: string;\n /**\n * The target that the Callout should try to position itself based on\n */\n target: Target;\n /**\n * ratio to show in the callout\n */\n ratio: [number, number] | null;\n\n /**\n * description message to show in the callout\n */\n descriptionMessage: string;\n /**\n * id to give to callout for accesiblity purpose\n */\n calloutId: string;\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\nconst getClassNames = classNamesFunction<IHeatMapChartStyleProps, IHeatMapChartStyles>();\nexport class HeatMapChartBase extends React.Component<IHeatMapChartProps, IHeatMapChartState> implements IChart {\n private _classNames: IProcessedStyleSet<IHeatMapChartStyles>;\n private _stringXAxisDataPoints: string[];\n private _stringYAxisDataPoints: string[];\n private _createSet: (\n data: IHeatMapChartData[],\n xDate: string | undefined,\n xNum: string | undefined,\n yDate: string | undefined,\n yNum: string | undefined,\n ) => DataSet;\n private _dataSet: RectanglesGraphData;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _colorScale: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _xAxisScale: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _yAxisScale: any;\n /**\n * This array contains ref for all the rectangles\n * drawn inside the chard\n */\n private _rectRefArray: { [key: string]: IRectRef } = {};\n private _xAxisType: XAxisTypes;\n private _yAxisType: YAxisType;\n private _calloutAnchorPoint: FlattenData | null;\n private _emptyChartId: string;\n private margins: IMargins;\n private _cartesianChartRef: React.RefObject<IChart>;\n private _legendsRef: React.RefObject<ILegendContainer>;\n\n public constructor(props: IHeatMapChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n /**\n * below funciton creates a new data set from the prop\n * @data and also finds all the unique x-axis datapoints\n * and y-axis datapoints(which will render in the axis in graph)\n * we store this in a memoized function, because we want to calulate\n * this set whenever props changes.\n */\n this._createSet = memoizeFunction(\n (\n data: IHeatMapChartData[],\n xDate: string | undefined,\n xNum: string | undefined,\n yDate: string | undefined,\n yNum: string | undefined,\n ): DataSet => this._createNewDataSet(data, xDate, xNum, yDate, yNum),\n );\n this.state = {\n selectedLegend: props.legendProps?.selectedLegend ?? '',\n activeLegend: '',\n isCalloutVisible: false,\n target: null,\n calloutLegend: '',\n calloutTextColor: '',\n calloutYValue: '',\n ratio: null,\n descriptionMessage: '',\n calloutId: '',\n };\n this._emptyChartId = getId('_HeatMap_empty');\n this._cartesianChartRef = React.createRef();\n this._legendsRef = React.createRef();\n }\n\n public componentDidUpdate(prevProps: IHeatMapChartProps): void {\n if (prevProps.legendProps?.selectedLegend !== this.props.legendProps?.selectedLegend) {\n this.setState({\n selectedLegend: this.props.legendProps?.selectedLegend ?? '',\n });\n }\n }\n\n public render(): React.ReactNode {\n const { x, y } = this._getXandY();\n this._xAxisType = getTypeOfAxis(x, true) as XAxisTypes;\n this._yAxisType = getTypeOfAxis(y, false) as YAxisType;\n const { data, xAxisDateFormatString, xAxisNumberFormatString, yAxisDateFormatString, yAxisNumberFormatString } =\n this.props;\n this._colorScale = this._getColorScale();\n const { dataSet, xAxisPoints, yAxisPoints } = this._createSet(\n data,\n xAxisDateFormatString,\n xAxisNumberFormatString,\n yAxisDateFormatString,\n yAxisNumberFormatString,\n );\n this._dataSet = dataSet;\n this._stringYAxisDataPoints = yAxisPoints;\n this._stringXAxisDataPoints = xAxisPoints;\n this._classNames = getClassNames(this.props.styles!, { theme: this.props.theme! });\n const calloutProps: IModifiedCartesianChartProps['calloutProps'] = {\n isBeakVisible: false,\n gapSpace: 8,\n ...this.props.calloutProps,\n isCalloutVisible: this.state.isCalloutVisible,\n id: this.state.calloutId,\n YValue: this.state.calloutYValue,\n legend: this.state.calloutLegend,\n color: this.state.calloutTextColor,\n target: this.state.target,\n styles: this._classNames.subComponentStyles.calloutStyles,\n directionalHint: DirectionalHint.topAutoEdge,\n onDismiss: this._closeCallout,\n ...getAccessibleDataObject(this.state.callOutAccessibilityData, 'text', false),\n preventDismissOnLostFocus: true,\n };\n const chartHoverProps: IModifiedCartesianChartProps['chartHoverProps'] = {\n ...(this.state.ratio && {\n ratio: this.state.ratio,\n }),\n descriptionMessage: this.state.descriptionMessage,\n };\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n return !this._isChartEmpty() ? (\n <CartesianChart\n {...this.props}\n chartTitle={this._getChartTitle()}\n points={data}\n chartType={ChartTypes.HeatMapChart}\n xAxisType={XAxisTypes.StringAxis}\n yAxisType={YAxisType.StringAxis}\n calloutProps={calloutProps}\n createYAxis={createNumericYAxis}\n chartHoverProps={chartHoverProps}\n styles={this._classNames.subComponentStyles!.cartesianStyles}\n datasetForXAxisDomain={this._stringXAxisDataPoints}\n stringDatasetForYAxisDomain={this._stringYAxisDataPoints}\n createStringYAxis={createStringYAxis}\n getDomainNRangeValues={this._getDomainNRangeValues}\n getMinMaxOfYAxis={this._getMinMaxOfYAxis}\n getmargins={this._getMargins}\n xAxisTickCount={this._stringXAxisDataPoints.length}\n xAxistickSize={0}\n xAxisPadding={0.02}\n yAxisPadding={0.02}\n svgFocusZoneProps={{\n direction: FocusZoneDirection.bidirectional,\n }}\n legendBars={this._createLegendBars()}\n onChartMouseLeave={this._handleChartMouseLeave}\n ref={this._cartesianChartRef}\n tickParams={tickParams}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n this._xAxisScale = props.xScale;\n this._yAxisScale = props.yScalePrimary;\n return this._createRectangles();\n }}\n />\n ) : (\n <div\n id={this._emptyChartId}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\n />\n );\n }\n\n public get chartContainer(): HTMLElement | null {\n return this._cartesianChartRef.current?.chartContainer || null;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._cartesianChartRef.current?.chartContainer, this._legendsRef.current?.toSVG, getRTL(), opts);\n };\n\n private _getMinMaxOfYAxis = () => {\n return { startValue: 0, endValue: 0 };\n };\n\n private _getDomainNRangeValues = (\n points: IHeatMapChartDataPoint[],\n margins: IMargins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) => {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis || xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(this.margins, width, isRTL);\n }\n return domainNRangeValue;\n };\n\n private _getXandY = (): { x: string | Date | number; y: string | Date | number } => {\n let x: string | Date | number = '';\n let y: string | Date | number = '';\n this.props.data.forEach((item: IHeatMapChartData) => {\n if (item.data && item.data.length > 0) {\n x = item.data[0].x;\n y = item.data[0].y;\n return { x, y };\n }\n });\n return { x, y };\n };\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _getOpacity = (legendTitle: string): string => {\n const opacity = this._legendHighlighted(legendTitle) || this._noLegendHighlighted() ? '1' : '0.1';\n return opacity;\n };\n\n private _rectRefCallback = (rectElement: SVGGElement, index: number | string, dataPointObject: FlattenData): void => {\n this._rectRefArray[index] = { data: dataPointObject, refElement: rectElement };\n };\n\n private _onRectFocus = (id: string, data: FlattenData): void => {\n this.setState({\n target: this._rectRefArray[id].refElement,\n /** Show the callout if highlighted rectangle is focused and Hide it if unhighlighted rectangle is focused */\n isCalloutVisible: this.state.selectedLegend === '' || this.state.selectedLegend === data.legend,\n calloutYValue: `${data.rectText}`,\n calloutTextColor: Number.isNaN(data.value)\n ? this.props.theme!.semanticColors.bodyText\n : this._colorScale(data.value),\n calloutLegend: data.legend,\n ratio: data.ratio || null,\n descriptionMessage: data.descriptionMessage || '',\n calloutId: id,\n callOutAccessibilityData: data.callOutAccessibilityData,\n });\n };\n\n private _onRectMouseOver = (id: string, data: FlattenData, mouseEvent: React.MouseEvent<SVGGElement>): void => {\n mouseEvent.persist();\n if (this._calloutAnchorPoint !== data) {\n this._calloutAnchorPoint = data;\n this.setState({\n target: this._rectRefArray[id].refElement,\n /** Show the callout if highlighted rectangle is hovered and Hide it if unhighlighted rectangle is hovered */\n isCalloutVisible: this.state.selectedLegend === '' || this.state.selectedLegend === data.legend,\n calloutYValue: `${data.rectText}`,\n calloutTextColor: Number.isNaN(data.value)\n ? this.props.theme!.semanticColors.bodyText\n : this._colorScale(data.value),\n calloutLegend: data.legend,\n ratio: data.ratio || null,\n descriptionMessage: data.descriptionMessage || '',\n calloutId: id,\n callOutAccessibilityData: data.callOutAccessibilityData,\n });\n }\n };\n\n private _onRectBlurOrMouseOut = (): void => {\n /**/\n };\n\n private _handleChartMouseLeave = (): void => {\n this._calloutAnchorPoint = null;\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _getInvertedTextColor = (color: string): string => {\n return color === this.props.theme!.semanticColors.bodyText\n ? this.props.theme!.semanticColors.bodyBackground\n : this.props.theme!.semanticColors.bodyText;\n };\n\n /**\n * This is the function which is responsible for\n * drawing the rectangle in the graph and also\n * attaching dom events to that rectangles\n */\n private _createRectangles = (): React.ReactNode => {\n const rectangles: JSX.Element[] = [];\n const yAxisDataPoints = this._stringYAxisDataPoints.slice().reverse();\n /**\n * yAxisDataPoint is noting but the DataPoint\n * which will be rendered on the y-axis\n */\n yAxisDataPoints.forEach((yAxisDataPoint: string) => {\n let index = 0;\n this._stringXAxisDataPoints.forEach((xAxisDataPoint: string) => {\n let rectElement: JSX.Element;\n const id = `x${xAxisDataPoint}y${yAxisDataPoint}`;\n if (\n this._dataSet[yAxisDataPoint][index]?.x === xAxisDataPoint &&\n typeof this._dataSet[yAxisDataPoint][index]?.value === 'number'\n ) {\n /**\n * dataPointObject is an object where it contains information on single\n * data point such as x, y , value, rectText property of the rectangle\n */\n const dataPointObject = this._dataSet[yAxisDataPoint][index];\n let styleRules = '';\n let foregroundColor = this.props.theme!.semanticColors.bodyText;\n if (this.chartContainer) {\n styleRules = resolveCSSVariables(this.chartContainer!, foregroundColor);\n }\n const contrastRatio = getColorContrast(styleRules, this._colorScale(dataPointObject.value));\n if (contrastRatio < 3) {\n foregroundColor = this._getInvertedTextColor(foregroundColor);\n }\n rectElement = (\n <g\n key={id}\n role=\"img\"\n aria-label={this._getAriaLabel(dataPointObject)}\n data-is-focusable={this._legendHighlighted(dataPointObject.legend) || this._noLegendHighlighted()}\n fillOpacity={this._getOpacity(dataPointObject.legend)}\n transform={`translate(${this._xAxisScale(dataPointObject.x)}, ${this._yAxisScale(dataPointObject.y)})`}\n ref={(gElement: SVGGElement) => {\n this._rectRefCallback(gElement, id, dataPointObject);\n }}\n onFocus={this._onRectFocus.bind(this, id, dataPointObject)}\n onBlur={this._onRectBlurOrMouseOut}\n onMouseOver={this._onRectMouseOver.bind(this, id, dataPointObject)}\n onMouseOut={this._onRectBlurOrMouseOut}\n >\n <rect\n fill={this._colorScale(dataPointObject.value)}\n width={this._xAxisScale.bandwidth()}\n height={this._yAxisScale.bandwidth()}\n onClick={dataPointObject.onClick}\n />\n <text\n dominantBaseline={'middle'}\n textAnchor={'middle'}\n className={this._classNames.text}\n transform={`translate(${this._xAxisScale.bandwidth() / 2}, ${this._yAxisScale.bandwidth() / 2})`}\n fill={foregroundColor}\n >\n {formatToLocaleString(dataPointObject.rectText, this.props.culture, this.props.useUTC)}\n </text>\n </g>\n );\n index++;\n } else {\n const dataPointObject: FlattenData = {\n x: xAxisDataPoint,\n y: yAxisDataPoint,\n value: NaN,\n rectText: 'No data available',\n legend: '',\n };\n rectElement = (\n <g\n key={id}\n role=\"img\"\n aria-label={this._getAriaLabel(dataPointObject)}\n data-is-focusable={this._noLegendHighlighted()}\n transform={`translate(${this._xAxisScale(dataPointObject.x)}, ${this._yAxisScale(dataPointObject.y)})`}\n ref={(gElement: SVGGElement) => {\n this._rectRefCallback(gElement, id, dataPointObject);\n }}\n onFocus={this._onRectFocus.bind(this, id, dataPointObject)}\n onBlur={this._onRectBlurOrMouseOut}\n onMouseOver={this._onRectMouseOver.bind(this, id, dataPointObject)}\n onMouseOut={this._onRectBlurOrMouseOut}\n >\n <rect fill=\"transparent\" width={this._xAxisScale.bandwidth()} height={this._yAxisScale.bandwidth()} />\n </g>\n );\n }\n rectangles.push(rectElement);\n });\n });\n return rectangles;\n };\n /**\n * when the legend is hovered we need to highlight\n * all the rectangles which fall under that category\n * and un-highlight the rest of them\n * @param legendTitle\n */\n private _onLegendHover(legendTitle: string): void {\n this.setState({\n activeLegend: legendTitle,\n });\n }\n\n /**\n * when the mouse is out from the legend , we need\n * to show the graph in initial mode.\n */\n private _onLegendLeave(): void {\n this.setState({\n activeLegend: '',\n });\n }\n /**\n * @param legendTitle\n * when the legend is clicked we need to highlight\n * all the rectangles which fall under that category\n * and un highlight the rest of them\n */\n private _onLegendClick(legendTitle: string): void {\n /**\n * check if the legend is already selceted,\n * if yes, un-select the legend, else\n * set the selected legend state to legendTitle\n */\n if (this.state.selectedLegend === legendTitle) {\n this.setState({\n selectedLegend: '',\n });\n } else {\n this.setState({\n selectedLegend: legendTitle,\n });\n }\n }\n private _createLegendBars = (): JSX.Element => {\n const { data, legendProps } = this.props;\n const legends: ILegend[] = [];\n data.forEach((item: IHeatMapChartData) => {\n const legend: ILegend = {\n title: item.legend,\n color: this._colorScale(item.value),\n action: () => {\n this._onLegendClick(item.legend);\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(item.legend);\n },\n onMouseOutAction: () => {\n this._onLegendLeave();\n },\n };\n legends.push(legend);\n });\n return <Legends {...legendProps} legends={legends} ref={this._legendsRef} />;\n };\n\n private _getColorScale = () => {\n const { domainValuesForColorScale, rangeValuesForColorScale } = this.props;\n return d3ScaleLinear()\n .domain(domainValuesForColorScale)\n .range(rangeValuesForColorScale as unknown as number[]);\n };\n\n private _getXIndex = (value: string | Date | number): string => {\n if (this._xAxisType === XAxisTypes.DateAxis) {\n return `${(value as Date).getTime()}`;\n } else if (this._xAxisType === XAxisTypes.StringAxis) {\n return value as string;\n } else if (this._xAxisType === XAxisTypes.NumericAxis) {\n return `${value}`;\n } else {\n return '';\n }\n };\n private _getYIndex = (value: string | Date | number): string => {\n if (this._yAxisType === YAxisType.DateAxis) {\n return `${(value as Date).getTime()}`;\n } else if (this._yAxisType === YAxisType.StringAxis) {\n return value as string;\n } else if (this._yAxisType === YAxisType.NumericAxis) {\n return `${value}`;\n } else {\n return '';\n }\n };\n\n /**\n * This will create a new data set based on the prop\n * @data\n * We will be using This data set to contsruct our rectangles\n * in the chart, we use this data set becuase, when we loop in this\n * data and build the heat map, it will support accessibility as\n * specified in the figma\n */\n\n private _createNewDataSet = (\n data: IHeatMapChartData[],\n xAxisDateFormatString: string | undefined,\n xAxisNumberFormatString: string | undefined,\n yAxisDateFormatString: string | undefined,\n yAxisNumberFormatString: string | undefined,\n ): DataSet => {\n /**\n * please do not destructure any of the props here,\n * instead send them as parameter to this functions so that\n * this functions get called whenever the prop changes\n */\n const flattenData: FlattenData[] = [];\n /**\n * below for each loop will store all the datapoints in the one array.\n * basically it will flatten the nestesd array (data prop) into single array\n * of object. where each object contains x, y, rectText , value and legend propety of single\n * data point.\n */\n data.forEach((item: IHeatMapChartData) => {\n item.data.forEach((point: IHeatMapChartDataPoint) => {\n flattenData.push({ ...point, legend: item.legend });\n });\n });\n const yPoints: RectanglesGraphData = {};\n const uniqueYPoints: { [key: string]: '1' } = {};\n const uniqueXPoints: { [key: string]: '1' } = {};\n flattenData.forEach((item: FlattenData) => {\n const posX = this._getXIndex(item.x);\n const posY = this._getYIndex(item.y);\n\n uniqueXPoints[posX] = '1';\n uniqueYPoints[posY] = '1';\n /** we will check if the property(posY) is already there in object, if Yes,\n * then we will append the item in the Array related to the pos, if not\n * then we will simply append the item in the new Array and\n * assign that array to the property (posY) in the Object\n * and finally we will get the array of Objects associated to each\n * property (which is nothing but y data point) and object in the\n * array are noting but x data points associated to the property y\n */\n if (yPoints[posY]) {\n yPoints[posY] = [...yPoints[posY], item];\n } else {\n yPoints[posY] = [item];\n }\n });\n /**\n * we will now sort(ascending) the array's of y data point based on the x value\n * sorting is important to achive the accessibility order of the\n * rectangles and then format the x and y datapoints respectively\n */\n Object.keys(yPoints).forEach((item: string) => {\n yPoints[item]\n .sort((a: IHeatMapChartDataPoint, b: IHeatMapChartDataPoint) => {\n if (this._xAxisType === XAxisTypes.StringAxis) {\n return this.props.sortOrder === 'none'\n ? 0\n : (a.x as string).toLowerCase() > (b.x as string).toLowerCase()\n ? 1\n : -1;\n } else if (this._xAxisType === XAxisTypes.DateAxis) {\n return (a.x as Date).getTime() - (b.x as Date).getTime();\n } else if (this._xAxisType === XAxisTypes.NumericAxis) {\n return +(a.x as string) > +(b.x as string) ? 1 : -1;\n } else {\n return a.x > b.x ? 1 : -1;\n }\n })\n .forEach((datapoint: IHeatMapChartDataPoint) => {\n if (this._xAxisType === XAxisTypes.DateAxis) {\n datapoint.x = this._getStringFormattedDate(datapoint.x as string, xAxisDateFormatString);\n }\n if (this._xAxisType === XAxisTypes.NumericAxis) {\n datapoint.x = this._getStringFormattedNumber(datapoint.x as string, xAxisNumberFormatString);\n }\n if (this._xAxisType === XAxisTypes.StringAxis) {\n datapoint.x = this._getFormattedLabelForXAxisDataPoint(datapoint.x as string);\n }\n if (this._yAxisType === YAxisType.DateAxis) {\n datapoint.y = this._getStringFormattedDate(datapoint.y as string, yAxisDateFormatString);\n }\n if (this._yAxisType === YAxisType.NumericAxis) {\n datapoint.y = this._getStringFormattedNumber(datapoint.y as string, yAxisNumberFormatString);\n }\n if (this._yAxisType === YAxisType.StringAxis) {\n datapoint.y = this._getFormattedLabelForYAxisDataPoint(datapoint.y as string);\n }\n });\n });\n /**\n * if y-axis data points are of type date or number or if we have string formatter,\n * then we need to change data points to their respective string\n * format, becuase in the private variable this._stringYAxisDatapoints, points will be stored in\n * string format. and in here `yPoint` are not so we need to change, so that\n * function `this._createRectangles` should work perfetcly while looping, and if we don't change\n * then `this._createRectangles` will fail while looping, causing the error\n * Cannot read property 'forEach' of undefined\n */\n\n Object.keys(yPoints).forEach((yPoint: string) => {\n if (this._yAxisType === YAxisType.DateAxis) {\n yPoints[this._getStringFormattedDate(yPoint, yAxisDateFormatString)] = yPoints[yPoint];\n } else if (this._yAxisType === YAxisType.NumericAxis) {\n yPoints[`${this._getStringFormattedNumber(yPoint, yAxisNumberFormatString)}`] = yPoints[yPoint];\n } else {\n yPoints[this._getFormattedLabelForYAxisDataPoint(yPoint)] = yPoints[yPoint];\n }\n });\n /**\n * assigning new data set\n */\n const dataSet = yPoints;\n /**\n * These are the Y axis data points which will get rendered in the\n * Y axis in graph\n */\n const yAxisPoints = this._getYAxisDataPoints(uniqueYPoints);\n /**\n * These are the x axis data points which will get rendered in the\n * x axis in the graph\n */\n\n const xAxisPoints = this._getXAxisDataPoints(uniqueXPoints);\n return {\n dataSet,\n yAxisPoints,\n xAxisPoints,\n };\n };\n\n /**\n * This function will return the final sorted and formatted x-axis points\n * which will be rendered on the x-axis\n * @param points\n * @returns x-axis points\n */\n private _getXAxisDataPoints = (points: { [key: string]: '1' }): string[] => {\n let xAxisPoints: string[] = [];\n const unFormattedXAxisDataPoints = Object.keys(points).sort((a: string, b: string) => {\n if (this._xAxisType === XAxisTypes.DateAxis || this._xAxisType === XAxisTypes.NumericAxis) {\n return +a - +b;\n } else {\n return this.props.sortOrder === 'none' ? 0 : a.toLowerCase() > b.toLowerCase() ? 1 : -1;\n }\n });\n xAxisPoints = unFormattedXAxisDataPoints.map((xPoint: string) => {\n if (this._xAxisType === XAxisTypes.DateAxis) {\n return this._getStringFormattedDate(xPoint, this.props.xAxisDateFormatString);\n } else if (this._xAxisType === XAxisTypes.NumericAxis) {\n return this._getStringFormattedNumber(xPoint, this.props.xAxisNumberFormatString);\n } else {\n return this._getFormattedLabelForXAxisDataPoint(xPoint);\n }\n });\n\n return xAxisPoints;\n };\n /**\n * This function will return the final sorted and formatted y-axis points\n * which will be rendered on the y-axis\n * @param points\n * @returns yaxis points\n */\n private _getYAxisDataPoints = (points: { [key: string]: '1' }): string[] => {\n let yAxisPoints: string[] = [];\n const unFormattedYAxisDataPoints = Object.keys(points).sort((a: string, b: string) => {\n if (this._yAxisType === YAxisType.DateAxis || this._yAxisType === YAxisType.NumericAxis) {\n return +a - +b;\n } else {\n return this.props.sortOrder === 'none' ? 0 : a.toLowerCase() > b.toLowerCase() ? 1 : -1;\n }\n });\n yAxisPoints = unFormattedYAxisDataPoints.map((yPoint: string) => {\n if (this._yAxisType === YAxisType.DateAxis) {\n return this._getStringFormattedDate(yPoint, this.props.yAxisDateFormatString);\n } else if (this._yAxisType === YAxisType.NumericAxis) {\n return this._getStringFormattedNumber(yPoint, this.props.yAxisNumberFormatString);\n } else {\n return this._getFormattedLabelForYAxisDataPoint(yPoint);\n }\n });\n\n return yAxisPoints;\n };\n\n private _getStringFormattedDate = (point: string, formatString?: string): string => {\n const date = new Date();\n date.setTime(+point);\n return d3TimeFormat(formatString || '%b/%d')(date);\n };\n\n private _getStringFormattedNumber = (point: string, formatString?: string): string => {\n return d3Format(formatString || '.2~s')(+point);\n };\n\n private _getFormattedLabelForXAxisDataPoint = (point: string): string => {\n const { xAxisStringFormatter } = this.props;\n return xAxisStringFormatter ? xAxisStringFormatter(point) : point;\n };\n\n private _getFormattedLabelForYAxisDataPoint = (point: string): string => {\n const { yAxisStringFormatter } = this.props;\n return yAxisStringFormatter ? yAxisStringFormatter(point) : point;\n };\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legendTitle: string) => {\n return (\n this.state.selectedLegend === legendTitle ||\n (this.state.selectedLegend === '' && this.state.activeLegend === legendTitle)\n );\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this.state.selectedLegend === '' && this.state.activeLegend === '';\n };\n\n private _getAriaLabel = (point: FlattenData): string => {\n const xValue = point.x;\n const yValue = point.y;\n const legend = point.legend;\n const zValue = point.ratio ? `${point.ratio[0]}/${point.ratio[1]}` : point.rectText || point.value;\n const description = point.descriptionMessage;\n return (\n point.callOutAccessibilityData?.ariaLabel ||\n `${xValue}, ${yValue}. ${legend}, ${zValue}.` + (description ? ` ${description}.` : '')\n );\n };\n\n private _isChartEmpty(): boolean {\n return !(this.props.data && this.props.data.length > 0);\n }\n\n private _getChartTitle = (): string => {\n const { chartTitle } = this.props;\n const numDataPoints = this.props.data.reduce((acc, curr) => acc + curr.data.length, 0);\n return (chartTitle ? `${chartTitle}. ` : '') + `Heat map chart with ${numDataPoints} data points. `;\n };\n}\n"]}
|
|
@@ -6,7 +6,7 @@ var React = require("react");
|
|
|
6
6
|
var Utilities_1 = require("@fluentui/react/lib/Utilities");
|
|
7
7
|
var index_1 = require("./index");
|
|
8
8
|
var Callout_1 = require("@fluentui/react/lib/Callout");
|
|
9
|
-
var
|
|
9
|
+
var chart_utilities_1 = require("@fluentui/chart-utilities");
|
|
10
10
|
var index_2 = require("../../utilities/index");
|
|
11
11
|
var react_focus_1 = require("@fluentui/react-focus");
|
|
12
12
|
var FocusableTooltipText_1 = require("../../utilities/FocusableTooltipText");
|
|
@@ -180,13 +180,13 @@ var HorizontalBarChartBase = /** @class */ (function (_super) {
|
|
|
180
180
|
var accessibilityData = (0, index_2.getAccessibleDataObject)(data.chartDataAccessibilityData, 'text', false);
|
|
181
181
|
switch (chartDataMode) {
|
|
182
182
|
case 'default':
|
|
183
|
-
return (React.createElement("div", tslib_1.__assign({ className: this._classNames.chartTitleRight }, accessibilityData), (0,
|
|
183
|
+
return (React.createElement("div", tslib_1.__assign({ className: this._classNames.chartTitleRight }, accessibilityData), (0, chart_utilities_1.formatToLocaleString)(x, culture)));
|
|
184
184
|
case 'fraction':
|
|
185
185
|
return (React.createElement("div", tslib_1.__assign({}, accessibilityData),
|
|
186
|
-
React.createElement("span", { className: this._classNames.chartTitleRight }, (0,
|
|
187
|
-
React.createElement("span", { className: this._classNames.chartDataTextDenominator }, ' / ' + (0,
|
|
186
|
+
React.createElement("span", { className: this._classNames.chartTitleRight }, (0, chart_utilities_1.formatToLocaleString)(x, culture)),
|
|
187
|
+
React.createElement("span", { className: this._classNames.chartDataTextDenominator }, ' / ' + (0, chart_utilities_1.formatToLocaleString)(y, culture))));
|
|
188
188
|
case 'percentage':
|
|
189
|
-
var dataRatioPercentage = "".concat((0,
|
|
189
|
+
var dataRatioPercentage = "".concat((0, chart_utilities_1.formatToLocaleString)(Math.round((x / y) * 100), culture), "%");
|
|
190
190
|
return (React.createElement("div", tslib_1.__assign({ className: this._classNames.chartTitleRight }, accessibilityData), dataRatioPercentage));
|
|
191
191
|
}
|
|
192
192
|
};
|
|
@@ -273,7 +273,7 @@ var HorizontalBarChartBase = /** @class */ (function (_super) {
|
|
|
273
273
|
return React.createElement("text", { key: index });
|
|
274
274
|
}
|
|
275
275
|
var barValue = data.chartData[0].horizontalBarChartdata.x;
|
|
276
|
-
return (React.createElement("text", { key: index, x: "".concat(_this._isRTL ? 100 - startingPoint[index] : startingPoint[index], "%"), y: _this._barHeight / 2, dominantBaseline: "central", transform: "translate(".concat(_this._isRTL ? -4 : 4, ")"), className: _this._classNames.barLabel, "aria-hidden": true }, (0, index_2.
|
|
276
|
+
return (React.createElement("text", { key: index, x: "".concat(_this._isRTL ? 100 - startingPoint[index] : startingPoint[index], "%"), y: _this._barHeight / 2, dominantBaseline: "central", transform: "translate(".concat(_this._isRTL ? -4 : 4, ")"), className: _this._classNames.barLabel, "aria-hidden": true }, (0, index_2.formatScientificLimitWidth)(barValue)));
|
|
277
277
|
}
|
|
278
278
|
var gradientId = (0, Utilities_1.getId)('HBC_Gradient') + "_".concat(dataPointIndex, "_").concat(index);
|
|
279
279
|
return (React.createElement(React.Fragment, { key: index },
|