@fluentui/react-charts 9.2.2 → 9.2.4
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.md +74 -2
- package/dist/index.d.ts +187 -15
- package/lib/components/AreaChart/AreaChart.js +7 -4
- package/lib/components/AreaChart/AreaChart.js.map +1 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.js +4 -3
- package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +5 -16
- package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.js +90 -6
- package/lib/components/ChartTable/ChartTable.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.js +83 -38
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +19 -3
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +8 -23
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +214 -107
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +25 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +1618 -259
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js +8 -3
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +6 -2
- package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.js +8 -3
- package/lib/components/DonutChart/DonutChart.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.js +21 -4
- package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +8 -4
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.js +4 -2
- package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib/components/FunnelChart/funnelGeometry.js.map +1 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.js +2 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +1 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +2 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.js +1 -2
- package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +31 -10
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +6 -18
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +6 -22
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +175 -114
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +2 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +2 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +7 -3
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +5 -2
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +26 -6
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +2 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +2 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +349 -176
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/LineChart/LineChart.types.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.js +28 -8
- package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js +9 -14
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
- package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +12 -25
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +2 -12
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.js +139 -81
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js +29 -8
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +10 -15
- package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +28 -5
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +10 -7
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +7 -20
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +159 -47
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +9 -7
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +6 -20
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
- package/lib/types/DataPoint.js +3 -1
- package/lib/types/DataPoint.js.map +1 -1
- package/lib/utilities/Common.styles.js +47 -0
- package/lib/utilities/Common.styles.js.map +1 -0
- package/lib/utilities/Common.styles.raw.js +47 -0
- package/lib/utilities/Common.styles.raw.js.map +1 -0
- package/lib/utilities/SVGTooltipText.js.map +1 -1
- package/lib/utilities/image-export-utils.js.map +1 -1
- package/lib/utilities/index.js +1 -0
- package/lib/utilities/index.js.map +1 -1
- package/lib/utilities/scatterpolar-utils.js +52 -0
- package/lib/utilities/scatterpolar-utils.js.map +1 -0
- package/lib/utilities/utilities.js +324 -147
- package/lib/utilities/utilities.js.map +1 -1
- package/lib/utilities/vbc-utils.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.js +6 -3
- package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +2 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +4 -15
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.js +90 -6
- package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +83 -37
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +17 -2
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +6 -22
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +212 -107
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +31 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +1652 -260
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +12 -3
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +6 -2
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.js +7 -2
- package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +32 -4
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +8 -4
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.js +4 -2
- package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +2 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.js +1 -2
- package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +30 -9
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +4 -20
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +5 -21
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +174 -113
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +2 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +10 -3
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +5 -2
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +25 -5
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +2 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +347 -175
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +35 -5
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +7 -13
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +23 -33
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +1 -12
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +137 -79
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +39 -6
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +9 -14
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +27 -4
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +7 -4
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +5 -18
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +158 -46
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +7 -4
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +5 -19
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/types/DataPoint.js +3 -1
- package/lib-commonjs/types/DataPoint.js.map +1 -1
- package/lib-commonjs/utilities/Common.styles.js +71 -0
- package/lib-commonjs/utilities/Common.styles.js.map +1 -0
- package/lib-commonjs/utilities/Common.styles.raw.js +71 -0
- package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -0
- package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
- package/lib-commonjs/utilities/index.js +1 -0
- package/lib-commonjs/utilities/index.js.map +1 -1
- package/lib-commonjs/utilities/scatterpolar-utils.js +67 -0
- package/lib-commonjs/utilities/scatterpolar-utils.js.map +1 -0
- package/lib-commonjs/utilities/utilities.js +337 -137
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
- package/package.json +10 -10
|
@@ -6,12 +6,17 @@ import { scaleLinear as d3ScaleLinear, scaleBand as d3ScaleBand, scaleUtc as d3S
|
|
|
6
6
|
import { useId } from '@fluentui/react-utilities';
|
|
7
7
|
import { tokens } from '@fluentui/react-theme';
|
|
8
8
|
import { CartesianChart, ChartPopover, Legends } from '../../index';
|
|
9
|
-
import { ChartTypes, getAccessibleDataObject, XAxisTypes, getTypeOfAxis, tooltipOfAxislabels, formatScientificLimitWidth, getBarWidth, getScalePadding, isScalePaddingDefined, calculateAppropriateBarWidth, formatDate, areArraysEqual, calculateLongestLabelWidth, useRtl, DataVizPalette, getColorFromToken, findVSBCNumericMinMaxOfY, createNumericYAxis,
|
|
9
|
+
import { ChartTypes, getAccessibleDataObject, XAxisTypes, getTypeOfAxis, tooltipOfAxislabels, formatScientificLimitWidth, getBarWidth, getScalePadding, isScalePaddingDefined, calculateAppropriateBarWidth, formatDate, areArraysEqual, calculateLongestLabelWidth, useRtl, DataVizPalette, getColorFromToken, findVSBCNumericMinMaxOfY, YAxisType, createNumericYAxis, domainRangeOfDateForAreaLineScatterVerticalBarCharts, domainRangeOfVSBCNumeric, domainRangeOfXStringAxis, createStringYAxis, calcTotalWidth, calcBandwidth, calcRequiredWidth, sortAxisCategories } from '../../utilities/index';
|
|
10
10
|
import { toImage } from '../../utilities/image-export-utils';
|
|
11
|
+
import { formatDateToLocaleString } from '@fluentui/chart-utilities';
|
|
11
12
|
const barGapMultiplier = 0.2;
|
|
12
13
|
const barGapMin = 1;
|
|
13
14
|
const MIN_DOMAIN_MARGIN = 8;
|
|
14
|
-
export const VerticalStackedBarChart = (props
|
|
15
|
+
export const VerticalStackedBarChart = /*#__PURE__*/ React.forwardRef((props = {
|
|
16
|
+
xAxisCategoryOrder: 'default',
|
|
17
|
+
yAxisCategoryOrder: 'default',
|
|
18
|
+
data: []
|
|
19
|
+
}, forwardedRef)=>{
|
|
15
20
|
var _props_legendProps;
|
|
16
21
|
const _isRtl = useRtl();
|
|
17
22
|
const _createLegendsForLine = (data)=>_getLineLegends(data);
|
|
@@ -35,6 +40,8 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
35
40
|
const cartesianChartRef = React.useRef(null);
|
|
36
41
|
const Y_ORIGIN = 0;
|
|
37
42
|
const _legendsRef = React.useRef(null);
|
|
43
|
+
let _yAxisType;
|
|
44
|
+
let _yAxisLabels = [];
|
|
38
45
|
const [selectedLegends, setSelectedLegends] = React.useState(((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends) || []);
|
|
39
46
|
const [activeLegend, setActiveLegend] = React.useState(undefined);
|
|
40
47
|
const [dataForHoverCard, setDataForHoverCard] = React.useState(0);
|
|
@@ -235,21 +242,26 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
235
242
|
_lineObject = _getFormattedLineData(props.data);
|
|
236
243
|
_xAxisInnerPadding = getScalePadding(props.xAxisInnerPadding, props.xAxisPadding, _xAxisType === XAxisTypes.StringAxis ? 2 / 3 : 1 / 2);
|
|
237
244
|
_xAxisOuterPadding = getScalePadding(props.xAxisOuterPadding, props.xAxisPadding, 0);
|
|
245
|
+
_initYAxisParams();
|
|
238
246
|
}
|
|
239
247
|
function _createDataSetLayer() {
|
|
240
|
-
const tempArr = [];
|
|
241
248
|
const dataset = _points.map((singlePointData)=>{
|
|
249
|
+
if (_yAxisType === YAxisType.StringAxis) {
|
|
250
|
+
return {
|
|
251
|
+
x: singlePointData.xAxisPoint,
|
|
252
|
+
y: 0
|
|
253
|
+
};
|
|
254
|
+
}
|
|
242
255
|
let total = 0;
|
|
243
256
|
singlePointData.chartData.forEach((point)=>{
|
|
244
257
|
total = total + point.data;
|
|
245
258
|
});
|
|
246
|
-
tempArr.push(singlePointData.xAxisPoint);
|
|
247
259
|
return {
|
|
248
260
|
x: singlePointData.xAxisPoint,
|
|
249
261
|
y: total
|
|
250
262
|
};
|
|
251
263
|
});
|
|
252
|
-
_xAxisLabels =
|
|
264
|
+
_xAxisLabels = _getOrderedXAxisLabels();
|
|
253
265
|
return dataset;
|
|
254
266
|
}
|
|
255
267
|
function _onLegendHover(legendTitle) {
|
|
@@ -274,7 +286,7 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
274
286
|
}
|
|
275
287
|
function _getGraphData(xScale, yScale, containerHeight, containerWidth, xElement) {
|
|
276
288
|
const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);
|
|
277
|
-
return _bars = _createBar(xBarScale, yBarScale, containerHeight, xElement);
|
|
289
|
+
return _bars = _createBar(xBarScale, _yAxisType === YAxisType.StringAxis ? yScale : yBarScale, containerHeight, xElement);
|
|
278
290
|
}
|
|
279
291
|
function _getAxisData(yAxisData) {
|
|
280
292
|
if (yAxisData && yAxisData.yAxisDomainValues.length) {
|
|
@@ -284,16 +296,16 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
284
296
|
}
|
|
285
297
|
}
|
|
286
298
|
/**
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
299
|
+
* This function checks if the given legend is highlighted or not.
|
|
300
|
+
* A legend can be highlighted in 2 ways:
|
|
301
|
+
* 1. selection: if the user clicks on it
|
|
302
|
+
* 2. hovering: if there is no selected legend and the user hovers over it
|
|
303
|
+
*/ function _isLegendHighlighted(legendTitle) {
|
|
292
304
|
return _getHighlightedLegend().includes(legendTitle);
|
|
293
305
|
}
|
|
294
306
|
/**
|
|
295
|
-
|
|
296
|
-
|
|
307
|
+
* This function checks if none of the legends is selected or hovered.
|
|
308
|
+
*/ function _noLegendHighlighted() {
|
|
297
309
|
return _getHighlightedLegend().length === 0;
|
|
298
310
|
}
|
|
299
311
|
function _getAriaLabel(singleChartData, point, isLinePoint) {
|
|
@@ -341,7 +353,7 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
341
353
|
if (xAxisType === XAxisTypes.NumericAxis) {
|
|
342
354
|
domainNRangeValue = domainRangeOfVSBCNumeric(points, margins, width, isRTL, barWidth);
|
|
343
355
|
} else if (xAxisType === XAxisTypes.DateAxis) {
|
|
344
|
-
domainNRangeValue =
|
|
356
|
+
domainNRangeValue = domainRangeOfDateForAreaLineScatterVerticalBarCharts(points, margins, width, isRTL, tickValues, chartType, barWidth);
|
|
345
357
|
} else {
|
|
346
358
|
domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);
|
|
347
359
|
}
|
|
@@ -401,6 +413,7 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
401
413
|
const y1 = useSecondaryYScale ? yScaleSecondary(lineObject[item][i - 1].y) : yScalePrimary(lineObject[item][i - 1].y);
|
|
402
414
|
const x2 = xScale(lineObject[item][i].xItem.xAxisPoint);
|
|
403
415
|
const y2 = useSecondaryYScale ? yScaleSecondary(lineObject[item][i].y) : yScalePrimary(lineObject[item][i].y);
|
|
416
|
+
const yScaleBandwidthTranslate = !useSecondaryYScale && _yAxisType === YAxisType.StringAxis ? yScalePrimary.bandwidth() / 2 : 0;
|
|
404
417
|
if (lineBorderWidth > 0) {
|
|
405
418
|
borderForLines.push(/*#__PURE__*/ React.createElement("line", {
|
|
406
419
|
key: `${index}-${i}-BorderLine`,
|
|
@@ -413,7 +426,7 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
413
426
|
fill: "transparent",
|
|
414
427
|
strokeLinecap: "round",
|
|
415
428
|
stroke: tokens.colorNeutralBackground1,
|
|
416
|
-
transform: `translate(${xScaleBandwidthTranslate},
|
|
429
|
+
transform: `translate(${xScaleBandwidthTranslate}, ${yScaleBandwidthTranslate})`
|
|
417
430
|
}));
|
|
418
431
|
}
|
|
419
432
|
var _lineObject_item__lineOptions_strokeWidth, _lineObject_item__lineOptions_strokeLinecap;
|
|
@@ -428,7 +441,7 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
428
441
|
strokeLinecap: (_lineObject_item__lineOptions_strokeLinecap = (_lineObject_item__lineOptions1 = lineObject[item][0].lineOptions) === null || _lineObject_item__lineOptions1 === void 0 ? void 0 : _lineObject_item__lineOptions1.strokeLinecap) !== null && _lineObject_item__lineOptions_strokeLinecap !== void 0 ? _lineObject_item__lineOptions_strokeLinecap : 'round',
|
|
429
442
|
strokeDasharray: (_lineObject_item__lineOptions2 = lineObject[item][0].lineOptions) === null || _lineObject_item__lineOptions2 === void 0 ? void 0 : _lineObject_item__lineOptions2.strokeDasharray,
|
|
430
443
|
stroke: lineObject[item][i].color,
|
|
431
|
-
transform: `translate(${xScaleBandwidthTranslate},
|
|
444
|
+
transform: `translate(${xScaleBandwidthTranslate}, ${yScaleBandwidthTranslate})`,
|
|
432
445
|
onMouseOver: (event)=>_lineHover(lineObject[item][i - 1], event),
|
|
433
446
|
onMouseLeave: _handleMouseOut
|
|
434
447
|
}));
|
|
@@ -440,6 +453,7 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
440
453
|
refElement: null
|
|
441
454
|
};
|
|
442
455
|
const noBarsAndLinesActive = circlePoint.xItem.chartData.filter((dataPoint)=>_noLegendHighlighted() || _isLegendHighlighted(dataPoint.legend)).length === 0;
|
|
456
|
+
const yScaleBandwidthTranslate = !circlePoint.useSecondaryYScale && _yAxisType === YAxisType.StringAxis ? yScalePrimary.bandwidth() / 2 : 0;
|
|
443
457
|
dots.push(/*#__PURE__*/ React.createElement("circle", {
|
|
444
458
|
key: `${index}-${subIndex}-dot`,
|
|
445
459
|
cx: xScale(circlePoint.xItem.xAxisPoint),
|
|
@@ -453,7 +467,7 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
453
467
|
// Elements with visibility: hidden cannot receive focus, so use opacity: 0 instead to hide them.
|
|
454
468
|
// For more information, see https://fuzzbomb.github.io/accessibility-demos/visually-hidden-focus-test.html
|
|
455
469
|
opacity: _getCircleOpacityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).opacity,
|
|
456
|
-
transform: `translate(${xScaleBandwidthTranslate},
|
|
470
|
+
transform: `translate(${xScaleBandwidthTranslate}, ${yScaleBandwidthTranslate})`,
|
|
457
471
|
ref: (e)=>circleRef.refElement = e,
|
|
458
472
|
...noBarsAndLinesActive ? {
|
|
459
473
|
tabIndex: !props.hideTooltip ? 0 : undefined,
|
|
@@ -525,14 +539,15 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
525
539
|
if ((_calloutAnchorPoint === null || _calloutAnchorPoint === void 0 ? void 0 : _calloutAnchorPoint.chartDataPoint) !== point || (_calloutAnchorPoint === null || _calloutAnchorPoint === void 0 ? void 0 : _calloutAnchorPoint.xAxisDataPoint) !== xAxisPoint) {
|
|
526
540
|
_calloutAnchorPoint = {
|
|
527
541
|
chartDataPoint: point,
|
|
528
|
-
xAxisDataPoint:
|
|
542
|
+
xAxisDataPoint: xAxisPoint instanceof Date ? formatDateToLocaleString(xAxisPoint, props.culture, props.useUTC) : xAxisPoint.toString()
|
|
529
543
|
};
|
|
544
|
+
const xCalloutValue = point.xAxisCalloutData || (xAxisPoint instanceof Date ? formatDateToLocaleString(xAxisPoint, props.culture, props.useUTC) : xAxisPoint.toString());
|
|
530
545
|
_updatePosition(clientX, clientY);
|
|
531
546
|
setPopoverOpen(_noLegendHighlighted() || _isLegendHighlighted(point.legend));
|
|
532
547
|
setCalloutLegend(point.legend);
|
|
533
548
|
setDataForHoverCard(point.data);
|
|
534
549
|
setColor(color);
|
|
535
|
-
setXCalloutValue(
|
|
550
|
+
setXCalloutValue(xCalloutValue);
|
|
536
551
|
setYCalloutValue(point.yAxisCalloutData);
|
|
537
552
|
setDataPointCalloutProps(point);
|
|
538
553
|
setCallOutAccessibilityData(point.callOutAccessibilityData);
|
|
@@ -566,22 +581,29 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
566
581
|
}
|
|
567
582
|
function _getBarGapAndScale(bars, yBarScale, defaultTotalHeight) {
|
|
568
583
|
const { barGapMax = 0 } = props;
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
const totalData = bars.reduce((iter, value)=>iter + Math.abs(value.data), 0);
|
|
572
|
-
const totalHeight = defaultTotalHeight !== null && defaultTotalHeight !== void 0 ? defaultTotalHeight : Math.abs(yBarScale(totalData) - yBarScale(Y_ORIGIN));
|
|
584
|
+
let totalData = 0;
|
|
585
|
+
let totalHeight;
|
|
573
586
|
let sumOfPercent = 0;
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
587
|
+
let scalingRatio;
|
|
588
|
+
if (_yAxisType === YAxisType.StringAxis) {
|
|
589
|
+
totalHeight = defaultTotalHeight !== null && defaultTotalHeight !== void 0 ? defaultTotalHeight : bars.reduce((total, bar)=>total + yBarScale(bar.data), 0);
|
|
590
|
+
} else {
|
|
591
|
+
// When displaying gaps between the bars, the height of each bar is
|
|
592
|
+
// adjusted so that the total of all bars is not changed by the gaps
|
|
593
|
+
totalData = bars.reduce((iter, value)=>iter + Math.abs(value.data), 0);
|
|
594
|
+
totalHeight = defaultTotalHeight !== null && defaultTotalHeight !== void 0 ? defaultTotalHeight : Math.abs(yBarScale(totalData) - yBarScale(Y_ORIGIN));
|
|
595
|
+
bars.forEach((point)=>{
|
|
596
|
+
let value = Math.abs(point.data) / totalData * 100;
|
|
597
|
+
if (value < 1 && value !== 0) {
|
|
598
|
+
value = 1;
|
|
599
|
+
}
|
|
600
|
+
sumOfPercent += value;
|
|
601
|
+
});
|
|
602
|
+
scalingRatio = sumOfPercent !== 0 ? sumOfPercent / 100 : 1;
|
|
603
|
+
}
|
|
582
604
|
const gaps = barGapMax && bars.length - 1;
|
|
583
605
|
const gapHeight = gaps && Math.max(barGapMin, Math.min(barGapMax, totalHeight * barGapMultiplier / gaps));
|
|
584
|
-
const heightValueScale = (totalHeight - gapHeight * gaps) / (totalData * scalingRatio);
|
|
606
|
+
const heightValueScale = _yAxisType === YAxisType.StringAxis ? 0 : (totalHeight - gapHeight * gaps) / (totalData * scalingRatio);
|
|
585
607
|
return {
|
|
586
608
|
gapHeight,
|
|
587
609
|
heightValueScale,
|
|
@@ -731,7 +753,7 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
731
753
|
const xPoint = xBarScale(_xAxisType === XAxisTypes.NumericAxis ? singleChartData.xAxisPoint : _xAxisType === XAxisTypes.DateAxis ? singleChartData.xAxisPoint : singleChartData.xAxisPoint);
|
|
732
754
|
const xScaleBandwidthTranslate = _xAxisType !== XAxisTypes.StringAxis ? -_barWidth / 2 : (xBarScale.bandwidth() - _barWidth) / 2;
|
|
733
755
|
let barTotalValue = 0;
|
|
734
|
-
const barsToDisplay = singleChartData.chartData.filter((point)=>point.data !== 0);
|
|
756
|
+
const barsToDisplay = singleChartData.chartData.filter((point)=>point.data !== 0 && point.data !== '' && !(_yAxisType === YAxisType.StringAxis && typeof yBarScale(point.data) === 'undefined'));
|
|
735
757
|
if (!barsToDisplay.length) {
|
|
736
758
|
return undefined;
|
|
737
759
|
}
|
|
@@ -739,7 +761,7 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
739
761
|
if (heightValueScale < 0) {
|
|
740
762
|
return undefined;
|
|
741
763
|
}
|
|
742
|
-
const yBaseline = containerHeight - _margins.bottom - yBarScale(Y_ORIGIN);
|
|
764
|
+
const yBaseline = containerHeight - _margins.bottom - (_yAxisType === YAxisType.StringAxis ? 0 : yBarScale(Y_ORIGIN));
|
|
743
765
|
let yPositiveStart = yBaseline;
|
|
744
766
|
let yNegativeStart = yBaseline;
|
|
745
767
|
let yPoint = 0;
|
|
@@ -759,22 +781,29 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
759
781
|
role: 'img',
|
|
760
782
|
tabIndex: !props.hideTooltip && shouldHighlight ? 0 : undefined
|
|
761
783
|
};
|
|
762
|
-
let barHeight
|
|
763
|
-
// FIXME: The current scaling logic may produce different min and gap heights for each bar stack.
|
|
764
|
-
const minHeight = Math.max(heightValueScale * absStackTotal / 100.0, barMinimumHeight);
|
|
765
|
-
if (barHeight < minHeight) {
|
|
766
|
-
barHeight = minHeight;
|
|
767
|
-
}
|
|
784
|
+
let barHeight;
|
|
768
785
|
const gapOffset = index ? gapHeight : 0;
|
|
769
|
-
if (
|
|
786
|
+
if (_yAxisType === YAxisType.StringAxis) {
|
|
787
|
+
barHeight = Math.max(containerHeight - _margins.bottom - (yBarScale(point.data) + yBarScale.bandwidth() / 2) - gapOffset, barMinimumHeight, 1);
|
|
770
788
|
yPositiveStart -= barHeight + gapOffset;
|
|
771
789
|
yPoint = yPositiveStart;
|
|
772
790
|
} else {
|
|
773
|
-
|
|
774
|
-
|
|
791
|
+
barHeight = Math.abs(heightValueScale * point.data);
|
|
792
|
+
// FIXME: The current scaling logic may produce different min and gap heights for each bar stack.
|
|
793
|
+
const minHeight = Math.max(heightValueScale * absStackTotal / 100.0, barMinimumHeight);
|
|
794
|
+
if (barHeight < minHeight) {
|
|
795
|
+
barHeight = minHeight;
|
|
796
|
+
}
|
|
797
|
+
if (point.data >= Y_ORIGIN) {
|
|
798
|
+
yPositiveStart -= barHeight + gapOffset;
|
|
799
|
+
yPoint = yPositiveStart;
|
|
800
|
+
} else {
|
|
801
|
+
yPoint = yNegativeStart + gapOffset;
|
|
802
|
+
yNegativeStart = yPoint + barHeight;
|
|
803
|
+
}
|
|
804
|
+
barTotalValue += point.data;
|
|
805
|
+
heightOfLastBar = index === barsToDisplay.length - 1 ? barHeight : 0;
|
|
775
806
|
}
|
|
776
|
-
barTotalValue += point.data;
|
|
777
|
-
heightOfLastBar = index === barsToDisplay.length - 1 ? barHeight : 0;
|
|
778
807
|
if (barCornerRadius && barHeight > barCornerRadius && index === barsToDisplay.length - 1) {
|
|
779
808
|
return /*#__PURE__*/ React.createElement(React.Fragment, {
|
|
780
809
|
key: index + indexNumber + `${shouldFocusWholeStack}`
|
|
@@ -837,7 +866,7 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
837
866
|
};
|
|
838
867
|
let showLabel = false;
|
|
839
868
|
let barLabel = 0;
|
|
840
|
-
if (!props.hideLabels) {
|
|
869
|
+
if (!props.hideLabels && _yAxisType !== YAxisType.StringAxis) {
|
|
841
870
|
if (_noLegendHighlighted()) {
|
|
842
871
|
showLabel = true;
|
|
843
872
|
barLabel = barTotalValue;
|
|
@@ -907,6 +936,83 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
907
936
|
endValue: d3Max(values)
|
|
908
937
|
};
|
|
909
938
|
}
|
|
939
|
+
function _initYAxisParams() {
|
|
940
|
+
if (_points[0].chartData.length > 0) {
|
|
941
|
+
_yAxisType = getTypeOfAxis(_points[0].chartData[0].data, false);
|
|
942
|
+
} else {
|
|
943
|
+
Object.keys(_lineObject).forEach((lineLegend)=>{
|
|
944
|
+
if (!_lineObject[lineLegend][0].useSecondaryYScale) {
|
|
945
|
+
_yAxisType = getTypeOfAxis(_lineObject[lineLegend][0].y, false);
|
|
946
|
+
}
|
|
947
|
+
});
|
|
948
|
+
}
|
|
949
|
+
_yAxisLabels = _getOrderedYAxisLabels();
|
|
950
|
+
}
|
|
951
|
+
function _getYDomainMargins(containerHeight) {
|
|
952
|
+
/**
|
|
953
|
+
* Specifies the extra top margin to apply above the highest y-axis tick label.
|
|
954
|
+
* Useful when stacked bars extend beyond the combined height of all y-axis labels (or categories).
|
|
955
|
+
*/ let yAxisTickMarginTop = 0;
|
|
956
|
+
/** Total height available to render the bars */ const totalHeight = containerHeight - _margins.bottom - _margins.top;
|
|
957
|
+
if (_yAxisType === YAxisType.StringAxis) {
|
|
958
|
+
/** Maximum height of the stacked bars, expressed in multiples of the height of a y-axis label (or category) */ let maxBarHeightInLabels = 0;
|
|
959
|
+
_points.forEach((xPoint)=>{
|
|
960
|
+
/** Height of the stacked bar, expressed in multiples of the height of a y-axis label (or category) */ let barHeightInLabels = 0;
|
|
961
|
+
xPoint.chartData.forEach((bar)=>{
|
|
962
|
+
barHeightInLabels += _yAxisLabels.indexOf(`${bar.data}`) + 1;
|
|
963
|
+
});
|
|
964
|
+
maxBarHeightInLabels = Math.max(maxBarHeightInLabels, barHeightInLabels);
|
|
965
|
+
});
|
|
966
|
+
/** Height of a y-axis label (or category) */ const yAxisLabelHeight = maxBarHeightInLabels === 0 ? 0 : totalHeight / maxBarHeightInLabels;
|
|
967
|
+
yAxisTickMarginTop += yAxisLabelHeight * (maxBarHeightInLabels - _yAxisLabels.length);
|
|
968
|
+
}
|
|
969
|
+
return {
|
|
970
|
+
..._margins,
|
|
971
|
+
top: _margins.top + yAxisTickMarginTop
|
|
972
|
+
};
|
|
973
|
+
}
|
|
974
|
+
function _getOrderedXAxisLabels() {
|
|
975
|
+
if (_xAxisType !== XAxisTypes.StringAxis) {
|
|
976
|
+
return [];
|
|
977
|
+
}
|
|
978
|
+
return sortAxisCategories(_mapCategoryToValues(), props.xAxisCategoryOrder);
|
|
979
|
+
}
|
|
980
|
+
function _getOrderedYAxisLabels() {
|
|
981
|
+
if (_yAxisType !== YAxisType.StringAxis) {
|
|
982
|
+
return [];
|
|
983
|
+
}
|
|
984
|
+
return sortAxisCategories(_mapCategoryToValues(true), props.yAxisCategoryOrder);
|
|
985
|
+
}
|
|
986
|
+
function _mapCategoryToValues(isYAxis = false) {
|
|
987
|
+
const categoryToValues = {};
|
|
988
|
+
_points.forEach((point)=>{
|
|
989
|
+
var _point_lineData;
|
|
990
|
+
point.chartData.forEach((bar)=>{
|
|
991
|
+
const category = isYAxis ? bar.data : point.xAxisPoint;
|
|
992
|
+
const value = isYAxis ? point.xAxisPoint : bar.data;
|
|
993
|
+
if (!categoryToValues[category]) {
|
|
994
|
+
categoryToValues[category] = [];
|
|
995
|
+
}
|
|
996
|
+
if (typeof value === 'number') {
|
|
997
|
+
categoryToValues[category].push(value);
|
|
998
|
+
}
|
|
999
|
+
});
|
|
1000
|
+
(_point_lineData = point.lineData) === null || _point_lineData === void 0 ? void 0 : _point_lineData.forEach((linePoint)=>{
|
|
1001
|
+
if (isYAxis && linePoint.useSecondaryYScale) {
|
|
1002
|
+
return;
|
|
1003
|
+
}
|
|
1004
|
+
const category = isYAxis ? linePoint.y : point.xAxisPoint;
|
|
1005
|
+
const value = isYAxis ? point.xAxisPoint : linePoint.y;
|
|
1006
|
+
if (!categoryToValues[category]) {
|
|
1007
|
+
categoryToValues[category] = [];
|
|
1008
|
+
}
|
|
1009
|
+
if (typeof value === 'number') {
|
|
1010
|
+
categoryToValues[category].push(value);
|
|
1011
|
+
}
|
|
1012
|
+
});
|
|
1013
|
+
});
|
|
1014
|
+
return categoryToValues;
|
|
1015
|
+
}
|
|
910
1016
|
if (!_isChartEmpty()) {
|
|
911
1017
|
_adjustProps();
|
|
912
1018
|
const _isHavingLines = props.data.some((item)=>item.lineData && item.lineData.length > 0);
|
|
@@ -962,6 +1068,12 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
962
1068
|
},
|
|
963
1069
|
componentRef: cartesianChartRef,
|
|
964
1070
|
showRoundOffXTickValues: !isScalePaddingDefined(props.xAxisInnerPadding, props.xAxisPadding),
|
|
1071
|
+
yAxisType: _yAxisType,
|
|
1072
|
+
stringDatasetForYAxisDomain: [
|
|
1073
|
+
'',
|
|
1074
|
+
..._yAxisLabels
|
|
1075
|
+
],
|
|
1076
|
+
getYDomainMargins: _getYDomainMargins,
|
|
965
1077
|
/* eslint-disable react/jsx-no-bind */ children: (props)=>{
|
|
966
1078
|
return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("g", null, _bars), /*#__PURE__*/ React.createElement("g", null, _isHavingLines && _createLines(props.xScale, props.yScalePrimary, props.containerHeight, props.containerWidth, props.yScaleSecondary)));
|
|
967
1079
|
}
|
|
@@ -975,5 +1087,5 @@ export const VerticalStackedBarChart = (props)=>{
|
|
|
975
1087
|
},
|
|
976
1088
|
"aria-label": 'Graph has no data to display'
|
|
977
1089
|
});
|
|
978
|
-
};
|
|
1090
|
+
});
|
|
979
1091
|
VerticalStackedBarChart.displayName = 'VerticalStackedBarChart';
|