@mui/x-charts 7.0.0-beta.3 → 7.0.0-beta.5
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 +0 -2
- package/CHANGELOG.md +357 -22
- package/ChartsGrid/ChartsGrid.js +2 -2
- package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
- package/ChartsTooltip/utils.js +1 -1
- package/ChartsVoronoiHandler/ChartsVoronoiHandler.d.ts +0 -1
- package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +1 -2
- package/ChartsXAxis/ChartsXAxis.js +1 -1
- package/ChartsYAxis/ChartsYAxis.js +1 -1
- package/Gauge/Gauge.js +0 -2
- package/Gauge/GaugeContainer.d.ts +0 -2
- package/Gauge/GaugeContainer.js +0 -2
- package/Gauge/GaugeProvider.js +3 -0
- package/Gauge/GaugeValueText.js +1 -1
- package/LineChart/LineChart.js +0 -2
- package/PieChart/PieChart.js +0 -2
- package/ResponsiveChartContainer/ResponsiveChartContainer.d.ts +0 -2
- package/ResponsiveChartContainer/ResponsiveChartContainer.js +0 -2
- package/ScatterChart/ScatterChart.js +0 -3
- package/SparkLineChart/SparkLineChart.js +0 -2
- package/context/CartesianContextProvider.d.ts +0 -8
- package/context/CartesianContextProvider.js +4 -89
- package/context/DrawingProvider.d.ts +2 -11
- package/context/DrawingProvider.js +10 -35
- package/context/HighlightProvider.js +3 -0
- package/context/InteractionProvider.js +3 -0
- package/context/SeriesContextProvider.js +3 -0
- package/context/index.d.ts +0 -2
- package/context/index.js +1 -15
- package/esm/BarChart/BarChart.js +0 -2
- package/esm/ChartsGrid/ChartsGrid.js +2 -2
- package/esm/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +2 -2
- package/esm/ChartsTooltip/utils.js +2 -2
- package/esm/ChartsVoronoiHandler/ChartsVoronoiHandler.js +2 -3
- package/esm/ChartsXAxis/ChartsXAxis.js +1 -1
- package/esm/ChartsYAxis/ChartsYAxis.js +1 -1
- package/esm/Gauge/Gauge.js +0 -2
- package/esm/Gauge/GaugeContainer.js +0 -2
- package/esm/Gauge/GaugeProvider.js +3 -0
- package/esm/Gauge/GaugeValueText.js +1 -1
- package/esm/LineChart/LineChart.js +0 -2
- package/esm/PieChart/PieChart.js +0 -2
- package/esm/ResponsiveChartContainer/ResponsiveChartContainer.js +0 -2
- package/esm/ScatterChart/ScatterChart.js +0 -3
- package/esm/SparkLineChart/SparkLineChart.js +0 -2
- package/esm/context/CartesianContextProvider.js +3 -88
- package/esm/context/DrawingProvider.js +10 -36
- package/esm/context/HighlightProvider.js +3 -0
- package/esm/context/InteractionProvider.js +3 -0
- package/esm/context/SeriesContextProvider.js +3 -0
- package/esm/context/index.js +1 -2
- package/esm/hooks/useAxisEvents.js +2 -2
- package/hooks/useAxisEvents.js +1 -1
- package/hooks/useTicks.d.ts +1 -1
- package/index.js +1 -1
- package/modern/BarChart/BarChart.js +0 -2
- package/modern/ChartsGrid/ChartsGrid.js +2 -2
- package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +2 -2
- package/modern/ChartsTooltip/utils.js +2 -2
- package/modern/ChartsVoronoiHandler/ChartsVoronoiHandler.js +2 -3
- package/modern/ChartsXAxis/ChartsXAxis.js +1 -1
- package/modern/ChartsYAxis/ChartsYAxis.js +1 -1
- package/modern/Gauge/Gauge.js +0 -2
- package/modern/Gauge/GaugeContainer.js +0 -2
- package/modern/Gauge/GaugeProvider.js +3 -0
- package/modern/Gauge/GaugeValueText.js +1 -1
- package/modern/LineChart/LineChart.js +0 -2
- package/modern/PieChart/PieChart.js +0 -2
- package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +0 -2
- package/modern/ScatterChart/ScatterChart.js +0 -3
- package/modern/SparkLineChart/SparkLineChart.js +0 -2
- package/modern/context/CartesianContextProvider.js +3 -88
- package/modern/context/DrawingProvider.js +10 -36
- package/modern/context/HighlightProvider.js +3 -0
- package/modern/context/InteractionProvider.js +3 -0
- package/modern/context/SeriesContextProvider.js +3 -0
- package/modern/context/index.js +1 -2
- package/modern/hooks/useAxisEvents.js +2 -2
- package/modern/index.js +1 -1
- package/package.json +1 -1
- package/legacy/BarChart/BarChart.js +0 -440
- package/legacy/BarChart/BarElement.js +0 -119
- package/legacy/BarChart/BarPlot.js +0 -232
- package/legacy/BarChart/extremums.js +0 -45
- package/legacy/BarChart/formatter.js +0 -78
- package/legacy/BarChart/index.js +0 -3
- package/legacy/BarChart/legend.js +0 -15
- package/legacy/ChartContainer/ChartContainer.js +0 -189
- package/legacy/ChartContainer/index.js +0 -1
- package/legacy/ChartsAxis/ChartsAxis.js +0 -215
- package/legacy/ChartsAxis/axisClasses.js +0 -5
- package/legacy/ChartsAxis/index.js +0 -2
- package/legacy/ChartsAxisHighlight/ChartsAxisHighlight.js +0 -105
- package/legacy/ChartsAxisHighlight/index.js +0 -1
- package/legacy/ChartsClipPath/ChartsClipPath.js +0 -48
- package/legacy/ChartsClipPath/index.js +0 -1
- package/legacy/ChartsGrid/ChartsGrid.js +0 -119
- package/legacy/ChartsGrid/chartsGridClasses.js +0 -6
- package/legacy/ChartsGrid/index.js +0 -2
- package/legacy/ChartsLegend/ChartsLegend.js +0 -100
- package/legacy/ChartsLegend/DefaultChartsLegend.js +0 -302
- package/legacy/ChartsLegend/chartsLegendClasses.js +0 -5
- package/legacy/ChartsLegend/index.js +0 -4
- package/legacy/ChartsLegend/utils.js +0 -15
- package/legacy/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +0 -75
- package/legacy/ChartsOnAxisClickHandler/index.js +0 -1
- package/legacy/ChartsReferenceLine/ChartsReferenceLine.js +0 -72
- package/legacy/ChartsReferenceLine/ChartsXReferenceLine.js +0 -105
- package/legacy/ChartsReferenceLine/ChartsYReferenceLine.js +0 -105
- package/legacy/ChartsReferenceLine/chartsReferenceLineClasses.js +0 -6
- package/legacy/ChartsReferenceLine/common.js +0 -19
- package/legacy/ChartsReferenceLine/index.js +0 -2
- package/legacy/ChartsSurface.js +0 -78
- package/legacy/ChartsText/ChartsText.js +0 -95
- package/legacy/ChartsText/index.js +0 -1
- package/legacy/ChartsTooltip/ChartsAxisTooltipContent.js +0 -96
- package/legacy/ChartsTooltip/ChartsItemTooltipContent.js +0 -53
- package/legacy/ChartsTooltip/ChartsTooltip.js +0 -148
- package/legacy/ChartsTooltip/ChartsTooltipTable.js +0 -80
- package/legacy/ChartsTooltip/DefaultChartsAxisTooltipContent.js +0 -118
- package/legacy/ChartsTooltip/DefaultChartsItemTooltipContent.js +0 -78
- package/legacy/ChartsTooltip/chartsTooltipClasses.js +0 -5
- package/legacy/ChartsTooltip/index.js +0 -6
- package/legacy/ChartsTooltip/utils.js +0 -103
- package/legacy/ChartsVoronoiHandler/ChartsVoronoiHandler.js +0 -206
- package/legacy/ChartsVoronoiHandler/index.js +0 -1
- package/legacy/ChartsXAxis/ChartsXAxis.js +0 -339
- package/legacy/ChartsXAxis/index.js +0 -1
- package/legacy/ChartsYAxis/ChartsYAxis.js +0 -267
- package/legacy/ChartsYAxis/index.js +0 -1
- package/legacy/Gauge/Gauge.js +0 -146
- package/legacy/Gauge/GaugeContainer.js +0 -215
- package/legacy/Gauge/GaugeProvider.js +0 -87
- package/legacy/Gauge/GaugeReferenceArc.js +0 -37
- package/legacy/Gauge/GaugeValueArc.js +0 -44
- package/legacy/Gauge/GaugeValueText.js +0 -66
- package/legacy/Gauge/gaugeClasses.js +0 -7
- package/legacy/Gauge/index.js +0 -7
- package/legacy/Gauge/utils.js +0 -84
- package/legacy/LineChart/AnimatedArea.js +0 -102
- package/legacy/LineChart/AnimatedLine.js +0 -104
- package/legacy/LineChart/AreaElement.js +0 -112
- package/legacy/LineChart/AreaPlot.js +0 -149
- package/legacy/LineChart/LineChart.js +0 -452
- package/legacy/LineChart/LineElement.js +0 -112
- package/legacy/LineChart/LineHighlightElement.js +0 -79
- package/legacy/LineChart/LineHighlightPlot.js +0 -97
- package/legacy/LineChart/LinePlot.js +0 -144
- package/legacy/LineChart/MarkElement.js +0 -153
- package/legacy/LineChart/MarkPlot.js +0 -178
- package/legacy/LineChart/extremums.js +0 -54
- package/legacy/LineChart/formatter.js +0 -82
- package/legacy/LineChart/index.js +0 -11
- package/legacy/LineChart/legend.js +0 -15
- package/legacy/PieChart/PieArc.js +0 -103
- package/legacy/PieChart/PieArcLabel.js +0 -112
- package/legacy/PieChart/PieArcLabelPlot.js +0 -193
- package/legacy/PieChart/PieArcPlot.js +0 -180
- package/legacy/PieChart/PieChart.js +0 -404
- package/legacy/PieChart/PiePlot.js +0 -137
- package/legacy/PieChart/dataTransform/transition.js +0 -149
- package/legacy/PieChart/dataTransform/useTransformData.js +0 -63
- package/legacy/PieChart/formatter.js +0 -55
- package/legacy/PieChart/index.js +0 -6
- package/legacy/PieChart/legend.js +0 -16
- package/legacy/ResponsiveChartContainer/ResponsiveChartContainer.js +0 -185
- package/legacy/ResponsiveChartContainer/index.js +0 -1
- package/legacy/ResponsiveChartContainer/useChartContainerDimensions.js +0 -73
- package/legacy/ScatterChart/Scatter.js +0 -110
- package/legacy/ScatterChart/ScatterChart.js +0 -395
- package/legacy/ScatterChart/ScatterPlot.js +0 -80
- package/legacy/ScatterChart/extremums.js +0 -39
- package/legacy/ScatterChart/formatter.js +0 -12
- package/legacy/ScatterChart/index.js +0 -3
- package/legacy/ScatterChart/legend.js +0 -15
- package/legacy/SparkLineChart/SparkLineChart.js +0 -266
- package/legacy/SparkLineChart/index.js +0 -1
- package/legacy/colorPalettes/colorPalettes.js +0 -15
- package/legacy/colorPalettes/index.js +0 -1
- package/legacy/constants.js +0 -8
- package/legacy/context/CartesianContextProvider.js +0 -327
- package/legacy/context/DrawingProvider.js +0 -74
- package/legacy/context/HighlightProvider.js +0 -56
- package/legacy/context/InteractionProvider.js +0 -81
- package/legacy/context/SeriesContextProvider.js +0 -74
- package/legacy/context/index.js +0 -2
- package/legacy/hooks/index.js +0 -2
- package/legacy/hooks/useAxisEvents.js +0 -120
- package/legacy/hooks/useChartDimensions.js +0 -18
- package/legacy/hooks/useDrawingArea.js +0 -21
- package/legacy/hooks/useInteractionItemProps.js +0 -71
- package/legacy/hooks/useMounted.js +0 -21
- package/legacy/hooks/useReducedMotion.js +0 -27
- package/legacy/hooks/useScale.js +0 -33
- package/legacy/hooks/useTicks.js +0 -65
- package/legacy/index.js +0 -33
- package/legacy/internals/components/AxisSharedComponents.js +0 -25
- package/legacy/internals/defaultizeColor.js +0 -17
- package/legacy/internals/defaultizeValueFormatter.js +0 -12
- package/legacy/internals/domUtils.js +0 -121
- package/legacy/internals/geometry.js +0 -37
- package/legacy/internals/getCurve.js +0 -39
- package/legacy/internals/getScale.js +0 -17
- package/legacy/internals/getWordsByLines.js +0 -15
- package/legacy/internals/isBandScale.js +0 -3
- package/legacy/internals/stackSeries.js +0 -92
- package/legacy/internals/useAnimatedPath.js +0 -32
- package/legacy/internals/utils.js +0 -52
- package/legacy/models/axis.js +0 -6
- package/legacy/models/helpers.js +0 -1
- package/legacy/models/index.js +0 -4
- package/legacy/models/layout.js +0 -1
- package/legacy/models/seriesType/bar.js +0 -1
- package/legacy/models/seriesType/common.js +0 -1
- package/legacy/models/seriesType/config.js +0 -1
- package/legacy/models/seriesType/index.js +0 -5
- package/legacy/models/seriesType/line.js +0 -1
- package/legacy/models/seriesType/pie.js +0 -1
- package/legacy/models/seriesType/scatter.js +0 -1
- package/legacy/models/stacking.js +0 -1
- package/legacy/themeAugmentation/index.js +0 -3
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { SeriesContext } from '../context/SeriesContextProvider';
|
|
4
|
-
import { DrawingContext } from '../context/DrawingProvider';
|
|
5
|
-
import { PieArcPlot } from './PieArcPlot';
|
|
6
|
-
import { PieArcLabelPlot } from './PieArcLabelPlot';
|
|
7
|
-
import { getPercentageValue } from '../internals/utils';
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
-
/**
|
|
11
|
-
* Demos:
|
|
12
|
-
*
|
|
13
|
-
* - [Pie](https://mui.com/x/react-charts/pie/)
|
|
14
|
-
* - [Pie demonstration](https://mui.com/x/react-charts/pie-demo/)
|
|
15
|
-
*
|
|
16
|
-
* API:
|
|
17
|
-
*
|
|
18
|
-
* - [PiePlot API](https://mui.com/x/api/charts/pie-plot/)
|
|
19
|
-
*/
|
|
20
|
-
function PiePlot(props) {
|
|
21
|
-
var skipAnimation = props.skipAnimation,
|
|
22
|
-
slots = props.slots,
|
|
23
|
-
slotProps = props.slotProps,
|
|
24
|
-
onItemClick = props.onItemClick;
|
|
25
|
-
var seriesData = React.useContext(SeriesContext).pie;
|
|
26
|
-
var _React$useContext = React.useContext(DrawingContext),
|
|
27
|
-
left = _React$useContext.left,
|
|
28
|
-
top = _React$useContext.top,
|
|
29
|
-
width = _React$useContext.width,
|
|
30
|
-
height = _React$useContext.height;
|
|
31
|
-
if (seriesData === undefined) {
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
var availableRadius = Math.min(width, height) / 2;
|
|
35
|
-
var series = seriesData.series,
|
|
36
|
-
seriesOrder = seriesData.seriesOrder;
|
|
37
|
-
return /*#__PURE__*/_jsxs("g", {
|
|
38
|
-
children: [seriesOrder.map(function (seriesId) {
|
|
39
|
-
var _series$seriesId = series[seriesId],
|
|
40
|
-
innerRadiusParam = _series$seriesId.innerRadius,
|
|
41
|
-
outerRadiusParam = _series$seriesId.outerRadius,
|
|
42
|
-
cornerRadius = _series$seriesId.cornerRadius,
|
|
43
|
-
paddingAngle = _series$seriesId.paddingAngle,
|
|
44
|
-
data = _series$seriesId.data,
|
|
45
|
-
cxParam = _series$seriesId.cx,
|
|
46
|
-
cyParam = _series$seriesId.cy,
|
|
47
|
-
highlighted = _series$seriesId.highlighted,
|
|
48
|
-
faded = _series$seriesId.faded,
|
|
49
|
-
highlightScope = _series$seriesId.highlightScope;
|
|
50
|
-
var outerRadius = getPercentageValue(outerRadiusParam != null ? outerRadiusParam : availableRadius, availableRadius);
|
|
51
|
-
var innerRadius = getPercentageValue(innerRadiusParam != null ? innerRadiusParam : 0, availableRadius);
|
|
52
|
-
var cx = getPercentageValue(cxParam != null ? cxParam : '50%', width);
|
|
53
|
-
var cy = getPercentageValue(cyParam != null ? cyParam : '50%', height);
|
|
54
|
-
return /*#__PURE__*/_jsx("g", {
|
|
55
|
-
transform: "translate(".concat(left + cx, ", ").concat(top + cy, ")"),
|
|
56
|
-
children: /*#__PURE__*/_jsx(PieArcPlot, {
|
|
57
|
-
innerRadius: innerRadius,
|
|
58
|
-
outerRadius: outerRadius,
|
|
59
|
-
cornerRadius: cornerRadius,
|
|
60
|
-
paddingAngle: paddingAngle,
|
|
61
|
-
id: seriesId,
|
|
62
|
-
data: data,
|
|
63
|
-
skipAnimation: skipAnimation,
|
|
64
|
-
highlightScope: highlightScope,
|
|
65
|
-
highlighted: highlighted,
|
|
66
|
-
faded: faded,
|
|
67
|
-
onItemClick: onItemClick,
|
|
68
|
-
slots: slots,
|
|
69
|
-
slotProps: slotProps
|
|
70
|
-
})
|
|
71
|
-
}, seriesId);
|
|
72
|
-
}), seriesOrder.map(function (seriesId) {
|
|
73
|
-
var _series$seriesId2 = series[seriesId],
|
|
74
|
-
innerRadiusParam = _series$seriesId2.innerRadius,
|
|
75
|
-
outerRadiusParam = _series$seriesId2.outerRadius,
|
|
76
|
-
arcLabelRadiusParam = _series$seriesId2.arcLabelRadius,
|
|
77
|
-
cornerRadius = _series$seriesId2.cornerRadius,
|
|
78
|
-
paddingAngle = _series$seriesId2.paddingAngle,
|
|
79
|
-
arcLabel = _series$seriesId2.arcLabel,
|
|
80
|
-
arcLabelMinAngle = _series$seriesId2.arcLabelMinAngle,
|
|
81
|
-
data = _series$seriesId2.data,
|
|
82
|
-
cxParam = _series$seriesId2.cx,
|
|
83
|
-
cyParam = _series$seriesId2.cy,
|
|
84
|
-
highlightScope = _series$seriesId2.highlightScope;
|
|
85
|
-
var outerRadius = getPercentageValue(outerRadiusParam != null ? outerRadiusParam : availableRadius, availableRadius);
|
|
86
|
-
var innerRadius = getPercentageValue(innerRadiusParam != null ? innerRadiusParam : 0, availableRadius);
|
|
87
|
-
var arcLabelRadius = arcLabelRadiusParam === undefined ? (outerRadius + innerRadius) / 2 : getPercentageValue(arcLabelRadiusParam, availableRadius);
|
|
88
|
-
var cx = getPercentageValue(cxParam != null ? cxParam : '50%', width);
|
|
89
|
-
var cy = getPercentageValue(cyParam != null ? cyParam : '50%', height);
|
|
90
|
-
return /*#__PURE__*/_jsx("g", {
|
|
91
|
-
transform: "translate(".concat(left + cx, ", ").concat(top + cy, ")"),
|
|
92
|
-
children: /*#__PURE__*/_jsx(PieArcLabelPlot, {
|
|
93
|
-
innerRadius: innerRadius,
|
|
94
|
-
outerRadius: outerRadius != null ? outerRadius : availableRadius,
|
|
95
|
-
arcLabelRadius: arcLabelRadius,
|
|
96
|
-
cornerRadius: cornerRadius,
|
|
97
|
-
paddingAngle: paddingAngle,
|
|
98
|
-
id: seriesId,
|
|
99
|
-
data: data,
|
|
100
|
-
skipAnimation: skipAnimation,
|
|
101
|
-
arcLabel: arcLabel,
|
|
102
|
-
arcLabelMinAngle: arcLabelMinAngle,
|
|
103
|
-
highlightScope: highlightScope
|
|
104
|
-
})
|
|
105
|
-
}, seriesId);
|
|
106
|
-
})]
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
process.env.NODE_ENV !== "production" ? PiePlot.propTypes = {
|
|
110
|
-
// ----------------------------- Warning --------------------------------
|
|
111
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
112
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
113
|
-
// ----------------------------------------------------------------------
|
|
114
|
-
/**
|
|
115
|
-
* Callback fired when a pie item is clicked.
|
|
116
|
-
* @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
|
|
117
|
-
* @param {PieItemIdentifier} pieItemIdentifier The pie item identifier.
|
|
118
|
-
* @param {DefaultizedPieValueType} item The pie item.
|
|
119
|
-
*/
|
|
120
|
-
onItemClick: PropTypes.func,
|
|
121
|
-
/**
|
|
122
|
-
* If `true`, animations are skipped.
|
|
123
|
-
* @default false
|
|
124
|
-
*/
|
|
125
|
-
skipAnimation: PropTypes.bool,
|
|
126
|
-
/**
|
|
127
|
-
* The props used for each component slot.
|
|
128
|
-
* @default {}
|
|
129
|
-
*/
|
|
130
|
-
slotProps: PropTypes.object,
|
|
131
|
-
/**
|
|
132
|
-
* Overridable component slots.
|
|
133
|
-
* @default {}
|
|
134
|
-
*/
|
|
135
|
-
slots: PropTypes.object
|
|
136
|
-
} : void 0;
|
|
137
|
-
export { PiePlot };
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
export var defaultTransitionConfig = {
|
|
2
|
-
keys: function keys(item) {
|
|
3
|
-
return item.id;
|
|
4
|
-
},
|
|
5
|
-
from: function from(_ref) {
|
|
6
|
-
var innerRadius = _ref.innerRadius,
|
|
7
|
-
outerRadius = _ref.outerRadius,
|
|
8
|
-
cornerRadius = _ref.cornerRadius,
|
|
9
|
-
startAngle = _ref.startAngle,
|
|
10
|
-
endAngle = _ref.endAngle,
|
|
11
|
-
paddingAngle = _ref.paddingAngle,
|
|
12
|
-
color = _ref.color,
|
|
13
|
-
isFaded = _ref.isFaded;
|
|
14
|
-
return {
|
|
15
|
-
innerRadius: innerRadius,
|
|
16
|
-
outerRadius: (innerRadius + outerRadius) / 2,
|
|
17
|
-
cornerRadius: cornerRadius,
|
|
18
|
-
startAngle: (startAngle + endAngle) / 2,
|
|
19
|
-
endAngle: (startAngle + endAngle) / 2,
|
|
20
|
-
paddingAngle: paddingAngle,
|
|
21
|
-
fill: color,
|
|
22
|
-
opacity: isFaded ? 0.3 : 1
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
leave: function leave(_ref2) {
|
|
26
|
-
var innerRadius = _ref2.innerRadius,
|
|
27
|
-
startAngle = _ref2.startAngle,
|
|
28
|
-
endAngle = _ref2.endAngle;
|
|
29
|
-
return {
|
|
30
|
-
innerRadius: innerRadius,
|
|
31
|
-
outerRadius: innerRadius,
|
|
32
|
-
startAngle: (startAngle + endAngle) / 2,
|
|
33
|
-
endAngle: (startAngle + endAngle) / 2
|
|
34
|
-
};
|
|
35
|
-
},
|
|
36
|
-
enter: function enter(_ref3) {
|
|
37
|
-
var innerRadius = _ref3.innerRadius,
|
|
38
|
-
outerRadius = _ref3.outerRadius,
|
|
39
|
-
startAngle = _ref3.startAngle,
|
|
40
|
-
endAngle = _ref3.endAngle;
|
|
41
|
-
return {
|
|
42
|
-
innerRadius: innerRadius,
|
|
43
|
-
outerRadius: outerRadius,
|
|
44
|
-
startAngle: startAngle,
|
|
45
|
-
endAngle: endAngle
|
|
46
|
-
};
|
|
47
|
-
},
|
|
48
|
-
update: function update(_ref4) {
|
|
49
|
-
var innerRadius = _ref4.innerRadius,
|
|
50
|
-
outerRadius = _ref4.outerRadius,
|
|
51
|
-
cornerRadius = _ref4.cornerRadius,
|
|
52
|
-
startAngle = _ref4.startAngle,
|
|
53
|
-
endAngle = _ref4.endAngle,
|
|
54
|
-
paddingAngle = _ref4.paddingAngle,
|
|
55
|
-
color = _ref4.color,
|
|
56
|
-
isFaded = _ref4.isFaded;
|
|
57
|
-
return {
|
|
58
|
-
innerRadius: innerRadius,
|
|
59
|
-
outerRadius: outerRadius,
|
|
60
|
-
cornerRadius: cornerRadius,
|
|
61
|
-
startAngle: startAngle,
|
|
62
|
-
endAngle: endAngle,
|
|
63
|
-
paddingAngle: paddingAngle,
|
|
64
|
-
fill: color,
|
|
65
|
-
opacity: isFaded ? 0.3 : 1
|
|
66
|
-
};
|
|
67
|
-
},
|
|
68
|
-
config: {
|
|
69
|
-
tension: 120,
|
|
70
|
-
friction: 14,
|
|
71
|
-
clamp: true
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
export var defaultLabelTransitionConfig = {
|
|
75
|
-
keys: function keys(item) {
|
|
76
|
-
return item.id;
|
|
77
|
-
},
|
|
78
|
-
from: function from(_ref5) {
|
|
79
|
-
var innerRadius = _ref5.innerRadius,
|
|
80
|
-
outerRadius = _ref5.outerRadius,
|
|
81
|
-
arcLabelRadius = _ref5.arcLabelRadius,
|
|
82
|
-
cornerRadius = _ref5.cornerRadius,
|
|
83
|
-
startAngle = _ref5.startAngle,
|
|
84
|
-
endAngle = _ref5.endAngle,
|
|
85
|
-
paddingAngle = _ref5.paddingAngle;
|
|
86
|
-
return {
|
|
87
|
-
innerRadius: innerRadius,
|
|
88
|
-
outerRadius: (innerRadius + outerRadius) / 2,
|
|
89
|
-
cornerRadius: cornerRadius,
|
|
90
|
-
arcLabelRadius: arcLabelRadius,
|
|
91
|
-
startAngle: (startAngle + endAngle) / 2,
|
|
92
|
-
endAngle: (startAngle + endAngle) / 2,
|
|
93
|
-
paddingAngle: paddingAngle,
|
|
94
|
-
opacity: 0
|
|
95
|
-
};
|
|
96
|
-
},
|
|
97
|
-
leave: function leave(_ref6) {
|
|
98
|
-
var innerRadius = _ref6.innerRadius,
|
|
99
|
-
startAngle = _ref6.startAngle,
|
|
100
|
-
endAngle = _ref6.endAngle;
|
|
101
|
-
return {
|
|
102
|
-
innerRadius: innerRadius,
|
|
103
|
-
outerRadius: innerRadius,
|
|
104
|
-
arcLabelRadius: innerRadius,
|
|
105
|
-
startAngle: (startAngle + endAngle) / 2,
|
|
106
|
-
endAngle: (startAngle + endAngle) / 2,
|
|
107
|
-
opacity: 0
|
|
108
|
-
};
|
|
109
|
-
},
|
|
110
|
-
enter: function enter(_ref7) {
|
|
111
|
-
var innerRadius = _ref7.innerRadius,
|
|
112
|
-
outerRadius = _ref7.outerRadius,
|
|
113
|
-
startAngle = _ref7.startAngle,
|
|
114
|
-
endAngle = _ref7.endAngle,
|
|
115
|
-
arcLabelRadius = _ref7.arcLabelRadius;
|
|
116
|
-
return {
|
|
117
|
-
innerRadius: innerRadius,
|
|
118
|
-
outerRadius: outerRadius,
|
|
119
|
-
startAngle: startAngle,
|
|
120
|
-
endAngle: endAngle,
|
|
121
|
-
arcLabelRadius: arcLabelRadius,
|
|
122
|
-
opacity: 1
|
|
123
|
-
};
|
|
124
|
-
},
|
|
125
|
-
update: function update(_ref8) {
|
|
126
|
-
var innerRadius = _ref8.innerRadius,
|
|
127
|
-
outerRadius = _ref8.outerRadius,
|
|
128
|
-
cornerRadius = _ref8.cornerRadius,
|
|
129
|
-
startAngle = _ref8.startAngle,
|
|
130
|
-
endAngle = _ref8.endAngle,
|
|
131
|
-
paddingAngle = _ref8.paddingAngle,
|
|
132
|
-
arcLabelRadius = _ref8.arcLabelRadius;
|
|
133
|
-
return {
|
|
134
|
-
innerRadius: innerRadius,
|
|
135
|
-
outerRadius: outerRadius,
|
|
136
|
-
cornerRadius: cornerRadius,
|
|
137
|
-
startAngle: startAngle,
|
|
138
|
-
endAngle: endAngle,
|
|
139
|
-
paddingAngle: paddingAngle,
|
|
140
|
-
arcLabelRadius: arcLabelRadius,
|
|
141
|
-
opacity: 1
|
|
142
|
-
};
|
|
143
|
-
},
|
|
144
|
-
config: {
|
|
145
|
-
tension: 120,
|
|
146
|
-
friction: 14,
|
|
147
|
-
clamp: true
|
|
148
|
-
}
|
|
149
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { InteractionContext } from '../../context/InteractionProvider';
|
|
4
|
-
import { getIsHighlighted, getIsFaded } from '../../hooks/useInteractionItemProps';
|
|
5
|
-
export function useTransformData(series) {
|
|
6
|
-
var seriesId = series.id,
|
|
7
|
-
highlightScope = series.highlightScope,
|
|
8
|
-
data = series.data,
|
|
9
|
-
faded = series.faded,
|
|
10
|
-
highlighted = series.highlighted,
|
|
11
|
-
_series$paddingAngle = series.paddingAngle,
|
|
12
|
-
basePaddingAngle = _series$paddingAngle === void 0 ? 0 : _series$paddingAngle,
|
|
13
|
-
_series$innerRadius = series.innerRadius,
|
|
14
|
-
baseInnerRadius = _series$innerRadius === void 0 ? 0 : _series$innerRadius,
|
|
15
|
-
baseArcLabelRadius = series.arcLabelRadius,
|
|
16
|
-
baseOuterRadius = series.outerRadius,
|
|
17
|
-
_series$cornerRadius = series.cornerRadius,
|
|
18
|
-
baseCornerRadius = _series$cornerRadius === void 0 ? 0 : _series$cornerRadius;
|
|
19
|
-
var _React$useContext = React.useContext(InteractionContext),
|
|
20
|
-
highlightedItem = _React$useContext.item;
|
|
21
|
-
var getHighlightStatus = React.useCallback(function (dataIndex) {
|
|
22
|
-
var isHighlighted = getIsHighlighted(highlightedItem, {
|
|
23
|
-
type: 'pie',
|
|
24
|
-
seriesId: seriesId,
|
|
25
|
-
dataIndex: dataIndex
|
|
26
|
-
}, highlightScope);
|
|
27
|
-
var isFaded = !isHighlighted && getIsFaded(highlightedItem, {
|
|
28
|
-
type: 'pie',
|
|
29
|
-
seriesId: seriesId,
|
|
30
|
-
dataIndex: dataIndex
|
|
31
|
-
}, highlightScope);
|
|
32
|
-
return {
|
|
33
|
-
isHighlighted: isHighlighted,
|
|
34
|
-
isFaded: isFaded
|
|
35
|
-
};
|
|
36
|
-
}, [highlightScope, highlightedItem, seriesId]);
|
|
37
|
-
var dataWithHighlight = React.useMemo(function () {
|
|
38
|
-
return data.map(function (item, itemIndex) {
|
|
39
|
-
var _attributesOverride$p, _attributesOverride$i, _attributesOverride$o, _attributesOverride$c, _ref, _attributesOverride$a;
|
|
40
|
-
var _getHighlightStatus = getHighlightStatus(itemIndex),
|
|
41
|
-
isHighlighted = _getHighlightStatus.isHighlighted,
|
|
42
|
-
isFaded = _getHighlightStatus.isFaded;
|
|
43
|
-
var attributesOverride = _extends({
|
|
44
|
-
additionalRadius: 0
|
|
45
|
-
}, isFaded && faded || isHighlighted && highlighted || {});
|
|
46
|
-
var paddingAngle = Math.max(0, Math.PI * ((_attributesOverride$p = attributesOverride.paddingAngle) != null ? _attributesOverride$p : basePaddingAngle) / 180);
|
|
47
|
-
var innerRadius = Math.max(0, (_attributesOverride$i = attributesOverride.innerRadius) != null ? _attributesOverride$i : baseInnerRadius);
|
|
48
|
-
var outerRadius = Math.max(0, (_attributesOverride$o = attributesOverride.outerRadius) != null ? _attributesOverride$o : baseOuterRadius + attributesOverride.additionalRadius);
|
|
49
|
-
var cornerRadius = (_attributesOverride$c = attributesOverride.cornerRadius) != null ? _attributesOverride$c : baseCornerRadius;
|
|
50
|
-
var arcLabelRadius = (_ref = (_attributesOverride$a = attributesOverride.arcLabelRadius) != null ? _attributesOverride$a : baseArcLabelRadius) != null ? _ref : (innerRadius + outerRadius) / 2;
|
|
51
|
-
return _extends({}, item, attributesOverride, {
|
|
52
|
-
isFaded: isFaded,
|
|
53
|
-
isHighlighted: isHighlighted,
|
|
54
|
-
paddingAngle: paddingAngle,
|
|
55
|
-
innerRadius: innerRadius,
|
|
56
|
-
outerRadius: outerRadius,
|
|
57
|
-
cornerRadius: cornerRadius,
|
|
58
|
-
arcLabelRadius: arcLabelRadius
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
}, [baseCornerRadius, baseInnerRadius, baseOuterRadius, basePaddingAngle, baseArcLabelRadius, data, faded, getHighlightStatus, highlighted]);
|
|
62
|
-
return dataWithHighlight;
|
|
63
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { pie as d3Pie } from 'd3-shape';
|
|
3
|
-
var getSortingComparator = function getSortingComparator() {
|
|
4
|
-
var comparator = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'none';
|
|
5
|
-
if (typeof comparator === 'function') {
|
|
6
|
-
return comparator;
|
|
7
|
-
}
|
|
8
|
-
switch (comparator) {
|
|
9
|
-
case 'none':
|
|
10
|
-
return null;
|
|
11
|
-
case 'desc':
|
|
12
|
-
return function (a, b) {
|
|
13
|
-
return b - a;
|
|
14
|
-
};
|
|
15
|
-
case 'asc':
|
|
16
|
-
return function (a, b) {
|
|
17
|
-
return a - b;
|
|
18
|
-
};
|
|
19
|
-
default:
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
var formatter = function formatter(params) {
|
|
24
|
-
var seriesOrder = params.seriesOrder,
|
|
25
|
-
series = params.series;
|
|
26
|
-
var defaultizedSeries = {};
|
|
27
|
-
seriesOrder.forEach(function (seriesId) {
|
|
28
|
-
var _series$seriesId$star, _series$seriesId$endA, _series$seriesId$padd, _series$seriesId$sort;
|
|
29
|
-
var arcs = d3Pie().startAngle(2 * Math.PI * ((_series$seriesId$star = series[seriesId].startAngle) != null ? _series$seriesId$star : 0) / 360).endAngle(2 * Math.PI * ((_series$seriesId$endA = series[seriesId].endAngle) != null ? _series$seriesId$endA : 360) / 360).padAngle(2 * Math.PI * ((_series$seriesId$padd = series[seriesId].paddingAngle) != null ? _series$seriesId$padd : 0) / 360).sortValues(getSortingComparator((_series$seriesId$sort = series[seriesId].sortingValues) != null ? _series$seriesId$sort : 'none'))(series[seriesId].data.map(function (piePoint) {
|
|
30
|
-
return piePoint.value;
|
|
31
|
-
}));
|
|
32
|
-
defaultizedSeries[seriesId] = _extends({
|
|
33
|
-
valueFormatter: function valueFormatter(item) {
|
|
34
|
-
return item.value.toLocaleString();
|
|
35
|
-
}
|
|
36
|
-
}, series[seriesId], {
|
|
37
|
-
data: series[seriesId].data.map(function (item, index) {
|
|
38
|
-
var _item$id;
|
|
39
|
-
return _extends({}, item, {
|
|
40
|
-
id: (_item$id = item.id) != null ? _item$id : "auto-generated-pie-id-".concat(seriesId, "-").concat(index)
|
|
41
|
-
}, arcs[index]);
|
|
42
|
-
}).map(function (item) {
|
|
43
|
-
var _series$seriesId$valu, _series$seriesId$valu2, _series$seriesId;
|
|
44
|
-
return _extends({}, item, {
|
|
45
|
-
formattedValue: (_series$seriesId$valu = (_series$seriesId$valu2 = (_series$seriesId = series[seriesId]).valueFormatter) == null ? void 0 : _series$seriesId$valu2.call(_series$seriesId, item)) != null ? _series$seriesId$valu : item.value.toLocaleString()
|
|
46
|
-
});
|
|
47
|
-
})
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
return {
|
|
51
|
-
seriesOrder: seriesOrder,
|
|
52
|
-
series: defaultizedSeries
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
export default formatter;
|
package/legacy/PieChart/index.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
var legendGetter = function legendGetter(params) {
|
|
2
|
-
var seriesOrder = params.seriesOrder,
|
|
3
|
-
series = params.series;
|
|
4
|
-
return seriesOrder.flatMap(function (seriesId) {
|
|
5
|
-
return series[seriesId].data.map(function (item) {
|
|
6
|
-
return {
|
|
7
|
-
color: item.color,
|
|
8
|
-
label: item.label,
|
|
9
|
-
id: item.id
|
|
10
|
-
};
|
|
11
|
-
}).filter(function (item) {
|
|
12
|
-
return item.label !== undefined;
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
export default legendGetter;
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["width", "height"];
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
import { styled } from '@mui/material/styles';
|
|
8
|
-
import { ChartContainer } from '../ChartContainer';
|
|
9
|
-
import { useChartContainerDimensions } from './useChartContainerDimensions';
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
var ResizableContainer = styled('div', {
|
|
12
|
-
name: 'MuiResponsiveChart',
|
|
13
|
-
slot: 'Container'
|
|
14
|
-
})(function (_ref) {
|
|
15
|
-
var _ownerState$width, _ownerState$height;
|
|
16
|
-
var ownerState = _ref.ownerState;
|
|
17
|
-
return {
|
|
18
|
-
width: (_ownerState$width = ownerState.width) != null ? _ownerState$width : '100%',
|
|
19
|
-
height: (_ownerState$height = ownerState.height) != null ? _ownerState$height : '100%',
|
|
20
|
-
display: 'flex',
|
|
21
|
-
position: 'relative',
|
|
22
|
-
flexGrow: 1,
|
|
23
|
-
flexDirection: 'column',
|
|
24
|
-
alignItems: 'center',
|
|
25
|
-
justifyContent: 'center',
|
|
26
|
-
overflow: 'hidden',
|
|
27
|
-
'&>svg': {
|
|
28
|
-
width: '100%',
|
|
29
|
-
height: '100%'
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
});
|
|
33
|
-
var ResponsiveChartContainer = /*#__PURE__*/React.forwardRef(function ResponsiveChartContainer(props, ref) {
|
|
34
|
-
var inWidth = props.width,
|
|
35
|
-
inHeight = props.height,
|
|
36
|
-
other = _objectWithoutProperties(props, _excluded);
|
|
37
|
-
var _useChartContainerDim = useChartContainerDimensions(inWidth, inHeight),
|
|
38
|
-
_useChartContainerDim2 = _slicedToArray(_useChartContainerDim, 3),
|
|
39
|
-
containerRef = _useChartContainerDim2[0],
|
|
40
|
-
width = _useChartContainerDim2[1],
|
|
41
|
-
height = _useChartContainerDim2[2];
|
|
42
|
-
return /*#__PURE__*/_jsx(ResizableContainer, {
|
|
43
|
-
ref: containerRef,
|
|
44
|
-
ownerState: {
|
|
45
|
-
width: inWidth,
|
|
46
|
-
height: inHeight
|
|
47
|
-
},
|
|
48
|
-
children: width && height ? /*#__PURE__*/_jsx(ChartContainer, _extends({}, other, {
|
|
49
|
-
width: width,
|
|
50
|
-
height: height,
|
|
51
|
-
ref: ref
|
|
52
|
-
})) : null
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
process.env.NODE_ENV !== "production" ? ResponsiveChartContainer.propTypes = {
|
|
56
|
-
// ----------------------------- Warning --------------------------------
|
|
57
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
58
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
59
|
-
// ----------------------------------------------------------------------
|
|
60
|
-
children: PropTypes.node,
|
|
61
|
-
className: PropTypes.string,
|
|
62
|
-
/**
|
|
63
|
-
* Color palette used to colorize multiple series.
|
|
64
|
-
* @default blueberryTwilightPalette
|
|
65
|
-
*/
|
|
66
|
-
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
67
|
-
/**
|
|
68
|
-
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
69
|
-
*/
|
|
70
|
-
dataset: PropTypes.arrayOf(PropTypes.object),
|
|
71
|
-
desc: PropTypes.string,
|
|
72
|
-
/**
|
|
73
|
-
* If `true`, the charts will not listen to the mouse move event.
|
|
74
|
-
* It might break interactive features, but will improve performance.
|
|
75
|
-
* @default false
|
|
76
|
-
*/
|
|
77
|
-
disableAxisListener: PropTypes.bool,
|
|
78
|
-
/**
|
|
79
|
-
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
80
|
-
* @default undefined
|
|
81
|
-
*/
|
|
82
|
-
height: PropTypes.number,
|
|
83
|
-
/**
|
|
84
|
-
* The margin between the SVG and the drawing area.
|
|
85
|
-
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
86
|
-
* Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
87
|
-
* @default object Depends on the charts type.
|
|
88
|
-
*/
|
|
89
|
-
margin: PropTypes.shape({
|
|
90
|
-
bottom: PropTypes.number,
|
|
91
|
-
left: PropTypes.number,
|
|
92
|
-
right: PropTypes.number,
|
|
93
|
-
top: PropTypes.number
|
|
94
|
-
}),
|
|
95
|
-
/**
|
|
96
|
-
* The array of series to display.
|
|
97
|
-
* Each type of series has its own specificity.
|
|
98
|
-
* Please refer to the appropriate docs page to learn more about it.
|
|
99
|
-
*/
|
|
100
|
-
series: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
101
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
102
|
-
title: PropTypes.string,
|
|
103
|
-
viewBox: PropTypes.shape({
|
|
104
|
-
height: PropTypes.number,
|
|
105
|
-
width: PropTypes.number,
|
|
106
|
-
x: PropTypes.number,
|
|
107
|
-
y: PropTypes.number
|
|
108
|
-
}),
|
|
109
|
-
/**
|
|
110
|
-
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
111
|
-
* @default undefined
|
|
112
|
-
*/
|
|
113
|
-
width: PropTypes.number,
|
|
114
|
-
/**
|
|
115
|
-
* The configuration of the x-axes.
|
|
116
|
-
* If not provided, a default axis config is used with id set to `DEFAULT_X_AXIS_KEY`.
|
|
117
|
-
*/
|
|
118
|
-
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
119
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
120
|
-
classes: PropTypes.object,
|
|
121
|
-
data: PropTypes.array,
|
|
122
|
-
dataKey: PropTypes.string,
|
|
123
|
-
disableLine: PropTypes.bool,
|
|
124
|
-
disableTicks: PropTypes.bool,
|
|
125
|
-
fill: PropTypes.string,
|
|
126
|
-
hideTooltip: PropTypes.bool,
|
|
127
|
-
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
128
|
-
label: PropTypes.string,
|
|
129
|
-
labelFontSize: PropTypes.number,
|
|
130
|
-
labelStyle: PropTypes.object,
|
|
131
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
132
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
133
|
-
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
134
|
-
reverse: PropTypes.bool,
|
|
135
|
-
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
136
|
-
slotProps: PropTypes.object,
|
|
137
|
-
slots: PropTypes.object,
|
|
138
|
-
stroke: PropTypes.string,
|
|
139
|
-
tickFontSize: PropTypes.number,
|
|
140
|
-
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
141
|
-
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
142
|
-
tickLabelStyle: PropTypes.object,
|
|
143
|
-
tickMaxStep: PropTypes.number,
|
|
144
|
-
tickMinStep: PropTypes.number,
|
|
145
|
-
tickNumber: PropTypes.number,
|
|
146
|
-
tickSize: PropTypes.number,
|
|
147
|
-
valueFormatter: PropTypes.func
|
|
148
|
-
})),
|
|
149
|
-
/**
|
|
150
|
-
* The configuration of the y-axes.
|
|
151
|
-
* If not provided, a default axis config is used with id set to `DEFAULT_Y_AXIS_KEY`.
|
|
152
|
-
*/
|
|
153
|
-
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
154
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
155
|
-
classes: PropTypes.object,
|
|
156
|
-
data: PropTypes.array,
|
|
157
|
-
dataKey: PropTypes.string,
|
|
158
|
-
disableLine: PropTypes.bool,
|
|
159
|
-
disableTicks: PropTypes.bool,
|
|
160
|
-
fill: PropTypes.string,
|
|
161
|
-
hideTooltip: PropTypes.bool,
|
|
162
|
-
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
163
|
-
label: PropTypes.string,
|
|
164
|
-
labelFontSize: PropTypes.number,
|
|
165
|
-
labelStyle: PropTypes.object,
|
|
166
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
167
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
168
|
-
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
169
|
-
reverse: PropTypes.bool,
|
|
170
|
-
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
171
|
-
slotProps: PropTypes.object,
|
|
172
|
-
slots: PropTypes.object,
|
|
173
|
-
stroke: PropTypes.string,
|
|
174
|
-
tickFontSize: PropTypes.number,
|
|
175
|
-
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
176
|
-
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
177
|
-
tickLabelStyle: PropTypes.object,
|
|
178
|
-
tickMaxStep: PropTypes.number,
|
|
179
|
-
tickMinStep: PropTypes.number,
|
|
180
|
-
tickNumber: PropTypes.number,
|
|
181
|
-
tickSize: PropTypes.number,
|
|
182
|
-
valueFormatter: PropTypes.func
|
|
183
|
-
}))
|
|
184
|
-
} : void 0;
|
|
185
|
-
export { ResponsiveChartContainer };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ResponsiveChartContainer';
|