@mui/x-charts 7.12.1 → 7.13.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 +2 -0
- package/BarChart/extremums.js +5 -3
- package/CHANGELOG.md +81 -0
- package/ChartContainer/ChartContainer.d.ts +3 -3
- package/ChartContainer/ChartContainer.js +4 -2
- package/ChartContainer/useChartContainerProps.d.ts +4 -2
- package/ChartContainer/useChartContainerProps.js +2 -2
- package/ChartContainer/useDefaultizeAxis.d.ts +1 -0
- package/ChartsTooltip/utils.js +4 -2
- package/ChartsXAxis/ChartsXAxis.js +11 -5
- package/ChartsYAxis/ChartsYAxis.js +11 -5
- package/LineChart/AreaPlot.js +11 -1
- package/LineChart/LineChart.js +2 -0
- package/LineChart/extremums.js +4 -15
- package/PieChart/PieChart.js +2 -0
- package/ResponsiveChartContainer/ResponsiveChartContainer.js +2 -0
- package/ResponsiveChartContainer/useResponsiveChartContainerProps.d.ts +1 -1
- package/ScatterChart/ScatterChart.js +2 -0
- package/ScatterChart/extremums.js +6 -14
- package/SparkLineChart/SparkLineChart.js +2 -0
- package/context/CartesianProvider/CartesianProvider.d.ts +3 -3
- package/context/CartesianProvider/CartesianProvider.js +2 -2
- package/context/CartesianProvider/defaultizeAxis.d.ts +1 -0
- package/context/CartesianProvider/getAxisExtremum.js +3 -10
- package/context/PluginProvider/ExtremumGetter.types.d.ts +1 -1
- package/esm/BarChart/BarChart.js +2 -0
- package/esm/BarChart/extremums.js +5 -3
- package/esm/ChartContainer/ChartContainer.js +5 -3
- package/esm/ChartContainer/useChartContainerProps.js +2 -2
- package/esm/ChartsTooltip/utils.js +4 -2
- package/esm/ChartsXAxis/ChartsXAxis.js +11 -5
- package/esm/ChartsYAxis/ChartsYAxis.js +11 -5
- package/esm/LineChart/AreaPlot.js +11 -1
- package/esm/LineChart/LineChart.js +2 -0
- package/esm/LineChart/extremums.js +4 -15
- package/esm/PieChart/PieChart.js +2 -0
- package/esm/ResponsiveChartContainer/ResponsiveChartContainer.js +2 -0
- package/esm/ScatterChart/ScatterChart.js +2 -0
- package/esm/ScatterChart/extremums.js +6 -14
- package/esm/SparkLineChart/SparkLineChart.js +2 -0
- package/esm/context/CartesianProvider/CartesianProvider.js +2 -2
- package/esm/context/CartesianProvider/getAxisExtremum.js +3 -10
- package/esm/hooks/useTicks.js +5 -2
- package/esm/internals/isInfinity.js +3 -0
- package/hooks/useTicks.js +5 -2
- package/index.js +1 -1
- package/internals/defaultizeColor.d.ts +1 -0
- package/internals/isInfinity.d.ts +1 -0
- package/internals/isInfinity.js +9 -0
- package/models/axis.d.ts +2 -0
- package/models/seriesType/line.d.ts +10 -0
- package/modern/BarChart/BarChart.js +2 -0
- package/modern/BarChart/extremums.js +5 -3
- package/modern/ChartContainer/ChartContainer.js +5 -3
- package/modern/ChartContainer/useChartContainerProps.js +2 -2
- package/modern/ChartsTooltip/utils.js +4 -2
- package/modern/ChartsXAxis/ChartsXAxis.js +11 -5
- package/modern/ChartsYAxis/ChartsYAxis.js +11 -5
- package/modern/LineChart/AreaPlot.js +11 -1
- package/modern/LineChart/LineChart.js +2 -0
- package/modern/LineChart/extremums.js +4 -15
- package/modern/PieChart/PieChart.js +2 -0
- package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +2 -0
- package/modern/ScatterChart/ScatterChart.js +2 -0
- package/modern/ScatterChart/extremums.js +6 -14
- package/modern/SparkLineChart/SparkLineChart.js +2 -0
- package/modern/context/CartesianProvider/CartesianProvider.js +2 -2
- package/modern/context/CartesianProvider/getAxisExtremum.js +3 -10
- package/modern/hooks/useTicks.js +5 -2
- package/modern/index.js +1 -1
- package/modern/internals/isInfinity.js +3 -0
- package/package.json +2 -2
|
@@ -9,6 +9,6 @@ type ExtremumGetterParams<T extends ChartSeriesType> = {
|
|
|
9
9
|
axis: AxisConfig;
|
|
10
10
|
isDefaultAxis: boolean;
|
|
11
11
|
};
|
|
12
|
-
export type ExtremumGetterResult = [number, number]
|
|
12
|
+
export type ExtremumGetterResult = [number, number];
|
|
13
13
|
export type ExtremumGetter<T extends ChartSeriesType> = (params: ExtremumGetterParams<T>) => ExtremumGetterResult;
|
|
14
14
|
export {};
|
package/esm/BarChart/BarChart.js
CHANGED
|
@@ -273,6 +273,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
273
273
|
slotProps: PropTypes.object,
|
|
274
274
|
slots: PropTypes.object,
|
|
275
275
|
stroke: PropTypes.string,
|
|
276
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
276
277
|
tickFontSize: PropTypes.number,
|
|
277
278
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
278
279
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -325,6 +326,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
325
326
|
slotProps: PropTypes.object,
|
|
326
327
|
slots: PropTypes.object,
|
|
327
328
|
stroke: PropTypes.string,
|
|
329
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
328
330
|
tickFontSize: PropTypes.number,
|
|
329
331
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
330
332
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -16,9 +16,11 @@ const getValueExtremum = params => {
|
|
|
16
16
|
const yAxisId = series[seriesId].yAxisId ?? series[seriesId].yAxisKey;
|
|
17
17
|
return yAxisId === axis.id || isDefaultAxis && yAxisId === undefined;
|
|
18
18
|
}).reduce((acc, seriesId) => {
|
|
19
|
-
const [seriesMin, seriesMax] = series[seriesId].stackedData?.reduce((seriesAcc, values) =>
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const [seriesMin, seriesMax] = series[seriesId].stackedData?.reduce((seriesAcc, values) => {
|
|
20
|
+
return [Math.min(...values, seriesAcc[0]), Math.max(...values, seriesAcc[1])];
|
|
21
|
+
}, [Infinity, -Infinity]) ?? [Infinity, -Infinity];
|
|
22
|
+
return [Math.min(seriesMin, acc[0]), Math.max(seriesMax, acc[1])];
|
|
23
|
+
}, [Infinity, -Infinity]);
|
|
22
24
|
};
|
|
23
25
|
export const getExtremumX = params => {
|
|
24
26
|
// Notice that bar should be all horizontal or all vertical.
|
|
@@ -5,7 +5,7 @@ import { DrawingProvider } from '../context/DrawingProvider';
|
|
|
5
5
|
import { SeriesProvider } from '../context/SeriesProvider';
|
|
6
6
|
import { InteractionProvider } from '../context/InteractionProvider';
|
|
7
7
|
import { ChartsSurface } from '../ChartsSurface';
|
|
8
|
-
import {
|
|
8
|
+
import { CartesianProvider } from '../context/CartesianProvider';
|
|
9
9
|
import { ChartsAxesGradients } from '../internals/components/ChartsAxesGradients';
|
|
10
10
|
import { HighlightedProvider, ZAxisContextProvider } from '../context';
|
|
11
11
|
import { PluginProvider } from '../context/PluginProvider';
|
|
@@ -16,7 +16,7 @@ const ChartContainer = /*#__PURE__*/React.forwardRef(function ChartContainer(pro
|
|
|
16
16
|
children,
|
|
17
17
|
drawingProviderProps,
|
|
18
18
|
seriesProviderProps,
|
|
19
|
-
|
|
19
|
+
cartesianProviderProps,
|
|
20
20
|
zAxisContextProps,
|
|
21
21
|
highlightedProviderProps,
|
|
22
22
|
chartsSurfaceProps,
|
|
@@ -25,7 +25,7 @@ const ChartContainer = /*#__PURE__*/React.forwardRef(function ChartContainer(pro
|
|
|
25
25
|
return /*#__PURE__*/_jsx(DrawingProvider, _extends({}, drawingProviderProps, {
|
|
26
26
|
children: /*#__PURE__*/_jsx(PluginProvider, _extends({}, pluginProviderProps, {
|
|
27
27
|
children: /*#__PURE__*/_jsx(SeriesProvider, _extends({}, seriesProviderProps, {
|
|
28
|
-
children: /*#__PURE__*/_jsx(
|
|
28
|
+
children: /*#__PURE__*/_jsx(CartesianProvider, _extends({}, cartesianProviderProps, {
|
|
29
29
|
children: /*#__PURE__*/_jsx(ZAxisContextProvider, _extends({}, zAxisContextProps, {
|
|
30
30
|
children: /*#__PURE__*/_jsx(InteractionProvider, {
|
|
31
31
|
children: /*#__PURE__*/_jsx(HighlightedProvider, _extends({}, highlightedProviderProps, {
|
|
@@ -155,6 +155,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
155
155
|
slotProps: PropTypes.object,
|
|
156
156
|
slots: PropTypes.object,
|
|
157
157
|
stroke: PropTypes.string,
|
|
158
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
158
159
|
tickFontSize: PropTypes.number,
|
|
159
160
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
160
161
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -207,6 +208,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
207
208
|
slotProps: PropTypes.object,
|
|
208
209
|
slots: PropTypes.object,
|
|
209
210
|
stroke: PropTypes.string,
|
|
211
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
210
212
|
tickFontSize: PropTypes.number,
|
|
211
213
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
212
214
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -45,7 +45,7 @@ export const useChartContainerProps = (props, ref) => {
|
|
|
45
45
|
colors,
|
|
46
46
|
dataset
|
|
47
47
|
};
|
|
48
|
-
const
|
|
48
|
+
const cartesianProviderProps = {
|
|
49
49
|
xAxis: defaultizedXAxis,
|
|
50
50
|
yAxis: defaultizedYAxis,
|
|
51
51
|
dataset
|
|
@@ -71,7 +71,7 @@ export const useChartContainerProps = (props, ref) => {
|
|
|
71
71
|
children,
|
|
72
72
|
drawingProviderProps,
|
|
73
73
|
seriesProviderProps,
|
|
74
|
-
|
|
74
|
+
cartesianProviderProps,
|
|
75
75
|
zAxisContextProps,
|
|
76
76
|
highlightedProviderProps,
|
|
77
77
|
chartsSurfaceProps,
|
|
@@ -47,8 +47,10 @@ export function useMouseTracker() {
|
|
|
47
47
|
if (element === null) {
|
|
48
48
|
return () => {};
|
|
49
49
|
}
|
|
50
|
-
const handleOut =
|
|
51
|
-
|
|
50
|
+
const handleOut = event => {
|
|
51
|
+
if (event.pointerType !== 'mouse') {
|
|
52
|
+
setMousePosition(null);
|
|
53
|
+
}
|
|
52
54
|
};
|
|
53
55
|
const handleMove = event => {
|
|
54
56
|
setMousePosition({
|
|
@@ -15,6 +15,8 @@ import { getMinXTranslation } from '../internals/geometry';
|
|
|
15
15
|
import { useMounted } from '../hooks/useMounted';
|
|
16
16
|
import { useDrawingArea } from '../hooks/useDrawingArea';
|
|
17
17
|
import { getWordsByLines } from '../internals/getWordsByLines';
|
|
18
|
+
import { isInfinity } from '../internals/isInfinity';
|
|
19
|
+
import { isBandScale } from '../internals/isBandScale';
|
|
18
20
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
21
|
const useUtilityClasses = ownerState => {
|
|
20
22
|
const {
|
|
@@ -137,7 +139,8 @@ function ChartsXAxis(inProps) {
|
|
|
137
139
|
tickInterval,
|
|
138
140
|
tickLabelInterval,
|
|
139
141
|
tickPlacement,
|
|
140
|
-
tickLabelPlacement
|
|
142
|
+
tickLabelPlacement,
|
|
143
|
+
sx
|
|
141
144
|
} = defaultizedProps;
|
|
142
145
|
const theme = useTheme();
|
|
143
146
|
const classes = useUtilityClasses(_extends({}, defaultizedProps, {
|
|
@@ -199,15 +202,17 @@ function ChartsXAxis(inProps) {
|
|
|
199
202
|
ownerState: {}
|
|
200
203
|
});
|
|
201
204
|
const domain = xScale.domain();
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
205
|
+
const ordinalAxis = isBandScale(xScale);
|
|
206
|
+
// Skip axis rendering if no data is available
|
|
207
|
+
// - The domain is an empty array for band/point scales.
|
|
208
|
+
// - The domains contains Infinity for continuous scales.
|
|
209
|
+
if (ordinalAxis && domain.length === 0 || !ordinalAxis && domain.some(isInfinity)) {
|
|
206
210
|
return null;
|
|
207
211
|
}
|
|
208
212
|
return /*#__PURE__*/_jsxs(AxisRoot, {
|
|
209
213
|
transform: `translate(0, ${position === 'bottom' ? top + height : top})`,
|
|
210
214
|
className: classes.root,
|
|
215
|
+
sx: sx,
|
|
211
216
|
children: [!disableLine && /*#__PURE__*/_jsx(Line, _extends({
|
|
212
217
|
x1: left,
|
|
213
218
|
x2: left + width,
|
|
@@ -305,6 +310,7 @@ process.env.NODE_ENV !== "production" ? ChartsXAxis.propTypes = {
|
|
|
305
310
|
* @default 'currentColor'
|
|
306
311
|
*/
|
|
307
312
|
stroke: PropTypes.string,
|
|
313
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
308
314
|
/**
|
|
309
315
|
* The font size of the axis ticks text.
|
|
310
316
|
* @default 12
|
|
@@ -12,6 +12,8 @@ import { useDrawingArea } from '../hooks/useDrawingArea';
|
|
|
12
12
|
import { AxisRoot } from '../internals/components/AxisSharedComponents';
|
|
13
13
|
import { ChartsText } from '../ChartsText';
|
|
14
14
|
import { getAxisUtilityClass } from '../ChartsAxis/axisClasses';
|
|
15
|
+
import { isInfinity } from '../internals/isInfinity';
|
|
16
|
+
import { isBandScale } from '../internals/isBandScale';
|
|
15
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
18
|
const useUtilityClasses = ownerState => {
|
|
17
19
|
const {
|
|
@@ -78,7 +80,8 @@ function ChartsYAxis(inProps) {
|
|
|
78
80
|
tickPlacement,
|
|
79
81
|
tickLabelPlacement,
|
|
80
82
|
tickInterval,
|
|
81
|
-
tickLabelInterval
|
|
83
|
+
tickLabelInterval,
|
|
84
|
+
sx
|
|
82
85
|
} = defaultizedProps;
|
|
83
86
|
const theme = useTheme();
|
|
84
87
|
const isRTL = theme.direction === 'rtl';
|
|
@@ -145,15 +148,17 @@ function ChartsYAxis(inProps) {
|
|
|
145
148
|
ownerState: {}
|
|
146
149
|
});
|
|
147
150
|
const domain = yScale.domain();
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
151
|
+
const ordinalAxis = isBandScale(yScale);
|
|
152
|
+
// Skip axis rendering if no data is available
|
|
153
|
+
// - The domain is an empty array for band/point scales.
|
|
154
|
+
// - The domains contains Infinity for continuous scales.
|
|
155
|
+
if (ordinalAxis && domain.length === 0 || !ordinalAxis && domain.some(isInfinity)) {
|
|
152
156
|
return null;
|
|
153
157
|
}
|
|
154
158
|
return /*#__PURE__*/_jsxs(AxisRoot, {
|
|
155
159
|
transform: `translate(${position === 'right' ? left + width : left}, 0)`,
|
|
156
160
|
className: classes.root,
|
|
161
|
+
sx: sx,
|
|
157
162
|
children: [!disableLine && /*#__PURE__*/_jsx(Line, _extends({
|
|
158
163
|
y1: top,
|
|
159
164
|
y2: top + height,
|
|
@@ -253,6 +258,7 @@ process.env.NODE_ENV !== "production" ? ChartsYAxis.propTypes = {
|
|
|
253
258
|
* @default 'currentColor'
|
|
254
259
|
*/
|
|
255
260
|
stroke: PropTypes.string,
|
|
261
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
256
262
|
/**
|
|
257
263
|
* The font size of the axis ticks text.
|
|
258
264
|
* @default 12
|
|
@@ -42,7 +42,8 @@ const useAggregatedData = () => {
|
|
|
42
42
|
yAxisKey = defaultYAxisId,
|
|
43
43
|
stackedData,
|
|
44
44
|
data,
|
|
45
|
-
connectNulls
|
|
45
|
+
connectNulls,
|
|
46
|
+
baseline
|
|
46
47
|
} = series[seriesId];
|
|
47
48
|
const xAxisId = xAxisIdProp ?? xAxisKey;
|
|
48
49
|
const yAxisId = yAxisIdProp ?? yAxisKey;
|
|
@@ -59,6 +60,15 @@ const useAggregatedData = () => {
|
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
const areaPath = d3Area().x(d => xScale(d.x)).defined((_, i) => connectNulls || data[i] != null).y0(d => {
|
|
63
|
+
if (typeof baseline === 'number') {
|
|
64
|
+
return yScale(baseline);
|
|
65
|
+
}
|
|
66
|
+
if (baseline === 'max') {
|
|
67
|
+
return yScale.range()[1];
|
|
68
|
+
}
|
|
69
|
+
if (baseline === 'min') {
|
|
70
|
+
return yScale.range()[0];
|
|
71
|
+
}
|
|
62
72
|
const value = d.y && yScale(d.y[0]);
|
|
63
73
|
if (Number.isNaN(value)) {
|
|
64
74
|
return yScale.range()[0];
|
|
@@ -274,6 +274,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
274
274
|
slotProps: PropTypes.object,
|
|
275
275
|
slots: PropTypes.object,
|
|
276
276
|
stroke: PropTypes.string,
|
|
277
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
277
278
|
tickFontSize: PropTypes.number,
|
|
278
279
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
279
280
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -326,6 +327,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
326
327
|
slotProps: PropTypes.object,
|
|
327
328
|
slots: PropTypes.object,
|
|
328
329
|
stroke: PropTypes.string,
|
|
330
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
329
331
|
tickFontSize: PropTypes.number,
|
|
330
332
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
331
333
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -7,16 +7,10 @@ export const getExtremumX = params => {
|
|
|
7
7
|
return [minX, maxX];
|
|
8
8
|
};
|
|
9
9
|
function getSeriesExtremums(getValues, stackedData) {
|
|
10
|
-
if (stackedData.length === 0) {
|
|
11
|
-
return [null, null];
|
|
12
|
-
}
|
|
13
10
|
return stackedData.reduce((seriesAcc, stackedValue) => {
|
|
14
11
|
const [base, value] = getValues(stackedValue);
|
|
15
|
-
if (seriesAcc[0] === null) {
|
|
16
|
-
return [Math.min(base, value), Math.max(base, value)];
|
|
17
|
-
}
|
|
18
12
|
return [Math.min(base, value, seriesAcc[0]), Math.max(base, value, seriesAcc[1])];
|
|
19
|
-
},
|
|
13
|
+
}, [Infinity, -Infinity]);
|
|
20
14
|
}
|
|
21
15
|
export const getExtremumY = params => {
|
|
22
16
|
const {
|
|
@@ -33,16 +27,11 @@ export const getExtremumY = params => {
|
|
|
33
27
|
stackedData
|
|
34
28
|
} = series[seriesId];
|
|
35
29
|
const isArea = area !== undefined;
|
|
36
|
-
const getValues = isArea && axis.scaleType !== 'log' ? d => d : d => [d[1], d[1]]; // Since this series is not used to display an area, we do not consider the base (the d[0]).
|
|
37
30
|
|
|
31
|
+
// Since this series is not used to display an area, we do not consider the base (the d[0]).
|
|
32
|
+
const getValues = isArea && axis.scaleType !== 'log' && typeof series[seriesId].baseline !== 'string' ? d => d : d => [d[1], d[1]];
|
|
38
33
|
const seriesExtremums = getSeriesExtremums(getValues, stackedData);
|
|
39
|
-
if (acc[0] === null) {
|
|
40
|
-
return seriesExtremums;
|
|
41
|
-
}
|
|
42
|
-
if (seriesExtremums[0] === null) {
|
|
43
|
-
return acc;
|
|
44
|
-
}
|
|
45
34
|
const [seriesMin, seriesMax] = seriesExtremums;
|
|
46
35
|
return [Math.min(seriesMin, acc[0]), Math.max(seriesMax, acc[1])];
|
|
47
|
-
}, [
|
|
36
|
+
}, [Infinity, -Infinity]);
|
|
48
37
|
};
|
package/esm/PieChart/PieChart.js
CHANGED
|
@@ -318,6 +318,7 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
318
318
|
slotProps: PropTypes.object,
|
|
319
319
|
slots: PropTypes.object,
|
|
320
320
|
stroke: PropTypes.string,
|
|
321
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
321
322
|
tickFontSize: PropTypes.number,
|
|
322
323
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
323
324
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -370,6 +371,7 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
370
371
|
slotProps: PropTypes.object,
|
|
371
372
|
slots: PropTypes.object,
|
|
372
373
|
stroke: PropTypes.string,
|
|
374
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
373
375
|
tickFontSize: PropTypes.number,
|
|
374
376
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
375
377
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -130,6 +130,7 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainer.propTypes = {
|
|
|
130
130
|
slotProps: PropTypes.object,
|
|
131
131
|
slots: PropTypes.object,
|
|
132
132
|
stroke: PropTypes.string,
|
|
133
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
133
134
|
tickFontSize: PropTypes.number,
|
|
134
135
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
135
136
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -182,6 +183,7 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainer.propTypes = {
|
|
|
182
183
|
slotProps: PropTypes.object,
|
|
183
184
|
slots: PropTypes.object,
|
|
184
185
|
stroke: PropTypes.string,
|
|
186
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
185
187
|
tickFontSize: PropTypes.number,
|
|
186
188
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
187
189
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -255,6 +255,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
255
255
|
slotProps: PropTypes.object,
|
|
256
256
|
slots: PropTypes.object,
|
|
257
257
|
stroke: PropTypes.string,
|
|
258
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
258
259
|
tickFontSize: PropTypes.number,
|
|
259
260
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
260
261
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -307,6 +308,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
307
308
|
slotProps: PropTypes.object,
|
|
308
309
|
slots: PropTypes.object,
|
|
309
310
|
stroke: PropTypes.string,
|
|
311
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
310
312
|
tickFontSize: PropTypes.number,
|
|
311
313
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
312
314
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
const mergeMinMax = (acc, val) => {
|
|
2
|
-
if (acc[0] === null || acc[1] === null) {
|
|
3
|
-
return val;
|
|
4
|
-
}
|
|
5
|
-
if (val[0] === null || val[1] === null) {
|
|
6
|
-
return acc;
|
|
7
|
-
}
|
|
8
2
|
return [Math.min(acc[0], val[0]), Math.max(acc[1], val[1])];
|
|
9
3
|
};
|
|
10
4
|
export const getExtremumX = params => {
|
|
@@ -20,11 +14,10 @@ export const getExtremumX = params => {
|
|
|
20
14
|
const seriesMinMax = series[seriesId].data.reduce((accSeries, {
|
|
21
15
|
x
|
|
22
16
|
}) => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}, [null, null]);
|
|
17
|
+
return mergeMinMax(accSeries, [x, x]);
|
|
18
|
+
}, [Infinity, -Infinity]);
|
|
26
19
|
return mergeMinMax(acc, seriesMinMax);
|
|
27
|
-
}, [
|
|
20
|
+
}, [Infinity, -Infinity]);
|
|
28
21
|
};
|
|
29
22
|
export const getExtremumY = params => {
|
|
30
23
|
const {
|
|
@@ -39,9 +32,8 @@ export const getExtremumY = params => {
|
|
|
39
32
|
const seriesMinMax = series[seriesId].data.reduce((accSeries, {
|
|
40
33
|
y
|
|
41
34
|
}) => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}, [null, null]);
|
|
35
|
+
return mergeMinMax(accSeries, [y, y]);
|
|
36
|
+
}, [Infinity, -Infinity]);
|
|
45
37
|
return mergeMinMax(acc, seriesMinMax);
|
|
46
|
-
}, [
|
|
38
|
+
}, [Infinity, -Infinity]);
|
|
47
39
|
};
|
|
@@ -279,6 +279,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
279
279
|
slotProps: PropTypes.object,
|
|
280
280
|
slots: PropTypes.object,
|
|
281
281
|
stroke: PropTypes.string,
|
|
282
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
282
283
|
tickFontSize: PropTypes.number,
|
|
283
284
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
284
285
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -330,6 +331,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
330
331
|
slotProps: PropTypes.object,
|
|
331
332
|
slots: PropTypes.object,
|
|
332
333
|
stroke: PropTypes.string,
|
|
334
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
333
335
|
tickFontSize: PropTypes.number,
|
|
334
336
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
335
337
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -6,7 +6,7 @@ import { computeValue } from './computeValue';
|
|
|
6
6
|
import { useXExtremumGetter } from '../PluginProvider/useXExtremumGetter';
|
|
7
7
|
import { useYExtremumGetter } from '../PluginProvider';
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
function
|
|
9
|
+
function CartesianProvider(props) {
|
|
10
10
|
const {
|
|
11
11
|
xAxis,
|
|
12
12
|
yAxis,
|
|
@@ -47,4 +47,4 @@ function CartesianContextProvider(props) {
|
|
|
47
47
|
children: children
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
export {
|
|
50
|
+
export { CartesianProvider };
|
|
@@ -5,17 +5,10 @@ const axisExtremumCallback = (acc, chartType, axis, getters, isDefaultAxis, form
|
|
|
5
5
|
series,
|
|
6
6
|
axis,
|
|
7
7
|
isDefaultAxis
|
|
8
|
-
}) ?? [
|
|
9
|
-
|
|
10
|
-
if (minData === null || maxData === null) {
|
|
11
|
-
return [minChartTypeData, maxChartTypeData];
|
|
12
|
-
}
|
|
13
|
-
if (minChartTypeData === null || maxChartTypeData === null) {
|
|
14
|
-
return [minData, maxData];
|
|
15
|
-
}
|
|
16
|
-
return [Math.min(minChartTypeData, minData), Math.max(maxChartTypeData, maxData)];
|
|
8
|
+
}) ?? [Infinity, -Infinity];
|
|
9
|
+
return [Math.min(minChartTypeData, acc[0]), Math.max(maxChartTypeData, acc[1])];
|
|
17
10
|
};
|
|
18
11
|
export const getAxisExtremum = (axis, getters, isDefaultAxis, formattedSeries) => {
|
|
19
12
|
const charTypes = Object.keys(getters);
|
|
20
|
-
return charTypes.reduce((acc, charType) => axisExtremumCallback(acc, charType, axis, getters, isDefaultAxis, formattedSeries), [
|
|
13
|
+
return charTypes.reduce((acc, charType) => axisExtremumCallback(acc, charType, axis, getters, isDefaultAxis, formattedSeries), [Infinity, -Infinity]);
|
|
21
14
|
};
|
package/esm/hooks/useTicks.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { isBandScale } from '../internals/isBandScale';
|
|
3
|
+
import { isInfinity } from '../internals/isInfinity';
|
|
3
4
|
export function getTickNumber(params) {
|
|
4
5
|
const {
|
|
5
6
|
tickMaxStep,
|
|
@@ -60,8 +61,10 @@ export function useTicks(options) {
|
|
|
60
61
|
labelOffset: 0
|
|
61
62
|
}));
|
|
62
63
|
}
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
const domain = scale.domain();
|
|
65
|
+
// Skip axis rendering if no data is available
|
|
66
|
+
// - The domains contains Infinity for continuous scales.
|
|
67
|
+
if (domain.some(isInfinity)) {
|
|
65
68
|
return [];
|
|
66
69
|
}
|
|
67
70
|
const ticks = typeof tickInterval === 'object' ? tickInterval : scale.ticks(tickNumber);
|
package/hooks/useTicks.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.getTickNumber = getTickNumber;
|
|
|
7
7
|
exports.useTicks = useTicks;
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _isBandScale = require("../internals/isBandScale");
|
|
10
|
+
var _isInfinity = require("../internals/isInfinity");
|
|
10
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
12
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
13
|
function getTickNumber(params) {
|
|
@@ -69,8 +70,10 @@ function useTicks(options) {
|
|
|
69
70
|
labelOffset: 0
|
|
70
71
|
}));
|
|
71
72
|
}
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
const domain = scale.domain();
|
|
74
|
+
// Skip axis rendering if no data is available
|
|
75
|
+
// - The domains contains Infinity for continuous scales.
|
|
76
|
+
if (domain.some(_isInfinity.isInfinity)) {
|
|
74
77
|
return [];
|
|
75
78
|
}
|
|
76
79
|
const ticks = typeof tickInterval === 'object' ? tickInterval : scale.ticks(tickNumber);
|
package/index.js
CHANGED
|
@@ -72,6 +72,7 @@ export declare function defaultizeColor(series: AllSeriesType, seriesIndex: numb
|
|
|
72
72
|
disableHighlight?: boolean;
|
|
73
73
|
connectNulls?: boolean;
|
|
74
74
|
stackOffset?: import("..").StackOffsetType;
|
|
75
|
+
baseline?: number | "min" | "max";
|
|
75
76
|
id?: import(".").SeriesId;
|
|
76
77
|
color: string;
|
|
77
78
|
valueFormatter?: import(".").SeriesValueFormatter<number | null> | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isInfinity(v: any): v is number;
|
package/models/axis.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ScaleBand, ScaleLogarithmic, ScalePower, ScaleTime, ScaleLinear, ScalePoint, ScaleOrdinal, ScaleSequential, ScaleThreshold } from '@mui/x-charts-vendor/d3-scale';
|
|
2
|
+
import { SxProps } from '@mui/system';
|
|
2
3
|
import { ChartsAxisClasses } from '../ChartsAxis/axisClasses';
|
|
3
4
|
import type { TickParams } from '../hooks/useTicks';
|
|
4
5
|
import { ChartsTextProps } from '../ChartsText';
|
|
@@ -112,6 +113,7 @@ export interface ChartsAxisProps extends TickParams {
|
|
|
112
113
|
* @default {}
|
|
113
114
|
*/
|
|
114
115
|
slotProps?: Partial<ChartsAxisSlotProps>;
|
|
116
|
+
sx?: SxProps;
|
|
115
117
|
}
|
|
116
118
|
export interface ChartsYAxisProps extends ChartsAxisProps {
|
|
117
119
|
/**
|
|
@@ -62,6 +62,16 @@ export interface LineSeriesType extends CommonSeriesType<number | null>, Cartesi
|
|
|
62
62
|
* @default 'none'
|
|
63
63
|
*/
|
|
64
64
|
stackOffset?: StackOffsetType;
|
|
65
|
+
/**
|
|
66
|
+
* The value of the line at the base of the series area.
|
|
67
|
+
*
|
|
68
|
+
* - `'min'` the area will fill the space **under** the line.
|
|
69
|
+
* - `'max'` the area will fill the space **above** the line.
|
|
70
|
+
* - `number` the area will fill the space between this value and the line
|
|
71
|
+
*
|
|
72
|
+
* @default 0
|
|
73
|
+
*/
|
|
74
|
+
baseline?: number | 'min' | 'max';
|
|
65
75
|
}
|
|
66
76
|
/**
|
|
67
77
|
* An object that allows to identify a single line.
|
|
@@ -273,6 +273,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
273
273
|
slotProps: PropTypes.object,
|
|
274
274
|
slots: PropTypes.object,
|
|
275
275
|
stroke: PropTypes.string,
|
|
276
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
276
277
|
tickFontSize: PropTypes.number,
|
|
277
278
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
278
279
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -325,6 +326,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
325
326
|
slotProps: PropTypes.object,
|
|
326
327
|
slots: PropTypes.object,
|
|
327
328
|
stroke: PropTypes.string,
|
|
329
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
328
330
|
tickFontSize: PropTypes.number,
|
|
329
331
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
330
332
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -16,9 +16,11 @@ const getValueExtremum = params => {
|
|
|
16
16
|
const yAxisId = series[seriesId].yAxisId ?? series[seriesId].yAxisKey;
|
|
17
17
|
return yAxisId === axis.id || isDefaultAxis && yAxisId === undefined;
|
|
18
18
|
}).reduce((acc, seriesId) => {
|
|
19
|
-
const [seriesMin, seriesMax] = series[seriesId].stackedData?.reduce((seriesAcc, values) =>
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const [seriesMin, seriesMax] = series[seriesId].stackedData?.reduce((seriesAcc, values) => {
|
|
20
|
+
return [Math.min(...values, seriesAcc[0]), Math.max(...values, seriesAcc[1])];
|
|
21
|
+
}, [Infinity, -Infinity]) ?? [Infinity, -Infinity];
|
|
22
|
+
return [Math.min(seriesMin, acc[0]), Math.max(seriesMax, acc[1])];
|
|
23
|
+
}, [Infinity, -Infinity]);
|
|
22
24
|
};
|
|
23
25
|
export const getExtremumX = params => {
|
|
24
26
|
// Notice that bar should be all horizontal or all vertical.
|
|
@@ -5,7 +5,7 @@ import { DrawingProvider } from '../context/DrawingProvider';
|
|
|
5
5
|
import { SeriesProvider } from '../context/SeriesProvider';
|
|
6
6
|
import { InteractionProvider } from '../context/InteractionProvider';
|
|
7
7
|
import { ChartsSurface } from '../ChartsSurface';
|
|
8
|
-
import {
|
|
8
|
+
import { CartesianProvider } from '../context/CartesianProvider';
|
|
9
9
|
import { ChartsAxesGradients } from '../internals/components/ChartsAxesGradients';
|
|
10
10
|
import { HighlightedProvider, ZAxisContextProvider } from '../context';
|
|
11
11
|
import { PluginProvider } from '../context/PluginProvider';
|
|
@@ -16,7 +16,7 @@ const ChartContainer = /*#__PURE__*/React.forwardRef(function ChartContainer(pro
|
|
|
16
16
|
children,
|
|
17
17
|
drawingProviderProps,
|
|
18
18
|
seriesProviderProps,
|
|
19
|
-
|
|
19
|
+
cartesianProviderProps,
|
|
20
20
|
zAxisContextProps,
|
|
21
21
|
highlightedProviderProps,
|
|
22
22
|
chartsSurfaceProps,
|
|
@@ -25,7 +25,7 @@ const ChartContainer = /*#__PURE__*/React.forwardRef(function ChartContainer(pro
|
|
|
25
25
|
return /*#__PURE__*/_jsx(DrawingProvider, _extends({}, drawingProviderProps, {
|
|
26
26
|
children: /*#__PURE__*/_jsx(PluginProvider, _extends({}, pluginProviderProps, {
|
|
27
27
|
children: /*#__PURE__*/_jsx(SeriesProvider, _extends({}, seriesProviderProps, {
|
|
28
|
-
children: /*#__PURE__*/_jsx(
|
|
28
|
+
children: /*#__PURE__*/_jsx(CartesianProvider, _extends({}, cartesianProviderProps, {
|
|
29
29
|
children: /*#__PURE__*/_jsx(ZAxisContextProvider, _extends({}, zAxisContextProps, {
|
|
30
30
|
children: /*#__PURE__*/_jsx(InteractionProvider, {
|
|
31
31
|
children: /*#__PURE__*/_jsx(HighlightedProvider, _extends({}, highlightedProviderProps, {
|
|
@@ -155,6 +155,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
155
155
|
slotProps: PropTypes.object,
|
|
156
156
|
slots: PropTypes.object,
|
|
157
157
|
stroke: PropTypes.string,
|
|
158
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
158
159
|
tickFontSize: PropTypes.number,
|
|
159
160
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
160
161
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -207,6 +208,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
207
208
|
slotProps: PropTypes.object,
|
|
208
209
|
slots: PropTypes.object,
|
|
209
210
|
stroke: PropTypes.string,
|
|
211
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
210
212
|
tickFontSize: PropTypes.number,
|
|
211
213
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
212
214
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|