@mui/x-charts 6.0.0-alpha.14 → 6.0.0-alpha.16
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 +16 -2
- package/BarChart/BarChart.js +49 -11
- 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/CHANGELOG.md +169 -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 +44 -24
- package/ChartsLegend/ChartsLegend.js +191 -145
- package/ChartsLegend/utils.d.ts +1 -6
- package/ChartsSurface.js +5 -13
- package/ChartsTooltip/ChartsAxisTooltipContent.js +2 -2
- package/ChartsTooltip/ChartsItemTooltipContent.js +2 -2
- package/ChartsTooltip/ChartsTooltip.js +2 -2
- package/ChartsTooltip/utils.js +2 -2
- package/ChartsXAxis/ChartsXAxis.js +151 -40
- package/ChartsYAxis/ChartsYAxis.js +76 -33
- package/LineChart/AreaElement.d.ts +10 -0
- package/LineChart/AreaElement.js +12 -2
- package/LineChart/AreaPlot.d.ts +11 -0
- package/LineChart/AreaPlot.js +13 -2
- package/LineChart/LineChart.d.ts +13 -0
- package/LineChart/LineChart.js +40 -10
- 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 +12 -2
- package/LineChart/LinePlot.d.ts +10 -0
- package/LineChart/LinePlot.js +12 -2
- package/LineChart/MarkElement.d.ts +10 -0
- package/LineChart/MarkElement.js +12 -2
- package/LineChart/MarkPlot.d.ts +10 -0
- package/LineChart/MarkPlot.js +12 -2
- package/PieChart/PieArc.js +2 -2
- package/PieChart/PieArcLabel.js +2 -2
- package/PieChart/PieChart.d.ts +13 -0
- package/PieChart/PieChart.js +41 -10
- 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 +13 -0
- package/ScatterChart/ScatterChart.js +40 -10
- 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/constants.js +1 -1
- package/context/CartesianContextProvider.js +20 -12
- package/context/DrawingProvider.d.ts +2 -0
- package/context/DrawingProvider.js +4 -2
- package/context/HighlightProvider.js +2 -2
- package/context/InteractionProvider.js +2 -2
- package/context/SeriesContextProvider.js +2 -2
- package/esm/BarChart/BarChart.js +47 -9
- package/esm/BarChart/BarElement.js +7 -4
- package/esm/BarChart/BarPlot.js +152 -67
- package/esm/ChartContainer/index.js +3 -0
- package/esm/ChartsAxis/ChartsAxis.js +16 -0
- package/esm/ChartsLegend/ChartsLegend.js +188 -142
- package/esm/ChartsSurface.js +3 -11
- package/esm/ChartsXAxis/ChartsXAxis.js +148 -37
- package/esm/ChartsYAxis/ChartsYAxis.js +73 -30
- package/esm/LineChart/AreaElement.js +10 -0
- package/esm/LineChart/AreaPlot.js +11 -0
- package/esm/LineChart/LineChart.js +38 -8
- package/esm/LineChart/LineElement.js +10 -0
- package/esm/LineChart/LineHighlightElement.js +10 -0
- package/esm/LineChart/LineHighlightPlot.js +10 -0
- package/esm/LineChart/LinePlot.js +10 -0
- package/esm/LineChart/MarkElement.js +10 -0
- package/esm/LineChart/MarkPlot.js +10 -0
- package/esm/PieChart/PieChart.js +39 -8
- 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 +38 -8
- package/esm/ScatterChart/ScatterPlot.js +10 -0
- package/esm/SparkLineChart/SparkLineChart.js +14 -0
- package/esm/constants.js +1 -1
- package/esm/context/CartesianContextProvider.js +19 -11
- package/esm/context/DrawingProvider.js +2 -0
- package/esm/hooks/useChartDimensions.js +2 -0
- package/esm/hooks/useMounted.js +16 -0
- package/esm/hooks/useReducedMotion.js +27 -0
- package/esm/hooks/useTicks.js +15 -9
- package/esm/internals/components/AxisSharedComponents.js +15 -70
- package/esm/internals/components/ChartsText.js +75 -0
- package/esm/internals/domUtils.js +113 -0
- package/esm/internals/geometry.js +36 -0
- package/hooks/useAxisEvents.js +2 -2
- package/hooks/useChartDimensions.d.ts +2 -0
- package/hooks/useChartDimensions.js +4 -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 +19 -11
- package/hooks/useTicks.js +18 -12
- package/index.js +1 -1
- package/internals/components/AxisSharedComponents.d.ts +0 -4
- package/internals/components/AxisSharedComponents.js +16 -71
- package/internals/components/ChartsText.d.ts +35 -0
- package/internals/components/ChartsText.js +85 -0
- package/internals/defaultizeColor.d.ts +1 -1
- package/internals/domUtils.d.ts +13 -0
- package/internals/domUtils.js +122 -0
- package/internals/geometry.d.ts +9 -0
- package/internals/geometry.js +42 -0
- package/legacy/BarChart/BarChart.js +47 -9
- package/legacy/BarChart/BarElement.js +6 -3
- package/legacy/BarChart/BarPlot.js +151 -63
- package/legacy/ChartContainer/index.js +3 -0
- package/legacy/ChartsAxis/ChartsAxis.js +16 -0
- package/legacy/ChartsLegend/ChartsLegend.js +203 -140
- package/legacy/ChartsSurface.js +2 -11
- package/legacy/ChartsXAxis/ChartsXAxis.js +152 -39
- package/legacy/ChartsYAxis/ChartsYAxis.js +73 -30
- package/legacy/LineChart/AreaElement.js +10 -0
- package/legacy/LineChart/AreaPlot.js +11 -0
- package/legacy/LineChart/LineChart.js +38 -8
- package/legacy/LineChart/LineElement.js +10 -0
- package/legacy/LineChart/LineHighlightElement.js +10 -0
- package/legacy/LineChart/LineHighlightPlot.js +10 -0
- package/legacy/LineChart/LinePlot.js +10 -0
- package/legacy/LineChart/MarkElement.js +10 -0
- package/legacy/LineChart/MarkPlot.js +10 -0
- package/legacy/PieChart/PieChart.js +39 -8
- 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 +38 -8
- package/legacy/ScatterChart/ScatterPlot.js +10 -0
- package/legacy/SparkLineChart/SparkLineChart.js +14 -0
- package/legacy/constants.js +1 -1
- package/legacy/context/CartesianContextProvider.js +19 -11
- package/legacy/context/DrawingProvider.js +2 -0
- package/legacy/hooks/useChartDimensions.js +2 -0
- package/legacy/hooks/useMounted.js +21 -0
- package/legacy/hooks/useReducedMotion.js +27 -0
- package/legacy/hooks/useTicks.js +16 -9
- package/legacy/index.js +1 -1
- package/legacy/internals/components/AxisSharedComponents.js +9 -63
- package/legacy/internals/components/ChartsText.js +77 -0
- package/legacy/internals/domUtils.js +121 -0
- package/legacy/internals/geometry.js +37 -0
- package/models/axis.d.ts +25 -7
- package/models/layout.d.ts +7 -6
- package/models/seriesType/line.d.ts +2 -2
- package/modern/BarChart/BarChart.js +47 -9
- package/modern/BarChart/BarElement.js +7 -4
- package/modern/BarChart/BarPlot.js +149 -65
- package/modern/ChartContainer/index.js +3 -0
- package/modern/ChartsAxis/ChartsAxis.js +16 -0
- package/modern/ChartsLegend/ChartsLegend.js +188 -142
- package/modern/ChartsSurface.js +3 -11
- package/modern/ChartsXAxis/ChartsXAxis.js +148 -37
- package/modern/ChartsYAxis/ChartsYAxis.js +73 -30
- package/modern/LineChart/AreaElement.js +10 -0
- package/modern/LineChart/AreaPlot.js +11 -0
- package/modern/LineChart/LineChart.js +38 -8
- package/modern/LineChart/LineElement.js +10 -0
- package/modern/LineChart/LineHighlightElement.js +10 -0
- package/modern/LineChart/LineHighlightPlot.js +10 -0
- package/modern/LineChart/LinePlot.js +10 -0
- package/modern/LineChart/MarkElement.js +10 -0
- package/modern/LineChart/MarkPlot.js +10 -0
- package/modern/PieChart/PieChart.js +39 -8
- 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 +38 -8
- package/modern/ScatterChart/ScatterPlot.js +10 -0
- package/modern/SparkLineChart/SparkLineChart.js +14 -0
- package/modern/constants.js +1 -1
- package/modern/context/CartesianContextProvider.js +19 -11
- package/modern/context/DrawingProvider.js +2 -0
- package/modern/hooks/useChartDimensions.js +2 -0
- package/modern/hooks/useMounted.js +16 -0
- package/modern/hooks/useReducedMotion.js +27 -0
- package/modern/hooks/useTicks.js +15 -9
- package/modern/index.js +1 -1
- package/modern/internals/components/AxisSharedComponents.js +15 -70
- package/modern/internals/components/ChartsText.js +75 -0
- package/modern/internals/domUtils.js +113 -0
- package/modern/internals/geometry.js +36 -0
- package/package.json +5 -3
package/PieChart/PieChart.js
CHANGED
|
@@ -16,14 +16,25 @@ var _ChartsLegend = require("../ChartsLegend");
|
|
|
16
16
|
var _ChartsAxisHighlight = require("../ChartsAxisHighlight");
|
|
17
17
|
var _PiePlot = require("./PiePlot");
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
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
21
|
const defaultMargin = {
|
|
22
22
|
top: 5,
|
|
23
23
|
bottom: 5,
|
|
24
24
|
left: 5,
|
|
25
25
|
right: 100
|
|
26
26
|
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Demos:
|
|
30
|
+
*
|
|
31
|
+
* - [Pie](https://mui.com/x/react-charts/pie/)
|
|
32
|
+
* - [Pie demonstration](https://mui.com/x/react-charts/pie-demo/)
|
|
33
|
+
*
|
|
34
|
+
* API:
|
|
35
|
+
*
|
|
36
|
+
* - [PieChart API](https://mui.com/x/api/charts/pie-chart/)
|
|
37
|
+
*/
|
|
27
38
|
function PieChart(props) {
|
|
28
39
|
const {
|
|
29
40
|
xAxis,
|
|
@@ -113,11 +124,15 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
113
124
|
fill: _propTypes.default.string,
|
|
114
125
|
label: _propTypes.default.string,
|
|
115
126
|
labelFontSize: _propTypes.default.number,
|
|
127
|
+
labelStyle: _propTypes.default.object,
|
|
116
128
|
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
117
129
|
slotProps: _propTypes.default.object,
|
|
118
130
|
slots: _propTypes.default.object,
|
|
119
131
|
stroke: _propTypes.default.string,
|
|
120
132
|
tickFontSize: _propTypes.default.number,
|
|
133
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
134
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
135
|
+
tickLabelStyle: _propTypes.default.object,
|
|
121
136
|
tickMaxStep: _propTypes.default.number,
|
|
122
137
|
tickMinStep: _propTypes.default.number,
|
|
123
138
|
tickNumber: _propTypes.default.number,
|
|
@@ -146,33 +161,33 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
146
161
|
fill: _propTypes.default.string,
|
|
147
162
|
label: _propTypes.default.string,
|
|
148
163
|
labelFontSize: _propTypes.default.number,
|
|
164
|
+
labelStyle: _propTypes.default.object,
|
|
149
165
|
position: _propTypes.default.oneOf(['left', 'right']),
|
|
150
166
|
slotProps: _propTypes.default.object,
|
|
151
167
|
slots: _propTypes.default.object,
|
|
152
168
|
stroke: _propTypes.default.string,
|
|
153
169
|
tickFontSize: _propTypes.default.number,
|
|
170
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
171
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
172
|
+
tickLabelStyle: _propTypes.default.object,
|
|
154
173
|
tickMaxStep: _propTypes.default.number,
|
|
155
174
|
tickMinStep: _propTypes.default.number,
|
|
156
175
|
tickNumber: _propTypes.default.number,
|
|
157
176
|
tickSize: _propTypes.default.number
|
|
158
177
|
}), _propTypes.default.string]),
|
|
178
|
+
/**
|
|
179
|
+
* @deprecated Consider using `slotProps.legend` instead.
|
|
180
|
+
*/
|
|
159
181
|
legend: _propTypes.default.shape({
|
|
160
182
|
classes: _propTypes.default.object,
|
|
161
183
|
direction: _propTypes.default.oneOf(['column', 'row']),
|
|
162
184
|
hidden: _propTypes.default.bool,
|
|
163
|
-
itemWidth: _propTypes.default.number,
|
|
164
|
-
markSize: _propTypes.default.number,
|
|
165
|
-
offset: _propTypes.default.shape({
|
|
166
|
-
x: _propTypes.default.number,
|
|
167
|
-
y: _propTypes.default.number
|
|
168
|
-
}),
|
|
169
185
|
position: _propTypes.default.shape({
|
|
170
186
|
horizontal: _propTypes.default.oneOf(['left', 'middle', 'right']).isRequired,
|
|
171
187
|
vertical: _propTypes.default.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
172
188
|
}),
|
|
173
189
|
slotProps: _propTypes.default.object,
|
|
174
|
-
slots: _propTypes.default.object
|
|
175
|
-
spacing: _propTypes.default.number
|
|
190
|
+
slots: _propTypes.default.object
|
|
176
191
|
}),
|
|
177
192
|
margin: _propTypes.default.shape({
|
|
178
193
|
bottom: _propTypes.default.number,
|
|
@@ -194,11 +209,15 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
194
209
|
fill: _propTypes.default.string,
|
|
195
210
|
label: _propTypes.default.string,
|
|
196
211
|
labelFontSize: _propTypes.default.number,
|
|
212
|
+
labelStyle: _propTypes.default.object,
|
|
197
213
|
position: _propTypes.default.oneOf(['left', 'right']),
|
|
198
214
|
slotProps: _propTypes.default.object,
|
|
199
215
|
slots: _propTypes.default.object,
|
|
200
216
|
stroke: _propTypes.default.string,
|
|
201
217
|
tickFontSize: _propTypes.default.number,
|
|
218
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
219
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
220
|
+
tickLabelStyle: _propTypes.default.object,
|
|
202
221
|
tickMaxStep: _propTypes.default.number,
|
|
203
222
|
tickMinStep: _propTypes.default.number,
|
|
204
223
|
tickNumber: _propTypes.default.number,
|
|
@@ -272,11 +291,15 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
272
291
|
fill: _propTypes.default.string,
|
|
273
292
|
label: _propTypes.default.string,
|
|
274
293
|
labelFontSize: _propTypes.default.number,
|
|
294
|
+
labelStyle: _propTypes.default.object,
|
|
275
295
|
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
276
296
|
slotProps: _propTypes.default.object,
|
|
277
297
|
slots: _propTypes.default.object,
|
|
278
298
|
stroke: _propTypes.default.string,
|
|
279
299
|
tickFontSize: _propTypes.default.number,
|
|
300
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
301
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
302
|
+
tickLabelStyle: _propTypes.default.object,
|
|
280
303
|
tickMaxStep: _propTypes.default.number,
|
|
281
304
|
tickMinStep: _propTypes.default.number,
|
|
282
305
|
tickNumber: _propTypes.default.number,
|
|
@@ -301,6 +324,7 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
301
324
|
id: _propTypes.default.string,
|
|
302
325
|
label: _propTypes.default.string,
|
|
303
326
|
labelFontSize: _propTypes.default.number,
|
|
327
|
+
labelStyle: _propTypes.default.object,
|
|
304
328
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
305
329
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
306
330
|
position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
|
|
@@ -309,6 +333,9 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
309
333
|
slots: _propTypes.default.object,
|
|
310
334
|
stroke: _propTypes.default.string,
|
|
311
335
|
tickFontSize: _propTypes.default.number,
|
|
336
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
337
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
338
|
+
tickLabelStyle: _propTypes.default.object,
|
|
312
339
|
tickMaxStep: _propTypes.default.number,
|
|
313
340
|
tickMinStep: _propTypes.default.number,
|
|
314
341
|
tickNumber: _propTypes.default.number,
|
|
@@ -327,6 +354,7 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
327
354
|
id: _propTypes.default.string,
|
|
328
355
|
label: _propTypes.default.string,
|
|
329
356
|
labelFontSize: _propTypes.default.number,
|
|
357
|
+
labelStyle: _propTypes.default.object,
|
|
330
358
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
331
359
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
332
360
|
position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
|
|
@@ -335,6 +363,9 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
335
363
|
slots: _propTypes.default.object,
|
|
336
364
|
stroke: _propTypes.default.string,
|
|
337
365
|
tickFontSize: _propTypes.default.number,
|
|
366
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
367
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
368
|
+
tickLabelStyle: _propTypes.default.object,
|
|
338
369
|
tickMaxStep: _propTypes.default.number,
|
|
339
370
|
tickMinStep: _propTypes.default.number,
|
|
340
371
|
tickNumber: _propTypes.default.number,
|
package/PieChart/PiePlot.d.ts
CHANGED
|
@@ -29,6 +29,16 @@ export interface PiePlotProps {
|
|
|
29
29
|
*/
|
|
30
30
|
onClick?: (event: React.MouseEvent<SVGPathElement, MouseEvent>, pieItemIdentifier: PieItemIdentifier, item: DefaultizedPieValueType) => void;
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Demos:
|
|
34
|
+
*
|
|
35
|
+
* - [Pie](https://mui.com/x/react-charts/pie/)
|
|
36
|
+
* - [Pie demonstration](https://mui.com/x/react-charts/pie-demo/)
|
|
37
|
+
*
|
|
38
|
+
* API:
|
|
39
|
+
*
|
|
40
|
+
* - [PiePlot API](https://mui.com/x/api/charts/pie-plot/)
|
|
41
|
+
*/
|
|
32
42
|
declare function PiePlot(props: PiePlotProps): React.JSX.Element | null;
|
|
33
43
|
declare namespace PiePlot {
|
|
34
44
|
var propTypes: any;
|
package/PieChart/PiePlot.js
CHANGED
|
@@ -14,8 +14,8 @@ var _PieArc = _interopRequireDefault(require("./PieArc"));
|
|
|
14
14
|
var _PieArcLabel = _interopRequireDefault(require("./PieArcLabel"));
|
|
15
15
|
var _DrawingProvider = require("../context/DrawingProvider");
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
function _getRequireWildcardCache(
|
|
18
|
-
function _interopRequireWildcard(
|
|
17
|
+
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); }
|
|
18
|
+
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; }
|
|
19
19
|
const RATIO = 180 / Math.PI;
|
|
20
20
|
function getItemLabel(arcLabel, arcLabelMinAngle, item) {
|
|
21
21
|
if (!arcLabel) {
|
|
@@ -30,6 +30,16 @@ function getItemLabel(arcLabel, arcLabelMinAngle, item) {
|
|
|
30
30
|
}
|
|
31
31
|
return arcLabel(item);
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Demos:
|
|
35
|
+
*
|
|
36
|
+
* - [Pie](https://mui.com/x/react-charts/pie/)
|
|
37
|
+
* - [Pie demonstration](https://mui.com/x/react-charts/pie-demo/)
|
|
38
|
+
*
|
|
39
|
+
* API:
|
|
40
|
+
*
|
|
41
|
+
* - [PiePlot API](https://mui.com/x/api/charts/pie-plot/)
|
|
42
|
+
*/
|
|
33
43
|
function PiePlot(props) {
|
|
34
44
|
const {
|
|
35
45
|
slots,
|
|
@@ -14,8 +14,8 @@ var _styles = require("@mui/material/styles");
|
|
|
14
14
|
var _ChartContainer = require("../ChartContainer");
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
16
|
const _excluded = ["width", "height"];
|
|
17
|
-
function _getRequireWildcardCache(
|
|
18
|
-
function _interopRequireWildcard(
|
|
17
|
+
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); }
|
|
18
|
+
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; }
|
|
19
19
|
const useChartDimensions = (inWidth, inHeight) => {
|
|
20
20
|
const rootRef = React.useRef(null);
|
|
21
21
|
const displayError = React.useRef(false);
|
|
@@ -112,10 +112,10 @@ const ResponsiveChartContainer = exports.ResponsiveChartContainer = /*#__PURE__*
|
|
|
112
112
|
width: inWidth,
|
|
113
113
|
height: inHeight
|
|
114
114
|
},
|
|
115
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartContainer.ChartContainer, (0, _extends2.default)({}, other, {
|
|
115
|
+
children: width && height ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartContainer.ChartContainer, (0, _extends2.default)({}, other, {
|
|
116
116
|
width: width,
|
|
117
117
|
height: height,
|
|
118
118
|
ref: ref
|
|
119
|
-
}))
|
|
119
|
+
})) : null
|
|
120
120
|
});
|
|
121
121
|
});
|
|
@@ -8,6 +8,16 @@ export interface ScatterProps {
|
|
|
8
8
|
markerSize: number;
|
|
9
9
|
color: string;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Demos:
|
|
13
|
+
*
|
|
14
|
+
* - [Scatter](https://mui.com/x/react-charts/scatter/)
|
|
15
|
+
* - [Scatter demonstration](https://mui.com/x/react-charts/scatter-demo/)
|
|
16
|
+
*
|
|
17
|
+
* API:
|
|
18
|
+
*
|
|
19
|
+
* - [Scatter API](https://mui.com/x/api/charts/scatter/)
|
|
20
|
+
*/
|
|
11
21
|
declare function Scatter(props: ScatterProps): React.JSX.Element;
|
|
12
22
|
declare namespace Scatter {
|
|
13
23
|
var propTypes: any;
|
package/ScatterChart/Scatter.js
CHANGED
|
@@ -12,8 +12,18 @@ var _useScale = require("../hooks/useScale");
|
|
|
12
12
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
13
13
|
var _InteractionProvider = require("../context/InteractionProvider");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
|
+
/**
|
|
18
|
+
* Demos:
|
|
19
|
+
*
|
|
20
|
+
* - [Scatter](https://mui.com/x/react-charts/scatter/)
|
|
21
|
+
* - [Scatter demonstration](https://mui.com/x/react-charts/scatter-demo/)
|
|
22
|
+
*
|
|
23
|
+
* API:
|
|
24
|
+
*
|
|
25
|
+
* - [Scatter API](https://mui.com/x/api/charts/scatter/)
|
|
26
|
+
*/
|
|
17
27
|
function Scatter(props) {
|
|
18
28
|
const {
|
|
19
29
|
series,
|
|
@@ -16,6 +16,9 @@ export interface ScatterChartProps extends Omit<ResponsiveChartContainerProps, '
|
|
|
16
16
|
series: MakeOptional<ScatterSeriesType, 'type'>[];
|
|
17
17
|
tooltip?: ChartsTooltipProps;
|
|
18
18
|
axisHighlight?: ChartsAxisHighlightProps;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Consider using `slotProps.legend` instead.
|
|
21
|
+
*/
|
|
19
22
|
legend?: ChartsLegendProps;
|
|
20
23
|
/**
|
|
21
24
|
* Overridable component slots.
|
|
@@ -28,5 +31,15 @@ export interface ScatterChartProps extends Omit<ResponsiveChartContainerProps, '
|
|
|
28
31
|
*/
|
|
29
32
|
slotProps?: ScatterChartSlotComponentProps;
|
|
30
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Demos:
|
|
36
|
+
*
|
|
37
|
+
* - [Scatter](https://mui.com/x/react-charts/scatter/)
|
|
38
|
+
* - [Scatter demonstration](https://mui.com/x/react-charts/scatter-demo/)
|
|
39
|
+
*
|
|
40
|
+
* API:
|
|
41
|
+
*
|
|
42
|
+
* - [ScatterChart API](https://mui.com/x/api/charts/scatter-chart/)
|
|
43
|
+
*/
|
|
31
44
|
declare const ScatterChart: React.ForwardRefExoticComponent<ScatterChartProps & React.RefAttributes<unknown>>;
|
|
32
45
|
export { ScatterChart };
|
|
@@ -15,8 +15,18 @@ var _ChartsTooltip = require("../ChartsTooltip");
|
|
|
15
15
|
var _ChartsLegend = require("../ChartsLegend");
|
|
16
16
|
var _ChartsAxisHighlight = require("../ChartsAxisHighlight");
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
function _getRequireWildcardCache(
|
|
19
|
-
function _interopRequireWildcard(
|
|
18
|
+
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); }
|
|
19
|
+
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; }
|
|
20
|
+
/**
|
|
21
|
+
* Demos:
|
|
22
|
+
*
|
|
23
|
+
* - [Scatter](https://mui.com/x/react-charts/scatter/)
|
|
24
|
+
* - [Scatter demonstration](https://mui.com/x/react-charts/scatter-demo/)
|
|
25
|
+
*
|
|
26
|
+
* API:
|
|
27
|
+
*
|
|
28
|
+
* - [ScatterChart API](https://mui.com/x/api/charts/scatter-chart/)
|
|
29
|
+
*/
|
|
20
30
|
const ScatterChart = exports.ScatterChart = /*#__PURE__*/React.forwardRef(function ScatterChart(props, ref) {
|
|
21
31
|
const {
|
|
22
32
|
xAxis,
|
|
@@ -93,11 +103,15 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
93
103
|
fill: _propTypes.default.string,
|
|
94
104
|
label: _propTypes.default.string,
|
|
95
105
|
labelFontSize: _propTypes.default.number,
|
|
106
|
+
labelStyle: _propTypes.default.object,
|
|
96
107
|
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
97
108
|
slotProps: _propTypes.default.object,
|
|
98
109
|
slots: _propTypes.default.object,
|
|
99
110
|
stroke: _propTypes.default.string,
|
|
100
111
|
tickFontSize: _propTypes.default.number,
|
|
112
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
113
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
114
|
+
tickLabelStyle: _propTypes.default.object,
|
|
101
115
|
tickMaxStep: _propTypes.default.number,
|
|
102
116
|
tickMinStep: _propTypes.default.number,
|
|
103
117
|
tickNumber: _propTypes.default.number,
|
|
@@ -126,33 +140,33 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
126
140
|
fill: _propTypes.default.string,
|
|
127
141
|
label: _propTypes.default.string,
|
|
128
142
|
labelFontSize: _propTypes.default.number,
|
|
143
|
+
labelStyle: _propTypes.default.object,
|
|
129
144
|
position: _propTypes.default.oneOf(['left', 'right']),
|
|
130
145
|
slotProps: _propTypes.default.object,
|
|
131
146
|
slots: _propTypes.default.object,
|
|
132
147
|
stroke: _propTypes.default.string,
|
|
133
148
|
tickFontSize: _propTypes.default.number,
|
|
149
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
150
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
151
|
+
tickLabelStyle: _propTypes.default.object,
|
|
134
152
|
tickMaxStep: _propTypes.default.number,
|
|
135
153
|
tickMinStep: _propTypes.default.number,
|
|
136
154
|
tickNumber: _propTypes.default.number,
|
|
137
155
|
tickSize: _propTypes.default.number
|
|
138
156
|
}), _propTypes.default.string]),
|
|
157
|
+
/**
|
|
158
|
+
* @deprecated Consider using `slotProps.legend` instead.
|
|
159
|
+
*/
|
|
139
160
|
legend: _propTypes.default.shape({
|
|
140
161
|
classes: _propTypes.default.object,
|
|
141
162
|
direction: _propTypes.default.oneOf(['column', 'row']),
|
|
142
163
|
hidden: _propTypes.default.bool,
|
|
143
|
-
itemWidth: _propTypes.default.number,
|
|
144
|
-
markSize: _propTypes.default.number,
|
|
145
|
-
offset: _propTypes.default.shape({
|
|
146
|
-
x: _propTypes.default.number,
|
|
147
|
-
y: _propTypes.default.number
|
|
148
|
-
}),
|
|
149
164
|
position: _propTypes.default.shape({
|
|
150
165
|
horizontal: _propTypes.default.oneOf(['left', 'middle', 'right']).isRequired,
|
|
151
166
|
vertical: _propTypes.default.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
152
167
|
}),
|
|
153
168
|
slotProps: _propTypes.default.object,
|
|
154
|
-
slots: _propTypes.default.object
|
|
155
|
-
spacing: _propTypes.default.number
|
|
169
|
+
slots: _propTypes.default.object
|
|
156
170
|
}),
|
|
157
171
|
margin: _propTypes.default.shape({
|
|
158
172
|
bottom: _propTypes.default.number,
|
|
@@ -173,11 +187,15 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
173
187
|
fill: _propTypes.default.string,
|
|
174
188
|
label: _propTypes.default.string,
|
|
175
189
|
labelFontSize: _propTypes.default.number,
|
|
190
|
+
labelStyle: _propTypes.default.object,
|
|
176
191
|
position: _propTypes.default.oneOf(['left', 'right']),
|
|
177
192
|
slotProps: _propTypes.default.object,
|
|
178
193
|
slots: _propTypes.default.object,
|
|
179
194
|
stroke: _propTypes.default.string,
|
|
180
195
|
tickFontSize: _propTypes.default.number,
|
|
196
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
197
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
198
|
+
tickLabelStyle: _propTypes.default.object,
|
|
181
199
|
tickMaxStep: _propTypes.default.number,
|
|
182
200
|
tickMinStep: _propTypes.default.number,
|
|
183
201
|
tickNumber: _propTypes.default.number,
|
|
@@ -235,11 +253,15 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
235
253
|
fill: _propTypes.default.string,
|
|
236
254
|
label: _propTypes.default.string,
|
|
237
255
|
labelFontSize: _propTypes.default.number,
|
|
256
|
+
labelStyle: _propTypes.default.object,
|
|
238
257
|
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
239
258
|
slotProps: _propTypes.default.object,
|
|
240
259
|
slots: _propTypes.default.object,
|
|
241
260
|
stroke: _propTypes.default.string,
|
|
242
261
|
tickFontSize: _propTypes.default.number,
|
|
262
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
263
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
264
|
+
tickLabelStyle: _propTypes.default.object,
|
|
243
265
|
tickMaxStep: _propTypes.default.number,
|
|
244
266
|
tickMinStep: _propTypes.default.number,
|
|
245
267
|
tickNumber: _propTypes.default.number,
|
|
@@ -264,6 +286,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
264
286
|
id: _propTypes.default.string,
|
|
265
287
|
label: _propTypes.default.string,
|
|
266
288
|
labelFontSize: _propTypes.default.number,
|
|
289
|
+
labelStyle: _propTypes.default.object,
|
|
267
290
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
268
291
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
269
292
|
position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
|
|
@@ -272,6 +295,9 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
272
295
|
slots: _propTypes.default.object,
|
|
273
296
|
stroke: _propTypes.default.string,
|
|
274
297
|
tickFontSize: _propTypes.default.number,
|
|
298
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
299
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
300
|
+
tickLabelStyle: _propTypes.default.object,
|
|
275
301
|
tickMaxStep: _propTypes.default.number,
|
|
276
302
|
tickMinStep: _propTypes.default.number,
|
|
277
303
|
tickNumber: _propTypes.default.number,
|
|
@@ -290,6 +316,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
290
316
|
id: _propTypes.default.string,
|
|
291
317
|
label: _propTypes.default.string,
|
|
292
318
|
labelFontSize: _propTypes.default.number,
|
|
319
|
+
labelStyle: _propTypes.default.object,
|
|
293
320
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
294
321
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
295
322
|
position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
|
|
@@ -298,6 +325,9 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
298
325
|
slots: _propTypes.default.object,
|
|
299
326
|
stroke: _propTypes.default.string,
|
|
300
327
|
tickFontSize: _propTypes.default.number,
|
|
328
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
329
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
330
|
+
tickLabelStyle: _propTypes.default.object,
|
|
301
331
|
tickMaxStep: _propTypes.default.number,
|
|
302
332
|
tickMinStep: _propTypes.default.number,
|
|
303
333
|
tickNumber: _propTypes.default.number,
|
|
@@ -18,6 +18,16 @@ export interface ScatterPlotProps {
|
|
|
18
18
|
*/
|
|
19
19
|
slotProps?: ScatterPlotSlotComponentProps;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Demos:
|
|
23
|
+
*
|
|
24
|
+
* - [Scatter](https://mui.com/x/react-charts/scatter/)
|
|
25
|
+
* - [Scatter demonstration](https://mui.com/x/react-charts/scatter-demo/)
|
|
26
|
+
*
|
|
27
|
+
* API:
|
|
28
|
+
*
|
|
29
|
+
* - [ScatterPlot API](https://mui.com/x/api/charts/scatter-plot/)
|
|
30
|
+
*/
|
|
21
31
|
declare function ScatterPlot(props: ScatterPlotProps): React.JSX.Element | null;
|
|
22
32
|
declare namespace ScatterPlot {
|
|
23
33
|
var propTypes: any;
|
|
@@ -12,8 +12,18 @@ var _Scatter = require("./Scatter");
|
|
|
12
12
|
var _SeriesContextProvider = require("../context/SeriesContextProvider");
|
|
13
13
|
var _CartesianContextProvider = require("../context/CartesianContextProvider");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
|
+
/**
|
|
18
|
+
* Demos:
|
|
19
|
+
*
|
|
20
|
+
* - [Scatter](https://mui.com/x/react-charts/scatter/)
|
|
21
|
+
* - [Scatter demonstration](https://mui.com/x/react-charts/scatter-demo/)
|
|
22
|
+
*
|
|
23
|
+
* API:
|
|
24
|
+
*
|
|
25
|
+
* - [ScatterPlot API](https://mui.com/x/api/charts/scatter-plot/)
|
|
26
|
+
*/
|
|
17
27
|
function ScatterPlot(props) {
|
|
18
28
|
const {
|
|
19
29
|
slots,
|
|
@@ -70,5 +70,14 @@ export interface SparkLineChartProps extends Omit<ResponsiveChartContainerProps,
|
|
|
70
70
|
*/
|
|
71
71
|
slotProps?: SparkLineChartSlotComponentProps;
|
|
72
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Demos:
|
|
75
|
+
*
|
|
76
|
+
* - [SparkLine](https://mui.com/x/react-charts/sparkline/)
|
|
77
|
+
*
|
|
78
|
+
* API:
|
|
79
|
+
*
|
|
80
|
+
* - [SparkLineChart API](https://mui.com/x/api/charts/spark-line-chart/)
|
|
81
|
+
*/
|
|
73
82
|
declare const SparkLineChart: React.ForwardRefExoticComponent<SparkLineChartProps & React.RefAttributes<unknown>>;
|
|
74
83
|
export { SparkLineChart };
|
|
@@ -15,14 +15,24 @@ var _constants = require("../constants");
|
|
|
15
15
|
var _ChartsTooltip = require("../ChartsTooltip");
|
|
16
16
|
var _ChartsAxisHighlight = require("../ChartsAxisHighlight");
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
function _getRequireWildcardCache(
|
|
19
|
-
function _interopRequireWildcard(
|
|
18
|
+
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); }
|
|
19
|
+
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; }
|
|
20
20
|
const SPARKLINE_DEFAULT_MARGIN = {
|
|
21
21
|
top: 5,
|
|
22
22
|
bottom: 5,
|
|
23
23
|
left: 5,
|
|
24
24
|
right: 5
|
|
25
25
|
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Demos:
|
|
29
|
+
*
|
|
30
|
+
* - [SparkLine](https://mui.com/x/react-charts/sparkline/)
|
|
31
|
+
*
|
|
32
|
+
* API:
|
|
33
|
+
*
|
|
34
|
+
* - [SparkLineChart API](https://mui.com/x/api/charts/spark-line-chart/)
|
|
35
|
+
*/
|
|
26
36
|
const SparkLineChart = exports.SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(props, ref) {
|
|
27
37
|
const {
|
|
28
38
|
xAxis,
|
|
@@ -203,6 +213,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
203
213
|
id: _propTypes.default.string,
|
|
204
214
|
label: _propTypes.default.string,
|
|
205
215
|
labelFontSize: _propTypes.default.number,
|
|
216
|
+
labelStyle: _propTypes.default.object,
|
|
206
217
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
207
218
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
208
219
|
position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
|
|
@@ -211,6 +222,9 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
211
222
|
slots: _propTypes.default.object,
|
|
212
223
|
stroke: _propTypes.default.string,
|
|
213
224
|
tickFontSize: _propTypes.default.number,
|
|
225
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
226
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
227
|
+
tickLabelStyle: _propTypes.default.object,
|
|
214
228
|
tickMaxStep: _propTypes.default.number,
|
|
215
229
|
tickMinStep: _propTypes.default.number,
|
|
216
230
|
tickNumber: _propTypes.default.number,
|
package/constants.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.DEFAULT_Y_AXIS_KEY = exports.DEFAULT_X_AXIS_KEY = exports.DEFAULT_MARGIN
|
|
|
7
7
|
const DEFAULT_X_AXIS_KEY = exports.DEFAULT_X_AXIS_KEY = 'DEFAULT_X_AXIS_KEY';
|
|
8
8
|
const DEFAULT_Y_AXIS_KEY = exports.DEFAULT_Y_AXIS_KEY = 'DEFAULT_Y_AXIS_KEY';
|
|
9
9
|
const DEFAULT_MARGINS = exports.DEFAULT_MARGINS = {
|
|
10
|
-
top:
|
|
10
|
+
top: 50,
|
|
11
11
|
bottom: 50,
|
|
12
12
|
left: 50,
|
|
13
13
|
right: 50
|