@mui/x-charts-pro 7.0.0-alpha.2 → 7.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChartPro/BarChartPro.js +47 -54
- package/BarChartPro/index.js +1 -1
- package/CHANGELOG.md +167 -1
- package/ChartContainerPro/ChartContainerPro.js +4 -4
- package/ChartContainerPro/index.js +1 -1
- package/Heatmap/DefaultHeatmapTooltip.js +1 -1
- package/Heatmap/Heatmap.js +11 -6
- package/Heatmap/HeatmapItem.js +1 -1
- package/Heatmap/HeatmapPlot.js +2 -2
- package/Heatmap/index.js +4 -4
- package/Heatmap/plugin.js +3 -3
- package/LineChartPro/LineChartPro.js +63 -112
- package/LineChartPro/index.js +1 -1
- package/ResponsiveChartContainerPro/ResponsiveChartContainerPro.js +3 -3
- package/ResponsiveChartContainerPro/index.js +1 -1
- package/ScatterChartPro/ScatterChartPro.js +20 -4
- package/ScatterChartPro/index.js +1 -1
- package/context/CartesianProviderPro/CartesianProviderPro.js +2 -2
- package/context/CartesianProviderPro/createAxisFilterMapper.js +1 -2
- package/context/CartesianProviderPro/index.js +1 -1
- package/context/ZoomProvider/ZoomProvider.js +3 -3
- package/context/ZoomProvider/ZoomSetup.js +2 -2
- package/context/ZoomProvider/index.js +3 -3
- package/context/ZoomProvider/useSetupPan.js +1 -1
- package/context/ZoomProvider/useSetupZoom.js +1 -1
- package/context/ZoomProvider/useZoom.js +1 -1
- package/context/index.js +2 -2
- package/hooks/index.js +1 -1
- package/index.js +9 -9
- package/internals/utils/releaseInfo.js +1 -1
- package/models/index.js +1 -1
- package/models/seriesType/index.js +1 -1
- package/modern/BarChartPro/BarChartPro.js +47 -54
- package/modern/BarChartPro/index.js +1 -1
- package/modern/ChartContainerPro/ChartContainerPro.js +4 -4
- package/modern/ChartContainerPro/index.js +1 -1
- package/modern/Heatmap/DefaultHeatmapTooltip.js +1 -1
- package/modern/Heatmap/Heatmap.js +11 -6
- package/modern/Heatmap/HeatmapItem.js +1 -1
- package/modern/Heatmap/HeatmapPlot.js +2 -2
- package/modern/Heatmap/index.js +4 -4
- package/modern/Heatmap/plugin.js +3 -3
- package/modern/LineChartPro/LineChartPro.js +63 -112
- package/modern/LineChartPro/index.js +1 -1
- package/modern/ResponsiveChartContainerPro/ResponsiveChartContainerPro.js +3 -3
- package/modern/ResponsiveChartContainerPro/index.js +1 -1
- package/modern/ScatterChartPro/ScatterChartPro.js +20 -4
- package/modern/ScatterChartPro/index.js +1 -1
- package/modern/context/CartesianProviderPro/CartesianProviderPro.js +2 -2
- package/modern/context/CartesianProviderPro/createAxisFilterMapper.js +1 -2
- package/modern/context/CartesianProviderPro/index.js +1 -1
- package/modern/context/ZoomProvider/ZoomProvider.js +3 -3
- package/modern/context/ZoomProvider/ZoomSetup.js +2 -2
- package/modern/context/ZoomProvider/index.js +3 -3
- package/modern/context/ZoomProvider/useSetupPan.js +1 -1
- package/modern/context/ZoomProvider/useSetupZoom.js +1 -1
- package/modern/context/ZoomProvider/useZoom.js +1 -1
- package/modern/context/index.js +2 -2
- package/modern/hooks/index.js +1 -1
- package/modern/index.js +9 -9
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/modern/models/index.js +1 -1
- package/modern/models/seriesType/index.js +1 -1
- package/modern/themeAugmentation/index.js +0 -0
- package/modern/typeOverloads/index.js +1 -1
- package/node/BarChartPro/BarChartPro.js +46 -54
- package/node/ChartContainerPro/ChartContainerPro.js +2 -3
- package/node/ChartContainerPro/useChartContainerProProps.js +1 -1
- package/node/Heatmap/DefaultHeatmapTooltip.js +3 -4
- package/node/Heatmap/Heatmap.js +9 -5
- package/node/Heatmap/HeatmapItem.js +2 -3
- package/node/Heatmap/HeatmapPlot.js +2 -3
- package/node/Heatmap/formatter.js +1 -1
- package/node/Heatmap/heatmapClasses.js +1 -1
- package/node/Heatmap/plugin.js +1 -1
- package/node/LineChartPro/LineChartPro.js +62 -112
- package/node/ResponsiveChartContainerPro/ResponsiveChartContainerPro.js +2 -3
- package/node/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.js +1 -1
- package/node/ScatterChartPro/ScatterChartPro.js +20 -5
- package/node/context/CartesianProviderPro/CartesianProviderPro.js +2 -3
- package/node/context/CartesianProviderPro/createAxisFilterMapper.js +1 -2
- package/node/context/ZoomProvider/ZoomContext.js +1 -2
- package/node/context/ZoomProvider/ZoomProvider.js +2 -3
- package/node/context/ZoomProvider/defaultizeZoom.js +1 -1
- package/node/context/ZoomProvider/useSetupPan.js +2 -3
- package/node/context/ZoomProvider/useSetupZoom.js +1 -2
- package/node/context/ZoomProvider/useZoom.js +1 -2
- package/node/hooks/useSeries.js +1 -2
- package/node/index.js +1 -1
- package/node/internals/utils/releaseInfo.js +1 -1
- package/node/themeAugmentation/index.js +1 -0
- package/package.json +8 -7
- package/themeAugmentation/components.d.ts +25 -0
- package/themeAugmentation/index.d.ts +4 -0
- package/themeAugmentation/index.js +0 -0
- package/themeAugmentation/overrides.d.ts +13 -0
- package/themeAugmentation/package.json +6 -0
- package/themeAugmentation/props.d.ts +22 -0
- package/typeOverloads/index.js +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
const _excluded = ["zoom", "onZoomChange"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
+
import { useThemeProps } from '@mui/material/styles';
|
|
6
7
|
import { AreaPlot, LineHighlightPlot, LinePlot, MarkPlot } from '@mui/x-charts/LineChart';
|
|
7
8
|
import { ChartsOnAxisClickHandler } from '@mui/x-charts/ChartsOnAxisClickHandler';
|
|
8
9
|
import { ChartsGrid } from '@mui/x-charts/ChartsGrid';
|
|
@@ -13,10 +14,34 @@ import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
|
|
|
13
14
|
import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
|
|
14
15
|
import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
|
|
15
16
|
import { useLineChartProps } from '@mui/x-charts/internals';
|
|
16
|
-
import { ResponsiveChartContainerPro } from
|
|
17
|
-
import { ZoomSetup } from
|
|
18
|
-
import { useZoom } from
|
|
17
|
+
import { ResponsiveChartContainerPro } from "../ResponsiveChartContainerPro/index.js";
|
|
18
|
+
import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
|
|
19
|
+
import { useZoom } from "../context/ZoomProvider/useZoom.js";
|
|
19
20
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
+
function AreaPlotZoom(props) {
|
|
22
|
+
const {
|
|
23
|
+
isInteracting
|
|
24
|
+
} = useZoom();
|
|
25
|
+
return /*#__PURE__*/_jsx(AreaPlot, _extends({}, props, {
|
|
26
|
+
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
function LinePlotZoom(props) {
|
|
30
|
+
const {
|
|
31
|
+
isInteracting
|
|
32
|
+
} = useZoom();
|
|
33
|
+
return /*#__PURE__*/_jsx(LinePlot, _extends({}, props, {
|
|
34
|
+
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
function MarkPlotZoom(props) {
|
|
38
|
+
const {
|
|
39
|
+
isInteracting
|
|
40
|
+
} = useZoom();
|
|
41
|
+
return /*#__PURE__*/_jsx(MarkPlot, _extends({}, props, {
|
|
42
|
+
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
20
45
|
/**
|
|
21
46
|
* Demos:
|
|
22
47
|
*
|
|
@@ -27,7 +52,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
27
52
|
*
|
|
28
53
|
* - [LineChart API](https://mui.com/x/api/charts/line-chart/)
|
|
29
54
|
*/
|
|
30
|
-
const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(
|
|
55
|
+
const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps, ref) {
|
|
56
|
+
const props = useThemeProps({
|
|
57
|
+
props: inProps,
|
|
58
|
+
name: 'MuiLineChartPro'
|
|
59
|
+
});
|
|
31
60
|
const {
|
|
32
61
|
zoom,
|
|
33
62
|
onZoomChange
|
|
@@ -55,7 +84,7 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(props,
|
|
|
55
84
|
}, chartContainerProps, {
|
|
56
85
|
zoom: zoom,
|
|
57
86
|
onZoomChange: onZoomChange,
|
|
58
|
-
children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)),
|
|
87
|
+
children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
59
88
|
children: [/*#__PURE__*/_jsx(AreaPlotZoom, _extends({}, areaPlotProps)), /*#__PURE__*/_jsx(LinePlotZoom, _extends({}, linePlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
|
|
60
89
|
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx("g", {
|
|
61
90
|
"data-drawing-container": true,
|
|
@@ -136,6 +165,17 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
136
165
|
classes: PropTypes.object,
|
|
137
166
|
direction: PropTypes.oneOf(['column', 'row']),
|
|
138
167
|
hidden: PropTypes.bool,
|
|
168
|
+
itemGap: PropTypes.number,
|
|
169
|
+
itemMarkHeight: PropTypes.number,
|
|
170
|
+
itemMarkWidth: PropTypes.number,
|
|
171
|
+
labelStyle: PropTypes.object,
|
|
172
|
+
markGap: PropTypes.number,
|
|
173
|
+
padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
174
|
+
bottom: PropTypes.number,
|
|
175
|
+
left: PropTypes.number,
|
|
176
|
+
right: PropTypes.number,
|
|
177
|
+
top: PropTypes.number
|
|
178
|
+
})]),
|
|
139
179
|
position: PropTypes.shape({
|
|
140
180
|
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
141
181
|
vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
@@ -185,6 +225,12 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
185
225
|
* Callback fired when a mark element is clicked.
|
|
186
226
|
*/
|
|
187
227
|
onMarkClick: PropTypes.func,
|
|
228
|
+
/**
|
|
229
|
+
* Callback fired when the zoom has changed.
|
|
230
|
+
*
|
|
231
|
+
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
232
|
+
*/
|
|
233
|
+
onZoomChange: PropTypes.func,
|
|
188
234
|
/**
|
|
189
235
|
* Indicate which axis to display the right of the charts.
|
|
190
236
|
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
@@ -248,7 +294,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
248
294
|
* An array of [[AxisConfig]] objects.
|
|
249
295
|
*/
|
|
250
296
|
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
251
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
252
297
|
classes: PropTypes.object,
|
|
253
298
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
254
299
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
@@ -283,6 +328,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
283
328
|
slotProps: PropTypes.object,
|
|
284
329
|
slots: PropTypes.object,
|
|
285
330
|
stroke: PropTypes.string,
|
|
331
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
286
332
|
tickFontSize: PropTypes.number,
|
|
287
333
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
288
334
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -295,6 +341,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
295
341
|
tickSize: PropTypes.number,
|
|
296
342
|
valueFormatter: PropTypes.func,
|
|
297
343
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
344
|
+
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
298
345
|
maxEnd: PropTypes.number,
|
|
299
346
|
maxSpan: PropTypes.number,
|
|
300
347
|
minSpan: PropTypes.number,
|
|
@@ -309,7 +356,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
309
356
|
* An array of [[AxisConfig]] objects.
|
|
310
357
|
*/
|
|
311
358
|
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
312
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
313
359
|
classes: PropTypes.object,
|
|
314
360
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
315
361
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
@@ -344,6 +390,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
344
390
|
slotProps: PropTypes.object,
|
|
345
391
|
slots: PropTypes.object,
|
|
346
392
|
stroke: PropTypes.string,
|
|
393
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
347
394
|
tickFontSize: PropTypes.number,
|
|
348
395
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
349
396
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -356,6 +403,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
356
403
|
tickSize: PropTypes.number,
|
|
357
404
|
valueFormatter: PropTypes.func,
|
|
358
405
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
406
|
+
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
359
407
|
maxEnd: PropTypes.number,
|
|
360
408
|
maxSpan: PropTypes.number,
|
|
361
409
|
minSpan: PropTypes.number,
|
|
@@ -363,111 +411,14 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
363
411
|
panning: PropTypes.bool,
|
|
364
412
|
step: PropTypes.number
|
|
365
413
|
}), PropTypes.bool])
|
|
366
|
-
}))
|
|
367
|
-
} : void 0;
|
|
368
|
-
function MarkPlotZoom(props) {
|
|
369
|
-
const {
|
|
370
|
-
isInteracting
|
|
371
|
-
} = useZoom();
|
|
372
|
-
return /*#__PURE__*/_jsx(MarkPlot, _extends({}, props, {
|
|
373
|
-
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
374
|
-
}));
|
|
375
|
-
}
|
|
376
|
-
process.env.NODE_ENV !== "production" ? MarkPlotZoom.propTypes = {
|
|
377
|
-
// ----------------------------- Warning --------------------------------
|
|
378
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
379
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
380
|
-
// ----------------------------------------------------------------------
|
|
381
|
-
/**
|
|
382
|
-
* Callback fired when a line mark item is clicked.
|
|
383
|
-
* @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
|
|
384
|
-
* @param {LineItemIdentifier} lineItemIdentifier The line mark item identifier.
|
|
385
|
-
*/
|
|
386
|
-
onItemClick: PropTypes.func,
|
|
387
|
-
/**
|
|
388
|
-
* If `true`, animations are skipped.
|
|
389
|
-
* @default false
|
|
390
|
-
*/
|
|
391
|
-
skipAnimation: PropTypes.bool,
|
|
392
|
-
/**
|
|
393
|
-
* The props used for each component slot.
|
|
394
|
-
* @default {}
|
|
395
|
-
*/
|
|
396
|
-
slotProps: PropTypes.object,
|
|
397
|
-
/**
|
|
398
|
-
* Overridable component slots.
|
|
399
|
-
* @default {}
|
|
400
|
-
*/
|
|
401
|
-
slots: PropTypes.object
|
|
402
|
-
} : void 0;
|
|
403
|
-
function LinePlotZoom(props) {
|
|
404
|
-
const {
|
|
405
|
-
isInteracting
|
|
406
|
-
} = useZoom();
|
|
407
|
-
return /*#__PURE__*/_jsx(LinePlot, _extends({}, props, {
|
|
408
|
-
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
409
|
-
}));
|
|
410
|
-
}
|
|
411
|
-
process.env.NODE_ENV !== "production" ? LinePlotZoom.propTypes = {
|
|
412
|
-
// ----------------------------- Warning --------------------------------
|
|
413
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
414
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
415
|
-
// ----------------------------------------------------------------------
|
|
416
|
-
/**
|
|
417
|
-
* Callback fired when a line item is clicked.
|
|
418
|
-
* @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
|
|
419
|
-
* @param {LineItemIdentifier} lineItemIdentifier The line item identifier.
|
|
420
|
-
*/
|
|
421
|
-
onItemClick: PropTypes.func,
|
|
422
|
-
/**
|
|
423
|
-
* If `true`, animations are skipped.
|
|
424
|
-
* @default false
|
|
425
|
-
*/
|
|
426
|
-
skipAnimation: PropTypes.bool,
|
|
427
|
-
/**
|
|
428
|
-
* The props used for each component slot.
|
|
429
|
-
* @default {}
|
|
430
|
-
*/
|
|
431
|
-
slotProps: PropTypes.object,
|
|
432
|
-
/**
|
|
433
|
-
* Overridable component slots.
|
|
434
|
-
* @default {}
|
|
435
|
-
*/
|
|
436
|
-
slots: PropTypes.object
|
|
437
|
-
} : void 0;
|
|
438
|
-
function AreaPlotZoom(props) {
|
|
439
|
-
const {
|
|
440
|
-
isInteracting
|
|
441
|
-
} = useZoom();
|
|
442
|
-
return /*#__PURE__*/_jsx(AreaPlot, _extends({}, props, {
|
|
443
|
-
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
444
|
-
}));
|
|
445
|
-
}
|
|
446
|
-
process.env.NODE_ENV !== "production" ? AreaPlotZoom.propTypes = {
|
|
447
|
-
// ----------------------------- Warning --------------------------------
|
|
448
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
449
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
450
|
-
// ----------------------------------------------------------------------
|
|
451
|
-
/**
|
|
452
|
-
* Callback fired when a line area item is clicked.
|
|
453
|
-
* @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
|
|
454
|
-
* @param {LineItemIdentifier} lineItemIdentifier The line item identifier.
|
|
455
|
-
*/
|
|
456
|
-
onItemClick: PropTypes.func,
|
|
457
|
-
/**
|
|
458
|
-
* If `true`, animations are skipped.
|
|
459
|
-
* @default false
|
|
460
|
-
*/
|
|
461
|
-
skipAnimation: PropTypes.bool,
|
|
462
|
-
/**
|
|
463
|
-
* The props used for each component slot.
|
|
464
|
-
* @default {}
|
|
465
|
-
*/
|
|
466
|
-
slotProps: PropTypes.object,
|
|
414
|
+
})),
|
|
467
415
|
/**
|
|
468
|
-
*
|
|
469
|
-
* @default {}
|
|
416
|
+
* The list of zoom data related to each axis.
|
|
470
417
|
*/
|
|
471
|
-
|
|
418
|
+
zoom: PropTypes.arrayOf(PropTypes.shape({
|
|
419
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
420
|
+
end: PropTypes.number.isRequired,
|
|
421
|
+
start: PropTypes.number.isRequired
|
|
422
|
+
}))
|
|
472
423
|
} : void 0;
|
|
473
424
|
export { LineChartPro };
|
package/LineChartPro/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./LineChartPro.js";
|
|
@@ -3,9 +3,9 @@ import * as React from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { Watermark } from '@mui/x-license/Watermark';
|
|
5
5
|
import { ResizableContainer } from '@mui/x-charts/internals';
|
|
6
|
-
import { getReleaseInfo } from
|
|
7
|
-
import { ChartContainerPro } from
|
|
8
|
-
import { useResponsiveChartContainerProProps } from
|
|
6
|
+
import { getReleaseInfo } from "../internals/utils/releaseInfo.js";
|
|
7
|
+
import { ChartContainerPro } from "../ChartContainerPro/index.js";
|
|
8
|
+
import { useResponsiveChartContainerProProps } from "./useResponsiveChartContainerProProps.js";
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const releaseInfo = getReleaseInfo();
|
|
11
11
|
const ResponsiveChartContainerPro = /*#__PURE__*/React.forwardRef(function ResponsiveChartContainerPro(props, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./ResponsiveChartContainerPro.js";
|
|
@@ -3,6 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["zoom", "onZoomChange"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
+
import { useThemeProps } from '@mui/material/styles';
|
|
6
7
|
import { ChartsOverlay } from '@mui/x-charts/ChartsOverlay';
|
|
7
8
|
import { ScatterPlot } from '@mui/x-charts/ScatterChart';
|
|
8
9
|
import { ZAxisContextProvider } from '@mui/x-charts/context';
|
|
@@ -13,8 +14,8 @@ import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
|
|
|
13
14
|
import { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight';
|
|
14
15
|
import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
|
|
15
16
|
import { useScatterChartProps } from '@mui/x-charts/internals';
|
|
16
|
-
import { ResponsiveChartContainerPro } from
|
|
17
|
-
import { ZoomSetup } from
|
|
17
|
+
import { ResponsiveChartContainerPro } from "../ResponsiveChartContainerPro/index.js";
|
|
18
|
+
import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
|
|
18
19
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
20
|
/**
|
|
20
21
|
* Demos:
|
|
@@ -26,7 +27,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
26
27
|
*
|
|
27
28
|
* - [ScatterChart API](https://mui.com/x/api/charts/scatter-chart/)
|
|
28
29
|
*/
|
|
29
|
-
const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(
|
|
30
|
+
const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(inProps, ref) {
|
|
31
|
+
const props = useThemeProps({
|
|
32
|
+
props: inProps,
|
|
33
|
+
name: 'MuiScatterChartPro'
|
|
34
|
+
});
|
|
30
35
|
const {
|
|
31
36
|
zoom,
|
|
32
37
|
onZoomChange
|
|
@@ -51,7 +56,7 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(p
|
|
|
51
56
|
zoom: zoom,
|
|
52
57
|
onZoomChange: onZoomChange,
|
|
53
58
|
children: /*#__PURE__*/_jsxs(ZAxisContextProvider, _extends({}, zAxisProps, {
|
|
54
|
-
children: [!props.disableVoronoi && /*#__PURE__*/_jsx(ChartsVoronoiHandler, _extends({}, voronoiHandlerProps)), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)),
|
|
59
|
+
children: [!props.disableVoronoi && /*#__PURE__*/_jsx(ChartsVoronoiHandler, _extends({}, voronoiHandlerProps)), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsx("g", {
|
|
55
60
|
"data-drawing-container": true,
|
|
56
61
|
children: /*#__PURE__*/_jsx(ScatterPlot, _extends({}, scatterPlotProps))
|
|
57
62
|
}), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), !props.loading && /*#__PURE__*/_jsx(ChartsTooltip, _extends({}, tooltipProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
|
|
@@ -132,6 +137,17 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
132
137
|
classes: PropTypes.object,
|
|
133
138
|
direction: PropTypes.oneOf(['column', 'row']),
|
|
134
139
|
hidden: PropTypes.bool,
|
|
140
|
+
itemGap: PropTypes.number,
|
|
141
|
+
itemMarkHeight: PropTypes.number,
|
|
142
|
+
itemMarkWidth: PropTypes.number,
|
|
143
|
+
labelStyle: PropTypes.object,
|
|
144
|
+
markGap: PropTypes.number,
|
|
145
|
+
padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
146
|
+
bottom: PropTypes.number,
|
|
147
|
+
left: PropTypes.number,
|
|
148
|
+
right: PropTypes.number,
|
|
149
|
+
top: PropTypes.number
|
|
150
|
+
})]),
|
|
135
151
|
position: PropTypes.shape({
|
|
136
152
|
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
137
153
|
vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
|
package/ScatterChartPro/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./ScatterChartPro.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useDrawingArea, useSeries, CartesianContext, cartesianProviderUtils, useXExtremumGetter, useYExtremumGetter } from '@mui/x-charts/internals';
|
|
4
|
-
import { useZoom } from
|
|
5
|
-
import { createAxisFilterMapper, createGetAxisFilters } from
|
|
4
|
+
import { useZoom } from "../ZoomProvider/useZoom.js";
|
|
5
|
+
import { createAxisFilterMapper, createGetAxisFilters } from "./createAxisFilterMapper.js";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
const {
|
|
8
8
|
computeValue
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { getAxisExtremum, isDefined } from '@mui/x-charts/internals';
|
|
2
|
-
import { getScale } from '../../../../x-charts/src/internals/getScale';
|
|
1
|
+
import { getAxisExtremum, isDefined, getScale } from '@mui/x-charts/internals';
|
|
3
2
|
export const createAxisFilterMapper = ({
|
|
4
3
|
zoomData,
|
|
5
4
|
extremumGetter,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./CartesianProviderPro.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import useControlled from '@mui/utils/useControlled';
|
|
3
|
-
import { ZoomContext } from
|
|
4
|
-
import { defaultizeZoom } from
|
|
5
|
-
import { initializeZoomData } from
|
|
3
|
+
import { ZoomContext } from "./ZoomContext.js";
|
|
4
|
+
import { defaultizeZoom } from "./defaultizeZoom.js";
|
|
5
|
+
import { initializeZoomData } from "./initializeZoomData.js";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
export function ZoomProvider({
|
|
8
8
|
children,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useSetupPan } from
|
|
2
|
-
import { useSetupZoom } from
|
|
1
|
+
import { useSetupPan } from "./useSetupPan.js";
|
|
2
|
+
import { useSetupZoom } from "./useSetupZoom.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Sets up the zoom functionality if using composition or a custom chart.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
1
|
+
export * from "./ZoomContext.js";
|
|
2
|
+
export * from "./ZoomProvider.js";
|
|
3
|
+
export * from "./Zoom.types.js";
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useDrawingArea, useSvgRef } from '@mui/x-charts/hooks';
|
|
4
4
|
import { getSVGPoint } from '@mui/x-charts/internals';
|
|
5
|
-
import { useZoom } from
|
|
5
|
+
import { useZoom } from "./useZoom.js";
|
|
6
6
|
export const useSetupPan = () => {
|
|
7
7
|
const {
|
|
8
8
|
zoomData,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useDrawingArea, useSvgRef } from '@mui/x-charts/hooks';
|
|
3
3
|
import { getSVGPoint } from '@mui/x-charts/internals';
|
|
4
|
-
import { useZoom } from
|
|
4
|
+
import { useZoom } from "./useZoom.js";
|
|
5
5
|
/**
|
|
6
6
|
* Helper to get the range (in percents of a reference range) corresponding to a given scale.
|
|
7
7
|
* @param centerRatio {number} The ratio of the point that should not move between the previous and next range.
|
package/context/index.js
CHANGED
package/hooks/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { useHeatmapSeries as unstable_useHeatmapSeries } from
|
|
1
|
+
export { useHeatmapSeries as unstable_useHeatmapSeries } from "./useSeries.js";
|
package/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-charts-pro v7.0.0-
|
|
2
|
+
* @mui/x-charts-pro v7.0.0-beta.0
|
|
3
3
|
*
|
|
4
4
|
* @license MUI X Commercial
|
|
5
5
|
* This source code is licensed under the commercial license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
-
import
|
|
8
|
+
import "./typeOverloads/modules.js";
|
|
9
9
|
|
|
10
10
|
// exports from MIT package
|
|
11
11
|
export * from '@mui/x-charts/constants';
|
|
@@ -34,12 +34,12 @@ export * from '@mui/x-charts/Gauge';
|
|
|
34
34
|
export * from '@mui/x-charts/ChartsSurface';
|
|
35
35
|
|
|
36
36
|
// Pro components
|
|
37
|
-
export * from
|
|
38
|
-
export * from
|
|
39
|
-
export * from
|
|
40
|
-
export * from
|
|
41
|
-
export * from
|
|
42
|
-
export * from
|
|
37
|
+
export * from "./Heatmap/index.js";
|
|
38
|
+
export * from "./ResponsiveChartContainerPro/index.js";
|
|
39
|
+
export * from "./ChartContainerPro/index.js";
|
|
40
|
+
export * from "./ScatterChartPro/index.js";
|
|
41
|
+
export * from "./BarChartPro/index.js";
|
|
42
|
+
export * from "./LineChartPro/index.js";
|
|
43
43
|
|
|
44
44
|
// Pro context
|
|
45
|
-
export * from
|
|
45
|
+
export * from "./context/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTcyNTQ4MzYwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
package/models/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./seriesType/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./heatmap.js";
|