@mui/x-charts 8.9.0 → 8.10.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 +110 -1
- package/BarChart/BarClipPath.d.ts +17 -12
- package/BarChart/BarClipPath.js +70 -57
- package/BarChart/BarPlot.js +4 -0
- package/BarChart/seriesConfig/extremums.js +2 -3
- package/BarChart/useBarChartProps.d.ts +1 -1
- package/CHANGELOG.md +245 -6
- package/ChartContainer/ChartContainer.js +165 -0
- package/ChartsAxisHighlight/ChartsXAxisHighlight.js +1 -3
- package/ChartsAxisHighlight/ChartsYAxisHighlight.js +1 -3
- package/ChartsTooltip/ChartsTooltip.d.ts +2 -1
- package/ChartsTooltip/ChartsTooltip.js +3 -3
- package/ChartsTooltip/ChartsTooltipContainer.d.ts +5 -5
- package/ChartsTooltip/ChartsTooltipContainer.js +3 -3
- package/{internals/components/ChartsWrapper → ChartsWrapper}/ChartsWrapper.d.ts +13 -4
- package/{internals/components/ChartsWrapper → ChartsWrapper}/ChartsWrapper.js +33 -7
- package/ChartsXAxis/ChartsGroupedXAxis.d.ts +7 -0
- package/ChartsXAxis/ChartsGroupedXAxis.js +142 -0
- package/ChartsXAxis/ChartsSingleXAxis.d.ts +7 -0
- package/ChartsXAxis/ChartsSingleXAxis.js +144 -0
- package/ChartsXAxis/ChartsXAxis.d.ts +1 -1
- package/ChartsXAxis/ChartsXAxis.js +8 -210
- package/ChartsXAxis/getVisibleLabels.d.ts +2 -2
- package/ChartsXAxis/useAxisProps.d.ts +4526 -0
- package/ChartsXAxis/useAxisProps.js +105 -0
- package/ChartsXAxis/utilities.d.ts +11 -0
- package/ChartsXAxis/utilities.js +43 -0
- package/LineChart/LineChart.js +110 -1
- package/LineChart/seriesConfig/extremums.js +2 -3
- package/LineChart/useLineChartProps.d.ts +1 -1
- package/PieChart/PieChart.js +1 -1
- package/RadarChart/RadarChart.d.ts +1 -1
- package/RadarChart/RadarChart.js +1 -1
- package/RadarChart/index.d.ts +9 -2
- package/RadarChart/index.js +13 -14
- package/RadarChart/useRadarChartProps.d.ts +1 -1
- package/ScatterChart/ScatterChart.d.ts +8 -1
- package/ScatterChart/ScatterChart.js +110 -1
- package/ScatterChart/seriesConfig/extremums.js +50 -23
- package/ScatterChart/useScatterChartProps.d.ts +1 -1
- package/SparkLineChart/SparkLineChart.js +109 -0
- package/esm/BarChart/BarChart.js +110 -1
- package/esm/BarChart/BarClipPath.d.ts +17 -12
- package/esm/BarChart/BarClipPath.js +69 -55
- package/esm/BarChart/BarPlot.js +4 -0
- package/esm/BarChart/seriesConfig/extremums.js +2 -3
- package/esm/BarChart/useBarChartProps.d.ts +1 -1
- package/esm/ChartContainer/ChartContainer.js +165 -0
- package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.js +1 -3
- package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.js +1 -3
- package/esm/ChartsTooltip/ChartsTooltip.d.ts +2 -1
- package/esm/ChartsTooltip/ChartsTooltip.js +3 -3
- package/esm/ChartsTooltip/ChartsTooltipContainer.d.ts +5 -5
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +3 -3
- package/esm/{internals/components/ChartsWrapper → ChartsWrapper}/ChartsWrapper.d.ts +13 -4
- package/esm/{internals/components/ChartsWrapper → ChartsWrapper}/ChartsWrapper.js +31 -6
- package/esm/ChartsXAxis/ChartsGroupedXAxis.d.ts +7 -0
- package/esm/ChartsXAxis/ChartsGroupedXAxis.js +136 -0
- package/esm/ChartsXAxis/ChartsSingleXAxis.d.ts +7 -0
- package/esm/ChartsXAxis/ChartsSingleXAxis.js +140 -0
- package/esm/ChartsXAxis/ChartsXAxis.d.ts +1 -1
- package/esm/ChartsXAxis/ChartsXAxis.js +7 -207
- package/esm/ChartsXAxis/getVisibleLabels.d.ts +2 -2
- package/esm/ChartsXAxis/useAxisProps.d.ts +4526 -0
- package/esm/ChartsXAxis/useAxisProps.js +98 -0
- package/esm/ChartsXAxis/utilities.d.ts +11 -0
- package/esm/ChartsXAxis/utilities.js +35 -0
- package/esm/LineChart/LineChart.js +110 -1
- package/esm/LineChart/seriesConfig/extremums.js +2 -3
- package/esm/LineChart/useLineChartProps.d.ts +1 -1
- package/esm/PieChart/PieChart.js +1 -1
- package/esm/RadarChart/RadarChart.d.ts +1 -1
- package/esm/RadarChart/RadarChart.js +1 -1
- package/esm/RadarChart/index.d.ts +9 -2
- package/esm/RadarChart/index.js +12 -2
- package/esm/RadarChart/useRadarChartProps.d.ts +1 -1
- package/esm/ScatterChart/ScatterChart.d.ts +8 -1
- package/esm/ScatterChart/ScatterChart.js +110 -1
- package/esm/ScatterChart/seriesConfig/extremums.js +50 -23
- package/esm/ScatterChart/useScatterChartProps.d.ts +1 -1
- package/esm/SparkLineChart/SparkLineChart.js +109 -0
- package/esm/hooks/useTicksGrouped.d.ts +28 -0
- package/esm/hooks/useTicksGrouped.js +98 -0
- package/esm/index.d.ts +2 -1
- package/esm/index.js +6 -2
- package/esm/internals/findMinMax.d.ts +1 -0
- package/esm/internals/findMinMax.js +13 -0
- package/esm/internals/getScale.d.ts +1 -1
- package/esm/internals/getScale.js +3 -0
- package/esm/internals/index.d.ts +1 -1
- package/esm/internals/index.js +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +3 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +32 -23
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtremum.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.js +17 -12
- package/esm/internals/symlogScale.d.ts +2 -0
- package/esm/internals/symlogScale.js +94 -0
- package/esm/models/axis.d.ts +81 -4
- package/esm/models/axis.js +3 -0
- package/hooks/useTicksGrouped.d.ts +28 -0
- package/hooks/useTicksGrouped.js +104 -0
- package/index.d.ts +2 -1
- package/index.js +13 -1
- package/internals/findMinMax.d.ts +1 -0
- package/internals/findMinMax.js +19 -0
- package/internals/getScale.d.ts +1 -1
- package/internals/getScale.js +3 -0
- package/internals/index.d.ts +1 -1
- package/internals/index.js +12 -12
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +3 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +3 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +34 -23
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtremum.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.js +17 -12
- package/internals/symlogScale.d.ts +2 -0
- package/internals/symlogScale.js +100 -0
- package/models/axis.d.ts +81 -4
- package/models/axis.js +4 -0
- package/package.json +5 -7
- package/BarChart/getRadius.d.ts +0 -20
- package/BarChart/getRadius.js +0 -37
- package/esm/BarChart/getRadius.d.ts +0 -20
- package/esm/BarChart/getRadius.js +0 -30
- /package/{esm/internals/components/ChartsWrapper → ChartsWrapper}/index.d.ts +0 -0
- /package/{internals/components/ChartsWrapper → ChartsWrapper}/index.js +0 -0
- /package/{internals/components → esm}/ChartsWrapper/index.d.ts +0 -0
- /package/esm/{internals/components/ChartsWrapper → ChartsWrapper}/index.js +0 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
+
const _excluded = ["scale", "tickNumber", "reverse"];
|
|
6
|
+
import useSlotProps from '@mui/utils/useSlotProps';
|
|
7
|
+
import { useThemeProps, useTheme } from '@mui/material/styles';
|
|
8
|
+
import { useRtl } from '@mui/system/RtlProvider';
|
|
9
|
+
import { ChartsText } from "../ChartsText/index.js";
|
|
10
|
+
import { useXAxes } from "../hooks/useAxis.js";
|
|
11
|
+
import { getDefaultBaseline, getDefaultTextAnchor } from "../ChartsText/defaultTextPlacement.js";
|
|
12
|
+
import { invertTextAnchor } from "../internals/invertTextAnchor.js";
|
|
13
|
+
import { defaultProps, useUtilityClasses } from "./utilities.js";
|
|
14
|
+
import { isBandScale } from "../internals/isBandScale.js";
|
|
15
|
+
import { isInfinity } from "../internals/isInfinity.js";
|
|
16
|
+
export const useAxisProps = inProps => {
|
|
17
|
+
const {
|
|
18
|
+
xAxis,
|
|
19
|
+
xAxisIds
|
|
20
|
+
} = useXAxes();
|
|
21
|
+
const _xAxis = xAxis[inProps.axisId ?? xAxisIds[0]],
|
|
22
|
+
{
|
|
23
|
+
scale: xScale,
|
|
24
|
+
tickNumber,
|
|
25
|
+
reverse
|
|
26
|
+
} = _xAxis,
|
|
27
|
+
settings = _objectWithoutPropertiesLoose(_xAxis, _excluded);
|
|
28
|
+
|
|
29
|
+
// eslint-disable-next-line material-ui/mui-name-matches-component-name
|
|
30
|
+
const themedProps = useThemeProps({
|
|
31
|
+
props: _extends({}, settings, inProps),
|
|
32
|
+
name: 'MuiChartsXAxis'
|
|
33
|
+
});
|
|
34
|
+
const defaultizedProps = _extends({}, defaultProps, themedProps);
|
|
35
|
+
const {
|
|
36
|
+
position,
|
|
37
|
+
tickLabelStyle,
|
|
38
|
+
labelStyle,
|
|
39
|
+
slots,
|
|
40
|
+
slotProps
|
|
41
|
+
} = defaultizedProps;
|
|
42
|
+
const theme = useTheme();
|
|
43
|
+
const isRtl = useRtl();
|
|
44
|
+
const classes = useUtilityClasses(defaultizedProps);
|
|
45
|
+
const positionSign = position === 'bottom' ? 1 : -1;
|
|
46
|
+
const Line = slots?.axisLine ?? 'line';
|
|
47
|
+
const Tick = slots?.axisTick ?? 'line';
|
|
48
|
+
const TickLabel = slots?.axisTickLabel ?? ChartsText;
|
|
49
|
+
const Label = slots?.axisLabel ?? ChartsText;
|
|
50
|
+
const defaultTextAnchor = getDefaultTextAnchor((position === 'bottom' ? 0 : 180) - (tickLabelStyle?.angle ?? 0));
|
|
51
|
+
const defaultDominantBaseline = getDefaultBaseline((position === 'bottom' ? 0 : 180) - (tickLabelStyle?.angle ?? 0));
|
|
52
|
+
const axisTickLabelProps = useSlotProps({
|
|
53
|
+
elementType: TickLabel,
|
|
54
|
+
externalSlotProps: slotProps?.axisTickLabel,
|
|
55
|
+
additionalProps: {
|
|
56
|
+
style: _extends({}, theme.typography.caption, {
|
|
57
|
+
fontSize: 12,
|
|
58
|
+
lineHeight: 1.25,
|
|
59
|
+
textAnchor: isRtl ? invertTextAnchor(defaultTextAnchor) : defaultTextAnchor,
|
|
60
|
+
dominantBaseline: defaultDominantBaseline
|
|
61
|
+
}, tickLabelStyle)
|
|
62
|
+
},
|
|
63
|
+
className: classes.tickLabel,
|
|
64
|
+
ownerState: {}
|
|
65
|
+
});
|
|
66
|
+
const axisLabelProps = useSlotProps({
|
|
67
|
+
elementType: Label,
|
|
68
|
+
externalSlotProps: slotProps?.axisLabel,
|
|
69
|
+
additionalProps: {
|
|
70
|
+
style: _extends({}, theme.typography.body1, {
|
|
71
|
+
lineHeight: 1,
|
|
72
|
+
fontSize: 14,
|
|
73
|
+
textAnchor: 'middle',
|
|
74
|
+
dominantBaseline: position === 'bottom' ? 'text-after-edge' : 'text-before-edge'
|
|
75
|
+
}, labelStyle)
|
|
76
|
+
},
|
|
77
|
+
ownerState: {}
|
|
78
|
+
});
|
|
79
|
+
const domain = xScale.domain();
|
|
80
|
+
const isScaleBand = isBandScale(xScale);
|
|
81
|
+
const skipAxisRendering = isScaleBand && domain.length === 0 || !isScaleBand && domain.some(isInfinity) || position === 'none';
|
|
82
|
+
return {
|
|
83
|
+
xScale,
|
|
84
|
+
defaultizedProps,
|
|
85
|
+
tickNumber,
|
|
86
|
+
positionSign,
|
|
87
|
+
skipAxisRendering,
|
|
88
|
+
classes,
|
|
89
|
+
Line,
|
|
90
|
+
Tick,
|
|
91
|
+
TickLabel,
|
|
92
|
+
Label,
|
|
93
|
+
axisTickLabelProps,
|
|
94
|
+
axisLabelProps,
|
|
95
|
+
reverse,
|
|
96
|
+
isRtl
|
|
97
|
+
};
|
|
98
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AxisConfig, ChartsXAxisProps } from "../models/axis.js";
|
|
2
|
+
export declare const useUtilityClasses: (ownerState: AxisConfig<any, any, ChartsXAxisProps>) => Record<"root" | "line" | "label" | "tickContainer" | "tick" | "tickLabel", string>;
|
|
3
|
+
export declare const TICK_LABEL_GAP = 3;
|
|
4
|
+
export declare const AXIS_LABEL_TICK_LABEL_GAP = 4;
|
|
5
|
+
export declare const XAxisRoot: import("@emotion/styled").StyledComponent<Pick<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Pick<import("react").SVGProps<SVGGElement>, keyof import("react").SVGProps<SVGGElement>>, keyof import("react").SVGProps<SVGGElement> | keyof import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
6
|
+
export declare const defaultProps: {
|
|
7
|
+
readonly disableLine: false;
|
|
8
|
+
readonly disableTicks: false;
|
|
9
|
+
readonly tickSize: 6;
|
|
10
|
+
readonly tickLabelMinGap: 4;
|
|
11
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
import { getAxisUtilityClass } from "../ChartsAxis/axisClasses.js";
|
|
4
|
+
import { AxisRoot } from "../internals/components/AxisSharedComponents.js";
|
|
5
|
+
export const useUtilityClasses = ownerState => {
|
|
6
|
+
const {
|
|
7
|
+
classes,
|
|
8
|
+
position,
|
|
9
|
+
id
|
|
10
|
+
} = ownerState;
|
|
11
|
+
const slots = {
|
|
12
|
+
root: ['root', 'directionX', position, `id-${id}`],
|
|
13
|
+
line: ['line'],
|
|
14
|
+
tickContainer: ['tickContainer'],
|
|
15
|
+
tick: ['tick'],
|
|
16
|
+
tickLabel: ['tickLabel'],
|
|
17
|
+
label: ['label']
|
|
18
|
+
};
|
|
19
|
+
return composeClasses(slots, getAxisUtilityClass, classes);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/* Gap between a tick and its label. */
|
|
23
|
+
export const TICK_LABEL_GAP = 3;
|
|
24
|
+
/* Gap between the axis label and tick labels. */
|
|
25
|
+
export const AXIS_LABEL_TICK_LABEL_GAP = 4;
|
|
26
|
+
export const XAxisRoot = styled(AxisRoot, {
|
|
27
|
+
name: 'MuiChartsXAxis',
|
|
28
|
+
slot: 'Root'
|
|
29
|
+
})({});
|
|
30
|
+
export const defaultProps = {
|
|
31
|
+
disableLine: false,
|
|
32
|
+
disableTicks: false,
|
|
33
|
+
tickSize: 6,
|
|
34
|
+
tickLabelMinGap: 4
|
|
35
|
+
};
|
|
@@ -19,7 +19,7 @@ import { useLineChartProps } from "./useLineChartProps.js";
|
|
|
19
19
|
import { useChartContainerProps } from "../ChartContainer/useChartContainerProps.js";
|
|
20
20
|
import { ChartDataProvider } from "../ChartDataProvider/index.js";
|
|
21
21
|
import { ChartsSurface } from "../ChartsSurface/index.js";
|
|
22
|
-
import { ChartsWrapper } from "../
|
|
22
|
+
import { ChartsWrapper } from "../ChartsWrapper/index.js";
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
/**
|
|
25
25
|
* Demos:
|
|
@@ -270,6 +270,10 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
270
270
|
disableTicks: PropTypes.bool,
|
|
271
271
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
272
272
|
fill: PropTypes.string,
|
|
273
|
+
groups: PropTypes.arrayOf(PropTypes.shape({
|
|
274
|
+
getValue: PropTypes.func.isRequired,
|
|
275
|
+
tickSize: PropTypes.number
|
|
276
|
+
})),
|
|
273
277
|
height: PropTypes.number,
|
|
274
278
|
hideTooltip: PropTypes.bool,
|
|
275
279
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -321,6 +325,10 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
321
325
|
disableTicks: PropTypes.bool,
|
|
322
326
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
323
327
|
fill: PropTypes.string,
|
|
328
|
+
groups: PropTypes.arrayOf(PropTypes.shape({
|
|
329
|
+
getValue: PropTypes.func.isRequired,
|
|
330
|
+
tickSize: PropTypes.number
|
|
331
|
+
})),
|
|
324
332
|
height: PropTypes.number,
|
|
325
333
|
hideTooltip: PropTypes.bool,
|
|
326
334
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -394,6 +402,53 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
394
402
|
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
395
403
|
tickSize: PropTypes.number,
|
|
396
404
|
valueFormatter: PropTypes.func
|
|
405
|
+
}), PropTypes.shape({
|
|
406
|
+
axis: PropTypes.oneOf(['x']),
|
|
407
|
+
classes: PropTypes.object,
|
|
408
|
+
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
409
|
+
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
410
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
411
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
412
|
+
type: PropTypes.oneOf(['continuous']).isRequired
|
|
413
|
+
}), PropTypes.shape({
|
|
414
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
415
|
+
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
416
|
+
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
417
|
+
})]),
|
|
418
|
+
constant: PropTypes.number,
|
|
419
|
+
data: PropTypes.array,
|
|
420
|
+
dataKey: PropTypes.string,
|
|
421
|
+
disableLine: PropTypes.bool,
|
|
422
|
+
disableTicks: PropTypes.bool,
|
|
423
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
424
|
+
fill: PropTypes.string,
|
|
425
|
+
height: PropTypes.number,
|
|
426
|
+
hideTooltip: PropTypes.bool,
|
|
427
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
428
|
+
ignoreTooltip: PropTypes.bool,
|
|
429
|
+
label: PropTypes.string,
|
|
430
|
+
labelStyle: PropTypes.object,
|
|
431
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
432
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
433
|
+
offset: PropTypes.number,
|
|
434
|
+
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
435
|
+
reverse: PropTypes.bool,
|
|
436
|
+
scaleType: PropTypes.oneOf(['symlog']),
|
|
437
|
+
slotProps: PropTypes.object,
|
|
438
|
+
slots: PropTypes.object,
|
|
439
|
+
stroke: PropTypes.string,
|
|
440
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
441
|
+
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
442
|
+
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
443
|
+
tickLabelMinGap: PropTypes.number,
|
|
444
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
445
|
+
tickLabelStyle: PropTypes.object,
|
|
446
|
+
tickMaxStep: PropTypes.number,
|
|
447
|
+
tickMinStep: PropTypes.number,
|
|
448
|
+
tickNumber: PropTypes.number,
|
|
449
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
450
|
+
tickSize: PropTypes.number,
|
|
451
|
+
valueFormatter: PropTypes.func
|
|
397
452
|
}), PropTypes.shape({
|
|
398
453
|
axis: PropTypes.oneOf(['x']),
|
|
399
454
|
classes: PropTypes.object,
|
|
@@ -656,6 +711,10 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
656
711
|
disableTicks: PropTypes.bool,
|
|
657
712
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
658
713
|
fill: PropTypes.string,
|
|
714
|
+
groups: PropTypes.arrayOf(PropTypes.shape({
|
|
715
|
+
getValue: PropTypes.func.isRequired,
|
|
716
|
+
tickSize: PropTypes.number
|
|
717
|
+
})),
|
|
659
718
|
hideTooltip: PropTypes.bool,
|
|
660
719
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
661
720
|
ignoreTooltip: PropTypes.bool,
|
|
@@ -706,6 +765,10 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
706
765
|
disableTicks: PropTypes.bool,
|
|
707
766
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
708
767
|
fill: PropTypes.string,
|
|
768
|
+
groups: PropTypes.arrayOf(PropTypes.shape({
|
|
769
|
+
getValue: PropTypes.func.isRequired,
|
|
770
|
+
tickSize: PropTypes.number
|
|
771
|
+
})),
|
|
709
772
|
hideTooltip: PropTypes.bool,
|
|
710
773
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
711
774
|
ignoreTooltip: PropTypes.bool,
|
|
@@ -777,6 +840,52 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
777
840
|
tickSize: PropTypes.number,
|
|
778
841
|
valueFormatter: PropTypes.func,
|
|
779
842
|
width: PropTypes.number
|
|
843
|
+
}), PropTypes.shape({
|
|
844
|
+
axis: PropTypes.oneOf(['y']),
|
|
845
|
+
classes: PropTypes.object,
|
|
846
|
+
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
847
|
+
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
848
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
849
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
850
|
+
type: PropTypes.oneOf(['continuous']).isRequired
|
|
851
|
+
}), PropTypes.shape({
|
|
852
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
853
|
+
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
854
|
+
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
855
|
+
})]),
|
|
856
|
+
constant: PropTypes.number,
|
|
857
|
+
data: PropTypes.array,
|
|
858
|
+
dataKey: PropTypes.string,
|
|
859
|
+
disableLine: PropTypes.bool,
|
|
860
|
+
disableTicks: PropTypes.bool,
|
|
861
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
862
|
+
fill: PropTypes.string,
|
|
863
|
+
hideTooltip: PropTypes.bool,
|
|
864
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
865
|
+
ignoreTooltip: PropTypes.bool,
|
|
866
|
+
label: PropTypes.string,
|
|
867
|
+
labelStyle: PropTypes.object,
|
|
868
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
869
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
870
|
+
offset: PropTypes.number,
|
|
871
|
+
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
872
|
+
reverse: PropTypes.bool,
|
|
873
|
+
scaleType: PropTypes.oneOf(['symlog']),
|
|
874
|
+
slotProps: PropTypes.object,
|
|
875
|
+
slots: PropTypes.object,
|
|
876
|
+
stroke: PropTypes.string,
|
|
877
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
878
|
+
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
879
|
+
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
880
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
881
|
+
tickLabelStyle: PropTypes.object,
|
|
882
|
+
tickMaxStep: PropTypes.number,
|
|
883
|
+
tickMinStep: PropTypes.number,
|
|
884
|
+
tickNumber: PropTypes.number,
|
|
885
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
886
|
+
tickSize: PropTypes.number,
|
|
887
|
+
valueFormatter: PropTypes.func,
|
|
888
|
+
width: PropTypes.number
|
|
780
889
|
}), PropTypes.shape({
|
|
781
890
|
axis: PropTypes.oneOf(['y']),
|
|
782
891
|
classes: PropTypes.object,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { findMinMax } from "../../internals/findMinMax.js";
|
|
1
2
|
export const getExtremumX = params => {
|
|
2
3
|
const {
|
|
3
4
|
axis
|
|
4
5
|
} = params;
|
|
5
|
-
|
|
6
|
-
const maxX = Math.max(...(axis.data ?? []));
|
|
7
|
-
return [minX, maxX];
|
|
6
|
+
return findMinMax(axis.data ?? []);
|
|
8
7
|
};
|
|
9
8
|
function getSeriesExtremums(getValues, data, stackedData, filter) {
|
|
10
9
|
return stackedData.reduce((seriesAcc, stackedValue, index) => {
|
|
@@ -11,7 +11,7 @@ import type { LineChartProps } from "./LineChart.js";
|
|
|
11
11
|
import { LineHighlightPlotProps } from "./LineHighlightPlot.js";
|
|
12
12
|
import { LinePlotProps } from "./LinePlot.js";
|
|
13
13
|
import { MarkPlotProps } from "./MarkPlot.js";
|
|
14
|
-
import type { ChartsWrapperProps } from "../
|
|
14
|
+
import type { ChartsWrapperProps } from "../ChartsWrapper/index.js";
|
|
15
15
|
import { LineChartPluginsSignatures } from "./LineChart.plugins.js";
|
|
16
16
|
/**
|
|
17
17
|
* A helper function that extracts LineChartProps from the input props
|
package/esm/PieChart/PieChart.js
CHANGED
|
@@ -14,7 +14,7 @@ import { ChartsOverlay } from "../ChartsOverlay/index.js";
|
|
|
14
14
|
import { ChartsSurface } from "../ChartsSurface/index.js";
|
|
15
15
|
import { ChartDataProvider } from "../ChartDataProvider/index.js";
|
|
16
16
|
import { useChartContainerProps } from "../ChartContainer/useChartContainerProps.js";
|
|
17
|
-
import { ChartsWrapper } from "../
|
|
17
|
+
import { ChartsWrapper } from "../ChartsWrapper/index.js";
|
|
18
18
|
import { PIE_CHART_PLUGINS } from "./PieChart.plugins.js";
|
|
19
19
|
import { defaultizeMargin } from "../internals/defaultizeMargin.js";
|
|
20
20
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { ChartsLegendSlotProps, ChartsLegendSlots } from "../ChartsLegend/index.js";
|
|
3
3
|
import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from "../ChartsOverlay/ChartsOverlay.js";
|
|
4
4
|
import { ChartsSurfaceProps } from "../ChartsSurface/index.js";
|
|
5
|
-
import { ChartsWrapperProps } from "../
|
|
5
|
+
import { ChartsWrapperProps } from "../ChartsWrapper/index.js";
|
|
6
6
|
import { RadarGridProps } from "./RadarGrid/index.js";
|
|
7
7
|
import { RadarDataProviderProps } from "./RadarDataProvider/RadarDataProvider.js";
|
|
8
8
|
import { RadarSeriesPlotProps } from "./RadarSeriesPlot/index.js";
|
|
@@ -8,7 +8,7 @@ import { ChartsLegend } from "../ChartsLegend/index.js";
|
|
|
8
8
|
import { ChartsOverlay } from "../ChartsOverlay/ChartsOverlay.js";
|
|
9
9
|
import { useRadarChartProps } from "./useRadarChartProps.js";
|
|
10
10
|
import { ChartsSurface } from "../ChartsSurface/index.js";
|
|
11
|
-
import { ChartsWrapper } from "../
|
|
11
|
+
import { ChartsWrapper } from "../ChartsWrapper/index.js";
|
|
12
12
|
import { RadarGrid } from "./RadarGrid/index.js";
|
|
13
13
|
import { RadarDataProvider } from "./RadarDataProvider/RadarDataProvider.js";
|
|
14
14
|
import { RadarSeriesArea, RadarSeriesMarks } from "./RadarSeriesPlot/index.js";
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { RadarDataProvider } from "./RadarDataProvider/index.js";
|
|
2
2
|
export { RadarChart } from "./RadarChart.js";
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated radar chart is now stable, import `RadarChart` instead
|
|
5
|
+
*/
|
|
6
|
+
export declare const Unstable_RadarChart: import("react").ForwardRefExoticComponent<import("./RadarChart.js").RadarChartProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
4
7
|
export { RadarDataProvider } from "./RadarDataProvider/index.js";
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated radar data provider is now stable, import `RadarDataProvider` instead
|
|
10
|
+
*/
|
|
11
|
+
export declare const Unstable_RadarDataProvider: typeof RadarDataProvider;
|
|
5
12
|
export type { RadarChartProps, RadarChartSlots, RadarChartSlotProps } from "./RadarChart.js";
|
|
6
13
|
export type { RadarDataProviderProps, RadarSeries } from "./RadarDataProvider/index.js";
|
|
7
14
|
export * from "./RadarGrid/index.js";
|
package/esm/RadarChart/index.js
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import { RadarChart } from "./RadarChart.js";
|
|
2
|
+
import { RadarDataProvider } from "./RadarDataProvider/index.js";
|
|
2
3
|
export { RadarChart } from "./RadarChart.js";
|
|
3
|
-
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated radar chart is now stable, import `RadarChart` instead
|
|
6
|
+
*/
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
8
|
+
export const Unstable_RadarChart = RadarChart;
|
|
4
9
|
export { RadarDataProvider } from "./RadarDataProvider/index.js";
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated radar data provider is now stable, import `RadarDataProvider` instead
|
|
12
|
+
*/
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
14
|
+
export const Unstable_RadarDataProvider = RadarDataProvider;
|
|
5
15
|
export * from "./RadarGrid/index.js";
|
|
6
16
|
export * from "./RadarAxisHighlight/index.js";
|
|
7
17
|
export * from "./RadarMetricLabels/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RadarChartProps } from "./RadarChart.js";
|
|
2
2
|
import { ChartsOverlayProps } from "../ChartsOverlay/index.js";
|
|
3
3
|
import { ChartsLegendSlotExtension } from "../ChartsLegend/index.js";
|
|
4
|
-
import type { ChartsWrapperProps } from "../
|
|
4
|
+
import type { ChartsWrapperProps } from "../ChartsWrapper/index.js";
|
|
5
5
|
import { RadarDataProviderProps } from "./RadarDataProvider/RadarDataProvider.js";
|
|
6
6
|
import { ChartsSurfaceProps } from "../ChartsSurface/index.js";
|
|
7
7
|
import { RadarGridProps } from "./RadarGrid/index.js";
|
|
@@ -6,6 +6,7 @@ import { ScatterPlotProps, ScatterPlotSlotProps, ScatterPlotSlots } from "./Scat
|
|
|
6
6
|
import { ChartContainerProps } from "../ChartContainer/index.js";
|
|
7
7
|
import { ChartsAxisProps } from "../ChartsAxis/index.js";
|
|
8
8
|
import { ScatterSeriesType } from "../models/seriesType/scatter.js";
|
|
9
|
+
import { ChartsTooltipProps } from "../ChartsTooltip/index.js";
|
|
9
10
|
import { ChartsTooltipSlots, ChartsTooltipSlotProps } from "../ChartsTooltip/ChartTooltip.types.js";
|
|
10
11
|
import { ChartsLegendSlotProps, ChartsLegendSlots } from "../ChartsLegend/index.js";
|
|
11
12
|
import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from "../ChartsOverlay/index.js";
|
|
@@ -15,7 +16,13 @@ import { ChartsGridProps } from "../ChartsGrid/index.js";
|
|
|
15
16
|
import { UseChartVoronoiSignature } from "../internals/plugins/featurePlugins/useChartVoronoi/index.js";
|
|
16
17
|
import { ScatterChartPluginsSignatures } from "./ScatterChart.plugins.js";
|
|
17
18
|
export interface ScatterChartSlots extends ChartsAxisSlots, ScatterPlotSlots, ChartsLegendSlots, ChartsOverlaySlots, ChartsTooltipSlots, ChartsToolbarSlots, Partial<ChartsSlots> {}
|
|
18
|
-
export interface ScatterChartSlotProps extends ChartsAxisSlotProps, ScatterPlotSlotProps, ChartsLegendSlotProps, ChartsOverlaySlotProps, ChartsTooltipSlotProps, ChartsToolbarSlotProps, Partial<ChartsSlotProps> {
|
|
19
|
+
export interface ScatterChartSlotProps extends ChartsAxisSlotProps, ScatterPlotSlotProps, ChartsLegendSlotProps, ChartsOverlaySlotProps, Omit<ChartsTooltipSlotProps, 'tooltip'>, ChartsToolbarSlotProps, Partial<ChartsSlotProps> {
|
|
20
|
+
/**
|
|
21
|
+
* Slot props for the tooltip component.
|
|
22
|
+
* @default {}
|
|
23
|
+
*/
|
|
24
|
+
tooltip?: Partial<ChartsTooltipProps<'item' | 'none'>>;
|
|
25
|
+
}
|
|
19
26
|
export type ScatterSeries = MakeOptional<ScatterSeriesType, 'type'>;
|
|
20
27
|
export interface ScatterChartProps extends Omit<ChartContainerProps<'scatter', ScatterChartPluginsSignatures>, 'series' | 'plugins' | 'onItemClick' | 'experimentalFeatures' | 'highlightedAxis' | 'onHighlightedAxisChange'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
|
|
21
28
|
/**
|
|
@@ -15,7 +15,7 @@ import { useScatterChartProps } from "./useScatterChartProps.js";
|
|
|
15
15
|
import { useChartContainerProps } from "../ChartContainer/useChartContainerProps.js";
|
|
16
16
|
import { ChartDataProvider } from "../ChartDataProvider/index.js";
|
|
17
17
|
import { ChartsSurface } from "../ChartsSurface/index.js";
|
|
18
|
-
import { ChartsWrapper } from "../
|
|
18
|
+
import { ChartsWrapper } from "../ChartsWrapper/index.js";
|
|
19
19
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
20
|
/**
|
|
21
21
|
* Demos:
|
|
@@ -239,6 +239,10 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
239
239
|
disableTicks: PropTypes.bool,
|
|
240
240
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
241
241
|
fill: PropTypes.string,
|
|
242
|
+
groups: PropTypes.arrayOf(PropTypes.shape({
|
|
243
|
+
getValue: PropTypes.func.isRequired,
|
|
244
|
+
tickSize: PropTypes.number
|
|
245
|
+
})),
|
|
242
246
|
height: PropTypes.number,
|
|
243
247
|
hideTooltip: PropTypes.bool,
|
|
244
248
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -290,6 +294,10 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
290
294
|
disableTicks: PropTypes.bool,
|
|
291
295
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
292
296
|
fill: PropTypes.string,
|
|
297
|
+
groups: PropTypes.arrayOf(PropTypes.shape({
|
|
298
|
+
getValue: PropTypes.func.isRequired,
|
|
299
|
+
tickSize: PropTypes.number
|
|
300
|
+
})),
|
|
293
301
|
height: PropTypes.number,
|
|
294
302
|
hideTooltip: PropTypes.bool,
|
|
295
303
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -363,6 +371,53 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
363
371
|
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
364
372
|
tickSize: PropTypes.number,
|
|
365
373
|
valueFormatter: PropTypes.func
|
|
374
|
+
}), PropTypes.shape({
|
|
375
|
+
axis: PropTypes.oneOf(['x']),
|
|
376
|
+
classes: PropTypes.object,
|
|
377
|
+
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
378
|
+
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
379
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
380
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
381
|
+
type: PropTypes.oneOf(['continuous']).isRequired
|
|
382
|
+
}), PropTypes.shape({
|
|
383
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
384
|
+
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
385
|
+
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
386
|
+
})]),
|
|
387
|
+
constant: PropTypes.number,
|
|
388
|
+
data: PropTypes.array,
|
|
389
|
+
dataKey: PropTypes.string,
|
|
390
|
+
disableLine: PropTypes.bool,
|
|
391
|
+
disableTicks: PropTypes.bool,
|
|
392
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
393
|
+
fill: PropTypes.string,
|
|
394
|
+
height: PropTypes.number,
|
|
395
|
+
hideTooltip: PropTypes.bool,
|
|
396
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
397
|
+
ignoreTooltip: PropTypes.bool,
|
|
398
|
+
label: PropTypes.string,
|
|
399
|
+
labelStyle: PropTypes.object,
|
|
400
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
401
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
402
|
+
offset: PropTypes.number,
|
|
403
|
+
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
404
|
+
reverse: PropTypes.bool,
|
|
405
|
+
scaleType: PropTypes.oneOf(['symlog']),
|
|
406
|
+
slotProps: PropTypes.object,
|
|
407
|
+
slots: PropTypes.object,
|
|
408
|
+
stroke: PropTypes.string,
|
|
409
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
410
|
+
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
411
|
+
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
412
|
+
tickLabelMinGap: PropTypes.number,
|
|
413
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
414
|
+
tickLabelStyle: PropTypes.object,
|
|
415
|
+
tickMaxStep: PropTypes.number,
|
|
416
|
+
tickMinStep: PropTypes.number,
|
|
417
|
+
tickNumber: PropTypes.number,
|
|
418
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
419
|
+
tickSize: PropTypes.number,
|
|
420
|
+
valueFormatter: PropTypes.func
|
|
366
421
|
}), PropTypes.shape({
|
|
367
422
|
axis: PropTypes.oneOf(['x']),
|
|
368
423
|
classes: PropTypes.object,
|
|
@@ -625,6 +680,10 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
625
680
|
disableTicks: PropTypes.bool,
|
|
626
681
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
627
682
|
fill: PropTypes.string,
|
|
683
|
+
groups: PropTypes.arrayOf(PropTypes.shape({
|
|
684
|
+
getValue: PropTypes.func.isRequired,
|
|
685
|
+
tickSize: PropTypes.number
|
|
686
|
+
})),
|
|
628
687
|
hideTooltip: PropTypes.bool,
|
|
629
688
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
630
689
|
ignoreTooltip: PropTypes.bool,
|
|
@@ -675,6 +734,10 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
675
734
|
disableTicks: PropTypes.bool,
|
|
676
735
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
677
736
|
fill: PropTypes.string,
|
|
737
|
+
groups: PropTypes.arrayOf(PropTypes.shape({
|
|
738
|
+
getValue: PropTypes.func.isRequired,
|
|
739
|
+
tickSize: PropTypes.number
|
|
740
|
+
})),
|
|
678
741
|
hideTooltip: PropTypes.bool,
|
|
679
742
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
680
743
|
ignoreTooltip: PropTypes.bool,
|
|
@@ -746,6 +809,52 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
746
809
|
tickSize: PropTypes.number,
|
|
747
810
|
valueFormatter: PropTypes.func,
|
|
748
811
|
width: PropTypes.number
|
|
812
|
+
}), PropTypes.shape({
|
|
813
|
+
axis: PropTypes.oneOf(['y']),
|
|
814
|
+
classes: PropTypes.object,
|
|
815
|
+
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
816
|
+
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
817
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
818
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
819
|
+
type: PropTypes.oneOf(['continuous']).isRequired
|
|
820
|
+
}), PropTypes.shape({
|
|
821
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
822
|
+
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
823
|
+
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
824
|
+
})]),
|
|
825
|
+
constant: PropTypes.number,
|
|
826
|
+
data: PropTypes.array,
|
|
827
|
+
dataKey: PropTypes.string,
|
|
828
|
+
disableLine: PropTypes.bool,
|
|
829
|
+
disableTicks: PropTypes.bool,
|
|
830
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
831
|
+
fill: PropTypes.string,
|
|
832
|
+
hideTooltip: PropTypes.bool,
|
|
833
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
834
|
+
ignoreTooltip: PropTypes.bool,
|
|
835
|
+
label: PropTypes.string,
|
|
836
|
+
labelStyle: PropTypes.object,
|
|
837
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
838
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
839
|
+
offset: PropTypes.number,
|
|
840
|
+
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
841
|
+
reverse: PropTypes.bool,
|
|
842
|
+
scaleType: PropTypes.oneOf(['symlog']),
|
|
843
|
+
slotProps: PropTypes.object,
|
|
844
|
+
slots: PropTypes.object,
|
|
845
|
+
stroke: PropTypes.string,
|
|
846
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
847
|
+
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
848
|
+
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
849
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
850
|
+
tickLabelStyle: PropTypes.object,
|
|
851
|
+
tickMaxStep: PropTypes.number,
|
|
852
|
+
tickMinStep: PropTypes.number,
|
|
853
|
+
tickNumber: PropTypes.number,
|
|
854
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
855
|
+
tickSize: PropTypes.number,
|
|
856
|
+
valueFormatter: PropTypes.func,
|
|
857
|
+
width: PropTypes.number
|
|
749
858
|
}), PropTypes.shape({
|
|
750
859
|
axis: PropTypes.oneOf(['y']),
|
|
751
860
|
classes: PropTypes.object,
|