@mui/x-charts 6.0.0-alpha.15 → 6.0.0-alpha.17
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 +13 -2
- package/BarChart/BarChart.js +45 -3
- package/BarChart/BarElement.d.ts +1318 -3
- package/BarChart/BarElement.js +10 -8
- package/BarChart/BarPlot.d.ts +17 -1
- package/BarChart/BarPlot.js +152 -66
- package/BarChart/formatter.js +1 -1
- package/CHANGELOG.md +131 -0
- package/ChartContainer/index.js +5 -2
- package/ChartsAxis/ChartsAxis.js +18 -2
- package/ChartsAxis/axisClasses.d.ts +1 -1
- package/ChartsAxisHighlight/ChartsAxisHighlight.js +2 -2
- package/ChartsClipPath/ChartsClipPath.js +2 -2
- package/ChartsLegend/ChartsLegend.d.ts +2 -1
- package/ChartsLegend/ChartsLegend.js +12 -8
- package/ChartsSurface.js +2 -2
- package/ChartsTooltip/ChartsAxisTooltipContent.js +29 -23
- package/ChartsTooltip/ChartsItemTooltipContent.js +2 -2
- package/ChartsTooltip/ChartsTooltip.js +2 -2
- package/ChartsTooltip/utils.js +2 -2
- package/ChartsXAxis/ChartsXAxis.js +123 -35
- package/ChartsYAxis/ChartsYAxis.js +38 -16
- package/LineChart/AreaElement.d.ts +10 -0
- package/LineChart/AreaElement.js +12 -2
- package/LineChart/AreaPlot.d.ts +11 -0
- package/LineChart/AreaPlot.js +24 -7
- package/LineChart/LineChart.d.ts +10 -0
- package/LineChart/LineChart.js +36 -2
- package/LineChart/LineElement.d.ts +10 -0
- package/LineChart/LineElement.js +12 -2
- package/LineChart/LineHighlightElement.d.ts +10 -0
- package/LineChart/LineHighlightElement.js +12 -2
- package/LineChart/LineHighlightPlot.d.ts +10 -0
- package/LineChart/LineHighlightPlot.js +14 -3
- package/LineChart/LinePlot.d.ts +10 -0
- package/LineChart/LinePlot.js +22 -11
- package/LineChart/MarkElement.d.ts +10 -0
- package/LineChart/MarkElement.js +12 -2
- package/LineChart/MarkPlot.d.ts +10 -0
- package/LineChart/MarkPlot.js +40 -9
- package/LineChart/formatter.js +4 -3
- package/PieChart/PieArc.js +2 -2
- package/PieChart/PieArcLabel.js +2 -2
- package/PieChart/PieChart.d.ts +10 -0
- package/PieChart/PieChart.js +37 -2
- package/PieChart/PiePlot.d.ts +10 -0
- package/PieChart/PiePlot.js +12 -2
- package/ResponsiveChartContainer/index.js +4 -4
- package/ScatterChart/Scatter.d.ts +10 -0
- package/ScatterChart/Scatter.js +12 -2
- package/ScatterChart/ScatterChart.d.ts +10 -0
- package/ScatterChart/ScatterChart.js +36 -2
- package/ScatterChart/ScatterPlot.d.ts +10 -0
- package/ScatterChart/ScatterPlot.js +12 -2
- package/SparkLineChart/SparkLineChart.d.ts +9 -0
- package/SparkLineChart/SparkLineChart.js +16 -2
- package/context/CartesianContextProvider.js +10 -2
- package/context/DrawingProvider.js +2 -2
- package/context/HighlightProvider.js +2 -2
- package/context/InteractionProvider.js +2 -2
- package/context/SeriesContextProvider.js +2 -2
- package/esm/BarChart/BarChart.js +43 -1
- package/esm/BarChart/BarElement.js +7 -4
- package/esm/BarChart/BarPlot.js +152 -67
- package/esm/BarChart/formatter.js +1 -1
- package/esm/ChartContainer/index.js +3 -0
- package/esm/ChartsAxis/ChartsAxis.js +16 -0
- package/esm/ChartsLegend/ChartsLegend.js +10 -6
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +27 -21
- package/esm/ChartsXAxis/ChartsXAxis.js +122 -34
- package/esm/ChartsYAxis/ChartsYAxis.js +36 -14
- package/esm/LineChart/AreaElement.js +10 -0
- package/esm/LineChart/AreaPlot.js +24 -6
- package/esm/LineChart/LineChart.js +34 -0
- package/esm/LineChart/LineElement.js +10 -0
- package/esm/LineChart/LineHighlightElement.js +10 -0
- package/esm/LineChart/LineHighlightPlot.js +12 -1
- package/esm/LineChart/LinePlot.js +23 -14
- package/esm/LineChart/MarkElement.js +10 -0
- package/esm/LineChart/MarkPlot.js +38 -7
- package/esm/LineChart/formatter.js +7 -3
- package/esm/PieChart/PieChart.js +35 -0
- package/esm/PieChart/PiePlot.js +10 -0
- package/esm/ResponsiveChartContainer/index.js +2 -2
- package/esm/ScatterChart/Scatter.js +10 -0
- package/esm/ScatterChart/ScatterChart.js +34 -0
- package/esm/ScatterChart/ScatterPlot.js +10 -0
- package/esm/SparkLineChart/SparkLineChart.js +14 -0
- package/esm/context/CartesianContextProvider.js +8 -0
- package/esm/hooks/useMounted.js +16 -0
- package/esm/hooks/useReducedMotion.js +27 -0
- package/esm/hooks/useTicks.js +12 -6
- package/esm/internals/components/ChartsText.js +19 -13
- package/esm/internals/geometry.js +36 -0
- package/hooks/useAxisEvents.js +2 -2
- package/hooks/useChartDimensions.js +2 -2
- package/hooks/useDrawingArea.js +2 -2
- package/hooks/useInteractionItemProps.js +2 -2
- package/hooks/useMounted.d.ts +1 -0
- package/hooks/useMounted.js +25 -0
- package/hooks/useReducedMotion.d.ts +8 -0
- package/hooks/useReducedMotion.js +33 -0
- package/hooks/useScale.d.ts +2 -2
- package/hooks/useScale.js +2 -2
- package/hooks/useTicks.d.ts +18 -9
- package/hooks/useTicks.js +14 -8
- package/index.js +1 -1
- package/internals/components/ChartsText.d.ts +11 -8
- package/internals/components/ChartsText.js +21 -15
- package/internals/defaultizeColor.d.ts +2 -2
- package/internals/domUtils.d.ts +0 -1
- package/internals/geometry.d.ts +9 -0
- package/internals/geometry.js +42 -0
- package/legacy/BarChart/BarChart.js +43 -1
- package/legacy/BarChart/BarElement.js +6 -3
- package/legacy/BarChart/BarPlot.js +151 -63
- package/legacy/BarChart/formatter.js +1 -1
- package/legacy/ChartContainer/index.js +3 -0
- package/legacy/ChartsAxis/ChartsAxis.js +16 -0
- package/legacy/ChartsLegend/ChartsLegend.js +14 -7
- package/legacy/ChartsTooltip/ChartsAxisTooltipContent.js +5 -1
- package/legacy/ChartsXAxis/ChartsXAxis.js +126 -36
- package/legacy/ChartsYAxis/ChartsYAxis.js +36 -14
- package/legacy/LineChart/AreaElement.js +10 -0
- package/legacy/LineChart/AreaPlot.js +27 -7
- package/legacy/LineChart/LineChart.js +34 -0
- package/legacy/LineChart/LineElement.js +10 -0
- package/legacy/LineChart/LineHighlightElement.js +10 -0
- package/legacy/LineChart/LineHighlightPlot.js +12 -1
- package/legacy/LineChart/LinePlot.js +25 -12
- package/legacy/LineChart/MarkElement.js +10 -0
- package/legacy/LineChart/MarkPlot.js +37 -7
- package/legacy/LineChart/formatter.js +7 -3
- package/legacy/PieChart/PieChart.js +35 -0
- package/legacy/PieChart/PiePlot.js +10 -0
- package/legacy/ResponsiveChartContainer/index.js +2 -2
- package/legacy/ScatterChart/Scatter.js +10 -0
- package/legacy/ScatterChart/ScatterChart.js +34 -0
- package/legacy/ScatterChart/ScatterPlot.js +10 -0
- package/legacy/SparkLineChart/SparkLineChart.js +14 -0
- package/legacy/context/CartesianContextProvider.js +8 -0
- package/legacy/hooks/useMounted.js +21 -0
- package/legacy/hooks/useReducedMotion.js +27 -0
- package/legacy/hooks/useTicks.js +13 -6
- package/legacy/index.js +1 -1
- package/legacy/internals/components/ChartsText.js +17 -15
- package/legacy/internals/geometry.js +37 -0
- package/models/axis.d.ts +19 -2
- package/models/seriesType/line.d.ts +3 -3
- package/modern/BarChart/BarChart.js +43 -1
- package/modern/BarChart/BarElement.js +7 -4
- package/modern/BarChart/BarPlot.js +149 -65
- package/modern/BarChart/formatter.js +1 -1
- package/modern/ChartContainer/index.js +3 -0
- package/modern/ChartsAxis/ChartsAxis.js +16 -0
- package/modern/ChartsLegend/ChartsLegend.js +10 -6
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +27 -21
- package/modern/ChartsXAxis/ChartsXAxis.js +122 -34
- package/modern/ChartsYAxis/ChartsYAxis.js +36 -14
- package/modern/LineChart/AreaElement.js +10 -0
- package/modern/LineChart/AreaPlot.js +22 -5
- package/modern/LineChart/LineChart.js +34 -0
- package/modern/LineChart/LineElement.js +10 -0
- package/modern/LineChart/LineHighlightElement.js +10 -0
- package/modern/LineChart/LineHighlightPlot.js +12 -1
- package/modern/LineChart/LinePlot.js +20 -9
- package/modern/LineChart/MarkElement.js +10 -0
- package/modern/LineChart/MarkPlot.js +38 -7
- package/modern/LineChart/formatter.js +4 -3
- package/modern/PieChart/PieChart.js +35 -0
- package/modern/PieChart/PiePlot.js +10 -0
- package/modern/ResponsiveChartContainer/index.js +2 -2
- package/modern/ScatterChart/Scatter.js +10 -0
- package/modern/ScatterChart/ScatterChart.js +34 -0
- package/modern/ScatterChart/ScatterPlot.js +10 -0
- package/modern/SparkLineChart/SparkLineChart.js +14 -0
- package/modern/context/CartesianContextProvider.js +8 -0
- package/modern/hooks/useMounted.js +16 -0
- package/modern/hooks/useReducedMotion.js +27 -0
- package/modern/hooks/useTicks.js +12 -6
- package/modern/index.js +1 -1
- package/modern/internals/components/ChartsText.js +19 -13
- package/modern/internals/geometry.js +36 -0
- package/package.json +5 -3
package/LineChart/AreaElement.js
CHANGED
|
@@ -21,8 +21,8 @@ var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
|
21
21
|
var _InteractionProvider = require("../context/InteractionProvider");
|
|
22
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
23
|
const _excluded = ["id", "classes", "color", "highlightScope", "slots", "slotProps"];
|
|
24
|
-
function _getRequireWildcardCache(
|
|
25
|
-
function _interopRequireWildcard(
|
|
24
|
+
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); }
|
|
25
|
+
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 && Object.prototype.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; }
|
|
26
26
|
function getAreaElementUtilityClass(slot) {
|
|
27
27
|
return (0, _generateUtilityClass.default)('MuiAreaElement', slot);
|
|
28
28
|
}
|
|
@@ -66,6 +66,16 @@ AreaElementPath.propTypes = {
|
|
|
66
66
|
}).isRequired,
|
|
67
67
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
68
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* Demos:
|
|
71
|
+
*
|
|
72
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
73
|
+
* - [Areas demonstration](https://mui.com/x/react-charts/areas-demo/)
|
|
74
|
+
*
|
|
75
|
+
* API:
|
|
76
|
+
*
|
|
77
|
+
* - [AreaElement API](https://mui.com/x/api/charts/area-element/)
|
|
78
|
+
*/
|
|
69
79
|
function AreaElement(props) {
|
|
70
80
|
const {
|
|
71
81
|
id,
|
package/LineChart/AreaPlot.d.ts
CHANGED
|
@@ -8,6 +8,17 @@ export interface AreaPlotSlotComponentProps {
|
|
|
8
8
|
}
|
|
9
9
|
export interface AreaPlotProps extends React.SVGAttributes<SVGSVGElement>, Pick<AreaElementProps, 'slots' | 'slotProps'> {
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Demos:
|
|
13
|
+
*
|
|
14
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
15
|
+
* - [Areas demonstration](https://mui.com/x/react-charts/areas-demo/)
|
|
16
|
+
* - [Stacking](https://mui.com/x/react-charts/stacking/)
|
|
17
|
+
*
|
|
18
|
+
* API:
|
|
19
|
+
*
|
|
20
|
+
* - [AreaPlot API](https://mui.com/x/api/charts/area-plot/)
|
|
21
|
+
*/
|
|
11
22
|
declare function AreaPlot(props: AreaPlotProps): React.JSX.Element | null;
|
|
12
23
|
declare namespace AreaPlot {
|
|
13
24
|
var propTypes: any;
|
package/LineChart/AreaPlot.js
CHANGED
|
@@ -17,8 +17,19 @@ var _useScale = require("../hooks/useScale");
|
|
|
17
17
|
var _getCurve = _interopRequireDefault(require("../internals/getCurve"));
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
19
|
const _excluded = ["slots", "slotProps"];
|
|
20
|
-
function _getRequireWildcardCache(
|
|
21
|
-
function _interopRequireWildcard(
|
|
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 && Object.prototype.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
|
+
/**
|
|
23
|
+
* Demos:
|
|
24
|
+
*
|
|
25
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
26
|
+
* - [Areas demonstration](https://mui.com/x/react-charts/areas-demo/)
|
|
27
|
+
* - [Stacking](https://mui.com/x/react-charts/stacking/)
|
|
28
|
+
*
|
|
29
|
+
* API:
|
|
30
|
+
*
|
|
31
|
+
* - [AreaPlot API](https://mui.com/x/api/charts/area-plot/)
|
|
32
|
+
*/
|
|
22
33
|
function AreaPlot(props) {
|
|
23
34
|
const {
|
|
24
35
|
slots,
|
|
@@ -50,20 +61,26 @@ function AreaPlot(props) {
|
|
|
50
61
|
const {
|
|
51
62
|
xAxisKey = defaultXAxisId,
|
|
52
63
|
yAxisKey = defaultYAxisId,
|
|
53
|
-
stackedData
|
|
64
|
+
stackedData,
|
|
65
|
+
data
|
|
54
66
|
} = series[seriesId];
|
|
55
67
|
const xScale = (0, _useScale.getValueToPositionMapper)(xAxis[xAxisKey].scale);
|
|
56
68
|
const yScale = yAxis[yAxisKey].scale;
|
|
57
69
|
const xData = xAxis[xAxisKey].data;
|
|
58
|
-
if (
|
|
59
|
-
|
|
70
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
71
|
+
if (xData === undefined) {
|
|
72
|
+
throw new Error(`Axis of id "${xAxisKey}" should have data property to be able to display a line plot.`);
|
|
73
|
+
}
|
|
74
|
+
if (xData.length < stackedData.length) {
|
|
75
|
+
throw new Error(`MUI: data length of the x axis (${xData.length} items) is lower than the length of series (${stackedData.length} items)`);
|
|
76
|
+
}
|
|
60
77
|
}
|
|
61
|
-
const areaPath = (0, _d3Shape.area)().x(d => xScale(d.x)).y0(d => yScale(d.y[0])).y1(d => yScale(d.y[1]));
|
|
78
|
+
const areaPath = (0, _d3Shape.area)().x(d => xScale(d.x)).defined((_, i) => data[i] != null).y0(d => d.y && yScale(d.y[0])).y1(d => d.y && yScale(d.y[1]));
|
|
62
79
|
const curve = (0, _getCurve.default)(series[seriesId].curve);
|
|
63
80
|
const d3Data = xData?.map((x, index) => ({
|
|
64
81
|
x,
|
|
65
82
|
y: stackedData[index]
|
|
66
|
-
}));
|
|
83
|
+
})) ?? [];
|
|
67
84
|
return !!series[seriesId].area && /*#__PURE__*/(0, _jsxRuntime.jsx)(_AreaElement.AreaElement, {
|
|
68
85
|
id: seriesId,
|
|
69
86
|
d: areaPath.curve(curve)(d3Data) || undefined,
|
package/LineChart/LineChart.d.ts
CHANGED
|
@@ -38,5 +38,15 @@ export interface LineChartProps extends Omit<ResponsiveChartContainerProps, 'ser
|
|
|
38
38
|
*/
|
|
39
39
|
slotProps?: LineChartSlotComponentProps;
|
|
40
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Demos:
|
|
43
|
+
*
|
|
44
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
45
|
+
* - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
|
|
46
|
+
*
|
|
47
|
+
* API:
|
|
48
|
+
*
|
|
49
|
+
* - [LineChart API](https://mui.com/x/api/charts/line-chart/)
|
|
50
|
+
*/
|
|
41
51
|
declare const LineChart: React.ForwardRefExoticComponent<LineChartProps & React.RefAttributes<unknown>>;
|
|
42
52
|
export { LineChart };
|
package/LineChart/LineChart.js
CHANGED
|
@@ -21,8 +21,18 @@ var _ChartsAxisHighlight = require("../ChartsAxisHighlight");
|
|
|
21
21
|
var _ChartsClipPath = require("../ChartsClipPath");
|
|
22
22
|
var _LineHighlightPlot = require("./LineHighlightPlot");
|
|
23
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
|
-
function _getRequireWildcardCache(
|
|
25
|
-
function _interopRequireWildcard(
|
|
24
|
+
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); }
|
|
25
|
+
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 && Object.prototype.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; }
|
|
26
|
+
/**
|
|
27
|
+
* Demos:
|
|
28
|
+
*
|
|
29
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
30
|
+
* - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
|
|
31
|
+
*
|
|
32
|
+
* API:
|
|
33
|
+
*
|
|
34
|
+
* - [LineChart API](https://mui.com/x/api/charts/line-chart/)
|
|
35
|
+
*/
|
|
26
36
|
const LineChart = exports.LineChart = /*#__PURE__*/React.forwardRef(function LineChart(props, ref) {
|
|
27
37
|
const {
|
|
28
38
|
xAxis,
|
|
@@ -126,11 +136,15 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
126
136
|
fill: _propTypes.default.string,
|
|
127
137
|
label: _propTypes.default.string,
|
|
128
138
|
labelFontSize: _propTypes.default.number,
|
|
139
|
+
labelStyle: _propTypes.default.object,
|
|
129
140
|
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
130
141
|
slotProps: _propTypes.default.object,
|
|
131
142
|
slots: _propTypes.default.object,
|
|
132
143
|
stroke: _propTypes.default.string,
|
|
133
144
|
tickFontSize: _propTypes.default.number,
|
|
145
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
146
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
147
|
+
tickLabelStyle: _propTypes.default.object,
|
|
134
148
|
tickMaxStep: _propTypes.default.number,
|
|
135
149
|
tickMinStep: _propTypes.default.number,
|
|
136
150
|
tickNumber: _propTypes.default.number,
|
|
@@ -163,11 +177,15 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
163
177
|
fill: _propTypes.default.string,
|
|
164
178
|
label: _propTypes.default.string,
|
|
165
179
|
labelFontSize: _propTypes.default.number,
|
|
180
|
+
labelStyle: _propTypes.default.object,
|
|
166
181
|
position: _propTypes.default.oneOf(['left', 'right']),
|
|
167
182
|
slotProps: _propTypes.default.object,
|
|
168
183
|
slots: _propTypes.default.object,
|
|
169
184
|
stroke: _propTypes.default.string,
|
|
170
185
|
tickFontSize: _propTypes.default.number,
|
|
186
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
187
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
188
|
+
tickLabelStyle: _propTypes.default.object,
|
|
171
189
|
tickMaxStep: _propTypes.default.number,
|
|
172
190
|
tickMinStep: _propTypes.default.number,
|
|
173
191
|
tickNumber: _propTypes.default.number,
|
|
@@ -206,11 +224,15 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
206
224
|
fill: _propTypes.default.string,
|
|
207
225
|
label: _propTypes.default.string,
|
|
208
226
|
labelFontSize: _propTypes.default.number,
|
|
227
|
+
labelStyle: _propTypes.default.object,
|
|
209
228
|
position: _propTypes.default.oneOf(['left', 'right']),
|
|
210
229
|
slotProps: _propTypes.default.object,
|
|
211
230
|
slots: _propTypes.default.object,
|
|
212
231
|
stroke: _propTypes.default.string,
|
|
213
232
|
tickFontSize: _propTypes.default.number,
|
|
233
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
234
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
235
|
+
tickLabelStyle: _propTypes.default.object,
|
|
214
236
|
tickMaxStep: _propTypes.default.number,
|
|
215
237
|
tickMinStep: _propTypes.default.number,
|
|
216
238
|
tickNumber: _propTypes.default.number,
|
|
@@ -271,11 +293,15 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
271
293
|
fill: _propTypes.default.string,
|
|
272
294
|
label: _propTypes.default.string,
|
|
273
295
|
labelFontSize: _propTypes.default.number,
|
|
296
|
+
labelStyle: _propTypes.default.object,
|
|
274
297
|
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
275
298
|
slotProps: _propTypes.default.object,
|
|
276
299
|
slots: _propTypes.default.object,
|
|
277
300
|
stroke: _propTypes.default.string,
|
|
278
301
|
tickFontSize: _propTypes.default.number,
|
|
302
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
303
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
304
|
+
tickLabelStyle: _propTypes.default.object,
|
|
279
305
|
tickMaxStep: _propTypes.default.number,
|
|
280
306
|
tickMinStep: _propTypes.default.number,
|
|
281
307
|
tickNumber: _propTypes.default.number,
|
|
@@ -300,6 +326,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
300
326
|
id: _propTypes.default.string,
|
|
301
327
|
label: _propTypes.default.string,
|
|
302
328
|
labelFontSize: _propTypes.default.number,
|
|
329
|
+
labelStyle: _propTypes.default.object,
|
|
303
330
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
304
331
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
305
332
|
position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
|
|
@@ -308,6 +335,9 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
308
335
|
slots: _propTypes.default.object,
|
|
309
336
|
stroke: _propTypes.default.string,
|
|
310
337
|
tickFontSize: _propTypes.default.number,
|
|
338
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
339
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
340
|
+
tickLabelStyle: _propTypes.default.object,
|
|
311
341
|
tickMaxStep: _propTypes.default.number,
|
|
312
342
|
tickMinStep: _propTypes.default.number,
|
|
313
343
|
tickNumber: _propTypes.default.number,
|
|
@@ -326,6 +356,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
326
356
|
id: _propTypes.default.string,
|
|
327
357
|
label: _propTypes.default.string,
|
|
328
358
|
labelFontSize: _propTypes.default.number,
|
|
359
|
+
labelStyle: _propTypes.default.object,
|
|
329
360
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
330
361
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
331
362
|
position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
|
|
@@ -334,6 +365,9 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
334
365
|
slots: _propTypes.default.object,
|
|
335
366
|
stroke: _propTypes.default.string,
|
|
336
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
|
+
tickLabelStyle: _propTypes.default.object,
|
|
337
371
|
tickMaxStep: _propTypes.default.number,
|
|
338
372
|
tickMinStep: _propTypes.default.number,
|
|
339
373
|
tickNumber: _propTypes.default.number,
|
|
@@ -43,6 +43,16 @@ export type LineElementProps = Omit<LineElementOwnerState, 'isFaded' | 'isHighli
|
|
|
43
43
|
line?: React.ElementType;
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* Demos:
|
|
48
|
+
*
|
|
49
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
50
|
+
* - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
|
|
51
|
+
*
|
|
52
|
+
* API:
|
|
53
|
+
*
|
|
54
|
+
* - [LineElement API](https://mui.com/x/api/charts/line-element/)
|
|
55
|
+
*/
|
|
46
56
|
declare function LineElement(props: LineElementProps): React.JSX.Element;
|
|
47
57
|
declare namespace LineElement {
|
|
48
58
|
var propTypes: any;
|
package/LineChart/LineElement.js
CHANGED
|
@@ -22,8 +22,8 @@ var _InteractionProvider = require("../context/InteractionProvider");
|
|
|
22
22
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
23
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
24
|
const _excluded = ["id", "classes", "color", "highlightScope", "slots", "slotProps"];
|
|
25
|
-
function _getRequireWildcardCache(
|
|
26
|
-
function _interopRequireWildcard(
|
|
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 && Object.prototype.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 getLineElementUtilityClass(slot) {
|
|
28
28
|
return (0, _generateUtilityClass.default)('MuiLineElement', slot);
|
|
29
29
|
}
|
|
@@ -69,6 +69,16 @@ LineElementPath.propTypes = {
|
|
|
69
69
|
}).isRequired,
|
|
70
70
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
71
71
|
};
|
|
72
|
+
/**
|
|
73
|
+
* Demos:
|
|
74
|
+
*
|
|
75
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
76
|
+
* - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
|
|
77
|
+
*
|
|
78
|
+
* API:
|
|
79
|
+
*
|
|
80
|
+
* - [LineElement API](https://mui.com/x/api/charts/line-element/)
|
|
81
|
+
*/
|
|
72
82
|
function LineElement(props) {
|
|
73
83
|
const {
|
|
74
84
|
id,
|
|
@@ -14,6 +14,16 @@ interface LineHighlightElementOwnerState {
|
|
|
14
14
|
export declare function getHighlightElementUtilityClass(slot: string): string;
|
|
15
15
|
export declare const lineHighlightElementClasses: LineHighlightElementClasses;
|
|
16
16
|
export type LineHighlightElementProps = LineHighlightElementOwnerState & React.ComponentPropsWithoutRef<'circle'> & {};
|
|
17
|
+
/**
|
|
18
|
+
* Demos:
|
|
19
|
+
*
|
|
20
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
21
|
+
* - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
|
|
22
|
+
*
|
|
23
|
+
* API:
|
|
24
|
+
*
|
|
25
|
+
* - [LineHighlightElement API](https://mui.com/x/api/charts/line-highlight-element/)
|
|
26
|
+
*/
|
|
17
27
|
declare function LineHighlightElement(props: LineHighlightElementProps): React.JSX.Element;
|
|
18
28
|
declare namespace LineHighlightElement {
|
|
19
29
|
var propTypes: any;
|
|
@@ -17,8 +17,8 @@ var _styles = require("@mui/material/styles");
|
|
|
17
17
|
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
19
|
const _excluded = ["x", "y", "id", "classes", "color"];
|
|
20
|
-
function _getRequireWildcardCache(
|
|
21
|
-
function _interopRequireWildcard(
|
|
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 && Object.prototype.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
|
}
|
|
@@ -44,6 +44,16 @@ const HighlightElement = (0, _styles.styled)('circle', {
|
|
|
44
44
|
transformOrigin: `${ownerState.x}px ${ownerState.y}px`,
|
|
45
45
|
fill: ownerState.color
|
|
46
46
|
}));
|
|
47
|
+
/**
|
|
48
|
+
* Demos:
|
|
49
|
+
*
|
|
50
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
51
|
+
* - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
|
|
52
|
+
*
|
|
53
|
+
* API:
|
|
54
|
+
*
|
|
55
|
+
* - [LineHighlightElement API](https://mui.com/x/api/charts/line-highlight-element/)
|
|
56
|
+
*/
|
|
47
57
|
function LineHighlightElement(props) {
|
|
48
58
|
const {
|
|
49
59
|
x,
|
|
@@ -18,6 +18,16 @@ export interface LineHighlightPlotProps extends React.SVGAttributes<SVGSVGElemen
|
|
|
18
18
|
*/
|
|
19
19
|
slotProps?: LineHighlightPlotSlotComponentProps;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Demos:
|
|
23
|
+
*
|
|
24
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
25
|
+
* - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
|
|
26
|
+
*
|
|
27
|
+
* API:
|
|
28
|
+
*
|
|
29
|
+
* - [LineHighlightPlot API](https://mui.com/x/api/charts/line-highlight-plot/)
|
|
30
|
+
*/
|
|
21
31
|
declare function LineHighlightPlot(props: LineHighlightPlotProps): React.JSX.Element | null;
|
|
22
32
|
declare namespace LineHighlightPlot {
|
|
23
33
|
var propTypes: any;
|
|
@@ -16,8 +16,18 @@ var _useScale = require("../hooks/useScale");
|
|
|
16
16
|
var _InteractionProvider = require("../context/InteractionProvider");
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
18
|
const _excluded = ["slots", "slotProps"];
|
|
19
|
-
function _getRequireWildcardCache(
|
|
20
|
-
function _interopRequireWildcard(
|
|
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 && Object.prototype.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
|
+
/**
|
|
22
|
+
* Demos:
|
|
23
|
+
*
|
|
24
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
25
|
+
* - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
|
|
26
|
+
*
|
|
27
|
+
* API:
|
|
28
|
+
*
|
|
29
|
+
* - [LineHighlightPlot API](https://mui.com/x/api/charts/line-highlight-plot/)
|
|
30
|
+
*/
|
|
21
31
|
function LineHighlightPlot(props) {
|
|
22
32
|
const {
|
|
23
33
|
slots,
|
|
@@ -58,9 +68,10 @@ function LineHighlightPlot(props) {
|
|
|
58
68
|
xAxisKey = defaultXAxisId,
|
|
59
69
|
yAxisKey = defaultYAxisId,
|
|
60
70
|
stackedData,
|
|
71
|
+
data,
|
|
61
72
|
disableHighlight
|
|
62
73
|
} = series[seriesId];
|
|
63
|
-
if (disableHighlight) {
|
|
74
|
+
if (disableHighlight || data[highlightedIndex] == null) {
|
|
64
75
|
return null;
|
|
65
76
|
}
|
|
66
77
|
const xScale = (0, _useScale.getValueToPositionMapper)(xAxis[xAxisKey].scale);
|
package/LineChart/LinePlot.d.ts
CHANGED
|
@@ -8,6 +8,16 @@ export interface LinePlotSlotComponentProps {
|
|
|
8
8
|
}
|
|
9
9
|
export interface LinePlotProps extends React.SVGAttributes<SVGSVGElement>, Pick<LineElementProps, 'slots' | 'slotProps'> {
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Demos:
|
|
13
|
+
*
|
|
14
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
15
|
+
* - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
|
|
16
|
+
*
|
|
17
|
+
* API:
|
|
18
|
+
*
|
|
19
|
+
* - [LinePlot API](https://mui.com/x/api/charts/line-plot/)
|
|
20
|
+
*/
|
|
11
21
|
declare function LinePlot(props: LinePlotProps): React.JSX.Element | null;
|
|
12
22
|
declare namespace LinePlot {
|
|
13
23
|
var propTypes: any;
|
package/LineChart/LinePlot.js
CHANGED
|
@@ -17,8 +17,18 @@ var _useScale = require("../hooks/useScale");
|
|
|
17
17
|
var _getCurve = _interopRequireDefault(require("../internals/getCurve"));
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
19
|
const _excluded = ["slots", "slotProps"];
|
|
20
|
-
function _getRequireWildcardCache(
|
|
21
|
-
function _interopRequireWildcard(
|
|
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 && Object.prototype.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
|
+
/**
|
|
23
|
+
* Demos:
|
|
24
|
+
*
|
|
25
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
26
|
+
* - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
|
|
27
|
+
*
|
|
28
|
+
* API:
|
|
29
|
+
*
|
|
30
|
+
* - [LinePlot API](https://mui.com/x/api/charts/line-plot/)
|
|
31
|
+
*/
|
|
22
32
|
function LinePlot(props) {
|
|
23
33
|
const {
|
|
24
34
|
slots,
|
|
@@ -50,25 +60,26 @@ function LinePlot(props) {
|
|
|
50
60
|
const {
|
|
51
61
|
xAxisKey = defaultXAxisId,
|
|
52
62
|
yAxisKey = defaultYAxisId,
|
|
53
|
-
stackedData
|
|
63
|
+
stackedData,
|
|
64
|
+
data
|
|
54
65
|
} = series[seriesId];
|
|
55
66
|
const xScale = (0, _useScale.getValueToPositionMapper)(xAxis[xAxisKey].scale);
|
|
56
67
|
const yScale = yAxis[yAxisKey].scale;
|
|
57
68
|
const xData = xAxis[xAxisKey].data;
|
|
58
|
-
if (xData === undefined) {
|
|
59
|
-
throw new Error(`Axis of id "${xAxisKey}" should have data property to be able to display a line plot`);
|
|
60
|
-
}
|
|
61
|
-
const linePath = (0, _d3Shape.line)().x(d => xScale(d.x)).y(d => yScale(d.y[1]));
|
|
62
69
|
if (process.env.NODE_ENV !== 'production') {
|
|
63
|
-
if (xData
|
|
64
|
-
throw new Error(`
|
|
70
|
+
if (xData === undefined) {
|
|
71
|
+
throw new Error(`Axis of id "${xAxisKey}" should have data property to be able to display a line plot`);
|
|
72
|
+
}
|
|
73
|
+
if (xData.length < stackedData.length) {
|
|
74
|
+
throw new Error(`MUI: data length of the x axis (${xData.length} items) is lower than the length of series (${stackedData.length} items)`);
|
|
65
75
|
}
|
|
66
76
|
}
|
|
77
|
+
const linePath = (0, _d3Shape.line)().x(d => xScale(d.x)).defined((_, i) => data[i] != null).y(d => yScale(d.y[1]));
|
|
67
78
|
const curve = (0, _getCurve.default)(series[seriesId].curve);
|
|
68
79
|
const d3Data = xData?.map((x, index) => ({
|
|
69
80
|
x,
|
|
70
|
-
y: stackedData[index]
|
|
71
|
-
}));
|
|
81
|
+
y: stackedData[index]
|
|
82
|
+
})) ?? [];
|
|
72
83
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_LineElement.LineElement, {
|
|
73
84
|
id: seriesId,
|
|
74
85
|
d: linePath.curve(curve)(d3Data) || undefined,
|
|
@@ -31,6 +31,16 @@ export type MarkElementProps = Omit<MarkElementOwnerState, 'isFaded' | 'isHighli
|
|
|
31
31
|
dataIndex: number;
|
|
32
32
|
highlightScope?: Partial<HighlightScope>;
|
|
33
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* Demos:
|
|
36
|
+
*
|
|
37
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
38
|
+
* - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
|
|
39
|
+
*
|
|
40
|
+
* API:
|
|
41
|
+
*
|
|
42
|
+
* - [MarkElement API](https://mui.com/x/api/charts/mark-element/)
|
|
43
|
+
*/
|
|
34
44
|
declare function MarkElement(props: MarkElementProps): React.JSX.Element;
|
|
35
45
|
declare namespace MarkElement {
|
|
36
46
|
var propTypes: any;
|
package/LineChart/MarkElement.js
CHANGED
|
@@ -21,8 +21,8 @@ var _InteractionProvider = require("../context/InteractionProvider");
|
|
|
21
21
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
22
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
23
|
const _excluded = ["x", "y", "id", "classes", "color", "shape", "dataIndex", "highlightScope"];
|
|
24
|
-
function _getRequireWildcardCache(
|
|
25
|
-
function _interopRequireWildcard(
|
|
24
|
+
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); }
|
|
25
|
+
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 && Object.prototype.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; }
|
|
26
26
|
function getMarkElementUtilityClass(slot) {
|
|
27
27
|
return (0, _generateUtilityClass.default)('MuiMarkElement', slot);
|
|
28
28
|
}
|
|
@@ -70,6 +70,16 @@ MarkElementPath.propTypes = {
|
|
|
70
70
|
}).isRequired,
|
|
71
71
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
72
72
|
};
|
|
73
|
+
/**
|
|
74
|
+
* Demos:
|
|
75
|
+
*
|
|
76
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
77
|
+
* - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
|
|
78
|
+
*
|
|
79
|
+
* API:
|
|
80
|
+
*
|
|
81
|
+
* - [MarkElement API](https://mui.com/x/api/charts/mark-element/)
|
|
82
|
+
*/
|
|
73
83
|
function MarkElement(props) {
|
|
74
84
|
const {
|
|
75
85
|
x,
|
package/LineChart/MarkPlot.d.ts
CHANGED
|
@@ -18,6 +18,16 @@ export interface MarkPlotProps extends React.SVGAttributes<SVGSVGElement> {
|
|
|
18
18
|
*/
|
|
19
19
|
slotProps?: MarkPlotSlotComponentProps;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Demos:
|
|
23
|
+
*
|
|
24
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
25
|
+
* - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
|
|
26
|
+
*
|
|
27
|
+
* API:
|
|
28
|
+
*
|
|
29
|
+
* - [MarkPlot API](https://mui.com/x/api/charts/mark-plot/)
|
|
30
|
+
*/
|
|
21
31
|
declare function MarkPlot(props: MarkPlotProps): React.JSX.Element | null;
|
|
22
32
|
declare namespace MarkPlot {
|
|
23
33
|
var propTypes: any;
|