@fluentui/react-charting 5.24.38 → 5.25.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 +99 -1
- package/CHANGELOG.md +34 -2
- package/dist/react-charting.d.ts +129 -1
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +76 -1
- package/lib/components/AreaChart/AreaChart.base.d.ts +2 -1
- package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.base.d.ts +2 -1
- package/lib/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.d.ts +3 -0
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +343 -0
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.d.ts +28 -0
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js +111 -0
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js.map +1 -0
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.d.ts +52 -0
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +2 -0
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
- package/lib/components/CommonComponents/CartesianChart.base.d.ts +2 -1
- package/lib/components/CommonComponents/CartesianChart.base.js +38 -46
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.styles.js +9 -1
- package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.d.ts +19 -2
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/CommonComponents/index.d.ts +2 -0
- package/lib/components/CommonComponents/index.js +2 -0
- package/lib/components/CommonComponents/index.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +641 -76
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.d.ts +2 -1
- package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.base.d.ts +2 -1
- package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.d.ts +3 -2
- package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.base.js.map +1 -1
- package/lib/components/FunnelChart/funnelGeometry.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.base.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.base.d.ts +2 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +2 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib/components/Legends/Legends.base.d.ts +2 -1
- package/lib/components/Legends/Legends.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.base.d.ts +2 -1
- package/lib/components/LineChart/LineChart.base.js.map +1 -1
- package/lib/components/PieChart/Arc/Arc.d.ts +3 -2
- package/lib/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib/components/PieChart/Pie/Pie.d.ts +3 -2
- package/lib/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib/components/PieChart/PieChart.base.d.ts +2 -1
- package/lib/components/PieChart/PieChart.base.js.map +1 -1
- package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib/components/Sparkline/Sparkline.base.d.ts +3 -2
- package/lib/components/Sparkline/Sparkline.base.js.map +1 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.d.ts +2 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib/components/StackedBarChart/StackedBarChart.base.d.ts +2 -1
- package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib/components/TreeChart/TreeChart.base.d.ts +2 -1
- package/lib/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js.map +1 -1
- package/lib/types/IChartAnnotation.d.ts +99 -0
- package/lib/types/IChartAnnotation.js +2 -0
- package/lib/types/IChartAnnotation.js.map +1 -0
- package/lib/types/IDataPoint.d.ts +4 -0
- package/lib/types/IDataPoint.js.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/types/index.js.map +1 -1
- package/lib/utilities/image-export-utils.js +55 -0
- package/lib/utilities/image-export-utils.js.map +1 -1
- package/lib/utilities/scatterpolar-utils.d.ts +2 -2
- package/lib/utilities/scatterpolar-utils.js.map +1 -1
- package/lib/utilities/utilities.d.ts +14 -14
- package/lib/utilities/utilities.js +72 -20
- package/lib/utilities/utilities.js.map +1 -1
- package/lib/utilities/vbc-utils.js.map +1 -1
- package/lib-amd/components/AreaChart/AreaChart.base.d.ts +2 -1
- package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-amd/components/ChartTable/ChartTable.base.d.ts +2 -1
- package/lib-amd/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.d.ts +3 -0
- package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.js +344 -0
- package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
- package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.d.ts +28 -0
- package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js +119 -0
- package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js.map +1 -0
- package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.types.d.ts +52 -0
- package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +5 -0
- package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
- package/lib-amd/components/CommonComponents/CartesianChart.base.d.ts +2 -1
- package/lib-amd/components/CommonComponents/CartesianChart.base.js +38 -47
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.styles.js +9 -1
- package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +19 -2
- package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-amd/components/CommonComponents/index.d.ts +2 -0
- package/lib-amd/components/CommonComponents/index.js +3 -1
- package/lib-amd/components/CommonComponents/index.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +641 -76
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/DonutChart/Arc/Arc.d.ts +2 -1
- package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/DonutChart/DonutChart.base.d.ts +2 -1
- package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-amd/components/DonutChart/Pie/Pie.d.ts +3 -2
- package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-amd/components/FunnelChart/FunnelChart.base.js.map +1 -1
- package/lib-amd/components/FunnelChart/funnelGeometry.js.map +1 -1
- package/lib-amd/components/GanttChart/GanttChart.base.js.map +1 -1
- package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.d.ts +2 -1
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +2 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-amd/components/Legends/Legends.base.d.ts +2 -1
- package/lib-amd/components/Legends/Legends.base.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.base.d.ts +2 -1
- package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-amd/components/PieChart/Arc/Arc.d.ts +3 -2
- package/lib-amd/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/PieChart/Pie/Pie.d.ts +3 -2
- package/lib-amd/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib-amd/components/PieChart/PieChart.base.d.ts +2 -1
- package/lib-amd/components/PieChart/PieChart.base.js.map +1 -1
- package/lib-amd/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
- package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib-amd/components/Sparkline/Sparkline.base.d.ts +3 -2
- package/lib-amd/components/Sparkline/Sparkline.base.js.map +1 -1
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.d.ts +2 -1
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.d.ts +2 -1
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-amd/components/TreeChart/TreeChart.base.d.ts +2 -1
- package/lib-amd/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -1
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-amd/index.d.ts +1 -1
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/types/IChartAnnotation.d.ts +99 -0
- package/lib-amd/types/IChartAnnotation.js +5 -0
- package/lib-amd/types/IChartAnnotation.js.map +1 -0
- package/lib-amd/types/IDataPoint.d.ts +4 -0
- package/lib-amd/types/IDataPoint.js.map +1 -1
- package/lib-amd/types/index.d.ts +1 -0
- package/lib-amd/types/index.js +2 -1
- package/lib-amd/types/index.js.map +1 -1
- package/lib-amd/utilities/image-export-utils.js +55 -0
- package/lib-amd/utilities/image-export-utils.js.map +1 -1
- package/lib-amd/utilities/scatterpolar-utils.d.ts +2 -2
- package/lib-amd/utilities/scatterpolar-utils.js.map +1 -1
- package/lib-amd/utilities/utilities.d.ts +14 -14
- package/lib-amd/utilities/utilities.js +72 -20
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-amd/utilities/vbc-utils.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.d.ts +2 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.base.d.ts +2 -1
- package/lib-commonjs/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.d.ts +3 -0
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +346 -0
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.d.ts +28 -0
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js +118 -0
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.d.ts +52 -0
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +3 -0
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.d.ts +2 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +38 -46
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js +9 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +19 -2
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/index.d.ts +2 -0
- package/lib-commonjs/components/CommonComponents/index.js +2 -0
- package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +641 -76
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.d.ts +2 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.base.d.ts +2 -1
- package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.d.ts +3 -2
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.base.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.d.ts +2 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +2 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.base.d.ts +2 -1
- package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.d.ts +2 -1
- package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-commonjs/components/PieChart/Arc/Arc.d.ts +3 -2
- package/lib-commonjs/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/PieChart/Pie/Pie.d.ts +3 -2
- package/lib-commonjs/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/PieChart/PieChart.base.d.ts +2 -1
- package/lib-commonjs/components/PieChart/PieChart.base.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib-commonjs/components/Sparkline/Sparkline.base.d.ts +3 -2
- package/lib-commonjs/components/Sparkline/Sparkline.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.d.ts +2 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.d.ts +2 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/TreeChart/TreeChart.base.d.ts +2 -1
- package/lib-commonjs/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/index.d.ts +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/IChartAnnotation.d.ts +99 -0
- package/lib-commonjs/types/IChartAnnotation.js +3 -0
- package/lib-commonjs/types/IChartAnnotation.js.map +1 -0
- package/lib-commonjs/types/IDataPoint.d.ts +4 -0
- package/lib-commonjs/types/IDataPoint.js.map +1 -1
- package/lib-commonjs/types/index.d.ts +1 -0
- package/lib-commonjs/types/index.js +1 -0
- package/lib-commonjs/types/index.js.map +1 -1
- package/lib-commonjs/utilities/image-export-utils.js +55 -0
- package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
- package/lib-commonjs/utilities/scatterpolar-utils.d.ts +2 -2
- package/lib-commonjs/utilities/scatterpolar-utils.js.map +1 -1
- package/lib-commonjs/utilities/utilities.d.ts +14 -14
- package/lib-commonjs/utilities/utilities.js +72 -20
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
- package/package.json +9 -9
- package/src/components/CommonComponents/Annotations/ChartAnnotationLayer.types.ts +58 -0
- package/src/components/CommonComponents/CartesianChart.types.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GxB;QAmyBJ,uBAAC;KAAA,AAvyBD,CAAsC,KAAK,CAAC,SAAS,GAuyBpD;IAvyBY,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 { 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 sortAxisCategories,\n getContrastTextColor,\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 { 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 public static defaultProps: Partial<IHeatMapChartProps> = {\n xAxisCategoryOrder: 'default',\n yAxisCategoryOrder: 'default',\n };\n\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 calloutMaxWidth: 238,\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 /**\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 // eslint-disable-next-line @typescript-eslint/no-deprecated\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 // eslint-disable-next-line @typescript-eslint/no-deprecated\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 const foregroundColor = getContrastTextColor(this._colorScale(dataPointObject.value), this.props.theme!);\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 {\n formatToLocaleString(\n dataPointObject.rectText,\n this.props.culture,\n this.props.useUTC,\n ) as React.ReactNode\n }\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 // eslint-disable-next-line @typescript-eslint/no-deprecated\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] = this._getOrderedXPoints(yPoints[item]);\n\n yPoints[item].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 = this._getOrderedXAxisLabels(points);\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 = this._getOrderedYAxisLabels(points);\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 private _getOrderedXAxisLabels = (points: { [key: string]: '1' }) => {\n if (!this._shouldOrderXAxisLabelsByCategoryOrder()) {\n // Keep the original ordering logic as the default behavior to ensure backward compatibility\n return 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 }\n\n return sortAxisCategories(this._mapCategoryToValues(), this.props.xAxisCategoryOrder);\n };\n\n private _getOrderedYAxisLabels = (points: { [key: string]: '1' }) => {\n if (!this._shouldOrderYAxisLabelsByCategoryOrder()) {\n // Keep the original ordering logic as the default behavior to ensure backward compatibility\n return 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 }\n\n return sortAxisCategories(this._mapCategoryToValues(true), this.props.yAxisCategoryOrder);\n };\n\n private _getOrderedXPoints = (xPoints: FlattenData[]) => {\n if (!this._shouldOrderXAxisLabelsByCategoryOrder()) {\n return xPoints.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 }\n\n const result: FlattenData[] = [];\n\n const xValueToPoints: Record<string, FlattenData[]> = {};\n xPoints.forEach(point => {\n const xValue = point.x as string;\n if (!xValueToPoints[xValue]) {\n xValueToPoints[xValue] = [];\n }\n xValueToPoints[xValue].push(point);\n });\n\n const xAxisLabels = this._getOrderedXAxisLabels({});\n xAxisLabels.forEach(xValue => {\n if (xValueToPoints[xValue]) {\n result.push(...xValueToPoints[xValue]);\n }\n });\n\n return result;\n };\n\n private _shouldOrderXAxisLabelsByCategoryOrder = () => {\n return this._xAxisType === XAxisTypes.StringAxis && this.props.xAxisCategoryOrder !== 'default';\n };\n\n private _shouldOrderYAxisLabelsByCategoryOrder = () => {\n return this._yAxisType === YAxisType.StringAxis && this.props.yAxisCategoryOrder !== 'default';\n };\n\n private _mapCategoryToValues = (isYAxis = false) => {\n const categoryToValues: Record<string, number[]> = {};\n this.props.data.forEach(item => {\n item.data.forEach(point => {\n const category = (isYAxis ? point.y : point.x) as string;\n if (!categoryToValues[category]) {\n categoryToValues[category] = [];\n }\n categoryToValues[category].push(point.value);\n });\n });\n return categoryToValues;\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"HeatMapChart.base.js","sourceRoot":"../src/","sources":["components/HeatMapChart/HeatMapChart.base.tsx"],"names":[],"mappings":";;;;IAwGA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAgD,CAAC;IACzF;QAAsC,4CAAuD;QAoC3F,0BAAmB,KAAyB;;YAC1C,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAdf;;;eAGG;YACK,mBAAa,GAAgC,EAAE,CAAC;YAuJjD,aAAO,GAAG,UAAC,IAA0B;;gBAC1C,OAAO,IAAA,4BAAO,EAAC,MAAA,KAAI,CAAC,kBAAkB,CAAC,OAAO,0CAAE,cAAc,EAAE,MAAA,KAAI,CAAC,WAAW,CAAC,OAAO,0CAAE,KAAK,EAAE,IAAA,kBAAM,GAAE,EAAE,IAAI,CAAC,CAAC;YACnH,CAAC,CAAC;YAEM,uBAAiB,GAAG;gBAC1B,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;YACxC,CAAC,CAAC;YAEM,4BAAsB,GAAG,UAC/B,MAAgC,EAChC,OAAiB,EACjB,KAAa,EACb,SAAqB,EACrB,KAAc,EACd,SAAqB,EACrB,QAAgB,EAChB,UAAyC,EACzC,MAAc;gBAEd,I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Ac,EAAE,EAAE;iBACnB,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,QAAQ,CAAC;oBACZ,cAAc,EAAE,WAAW;iBAC5B,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QA0RO,wCAAa,GAArB;YACE,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC1D,CAAC;QAnsBa,6BAAY,GAAgC;YACxD,kBAAkB,EAAE,SAAS;YAC7B,kBAAkB,EAAE,SAAS;SAC9B,AAHyB,CAGxB;QAmyBJ,uBAAC;KAAA,AAvyBD,CAAsC,KAAK,CAAC,SAAS,GAuyBpD;IAvyBY,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 { 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 sortAxisCategories,\n getContrastTextColor,\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 { toImage } from '../../utilities/image-export-utils';\nimport type { JSXElement } from '@fluentui/utilities';\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 public static defaultProps: Partial<IHeatMapChartProps> = {\n xAxisCategoryOrder: 'default',\n yAxisCategoryOrder: 'default',\n };\n\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 calloutMaxWidth: 238,\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 /**\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 // eslint-disable-next-line @typescript-eslint/no-deprecated\n const rectangles: JSXElement[] = [];\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 // eslint-disable-next-line @typescript-eslint/no-deprecated\n let rectElement: JSXElement;\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 const foregroundColor = getContrastTextColor(this._colorScale(dataPointObject.value), this.props.theme!);\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 {\n formatToLocaleString(\n dataPointObject.rectText,\n this.props.culture,\n this.props.useUTC,\n ) as React.ReactNode\n }\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 // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _createLegendBars = (): JSXElement => {\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] = this._getOrderedXPoints(yPoints[item]);\n\n yPoints[item].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 = this._getOrderedXAxisLabels(points);\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 = this._getOrderedYAxisLabels(points);\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 private _getOrderedXAxisLabels = (points: { [key: string]: '1' }) => {\n if (!this._shouldOrderXAxisLabelsByCategoryOrder()) {\n // Keep the original ordering logic as the default behavior to ensure backward compatibility\n return 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 }\n\n return sortAxisCategories(this._mapCategoryToValues(), this.props.xAxisCategoryOrder);\n };\n\n private _getOrderedYAxisLabels = (points: { [key: string]: '1' }) => {\n if (!this._shouldOrderYAxisLabelsByCategoryOrder()) {\n // Keep the original ordering logic as the default behavior to ensure backward compatibility\n return 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 }\n\n return sortAxisCategories(this._mapCategoryToValues(true), this.props.yAxisCategoryOrder);\n };\n\n private _getOrderedXPoints = (xPoints: FlattenData[]) => {\n if (!this._shouldOrderXAxisLabelsByCategoryOrder()) {\n return xPoints.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 }\n\n const result: FlattenData[] = [];\n\n const xValueToPoints: Record<string, FlattenData[]> = {};\n xPoints.forEach(point => {\n const xValue = point.x as string;\n if (!xValueToPoints[xValue]) {\n xValueToPoints[xValue] = [];\n }\n xValueToPoints[xValue].push(point);\n });\n\n const xAxisLabels = this._getOrderedXAxisLabels({});\n xAxisLabels.forEach(xValue => {\n if (xValueToPoints[xValue]) {\n result.push(...xValueToPoints[xValue]);\n }\n });\n\n return result;\n };\n\n private _shouldOrderXAxisLabelsByCategoryOrder = () => {\n return this._xAxisType === XAxisTypes.StringAxis && this.props.xAxisCategoryOrder !== 'default';\n };\n\n private _shouldOrderYAxisLabelsByCategoryOrder = () => {\n return this._yAxisType === YAxisType.StringAxis && this.props.yAxisCategoryOrder !== 'default';\n };\n\n private _mapCategoryToValues = (isYAxis = false) => {\n const categoryToValues: Record<string, number[]> = {};\n this.props.data.forEach(item => {\n item.data.forEach(point => {\n const category = (isYAxis ? point.y : point.x) as string;\n if (!categoryToValues[category]) {\n categoryToValues[category] = [];\n }\n categoryToValues[category].push(point.value);\n });\n });\n return categoryToValues;\n };\n}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IAccessibilityProps, IHorizontalBarChartProps, IChartDataPoint } from './index';
|
|
3
|
+
import type { JSXElement } from '@fluentui/utilities';
|
|
3
4
|
export interface IHorizontalBarChartState {
|
|
4
5
|
isCalloutVisible: boolean;
|
|
5
6
|
refSelected: SVGGElement | null | undefined;
|
|
@@ -25,7 +26,7 @@ export declare class HorizontalBarChartBase extends React.Component<IHorizontalB
|
|
|
25
26
|
private _emptyChartId;
|
|
26
27
|
constructor(props: IHorizontalBarChartProps);
|
|
27
28
|
componentDidMount(): void;
|
|
28
|
-
render():
|
|
29
|
+
render(): JSXElement;
|
|
29
30
|
private _refCallback;
|
|
30
31
|
private _hoverOn;
|
|
31
32
|
private _hoverOff;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalBarChart.base.js","sourceRoot":"../src/","sources":["components/HorizontalBarChart/HorizontalBarChart.base.tsx"],"names":[],"mappings":";;;;IAwBA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA4D,CAAC;IAgBrG;QAA4C,kDAAmE;QAW7G,gCAAY,KAA+B;YACzC,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YALP,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;YA6L3B,4BAAsB,GAAG;gBAC/B,KAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;gBAChC,IAAI,KAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC;oBAChC,KAAI,CAAC,QAAQ,CAAC;wBACZ,gBAAgB,EAAE,KAAK;wBACvB,UAAU,EAAE,EAAE;wBACd,WAAW,EAAE,IAAI;wBACjB,SAAS,EAAE,EAAE;wBACb,MAAM,EAAE,EAAE;qBACX,CAAC,CAAC;gBACL,CAAC;YACH,CAAC,CAAC;YAEM,kBAAY,GAAG;gBACrB,KAAI,CAAC,UAAU,GAAG,KAAI,CAAC,KAAK,CAAC,SAAS,IAAI,EAAE,CAAC;gBAC7C,KAAI,CAAC,WAAW,GAAG,aAAa,CAAC,KAAI,CAAC,KAAK,CAAC,MAAO,EAAE;oBACnD,KAAK,EAAE,KAAI,CAAC,KAAK,CAAC,KAAM;oBACxB,KAAK,EAAE,KAAI,CAAC,KAAK,CAAC,KAAK;oBACvB,SAAS,EAAE,KAAI,CAAC,KAAK,CAAC,SAAS;oBAC/B,SAAS,EAAE,KAAI,CAAC,UAAU;oBAC1B,KAAK,EAAE,KAAI,CAAC,KAAK,CAAC,SAAS;oBAC3B,OAAO,EAAE,KAAI,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MAAM,EAAE,KAAI,CAAC,SAAS,EACtB,YAAY,EAAE,KAAI,CAAC,SAAS,EAC5B,SAAS,EAAE,KAAI,CAAC,WAAW,CAAC,UAAU,GACtC,CACa,CAClB,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,OAAO,IAAI,CAAC;QACd,CAAC;QAoBO,8CAAa,GAArB;YACE,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC1D,CAAC;QACH,6BAAC;IAAD,CAAC,AAzbD,CAA4C,KAAK,CAAC,SAAS,GAyb1D;IAzbY,wDAAsB","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, find, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';\nimport {\n IAccessibilityProps,\n IChartProps,\n IHorizontalBarChartProps,\n IHorizontalBarChartStyleProps,\n IHorizontalBarChartStyles,\n IChartDataPoint,\n IRefArrayData,\n HorizontalBarChartVariant,\n} from './index';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { formatToLocaleString } from '@fluentui/chart-utilities';\nimport {\n ChartHoverCard,\n formatScientificLimitWidth,\n getAccessibleDataObject,\n getNextGradient,\n} from '../../utilities/index';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport { FocusableTooltipText } from '../../utilities/FocusableTooltipText';\n\nconst getClassNames = classNamesFunction<IHorizontalBarChartStyleProps, IHorizontalBarChartStyles>();\n\nexport interface IHorizontalBarChartState {\n isCalloutVisible: boolean;\n refSelected: SVGGElement | null | undefined;\n color: string;\n hoverValue: string | number | Date | null;\n lineColor: string;\n legend: string | null;\n xCalloutValue?: string;\n yCalloutValue?: string;\n barCalloutProps?: IChartDataPoint;\n callOutAccessibilityData?: IAccessibilityProps;\n barSpacingInPercent: number;\n}\n\nexport class HorizontalBarChartBase extends React.Component<IHorizontalBarChartProps, IHorizontalBarChartState> {\n private _barHeight: number;\n private _classNames: IProcessedStyleSet<IHorizontalBarChartStyles>;\n private _uniqLineText: string;\n private _calloutId: string;\n private _refArray: IRefArrayData[];\n private _calloutAnchorPoint: IChartDataPoint | null;\n private _isRTL: boolean = getRTL();\n private barChartSvgRef: React.RefObject<SVGSVGElement>;\n private _emptyChartId: string;\n\n constructor(props: IHorizontalBarChartProps) {\n super(props);\n this.state = {\n isCalloutVisible: false,\n hoverValue: '',\n lineColor: '',\n legend: '',\n refSelected: null,\n color: '',\n xCalloutValue: '',\n yCalloutValue: '',\n barSpacingInPercent: 0,\n };\n this._refArray = [];\n this._uniqLineText = '_HorizontalLine_' + Math.random().toString(36).substring(7);\n this._hoverOff = this._hoverOff.bind(this);\n this._calloutId = getId('callout');\n this._emptyChartId = getId('_HBC_empty');\n this.barChartSvgRef = React.createRef<SVGSVGElement>();\n }\n\n public componentDidMount(): void {\n const svgWidth = this.barChartSvgRef.current?.getBoundingClientRect().width || 0;\n const MARGIN_WIDTH_IN_PX = 3;\n if (svgWidth) {\n const currentBarSpacing = (MARGIN_WIDTH_IN_PX / svgWidth) * 100;\n this.setState({ barSpacingInPercent: currentBarSpacing });\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public render(): JSX.Element {\n const { data, theme } = this.props;\n this._adjustProps();\n const { palette } = theme!;\n let datapoint: number | undefined = 0;\n\n return !this._isChartEmpty() ? (\n <div className={this._classNames.root} onMouseLeave={this._handleChartMouseLeave}>\n {data!.map((points: IChartProps, index: number) => {\n if (points.chartData && points.chartData![0] && points.chartData![0].horizontalBarChartdata!.x) {\n datapoint = points.chartData![0].horizontalBarChartdata!.x;\n } else {\n datapoint = 0;\n }\n points.chartData![1] = {\n legend: '',\n horizontalBarChartdata: {\n x: points.chartData![0].horizontalBarChartdata!.y - datapoint!,\n y: points.chartData![0].horizontalBarChartdata!.y,\n },\n color: palette.neutralLight,\n };\n\n // Hide right side text of chart title for absolute-scale variant\n const chartDataText =\n this.props.variant === HorizontalBarChartVariant.AbsoluteScale ? null : this._getChartDataText(points!);\n const bars = this._createBars(points!, palette, index);\n const keyVal = this._uniqLineText + '_' + index;\n const classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n width: this.props.width,\n showTriangle: !!points!.chartData![0].data,\n variant: this.props.variant,\n });\n\n return (\n <div key={index}>\n <div className={classNames.items}>\n <FocusZone direction={FocusZoneDirection.horizontal}>\n <div className={this._classNames.chartTitle}>\n {points!.chartTitle && (\n <FocusableTooltipText\n className={this._classNames.chartTitleLeft}\n content={points!.chartTitle}\n accessibilityData={points!.chartTitleAccessibilityData}\n />\n )}\n {chartDataText}\n </div>\n </FocusZone>\n {points!.chartData![0].data && this._createBenchmark(points!)}\n <FocusZone direction={FocusZoneDirection.horizontal} className={this._classNames.chartWrapper}>\n <svg ref={this.barChartSvgRef} className={this._classNames.chart} aria-label={points!.chartTitle}>\n <g\n id={keyVal}\n key={keyVal}\n ref={(e: SVGGElement) => {\n this._refCallback(e, points!.chartData![0].legend);\n }}\n // NOTE: points.chartData![0] contains current data value\n onClick={() => {\n const p = points!.chartData![0];\n if (p && p.onClick) {\n p.onClick();\n }\n }}\n >\n {bars}\n </g>\n </svg>\n </FocusZone>\n </div>\n </div>\n );\n })}\n <Callout\n target={this.state.refSelected}\n coverTarget={true}\n isBeakVisible={false}\n gapSpace={30}\n hidden={!(!this.props.hideTooltip && this.state.isCalloutVisible)}\n directionalHint={DirectionalHint.topAutoEdge}\n id={this._calloutId}\n onDismiss={this._closeCallout}\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n preventDismissOnLostFocus={true}\n {...this.props.calloutProps!}\n {...getAccessibleDataObject(this.state.callOutAccessibilityData)}\n >\n <>\n {this.props.onRenderCalloutPerHorizontalBar ? (\n this.props.onRenderCalloutPerHorizontalBar(this.state.barCalloutProps)\n ) : (\n <ChartHoverCard\n Legend={this.state.xCalloutValue ? this.state.xCalloutValue : this.state.legend!}\n YValue={this.state.yCalloutValue ? this.state.yCalloutValue : this.state.hoverValue!}\n color={this.state.lineColor}\n culture={this.props.culture}\n />\n )}\n </>\n </Callout>\n </div>\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 private _refCallback(element: SVGGElement, legendTitle: string | undefined): void {\n this._refArray.push({ index: legendTitle, refElement: element });\n }\n\n private _hoverOn(hoverValue: string | number | Date | null, point: IChartDataPoint): void {\n if ((!this.state.isCalloutVisible || this.state.legend !== point.legend!) && this._calloutAnchorPoint !== point) {\n const currentHoveredElement = find(\n this._refArray,\n (currentElement: IRefArrayData) => currentElement.index === point.legend,\n );\n this._calloutAnchorPoint = point;\n let color = point.color!;\n\n if (this.props.enableGradient) {\n const pointIndex = Math.max(\n this.props.data\n ?.map(v => v.chartData)\n ?.findIndex(item => item?.[0].data === point.data && item?.[0].legend === point.legend) || 0,\n 0,\n );\n color = point.gradient?.[0] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[0];\n }\n\n this.setState({\n isCalloutVisible: true,\n hoverValue,\n lineColor: color,\n legend: point.legend!,\n refSelected: currentHoveredElement!.refElement,\n xCalloutValue: point.xAxisCalloutData!,\n yCalloutValue: point.yAxisCalloutData!,\n barCalloutProps: point,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n }\n\n private _hoverOff(): void {\n /**/\n }\n\n private _handleChartMouseLeave = () => {\n this._calloutAnchorPoint = null;\n if (this.state.isCalloutVisible) {\n this.setState({\n isCalloutVisible: false,\n hoverValue: '',\n refSelected: null,\n lineColor: '',\n legend: '',\n });\n }\n };\n\n private _adjustProps = (): void => {\n this._barHeight = this.props.barHeight || 12;\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n width: this.props.width,\n className: this.props.className,\n barHeight: this._barHeight,\n color: this.state.lineColor,\n variant: this.props.variant,\n hideLabels: this.props.hideLabels,\n });\n };\n\n private _getChartDataText = (data: IChartProps) => {\n return this.props.barChartCustomData ? (\n <div role=\"text\">{this.props.barChartCustomData(data)}</div>\n ) : (\n this._getDefaultTextData(data)\n );\n };\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _getDefaultTextData(data: IChartProps): JSX.Element {\n const { culture } = this.props;\n const chartDataMode = this.props.chartDataMode || 'default';\n const chartData: IChartDataPoint = data!.chartData![0];\n const x = chartData.horizontalBarChartdata!.x;\n const y = chartData.horizontalBarChartdata!.y;\n\n const accessibilityData = getAccessibleDataObject(data.chartDataAccessibilityData!, 'text', false);\n switch (chartDataMode) {\n case 'default':\n return (\n <div className={this._classNames.chartTitleRight} {...accessibilityData}>\n {formatToLocaleString(x, culture) as React.ReactNode}\n </div>\n );\n case 'fraction':\n return (\n <div {...accessibilityData}>\n <span className={this._classNames.chartTitleRight}>\n {formatToLocaleString(x, culture) as React.ReactNode}\n </span>\n <span className={this._classNames.chartDataTextDenominator}>\n {' / ' + formatToLocaleString(y, culture)}\n </span>\n </div>\n );\n case 'percentage':\n const dataRatioPercentage = `${formatToLocaleString(Math.round((x / y) * 100), culture)}%`;\n return (\n <div className={this._classNames.chartTitleRight} {...accessibilityData}>\n {dataRatioPercentage}\n </div>\n );\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _createBenchmark(data: IChartProps): JSX.Element {\n const totalData = data.chartData![0].horizontalBarChartdata!.y;\n const benchmarkData = data.chartData![0].data;\n const benchmarkRatio = Math.round(((benchmarkData ? benchmarkData : 0) / totalData) * 100);\n\n const benchmarkStyles = {\n left: 'calc(' + benchmarkRatio + '% - 4px)',\n };\n\n return (\n <div className={this._classNames.benchmarkContainer}>\n <div className={this._classNames.triangle} style={benchmarkStyles} />\n </div>\n );\n }\n\n /**\n * This functions returns an array of <rect> elements, which form the bars\n * For each bar an x value, and a width needs to be specified\n * The computations are done based on percentages\n * Extra margin is also provided, in the x value to provide some spacing in between the bars\n */\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _createBars(data: IChartProps, palette: IPalette, dataPointIndex: number): JSX.Element[] {\n const noOfBars =\n data.chartData?.reduce((count: number, point: IChartDataPoint) => (count += (point.data || 0) > 0 ? 1 : 0), 0) ||\n 1;\n const totalMarginPercent = this.state.barSpacingInPercent * (noOfBars - 1);\n const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n // calculating starting point of each bar and it's range\n const startingPoint: number[] = [];\n const total = data.chartData!.reduce(\n (acc: number, point: IChartDataPoint) =>\n acc + (point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0),\n 0,\n );\n let prevPosition = 0;\n let value = 0;\n\n let sumOfPercent = 0;\n data.chartData!.map((point: IChartDataPoint, index: number) => {\n const pointData = point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0;\n value = (pointData / total) * 100;\n if (value < 0) {\n value = 0;\n } else if (value < 1 && value !== 0) {\n value = 1;\n }\n sumOfPercent += value;\n\n return sumOfPercent;\n });\n\n /**\n * The %age of the space occupied by the margin needs to subtracted\n * while computing the scaling ratio, since the margins are not being\n * scaled down, only the data is being scaled down from a higher percentage to lower percentage\n * Eg: 95% of the space is taken by the bars, 5% by the margins\n * Now if the sumOfPercent is 120% -> This needs to be scaled down to 95%, not 100%\n * since that's only space available to the bars\n */\n const scalingRatio = sumOfPercent !== 0 ? (sumOfPercent - totalMarginPercent) / 100 : 1;\n\n const bars = data.chartData!.map((point: IChartDataPoint, index: number) => {\n let startColor: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n let endColor = startColor;\n\n if (this.props.enableGradient && index !== 1) {\n startColor = point.gradient?.[0] || getNextGradient(dataPointIndex, 0, this.props.theme?.isInverted)[0];\n endColor = point.gradient?.[1] || getNextGradient(dataPointIndex, 0, this.props.theme?.isInverted)[1];\n }\n\n const pointData = point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0;\n if (index > 0) {\n prevPosition += value;\n }\n value = (pointData / total) * 100;\n if (value < 0) {\n value = 0;\n } else if (value < 1 && value !== 0) {\n value = 1 / scalingRatio;\n } else {\n value = value / scalingRatio;\n }\n startingPoint.push(prevPosition);\n\n const xValue = point.horizontalBarChartdata!.x;\n const placeholderIndex = 1;\n\n // Render bar label instead of placeholder bar for absolute-scale variant\n if (index === placeholderIndex && this.props.variant === HorizontalBarChartVariant.AbsoluteScale) {\n if (this.props.hideLabels) {\n return <text key={index} />;\n }\n\n const barValue = data.chartData![0].horizontalBarChartdata!.x;\n\n return (\n <text\n key={index}\n x={`${this._isRTL ? 100 - startingPoint[index] : startingPoint[index]}%`}\n y={this._barHeight / 2}\n dominantBaseline=\"central\"\n transform={`translate(${this._isRTL ? -4 : 4})`}\n className={this._classNames.barLabel}\n aria-hidden={true}\n >\n {formatScientificLimitWidth(barValue)}\n </text>\n );\n }\n\n const gradientId = getId('HBC_Gradient') + `_${dataPointIndex}_${index}`;\n\n return (\n <React.Fragment key={index}>\n {this.props.enableGradient && (\n <defs>\n <linearGradient id={gradientId}>\n <stop offset=\"0\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>\n </defs>\n )}\n <rect\n key={index}\n x={`${\n this._isRTL\n ? 100 - startingPoint[index] - value - index * this.state.barSpacingInPercent\n : startingPoint[index] + index * this.state.barSpacingInPercent\n }%`}\n y={0}\n rx={this.props.roundCorners ? 3 : 0}\n data-is-focusable={point.legend !== '' ? true : false}\n width={value + '%'}\n height={this._barHeight}\n fill={this.props.enableGradient ? `url(#${gradientId})` : startColor}\n onMouseOver={point.legend !== '' ? this._hoverOn.bind(this, xValue, point) : undefined}\n onFocus={point.legend !== '' ? this._hoverOn.bind(this, xValue, point) : undefined}\n role=\"img\"\n aria-label={this._getAriaLabel(point)}\n onBlur={this._hoverOff}\n onMouseLeave={this._hoverOff}\n className={this._classNames.barWrapper}\n />\n </React.Fragment>\n );\n });\n return bars;\n }\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _getAriaLabel = (point: IChartDataPoint): string => {\n const legend = point.xAxisCalloutData || point.legend;\n const benchMark = point.data;\n const yValue =\n point.yAxisCalloutData ||\n (point.horizontalBarChartdata ? `${point.horizontalBarChartdata.x}/${point.horizontalBarChartdata.y}` : 0);\n return (\n point.callOutAccessibilityData?.ariaLabel ||\n (legend ? `${legend}, ` : '') + `${yValue}.` + (benchMark ? 'with benchmark at ' + `${benchMark}, ` : '')\n );\n };\n\n private _isChartEmpty(): boolean {\n return !(this.props.data && this.props.data.length > 0);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"HorizontalBarChart.base.js","sourceRoot":"../src/","sources":["components/HorizontalBarChart/HorizontalBarChart.base.tsx"],"names":[],"mappings":";;;;IAyBA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA4D,CAAC;IAgBrG;QAA4C,kDAAmE;QAW7G,gCAAY,KAA+B;YACzC,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YALP,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;YA6L3B,4BAAsB,GAAG;gBAC/B,KAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;gBAChC,IAAI,KAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC;oBAChC,KAAI,CAAC,QAAQ,CAAC;wBACZ,gBAAgB,EAAE,KAAK;wBACvB,UAAU,EAAE,EAAE;wBACd,WAAW,EAAE,IAAI;wBACjB,SAAS,EAAE,EAAE;wBACb,MAAM,EAAE,EAAE;qBACX,CAAC,CAAC;gBACL,CAAC;YACH,CAAC,CAAC;YAEM,kBAAY,GAAG;gBACrB,KAAI,CAAC,UAAU,GAAG,KAAI,CAAC,KAAK,CAAC,SAAS,IAAI,EAAE,CAAC;gBAC7C,KAAI,CAAC,WAAW,GAAG,aAAa,CAAC,KAAI,CAAC,KAAK,CAAC,MAAO,EAAE;oBACnD,KAAK,EAAE,KAAI,CAAC,KAAK,CAAC,KAAM;oBACxB,KAAK,EAAE,KAAI,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,CAAC,CAAC,CAAC,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAClF,IAAI,EAAC,KAAK,gBACE,KAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EACrC,MAAM,EAAE,KAAI,CAAC,SAAS,EACtB,YAAY,EAAE,KAAI,CAAC,SAAS,EAC5B,SAAS,EAAE,KAAI,CAAC,WAAW,CAAC,UAAU,GACtC,CACa,CAClB,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,OAAO,IAAI,CAAC;QACd,CAAC;QAoBO,8CAAa,GAArB;YACE,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC1D,CAAC;QACH,6BAAC;IAAD,CAAC,AAzbD,CAA4C,KAAK,CAAC,SAAS,GAyb1D;IAzbY,wDAAsB","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, find, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';\nimport {\n IAccessibilityProps,\n IChartProps,\n IHorizontalBarChartProps,\n IHorizontalBarChartStyleProps,\n IHorizontalBarChartStyles,\n IChartDataPoint,\n IRefArrayData,\n HorizontalBarChartVariant,\n} from './index';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { formatToLocaleString } from '@fluentui/chart-utilities';\nimport {\n ChartHoverCard,\n formatScientificLimitWidth,\n getAccessibleDataObject,\n getNextGradient,\n} from '../../utilities/index';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport { FocusableTooltipText } from '../../utilities/FocusableTooltipText';\nimport type { JSXElement } from '@fluentui/utilities';\n\nconst getClassNames = classNamesFunction<IHorizontalBarChartStyleProps, IHorizontalBarChartStyles>();\n\nexport interface IHorizontalBarChartState {\n isCalloutVisible: boolean;\n refSelected: SVGGElement | null | undefined;\n color: string;\n hoverValue: string | number | Date | null;\n lineColor: string;\n legend: string | null;\n xCalloutValue?: string;\n yCalloutValue?: string;\n barCalloutProps?: IChartDataPoint;\n callOutAccessibilityData?: IAccessibilityProps;\n barSpacingInPercent: number;\n}\n\nexport class HorizontalBarChartBase extends React.Component<IHorizontalBarChartProps, IHorizontalBarChartState> {\n private _barHeight: number;\n private _classNames: IProcessedStyleSet<IHorizontalBarChartStyles>;\n private _uniqLineText: string;\n private _calloutId: string;\n private _refArray: IRefArrayData[];\n private _calloutAnchorPoint: IChartDataPoint | null;\n private _isRTL: boolean = getRTL();\n private barChartSvgRef: React.RefObject<SVGSVGElement>;\n private _emptyChartId: string;\n\n constructor(props: IHorizontalBarChartProps) {\n super(props);\n this.state = {\n isCalloutVisible: false,\n hoverValue: '',\n lineColor: '',\n legend: '',\n refSelected: null,\n color: '',\n xCalloutValue: '',\n yCalloutValue: '',\n barSpacingInPercent: 0,\n };\n this._refArray = [];\n this._uniqLineText = '_HorizontalLine_' + Math.random().toString(36).substring(7);\n this._hoverOff = this._hoverOff.bind(this);\n this._calloutId = getId('callout');\n this._emptyChartId = getId('_HBC_empty');\n this.barChartSvgRef = React.createRef<SVGSVGElement>();\n }\n\n public componentDidMount(): void {\n const svgWidth = this.barChartSvgRef.current?.getBoundingClientRect().width || 0;\n const MARGIN_WIDTH_IN_PX = 3;\n if (svgWidth) {\n const currentBarSpacing = (MARGIN_WIDTH_IN_PX / svgWidth) * 100;\n this.setState({ barSpacingInPercent: currentBarSpacing });\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public render(): JSXElement {\n const { data, theme } = this.props;\n this._adjustProps();\n const { palette } = theme!;\n let datapoint: number | undefined = 0;\n\n return !this._isChartEmpty() ? (\n <div className={this._classNames.root} onMouseLeave={this._handleChartMouseLeave}>\n {data!.map((points: IChartProps, index: number) => {\n if (points.chartData && points.chartData![0] && points.chartData![0].horizontalBarChartdata!.x) {\n datapoint = points.chartData![0].horizontalBarChartdata!.x;\n } else {\n datapoint = 0;\n }\n points.chartData![1] = {\n legend: '',\n horizontalBarChartdata: {\n x: points.chartData![0].horizontalBarChartdata!.y - datapoint!,\n y: points.chartData![0].horizontalBarChartdata!.y,\n },\n color: palette.neutralLight,\n };\n\n // Hide right side text of chart title for absolute-scale variant\n const chartDataText =\n this.props.variant === HorizontalBarChartVariant.AbsoluteScale ? null : this._getChartDataText(points!);\n const bars = this._createBars(points!, palette, index);\n const keyVal = this._uniqLineText + '_' + index;\n const classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n width: this.props.width,\n showTriangle: !!points!.chartData![0].data,\n variant: this.props.variant,\n });\n\n return (\n <div key={index}>\n <div className={classNames.items}>\n <FocusZone direction={FocusZoneDirection.horizontal}>\n <div className={this._classNames.chartTitle}>\n {points!.chartTitle && (\n <FocusableTooltipText\n className={this._classNames.chartTitleLeft}\n content={points!.chartTitle}\n accessibilityData={points!.chartTitleAccessibilityData}\n />\n )}\n {chartDataText}\n </div>\n </FocusZone>\n {points!.chartData![0].data && this._createBenchmark(points!)}\n <FocusZone direction={FocusZoneDirection.horizontal} className={this._classNames.chartWrapper}>\n <svg ref={this.barChartSvgRef} className={this._classNames.chart} aria-label={points!.chartTitle}>\n <g\n id={keyVal}\n key={keyVal}\n ref={(e: SVGGElement) => {\n this._refCallback(e, points!.chartData![0].legend);\n }}\n // NOTE: points.chartData![0] contains current data value\n onClick={() => {\n const p = points!.chartData![0];\n if (p && p.onClick) {\n p.onClick();\n }\n }}\n >\n {bars}\n </g>\n </svg>\n </FocusZone>\n </div>\n </div>\n );\n })}\n <Callout\n target={this.state.refSelected}\n coverTarget={true}\n isBeakVisible={false}\n gapSpace={30}\n hidden={!(!this.props.hideTooltip && this.state.isCalloutVisible)}\n directionalHint={DirectionalHint.topAutoEdge}\n id={this._calloutId}\n onDismiss={this._closeCallout}\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n preventDismissOnLostFocus={true}\n {...this.props.calloutProps!}\n {...getAccessibleDataObject(this.state.callOutAccessibilityData)}\n >\n <>\n {this.props.onRenderCalloutPerHorizontalBar ? (\n this.props.onRenderCalloutPerHorizontalBar(this.state.barCalloutProps)\n ) : (\n <ChartHoverCard\n Legend={this.state.xCalloutValue ? this.state.xCalloutValue : this.state.legend!}\n YValue={this.state.yCalloutValue ? this.state.yCalloutValue : this.state.hoverValue!}\n color={this.state.lineColor}\n culture={this.props.culture}\n />\n )}\n </>\n </Callout>\n </div>\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 private _refCallback(element: SVGGElement, legendTitle: string | undefined): void {\n this._refArray.push({ index: legendTitle, refElement: element });\n }\n\n private _hoverOn(hoverValue: string | number | Date | null, point: IChartDataPoint): void {\n if ((!this.state.isCalloutVisible || this.state.legend !== point.legend!) && this._calloutAnchorPoint !== point) {\n const currentHoveredElement = find(\n this._refArray,\n (currentElement: IRefArrayData) => currentElement.index === point.legend,\n );\n this._calloutAnchorPoint = point;\n let color = point.color!;\n\n if (this.props.enableGradient) {\n const pointIndex = Math.max(\n this.props.data\n ?.map(v => v.chartData)\n ?.findIndex(item => item?.[0].data === point.data && item?.[0].legend === point.legend) || 0,\n 0,\n );\n color = point.gradient?.[0] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[0];\n }\n\n this.setState({\n isCalloutVisible: true,\n hoverValue,\n lineColor: color,\n legend: point.legend!,\n refSelected: currentHoveredElement!.refElement,\n xCalloutValue: point.xAxisCalloutData!,\n yCalloutValue: point.yAxisCalloutData!,\n barCalloutProps: point,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n }\n\n private _hoverOff(): void {\n /**/\n }\n\n private _handleChartMouseLeave = () => {\n this._calloutAnchorPoint = null;\n if (this.state.isCalloutVisible) {\n this.setState({\n isCalloutVisible: false,\n hoverValue: '',\n refSelected: null,\n lineColor: '',\n legend: '',\n });\n }\n };\n\n private _adjustProps = (): void => {\n this._barHeight = this.props.barHeight || 12;\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n width: this.props.width,\n className: this.props.className,\n barHeight: this._barHeight,\n color: this.state.lineColor,\n variant: this.props.variant,\n hideLabels: this.props.hideLabels,\n });\n };\n\n private _getChartDataText = (data: IChartProps) => {\n return this.props.barChartCustomData ? (\n <div role=\"text\">{this.props.barChartCustomData(data)}</div>\n ) : (\n this._getDefaultTextData(data)\n );\n };\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _getDefaultTextData(data: IChartProps): JSXElement {\n const { culture } = this.props;\n const chartDataMode = this.props.chartDataMode || 'default';\n const chartData: IChartDataPoint = data!.chartData![0];\n const x = chartData.horizontalBarChartdata!.x;\n const y = chartData.horizontalBarChartdata!.y;\n\n const accessibilityData = getAccessibleDataObject(data.chartDataAccessibilityData!, 'text', false);\n switch (chartDataMode) {\n case 'default':\n return (\n <div className={this._classNames.chartTitleRight} {...accessibilityData}>\n {formatToLocaleString(x, culture) as React.ReactNode}\n </div>\n );\n case 'fraction':\n return (\n <div {...accessibilityData}>\n <span className={this._classNames.chartTitleRight}>\n {formatToLocaleString(x, culture) as React.ReactNode}\n </span>\n <span className={this._classNames.chartDataTextDenominator}>\n {' / ' + formatToLocaleString(y, culture)}\n </span>\n </div>\n );\n case 'percentage':\n const dataRatioPercentage = `${formatToLocaleString(Math.round((x / y) * 100), culture)}%`;\n return (\n <div className={this._classNames.chartTitleRight} {...accessibilityData}>\n {dataRatioPercentage}\n </div>\n );\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _createBenchmark(data: IChartProps): JSXElement {\n const totalData = data.chartData![0].horizontalBarChartdata!.y;\n const benchmarkData = data.chartData![0].data;\n const benchmarkRatio = Math.round(((benchmarkData ? benchmarkData : 0) / totalData) * 100);\n\n const benchmarkStyles = {\n left: 'calc(' + benchmarkRatio + '% - 4px)',\n };\n\n return (\n <div className={this._classNames.benchmarkContainer}>\n <div className={this._classNames.triangle} style={benchmarkStyles} />\n </div>\n );\n }\n\n /**\n * This functions returns an array of <rect> elements, which form the bars\n * For each bar an x value, and a width needs to be specified\n * The computations are done based on percentages\n * Extra margin is also provided, in the x value to provide some spacing in between the bars\n */\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _createBars(data: IChartProps, palette: IPalette, dataPointIndex: number): JSXElement[] {\n const noOfBars =\n data.chartData?.reduce((count: number, point: IChartDataPoint) => (count += (point.data || 0) > 0 ? 1 : 0), 0) ||\n 1;\n const totalMarginPercent = this.state.barSpacingInPercent * (noOfBars - 1);\n const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n // calculating starting point of each bar and it's range\n const startingPoint: number[] = [];\n const total = data.chartData!.reduce(\n (acc: number, point: IChartDataPoint) =>\n acc + (point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0),\n 0,\n );\n let prevPosition = 0;\n let value = 0;\n\n let sumOfPercent = 0;\n data.chartData!.map((point: IChartDataPoint, index: number) => {\n const pointData = point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0;\n value = (pointData / total) * 100;\n if (value < 0) {\n value = 0;\n } else if (value < 1 && value !== 0) {\n value = 1;\n }\n sumOfPercent += value;\n\n return sumOfPercent;\n });\n\n /**\n * The %age of the space occupied by the margin needs to subtracted\n * while computing the scaling ratio, since the margins are not being\n * scaled down, only the data is being scaled down from a higher percentage to lower percentage\n * Eg: 95% of the space is taken by the bars, 5% by the margins\n * Now if the sumOfPercent is 120% -> This needs to be scaled down to 95%, not 100%\n * since that's only space available to the bars\n */\n const scalingRatio = sumOfPercent !== 0 ? (sumOfPercent - totalMarginPercent) / 100 : 1;\n\n const bars = data.chartData!.map((point: IChartDataPoint, index: number) => {\n let startColor: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n let endColor = startColor;\n\n if (this.props.enableGradient && index !== 1) {\n startColor = point.gradient?.[0] || getNextGradient(dataPointIndex, 0, this.props.theme?.isInverted)[0];\n endColor = point.gradient?.[1] || getNextGradient(dataPointIndex, 0, this.props.theme?.isInverted)[1];\n }\n\n const pointData = point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0;\n if (index > 0) {\n prevPosition += value;\n }\n value = (pointData / total) * 100;\n if (value < 0) {\n value = 0;\n } else if (value < 1 && value !== 0) {\n value = 1 / scalingRatio;\n } else {\n value = value / scalingRatio;\n }\n startingPoint.push(prevPosition);\n\n const xValue = point.horizontalBarChartdata!.x;\n const placeholderIndex = 1;\n\n // Render bar label instead of placeholder bar for absolute-scale variant\n if (index === placeholderIndex && this.props.variant === HorizontalBarChartVariant.AbsoluteScale) {\n if (this.props.hideLabels) {\n return <text key={index} />;\n }\n\n const barValue = data.chartData![0].horizontalBarChartdata!.x;\n\n return (\n <text\n key={index}\n x={`${this._isRTL ? 100 - startingPoint[index] : startingPoint[index]}%`}\n y={this._barHeight / 2}\n dominantBaseline=\"central\"\n transform={`translate(${this._isRTL ? -4 : 4})`}\n className={this._classNames.barLabel}\n aria-hidden={true}\n >\n {formatScientificLimitWidth(barValue)}\n </text>\n );\n }\n\n const gradientId = getId('HBC_Gradient') + `_${dataPointIndex}_${index}`;\n\n return (\n <React.Fragment key={index}>\n {this.props.enableGradient && (\n <defs>\n <linearGradient id={gradientId}>\n <stop offset=\"0\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>\n </defs>\n )}\n <rect\n key={index}\n x={`${\n this._isRTL\n ? 100 - startingPoint[index] - value - index * this.state.barSpacingInPercent\n : startingPoint[index] + index * this.state.barSpacingInPercent\n }%`}\n y={0}\n rx={this.props.roundCorners ? 3 : 0}\n data-is-focusable={point.legend !== '' ? true : false}\n width={value + '%'}\n height={this._barHeight}\n fill={this.props.enableGradient ? `url(#${gradientId})` : startColor}\n onMouseOver={point.legend !== '' ? this._hoverOn.bind(this, xValue, point) : undefined}\n onFocus={point.legend !== '' ? this._hoverOn.bind(this, xValue, point) : undefined}\n role=\"img\"\n aria-label={this._getAriaLabel(point)}\n onBlur={this._hoverOff}\n onMouseLeave={this._hoverOff}\n className={this._classNames.barWrapper}\n />\n </React.Fragment>\n );\n });\n return bars;\n }\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _getAriaLabel = (point: IChartDataPoint): string => {\n const legend = point.xAxisCalloutData || point.legend;\n const benchMark = point.data;\n const yValue =\n point.yAxisCalloutData ||\n (point.horizontalBarChartdata ? `${point.horizontalBarChartdata.x}/${point.horizontalBarChartdata.y}` : 0);\n return (\n point.callOutAccessibilityData?.ariaLabel ||\n (legend ? `${legend}, ` : '') + `${yValue}.` + (benchMark ? 'with benchmark at ' + `${benchMark}, ` : '')\n );\n };\n\n private _isChartEmpty(): boolean {\n return !(this.props.data && this.props.data.length > 0);\n }\n}\n"]}
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { IAccessibilityProps, IBasestate, IHorizontalBarChartWithAxisDataPoint, IChart, IImageExportOptions } from '../../types/IDataPoint';
|
|
3
3
|
import { IYValueHover } from '../CommonComponents/CartesianChart.types';
|
|
4
4
|
import { IHorizontalBarChartWithAxisProps } from './HorizontalBarChartWithAxis.types';
|
|
5
|
+
import type { JSXElement } from '@fluentui/utilities';
|
|
5
6
|
export interface IHorizontalBarChartWithAxisState extends IBasestate {
|
|
6
7
|
selectedLegendTitle: string;
|
|
7
8
|
dataPointCalloutProps?: IHorizontalBarChartWithAxisDataPoint;
|
|
@@ -40,7 +41,7 @@ export declare class HorizontalBarChartWithAxisBase extends React.Component<IHor
|
|
|
40
41
|
private _yAxisPadding;
|
|
41
42
|
constructor(props: IHorizontalBarChartWithAxisProps);
|
|
42
43
|
componentDidUpdate(prevProps: IHorizontalBarChartWithAxisProps): void;
|
|
43
|
-
render():
|
|
44
|
+
render(): JSXElement;
|
|
44
45
|
get chartContainer(): HTMLElement | null;
|
|
45
46
|
toImage: (opts?: IImageExportOptions) => Promise<string>;
|
|
46
47
|
private _getDomainNRangeValues;
|