@mui/x-charts 8.13.0 → 8.14.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/BarChart/BarChart.js +44 -36
- package/CHANGELOG.md +171 -1
- package/ChartContainer/ChartContainer.js +68 -56
- package/ChartsTooltip/ChartsTooltipContainer.js +2 -0
- package/ChartsXAxis/useAxisTicksProps.d.ts +197 -355
- package/ChartsYAxis/useAxisTicksProps.d.ts +197 -355
- package/LineChart/LineChart.js +44 -36
- package/PieChart/PieArc.d.ts +18 -4
- package/PieChart/PieArc.js +11 -5
- package/PieChart/PieArcPlot.js +3 -1
- package/ScatterChart/ScatterChart.js +44 -36
- package/SparkLineChart/SparkLineChart.js +44 -36
- package/esm/BarChart/BarChart.js +44 -36
- package/esm/ChartContainer/ChartContainer.js +68 -56
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +2 -0
- package/esm/ChartsXAxis/useAxisTicksProps.d.ts +197 -355
- package/esm/ChartsYAxis/useAxisTicksProps.d.ts +197 -355
- package/esm/LineChart/LineChart.js +44 -36
- package/esm/PieChart/PieArc.d.ts +18 -4
- package/esm/PieChart/PieArc.js +11 -5
- package/esm/PieChart/PieArcPlot.js +3 -1
- package/esm/ScatterChart/ScatterChart.js +44 -36
- package/esm/SparkLineChart/SparkLineChart.js +44 -36
- package/esm/hooks/animation/useAnimate.js +5 -3
- package/esm/hooks/useScale.d.ts +5 -1
- package/esm/index.js +1 -1
- package/esm/internals/animation/useAnimateInternal.d.ts +1 -1
- package/esm/internals/animation/useAnimateInternal.js +1 -1
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +8 -8
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +4 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +9 -11
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -28
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +4 -5
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +3 -24
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +20 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +77 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +4 -65
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +7 -104
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +31 -39
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +166 -6
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +158 -47
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +10 -3
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +3 -2
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.types.d.ts +6 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +5 -1
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +9 -1
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +10 -1
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +2 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +2 -2
- package/esm/internals/scaleGuards.d.ts +12 -6
- package/esm/internals/symlogScale.js +5 -0
- package/esm/locales/enUS.js +4 -4
- package/esm/locales/ptBR.js +97 -99
- package/esm/models/axis.d.ts +39 -17
- package/esm/models/axis.js +3 -0
- package/hooks/animation/useAnimate.js +4 -3
- package/hooks/useScale.d.ts +5 -1
- package/index.js +1 -1
- package/internals/animation/useAnimateInternal.d.ts +1 -1
- package/internals/animation/useAnimateInternal.js +1 -1
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +7 -7
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +4 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +9 -11
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -28
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +4 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +3 -25
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +20 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +84 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +4 -65
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +8 -108
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +29 -37
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +166 -6
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +158 -47
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +10 -3
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +3 -2
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.types.d.ts +6 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +5 -1
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +9 -1
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +11 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +2 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +1 -1
- package/internals/scaleGuards.d.ts +12 -6
- package/internals/symlogScale.js +5 -0
- package/locales/enUS.js +4 -4
- package/locales/ptBR.js +97 -99
- package/models/axis.d.ts +39 -17
- package/models/axis.js +4 -0
- package/package.json +6 -6
|
@@ -3,12 +3,17 @@ import { selectorChartDrawingArea } from "../../corePlugins/useChartDimensions/i
|
|
|
3
3
|
import { selectorChartSeriesConfig, selectorChartSeriesProcessed } from "../../corePlugins/useChartSeries/index.js";
|
|
4
4
|
import { createSelector } from "../../utils/selectors.js";
|
|
5
5
|
import { computeAxisValue } from "./computeAxisValue.js";
|
|
6
|
-
import {
|
|
6
|
+
import { createContinuousScaleGetAxisFilter, createDiscreteScaleGetAxisFilter, createGetAxisFilters } from "./createAxisFilterMapper.js";
|
|
7
7
|
import { createZoomLookup } from "./createZoomLookup.js";
|
|
8
|
+
import { isBandScaleConfig, isPointScaleConfig } from "../../../../models/axis.js";
|
|
8
9
|
import { selectorChartRawXAxis, selectorChartRawYAxis } from "./useChartCartesianAxisLayout.selectors.js";
|
|
9
10
|
import { selectorPreferStrictDomainInLineCharts } from "../../corePlugins/useChartExperimentalFeature/index.js";
|
|
10
|
-
import { getXAxesScales, getYAxesScales } from "./getAxisScale.js";
|
|
11
11
|
import { getDefaultTickNumber } from "../../../ticks.js";
|
|
12
|
+
import { getNormalizedAxisScale, getRange } from "./getAxisScale.js";
|
|
13
|
+
import { isOrdinalScale } from "../../../scaleGuards.js";
|
|
14
|
+
import { zoomScaleRange } from "./zoom.js";
|
|
15
|
+
import { getAxisExtrema } from "./getAxisExtrema.js";
|
|
16
|
+
import { calculateFinalDomain, calculateInitialDomainAndTickNumber } from "./domain.js";
|
|
12
17
|
export const createZoomMap = zoom => {
|
|
13
18
|
const zoomItemMap = new Map();
|
|
14
19
|
zoom.forEach(zoomItem => {
|
|
@@ -26,66 +31,176 @@ export const selectorChartZoomIsInteracting = createSelector([selectorChartZoomS
|
|
|
26
31
|
export const selectorChartZoomMap = createSelector([selectorChartZoomState], zoom => zoom?.zoomData && createZoomMap(zoom?.zoomData));
|
|
27
32
|
export const selectorChartZoomOptionsLookup = createSelector([selectorChartRawXAxis, selectorChartRawYAxis], (xAxis, yAxis) => _extends({}, createZoomLookup('x')(xAxis), createZoomLookup('y')(yAxis)));
|
|
28
33
|
export const selectorChartAxisZoomOptionsLookup = createSelector([selectorChartZoomOptionsLookup, (_, axisId) => axisId], (axisLookup, axisId) => axisLookup[axisId]);
|
|
29
|
-
const selectorChartXFilter = createSelector([selectorChartZoomMap, selectorChartZoomOptionsLookup], (zoomMap, zoomOptions) => zoomMap && zoomOptions && createAxisFilterMapper(zoomMap, zoomOptions, 'x'));
|
|
30
|
-
const selectorChartYFilter = createSelector([selectorChartZoomMap, selectorChartZoomOptionsLookup], (zoomMap, zoomOptions) => zoomMap && zoomOptions && createAxisFilterMapper(zoomMap, zoomOptions, 'y'));
|
|
31
34
|
export const selectorDefaultXAxisTickNumber = createSelector([selectorChartDrawingArea], function selectorDefaultXAxisTickNumber(drawingArea) {
|
|
32
35
|
return getDefaultTickNumber(drawingArea.width);
|
|
33
36
|
});
|
|
34
37
|
export const selectorDefaultYAxisTickNumber = createSelector([selectorChartDrawingArea], function selectorDefaultYAxisTickNumber(drawingArea) {
|
|
35
38
|
return getDefaultTickNumber(drawingArea.height);
|
|
36
39
|
});
|
|
37
|
-
export const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
axis
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
export const selectorChartXDomains = createSelector([selectorChartRawXAxis, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorPreferStrictDomainInLineCharts, selectorDefaultXAxisTickNumber], function selectorChartXDomains(axes, formattedSeries, seriesConfig, preferStrictDomainInLineCharts, defaultTickNumber) {
|
|
41
|
+
const axisDirection = 'x';
|
|
42
|
+
const domains = {};
|
|
43
|
+
axes?.forEach((eachAxis, axisIndex) => {
|
|
44
|
+
const axis = eachAxis;
|
|
45
|
+
if (isBandScaleConfig(axis) || isPointScaleConfig(axis)) {
|
|
46
|
+
domains[axis.id] = {
|
|
47
|
+
domain: axis.data
|
|
48
|
+
};
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const axisExtrema = getAxisExtrema(axis, axisDirection, seriesConfig, axisIndex, formattedSeries);
|
|
52
|
+
domains[axis.id] = calculateInitialDomainAndTickNumber(axis, 'x', axisIndex, formattedSeries, axisExtrema, defaultTickNumber, preferStrictDomainInLineCharts);
|
|
46
53
|
});
|
|
54
|
+
return domains;
|
|
47
55
|
});
|
|
48
|
-
export const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
axis
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
export const selectorChartYDomains = createSelector([selectorChartRawYAxis, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorPreferStrictDomainInLineCharts, selectorDefaultYAxisTickNumber], function selectorChartYDomains(axes, formattedSeries, seriesConfig, preferStrictDomainInLineCharts, defaultTickNumber) {
|
|
57
|
+
const axisDirection = 'y';
|
|
58
|
+
const domains = {};
|
|
59
|
+
axes?.forEach((eachAxis, axisIndex) => {
|
|
60
|
+
const axis = eachAxis;
|
|
61
|
+
if (isBandScaleConfig(axis) || isPointScaleConfig(axis)) {
|
|
62
|
+
domains[axis.id] = {
|
|
63
|
+
domain: axis.data
|
|
64
|
+
};
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const axisExtrema = getAxisExtrema(axis, axisDirection, seriesConfig, axisIndex, formattedSeries);
|
|
68
|
+
domains[axis.id] = calculateInitialDomainAndTickNumber(axis, 'y', axisIndex, formattedSeries, axisExtrema, defaultTickNumber, preferStrictDomainInLineCharts);
|
|
57
69
|
});
|
|
70
|
+
return domains;
|
|
58
71
|
});
|
|
59
|
-
export const selectorChartZoomAxisFilters = createSelector([
|
|
60
|
-
if (
|
|
61
|
-
// Early return if there is no zoom.
|
|
72
|
+
export const selectorChartZoomAxisFilters = createSelector([selectorChartZoomMap, selectorChartZoomOptionsLookup, selectorChartRawXAxis, selectorChartRawYAxis, selectorChartXDomains, selectorChartYDomains], (zoomMap, zoomOptions, xAxis, yAxis, xDomains, yDomains) => {
|
|
73
|
+
if (!zoomMap || !zoomOptions) {
|
|
62
74
|
return undefined;
|
|
63
75
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
76
|
+
let hasFilter = false;
|
|
77
|
+
const filters = {};
|
|
78
|
+
const axes = [...(xAxis ?? []), ...(yAxis ?? [])];
|
|
79
|
+
for (let i = 0; i < axes.length; i += 1) {
|
|
80
|
+
const axis = axes[i];
|
|
81
|
+
if (!zoomOptions[axis.id] || zoomOptions[axis.id].filterMode !== 'discard') {
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
const zoom = zoomMap.get(axis.id);
|
|
85
|
+
if (zoom === undefined || zoom.start <= 0 && zoom.end >= 100) {
|
|
86
|
+
// No zoom, or zoom with all data visible
|
|
87
|
+
continue;
|
|
68
88
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
89
|
+
const axisDirection = i < (xAxis?.length ?? 0) ? 'x' : 'y';
|
|
90
|
+
if (axis.scaleType === 'band' || axis.scaleType === 'point') {
|
|
91
|
+
filters[axis.id] = createDiscreteScaleGetAxisFilter(axis.data, zoom.start, zoom.end, axisDirection);
|
|
92
|
+
} else {
|
|
93
|
+
const {
|
|
94
|
+
domain
|
|
95
|
+
} = axisDirection === 'x' ? xDomains[axis.id] : yDomains[axis.id];
|
|
96
|
+
filters[axis.id] = createContinuousScaleGetAxisFilter(
|
|
97
|
+
// For continuous scales, the domain is always a two-value array.
|
|
98
|
+
domain, zoom.start, zoom.end, axisDirection, axis.data);
|
|
75
99
|
}
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
if (
|
|
100
|
+
hasFilter = true;
|
|
101
|
+
}
|
|
102
|
+
if (!hasFilter) {
|
|
79
103
|
return undefined;
|
|
80
104
|
}
|
|
81
|
-
return createGetAxisFilters(
|
|
105
|
+
return createGetAxisFilters(filters);
|
|
106
|
+
});
|
|
107
|
+
export const selectorChartFilteredXDomains = createSelector([selectorChartRawXAxis, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomMap, selectorChartZoomOptionsLookup, selectorChartZoomAxisFilters, selectorPreferStrictDomainInLineCharts, selectorChartXDomains], (axes, formattedSeries, seriesConfig, zoomMap, zoomOptions, getFilters, preferStrictDomainInLineCharts, domains) => {
|
|
108
|
+
const filteredDomains = {};
|
|
109
|
+
axes?.forEach((axis, axisIndex) => {
|
|
110
|
+
const domain = domains[axis.id].domain;
|
|
111
|
+
if (isBandScaleConfig(axis) || isPointScaleConfig(axis)) {
|
|
112
|
+
filteredDomains[axis.id] = domain;
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const zoom = zoomMap?.get(axis.id);
|
|
116
|
+
const zoomOption = zoomOptions?.[axis.id];
|
|
117
|
+
const filter = zoom === undefined && !zoomOption ? getFilters : undefined; // Do not apply filtering if zoom is already defined.
|
|
118
|
+
|
|
119
|
+
if (!filter) {
|
|
120
|
+
filteredDomains[axis.id] = domain;
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const rawTickNumber = domains[axis.id].tickNumber;
|
|
124
|
+
const axisExtrema = getAxisExtrema(axis, 'x', seriesConfig, axisIndex, formattedSeries, filter);
|
|
125
|
+
filteredDomains[axis.id] = calculateFinalDomain(axis, 'x', axisIndex, formattedSeries, axisExtrema, rawTickNumber, preferStrictDomainInLineCharts);
|
|
126
|
+
});
|
|
127
|
+
return filteredDomains;
|
|
128
|
+
});
|
|
129
|
+
export const selectorChartFilteredYDomains = createSelector([selectorChartRawYAxis, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomMap, selectorChartZoomOptionsLookup, selectorChartZoomAxisFilters, selectorPreferStrictDomainInLineCharts, selectorChartYDomains], (axes, formattedSeries, seriesConfig, zoomMap, zoomOptions, getFilters, preferStrictDomainInLineCharts, domains) => {
|
|
130
|
+
const filteredDomains = {};
|
|
131
|
+
axes?.forEach((axis, axisIndex) => {
|
|
132
|
+
const domain = domains[axis.id].domain;
|
|
133
|
+
if (isBandScaleConfig(axis) || isPointScaleConfig(axis)) {
|
|
134
|
+
filteredDomains[axis.id] = domain;
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const zoom = zoomMap?.get(axis.id);
|
|
138
|
+
const zoomOption = zoomOptions?.[axis.id];
|
|
139
|
+
const filter = zoom === undefined && !zoomOption ? getFilters : undefined; // Do not apply filtering if zoom is already defined.
|
|
140
|
+
|
|
141
|
+
if (!filter) {
|
|
142
|
+
filteredDomains[axis.id] = domain;
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const rawTickNumber = domains[axis.id].tickNumber;
|
|
146
|
+
const axisExtrema = getAxisExtrema(axis, 'y', seriesConfig, axisIndex, formattedSeries, filter);
|
|
147
|
+
filteredDomains[axis.id] = calculateFinalDomain(axis, 'y', axisIndex, formattedSeries, axisExtrema, rawTickNumber, preferStrictDomainInLineCharts);
|
|
148
|
+
});
|
|
149
|
+
return filteredDomains;
|
|
150
|
+
});
|
|
151
|
+
export const selectorChartNormalizedXScales = createSelector([selectorChartRawXAxis, selectorChartFilteredXDomains], function selectorChartNormalizedXScales(axes, filteredDomains) {
|
|
152
|
+
const scales = {};
|
|
153
|
+
axes?.forEach(eachAxis => {
|
|
154
|
+
const axis = eachAxis;
|
|
155
|
+
const domain = filteredDomains[axis.id];
|
|
156
|
+
scales[axis.id] = getNormalizedAxisScale(axis, domain);
|
|
157
|
+
});
|
|
158
|
+
return scales;
|
|
159
|
+
});
|
|
160
|
+
export const selectorChartNormalizedYScales = createSelector([selectorChartRawYAxis, selectorChartFilteredYDomains], function selectorChartNormalizedYScales(axes, filteredDomains) {
|
|
161
|
+
const scales = {};
|
|
162
|
+
axes?.forEach(eachAxis => {
|
|
163
|
+
const axis = eachAxis;
|
|
164
|
+
const domain = filteredDomains[axis.id];
|
|
165
|
+
scales[axis.id] = getNormalizedAxisScale(axis, domain);
|
|
166
|
+
});
|
|
167
|
+
return scales;
|
|
168
|
+
});
|
|
169
|
+
export const selectorChartXScales = createSelector([selectorChartRawXAxis, selectorChartNormalizedXScales, selectorChartDrawingArea, selectorChartZoomMap], function selectorChartXScales(axes, normalizedScales, drawingArea, zoomMap) {
|
|
170
|
+
const scales = {};
|
|
171
|
+
axes?.forEach(eachAxis => {
|
|
172
|
+
const axis = eachAxis;
|
|
173
|
+
const zoom = zoomMap?.get(axis.id);
|
|
174
|
+
const zoomRange = zoom ? [zoom.start, zoom.end] : [0, 100];
|
|
175
|
+
const range = getRange(drawingArea, 'x', axis);
|
|
176
|
+
const scale = normalizedScales[axis.id].copy();
|
|
177
|
+
const zoomedRange = zoomScaleRange(range, zoomRange);
|
|
178
|
+
scale.range(zoomedRange);
|
|
179
|
+
scales[axis.id] = scale;
|
|
180
|
+
});
|
|
181
|
+
return scales;
|
|
182
|
+
});
|
|
183
|
+
export const selectorChartYScales = createSelector([selectorChartRawYAxis, selectorChartNormalizedYScales, selectorChartDrawingArea, selectorChartZoomMap], function selectorChartYScales(axes, normalizedScales, drawingArea, zoomMap) {
|
|
184
|
+
const scales = {};
|
|
185
|
+
axes?.forEach(eachAxis => {
|
|
186
|
+
const axis = eachAxis;
|
|
187
|
+
const zoom = zoomMap?.get(axis.id);
|
|
188
|
+
const zoomRange = zoom ? [zoom.start, zoom.end] : [0, 100];
|
|
189
|
+
const range = getRange(drawingArea, 'y', axis);
|
|
190
|
+
const scale = normalizedScales[axis.id].copy();
|
|
191
|
+
const scaleRange = isOrdinalScale(scale) ? range.reverse() : range;
|
|
192
|
+
const zoomedRange = zoomScaleRange(scaleRange, zoomRange);
|
|
193
|
+
scale.range(zoomedRange);
|
|
194
|
+
scales[axis.id] = scale;
|
|
195
|
+
});
|
|
196
|
+
return scales;
|
|
82
197
|
});
|
|
83
198
|
|
|
84
199
|
/**
|
|
85
200
|
* The only interesting selectors that merge axis data and zoom if provided.
|
|
86
201
|
*/
|
|
87
202
|
|
|
88
|
-
export const selectorChartXAxis = createSelector([selectorChartRawXAxis, selectorChartDrawingArea, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomMap,
|
|
203
|
+
export const selectorChartXAxis = createSelector([selectorChartRawXAxis, selectorChartDrawingArea, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomMap, selectorChartXDomains, selectorChartXScales], (axis, drawingArea, formattedSeries, seriesConfig, zoomMap, domains, scales) => computeAxisValue({
|
|
89
204
|
scales,
|
|
90
205
|
drawingArea,
|
|
91
206
|
formattedSeries,
|
|
@@ -93,11 +208,9 @@ export const selectorChartXAxis = createSelector([selectorChartRawXAxis, selecto
|
|
|
93
208
|
seriesConfig,
|
|
94
209
|
axisDirection: 'x',
|
|
95
210
|
zoomMap,
|
|
96
|
-
|
|
97
|
-
getFilters,
|
|
98
|
-
preferStrictDomainInLineCharts
|
|
211
|
+
domains
|
|
99
212
|
}));
|
|
100
|
-
export const selectorChartYAxis = createSelector([selectorChartRawYAxis, selectorChartDrawingArea, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomMap,
|
|
213
|
+
export const selectorChartYAxis = createSelector([selectorChartRawYAxis, selectorChartDrawingArea, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomMap, selectorChartYDomains, selectorChartYScales], (axis, drawingArea, formattedSeries, seriesConfig, zoomMap, domains, scales) => computeAxisValue({
|
|
101
214
|
scales,
|
|
102
215
|
drawingArea,
|
|
103
216
|
formattedSeries,
|
|
@@ -105,9 +218,7 @@ export const selectorChartYAxis = createSelector([selectorChartRawYAxis, selecto
|
|
|
105
218
|
seriesConfig,
|
|
106
219
|
axisDirection: 'y',
|
|
107
220
|
zoomMap,
|
|
108
|
-
|
|
109
|
-
getFilters,
|
|
110
|
-
preferStrictDomainInLineCharts
|
|
221
|
+
domains
|
|
111
222
|
}));
|
|
112
223
|
export const selectorChartAxis = createSelector([selectorChartXAxis, selectorChartYAxis, (_, axisId) => axisId], (xAxes, yAxes, axisId) => xAxes?.axis[axisId] ?? yAxes?.axis[axisId]);
|
|
113
224
|
export const selectorChartRawAxis = createSelector([selectorChartRawXAxis, selectorChartRawYAxis, (state, axisId) => axisId], (xAxes, yAxes, axisId) => {
|
|
@@ -23,9 +23,14 @@ export const useChartHighlight = ({
|
|
|
23
23
|
}, [store, params.highlightedItem]);
|
|
24
24
|
const clearHighlight = useEventCallback(() => {
|
|
25
25
|
params.onHighlightChange?.(null);
|
|
26
|
+
const prevItem = store.getSnapshot().highlight.item;
|
|
27
|
+
if (prevItem === null) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
26
30
|
store.update(prev => _extends({}, prev, {
|
|
27
31
|
highlight: {
|
|
28
|
-
item: null
|
|
32
|
+
item: null,
|
|
33
|
+
lastUpdate: 'pointer'
|
|
29
34
|
}
|
|
30
35
|
}));
|
|
31
36
|
});
|
|
@@ -37,7 +42,8 @@ export const useChartHighlight = ({
|
|
|
37
42
|
params.onHighlightChange?.(newItem);
|
|
38
43
|
store.update(prev => _extends({}, prev, {
|
|
39
44
|
highlight: {
|
|
40
|
-
item: newItem
|
|
45
|
+
item: newItem,
|
|
46
|
+
lastUpdate: 'pointer'
|
|
41
47
|
}
|
|
42
48
|
}));
|
|
43
49
|
});
|
|
@@ -55,7 +61,8 @@ useChartHighlight.getDefaultizedParams = ({
|
|
|
55
61
|
});
|
|
56
62
|
useChartHighlight.getInitialState = params => ({
|
|
57
63
|
highlight: {
|
|
58
|
-
item: params.highlightedItem
|
|
64
|
+
item: params.highlightedItem,
|
|
65
|
+
lastUpdate: 'pointer'
|
|
59
66
|
}
|
|
60
67
|
});
|
|
61
68
|
useChartHighlight.params = {
|
package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts
CHANGED
|
@@ -8,24 +8,24 @@ export declare const selectorChartsHighlightScopePerSeriesId: import("reselect")
|
|
|
8
8
|
}, Map<SeriesId, Partial<HighlightScope> | undefined>, any[]>;
|
|
9
9
|
export declare const selectorChartsHighlightedItem: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & import("./useChartHighlight.types.js").UseChartHighlightState & Partial<{}> & {
|
|
10
10
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
11
|
-
} & {
|
|
11
|
+
} & Partial<import("../useChartKeyboardNavigation/useChartKeyboardNavigation.types.js").UseChartKeyboardNavigationState> & {
|
|
12
12
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
13
13
|
}, HighlightItemData | null, any[]>;
|
|
14
14
|
export declare const selectorChartsHighlightScope: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
15
15
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
16
16
|
} & {
|
|
17
17
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
18
|
-
} & import("./useChartHighlight.types.js").UseChartHighlightState
|
|
18
|
+
} & import("./useChartHighlight.types.js").UseChartHighlightState & Partial<import("../useChartKeyboardNavigation/useChartKeyboardNavigation.types.js").UseChartKeyboardNavigationState>, Partial<HighlightScope> | null, any[]>;
|
|
19
19
|
export declare const selectorChartsIsHighlightedCallback: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
20
20
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
21
21
|
} & {
|
|
22
22
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
23
|
-
} & import("./useChartHighlight.types.js").UseChartHighlightState
|
|
23
|
+
} & import("./useChartHighlight.types.js").UseChartHighlightState & Partial<import("../useChartKeyboardNavigation/useChartKeyboardNavigation.types.js").UseChartKeyboardNavigationState>, (item: HighlightItemData | null) => boolean, any[]>;
|
|
24
24
|
export declare const selectorChartsIsFadedCallback: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
25
25
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
26
26
|
} & {
|
|
27
27
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
28
|
-
} & import("./useChartHighlight.types.js").UseChartHighlightState
|
|
28
|
+
} & import("./useChartHighlight.types.js").UseChartHighlightState & Partial<import("../useChartKeyboardNavigation/useChartKeyboardNavigation.types.js").UseChartKeyboardNavigationState>, (item: HighlightItemData | null) => boolean, any[]>;
|
|
29
29
|
export declare const selectorChartsIsHighlighted: import("reselect").Selector<any, boolean, [item: HighlightItemData | null]>;
|
|
30
30
|
export declare const selectorChartIsSeriesHighlighted: import("reselect").Selector<any, boolean, [seriesId: SeriesId]>;
|
|
31
31
|
export declare const selectorChartIsSeriesFaded: import("reselect").Selector<any, boolean, [seriesId: SeriesId]>;
|
package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js
CHANGED
|
@@ -2,6 +2,7 @@ import { createSelector } from "../../utils/selectors.js";
|
|
|
2
2
|
import { createIsHighlighted } from "./createIsHighlighted.js";
|
|
3
3
|
import { createIsFaded } from "./createIsFaded.js";
|
|
4
4
|
import { getSeriesHighlightedItem, getSeriesUnfadedItem, isSeriesFaded, isSeriesHighlighted } from "./highlightStates.js";
|
|
5
|
+
import { selectorChartsKeyboardItem } from "../useChartKeyboardNavigation/index.js";
|
|
5
6
|
const selectHighlight = state => state.highlight;
|
|
6
7
|
const selectSeries = state => state.series;
|
|
7
8
|
export const selectorChartsHighlightScopePerSeriesId = createSelector([selectSeries], series => {
|
|
@@ -15,8 +16,8 @@ export const selectorChartsHighlightScopePerSeriesId = createSelector([selectSer
|
|
|
15
16
|
});
|
|
16
17
|
return map;
|
|
17
18
|
});
|
|
18
|
-
export const selectorChartsHighlightedItem = createSelector([selectHighlight], function selectorChartsHighlightedItem(highlight) {
|
|
19
|
-
return highlight.item;
|
|
19
|
+
export const selectorChartsHighlightedItem = createSelector([selectHighlight, selectorChartsKeyboardItem], function selectorChartsHighlightedItem(highlight, keyboardItem) {
|
|
20
|
+
return highlight.lastUpdate === 'pointer' ? highlight.item : keyboardItem;
|
|
20
21
|
});
|
|
21
22
|
export const selectorChartsHighlightScope = createSelector([selectorChartsHighlightScopePerSeriesId, selectorChartsHighlightedItem], function selectorChartsHighlightScope(seriesIdToHighlightScope, highlightedItem) {
|
|
22
23
|
if (!highlightedItem) {
|
|
@@ -28,6 +28,7 @@ export type HighlightItemData = {
|
|
|
28
28
|
*/
|
|
29
29
|
dataIndex?: number;
|
|
30
30
|
};
|
|
31
|
+
export type HighlightUpdateSource = 'pointer' | 'keyboard';
|
|
31
32
|
export interface UseChartHighlightInstance {
|
|
32
33
|
/**
|
|
33
34
|
* Remove all highlight.
|
|
@@ -59,6 +60,11 @@ export interface UseChartHighlightState {
|
|
|
59
60
|
* The item currently highlighted.
|
|
60
61
|
*/
|
|
61
62
|
item: HighlightItemData | null;
|
|
63
|
+
/**
|
|
64
|
+
* The last interaction highlight update.
|
|
65
|
+
* Used to decide if highlight should be based on pointer position or keyboard navigation.
|
|
66
|
+
*/
|
|
67
|
+
lastUpdate: HighlightUpdateSource;
|
|
62
68
|
};
|
|
63
69
|
}
|
|
64
70
|
export type UseChartHighlightSignature = ChartPluginSignature<{
|
|
@@ -132,7 +132,11 @@ export const useChartKeyboardNavigation = ({
|
|
|
132
132
|
}
|
|
133
133
|
if (newFocusedItem !== prevState.keyboardNavigation.item) {
|
|
134
134
|
event.preventDefault();
|
|
135
|
-
return _extends({}, prevState, prevState.
|
|
135
|
+
return _extends({}, prevState, prevState.highlight && {
|
|
136
|
+
highlight: _extends({}, prevState.highlight, {
|
|
137
|
+
lastUpdate: 'keyboard'
|
|
138
|
+
})
|
|
139
|
+
}, prevState.interaction && {
|
|
136
140
|
interaction: _extends({}, prevState.interaction, {
|
|
137
141
|
lastUpdate: 'keyboard'
|
|
138
142
|
})
|
|
@@ -34,4 +34,12 @@ export declare const selectorChartsKeyboardYAxisIndex: import("reselect").Select
|
|
|
34
34
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
35
35
|
} & {
|
|
36
36
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
37
|
-
} & Partial<import("../useChartCartesianAxis/index.js").UseChartCartesianAxisState> & Partial<{}>, AxisItemIdentifier | undefined, any[]>;
|
|
37
|
+
} & Partial<import("../useChartCartesianAxis/index.js").UseChartCartesianAxisState> & Partial<{}>, AxisItemIdentifier | undefined, any[]>;
|
|
38
|
+
export declare const selectorChartsKeyboardItem: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartKeyboardNavigation.types.js").UseChartKeyboardNavigationState> & {
|
|
39
|
+
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
40
|
+
} & {
|
|
41
|
+
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
42
|
+
}, {
|
|
43
|
+
seriesId: SeriesId;
|
|
44
|
+
dataIndex: number | undefined;
|
|
45
|
+
} | null, any[]>;
|
|
@@ -30,4 +30,13 @@ const createSelectAxisHighlight = direction => (type, seriesId, dataIndex, axis,
|
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
export const selectorChartsKeyboardXAxisIndex = createSelector([selectorChartsFocusedSeriesType, selectorChartsFocusedSeriesId, selectorChartsFocusedDataIndex, selectorChartXAxis, selectorChartSeriesProcessed], createSelectAxisHighlight('x'));
|
|
33
|
-
export const selectorChartsKeyboardYAxisIndex = createSelector([selectorChartsFocusedSeriesType, selectorChartsFocusedSeriesId, selectorChartsFocusedDataIndex, selectorChartYAxis, selectorChartSeriesProcessed], createSelectAxisHighlight('y'));
|
|
33
|
+
export const selectorChartsKeyboardYAxisIndex = createSelector([selectorChartsFocusedSeriesType, selectorChartsFocusedSeriesId, selectorChartsFocusedDataIndex, selectorChartYAxis, selectorChartSeriesProcessed], createSelectAxisHighlight('y'));
|
|
34
|
+
export const selectorChartsKeyboardItem = createSelector([selectorChartsFocusedSeriesType, selectorChartsFocusedSeriesId, selectorChartsFocusedDataIndex], function selectorChartsKeyboardItem(seriesType, seriesId, dataIndex) {
|
|
35
|
+
if (seriesId === undefined) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
seriesId,
|
|
40
|
+
dataIndex: seriesType === 'line' ? undefined : dataIndex
|
|
41
|
+
};
|
|
42
|
+
});
|
|
@@ -2,6 +2,7 @@ import { ChartPluginSignature } from "../../models/index.js";
|
|
|
2
2
|
import { ChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
3
3
|
import { SeriesId } from "../../../../models/seriesType/common.js";
|
|
4
4
|
import { UseChartInteractionSignature } from "../useChartInteraction/index.js";
|
|
5
|
+
import { UseChartHighlightSignature } from "../useChartHighlight/index.js";
|
|
5
6
|
export interface UseChartKeyboardNavigationInstance {}
|
|
6
7
|
type SeriesItemIdentifier = {
|
|
7
8
|
/**
|
|
@@ -31,6 +32,6 @@ export type UseChartKeyboardNavigationSignature = ChartPluginSignature<{
|
|
|
31
32
|
defaultizedParams: UseChartKeyboardNavigationParameters;
|
|
32
33
|
instance: UseChartKeyboardNavigationInstance;
|
|
33
34
|
state: UseChartKeyboardNavigationState;
|
|
34
|
-
optionalDependencies: [UseChartInteractionSignature];
|
|
35
|
+
optionalDependencies: [UseChartInteractionSignature, UseChartHighlightSignature];
|
|
35
36
|
}>;
|
|
36
37
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { scaleBand, scalePoint } from '@mui/x-charts-vendor/d3-scale';
|
|
3
|
-
import { isBandScaleConfig, isPointScaleConfig } from "../../../../models/axis.js";
|
|
3
|
+
import { isBandScaleConfig, isPointScaleConfig, isContinuousScaleConfig } from "../../../../models/axis.js";
|
|
4
4
|
import { getColorScale, getOrdinalColorScale } from "../../../colorScale.js";
|
|
5
5
|
import { getDefaultTickNumber, getTickNumber, scaleTickNumberByRange } from "../../../ticks.js";
|
|
6
6
|
import { getScale } from "../../../getScale.js";
|
|
@@ -84,7 +84,7 @@ export function computeAxisValue({
|
|
|
84
84
|
completeAxis[axis.id].valueFormatter = axis.valueFormatter ?? dateFormatter;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
if (axis
|
|
87
|
+
if (!isContinuousScaleConfig(axis)) {
|
|
88
88
|
// Could be merged with the two previous "if conditions" but then TS does not get that `axis.scaleType` can't be `band` or `point`.
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import type { ScaleBand } from '@mui/x-charts-vendor/d3-scale';
|
|
2
2
|
import { D3OrdinalScale, D3Scale } from "../models/axis.js";
|
|
3
|
-
export declare function isOrdinalScale<
|
|
3
|
+
export declare function isOrdinalScale<Domain extends {
|
|
4
4
|
toString(): string;
|
|
5
|
-
}
|
|
6
|
-
export declare function isBandScale<T extends {
|
|
5
|
+
} = {
|
|
7
6
|
toString(): string;
|
|
8
|
-
}>(scale: D3Scale<
|
|
9
|
-
export declare function
|
|
7
|
+
}, Range = number, Output = number>(scale: D3Scale<Domain, Range, Output>): scale is D3OrdinalScale<Domain>;
|
|
8
|
+
export declare function isBandScale<Domain extends {
|
|
10
9
|
toString(): string;
|
|
11
|
-
}
|
|
10
|
+
} = {
|
|
11
|
+
toString(): string;
|
|
12
|
+
}, Range = number, Output = number>(scale: D3Scale<Domain, Range, Output>): scale is ScaleBand<Domain>;
|
|
13
|
+
export declare function isPointScale<Domain extends {
|
|
14
|
+
toString(): string;
|
|
15
|
+
} = {
|
|
16
|
+
toString(): string;
|
|
17
|
+
}, Range = number, Output = number>(scale: D3Scale<Domain, Range, Output>): scale is D3OrdinalScale<Domain>;
|
|
@@ -75,6 +75,11 @@ export function scaleSymlog(_domain, _range) {
|
|
|
75
75
|
return tickFormat(tick);
|
|
76
76
|
};
|
|
77
77
|
};
|
|
78
|
+
|
|
79
|
+
/* Adaptation of https://github.com/d3/d3-scale/blob/d6904a4bde09e16005e0ad8ca3e25b10ce54fa0d/src/symlog.js#L30 */
|
|
80
|
+
scale.copy = () => {
|
|
81
|
+
return scaleSymlog(scale.domain(), scale.range()).constant(scale.constant());
|
|
82
|
+
};
|
|
78
83
|
return scale;
|
|
79
84
|
}
|
|
80
85
|
function generateScales(scale) {
|
package/esm/locales/enUS.js
CHANGED
|
@@ -4,17 +4,17 @@ import { getChartsLocalization } from "./utils/getChartsLocalization.js";
|
|
|
4
4
|
// This object is not Partial<ChartsLocaleText> because it is the default values
|
|
5
5
|
|
|
6
6
|
export const enUSLocaleText = {
|
|
7
|
-
|
|
7
|
+
// Overlay
|
|
8
8
|
loading: 'Loading data…',
|
|
9
9
|
noData: 'No data to display',
|
|
10
|
-
|
|
10
|
+
// Toolbar
|
|
11
11
|
zoomIn: 'Zoom in',
|
|
12
12
|
zoomOut: 'Zoom out',
|
|
13
13
|
toolbarExport: 'Export',
|
|
14
|
-
|
|
14
|
+
// Toolbar Export Menu
|
|
15
15
|
toolbarExportPrint: 'Print',
|
|
16
16
|
toolbarExportImage: mimeType => `Export as ${imageMimeTypes[mimeType] ?? mimeType}`,
|
|
17
|
-
|
|
17
|
+
// Charts renderer configuration
|
|
18
18
|
chartTypeBar: 'Bar',
|
|
19
19
|
chartTypeColumn: 'Column',
|
|
20
20
|
chartTypeLine: 'Line',
|