@mui/x-charts-pro 8.4.0 → 8.5.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.d.ts +13 -5
- package/BarChartPro/BarChartPro.js +19 -1
- package/CHANGELOG.md +103 -0
- package/ChartContainerPro/ChartContainerPro.d.ts +0 -1
- package/ChartContainerPro/ChartProApi.d.ts +26 -0
- package/ChartContainerPro/ChartProApi.js +5 -0
- package/ChartContainerPro/index.d.ts +2 -1
- package/ChartContainerPro/index.js +11 -0
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +11 -1
- package/ChartDataProviderPro/ChartDataProviderPro.js +19 -3
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +2 -0
- package/ChartDataProviderPro/useChartDataProviderProProps.js +5 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -3
- package/ChartZoomSlider/internals/ChartAxisZoomSlider.js +25 -315
- package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +24 -0
- package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +251 -0
- package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +18 -0
- package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +160 -0
- package/ChartZoomSlider/internals/constants.d.ts +5 -0
- package/ChartZoomSlider/internals/constants.js +11 -0
- package/ChartZoomSlider/internals/zoom-utils.d.ts +4 -0
- package/ChartZoomSlider/internals/zoom-utils.js +48 -0
- package/ChartsToolbarPro/ChartsToolbarPro.d.ts +8 -1
- package/ChartsToolbarPro/ChartsToolbarPro.js +42 -8
- package/ChartsToolbarPro/ChartsToolbarZoomInButton.d.ts +16 -0
- package/ChartsToolbarPro/ChartsToolbarZoomInButton.js +56 -0
- package/ChartsToolbarPro/ChartsToolbarZoomOutButton.d.ts +16 -0
- package/ChartsToolbarPro/ChartsToolbarZoomOutButton.js +56 -0
- package/ChartsToolbarPro/index.d.ts +3 -1
- package/ChartsToolbarPro/index.js +22 -0
- package/FunnelChart/FunnelChart.d.ts +2 -1
- package/FunnelChart/FunnelChart.js +2 -20
- package/FunnelChart/FunnelChart.plugins.d.ts +4 -0
- package/FunnelChart/FunnelChart.plugins.js +9 -0
- package/FunnelChart/funnelSlots.types.d.ts +4 -3
- package/FunnelChart/useFunnelChartProps.d.ts +2 -1
- package/FunnelChart/useFunnelChartProps.js +3 -1
- package/Heatmap/Heatmap.d.ts +17 -4
- package/Heatmap/Heatmap.js +56 -22
- package/Heatmap/Heatmap.plugins.d.ts +2 -1
- package/Heatmap/Heatmap.plugins.js +2 -1
- package/LineChartPro/LineChartPro.d.ts +13 -5
- package/LineChartPro/LineChartPro.js +19 -1
- package/RadarChartPro/RadarChartPro.d.ts +15 -0
- package/RadarChartPro/RadarChartPro.js +202 -0
- package/RadarChartPro/RadarChartPro.plugins.d.ts +4 -0
- package/RadarChartPro/RadarChartPro.plugins.js +9 -0
- package/RadarChartPro/index.d.ts +1 -0
- package/RadarChartPro/index.js +16 -0
- package/ScatterChartPro/ScatterChartPro.d.ts +13 -5
- package/ScatterChartPro/ScatterChartPro.js +19 -1
- package/context/index.d.ts +1 -0
- package/context/index.js +16 -0
- package/context/useChartApiContext.d.ts +9 -0
- package/context/useChartApiContext.js +17 -0
- package/esm/BarChartPro/BarChartPro.d.ts +13 -5
- package/esm/BarChartPro/BarChartPro.js +19 -1
- package/esm/ChartContainerPro/ChartContainerPro.d.ts +0 -1
- package/esm/ChartContainerPro/ChartProApi.d.ts +26 -0
- package/esm/ChartContainerPro/ChartProApi.js +1 -0
- package/esm/ChartContainerPro/index.d.ts +2 -1
- package/esm/ChartContainerPro/index.js +2 -1
- package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +11 -1
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +20 -4
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +2 -0
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.js +5 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -3
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.js +19 -306
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +24 -0
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +243 -0
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +18 -0
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +152 -0
- package/esm/ChartZoomSlider/internals/constants.d.ts +5 -0
- package/esm/ChartZoomSlider/internals/constants.js +5 -0
- package/esm/ChartZoomSlider/internals/zoom-utils.d.ts +4 -0
- package/esm/ChartZoomSlider/internals/zoom-utils.js +40 -0
- package/esm/ChartsToolbarPro/ChartsToolbarPro.d.ts +8 -1
- package/esm/ChartsToolbarPro/ChartsToolbarPro.js +42 -9
- package/esm/ChartsToolbarPro/ChartsToolbarZoomInButton.d.ts +16 -0
- package/esm/ChartsToolbarPro/ChartsToolbarZoomInButton.js +50 -0
- package/esm/ChartsToolbarPro/ChartsToolbarZoomOutButton.d.ts +16 -0
- package/esm/ChartsToolbarPro/ChartsToolbarZoomOutButton.js +50 -0
- package/esm/ChartsToolbarPro/index.d.ts +3 -1
- package/esm/ChartsToolbarPro/index.js +3 -1
- package/esm/FunnelChart/FunnelChart.d.ts +2 -1
- package/esm/FunnelChart/FunnelChart.js +2 -20
- package/esm/FunnelChart/FunnelChart.plugins.d.ts +4 -0
- package/esm/FunnelChart/FunnelChart.plugins.js +3 -0
- package/esm/FunnelChart/funnelSlots.types.d.ts +4 -3
- package/esm/FunnelChart/useFunnelChartProps.d.ts +2 -1
- package/esm/FunnelChart/useFunnelChartProps.js +3 -1
- package/esm/Heatmap/Heatmap.d.ts +17 -4
- package/esm/Heatmap/Heatmap.js +56 -22
- package/esm/Heatmap/Heatmap.plugins.d.ts +2 -1
- package/esm/Heatmap/Heatmap.plugins.js +2 -1
- package/esm/LineChartPro/LineChartPro.d.ts +13 -5
- package/esm/LineChartPro/LineChartPro.js +19 -1
- package/esm/RadarChartPro/RadarChartPro.d.ts +15 -0
- package/esm/RadarChartPro/RadarChartPro.js +195 -0
- package/esm/RadarChartPro/RadarChartPro.plugins.d.ts +4 -0
- package/esm/RadarChartPro/RadarChartPro.plugins.js +3 -0
- package/esm/RadarChartPro/index.d.ts +1 -0
- package/esm/RadarChartPro/index.js +1 -0
- package/esm/ScatterChartPro/ScatterChartPro.d.ts +13 -5
- package/esm/ScatterChartPro/ScatterChartPro.js +19 -1
- package/esm/context/index.d.ts +1 -0
- package/esm/context/index.js +1 -0
- package/esm/context/useChartApiContext.d.ts +9 -0
- package/esm/context/useChartApiContext.js +11 -0
- package/esm/hooks/index.d.ts +2 -1
- package/esm/hooks/index.js +2 -1
- package/esm/index.d.ts +2 -1
- package/esm/index.js +2 -1
- package/esm/internals/material/index.d.ts +1 -0
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +10 -0
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +358 -0
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +15 -1
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +7 -0
- package/esm/models/index.d.ts +1 -1
- package/hooks/index.d.ts +2 -1
- package/hooks/index.js +21 -10
- package/index.d.ts +2 -1
- package/index.js +12 -1
- package/internals/material/index.d.ts +1 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.js +10 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +358 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +16 -2
- package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +7 -0
- package/models/index.d.ts +1 -1
- package/package.json +5 -5
- package/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.d.ts +0 -13
- package/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.js +0 -36
- package/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.d.ts +0 -13
- package/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.js +0 -36
- package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.d.ts +0 -13
- package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.js +0 -29
- package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.d.ts +0 -13
- package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.js +0 -29
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { BarChartProps } from '@mui/x-charts/BarChart';
|
|
2
|
+
import { BarChartProps, BarChartSlotProps, BarChartSlots } from '@mui/x-charts/BarChart';
|
|
3
|
+
import { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
3
4
|
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
4
5
|
import { BarChartProPluginsSignatures } from "./BarChartPro.plugins.js";
|
|
5
|
-
export interface
|
|
6
|
+
export interface BarChartProSlots extends BarChartSlots, Partial<ChartsSlotsPro> {}
|
|
7
|
+
export interface BarChartProSlotProps extends BarChartSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
8
|
+
export interface BarChartProProps extends Omit<BarChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<ChartContainerProProps<'bar', BarChartProPluginsSignatures>, 'series' | 'plugins' | 'seriesConfig' | 'slots' | 'slotProps'> {
|
|
6
9
|
/**
|
|
7
|
-
*
|
|
8
|
-
* @default
|
|
10
|
+
* Overridable component slots.
|
|
11
|
+
* @default {}
|
|
9
12
|
*/
|
|
10
|
-
|
|
13
|
+
slots?: BarChartProSlots;
|
|
14
|
+
/**
|
|
15
|
+
* The props used for each component slot.
|
|
16
|
+
* @default {}
|
|
17
|
+
*/
|
|
18
|
+
slotProps?: BarChartProSlotProps;
|
|
11
19
|
}
|
|
12
20
|
/**
|
|
13
21
|
* Demos:
|
|
@@ -77,9 +77,10 @@ const BarChartPro = exports.BarChartPro = /*#__PURE__*/React.forwardRef(function
|
|
|
77
77
|
plugins: _BarChartPro2.BAR_CHART_PRO_PLUGINS
|
|
78
78
|
}), ref);
|
|
79
79
|
const Tooltip = props.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
|
|
80
|
+
const Toolbar = props.slots?.toolbar ?? _ChartsToolbarPro.ChartsToolbarPro;
|
|
80
81
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, chartDataProviderProProps, {
|
|
81
82
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_internals.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
|
|
82
|
-
children: [showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
83
|
+
children: [showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, {}) : null, !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
|
|
83
84
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", (0, _extends2.default)({}, clipPathGroupProps, {
|
|
84
85
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_BarChart.BarPlot, (0, _extends2.default)({}, barPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps))]
|
|
85
86
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartZoomSlider.ChartZoomSlider, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, (0, _extends2.default)({}, clipPathProps)), children]
|
|
@@ -97,6 +98,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
97
98
|
current: _propTypes.default.shape({
|
|
98
99
|
exportAsImage: _propTypes.default.func.isRequired,
|
|
99
100
|
exportAsPrint: _propTypes.default.func.isRequired,
|
|
101
|
+
setAxisZoomData: _propTypes.default.func.isRequired,
|
|
100
102
|
setZoomData: _propTypes.default.func.isRequired
|
|
101
103
|
})
|
|
102
104
|
}),
|
|
@@ -327,6 +329,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
327
329
|
panning: _propTypes.default.bool,
|
|
328
330
|
slider: _propTypes.default.shape({
|
|
329
331
|
enabled: _propTypes.default.bool,
|
|
332
|
+
showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
|
|
330
333
|
size: _propTypes.default.number
|
|
331
334
|
}),
|
|
332
335
|
step: _propTypes.default.number
|
|
@@ -391,6 +394,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
391
394
|
panning: _propTypes.default.bool,
|
|
392
395
|
slider: _propTypes.default.shape({
|
|
393
396
|
enabled: _propTypes.default.bool,
|
|
397
|
+
showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
|
|
394
398
|
size: _propTypes.default.number
|
|
395
399
|
}),
|
|
396
400
|
step: _propTypes.default.number
|
|
@@ -450,6 +454,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
450
454
|
panning: _propTypes.default.bool,
|
|
451
455
|
slider: _propTypes.default.shape({
|
|
452
456
|
enabled: _propTypes.default.bool,
|
|
457
|
+
showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
|
|
453
458
|
size: _propTypes.default.number
|
|
454
459
|
}),
|
|
455
460
|
step: _propTypes.default.number
|
|
@@ -509,6 +514,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
509
514
|
panning: _propTypes.default.bool,
|
|
510
515
|
slider: _propTypes.default.shape({
|
|
511
516
|
enabled: _propTypes.default.bool,
|
|
517
|
+
showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
|
|
512
518
|
size: _propTypes.default.number
|
|
513
519
|
}),
|
|
514
520
|
step: _propTypes.default.number
|
|
@@ -568,6 +574,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
568
574
|
panning: _propTypes.default.bool,
|
|
569
575
|
slider: _propTypes.default.shape({
|
|
570
576
|
enabled: _propTypes.default.bool,
|
|
577
|
+
showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
|
|
571
578
|
size: _propTypes.default.number
|
|
572
579
|
}),
|
|
573
580
|
step: _propTypes.default.number
|
|
@@ -627,6 +634,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
627
634
|
panning: _propTypes.default.bool,
|
|
628
635
|
slider: _propTypes.default.shape({
|
|
629
636
|
enabled: _propTypes.default.bool,
|
|
637
|
+
showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
|
|
630
638
|
size: _propTypes.default.number
|
|
631
639
|
}),
|
|
632
640
|
step: _propTypes.default.number
|
|
@@ -686,6 +694,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
686
694
|
panning: _propTypes.default.bool,
|
|
687
695
|
slider: _propTypes.default.shape({
|
|
688
696
|
enabled: _propTypes.default.bool,
|
|
697
|
+
showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
|
|
689
698
|
size: _propTypes.default.number
|
|
690
699
|
}),
|
|
691
700
|
step: _propTypes.default.number
|
|
@@ -745,6 +754,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
745
754
|
panning: _propTypes.default.bool,
|
|
746
755
|
slider: _propTypes.default.shape({
|
|
747
756
|
enabled: _propTypes.default.bool,
|
|
757
|
+
showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
|
|
748
758
|
size: _propTypes.default.number
|
|
749
759
|
}),
|
|
750
760
|
step: _propTypes.default.number
|
|
@@ -816,6 +826,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
816
826
|
panning: _propTypes.default.bool,
|
|
817
827
|
slider: _propTypes.default.shape({
|
|
818
828
|
enabled: _propTypes.default.bool,
|
|
829
|
+
showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
|
|
819
830
|
size: _propTypes.default.number
|
|
820
831
|
}),
|
|
821
832
|
step: _propTypes.default.number
|
|
@@ -879,6 +890,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
879
890
|
panning: _propTypes.default.bool,
|
|
880
891
|
slider: _propTypes.default.shape({
|
|
881
892
|
enabled: _propTypes.default.bool,
|
|
893
|
+
showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
|
|
882
894
|
size: _propTypes.default.number
|
|
883
895
|
}),
|
|
884
896
|
step: _propTypes.default.number
|
|
@@ -937,6 +949,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
937
949
|
panning: _propTypes.default.bool,
|
|
938
950
|
slider: _propTypes.default.shape({
|
|
939
951
|
enabled: _propTypes.default.bool,
|
|
952
|
+
showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
|
|
940
953
|
size: _propTypes.default.number
|
|
941
954
|
}),
|
|
942
955
|
step: _propTypes.default.number
|
|
@@ -995,6 +1008,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
995
1008
|
panning: _propTypes.default.bool,
|
|
996
1009
|
slider: _propTypes.default.shape({
|
|
997
1010
|
enabled: _propTypes.default.bool,
|
|
1011
|
+
showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
|
|
998
1012
|
size: _propTypes.default.number
|
|
999
1013
|
}),
|
|
1000
1014
|
step: _propTypes.default.number
|
|
@@ -1053,6 +1067,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
1053
1067
|
panning: _propTypes.default.bool,
|
|
1054
1068
|
slider: _propTypes.default.shape({
|
|
1055
1069
|
enabled: _propTypes.default.bool,
|
|
1070
|
+
showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
|
|
1056
1071
|
size: _propTypes.default.number
|
|
1057
1072
|
}),
|
|
1058
1073
|
step: _propTypes.default.number
|
|
@@ -1111,6 +1126,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
1111
1126
|
panning: _propTypes.default.bool,
|
|
1112
1127
|
slider: _propTypes.default.shape({
|
|
1113
1128
|
enabled: _propTypes.default.bool,
|
|
1129
|
+
showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
|
|
1114
1130
|
size: _propTypes.default.number
|
|
1115
1131
|
}),
|
|
1116
1132
|
step: _propTypes.default.number
|
|
@@ -1169,6 +1185,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
1169
1185
|
panning: _propTypes.default.bool,
|
|
1170
1186
|
slider: _propTypes.default.shape({
|
|
1171
1187
|
enabled: _propTypes.default.bool,
|
|
1188
|
+
showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
|
|
1172
1189
|
size: _propTypes.default.number
|
|
1173
1190
|
}),
|
|
1174
1191
|
step: _propTypes.default.number
|
|
@@ -1227,6 +1244,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
1227
1244
|
panning: _propTypes.default.bool,
|
|
1228
1245
|
slider: _propTypes.default.shape({
|
|
1229
1246
|
enabled: _propTypes.default.bool,
|
|
1247
|
+
showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
|
|
1230
1248
|
size: _propTypes.default.number
|
|
1231
1249
|
}),
|
|
1232
1250
|
step: _propTypes.default.number
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,109 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.5.0
|
|
9
|
+
|
|
10
|
+
_May 29, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 📊 Add support for exporting `RadarChartPro`, `FunnelChart` and `Heatmap` as image and PDF.
|
|
15
|
+
- 📊 `RadarChart` is now stable.
|
|
16
|
+
|
|
17
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
18
|
+
@xBlizZer, @sai6855, @alisasanib.
|
|
19
|
+
Following are all team members who have contributed to this release:
|
|
20
|
+
@alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @KenanYusuf, @LukasTy, @oliviertassinari.
|
|
21
|
+
|
|
22
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
23
|
+
|
|
24
|
+
### Data Grid
|
|
25
|
+
|
|
26
|
+
#### `@mui/x-data-grid@8.5.0`
|
|
27
|
+
|
|
28
|
+
- [DataGrid] Avoid ResizeObserver loop error (#17984) @cherniavskii
|
|
29
|
+
- [DataGrid] Fix column management `toggleColumn` event type (#18023) @KenanYusuf
|
|
30
|
+
- [DataGrid] Remove unnecessary `any` type (#17979) @sai6855
|
|
31
|
+
|
|
32
|
+
#### `@mui/x-data-grid-pro@8.5.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
33
|
+
|
|
34
|
+
Same changes as in `@mui/x-data-grid@8.5.0`, plus:
|
|
35
|
+
|
|
36
|
+
- [DataGridPro] Allow multi sorting without modifier key (#17925) @cherniavskii
|
|
37
|
+
- [DataGridPro] Row reordering icon improvements (#17947) @KenanYusuf
|
|
38
|
+
- [DataGridPro] Fix pinned columns order in column management (#17950) @alisasanib
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-data-grid-premium@8.5.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
41
|
+
|
|
42
|
+
Same changes as in `@mui/x-data-grid-pro@8.5.0`, plus:
|
|
43
|
+
|
|
44
|
+
- [DataGridPremium] Export `GridApiPremium` type (#18037) @arminmeh
|
|
45
|
+
|
|
46
|
+
### Date and Time Pickers
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-date-pickers@8.5.0`
|
|
49
|
+
|
|
50
|
+
Internal changes.
|
|
51
|
+
|
|
52
|
+
#### `@mui/x-date-pickers-pro@8.5.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
53
|
+
|
|
54
|
+
Same changes as in `@mui/x-date-pickers@8.5.0`, plus:
|
|
55
|
+
|
|
56
|
+
- [DateRangePicker] Allow to override the format in the field (#17972) @flaviendelangle
|
|
57
|
+
|
|
58
|
+
### Charts
|
|
59
|
+
|
|
60
|
+
#### `@mui/x-charts@8.5.0`
|
|
61
|
+
|
|
62
|
+
- [charts] Add `render` prop to charts toolbar components (#17649) @bernardobelchior
|
|
63
|
+
- [charts] Add configurable slots to toolbar (#17712) @bernardobelchior
|
|
64
|
+
- [charts] Export `useFunnelSeries` and `useRadarSeries` (#18034) @JCQuintas
|
|
65
|
+
- [charts] Expose `ChartApi` through context (#18004) @bernardobelchior
|
|
66
|
+
- [charts] Mark Radar chart as stable (#17946) @alexfauquette
|
|
67
|
+
- [charts] Only update store if interaction item is different (#17851) @bernardobelchior
|
|
68
|
+
- [charts] Reuse shared date utils (#18014) @JCQuintas
|
|
69
|
+
- [charts] Use Map for string cache instead of object (#17982) @bernardobelchior
|
|
70
|
+
- [charts] Fix Population pyramid demo (#17987) @oliviertassinari
|
|
71
|
+
|
|
72
|
+
#### `@mui/x-charts-pro@8.5.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
73
|
+
|
|
74
|
+
Same changes as in `@mui/x-charts@8.5.0`, plus:
|
|
75
|
+
|
|
76
|
+
- [charts-pro] Add range selection to zoom slider (#17949) @bernardobelchior
|
|
77
|
+
- [charts-pro] Allow configuring zoom slider tooltip (#18030) @bernardobelchior
|
|
78
|
+
- [charts-pro] Allow exporting a funnel chart (#17957) @bernardobelchior
|
|
79
|
+
- [charts-pro] Allow exporting a heatmap chart (#17916) @bernardobelchior
|
|
80
|
+
- [charts-pro] Allow exporting a radar chart (#17968) @bernardobelchior
|
|
81
|
+
- [charts-pro] Always show both zoom slider tooltips (#18027) @bernardobelchior
|
|
82
|
+
- [charts-pro] Show zoom slider tooltip when selecting range (#18028) @bernardobelchior
|
|
83
|
+
- [charts-pro] Split `ChartAxisZoomSlider` into smaller files (#18011) @bernardobelchior
|
|
84
|
+
- [charts-pro] Update zoom slider range selection cursor (#17977) @bernardobelchior
|
|
85
|
+
- [charts-pro] Add support for Heatmap legend (#17943) @alexfauquette
|
|
86
|
+
|
|
87
|
+
### Tree View
|
|
88
|
+
|
|
89
|
+
#### `@mui/x-tree-view@8.5.0`
|
|
90
|
+
|
|
91
|
+
Internal changes.
|
|
92
|
+
|
|
93
|
+
#### `@mui/x-tree-view-pro@8.5.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
94
|
+
|
|
95
|
+
Same changes as in `@mui/x-tree-view@8.5.0`.
|
|
96
|
+
|
|
97
|
+
### Docs
|
|
98
|
+
|
|
99
|
+
- [docs] Fix derived column pivoting demo crash (#17944) @arminmeh
|
|
100
|
+
- [docs] Fix light/dark mode blink on pickers overview (#18002) @alexfauquette
|
|
101
|
+
- [docs] Fix scatter shape demo causing horizontal overflow (#17974) @bernardobelchior
|
|
102
|
+
|
|
103
|
+
### Core
|
|
104
|
+
|
|
105
|
+
- [code-infra] Add bundle size monitor (#17754) @Janpot
|
|
106
|
+
- [code-infra] Enable `babel-plugin-display-name` in vitest (#17903) @JCQuintas
|
|
107
|
+
- [infra] Remove last deprecated `ponyfillGlobal` usage (#18003) @LukasTy
|
|
108
|
+
- [infra] Use `babel-plugin-display-name` from npm (#18040) @LukasTy
|
|
109
|
+
- [x-telemetry] Remove deprecated `ponyfillGlobal` (#17986) @xBlizZer
|
|
110
|
+
|
|
8
111
|
## 8.4.0
|
|
9
112
|
|
|
10
113
|
_May 21, 2025_
|
|
@@ -7,7 +7,6 @@ export type ChartContainerProProps<TSeries extends ChartSeriesType = ChartSeries
|
|
|
7
7
|
type ChartContainerProComponent = <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartContainerProProps<TSeries, TSignatures> & {
|
|
8
8
|
ref?: React.ForwardedRef<SVGSVGElement>;
|
|
9
9
|
}) => React.JSX.Element;
|
|
10
|
-
export type ChartProApi = NonNullable<NonNullable<ChartContainerProProps['apiRef']>['current']>;
|
|
11
10
|
/**
|
|
12
11
|
* It sets up the data providers as well as the `<svg>` for the chart.
|
|
13
12
|
*
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ChartAnyPluginSignature, ChartPublicAPI } from '@mui/x-charts/internals';
|
|
2
|
+
import { HeatmapPluginsSignatures } from "../Heatmap/Heatmap.plugins.js";
|
|
3
|
+
import { LineChartProPluginsSignatures } from "../LineChartPro/LineChartPro.plugins.js";
|
|
4
|
+
import { ScatterChartProPluginsSignatures } from "../ScatterChartPro/ScatterChartPro.plugins.js";
|
|
5
|
+
import { BarChartProPluginsSignatures } from "../BarChartPro/BarChartPro.plugins.js";
|
|
6
|
+
import { AllPluginSignatures, DefaultPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
7
|
+
import { FunnelChartPluginsSignatures } from "../FunnelChart/FunnelChart.plugins.js";
|
|
8
|
+
import { RadarChartProPluginsSignatures } from "../RadarChartPro/RadarChartPro.plugins.js";
|
|
9
|
+
type PluginsPerSeriesType = {
|
|
10
|
+
heatmap: HeatmapPluginsSignatures;
|
|
11
|
+
line: LineChartProPluginsSignatures;
|
|
12
|
+
scatter: ScatterChartProPluginsSignatures;
|
|
13
|
+
bar: BarChartProPluginsSignatures;
|
|
14
|
+
funnel: FunnelChartPluginsSignatures;
|
|
15
|
+
radar: RadarChartProPluginsSignatures;
|
|
16
|
+
composition: DefaultPluginSignatures;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The API of the chart `apiRef` object.
|
|
20
|
+
* The chart type can be passed as the first generic parameter to narrow down the API to the specific chart type.
|
|
21
|
+
* @example ChartProApi<'bar'>
|
|
22
|
+
* If the chart is being created using composition, the `composition` value can be used.
|
|
23
|
+
* @example ChartProApi<'composition'>
|
|
24
|
+
*/
|
|
25
|
+
export type ChartProApi<TSeries extends keyof PluginsPerSeriesType | undefined = undefined, TSignatures extends readonly ChartAnyPluginSignature[] = (TSeries extends keyof PluginsPerSeriesType ? PluginsPerSeriesType[TSeries] : AllPluginSignatures)> = ChartPublicAPI<TSignatures>;
|
|
26
|
+
export {};
|
|
@@ -14,4 +14,15 @@ Object.keys(_ChartContainerPro).forEach(function (key) {
|
|
|
14
14
|
return _ChartContainerPro[key];
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
+
});
|
|
18
|
+
var _ChartProApi = require("./ChartProApi");
|
|
19
|
+
Object.keys(_ChartProApi).forEach(function (key) {
|
|
20
|
+
if (key === "default" || key === "__esModule") return;
|
|
21
|
+
if (key in exports && exports[key] === _ChartProApi[key]) return;
|
|
22
|
+
Object.defineProperty(exports, key, {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () {
|
|
25
|
+
return _ChartProApi[key];
|
|
26
|
+
}
|
|
27
|
+
});
|
|
17
28
|
});
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ChartSeriesType, ChartAnyPluginSignature, ChartProviderProps } from '@mui/x-charts/internals';
|
|
3
3
|
import { ChartDataProviderProps } from '@mui/x-charts/ChartDataProvider';
|
|
4
|
+
import { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
4
5
|
import { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
-
export type ChartDataProviderProProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartDataProviderProps<TSeries, TSignatures> & ChartProviderProps<TSeries, TSignatures>['pluginParams']
|
|
6
|
+
export type ChartDataProviderProProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartDataProviderProps<TSeries, TSignatures> & ChartProviderProps<TSeries, TSignatures>['pluginParams'] & {
|
|
7
|
+
/**
|
|
8
|
+
* Slots to customize charts' components.
|
|
9
|
+
*/
|
|
10
|
+
slots?: Partial<ChartsSlotsPro>;
|
|
11
|
+
/**
|
|
12
|
+
* The props for the slots.
|
|
13
|
+
*/
|
|
14
|
+
slotProps?: Partial<ChartsSlotPropsPro>;
|
|
15
|
+
};
|
|
6
16
|
/**
|
|
7
17
|
* Orchestrates the data providers for the chart components and hooks.
|
|
8
18
|
*
|
|
@@ -14,10 +14,11 @@ var _Watermark = require("@mui/x-license/Watermark");
|
|
|
14
14
|
var _internals = require("@mui/x-charts/internals");
|
|
15
15
|
var _ChartsLocalizationProvider = require("@mui/x-charts/ChartsLocalizationProvider");
|
|
16
16
|
var _useLicenseVerifier = require("@mui/x-license/useLicenseVerifier");
|
|
17
|
+
var _material = require("../internals/material");
|
|
17
18
|
var _allPlugins = require("../internals/plugins/allPlugins");
|
|
18
19
|
var _useChartDataProviderProProps = require("./useChartDataProviderProProps");
|
|
19
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const releaseInfo = "
|
|
21
|
+
const releaseInfo = "MTc0ODQ2OTYwMDAwMA==";
|
|
21
22
|
const packageIdentifier = 'x-charts-pro';
|
|
22
23
|
/**
|
|
23
24
|
* Orchestrates the data providers for the chart components and hooks.
|
|
@@ -50,7 +51,9 @@ function ChartDataProviderPro(props) {
|
|
|
50
51
|
const {
|
|
51
52
|
children,
|
|
52
53
|
localeText,
|
|
53
|
-
chartProviderProps
|
|
54
|
+
chartProviderProps,
|
|
55
|
+
slots,
|
|
56
|
+
slotProps
|
|
54
57
|
} = (0, _useChartDataProviderProProps.useChartDataProviderProProps)((0, _extends2.default)({}, props, {
|
|
55
58
|
plugins: props.plugins ?? _allPlugins.DEFAULT_PLUGINS
|
|
56
59
|
}));
|
|
@@ -58,7 +61,12 @@ function ChartDataProviderPro(props) {
|
|
|
58
61
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_internals.ChartProvider, (0, _extends2.default)({}, chartProviderProps, {
|
|
59
62
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLocalizationProvider.ChartsLocalizationProvider, {
|
|
60
63
|
localeText: localeText,
|
|
61
|
-
children:
|
|
64
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.ChartsSlotsProvider, {
|
|
65
|
+
slots: slots,
|
|
66
|
+
slotProps: slotProps,
|
|
67
|
+
defaultSlots: _material.defaultSlotsMaterial,
|
|
68
|
+
children: children
|
|
69
|
+
})
|
|
62
70
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Watermark.Watermark, {
|
|
63
71
|
packageName: packageIdentifier,
|
|
64
72
|
releaseInfo: releaseInfo
|
|
@@ -118,6 +126,14 @@ process.env.NODE_ENV !== "production" ? ChartDataProviderPro.propTypes = {
|
|
|
118
126
|
* If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
|
|
119
127
|
*/
|
|
120
128
|
skipAnimation: _propTypes.default.bool,
|
|
129
|
+
/**
|
|
130
|
+
* The props for the slots.
|
|
131
|
+
*/
|
|
132
|
+
slotProps: _propTypes.default.object,
|
|
133
|
+
/**
|
|
134
|
+
* Slots to customize charts' components.
|
|
135
|
+
*/
|
|
136
|
+
slots: _propTypes.default.object,
|
|
121
137
|
theme: _propTypes.default.oneOf(['dark', 'light']),
|
|
122
138
|
/**
|
|
123
139
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
@@ -5,4 +5,6 @@ export declare const useChartDataProviderProProps: <TSeries extends ChartSeriesT
|
|
|
5
5
|
children: import("react").ReactNode;
|
|
6
6
|
localeText: Partial<import("@mui/x-charts/locales").ChartsLocaleText> | undefined;
|
|
7
7
|
chartProviderProps: import("@mui/x-charts/internals").ChartProviderProps<TSeries, TSignatures>;
|
|
8
|
+
slots: Partial<import("@mui/x-charts/internals").ChartsSlots> | undefined;
|
|
9
|
+
slotProps: Partial<import("@mui/x-charts/internals").ChartsSlotProps> | undefined;
|
|
8
10
|
};
|
|
@@ -10,12 +10,16 @@ const useChartDataProviderProProps = props => {
|
|
|
10
10
|
const {
|
|
11
11
|
chartProviderProps,
|
|
12
12
|
localeText,
|
|
13
|
+
slots,
|
|
14
|
+
slotProps,
|
|
13
15
|
children
|
|
14
16
|
} = (0, _internals.useChartDataProviderProps)(props);
|
|
15
17
|
return {
|
|
16
18
|
children,
|
|
17
19
|
localeText,
|
|
18
|
-
chartProviderProps
|
|
20
|
+
chartProviderProps,
|
|
21
|
+
slots,
|
|
22
|
+
slotProps
|
|
19
23
|
};
|
|
20
24
|
};
|
|
21
25
|
exports.useChartDataProviderProProps = useChartDataProviderProProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { AxisId
|
|
2
|
+
import { AxisId } from '@mui/x-charts/internals';
|
|
3
3
|
interface ChartZoomSliderProps {
|
|
4
4
|
/**
|
|
5
5
|
* The ID of the axis this overview refers to.
|
|
@@ -18,6 +18,4 @@ export declare function ChartAxisZoomSlider({
|
|
|
18
18
|
axisDirection,
|
|
19
19
|
axisId
|
|
20
20
|
}: ChartZoomSliderProps): React.JSX.Element | null;
|
|
21
|
-
export declare function calculateZoomStart(newStart: number, currentZoom: ZoomData, options: Pick<DefaultizedZoomOptions, 'minStart' | 'minSpan' | 'maxSpan'>): number;
|
|
22
|
-
export declare function calculateZoomEnd(newEnd: number, currentZoom: ZoomData, options: Pick<DefaultizedZoomOptions, 'maxEnd' | 'minSpan' | 'maxSpan'>): number;
|
|
23
21
|
export {};
|