@mui/x-charts 7.3.0 → 7.3.2
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.d.ts +5 -3
- package/BarChart/BarChart.js +23 -102
- package/BarChart/BarElement.d.ts +63 -62
- package/BarChart/BarElement.js +1 -2
- package/BarChart/BarPlot.js +9 -9
- package/CHANGELOG.md +155 -7
- package/ChartContainer/ChartContainer.js +3 -1
- package/ChartsAxis/ChartsAxis.js +7 -99
- package/ChartsAxis/axisClasses.d.ts +1 -1
- package/ChartsAxisHighlight/ChartsAxisHighlight.js +1 -1
- package/ChartsClipPath/ChartsClipPath.js +1 -1
- package/ChartsGrid/ChartsGrid.js +1 -1
- package/ChartsLegend/ChartsLegend.js +1 -1
- package/ChartsLegend/DefaultChartsLegend.js +1 -1
- package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
- package/ChartsOverlay/ChartsLoadingOverlay.d.ts +3 -0
- package/ChartsOverlay/ChartsLoadingOverlay.js +43 -0
- package/ChartsOverlay/ChartsNoDataOverlay.d.ts +3 -0
- package/ChartsOverlay/ChartsNoDataOverlay.js +43 -0
- package/ChartsOverlay/ChartsOverlay.d.ts +35 -0
- package/ChartsOverlay/ChartsOverlay.js +41 -0
- package/ChartsOverlay/index.d.ts +3 -0
- package/ChartsOverlay/index.js +26 -0
- package/ChartsOverlay/package.json +6 -0
- package/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
- package/ChartsReferenceLine/ChartsXReferenceLine.js +1 -1
- package/ChartsReferenceLine/ChartsYReferenceLine.js +1 -1
- package/ChartsReferenceLine/common.d.ts +1 -1
- package/ChartsSurface.js +1 -1
- package/ChartsText/ChartsText.js +1 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.d.ts +1 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.js +18 -5
- package/ChartsTooltip/ChartsItemTooltipContent.js +20 -4
- package/ChartsTooltip/ChartsTooltip.d.ts +2 -2
- package/ChartsTooltip/ChartsTooltip.js +3 -3
- package/ChartsTooltip/ChartsTooltipTable.d.ts +3 -7
- package/ChartsTooltip/ChartsTooltipTable.js +8 -9
- package/ChartsTooltip/DefaultChartsAxisTooltipContent.js +3 -6
- package/ChartsTooltip/DefaultChartsItemTooltipContent.js +2 -4
- package/ChartsTooltip/utils.js +1 -1
- package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +1 -1
- package/ChartsXAxis/ChartsXAxis.d.ts +1 -1
- package/ChartsXAxis/ChartsXAxis.js +8 -1
- package/ChartsYAxis/ChartsYAxis.d.ts +1 -1
- package/ChartsYAxis/ChartsYAxis.js +8 -1
- package/Gauge/Gauge.js +2 -2
- package/Gauge/GaugeContainer.js +2 -2
- package/Gauge/GaugeProvider.d.ts +2 -2
- package/Gauge/GaugeProvider.js +2 -2
- package/Gauge/GaugeReferenceArc.js +1 -1
- package/Gauge/GaugeValueArc.js +1 -1
- package/Gauge/GaugeValueText.js +1 -1
- package/Gauge/gaugeClasses.d.ts +2 -2
- package/Gauge/utils.d.ts +1 -1
- package/Gauge/utils.js +4 -4
- package/LineChart/AnimatedArea.d.ts +63 -62
- package/LineChart/AnimatedArea.js +1 -1
- package/LineChart/AnimatedLine.d.ts +63 -62
- package/LineChart/AnimatedLine.js +1 -1
- package/LineChart/AreaElement.d.ts +1 -1
- package/LineChart/AreaElement.js +1 -1
- package/LineChart/AreaPlot.js +1 -1
- package/LineChart/LineChart.d.ts +5 -3
- package/LineChart/LineChart.js +20 -99
- package/LineChart/LineElement.d.ts +1 -1
- package/LineChart/LineElement.js +1 -1
- package/LineChart/LineHighlightElement.js +1 -1
- package/LineChart/LineHighlightPlot.js +1 -1
- package/LineChart/LinePlot.js +1 -1
- package/LineChart/MarkElement.d.ts +1 -1
- package/LineChart/MarkElement.js +1 -1
- package/LineChart/MarkPlot.js +1 -1
- package/PieChart/PieArc.d.ts +2 -1
- package/PieChart/PieArc.js +1 -1
- package/PieChart/PieArcLabel.d.ts +2 -1
- package/PieChart/PieArcLabel.js +2 -2
- package/PieChart/PieArcLabelPlot.d.ts +1 -1
- package/PieChart/PieArcLabelPlot.js +4 -4
- package/PieChart/PieArcPlot.d.ts +1 -1
- package/PieChart/PieArcPlot.js +4 -4
- package/PieChart/PieChart.d.ts +5 -3
- package/PieChart/PieChart.js +23 -99
- package/PieChart/PiePlot.js +1 -1
- package/PieChart/dataTransform/transition.d.ts +1 -0
- package/PieChart/dataTransform/useTransformData.js +1 -1
- package/ResponsiveChartContainer/ResponsiveChartContainer.js +3 -1
- package/ResponsiveChartContainer/useChartContainerDimensions.js +1 -1
- package/ScatterChart/Scatter.js +1 -1
- package/ScatterChart/ScatterChart.d.ts +6 -3
- package/ScatterChart/ScatterChart.js +74 -125
- package/ScatterChart/ScatterPlot.js +9 -2
- package/ScatterChart/getColor.d.ts +2 -1
- package/ScatterChart/getColor.js +18 -1
- package/SparkLineChart/SparkLineChart.js +1 -1
- package/context/CartesianContextProvider.d.ts +2 -1
- package/context/CartesianContextProvider.js +1 -1
- package/context/DrawingProvider.js +1 -1
- package/context/HighlightProvider.js +1 -1
- package/context/InteractionProvider.js +1 -1
- package/context/SeriesContextProvider.js +2 -2
- package/context/ZAxisContextProvider.d.ts +33 -0
- package/context/ZAxisContextProvider.js +98 -0
- package/context/index.d.ts +2 -0
- package/context/index.js +8 -1
- package/esm/BarChart/BarChart.js +23 -103
- package/esm/BarChart/BarElement.js +0 -1
- package/esm/BarChart/BarPlot.js +8 -8
- package/esm/ChartContainer/ChartContainer.js +3 -2
- package/esm/ChartsAxis/ChartsAxis.js +7 -100
- package/esm/ChartsAxisHighlight/ChartsAxisHighlight.js +1 -2
- package/esm/ChartsGrid/ChartsGrid.js +1 -2
- package/esm/ChartsLegend/DefaultChartsLegend.js +1 -2
- package/esm/ChartsOverlay/ChartsLoadingOverlay.js +34 -0
- package/esm/ChartsOverlay/ChartsNoDataOverlay.js +34 -0
- package/esm/ChartsOverlay/ChartsOverlay.js +31 -0
- package/esm/ChartsOverlay/index.js +3 -0
- package/esm/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
- package/esm/ChartsReferenceLine/ChartsXReferenceLine.js +1 -2
- package/esm/ChartsReferenceLine/ChartsYReferenceLine.js +1 -2
- package/esm/ChartsSurface.js +1 -2
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +17 -4
- package/esm/ChartsTooltip/ChartsItemTooltipContent.js +19 -3
- package/esm/ChartsTooltip/ChartsTooltip.js +2 -2
- package/esm/ChartsTooltip/ChartsTooltipTable.js +8 -8
- package/esm/ChartsTooltip/DefaultChartsAxisTooltipContent.js +3 -7
- package/esm/ChartsTooltip/DefaultChartsItemTooltipContent.js +2 -5
- package/esm/ChartsXAxis/ChartsXAxis.js +8 -2
- package/esm/ChartsYAxis/ChartsYAxis.js +8 -2
- package/esm/Gauge/Gauge.js +2 -3
- package/esm/Gauge/GaugeContainer.js +1 -1
- package/esm/Gauge/GaugeProvider.js +1 -1
- package/esm/Gauge/utils.js +4 -4
- package/esm/LineChart/AnimatedArea.js +1 -2
- package/esm/LineChart/AnimatedLine.js +1 -2
- package/esm/LineChart/LineChart.js +20 -100
- package/esm/PieChart/PieArcLabel.js +1 -1
- package/esm/PieChart/PieArcLabelPlot.js +3 -3
- package/esm/PieChart/PieArcPlot.js +3 -3
- package/esm/PieChart/PieChart.js +23 -100
- package/esm/PieChart/PiePlot.js +1 -2
- package/esm/ResponsiveChartContainer/ResponsiveChartContainer.js +2 -0
- package/esm/ScatterChart/ScatterChart.js +74 -126
- package/esm/ScatterChart/ScatterPlot.js +8 -1
- package/esm/ScatterChart/getColor.js +18 -1
- package/esm/SparkLineChart/SparkLineChart.js +1 -2
- package/esm/context/SeriesContextProvider.js +1 -1
- package/esm/context/ZAxisContextProvider.js +89 -0
- package/esm/context/index.js +1 -1
- package/esm/hooks/useReducedMotion.js +1 -1
- package/esm/hooks/useScale.js +1 -1
- package/esm/hooks/useTicks.js +4 -0
- package/esm/internals/colorGetter.js +2 -2
- package/esm/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +6 -7
- package/esm/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +3 -3
- package/esm/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.js +4 -5
- package/esm/internals/utils.js +1 -1
- package/esm/models/z-axis.js +1 -0
- package/hooks/useAxisEvents.js +1 -1
- package/hooks/useChartDimensions.js +1 -1
- package/hooks/useChartId.js +1 -1
- package/hooks/useDrawingArea.js +1 -1
- package/hooks/useInteractionItemProps.js +1 -1
- package/hooks/useMounted.js +1 -1
- package/hooks/useReducedMotion.d.ts +1 -1
- package/hooks/useReducedMotion.js +1 -1
- package/hooks/useScale.d.ts +4 -4
- package/hooks/useScale.js +2 -2
- package/hooks/useSeries.js +1 -1
- package/hooks/useSvgRef.js +1 -1
- package/hooks/useTicks.js +5 -1
- package/index.js +1 -1
- package/internals/colorGetter.d.ts +3 -1
- package/internals/colorGetter.js +2 -2
- package/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +6 -6
- package/internals/components/ChartsAxesGradients/ChartsContinuousGradient.d.ts +1 -1
- package/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +4 -4
- package/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.d.ts +1 -1
- package/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.js +4 -4
- package/internals/defaultizeColor.d.ts +1 -0
- package/internals/useAnimatedPath.d.ts +1 -0
- package/internals/useAnimatedPath.js +1 -1
- package/internals/utils.d.ts +1 -1
- package/internals/utils.js +1 -1
- package/models/axis.d.ts +1 -1
- package/models/colorMapping.d.ts +3 -2
- package/models/seriesType/bar.d.ts +1 -1
- package/models/seriesType/line.d.ts +1 -1
- package/models/seriesType/pie.d.ts +9 -4
- package/models/seriesType/scatter.d.ts +5 -0
- package/models/z-axis.d.ts +14 -0
- package/models/z-axis.js +5 -0
- package/modern/BarChart/BarChart.js +23 -103
- package/modern/BarChart/BarElement.js +0 -1
- package/modern/BarChart/BarPlot.js +8 -8
- package/modern/ChartContainer/ChartContainer.js +3 -2
- package/modern/ChartsAxis/ChartsAxis.js +7 -100
- package/modern/ChartsAxisHighlight/ChartsAxisHighlight.js +1 -2
- package/modern/ChartsGrid/ChartsGrid.js +1 -2
- package/modern/ChartsLegend/DefaultChartsLegend.js +1 -2
- package/modern/ChartsOverlay/ChartsLoadingOverlay.js +34 -0
- package/modern/ChartsOverlay/ChartsNoDataOverlay.js +34 -0
- package/modern/ChartsOverlay/ChartsOverlay.js +31 -0
- package/modern/ChartsOverlay/index.js +3 -0
- package/modern/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
- package/modern/ChartsReferenceLine/ChartsXReferenceLine.js +1 -2
- package/modern/ChartsReferenceLine/ChartsYReferenceLine.js +1 -2
- package/modern/ChartsSurface.js +1 -2
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +17 -4
- package/modern/ChartsTooltip/ChartsItemTooltipContent.js +19 -3
- package/modern/ChartsTooltip/ChartsTooltip.js +2 -2
- package/modern/ChartsTooltip/ChartsTooltipTable.js +8 -8
- package/modern/ChartsTooltip/DefaultChartsAxisTooltipContent.js +3 -7
- package/modern/ChartsTooltip/DefaultChartsItemTooltipContent.js +2 -5
- package/modern/ChartsXAxis/ChartsXAxis.js +8 -2
- package/modern/ChartsYAxis/ChartsYAxis.js +8 -2
- package/modern/Gauge/Gauge.js +2 -3
- package/modern/Gauge/GaugeContainer.js +1 -1
- package/modern/Gauge/GaugeProvider.js +1 -1
- package/modern/Gauge/utils.js +4 -4
- package/modern/LineChart/AnimatedArea.js +1 -2
- package/modern/LineChart/AnimatedLine.js +1 -2
- package/modern/LineChart/LineChart.js +20 -100
- package/modern/PieChart/PieArcLabel.js +1 -1
- package/modern/PieChart/PieArcLabelPlot.js +3 -3
- package/modern/PieChart/PieArcPlot.js +3 -3
- package/modern/PieChart/PieChart.js +23 -100
- package/modern/PieChart/PiePlot.js +1 -2
- package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +2 -0
- package/modern/ScatterChart/ScatterChart.js +74 -126
- package/modern/ScatterChart/ScatterPlot.js +8 -1
- package/modern/ScatterChart/getColor.js +18 -1
- package/modern/SparkLineChart/SparkLineChart.js +1 -2
- package/modern/context/SeriesContextProvider.js +1 -1
- package/modern/context/ZAxisContextProvider.js +89 -0
- package/modern/context/index.js +1 -1
- package/modern/hooks/useReducedMotion.js +1 -1
- package/modern/hooks/useScale.js +1 -1
- package/modern/hooks/useTicks.js +4 -0
- package/modern/index.js +1 -1
- package/modern/internals/colorGetter.js +2 -2
- package/modern/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +6 -7
- package/modern/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +3 -3
- package/modern/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.js +4 -5
- package/modern/internals/utils.js +1 -1
- package/modern/models/z-axis.js +1 -0
- package/package.json +3 -5
package/LineChart/LineChart.d.ts
CHANGED
|
@@ -13,13 +13,15 @@ import { ChartsAxisSlotProps, ChartsAxisSlots } from '../models/axis';
|
|
|
13
13
|
import { LineHighlightPlotSlots, LineHighlightPlotSlotProps } from './LineHighlightPlot';
|
|
14
14
|
import { ChartsGridProps } from '../ChartsGrid';
|
|
15
15
|
import { ChartsOnAxisClickHandlerProps } from '../ChartsOnAxisClickHandler';
|
|
16
|
-
|
|
16
|
+
import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from '../ChartsOverlay/ChartsOverlay';
|
|
17
|
+
export interface LineChartSlots extends ChartsAxisSlots, AreaPlotSlots, LinePlotSlots, MarkPlotSlots, LineHighlightPlotSlots, ChartsLegendSlots, ChartsTooltipSlots, ChartsOverlaySlots {
|
|
17
18
|
}
|
|
18
|
-
export interface LineChartSlotProps extends ChartsAxisSlotProps, AreaPlotSlotProps, LinePlotSlotProps, MarkPlotSlotProps, LineHighlightPlotSlotProps, ChartsLegendSlotProps, ChartsTooltipSlotProps {
|
|
19
|
+
export interface LineChartSlotProps extends ChartsAxisSlotProps, AreaPlotSlotProps, LinePlotSlotProps, MarkPlotSlotProps, LineHighlightPlotSlotProps, ChartsLegendSlotProps, ChartsTooltipSlotProps, ChartsOverlaySlotProps {
|
|
19
20
|
}
|
|
20
|
-
export interface LineChartProps extends Omit<ResponsiveChartContainerProps, 'series'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, ChartsOnAxisClickHandlerProps {
|
|
21
|
+
export interface LineChartProps extends Omit<ResponsiveChartContainerProps, 'series'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'>, ChartsOnAxisClickHandlerProps {
|
|
21
22
|
/**
|
|
22
23
|
* The series to display in the line chart.
|
|
24
|
+
* An array of [[LineSeriesType]] objects.
|
|
23
25
|
*/
|
|
24
26
|
series: MakeOptional<LineSeriesType, 'type'>[];
|
|
25
27
|
/**
|
package/LineChart/LineChart.js
CHANGED
|
@@ -22,9 +22,10 @@ var _ChartsClipPath = require("../ChartsClipPath");
|
|
|
22
22
|
var _LineHighlightPlot = require("./LineHighlightPlot");
|
|
23
23
|
var _ChartsGrid = require("../ChartsGrid");
|
|
24
24
|
var _ChartsOnAxisClickHandler = require("../ChartsOnAxisClickHandler");
|
|
25
|
+
var _ChartsOverlay = require("../ChartsOverlay/ChartsOverlay");
|
|
25
26
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
26
27
|
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); }
|
|
27
|
-
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 &&
|
|
28
|
+
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; }
|
|
28
29
|
/**
|
|
29
30
|
* Demos:
|
|
30
31
|
*
|
|
@@ -64,7 +65,8 @@ const LineChart = exports.LineChart = /*#__PURE__*/React.forwardRef(function Lin
|
|
|
64
65
|
children,
|
|
65
66
|
slots,
|
|
66
67
|
slotProps,
|
|
67
|
-
skipAnimation
|
|
68
|
+
skipAnimation,
|
|
69
|
+
loading
|
|
68
70
|
} = props;
|
|
69
71
|
const id = (0, _useId.default)();
|
|
70
72
|
const clipPathId = `${id}-clip-path`;
|
|
@@ -106,6 +108,10 @@ const LineChart = exports.LineChart = /*#__PURE__*/React.forwardRef(function Lin
|
|
|
106
108
|
slotProps: slotProps,
|
|
107
109
|
onItemClick: onLineClick,
|
|
108
110
|
skipAnimation: skipAnimation
|
|
111
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, {
|
|
112
|
+
loading: loading,
|
|
113
|
+
slots: slots,
|
|
114
|
+
slotProps: slotProps
|
|
109
115
|
})]
|
|
110
116
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, {
|
|
111
117
|
topAxis: topAxis,
|
|
@@ -125,7 +131,7 @@ const LineChart = exports.LineChart = /*#__PURE__*/React.forwardRef(function Lin
|
|
|
125
131
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legend, {
|
|
126
132
|
slots: slots,
|
|
127
133
|
slotProps: slotProps
|
|
128
|
-
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltip, (0, _extends2.default)({}, tooltip, {
|
|
134
|
+
})), !loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltip, (0, _extends2.default)({}, tooltip, {
|
|
129
135
|
slots: slots,
|
|
130
136
|
slotProps: slotProps
|
|
131
137
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, {
|
|
@@ -152,30 +158,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
152
158
|
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
153
159
|
* @default xAxisIds[0] The id of the first provided axis
|
|
154
160
|
*/
|
|
155
|
-
bottomAxis: _propTypes.default.oneOfType([_propTypes.default.
|
|
156
|
-
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
157
|
-
classes: _propTypes.default.object,
|
|
158
|
-
disableLine: _propTypes.default.bool,
|
|
159
|
-
disableTicks: _propTypes.default.bool,
|
|
160
|
-
fill: _propTypes.default.string,
|
|
161
|
-
label: _propTypes.default.string,
|
|
162
|
-
labelFontSize: _propTypes.default.number,
|
|
163
|
-
labelStyle: _propTypes.default.object,
|
|
164
|
-
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
165
|
-
slotProps: _propTypes.default.object,
|
|
166
|
-
slots: _propTypes.default.object,
|
|
167
|
-
stroke: _propTypes.default.string,
|
|
168
|
-
tickFontSize: _propTypes.default.number,
|
|
169
|
-
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
170
|
-
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
171
|
-
tickLabelPlacement: _propTypes.default.oneOf(['middle', 'tick']),
|
|
172
|
-
tickLabelStyle: _propTypes.default.object,
|
|
173
|
-
tickMaxStep: _propTypes.default.number,
|
|
174
|
-
tickMinStep: _propTypes.default.number,
|
|
175
|
-
tickNumber: _propTypes.default.number,
|
|
176
|
-
tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
177
|
-
tickSize: _propTypes.default.number
|
|
178
|
-
}), _propTypes.default.string]),
|
|
161
|
+
bottomAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
179
162
|
children: _propTypes.default.node,
|
|
180
163
|
className: _propTypes.default.string,
|
|
181
164
|
/**
|
|
@@ -214,30 +197,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
214
197
|
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
215
198
|
* @default yAxisIds[0] The id of the first provided axis
|
|
216
199
|
*/
|
|
217
|
-
leftAxis: _propTypes.default.oneOfType([_propTypes.default.
|
|
218
|
-
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
219
|
-
classes: _propTypes.default.object,
|
|
220
|
-
disableLine: _propTypes.default.bool,
|
|
221
|
-
disableTicks: _propTypes.default.bool,
|
|
222
|
-
fill: _propTypes.default.string,
|
|
223
|
-
label: _propTypes.default.string,
|
|
224
|
-
labelFontSize: _propTypes.default.number,
|
|
225
|
-
labelStyle: _propTypes.default.object,
|
|
226
|
-
position: _propTypes.default.oneOf(['left', 'right']),
|
|
227
|
-
slotProps: _propTypes.default.object,
|
|
228
|
-
slots: _propTypes.default.object,
|
|
229
|
-
stroke: _propTypes.default.string,
|
|
230
|
-
tickFontSize: _propTypes.default.number,
|
|
231
|
-
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
232
|
-
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
233
|
-
tickLabelPlacement: _propTypes.default.oneOf(['middle', 'tick']),
|
|
234
|
-
tickLabelStyle: _propTypes.default.object,
|
|
235
|
-
tickMaxStep: _propTypes.default.number,
|
|
236
|
-
tickMinStep: _propTypes.default.number,
|
|
237
|
-
tickNumber: _propTypes.default.number,
|
|
238
|
-
tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
239
|
-
tickSize: _propTypes.default.number
|
|
240
|
-
}), _propTypes.default.string]),
|
|
200
|
+
leftAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
241
201
|
/**
|
|
242
202
|
* @deprecated Consider using `slotProps.legend` instead.
|
|
243
203
|
*/
|
|
@@ -252,6 +212,10 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
252
212
|
slotProps: _propTypes.default.object,
|
|
253
213
|
slots: _propTypes.default.object
|
|
254
214
|
}),
|
|
215
|
+
/**
|
|
216
|
+
* If `true`, a loading overlay is displayed.
|
|
217
|
+
*/
|
|
218
|
+
loading: _propTypes.default.bool,
|
|
255
219
|
/**
|
|
256
220
|
* The margin between the SVG and the drawing area.
|
|
257
221
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
@@ -288,32 +252,10 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
288
252
|
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
289
253
|
* @default null
|
|
290
254
|
*/
|
|
291
|
-
rightAxis: _propTypes.default.oneOfType([_propTypes.default.
|
|
292
|
-
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
293
|
-
classes: _propTypes.default.object,
|
|
294
|
-
disableLine: _propTypes.default.bool,
|
|
295
|
-
disableTicks: _propTypes.default.bool,
|
|
296
|
-
fill: _propTypes.default.string,
|
|
297
|
-
label: _propTypes.default.string,
|
|
298
|
-
labelFontSize: _propTypes.default.number,
|
|
299
|
-
labelStyle: _propTypes.default.object,
|
|
300
|
-
position: _propTypes.default.oneOf(['left', 'right']),
|
|
301
|
-
slotProps: _propTypes.default.object,
|
|
302
|
-
slots: _propTypes.default.object,
|
|
303
|
-
stroke: _propTypes.default.string,
|
|
304
|
-
tickFontSize: _propTypes.default.number,
|
|
305
|
-
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
306
|
-
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
307
|
-
tickLabelPlacement: _propTypes.default.oneOf(['middle', 'tick']),
|
|
308
|
-
tickLabelStyle: _propTypes.default.object,
|
|
309
|
-
tickMaxStep: _propTypes.default.number,
|
|
310
|
-
tickMinStep: _propTypes.default.number,
|
|
311
|
-
tickNumber: _propTypes.default.number,
|
|
312
|
-
tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
313
|
-
tickSize: _propTypes.default.number
|
|
314
|
-
}), _propTypes.default.string]),
|
|
255
|
+
rightAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
315
256
|
/**
|
|
316
257
|
* The series to display in the line chart.
|
|
258
|
+
* An array of [[LineSeriesType]] objects.
|
|
317
259
|
*/
|
|
318
260
|
series: _propTypes.default.arrayOf(_propTypes.default.object).isRequired,
|
|
319
261
|
/**
|
|
@@ -351,30 +293,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
351
293
|
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
352
294
|
* @default null
|
|
353
295
|
*/
|
|
354
|
-
topAxis: _propTypes.default.oneOfType([_propTypes.default.
|
|
355
|
-
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
356
|
-
classes: _propTypes.default.object,
|
|
357
|
-
disableLine: _propTypes.default.bool,
|
|
358
|
-
disableTicks: _propTypes.default.bool,
|
|
359
|
-
fill: _propTypes.default.string,
|
|
360
|
-
label: _propTypes.default.string,
|
|
361
|
-
labelFontSize: _propTypes.default.number,
|
|
362
|
-
labelStyle: _propTypes.default.object,
|
|
363
|
-
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
364
|
-
slotProps: _propTypes.default.object,
|
|
365
|
-
slots: _propTypes.default.object,
|
|
366
|
-
stroke: _propTypes.default.string,
|
|
367
|
-
tickFontSize: _propTypes.default.number,
|
|
368
|
-
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
369
|
-
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
370
|
-
tickLabelPlacement: _propTypes.default.oneOf(['middle', 'tick']),
|
|
371
|
-
tickLabelStyle: _propTypes.default.object,
|
|
372
|
-
tickMaxStep: _propTypes.default.number,
|
|
373
|
-
tickMinStep: _propTypes.default.number,
|
|
374
|
-
tickNumber: _propTypes.default.number,
|
|
375
|
-
tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
376
|
-
tickSize: _propTypes.default.number
|
|
377
|
-
}), _propTypes.default.string]),
|
|
296
|
+
topAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
378
297
|
viewBox: _propTypes.default.shape({
|
|
379
298
|
height: _propTypes.default.number,
|
|
380
299
|
width: _propTypes.default.number,
|
|
@@ -388,6 +307,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
388
307
|
/**
|
|
389
308
|
* The configuration of the x-axes.
|
|
390
309
|
* If not provided, a default axis config is used.
|
|
310
|
+
* An array of [[AxisConfig]] objects.
|
|
391
311
|
*/
|
|
392
312
|
xAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
393
313
|
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
@@ -440,6 +360,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
440
360
|
/**
|
|
441
361
|
* The configuration of the y-axes.
|
|
442
362
|
* If not provided, a default axis config is used.
|
|
363
|
+
* An array of [[AxisConfig]] objects.
|
|
443
364
|
*/
|
|
444
365
|
yAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
445
366
|
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
@@ -5,7 +5,7 @@ import { SeriesId } from '../models/seriesType/common';
|
|
|
5
5
|
export interface LineElementClasses {
|
|
6
6
|
/** Styles applied to the root element. */
|
|
7
7
|
root: string;
|
|
8
|
-
/** Styles applied to the root element when
|
|
8
|
+
/** Styles applied to the root element when highlighted. */
|
|
9
9
|
highlighted: string;
|
|
10
10
|
/** Styles applied to the root element when faded. */
|
|
11
11
|
faded: string;
|
package/LineChart/LineElement.js
CHANGED
|
@@ -21,7 +21,7 @@ var _AnimatedLine = require("./AnimatedLine");
|
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
const _excluded = ["id", "classes", "color", "gradientId", "highlightScope", "slots", "slotProps", "onClick"];
|
|
23
23
|
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); }
|
|
24
|
-
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 &&
|
|
24
|
+
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; }
|
|
25
25
|
function getLineElementUtilityClass(slot) {
|
|
26
26
|
return (0, _generateUtilityClass.default)('MuiLineElement', slot);
|
|
27
27
|
}
|
|
@@ -18,7 +18,7 @@ var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generat
|
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
19
|
const _excluded = ["x", "y", "id", "classes", "color"];
|
|
20
20
|
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); }
|
|
21
|
-
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 &&
|
|
21
|
+
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; }
|
|
22
22
|
function getHighlightElementUtilityClass(slot) {
|
|
23
23
|
return (0, _generateUtilityClass.default)('MuiHighlightElement', slot);
|
|
24
24
|
}
|
|
@@ -19,7 +19,7 @@ var _getColor = _interopRequireDefault(require("./getColor"));
|
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
20
|
const _excluded = ["slots", "slotProps"];
|
|
21
21
|
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); }
|
|
22
|
-
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 &&
|
|
22
|
+
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; }
|
|
23
23
|
/**
|
|
24
24
|
* Demos:
|
|
25
25
|
*
|
package/LineChart/LinePlot.js
CHANGED
|
@@ -20,7 +20,7 @@ var _ChartsAxesGradients = require("../internals/components/ChartsAxesGradients"
|
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
21
|
const _excluded = ["slots", "slotProps", "skipAnimation", "onItemClick"];
|
|
22
22
|
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); }
|
|
23
|
-
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 &&
|
|
23
|
+
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; }
|
|
24
24
|
const useAggregatedData = () => {
|
|
25
25
|
const seriesData = React.useContext(_SeriesContextProvider.SeriesContext).line;
|
|
26
26
|
const axisData = React.useContext(_CartesianContextProvider.CartesianContext);
|
|
@@ -4,7 +4,7 @@ import { SeriesId } from '../models/seriesType/common';
|
|
|
4
4
|
export interface MarkElementClasses {
|
|
5
5
|
/** Styles applied to the root element. */
|
|
6
6
|
root: string;
|
|
7
|
-
/** Styles applied to the root element when
|
|
7
|
+
/** Styles applied to the root element when highlighted. */
|
|
8
8
|
highlighted: string;
|
|
9
9
|
/** Styles applied to the root element when faded. */
|
|
10
10
|
faded: string;
|
package/LineChart/MarkElement.js
CHANGED
|
@@ -23,7 +23,7 @@ var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
|
23
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
24
|
const _excluded = ["x", "y", "id", "classes", "color", "shape", "dataIndex", "highlightScope", "onClick", "skipAnimation"];
|
|
25
25
|
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); }
|
|
26
|
-
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 &&
|
|
26
|
+
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; }
|
|
27
27
|
function getMarkElementUtilityClass(slot) {
|
|
28
28
|
return (0, _generateUtilityClass.default)('MuiMarkElement', slot);
|
|
29
29
|
}
|
package/LineChart/MarkPlot.js
CHANGED
|
@@ -20,7 +20,7 @@ var _getColor = _interopRequireDefault(require("./getColor"));
|
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
21
|
const _excluded = ["slots", "slotProps", "skipAnimation", "onItemClick"];
|
|
22
22
|
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); }
|
|
23
|
-
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 &&
|
|
23
|
+
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; }
|
|
24
24
|
/**
|
|
25
25
|
* Demos:
|
|
26
26
|
*
|
package/PieChart/PieArc.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="@react-spring/core" />
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { SpringValue } from '@react-spring/web';
|
|
3
4
|
import { HighlightScope } from '../context/HighlightProvider';
|
|
@@ -5,7 +6,7 @@ import { PieItemId } from '../models';
|
|
|
5
6
|
export interface PieArcClasses {
|
|
6
7
|
/** Styles applied to the root element. */
|
|
7
8
|
root: string;
|
|
8
|
-
/** Styles applied to the root element when
|
|
9
|
+
/** Styles applied to the root element when highlighted. */
|
|
9
10
|
highlighted: string;
|
|
10
11
|
/** Styles applied to the root element when faded. */
|
|
11
12
|
faded: string;
|
package/PieChart/PieArc.js
CHANGED
|
@@ -21,7 +21,7 @@ var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
const _excluded = ["classes", "color", "cornerRadius", "dataIndex", "endAngle", "highlightScope", "id", "innerRadius", "isFaded", "isHighlighted", "onClick", "outerRadius", "paddingAngle", "startAngle"];
|
|
23
23
|
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); }
|
|
24
|
-
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 &&
|
|
24
|
+
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; }
|
|
25
25
|
function getPieArcUtilityClass(slot) {
|
|
26
26
|
return (0, _generateUtilityClass.default)('MuiPieArc', slot);
|
|
27
27
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
/// <reference types="@react-spring/core" />
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { SpringValue } from '@react-spring/web';
|
|
3
4
|
import { PieItemId } from '../models/seriesType/pie';
|
|
4
5
|
export interface PieArcLabelClasses {
|
|
5
6
|
/** Styles applied to the root element. */
|
|
6
7
|
root: string;
|
|
7
|
-
/** Styles applied to the root element when
|
|
8
|
+
/** Styles applied to the root element when highlighted. */
|
|
8
9
|
highlighted: string;
|
|
9
10
|
/** Styles applied to the root element when faded. */
|
|
10
11
|
faded: string;
|
package/PieChart/PieArcLabel.js
CHANGED
|
@@ -20,7 +20,7 @@ var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generat
|
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
21
|
const _excluded = ["id", "classes", "color", "startAngle", "endAngle", "paddingAngle", "arcLabelRadius", "innerRadius", "outerRadius", "cornerRadius", "formattedArcLabel", "isHighlighted", "isFaded", "style"];
|
|
22
22
|
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); }
|
|
23
|
-
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 &&
|
|
23
|
+
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; }
|
|
24
24
|
function getPieArcLabelUtilityClass(slot) {
|
|
25
25
|
return (0, _generateUtilityClass.default)('MuiPieArcLabel', slot);
|
|
26
26
|
}
|
|
@@ -50,7 +50,7 @@ const PieArcLabelRoot = (0, _styles.styled)(_web.animated.text, {
|
|
|
50
50
|
}));
|
|
51
51
|
/**
|
|
52
52
|
* Helper to compute label position.
|
|
53
|
-
* It's not an inline function because we need it in
|
|
53
|
+
* It's not an inline function because we need it in interpolation.
|
|
54
54
|
*/
|
|
55
55
|
const getLabelPosition = (formattedArcLabel, variable) => (startAngle, endAngle, padAngle, arcLabelRadius, cornerRadius) => {
|
|
56
56
|
if (!formattedArcLabel) {
|
|
@@ -9,7 +9,7 @@ export interface PieArcLabelPlotSlotProps {
|
|
|
9
9
|
}
|
|
10
10
|
export interface PieArcLabelPlotProps extends Pick<DefaultizedPieSeriesType, 'data' | 'faded' | 'highlighted' | 'cornerRadius' | 'paddingAngle' | 'arcLabel' | 'arcLabelMinAngle' | 'id' | 'highlightScope'>, ComputedPieRadius {
|
|
11
11
|
/**
|
|
12
|
-
* Override the arc
|
|
12
|
+
* Override the arc attributes when it is faded.
|
|
13
13
|
* @default { additionalRadius: -5 }
|
|
14
14
|
*/
|
|
15
15
|
faded?: DefaultizedPieSeriesType['faded'];
|
|
@@ -17,7 +17,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
17
17
|
const _excluded = ["arcLabel", "arcLabelMinAngle", "arcLabelRadius", "cornerRadius", "data", "faded", "highlighted", "highlightScope", "id", "innerRadius", "outerRadius", "paddingAngle", "skipAnimation", "slotProps", "slots"],
|
|
18
18
|
_excluded2 = ["startAngle", "endAngle", "paddingAngle", "innerRadius", "outerRadius", "arcLabelRadius", "cornerRadius"];
|
|
19
19
|
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); }
|
|
20
|
-
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 &&
|
|
20
|
+
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; }
|
|
21
21
|
const RATIO = 180 / Math.PI;
|
|
22
22
|
function getItemLabel(arcLabel, arcLabelMinAngle, item) {
|
|
23
23
|
if (!arcLabel) {
|
|
@@ -138,7 +138,7 @@ process.env.NODE_ENV !== "production" ? PieArcLabelPlot.propTypes = {
|
|
|
138
138
|
value: _propTypes.default.number.isRequired
|
|
139
139
|
})).isRequired,
|
|
140
140
|
/**
|
|
141
|
-
* Override the arc
|
|
141
|
+
* Override the arc attributes when it is faded.
|
|
142
142
|
* @default { additionalRadius: -5 }
|
|
143
143
|
*/
|
|
144
144
|
faded: _propTypes.default.shape({
|
|
@@ -151,7 +151,7 @@ process.env.NODE_ENV !== "production" ? PieArcLabelPlot.propTypes = {
|
|
|
151
151
|
paddingAngle: _propTypes.default.number
|
|
152
152
|
}),
|
|
153
153
|
/**
|
|
154
|
-
* Override the arc
|
|
154
|
+
* Override the arc attributes when it is highlighted.
|
|
155
155
|
*/
|
|
156
156
|
highlighted: _propTypes.default.shape({
|
|
157
157
|
additionalRadius: _propTypes.default.number,
|
|
@@ -168,7 +168,7 @@ process.env.NODE_ENV !== "production" ? PieArcLabelPlot.propTypes = {
|
|
|
168
168
|
}),
|
|
169
169
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
|
|
170
170
|
/**
|
|
171
|
-
* The radius between circle center and the
|
|
171
|
+
* The radius between circle center and the beginning of the arc.
|
|
172
172
|
* @default 0
|
|
173
173
|
*/
|
|
174
174
|
innerRadius: _propTypes.default.number,
|
package/PieChart/PieArcPlot.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface PieArcPlotSlotProps {
|
|
|
9
9
|
}
|
|
10
10
|
export interface PieArcPlotProps extends Pick<DefaultizedPieSeriesType, 'data' | 'faded' | 'highlighted' | 'cornerRadius' | 'paddingAngle' | 'id' | 'highlightScope'>, ComputedPieRadius {
|
|
11
11
|
/**
|
|
12
|
-
* Override the arc
|
|
12
|
+
* Override the arc attributes when it is faded.
|
|
13
13
|
* @default { additionalRadius: -5 }
|
|
14
14
|
*/
|
|
15
15
|
faded?: DefaultizedPieSeriesType['faded'];
|
package/PieChart/PieArcPlot.js
CHANGED
|
@@ -17,7 +17,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
17
17
|
const _excluded = ["slots", "slotProps", "innerRadius", "outerRadius", "cornerRadius", "paddingAngle", "id", "highlightScope", "highlighted", "faded", "data", "onItemClick", "skipAnimation"],
|
|
18
18
|
_excluded2 = ["startAngle", "endAngle", "paddingAngle", "innerRadius", "arcLabelRadius", "outerRadius", "cornerRadius"];
|
|
19
19
|
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); }
|
|
20
|
-
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 &&
|
|
20
|
+
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; }
|
|
21
21
|
function PieArcPlot(props) {
|
|
22
22
|
const {
|
|
23
23
|
slots,
|
|
@@ -118,7 +118,7 @@ process.env.NODE_ENV !== "production" ? PieArcPlot.propTypes = {
|
|
|
118
118
|
value: _propTypes.default.number.isRequired
|
|
119
119
|
})).isRequired,
|
|
120
120
|
/**
|
|
121
|
-
* Override the arc
|
|
121
|
+
* Override the arc attributes when it is faded.
|
|
122
122
|
* @default { additionalRadius: -5 }
|
|
123
123
|
*/
|
|
124
124
|
faded: _propTypes.default.shape({
|
|
@@ -131,7 +131,7 @@ process.env.NODE_ENV !== "production" ? PieArcPlot.propTypes = {
|
|
|
131
131
|
paddingAngle: _propTypes.default.number
|
|
132
132
|
}),
|
|
133
133
|
/**
|
|
134
|
-
* Override the arc
|
|
134
|
+
* Override the arc attributes when it is highlighted.
|
|
135
135
|
*/
|
|
136
136
|
highlighted: _propTypes.default.shape({
|
|
137
137
|
additionalRadius: _propTypes.default.number,
|
|
@@ -148,7 +148,7 @@ process.env.NODE_ENV !== "production" ? PieArcPlot.propTypes = {
|
|
|
148
148
|
}),
|
|
149
149
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
|
|
150
150
|
/**
|
|
151
|
-
* The radius between circle center and the
|
|
151
|
+
* The radius between circle center and the beginning of the arc.
|
|
152
152
|
* @default 0
|
|
153
153
|
*/
|
|
154
154
|
innerRadius: _propTypes.default.number,
|
package/PieChart/PieChart.d.ts
CHANGED
|
@@ -9,11 +9,12 @@ import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight';
|
|
|
9
9
|
import { PiePlotProps, PiePlotSlotProps, PiePlotSlots } from './PiePlot';
|
|
10
10
|
import { PieValueType } from '../models/seriesType/pie';
|
|
11
11
|
import { ChartsAxisSlots, ChartsAxisSlotProps, ChartsXAxisProps, ChartsYAxisProps } from '../models/axis';
|
|
12
|
-
|
|
12
|
+
import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from '../ChartsOverlay/ChartsOverlay';
|
|
13
|
+
export interface PieChartSlots extends ChartsAxisSlots, PiePlotSlots, ChartsLegendSlots, ChartsTooltipSlots, ChartsOverlaySlots {
|
|
13
14
|
}
|
|
14
|
-
export interface PieChartSlotProps extends ChartsAxisSlotProps, PiePlotSlotProps, ChartsLegendSlotProps, ChartsTooltipSlotProps {
|
|
15
|
+
export interface PieChartSlotProps extends ChartsAxisSlotProps, PiePlotSlotProps, ChartsLegendSlotProps, ChartsTooltipSlotProps, ChartsOverlaySlotProps {
|
|
15
16
|
}
|
|
16
|
-
export interface PieChartProps extends Omit<ResponsiveChartContainerProps, 'series' | 'leftAxis' | 'bottomAxis'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Pick<PiePlotProps, 'skipAnimation'> {
|
|
17
|
+
export interface PieChartProps extends Omit<ResponsiveChartContainerProps, 'series' | 'leftAxis' | 'bottomAxis'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'>, Pick<PiePlotProps, 'skipAnimation'> {
|
|
17
18
|
/**
|
|
18
19
|
* Indicate which axis to display the bottom of the charts.
|
|
19
20
|
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
@@ -28,6 +29,7 @@ export interface PieChartProps extends Omit<ResponsiveChartContainerProps, 'seri
|
|
|
28
29
|
leftAxis?: null | string | ChartsYAxisProps;
|
|
29
30
|
/**
|
|
30
31
|
* The series to display in the pie chart.
|
|
32
|
+
* An array of [[PieSeriesType]] objects.
|
|
31
33
|
*/
|
|
32
34
|
series: MakeOptional<PieSeriesType<MakeOptional<PieValueType, 'id'>>, 'type'>[];
|
|
33
35
|
/**
|