@fluentui/react-charting 5.25.1 → 5.25.3
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 +123 -1
- package/CHANGELOG.md +34 -2
- package/dist/react-charting.d.ts +48 -45
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +24 -11
- package/lib/AnnotationOnlyChart.d.ts +1 -0
- package/lib/AnnotationOnlyChart.js +2 -0
- package/lib/AnnotationOnlyChart.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.d.ts +3 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +158 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.d.ts +33 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +2 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/index.d.ts +2 -0
- package/lib/components/AnnotationOnlyChart/index.js +3 -0
- package/lib/components/AnnotationOnlyChart/index.js.map +1 -0
- package/lib/components/AreaChart/AreaChart.base.js +2 -2
- package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.base.js +5 -3
- package/lib/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.d.ts +1 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +18 -14
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/index.d.ts +2 -0
- package/lib/components/CommonComponents/Annotations/index.js +3 -0
- package/lib/components/CommonComponents/Annotations/index.js.map +1 -0
- package/lib/components/CommonComponents/CartesianChart.base.d.ts +6 -1
- package/lib/components/CommonComponents/CartesianChart.base.js +131 -157
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.d.ts +11 -2
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +85 -51
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +12 -4
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +176 -63
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.base.js +5 -3
- package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.base.js +15 -18
- package/lib/components/FunnelChart/FunnelChart.base.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.base.js +6 -6
- package/lib/components/GanttChart/GanttChart.base.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.types.d.ts +0 -11
- package/lib/components/GanttChart/GanttChart.types.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.base.js +5 -3
- package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +11 -6
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.js +3 -3
- package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.types.d.ts +0 -9
- package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +4 -4
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +0 -9
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib/components/Legends/Legends.base.d.ts +1 -1
- package/lib/components/Legends/Legends.base.js +6 -2
- package/lib/components/Legends/Legends.base.js.map +1 -1
- package/lib/components/Legends/Legends.types.d.ts +1 -1
- package/lib/components/Legends/Legends.types.js.map +1 -1
- package/lib/components/LineChart/LineChart.base.js +3 -3
- package/lib/components/LineChart/LineChart.base.js.map +1 -1
- package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js +1 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.base.js +5 -3
- package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.base.js +41 -31
- package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.types.d.ts +0 -4
- package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js +6 -4
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +22 -10
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +0 -9
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/types/IChartAnnotation.d.ts +2 -0
- package/lib/types/IChartAnnotation.js.map +1 -1
- package/lib/utilities/image-export-utils.d.ts +7 -2
- package/lib/utilities/image-export-utils.js +176 -86
- package/lib/utilities/image-export-utils.js.map +1 -1
- package/lib/utilities/utilities.d.ts +5 -4
- package/lib/utilities/utilities.js +18 -17
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-amd/AnnotationOnlyChart.d.ts +1 -0
- package/lib-amd/AnnotationOnlyChart.js +6 -0
- package/lib-amd/AnnotationOnlyChart.js.map +1 -0
- package/lib-amd/components/AnnotationOnlyChart/AnnotationOnlyChart.d.ts +3 -0
- package/lib-amd/components/AnnotationOnlyChart/AnnotationOnlyChart.js +159 -0
- package/lib-amd/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
- package/lib-amd/components/AnnotationOnlyChart/AnnotationOnlyChart.types.d.ts +33 -0
- package/lib-amd/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +5 -0
- package/lib-amd/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
- package/lib-amd/components/AnnotationOnlyChart/index.d.ts +2 -0
- package/lib-amd/components/AnnotationOnlyChart/index.js +7 -0
- package/lib-amd/components/AnnotationOnlyChart/index.js.map +1 -0
- package/lib-amd/components/AreaChart/AreaChart.base.js +1 -1
- package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-amd/components/ChartTable/ChartTable.base.js +4 -2
- package/lib-amd/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.d.ts +1 -1
- package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.js +18 -14
- package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
- package/lib-amd/components/CommonComponents/Annotations/index.d.ts +2 -0
- package/lib-amd/components/CommonComponents/Annotations/index.js +7 -0
- package/lib-amd/components/CommonComponents/Annotations/index.js.map +1 -0
- package/lib-amd/components/CommonComponents/CartesianChart.base.d.ts +6 -1
- package/lib-amd/components/CommonComponents/CartesianChart.base.js +131 -157
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +11 -2
- package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +80 -50
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.js +12 -4
- package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +178 -64
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/DonutChart/DonutChart.base.js +4 -2
- package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-amd/components/FunnelChart/FunnelChart.base.js +13 -16
- package/lib-amd/components/FunnelChart/FunnelChart.base.js.map +1 -1
- package/lib-amd/components/GanttChart/GanttChart.base.js +5 -5
- package/lib-amd/components/GanttChart/GanttChart.base.js.map +1 -1
- package/lib-amd/components/GanttChart/GanttChart.types.d.ts +0 -11
- package/lib-amd/components/GanttChart/GanttChart.types.js.map +1 -1
- package/lib-amd/components/GaugeChart/GaugeChart.base.js +4 -2
- package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +10 -6
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +2 -2
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.types.d.ts +0 -9
- package/lib-amd/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +3 -3
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +0 -9
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib-amd/components/Legends/Legends.base.d.ts +1 -1
- package/lib-amd/components/Legends/Legends.base.js +6 -2
- package/lib-amd/components/Legends/Legends.base.js.map +1 -1
- package/lib-amd/components/Legends/Legends.types.d.ts +1 -1
- package/lib-amd/components/Legends/Legends.types.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.base.js +2 -2
- package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-amd/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib-amd/components/ResponsiveContainer/ResponsiveContainer.js +1 -1
- package/lib-amd/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib-amd/components/SankeyChart/SankeyChart.base.js +4 -2
- package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-amd/components/ScatterChart/ScatterChart.base.js +39 -29
- package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib-amd/components/ScatterChart/ScatterChart.types.d.ts +0 -4
- package/lib-amd/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +5 -3
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +20 -8
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +0 -9
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib-amd/index.d.ts +2 -0
- package/lib-amd/index.js +3 -2
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/types/IChartAnnotation.d.ts +2 -0
- package/lib-amd/types/IChartAnnotation.js.map +1 -1
- package/lib-amd/utilities/image-export-utils.d.ts +7 -2
- package/lib-amd/utilities/image-export-utils.js +175 -85
- package/lib-amd/utilities/image-export-utils.js.map +1 -1
- package/lib-amd/utilities/utilities.d.ts +5 -4
- package/lib-amd/utilities/utilities.js +18 -17
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-commonjs/AnnotationOnlyChart.d.ts +1 -0
- package/lib-commonjs/AnnotationOnlyChart.js +5 -0
- package/lib-commonjs/AnnotationOnlyChart.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.d.ts +3 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +162 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.d.ts +33 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +3 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/index.d.ts +2 -0
- package/lib-commonjs/components/AnnotationOnlyChart/index.js +6 -0
- package/lib-commonjs/components/AnnotationOnlyChart/index.js.map +1 -0
- package/lib-commonjs/components/AreaChart/AreaChart.base.js +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.base.js +4 -2
- package/lib-commonjs/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.d.ts +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +18 -14
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/index.d.ts +2 -0
- package/lib-commonjs/components/CommonComponents/Annotations/index.js +6 -0
- package/lib-commonjs/components/CommonComponents/Annotations/index.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.d.ts +6 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +131 -157
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +11 -2
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +83 -49
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +12 -4
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +178 -64
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.base.js +4 -2
- package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.js +13 -16
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.js.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.base.js +5 -5
- package/lib-commonjs/components/GanttChart/GanttChart.base.js.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.types.d.ts +0 -11
- package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +4 -2
- package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +10 -5
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +2 -2
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.d.ts +0 -9
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +3 -3
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +0 -9
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.base.d.ts +1 -1
- package/lib-commonjs/components/Legends/Legends.base.js +6 -2
- package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.types.d.ts +1 -1
- package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.js +2 -2
- package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +1 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.base.js +4 -2
- package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +39 -29
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.d.ts +0 -4
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +5 -3
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +20 -8
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +0 -9
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib-commonjs/index.d.ts +2 -0
- package/lib-commonjs/index.js +3 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/IChartAnnotation.d.ts +2 -0
- package/lib-commonjs/types/IChartAnnotation.js.map +1 -1
- package/lib-commonjs/utilities/image-export-utils.d.ts +7 -2
- package/lib-commonjs/utilities/image-export-utils.js +175 -85
- package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
- package/lib-commonjs/utilities/utilities.d.ts +5 -4
- package/lib-commonjs/utilities/utilities.js +18 -17
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +5 -5
- package/src/components/AnnotationOnlyChart/AnnotationOnlyChart.types.ts +34 -0
- package/src/components/CommonComponents/CartesianChart.types.ts +12 -1
- package/src/components/GanttChart/GanttChart.types.ts +0 -13
- package/src/components/HeatMapChart/HeatMapChart.types.ts +0 -11
- package/src/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.ts +0 -11
- package/src/components/Legends/Legends.types.ts +1 -1
- package/src/components/ScatterChart/ScatterChart.types.ts +0 -5
- package/src/components/VerticalStackedBarChart/VerticalStackedBarChart.types.ts +0 -11
|
@@ -8,9 +8,9 @@ import { DirectionalHint } from '@fluentui/react/lib/Callout';
|
|
|
8
8
|
import { Legends } from '../Legends/index';
|
|
9
9
|
import { CartesianChart, ChartHoverCard, } from '../../index';
|
|
10
10
|
import { FocusZoneDirection } from '@fluentui/react-focus';
|
|
11
|
-
import { formatDateToLocaleString } from '@fluentui/chart-utilities';
|
|
11
|
+
import { formatDateToLocaleString, isInvalidValue } from '@fluentui/chart-utilities';
|
|
12
12
|
import { ChartTypes, getAccessibleDataObject, XAxisTypes, getTypeOfAxis, tooltipOfAxislabels, formatScientificLimitWidth, getBarWidth, getScalePadding, isScalePaddingDefined, calculateAppropriateBarWidth, findVSBCNumericMinMaxOfY, createNumericYAxis, domainRangeOfDateForAreaLineScatterVerticalBarCharts, domainRangeOfVSBCNumeric, domainRangeOfXStringAxis, createStringYAxis, getNextGradient, areArraysEqual, calculateLongestLabelWidth, YAxisType, sortAxisCategories, calcTotalWidth, calcBandwidth, calcRequiredWidth, } from '../../utilities/index';
|
|
13
|
-
import {
|
|
13
|
+
import { exportChartsAsImage } from '../../utilities/image-export-utils';
|
|
14
14
|
var getClassNames = classNamesFunction();
|
|
15
15
|
var COMPONENT_NAME = 'VERTICAL STACKED BAR CHART';
|
|
16
16
|
// When displaying gaps between bars, the max height of the gap is given in the
|
|
@@ -29,7 +29,7 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
|
|
|
29
29
|
_this._yAxisLabels = [];
|
|
30
30
|
_this.toImage = function (opts) {
|
|
31
31
|
var _a, _b;
|
|
32
|
-
return
|
|
32
|
+
return exportChartsAsImage([{ container: (_a = _this._cartesianChartRef.current) === null || _a === void 0 ? void 0 : _a.chartContainer }], _this.props.hideLegend ? undefined : (_b = _this._legendsRef.current) === null || _b === void 0 ? void 0 : _b.toSVG, _this._isRtl, opts);
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* This function tells us what to focus either the whole stack as focusable item.
|
|
@@ -55,7 +55,7 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
|
|
|
55
55
|
}
|
|
56
56
|
return shouldFocusStackOnly;
|
|
57
57
|
};
|
|
58
|
-
_this._getDomainNRangeValues = function (points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues
|
|
58
|
+
_this._getDomainNRangeValues = function (points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues) {
|
|
59
59
|
var domainNRangeValue;
|
|
60
60
|
if (xAxisType === XAxisTypes.NumericAxis) {
|
|
61
61
|
domainNRangeValue = domainRangeOfVSBCNumeric(points, margins, width, isRTL, barWidth);
|
|
@@ -153,7 +153,9 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
|
|
|
153
153
|
yScalePrimary(circlePoint.y), onMouseOver: _this._lineHover.bind(_this, circlePoint), onMouseLeave: _this._handleMouseOut, r: _this._getCircleOpacityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).radius, stroke: circlePoint.color, fill: _this.props.theme.semanticColors.bodyBackground, strokeWidth: 3,
|
|
154
154
|
// Elements with visibility: hidden cannot receive focus, so use opacity: 0 instead to hide them.
|
|
155
155
|
// For more information, see https://fuzzbomb.github.io/accessibility-demos/visually-hidden-focus-test.html
|
|
156
|
-
opacity: _this._getCircleOpacityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).opacity, transform: "translate(".concat(xScaleBandwidthTranslate, ", ").concat(yScaleBandwidthTranslate, ")"), ref: function (e) {
|
|
156
|
+
opacity: _this._getCircleOpacityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).opacity, transform: "translate(".concat(xScaleBandwidthTranslate, ", ").concat(yScaleBandwidthTranslate, ")"), ref: function (e) {
|
|
157
|
+
circleRef.refElement = e;
|
|
158
|
+
} }, (noBarsActive && (_this._noLegendHighlighted() || _this._isLegendHighlighted(item))
|
|
157
159
|
? {
|
|
158
160
|
'data-is-focusable': !_this.props.hideTooltip,
|
|
159
161
|
onFocus: _this._lineFocus.bind(_this, circlePoint, circleRef),
|
|
@@ -340,7 +342,9 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
|
|
|
340
342
|
React.createElement("linearGradient", { id: gradientId, x1: "0%", y1: "100%", x2: "0%", y2: "0%" },
|
|
341
343
|
React.createElement("stop", { offset: "0", stopColor: startColor }),
|
|
342
344
|
React.createElement("stop", { offset: "100%", stopColor: endColor })))),
|
|
343
|
-
React.createElement("path", __assign({ className: _this._classNames.opacityChangeOnHover, d: "\n M ".concat(xPoint, " ").concat(yPoint + barCornerRadius, "\n a ").concat(barCornerRadius, " ").concat(barCornerRadius, " 0 0 1 ").concat(barCornerRadius, " ").concat(-barCornerRadius, "\n h ").concat(_this._barWidth - 2 * barCornerRadius, "\n a ").concat(barCornerRadius, " ").concat(barCornerRadius, " 0 0 1 ").concat(barCornerRadius, " ").concat(barCornerRadius, "\n v ").concat(barHeight - barCornerRadius, "\n h ").concat(-_this._barWidth, "\n z\n "), fill: _this.props.enableGradient ? "url(#".concat(gradientId, ")") : startColor, rx: _this.props.roundCorners ? 3 : 0, ref: function (e) {
|
|
345
|
+
React.createElement("path", __assign({ className: _this._classNames.opacityChangeOnHover, d: "\n M ".concat(xPoint, " ").concat(yPoint + barCornerRadius, "\n a ").concat(barCornerRadius, " ").concat(barCornerRadius, " 0 0 1 ").concat(barCornerRadius, " ").concat(-barCornerRadius, "\n h ").concat(_this._barWidth - 2 * barCornerRadius, "\n a ").concat(barCornerRadius, " ").concat(barCornerRadius, " 0 0 1 ").concat(barCornerRadius, " ").concat(barCornerRadius, "\n v ").concat(barHeight - barCornerRadius, "\n h ").concat(-_this._barWidth, "\n z\n "), fill: _this.props.enableGradient ? "url(#".concat(gradientId, ")") : startColor, rx: _this.props.roundCorners ? 3 : 0, ref: function (e) {
|
|
346
|
+
ref.refElement = e;
|
|
347
|
+
}, transform: "translate(".concat(xScaleBandwidthTranslate, ", 0)") }, rectFocusProps))));
|
|
344
348
|
}
|
|
345
349
|
if (barHeight < 0) {
|
|
346
350
|
return React.createElement(React.Fragment, { key: index + indexNumber }, " ");
|
|
@@ -350,7 +354,9 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
|
|
|
350
354
|
React.createElement("linearGradient", { id: gradientId, x1: "0%", y1: "100%", x2: "0%", y2: "0%" },
|
|
351
355
|
React.createElement("stop", { offset: "0", stopColor: startColor }),
|
|
352
356
|
React.createElement("stop", { offset: "100%", stopColor: endColor })))),
|
|
353
|
-
React.createElement("rect", __assign({ className: _this._classNames.opacityChangeOnHover, x: xPoint, y: yPoint, width: _this._barWidth, height: barHeight, fill: _this.props.enableGradient ? "url(#".concat(gradientId, ")") : startColor, rx: _this.props.roundCorners ? 3 : 0, ref: function (e) {
|
|
357
|
+
React.createElement("rect", __assign({ className: _this._classNames.opacityChangeOnHover, x: xPoint, y: yPoint, width: _this._barWidth, height: barHeight, fill: _this.props.enableGradient ? "url(#".concat(gradientId, ")") : startColor, rx: _this.props.roundCorners ? 3 : 0, ref: function (e) {
|
|
358
|
+
ref.refElement = e;
|
|
359
|
+
} }, rectFocusProps, { transform: "translate(".concat(xScaleBandwidthTranslate, ", 0)") }))));
|
|
354
360
|
});
|
|
355
361
|
var groupRef = {};
|
|
356
362
|
var someBarsActive = singleChartData.chartData.filter(function (dataPoint) { return _this._noLegendHighlighted() || _this._isLegendHighlighted(dataPoint.legend); }).length > 0;
|
|
@@ -386,7 +392,9 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
|
|
|
386
392
|
}
|
|
387
393
|
}
|
|
388
394
|
return (React.createElement("g", { key: indexNumber + "".concat(shouldFocusWholeStack) },
|
|
389
|
-
React.createElement("g", __assign({ id: "".concat(indexNumber, "-singleBar"), ref: function (e) {
|
|
395
|
+
React.createElement("g", __assign({ id: "".concat(indexNumber, "-singleBar"), ref: function (e) {
|
|
396
|
+
groupRef.refElement = e;
|
|
397
|
+
} }, stackFocusProps), singleBar),
|
|
390
398
|
!_this.props.hideLabels && _this._barWidth >= 16 && showLabel && (React.createElement("text", { x: xPoint + _this._barWidth / 2,
|
|
391
399
|
//if total bar value >=0, show label above top bar, otherwise below bottom bar
|
|
392
400
|
y: barLabel >= _this.Y_ORIGIN ? yPoint - 6 : yPoint + heightOfLastBar + 12, textAnchor: "middle", className: _this._classNames.barLabel, "aria-label": "Total: ".concat(barLabel), role: "img", transform: "translate(".concat(xScaleBandwidthTranslate, ", 0)") }, typeof _this.props.yAxisTickFormat === 'function'
|
|
@@ -761,13 +769,17 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
|
|
|
761
769
|
configurable: true
|
|
762
770
|
});
|
|
763
771
|
VerticalStackedBarChartBase.prototype._adjustProps = function () {
|
|
772
|
+
var _a;
|
|
764
773
|
this._points = this.props.data || [];
|
|
765
774
|
this._barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth);
|
|
766
775
|
var theme = this.props.theme;
|
|
767
776
|
var palette = theme.palette;
|
|
768
777
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
769
778
|
this._colors = this.props.colors || [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];
|
|
770
|
-
|
|
779
|
+
var firstXValue = (_a = this._points[0]) === null || _a === void 0 ? void 0 : _a.xAxisPoint;
|
|
780
|
+
this._xAxisType = isInvalidValue(firstXValue)
|
|
781
|
+
? XAxisTypes.StringAxis
|
|
782
|
+
: getTypeOfAxis(firstXValue, true);
|
|
771
783
|
this._lineObject = this._getFormattedLineData(this.props.data);
|
|
772
784
|
this._xAxisInnerPadding = getScalePadding(this.props.xAxisInnerPadding, this.props.xAxisPadding, this._xAxisType === XAxisTypes.StringAxis ? 2 / 3 : 1 / 2);
|
|
773
785
|
this._xAxisOuterPadding = getScalePadding(this.props.xAxisOuterPadding, this.props.xAxisPadding, 0);
|
|
@@ -860,7 +872,7 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
|
|
|
860
872
|
legendsOfLine.push(legend);
|
|
861
873
|
});
|
|
862
874
|
}
|
|
863
|
-
var totalLegends =
|
|
875
|
+
var totalLegends = actions.concat(legendsOfLine);
|
|
864
876
|
return (React.createElement(Legends, __assign({ legends: totalLegends, overflowProps: this.props.legendsOverflowProps, enabledWrapLines: this.props.enabledLegendsWrapLines, focusZonePropsInHoverCard: this.props.focusZonePropsForLegendsInHoverCard, overflowText: this.props.legendsOverflowText }, this.props.legendProps, { onChange: this._onLegendSelectionChange.bind(this), ref: this._legendsRef })));
|
|
865
877
|
};
|
|
866
878
|
VerticalStackedBarChartBase.prototype._onLegendSelectionChange = function (selectedLegends, event, currentLegend) {
|