@mui/x-charts-pro 7.0.0-alpha.3 → 7.0.0-beta.1
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 +44 -53
- package/BarChartPro/index.js +1 -1
- package/CHANGELOG.md +185 -1
- package/ChartContainerPro/ChartContainerPro.js +6 -4
- package/ChartContainerPro/index.js +1 -1
- package/ChartContainerPro/useChartContainerProProps.js +2 -0
- package/Heatmap/DefaultHeatmapTooltip.js +3 -1
- package/Heatmap/Heatmap.js +6 -4
- package/Heatmap/HeatmapItem.js +1 -1
- package/Heatmap/HeatmapPlot.js +4 -2
- package/Heatmap/index.js +4 -4
- package/Heatmap/plugin.js +3 -3
- package/LineChartPro/LineChartPro.js +64 -111
- package/LineChartPro/index.js +1 -1
- package/ResponsiveChartContainerPro/ResponsiveChartContainerPro.js +5 -3
- package/ResponsiveChartContainerPro/index.js +1 -1
- package/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.js +2 -0
- package/ScatterChartPro/ScatterChartPro.js +17 -3
- package/ScatterChartPro/index.js +1 -1
- package/context/CartesianProviderPro/CartesianProviderPro.js +4 -2
- package/context/CartesianProviderPro/index.js +1 -1
- package/context/ZoomProvider/ZoomProvider.js +5 -3
- package/context/ZoomProvider/ZoomSetup.js +2 -2
- package/context/ZoomProvider/index.js +3 -3
- package/context/ZoomProvider/useSetupPan.js +3 -1
- package/context/ZoomProvider/useSetupZoom.js +3 -1
- package/context/ZoomProvider/useZoom.js +3 -1
- package/context/index.js +2 -2
- package/hooks/index.js +1 -1
- package/hooks/useSeries.js +2 -0
- 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 +44 -53
- package/modern/BarChartPro/index.js +1 -1
- package/modern/ChartContainerPro/ChartContainerPro.js +6 -4
- package/modern/ChartContainerPro/index.js +1 -1
- package/modern/ChartContainerPro/useChartContainerProProps.js +2 -0
- package/modern/Heatmap/DefaultHeatmapTooltip.js +3 -1
- package/modern/Heatmap/Heatmap.js +6 -4
- package/modern/Heatmap/HeatmapItem.js +1 -1
- package/modern/Heatmap/HeatmapPlot.js +4 -2
- package/modern/Heatmap/index.js +4 -4
- package/modern/Heatmap/plugin.js +3 -3
- package/modern/LineChartPro/LineChartPro.js +64 -111
- package/modern/LineChartPro/index.js +1 -1
- package/modern/ResponsiveChartContainerPro/ResponsiveChartContainerPro.js +5 -3
- package/modern/ResponsiveChartContainerPro/index.js +1 -1
- package/modern/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.js +2 -0
- package/modern/ScatterChartPro/ScatterChartPro.js +17 -3
- package/modern/ScatterChartPro/index.js +1 -1
- package/modern/context/CartesianProviderPro/CartesianProviderPro.js +4 -2
- package/modern/context/CartesianProviderPro/index.js +1 -1
- package/modern/context/ZoomProvider/ZoomProvider.js +5 -3
- package/modern/context/ZoomProvider/ZoomSetup.js +2 -2
- package/modern/context/ZoomProvider/index.js +3 -3
- package/modern/context/ZoomProvider/useSetupPan.js +3 -1
- package/modern/context/ZoomProvider/useSetupZoom.js +3 -1
- package/modern/context/ZoomProvider/useZoom.js +3 -1
- package/modern/context/index.js +2 -2
- package/modern/hooks/index.js +1 -1
- package/modern/hooks/useSeries.js +2 -0
- 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 -4
- package/modern/typeOverloads/index.js +1 -1
- package/node/BarChartPro/BarChartPro.js +42 -53
- package/node/ChartContainerPro/ChartContainerPro.js +3 -3
- package/node/ChartContainerPro/useChartContainerProProps.js +2 -1
- package/node/Heatmap/DefaultHeatmapTooltip.js +4 -4
- package/node/Heatmap/Heatmap.js +3 -3
- package/node/Heatmap/HeatmapItem.js +2 -3
- package/node/Heatmap/HeatmapPlot.js +3 -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 -111
- package/node/ResponsiveChartContainerPro/ResponsiveChartContainerPro.js +3 -3
- package/node/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.js +2 -1
- package/node/ScatterChartPro/ScatterChartPro.js +16 -4
- package/node/context/CartesianProviderPro/CartesianProviderPro.js +3 -3
- package/node/context/ZoomProvider/ZoomContext.js +1 -2
- package/node/context/ZoomProvider/ZoomProvider.js +3 -3
- package/node/context/ZoomProvider/defaultizeZoom.js +1 -1
- package/node/context/ZoomProvider/useSetupPan.js +3 -3
- package/node/context/ZoomProvider/useSetupZoom.js +2 -2
- package/node/context/ZoomProvider/useZoom.js +2 -2
- package/node/hooks/useSeries.js +2 -2
- package/node/index.js +1 -1
- package/node/internals/utils/releaseInfo.js +1 -1
- package/node/themeAugmentation/index.js +1 -49
- package/package.json +6 -5
- package/themeAugmentation/index.d.ts +4 -4
- package/themeAugmentation/index.js +0 -4
- package/typeOverloads/index.js +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
2
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
5
|
const _excluded = ["zoom", "onZoomChange"];
|
|
4
6
|
import * as React from 'react';
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
@@ -14,10 +16,34 @@ import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
|
|
|
14
16
|
import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
|
|
15
17
|
import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
|
|
16
18
|
import { useLineChartProps } from '@mui/x-charts/internals';
|
|
17
|
-
import { ResponsiveChartContainerPro } from
|
|
18
|
-
import { ZoomSetup } from
|
|
19
|
-
import { useZoom } from
|
|
19
|
+
import { ResponsiveChartContainerPro } from "../ResponsiveChartContainerPro/index.js";
|
|
20
|
+
import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
|
|
21
|
+
import { useZoom } from "../context/ZoomProvider/useZoom.js";
|
|
20
22
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
+
function AreaPlotZoom(props) {
|
|
24
|
+
const {
|
|
25
|
+
isInteracting
|
|
26
|
+
} = useZoom();
|
|
27
|
+
return /*#__PURE__*/_jsx(AreaPlot, _extends({}, props, {
|
|
28
|
+
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
function LinePlotZoom(props) {
|
|
32
|
+
const {
|
|
33
|
+
isInteracting
|
|
34
|
+
} = useZoom();
|
|
35
|
+
return /*#__PURE__*/_jsx(LinePlot, _extends({}, props, {
|
|
36
|
+
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
function MarkPlotZoom(props) {
|
|
40
|
+
const {
|
|
41
|
+
isInteracting
|
|
42
|
+
} = useZoom();
|
|
43
|
+
return /*#__PURE__*/_jsx(MarkPlot, _extends({}, props, {
|
|
44
|
+
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
21
47
|
/**
|
|
22
48
|
* Demos:
|
|
23
49
|
*
|
|
@@ -60,7 +86,7 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
|
|
|
60
86
|
}, chartContainerProps, {
|
|
61
87
|
zoom: zoom,
|
|
62
88
|
onZoomChange: onZoomChange,
|
|
63
|
-
children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)),
|
|
89
|
+
children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
64
90
|
children: [/*#__PURE__*/_jsx(AreaPlotZoom, _extends({}, areaPlotProps)), /*#__PURE__*/_jsx(LinePlotZoom, _extends({}, linePlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
|
|
65
91
|
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx("g", {
|
|
66
92
|
"data-drawing-container": true,
|
|
@@ -110,6 +136,10 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
110
136
|
* If `true`, render the line highlight item.
|
|
111
137
|
*/
|
|
112
138
|
disableLineItemHighlight: PropTypes.bool,
|
|
139
|
+
/**
|
|
140
|
+
* If `true` marks will render `<circle />` instead of `<path />` and drop theme override for faster rendering.
|
|
141
|
+
*/
|
|
142
|
+
experimentalMarkRendering: PropTypes.bool,
|
|
113
143
|
/**
|
|
114
144
|
* Option to display a cartesian grid in the background.
|
|
115
145
|
*/
|
|
@@ -141,6 +171,18 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
141
171
|
classes: PropTypes.object,
|
|
142
172
|
direction: PropTypes.oneOf(['column', 'row']),
|
|
143
173
|
hidden: PropTypes.bool,
|
|
174
|
+
itemGap: PropTypes.number,
|
|
175
|
+
itemMarkHeight: PropTypes.number,
|
|
176
|
+
itemMarkWidth: PropTypes.number,
|
|
177
|
+
labelStyle: PropTypes.object,
|
|
178
|
+
markGap: PropTypes.number,
|
|
179
|
+
onItemClick: PropTypes.func,
|
|
180
|
+
padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
181
|
+
bottom: PropTypes.number,
|
|
182
|
+
left: PropTypes.number,
|
|
183
|
+
right: PropTypes.number,
|
|
184
|
+
top: PropTypes.number
|
|
185
|
+
})]),
|
|
144
186
|
position: PropTypes.shape({
|
|
145
187
|
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
146
188
|
vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
@@ -190,6 +232,12 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
190
232
|
* Callback fired when a mark element is clicked.
|
|
191
233
|
*/
|
|
192
234
|
onMarkClick: PropTypes.func,
|
|
235
|
+
/**
|
|
236
|
+
* Callback fired when the zoom has changed.
|
|
237
|
+
*
|
|
238
|
+
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
239
|
+
*/
|
|
240
|
+
onZoomChange: PropTypes.func,
|
|
193
241
|
/**
|
|
194
242
|
* Indicate which axis to display the right of the charts.
|
|
195
243
|
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
@@ -253,7 +301,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
253
301
|
* An array of [[AxisConfig]] objects.
|
|
254
302
|
*/
|
|
255
303
|
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
256
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
257
304
|
classes: PropTypes.object,
|
|
258
305
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
259
306
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
@@ -288,6 +335,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
288
335
|
slotProps: PropTypes.object,
|
|
289
336
|
slots: PropTypes.object,
|
|
290
337
|
stroke: PropTypes.string,
|
|
338
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
291
339
|
tickFontSize: PropTypes.number,
|
|
292
340
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
293
341
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -300,6 +348,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
300
348
|
tickSize: PropTypes.number,
|
|
301
349
|
valueFormatter: PropTypes.func,
|
|
302
350
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
351
|
+
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
303
352
|
maxEnd: PropTypes.number,
|
|
304
353
|
maxSpan: PropTypes.number,
|
|
305
354
|
minSpan: PropTypes.number,
|
|
@@ -314,7 +363,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
314
363
|
* An array of [[AxisConfig]] objects.
|
|
315
364
|
*/
|
|
316
365
|
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
317
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
318
366
|
classes: PropTypes.object,
|
|
319
367
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
320
368
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
@@ -349,6 +397,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
349
397
|
slotProps: PropTypes.object,
|
|
350
398
|
slots: PropTypes.object,
|
|
351
399
|
stroke: PropTypes.string,
|
|
400
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
352
401
|
tickFontSize: PropTypes.number,
|
|
353
402
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
354
403
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -361,6 +410,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
361
410
|
tickSize: PropTypes.number,
|
|
362
411
|
valueFormatter: PropTypes.func,
|
|
363
412
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
413
|
+
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
364
414
|
maxEnd: PropTypes.number,
|
|
365
415
|
maxSpan: PropTypes.number,
|
|
366
416
|
minSpan: PropTypes.number,
|
|
@@ -368,111 +418,14 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
368
418
|
panning: PropTypes.bool,
|
|
369
419
|
step: PropTypes.number
|
|
370
420
|
}), PropTypes.bool])
|
|
371
|
-
}))
|
|
372
|
-
} : void 0;
|
|
373
|
-
function MarkPlotZoom(props) {
|
|
374
|
-
const {
|
|
375
|
-
isInteracting
|
|
376
|
-
} = useZoom();
|
|
377
|
-
return /*#__PURE__*/_jsx(MarkPlot, _extends({}, props, {
|
|
378
|
-
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
379
|
-
}));
|
|
380
|
-
}
|
|
381
|
-
process.env.NODE_ENV !== "production" ? MarkPlotZoom.propTypes = {
|
|
382
|
-
// ----------------------------- Warning --------------------------------
|
|
383
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
384
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
385
|
-
// ----------------------------------------------------------------------
|
|
386
|
-
/**
|
|
387
|
-
* Callback fired when a line mark item is clicked.
|
|
388
|
-
* @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
|
|
389
|
-
* @param {LineItemIdentifier} lineItemIdentifier The line mark item identifier.
|
|
390
|
-
*/
|
|
391
|
-
onItemClick: PropTypes.func,
|
|
392
|
-
/**
|
|
393
|
-
* If `true`, animations are skipped.
|
|
394
|
-
* @default false
|
|
395
|
-
*/
|
|
396
|
-
skipAnimation: PropTypes.bool,
|
|
397
|
-
/**
|
|
398
|
-
* The props used for each component slot.
|
|
399
|
-
* @default {}
|
|
400
|
-
*/
|
|
401
|
-
slotProps: PropTypes.object,
|
|
402
|
-
/**
|
|
403
|
-
* Overridable component slots.
|
|
404
|
-
* @default {}
|
|
405
|
-
*/
|
|
406
|
-
slots: PropTypes.object
|
|
407
|
-
} : void 0;
|
|
408
|
-
function LinePlotZoom(props) {
|
|
409
|
-
const {
|
|
410
|
-
isInteracting
|
|
411
|
-
} = useZoom();
|
|
412
|
-
return /*#__PURE__*/_jsx(LinePlot, _extends({}, props, {
|
|
413
|
-
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
414
|
-
}));
|
|
415
|
-
}
|
|
416
|
-
process.env.NODE_ENV !== "production" ? LinePlotZoom.propTypes = {
|
|
417
|
-
// ----------------------------- Warning --------------------------------
|
|
418
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
419
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
420
|
-
// ----------------------------------------------------------------------
|
|
421
|
-
/**
|
|
422
|
-
* Callback fired when a line item is clicked.
|
|
423
|
-
* @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
|
|
424
|
-
* @param {LineItemIdentifier} lineItemIdentifier The line item identifier.
|
|
425
|
-
*/
|
|
426
|
-
onItemClick: PropTypes.func,
|
|
427
|
-
/**
|
|
428
|
-
* If `true`, animations are skipped.
|
|
429
|
-
* @default false
|
|
430
|
-
*/
|
|
431
|
-
skipAnimation: PropTypes.bool,
|
|
432
|
-
/**
|
|
433
|
-
* The props used for each component slot.
|
|
434
|
-
* @default {}
|
|
435
|
-
*/
|
|
436
|
-
slotProps: PropTypes.object,
|
|
437
|
-
/**
|
|
438
|
-
* Overridable component slots.
|
|
439
|
-
* @default {}
|
|
440
|
-
*/
|
|
441
|
-
slots: PropTypes.object
|
|
442
|
-
} : void 0;
|
|
443
|
-
function AreaPlotZoom(props) {
|
|
444
|
-
const {
|
|
445
|
-
isInteracting
|
|
446
|
-
} = useZoom();
|
|
447
|
-
return /*#__PURE__*/_jsx(AreaPlot, _extends({}, props, {
|
|
448
|
-
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
449
|
-
}));
|
|
450
|
-
}
|
|
451
|
-
process.env.NODE_ENV !== "production" ? AreaPlotZoom.propTypes = {
|
|
452
|
-
// ----------------------------- Warning --------------------------------
|
|
453
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
454
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
455
|
-
// ----------------------------------------------------------------------
|
|
456
|
-
/**
|
|
457
|
-
* Callback fired when a line area item is clicked.
|
|
458
|
-
* @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
|
|
459
|
-
* @param {LineItemIdentifier} lineItemIdentifier The line item identifier.
|
|
460
|
-
*/
|
|
461
|
-
onItemClick: PropTypes.func,
|
|
462
|
-
/**
|
|
463
|
-
* If `true`, animations are skipped.
|
|
464
|
-
* @default false
|
|
465
|
-
*/
|
|
466
|
-
skipAnimation: PropTypes.bool,
|
|
467
|
-
/**
|
|
468
|
-
* The props used for each component slot.
|
|
469
|
-
* @default {}
|
|
470
|
-
*/
|
|
471
|
-
slotProps: PropTypes.object,
|
|
421
|
+
})),
|
|
472
422
|
/**
|
|
473
|
-
*
|
|
474
|
-
* @default {}
|
|
423
|
+
* The list of zoom data related to each axis.
|
|
475
424
|
*/
|
|
476
|
-
|
|
425
|
+
zoom: PropTypes.arrayOf(PropTypes.shape({
|
|
426
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
427
|
+
end: PropTypes.number.isRequired,
|
|
428
|
+
start: PropTypes.number.isRequired
|
|
429
|
+
}))
|
|
477
430
|
} : void 0;
|
|
478
431
|
export { LineChartPro };
|
package/LineChartPro/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./LineChartPro.js";
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
4
6
|
import { Watermark } from '@mui/x-license/Watermark';
|
|
5
7
|
import { ResizableContainer } from '@mui/x-charts/internals';
|
|
6
|
-
import { getReleaseInfo } from
|
|
7
|
-
import { ChartContainerPro } from
|
|
8
|
-
import { useResponsiveChartContainerProProps } from
|
|
8
|
+
import { getReleaseInfo } from "../internals/utils/releaseInfo.js";
|
|
9
|
+
import { ChartContainerPro } from "../ChartContainerPro/index.js";
|
|
10
|
+
import { useResponsiveChartContainerProProps } from "./useResponsiveChartContainerProProps.js";
|
|
9
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
12
|
const releaseInfo = getReleaseInfo();
|
|
11
13
|
const ResponsiveChartContainerPro = /*#__PURE__*/React.forwardRef(function ResponsiveChartContainerPro(props, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./ResponsiveChartContainerPro.js";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
5
|
const _excluded = ["zoom", "onZoomChange"];
|
|
@@ -14,8 +16,8 @@ import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
|
|
|
14
16
|
import { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight';
|
|
15
17
|
import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
|
|
16
18
|
import { useScatterChartProps } from '@mui/x-charts/internals';
|
|
17
|
-
import { ResponsiveChartContainerPro } from
|
|
18
|
-
import { ZoomSetup } from
|
|
19
|
+
import { ResponsiveChartContainerPro } from "../ResponsiveChartContainerPro/index.js";
|
|
20
|
+
import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
|
|
19
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
22
|
/**
|
|
21
23
|
* Demos:
|
|
@@ -56,7 +58,7 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
|
|
|
56
58
|
zoom: zoom,
|
|
57
59
|
onZoomChange: onZoomChange,
|
|
58
60
|
children: /*#__PURE__*/_jsxs(ZAxisContextProvider, _extends({}, zAxisProps, {
|
|
59
|
-
children: [!props.disableVoronoi && /*#__PURE__*/_jsx(ChartsVoronoiHandler, _extends({}, voronoiHandlerProps)), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)),
|
|
61
|
+
children: [!props.disableVoronoi && /*#__PURE__*/_jsx(ChartsVoronoiHandler, _extends({}, voronoiHandlerProps)), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsx("g", {
|
|
60
62
|
"data-drawing-container": true,
|
|
61
63
|
children: /*#__PURE__*/_jsx(ScatterPlot, _extends({}, scatterPlotProps))
|
|
62
64
|
}), /*#__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]
|
|
@@ -137,6 +139,18 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
137
139
|
classes: PropTypes.object,
|
|
138
140
|
direction: PropTypes.oneOf(['column', 'row']),
|
|
139
141
|
hidden: PropTypes.bool,
|
|
142
|
+
itemGap: PropTypes.number,
|
|
143
|
+
itemMarkHeight: PropTypes.number,
|
|
144
|
+
itemMarkWidth: PropTypes.number,
|
|
145
|
+
labelStyle: PropTypes.object,
|
|
146
|
+
markGap: PropTypes.number,
|
|
147
|
+
onItemClick: PropTypes.func,
|
|
148
|
+
padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
149
|
+
bottom: PropTypes.number,
|
|
150
|
+
left: PropTypes.number,
|
|
151
|
+
right: PropTypes.number,
|
|
152
|
+
top: PropTypes.number
|
|
153
|
+
})]),
|
|
140
154
|
position: PropTypes.shape({
|
|
141
155
|
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
142
156
|
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,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import { useDrawingArea, useSeries, CartesianContext, cartesianProviderUtils, useXExtremumGetter, useYExtremumGetter } from '@mui/x-charts/internals';
|
|
4
|
-
import { useZoom } from
|
|
5
|
-
import { createAxisFilterMapper, createGetAxisFilters } from
|
|
6
|
+
import { useZoom } from "../ZoomProvider/useZoom.js";
|
|
7
|
+
import { createAxisFilterMapper, createGetAxisFilters } from "./createAxisFilterMapper.js";
|
|
6
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
9
|
const {
|
|
8
10
|
computeValue
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./CartesianProviderPro.js";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
4
|
import useControlled from '@mui/utils/useControlled';
|
|
3
|
-
import { ZoomContext } from
|
|
4
|
-
import { defaultizeZoom } from
|
|
5
|
-
import { initializeZoomData } from
|
|
5
|
+
import { ZoomContext } from "./ZoomContext.js";
|
|
6
|
+
import { defaultizeZoom } from "./defaultizeZoom.js";
|
|
7
|
+
import { initializeZoomData } from "./initializeZoomData.js";
|
|
6
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
9
|
export function ZoomProvider({
|
|
8
10
|
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";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import { useDrawingArea, useSvgRef } from '@mui/x-charts/hooks';
|
|
4
6
|
import { getSVGPoint } from '@mui/x-charts/internals';
|
|
5
|
-
import { useZoom } from
|
|
7
|
+
import { useZoom } from "./useZoom.js";
|
|
6
8
|
export const useSetupPan = () => {
|
|
7
9
|
const {
|
|
8
10
|
zoomData,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
4
|
import { useDrawingArea, useSvgRef } from '@mui/x-charts/hooks';
|
|
3
5
|
import { getSVGPoint } from '@mui/x-charts/internals';
|
|
4
|
-
import { useZoom } from
|
|
6
|
+
import { useZoom } from "./useZoom.js";
|
|
5
7
|
/**
|
|
6
8
|
* Helper to get the range (in percents of a reference range) corresponding to a given scale.
|
|
7
9
|
* @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/hooks/useSeries.js
CHANGED
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.1
|
|
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 = "MTcyNjE5NjQwMDAwMA==";
|
|
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";
|