@mui/x-charts-pro 9.8.0 → 9.10.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.mts +9 -1
- package/BarChartPro/BarChartPro.d.ts +9 -1
- package/BarChartPro/BarChartPro.js +14 -3
- package/BarChartPro/BarChartPro.mjs +14 -3
- package/BarChartPro/BarChartPro.plugins.d.mts +2 -1
- package/BarChartPro/BarChartPro.plugins.d.ts +2 -1
- package/BarChartPro/BarChartPro.plugins.js +2 -1
- package/BarChartPro/BarChartPro.plugins.mjs +2 -1
- package/CHANGELOG.md +230 -0
- package/ChartsContainerPro/useChartsContainerProProps.d.mts +6 -2
- package/ChartsContainerPro/useChartsContainerProProps.d.ts +6 -2
- package/ChartsContainerPro/useChartsContainerProProps.js +9 -1
- package/ChartsContainerPro/useChartsContainerProProps.mjs +8 -1
- package/ChartsDataProviderPro/ChartsDataProviderPro.d.mts +1 -1
- package/ChartsDataProviderPro/ChartsDataProviderPro.d.ts +1 -1
- package/ChartsDataProviderPro/ChartsDataProviderPro.js +14 -3
- package/ChartsDataProviderPro/ChartsDataProviderPro.mjs +14 -3
- package/ChartsDataProviderPro/useChartsDataProviderProProps.d.mts +1 -1
- package/ChartsDataProviderPro/useChartsDataProviderProProps.d.ts +1 -1
- package/ChartsToolbarPro/ChartsToolbarPro.d.mts +2 -1
- package/ChartsToolbarPro/ChartsToolbarPro.d.ts +2 -1
- package/ChartsToolbarPro/Toolbar.types.d.mts +2 -1
- package/ChartsToolbarPro/Toolbar.types.d.ts +2 -1
- package/ChartsToolbarPro/internals/ChartsMenu.d.mts +1 -1
- package/ChartsToolbarPro/internals/ChartsMenu.d.ts +1 -1
- package/ChartsZoomSlider/ChartsZoomSlider.d.mts +2 -1
- package/ChartsZoomSlider/ChartsZoomSlider.d.ts +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSlider.d.mts +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSlider.d.ts +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.d.mts +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.d.ts +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderPreview.d.mts +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderPreview.d.ts +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderPreviewContent.d.mts +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderPreviewContent.d.ts +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.d.mts +1 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.d.ts +1 -1
- package/ChartsZoomSlider/internals/ChartsTooltipZoomSliderValue.d.mts +1 -1
- package/ChartsZoomSlider/internals/ChartsTooltipZoomSliderValue.d.ts +1 -1
- package/ChartsZoomSlider/internals/chartsAxisZoomSliderTrackClasses.d.mts +1 -1
- package/ChartsZoomSlider/internals/chartsAxisZoomSliderTrackClasses.d.ts +1 -1
- package/ChartsZoomSlider/internals/previews/AreaPreviewPlot.d.mts +1 -1
- package/ChartsZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
- package/ChartsZoomSlider/internals/previews/BarPreviewPlot.d.mts +1 -1
- package/ChartsZoomSlider/internals/previews/BarPreviewPlot.d.ts +1 -1
- package/ChartsZoomSlider/internals/previews/LineAreaPreviewPlot.d.mts +2 -1
- package/ChartsZoomSlider/internals/previews/LineAreaPreviewPlot.d.ts +2 -1
- package/ChartsZoomSlider/internals/previews/LinePreviewPlot.d.mts +1 -1
- package/ChartsZoomSlider/internals/previews/LinePreviewPlot.d.ts +1 -1
- package/ChartsZoomSlider/internals/previews/LinePreviewPlot.js +16 -1
- package/ChartsZoomSlider/internals/previews/LinePreviewPlot.mjs +17 -2
- package/ChartsZoomSlider/internals/previews/ScatterPreviewPlot.d.mts +2 -1
- package/ChartsZoomSlider/internals/previews/ScatterPreviewPlot.d.ts +2 -1
- package/FunnelChart/FocusedFunnelSection.d.mts +1 -1
- package/FunnelChart/FocusedFunnelSection.d.ts +1 -1
- package/FunnelChart/FunnelPlot.d.mts +1 -1
- package/FunnelChart/FunnelPlot.d.ts +1 -1
- package/FunnelChart/curves/getFunnelCurve.d.mts +1 -1
- package/FunnelChart/curves/getFunnelCurve.d.ts +1 -1
- package/FunnelChart/funnelClasses.d.mts +1 -1
- package/FunnelChart/funnelClasses.d.ts +1 -1
- package/FunnelChart/funnelPlotSlots.types.d.mts +3 -2
- package/FunnelChart/funnelPlotSlots.types.d.ts +3 -2
- package/FunnelChart/labelUtils.d.mts +2 -2
- package/FunnelChart/labelUtils.d.ts +2 -2
- package/FunnelChart/seriesConfig/index.js +2 -2
- package/FunnelChart/seriesConfig/index.mjs +2 -2
- package/FunnelChart/seriesConfig/tooltipPosition.d.mts +2 -3
- package/FunnelChart/seriesConfig/tooltipPosition.d.ts +2 -3
- package/FunnelChart/seriesConfig/tooltipPosition.js +11 -15
- package/FunnelChart/seriesConfig/tooltipPosition.mjs +11 -15
- package/Heatmap/FocusedHeatmapCell.d.mts +1 -1
- package/Heatmap/FocusedHeatmapCell.d.ts +1 -1
- package/Heatmap/Heatmap.d.mts +2 -1
- package/Heatmap/Heatmap.d.ts +2 -1
- package/Heatmap/HeatmapItem.d.mts +3 -2
- package/Heatmap/HeatmapItem.d.ts +3 -2
- package/Heatmap/HeatmapSVGPlot.d.mts +2 -1
- package/Heatmap/HeatmapSVGPlot.d.ts +2 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.d.mts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.d.ts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.d.mts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.mts +2 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +2 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.mts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +1 -1
- package/Heatmap/seriesConfig/highlight.d.mts +2 -2
- package/Heatmap/seriesConfig/highlight.d.ts +2 -2
- package/Heatmap/seriesConfig/index.js +2 -2
- package/Heatmap/seriesConfig/index.mjs +2 -2
- package/Heatmap/seriesConfig/tooltipPosition.d.mts +2 -3
- package/Heatmap/seriesConfig/tooltipPosition.d.ts +2 -3
- package/Heatmap/seriesConfig/tooltipPosition.js +12 -16
- package/Heatmap/seriesConfig/tooltipPosition.mjs +12 -16
- package/LineChartPro/LineChartPro.d.mts +11 -1
- package/LineChartPro/LineChartPro.d.ts +11 -1
- package/LineChartPro/LineChartPro.js +16 -3
- package/LineChartPro/LineChartPro.mjs +16 -3
- package/LineChartPro/LineChartPro.plugins.d.mts +2 -1
- package/LineChartPro/LineChartPro.plugins.d.ts +2 -1
- package/LineChartPro/LineChartPro.plugins.js +2 -1
- package/LineChartPro/LineChartPro.plugins.mjs +2 -1
- package/SankeyChart/FocusedSankeyLink.d.mts +1 -1
- package/SankeyChart/FocusedSankeyLink.d.ts +1 -1
- package/SankeyChart/FocusedSankeyNode.d.mts +1 -1
- package/SankeyChart/FocusedSankeyNode.d.ts +1 -1
- package/SankeyChart/SankeyDataProvider.d.mts +1 -1
- package/SankeyChart/SankeyDataProvider.d.ts +1 -1
- package/SankeyChart/SankeyLinkLabelPlot.d.mts +1 -1
- package/SankeyChart/SankeyLinkLabelPlot.d.ts +1 -1
- package/SankeyChart/SankeyLinkPlot.d.mts +1 -1
- package/SankeyChart/SankeyLinkPlot.d.ts +1 -1
- package/SankeyChart/SankeyNodeLabelPlot.d.mts +1 -1
- package/SankeyChart/SankeyNodeLabelPlot.d.ts +1 -1
- package/SankeyChart/SankeyNodePlot.d.mts +1 -1
- package/SankeyChart/SankeyNodePlot.d.ts +1 -1
- package/SankeyChart/SankeyPlot.d.mts +1 -1
- package/SankeyChart/SankeyPlot.d.ts +1 -1
- package/SankeyChart/SankeyTooltip/SankeyTooltip.classes.d.mts +1 -1
- package/SankeyChart/SankeyTooltip/SankeyTooltip.classes.d.ts +1 -1
- package/SankeyChart/SankeyTooltip/SankeyTooltip.d.mts +1 -1
- package/SankeyChart/SankeyTooltip/SankeyTooltip.d.ts +1 -1
- package/SankeyChart/SankeyTooltip/SankeyTooltipContent.d.mts +1 -1
- package/SankeyChart/SankeyTooltip/SankeyTooltipContent.d.ts +1 -1
- package/SankeyChart/sankeyClasses.d.mts +1 -1
- package/SankeyChart/sankeyClasses.d.ts +1 -1
- package/SankeyChart/seriesConfig/createIsFaded.d.mts +1 -1
- package/SankeyChart/seriesConfig/createIsFaded.d.ts +1 -1
- package/SankeyChart/seriesConfig/index.js +2 -2
- package/SankeyChart/seriesConfig/index.mjs +2 -2
- package/SankeyChart/seriesConfig/tooltipPosition.d.mts +2 -3
- package/SankeyChart/seriesConfig/tooltipPosition.d.ts +2 -3
- package/SankeyChart/seriesConfig/tooltipPosition.js +6 -11
- package/SankeyChart/seriesConfig/tooltipPosition.mjs +5 -10
- package/SankeyChart/utils.d.mts +2 -2
- package/SankeyChart/utils.d.ts +2 -2
- package/ScatterChartPro/ScatterChartPro.d.mts +2 -1
- package/ScatterChartPro/ScatterChartPro.d.ts +2 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/ChartsWatermark.d.mts +2 -1
- package/internals/ChartsWatermark.d.ts +2 -1
- package/internals/index.d.mts +2 -0
- package/internals/index.d.ts +2 -0
- package/internals/index.js +30 -0
- package/internals/index.mjs +2 -0
- package/internals/material/components/BaseMenuItem.d.mts +1 -1
- package/internals/material/components/BaseMenuItem.d.ts +1 -1
- package/internals/material/components/BasePopper.d.mts +2 -1
- package/internals/material/components/BasePopper.d.ts +2 -1
- package/internals/plugins/allPlugins.d.mts +2 -2
- package/internals/plugins/allPlugins.d.ts +2 -2
- package/internals/plugins/useChartProSampling/barSampler.d.mts +8 -0
- package/internals/plugins/useChartProSampling/barSampler.d.ts +8 -0
- package/internals/plugins/useChartProSampling/barSampler.js +18 -0
- package/internals/plugins/useChartProSampling/barSampler.mjs +12 -0
- package/internals/plugins/useChartProSampling/index.d.mts +2 -0
- package/internals/plugins/useChartProSampling/index.d.ts +2 -0
- package/internals/plugins/useChartProSampling/index.js +12 -0
- package/internals/plugins/useChartProSampling/index.mjs +1 -0
- package/internals/plugins/useChartProSampling/lineSampler.d.mts +8 -0
- package/internals/plugins/useChartProSampling/lineSampler.d.ts +8 -0
- package/internals/plugins/useChartProSampling/lineSampler.js +47 -0
- package/internals/plugins/useChartProSampling/lineSampler.mjs +41 -0
- package/internals/plugins/useChartProSampling/sampling.d.mts +38 -0
- package/internals/plugins/useChartProSampling/sampling.d.ts +38 -0
- package/internals/plugins/useChartProSampling/sampling.js +175 -0
- package/internals/plugins/useChartProSampling/sampling.line.d.mts +22 -0
- package/internals/plugins/useChartProSampling/sampling.line.d.ts +22 -0
- package/internals/plugins/useChartProSampling/sampling.line.js +172 -0
- package/internals/plugins/useChartProSampling/sampling.line.mjs +164 -0
- package/internals/plugins/useChartProSampling/sampling.mjs +164 -0
- package/internals/plugins/useChartProSampling/sampling.pyramid.types.d.mts +33 -0
- package/internals/plugins/useChartProSampling/sampling.pyramid.types.d.ts +33 -0
- package/internals/plugins/useChartProSampling/sampling.pyramid.types.js +5 -0
- package/internals/plugins/useChartProSampling/sampling.pyramid.types.mjs +1 -0
- package/internals/plugins/useChartProSampling/useChartProSampling.d.mts +4 -0
- package/internals/plugins/useChartProSampling/useChartProSampling.d.ts +4 -0
- package/internals/plugins/useChartProSampling/useChartProSampling.js +59 -0
- package/internals/plugins/useChartProSampling/useChartProSampling.mjs +52 -0
- package/internals/plugins/useChartProSampling/useChartProSampling.types.d.mts +25 -0
- package/internals/plugins/useChartProSampling/useChartProSampling.types.d.ts +25 -0
- package/internals/plugins/useChartProSampling/useChartProSampling.types.js +5 -0
- package/internals/plugins/useChartProSampling/useChartProSampling.types.mjs +1 -0
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.mts +26 -26
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.ts +26 -26
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.mts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.mts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.mts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useRegisterZoomGestures.d.mts +4 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useRegisterZoomGestures.d.ts +4 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useRegisterZoomGestures.mjs +1 -0
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.mts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.mts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.mts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.mts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.mts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +1 -1
- package/package.json +6 -6
- package/typeOverloads/modules.d.mts +9 -1
- package/typeOverloads/modules.d.ts +9 -1
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { BarChartProps, BarChartSlotProps, BarChartSlots } from '@mui/x-charts/BarChart';
|
|
3
|
+
import type { BarSamplingMethod } from '@mui/x-charts/internals';
|
|
3
4
|
import type { ChartsToolbarProSlotProps, ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.mjs";
|
|
4
5
|
import type { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.mjs";
|
|
5
6
|
import type { ChartsContainerProProps } from "../ChartsContainerPro/index.mjs";
|
|
6
7
|
import type { BarChartProPluginSignatures } from "./BarChartPro.plugins.mjs";
|
|
7
8
|
export interface BarChartProSlots extends Omit<BarChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
8
9
|
export interface BarChartProSlotProps extends Omit<BarChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
9
|
-
export interface BarChartProProps extends Omit<BarChartProps, 'apiRef' | 'slots' | 'slotProps' | 'seriesConfig' | 'plugins'>, Omit<ChartsContainerProProps<'bar', BarChartProPluginSignatures>, 'series' | 'slots' | 'slotProps'> {
|
|
10
|
+
export interface BarChartProProps extends Omit<BarChartProps, 'apiRef' | 'slots' | 'slotProps' | 'seriesConfig' | 'plugins'>, Omit<ChartsContainerProProps<'bar', BarChartProPluginSignatures>, 'series' | 'slots' | 'slotProps' | 'sampling'> {
|
|
11
|
+
/**
|
|
12
|
+
* Sampling method used to render large datasets when zoomed out.
|
|
13
|
+
* - `'none'`: render every bar (no sampling).
|
|
14
|
+
* - `'minmax'`: keep the min and max per bucket and draw one merged bar.
|
|
15
|
+
* @default 'none'
|
|
16
|
+
*/
|
|
17
|
+
sampling?: BarSamplingMethod;
|
|
10
18
|
/**
|
|
11
19
|
* Overridable component slots.
|
|
12
20
|
* @default {}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { BarChartProps, BarChartSlotProps, BarChartSlots } from '@mui/x-charts/BarChart';
|
|
3
|
+
import type { BarSamplingMethod } from '@mui/x-charts/internals';
|
|
3
4
|
import type { ChartsToolbarProSlotProps, ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
4
5
|
import type { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
5
6
|
import type { ChartsContainerProProps } from "../ChartsContainerPro/index.js";
|
|
6
7
|
import type { BarChartProPluginSignatures } from "./BarChartPro.plugins.js";
|
|
7
8
|
export interface BarChartProSlots extends Omit<BarChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
8
9
|
export interface BarChartProSlotProps extends Omit<BarChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
9
|
-
export interface BarChartProProps extends Omit<BarChartProps, 'apiRef' | 'slots' | 'slotProps' | 'seriesConfig' | 'plugins'>, Omit<ChartsContainerProProps<'bar', BarChartProPluginSignatures>, 'series' | 'slots' | 'slotProps'> {
|
|
10
|
+
export interface BarChartProProps extends Omit<BarChartProps, 'apiRef' | 'slots' | 'slotProps' | 'seriesConfig' | 'plugins'>, Omit<ChartsContainerProProps<'bar', BarChartProPluginSignatures>, 'series' | 'slots' | 'slotProps' | 'sampling'> {
|
|
11
|
+
/**
|
|
12
|
+
* Sampling method used to render large datasets when zoomed out.
|
|
13
|
+
* - `'none'`: render every bar (no sampling).
|
|
14
|
+
* - `'minmax'`: keep the min and max per bucket and draw one merged bar.
|
|
15
|
+
* @default 'none'
|
|
16
|
+
*/
|
|
17
|
+
sampling?: BarSamplingMethod;
|
|
10
18
|
/**
|
|
11
19
|
* Overridable component slots.
|
|
12
20
|
* @default {}
|
|
@@ -30,7 +30,7 @@ var _useChartsContainerProProps = require("../ChartsContainerPro/useChartsContai
|
|
|
30
30
|
var _ChartsDataProviderPro = require("../ChartsDataProviderPro");
|
|
31
31
|
var _BarChartPro2 = require("./BarChartPro.plugins");
|
|
32
32
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
33
|
-
const _excluded = ["initialZoom", "zoomData", "onZoomChange", "apiRef", "showToolbar"];
|
|
33
|
+
const _excluded = ["initialZoom", "zoomData", "onZoomChange", "apiRef", "showToolbar", "sampling"];
|
|
34
34
|
/**
|
|
35
35
|
* Demos:
|
|
36
36
|
*
|
|
@@ -52,7 +52,8 @@ const BarChartPro = exports.BarChartPro = /*#__PURE__*/React.forwardRef(function
|
|
|
52
52
|
zoomData,
|
|
53
53
|
onZoomChange,
|
|
54
54
|
apiRef,
|
|
55
|
-
showToolbar
|
|
55
|
+
showToolbar,
|
|
56
|
+
sampling
|
|
56
57
|
} = props,
|
|
57
58
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
58
59
|
const {
|
|
@@ -77,7 +78,10 @@ const BarChartPro = exports.BarChartPro = /*#__PURE__*/React.forwardRef(function
|
|
|
77
78
|
onZoomChange,
|
|
78
79
|
apiRef,
|
|
79
80
|
plugins: _BarChartPro2.BAR_CHART_PRO_PLUGINS
|
|
80
|
-
})
|
|
81
|
+
}), {
|
|
82
|
+
seriesType: 'bar',
|
|
83
|
+
method: sampling
|
|
84
|
+
});
|
|
81
85
|
const Tooltip = props.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
|
|
82
86
|
const Toolbar = props.slots?.toolbar ?? _ChartsToolbarPro.ChartsToolbarPro;
|
|
83
87
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsDataProviderPro.ChartsDataProviderPro, (0, _extends2.default)({}, chartsDataProviderProProps, {
|
|
@@ -366,6 +370,13 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes /* remove-proptype
|
|
|
366
370
|
* @default 'svg-single'
|
|
367
371
|
*/
|
|
368
372
|
renderer: _propTypes.default.oneOf(['svg-batch', 'svg-single']),
|
|
373
|
+
/**
|
|
374
|
+
* Sampling method used to render large datasets when zoomed out.
|
|
375
|
+
* - `'none'`: render every bar (no sampling).
|
|
376
|
+
* - `'minmax'`: keep the min and max per bucket and draw one merged bar.
|
|
377
|
+
* @default 'none'
|
|
378
|
+
*/
|
|
379
|
+
sampling: _propTypes.default.oneOf(['minmax', 'none']),
|
|
369
380
|
/**
|
|
370
381
|
* The series to display in the bar chart.
|
|
371
382
|
* An array of [[BarSeries]] objects.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["initialZoom", "zoomData", "onZoomChange", "apiRef", "showToolbar"];
|
|
5
|
+
const _excluded = ["initialZoom", "zoomData", "onZoomChange", "apiRef", "showToolbar", "sampling"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { useThemeProps } from '@mui/material/styles';
|
|
@@ -45,7 +45,8 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
|
|
|
45
45
|
zoomData,
|
|
46
46
|
onZoomChange,
|
|
47
47
|
apiRef,
|
|
48
|
-
showToolbar
|
|
48
|
+
showToolbar,
|
|
49
|
+
sampling
|
|
49
50
|
} = props,
|
|
50
51
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
51
52
|
const {
|
|
@@ -70,7 +71,10 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
|
|
|
70
71
|
onZoomChange,
|
|
71
72
|
apiRef,
|
|
72
73
|
plugins: BAR_CHART_PRO_PLUGINS
|
|
73
|
-
})
|
|
74
|
+
}), {
|
|
75
|
+
seriesType: 'bar',
|
|
76
|
+
method: sampling
|
|
77
|
+
});
|
|
74
78
|
const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
|
|
75
79
|
const Toolbar = props.slots?.toolbar ?? ChartsToolbarPro;
|
|
76
80
|
return /*#__PURE__*/_jsx(ChartsDataProviderPro, _extends({}, chartsDataProviderProProps, {
|
|
@@ -359,6 +363,13 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes /* remove-proptype
|
|
|
359
363
|
* @default 'svg-single'
|
|
360
364
|
*/
|
|
361
365
|
renderer: PropTypes.oneOf(['svg-batch', 'svg-single']),
|
|
366
|
+
/**
|
|
367
|
+
* Sampling method used to render large datasets when zoomed out.
|
|
368
|
+
* - `'none'`: render every bar (no sampling).
|
|
369
|
+
* - `'minmax'`: keep the min and max per bucket and draw one merged bar.
|
|
370
|
+
* @default 'none'
|
|
371
|
+
*/
|
|
372
|
+
sampling: PropTypes.oneOf(['minmax', 'none']),
|
|
362
373
|
/**
|
|
363
374
|
* The series to display in the bar chart.
|
|
364
375
|
* An array of [[BarSeries]] objects.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ConvertSignaturesIntoPlugins, UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartBrushSignature, UseChartVisibilityManagerSignature } from '@mui/x-charts/internals';
|
|
2
2
|
import type { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.mjs";
|
|
3
3
|
import type { UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.mjs";
|
|
4
|
-
|
|
4
|
+
import type { UseChartProSamplingSignature } from "../internals/plugins/useChartProSampling/index.mjs";
|
|
5
|
+
export type BarChartProPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature<'bar'>, UseChartInteractionSignature, UseChartCartesianAxisSignature<'bar'>, UseChartHighlightSignature<'bar'>, UseChartVisibilityManagerSignature<'bar'>, UseChartKeyboardNavigationSignature, UseChartProZoomSignature, UseChartProExportSignature, UseChartProSamplingSignature];
|
|
5
6
|
export declare const BAR_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<BarChartProPluginSignatures>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ConvertSignaturesIntoPlugins, UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartBrushSignature, UseChartVisibilityManagerSignature } from '@mui/x-charts/internals';
|
|
2
2
|
import type { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
3
|
import type { UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
|
|
4
|
-
|
|
4
|
+
import type { UseChartProSamplingSignature } from "../internals/plugins/useChartProSampling/index.js";
|
|
5
|
+
export type BarChartProPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature<'bar'>, UseChartInteractionSignature, UseChartCartesianAxisSignature<'bar'>, UseChartHighlightSignature<'bar'>, UseChartVisibilityManagerSignature<'bar'>, UseChartKeyboardNavigationSignature, UseChartProZoomSignature, UseChartProExportSignature, UseChartProSamplingSignature];
|
|
5
6
|
export declare const BAR_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<BarChartProPluginSignatures>;
|
|
@@ -7,4 +7,5 @@ exports.BAR_CHART_PRO_PLUGINS = void 0;
|
|
|
7
7
|
var _internals = require("@mui/x-charts/internals");
|
|
8
8
|
var _useChartProExport = require("../internals/plugins/useChartProExport");
|
|
9
9
|
var _useChartProZoom = require("../internals/plugins/useChartProZoom");
|
|
10
|
-
|
|
10
|
+
var _useChartProSampling = require("../internals/plugins/useChartProSampling");
|
|
11
|
+
const BAR_CHART_PRO_PLUGINS = exports.BAR_CHART_PRO_PLUGINS = [_internals.useChartZAxis, _internals.useChartBrush, _internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartCartesianAxis, _internals.useChartHighlight, _internals.useChartVisibilityManager, _internals.useChartKeyboardNavigation, _useChartProZoom.useChartProZoom, _useChartProExport.useChartProExport, _useChartProSampling.useChartProSampling];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useChartZAxis, useChartCartesianAxis, useChartTooltip, useChartInteraction, useChartHighlight, useChartKeyboardNavigation, useChartBrush, useChartVisibilityManager } from '@mui/x-charts/internals';
|
|
2
2
|
import { useChartProExport } from "../internals/plugins/useChartProExport/index.mjs";
|
|
3
3
|
import { useChartProZoom } from "../internals/plugins/useChartProZoom/index.mjs";
|
|
4
|
-
|
|
4
|
+
import { useChartProSampling } from "../internals/plugins/useChartProSampling/index.mjs";
|
|
5
|
+
export const BAR_CHART_PRO_PLUGINS = [useChartZAxis, useChartBrush, useChartTooltip, useChartInteraction, useChartCartesianAxis, useChartHighlight, useChartVisibilityManager, useChartKeyboardNavigation, useChartProZoom, useChartProExport, useChartProSampling];
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,235 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 9.10.0
|
|
4
|
+
|
|
5
|
+
_Jul 17, 2026_
|
|
6
|
+
|
|
7
|
+
We'd like to extend a big thank you to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
8
|
+
|
|
9
|
+
- 📊 Provide `dataIndex` in `LinePlot` and `AreaPlot` `onItemClick` for Charts
|
|
10
|
+
- ⚙️ Allow opt-in `data-*` attributes on `slotProps`. [Read more](https://mui.com/x/common-concepts/custom-components/#passing-data-attributes-to-slots)
|
|
11
|
+
- 🐞 Bugfixes
|
|
12
|
+
- 📚 Documentation improvements
|
|
13
|
+
|
|
14
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
15
|
+
@Anexus5919, @mustafajw07
|
|
16
|
+
|
|
17
|
+
The following team members contributed to this release:
|
|
18
|
+
@brijeshb42, @Janpot, @JCQuintas, @LukasTy, @noraleonte
|
|
19
|
+
|
|
20
|
+
### Data Grid
|
|
21
|
+
|
|
22
|
+
#### `@mui/x-data-grid@9.10.0`
|
|
23
|
+
|
|
24
|
+
Internal changes.
|
|
25
|
+
|
|
26
|
+
#### `@mui/x-data-grid-pro@9.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
27
|
+
|
|
28
|
+
Same changes as in `@mui/x-data-grid@9.10.0`.
|
|
29
|
+
|
|
30
|
+
#### `@mui/x-data-grid-premium@9.10.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
31
|
+
|
|
32
|
+
Same changes as in `@mui/x-data-grid-pro@9.10.0`.
|
|
33
|
+
|
|
34
|
+
### Date and Time Pickers
|
|
35
|
+
|
|
36
|
+
#### `@mui/x-date-pickers@9.10.0`
|
|
37
|
+
|
|
38
|
+
Internal changes.
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-date-pickers-pro@9.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
41
|
+
|
|
42
|
+
Same changes as in `@mui/x-date-pickers@9.10.0`.
|
|
43
|
+
|
|
44
|
+
### Charts
|
|
45
|
+
|
|
46
|
+
#### `@mui/x-charts@9.10.0`
|
|
47
|
+
|
|
48
|
+
- [charts] Provide `dataIndex` in `LinePlot` and `AreaPlot` `onItemClick` (#23144) @JCQuintas
|
|
49
|
+
|
|
50
|
+
#### `@mui/x-charts-pro@9.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
51
|
+
|
|
52
|
+
Same changes as in `@mui/x-charts@9.10.0`.
|
|
53
|
+
|
|
54
|
+
#### `@mui/x-charts-premium@9.10.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
55
|
+
|
|
56
|
+
Same changes as in `@mui/x-charts-pro@9.10.0`.
|
|
57
|
+
|
|
58
|
+
### Tree View
|
|
59
|
+
|
|
60
|
+
#### `@mui/x-tree-view@9.10.0`
|
|
61
|
+
|
|
62
|
+
Internal changes.
|
|
63
|
+
|
|
64
|
+
#### `@mui/x-tree-view-pro@9.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
65
|
+
|
|
66
|
+
Same changes as in `@mui/x-tree-view@9.10.0`, plus:
|
|
67
|
+
|
|
68
|
+
- [tree-view] Fix pre-loaded items not caching (#23155) @noraleonte
|
|
69
|
+
|
|
70
|
+
### Scheduler
|
|
71
|
+
|
|
72
|
+
#### `@mui/x-scheduler@9.0.0-beta.6`
|
|
73
|
+
|
|
74
|
+
- [scheduler] Carry custom event data through the edit dialog submit (#22874) @Anexus5919
|
|
75
|
+
- [scheduler] Support array values for `CalendarEvent.resource` (#23109) @mustafajw07
|
|
76
|
+
|
|
77
|
+
#### `@mui/x-scheduler-premium@9.0.0-beta.6` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
78
|
+
|
|
79
|
+
Same changes as in `@mui/x-scheduler@9.0.0-beta.6`.
|
|
80
|
+
|
|
81
|
+
### Chat
|
|
82
|
+
|
|
83
|
+
#### `@mui/x-chat@9.0.0-alpha.14`
|
|
84
|
+
|
|
85
|
+
- [chat] Reuse `resolveComponentProps` from `@mui/utils` (#23095) @LukasTy
|
|
86
|
+
|
|
87
|
+
#### `@mui/x-chat-headless@9.0.0-alpha.14`
|
|
88
|
+
|
|
89
|
+
Internal changes.
|
|
90
|
+
|
|
91
|
+
### Codemod
|
|
92
|
+
|
|
93
|
+
#### `@mui/x-codemod@9.10.0`
|
|
94
|
+
|
|
95
|
+
Internal changes.
|
|
96
|
+
|
|
97
|
+
### Docs
|
|
98
|
+
|
|
99
|
+
- [docs] Fix bugs on Scheduler overview page (#23147) @noraleonte
|
|
100
|
+
|
|
101
|
+
### Core
|
|
102
|
+
|
|
103
|
+
- [code-infra] Fix changelog dependency exclusion and l10n routing (#23112) @LukasTy
|
|
104
|
+
- [code-infra] Port codebase to use `tsgo` (#22826) @brijeshb42
|
|
105
|
+
- [code-infra] Reduce `release:build` concurrency to mitigate `tsgo` OOM kills (#23139) @LukasTy
|
|
106
|
+
- [core] Allow opt-in `data-*` attributes on `slotProps` (#22128) @LukasTy
|
|
107
|
+
|
|
108
|
+
### Miscellaneous
|
|
109
|
+
|
|
110
|
+
- [core] Ignore `code-infra-renovate[bot]` commits in changelog (#23153) @Janpot
|
|
111
|
+
- [website] Fix broken `ChatBox` API link (#23149) @brijeshb42
|
|
112
|
+
- [test] Fix WebGL benchmark timeout on CI (#23142) @JCQuintas
|
|
113
|
+
|
|
114
|
+
## 9.9.0
|
|
115
|
+
|
|
116
|
+
_Jul 9, 2026_
|
|
117
|
+
|
|
118
|
+
We'd like to extend a big thank you to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
119
|
+
|
|
120
|
+
- 📊 [Data sampling](https://mui.com/x/react-charts/performance/#sampling) for better performance with large bar and line charts
|
|
121
|
+
- 🗺️ [Maps zoom support](https://mui.com/x/react-charts/map/#zoom)
|
|
122
|
+
- ☑️ Support [applying filters on demand](https://mui.com/x/react-data-grid/filtering/customization/#apply-filters-on-demand) in the Data Grid
|
|
123
|
+
- 🐞 Bugfixes
|
|
124
|
+
- 📚 Documentation improvements
|
|
125
|
+
|
|
126
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
127
|
+
@mustafajw07, @sebastianfrey
|
|
128
|
+
|
|
129
|
+
The following team members contributed to this release:
|
|
130
|
+
@aemartos, @alexfauquette, @brijeshb42, @hasdfa, @Janpot, @JCQuintas, @LukasTy, @rita-codes, @sai6855
|
|
131
|
+
|
|
132
|
+
### Data Grid
|
|
133
|
+
|
|
134
|
+
#### `@mui/x-data-grid@9.9.0`
|
|
135
|
+
|
|
136
|
+
- [DataGrid] Add `dataSourceKeepPreviousData` prop (#22554) @LukasTy
|
|
137
|
+
- [DataGrid] Add controlled filter panel for applying filters on demand (#23023) @sebastianfrey
|
|
138
|
+
|
|
139
|
+
#### `@mui/x-data-grid-pro@9.9.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
140
|
+
|
|
141
|
+
Same changes as in `@mui/x-data-grid@9.9.0`.
|
|
142
|
+
|
|
143
|
+
#### `@mui/x-data-grid-premium@9.9.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
144
|
+
|
|
145
|
+
Same changes as in `@mui/x-data-grid-pro@9.9.0`.
|
|
146
|
+
|
|
147
|
+
### Date and Time Pickers
|
|
148
|
+
|
|
149
|
+
#### `@mui/x-date-pickers@9.9.0`
|
|
150
|
+
|
|
151
|
+
Internal changes.
|
|
152
|
+
|
|
153
|
+
#### `@mui/x-date-pickers-pro@9.9.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
154
|
+
|
|
155
|
+
Same changes as in `@mui/x-date-pickers@9.9.0`, plus:
|
|
156
|
+
|
|
157
|
+
- [DateRangeCalendar] Avoid unnecessary month switch when the value is already visible (#22996) @LukasTy
|
|
158
|
+
|
|
159
|
+
### Charts
|
|
160
|
+
|
|
161
|
+
#### `@mui/x-charts@9.9.0`
|
|
162
|
+
|
|
163
|
+
- [charts] Optimize and de-duplicate sampled axis-highlight band lookup (#23052) @JCQuintas
|
|
164
|
+
- [charts] Unify tooltip item position getter and selector into a single selector API (#23041) @alexfauquette
|
|
165
|
+
- [charts] Fix impossible condition in axis text angle warning (#23102) @sai6855
|
|
166
|
+
|
|
167
|
+
#### `@mui/x-charts-pro@9.9.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
168
|
+
|
|
169
|
+
Same changes as in `@mui/x-charts@9.9.0`, plus:
|
|
170
|
+
|
|
171
|
+
- [charts-pro] Add data sampling for large bar and line charts (#22830) @JCQuintas
|
|
172
|
+
- [charts-pro] Allow sampling on non-zoomable charts (#23051) @JCQuintas
|
|
173
|
+
|
|
174
|
+
#### `@mui/x-charts-premium@9.9.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
175
|
+
|
|
176
|
+
#### Breaking changes
|
|
177
|
+
|
|
178
|
+
The API of the `Unstable_ChartsGeoDataProviderPremium` got modified.
|
|
179
|
+
Props `scale`, `rotation`, and `translation` are replaced by props `view` and `initialView`.
|
|
180
|
+
Same behavior can be obtained with `view.zoomLevel`, `view.center`, and `view.translation`.
|
|
181
|
+
See the [zoom view section](https://mui.com/x/react-charts/map/#control) for detailed information
|
|
182
|
+
|
|
183
|
+
Same changes as in `@mui/x-charts-pro@9.9.0`, plus:
|
|
184
|
+
|
|
185
|
+
- [charts-premium] Maps zoom support (#22709) @alexfauquette
|
|
186
|
+
|
|
187
|
+
### Tree View
|
|
188
|
+
|
|
189
|
+
#### `@mui/x-tree-view@9.9.0`
|
|
190
|
+
|
|
191
|
+
Internal changes.
|
|
192
|
+
|
|
193
|
+
#### `@mui/x-tree-view-pro@9.9.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
194
|
+
|
|
195
|
+
Same changes as in `@mui/x-tree-view@9.9.0`.
|
|
196
|
+
|
|
197
|
+
### Scheduler
|
|
198
|
+
|
|
199
|
+
#### `@mui/x-scheduler@9.0.0-beta.5`
|
|
200
|
+
|
|
201
|
+
- [scheduler] Introduce event resource helper utilities (#23022) @mustafajw07
|
|
202
|
+
- [scheduler] Preserve multi-day event continuity across overflow (#22797) @mustafajw07
|
|
203
|
+
|
|
204
|
+
#### `@mui/x-scheduler-premium@9.0.0-beta.5` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
205
|
+
|
|
206
|
+
Same changes as in `@mui/x-scheduler@9.0.0-beta.5`.
|
|
207
|
+
|
|
208
|
+
### Codemod
|
|
209
|
+
|
|
210
|
+
#### `@mui/x-codemod@9.9.0`
|
|
211
|
+
|
|
212
|
+
Internal changes.
|
|
213
|
+
|
|
214
|
+
### Docs
|
|
215
|
+
|
|
216
|
+
- [docs] Fix broken social preview image on shared docs links (#23055) @sai6855
|
|
217
|
+
- [docs] Review and clean up react-chat docs demos & gallery; fix actions-bar layout (#22993) @hasdfa
|
|
218
|
+
- [docs] Update the Pickers recommended date library bundle sizes (#23087) @LukasTy
|
|
219
|
+
|
|
220
|
+
### Core
|
|
221
|
+
|
|
222
|
+
- [mcp] Add `@mui/mcp` server and `@mui/x-agent-tools`. See the [README](https://github.com/mui/mui-x/blob/master/packages/mcp/README.md) for setup (#22947) @aemartos
|
|
223
|
+
- [code-infra] Avoid OOM in the Netlify docs build and CircleCI lint step (#23086) @LukasTy
|
|
224
|
+
- [code-infra] Group `@atlaskit/pragmatic-drag-and-drop` renovate updates (#23105) @LukasTy
|
|
225
|
+
- [code-infra] Validate npm publishing through dry run (#23038) @brijeshb42
|
|
226
|
+
- [docs-infra] Enable `webpackBuildWorker` to bound docs build memory (#23100) @Janpot
|
|
227
|
+
|
|
228
|
+
### Miscellaneous
|
|
229
|
+
|
|
230
|
+
- [test] Fix flaky "should render only the pageSize" Data Grid virtualization test (#23090) @LukasTy
|
|
231
|
+
- [test] Track `@mui/x-chat` bundle size via native expand (#23049) @Janpot
|
|
232
|
+
|
|
3
233
|
## 9.8.0
|
|
4
234
|
|
|
5
235
|
_Jul 2, 2026_
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import type { ChartAnyPluginSignature, ChartSeriesType, UseChartsContainerPropsReturnValue } from '@mui/x-charts/internals';
|
|
1
|
+
import type { ChartAnyPluginSignature, ChartSeriesType, SamplingMethod, UseChartsContainerPropsReturnValue } from '@mui/x-charts/internals';
|
|
2
2
|
import type { ChartsDataProviderProProps } from "../ChartsDataProviderPro/index.mjs";
|
|
3
3
|
import type { ChartsContainerProProps } from "./ChartsContainerPro.mjs";
|
|
4
4
|
import type { AllPluginSignatures } from "../internals/plugins/allPlugins.mjs";
|
|
5
5
|
export type UseChartsContainerProPropsReturnValue<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = Pick<UseChartsContainerPropsReturnValue<SeriesType, TSignatures>, 'chartsSurfaceProps' | 'children'> & {
|
|
6
6
|
chartsDataProviderProProps: ChartsDataProviderProProps<SeriesType, TSignatures>;
|
|
7
7
|
};
|
|
8
|
-
export declare const useChartsContainerProProps: <SeriesType extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<SeriesType>>(props: ChartsContainerProProps<SeriesType, TSignatures
|
|
8
|
+
export declare const useChartsContainerProProps: <SeriesType extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<SeriesType>>(props: ChartsContainerProProps<SeriesType, TSignatures>, /** Maps a chart's single `sampling` method to the provider's per-type config. Omit if unsupported. */
|
|
9
|
+
samplingOptions?: {
|
|
10
|
+
seriesType: SeriesType;
|
|
11
|
+
method: SamplingMethod | undefined;
|
|
12
|
+
}) => UseChartsContainerProPropsReturnValue<SeriesType, TSignatures>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import type { ChartAnyPluginSignature, ChartSeriesType, UseChartsContainerPropsReturnValue } from '@mui/x-charts/internals';
|
|
1
|
+
import type { ChartAnyPluginSignature, ChartSeriesType, SamplingMethod, UseChartsContainerPropsReturnValue } from '@mui/x-charts/internals';
|
|
2
2
|
import type { ChartsDataProviderProProps } from "../ChartsDataProviderPro/index.js";
|
|
3
3
|
import type { ChartsContainerProProps } from "./ChartsContainerPro.js";
|
|
4
4
|
import type { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
5
|
export type UseChartsContainerProPropsReturnValue<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = Pick<UseChartsContainerPropsReturnValue<SeriesType, TSignatures>, 'chartsSurfaceProps' | 'children'> & {
|
|
6
6
|
chartsDataProviderProProps: ChartsDataProviderProProps<SeriesType, TSignatures>;
|
|
7
7
|
};
|
|
8
|
-
export declare const useChartsContainerProProps: <SeriesType extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<SeriesType>>(props: ChartsContainerProProps<SeriesType, TSignatures
|
|
8
|
+
export declare const useChartsContainerProProps: <SeriesType extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<SeriesType>>(props: ChartsContainerProProps<SeriesType, TSignatures>, /** Maps a chart's single `sampling` method to the provider's per-type config. Omit if unsupported. */
|
|
9
|
+
samplingOptions?: {
|
|
10
|
+
seriesType: SeriesType;
|
|
11
|
+
method: SamplingMethod | undefined;
|
|
12
|
+
}) => UseChartsContainerProPropsReturnValue<SeriesType, TSignatures>;
|
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
6
|
Object.defineProperty(exports, "__esModule", {
|
|
6
7
|
value: true
|
|
7
8
|
});
|
|
8
9
|
exports.useChartsContainerProProps = void 0;
|
|
9
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
11
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
13
|
var _internals = require("@mui/x-charts/internals");
|
|
12
14
|
var _allPlugins = require("../internals/plugins/allPlugins");
|
|
13
15
|
const _excluded = ["initialZoom", "zoomData", "onZoomChange", "zoomInteractionConfig", "plugins", "apiRef"];
|
|
14
|
-
const useChartsContainerProProps = props => {
|
|
16
|
+
const useChartsContainerProProps = (props, samplingOptions) => {
|
|
15
17
|
const _ref = props,
|
|
16
18
|
{
|
|
17
19
|
initialZoom,
|
|
@@ -22,6 +24,11 @@ const useChartsContainerProProps = props => {
|
|
|
22
24
|
apiRef
|
|
23
25
|
} = _ref,
|
|
24
26
|
baseProps = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
27
|
+
const samplingMethod = samplingOptions?.method;
|
|
28
|
+
const samplingSeriesType = samplingOptions?.seriesType;
|
|
29
|
+
const samplingConfig = React.useMemo(() => samplingMethod ? {
|
|
30
|
+
[samplingSeriesType]: samplingMethod
|
|
31
|
+
} : undefined, [samplingMethod, samplingSeriesType]);
|
|
25
32
|
const {
|
|
26
33
|
chartsDataProviderProps,
|
|
27
34
|
chartsSurfaceProps,
|
|
@@ -33,6 +40,7 @@ const useChartsContainerProProps = props => {
|
|
|
33
40
|
onZoomChange,
|
|
34
41
|
zoomInteractionConfig,
|
|
35
42
|
apiRef,
|
|
43
|
+
sampling: samplingConfig,
|
|
36
44
|
plugins: plugins ?? _allPlugins.DEFAULT_PLUGINS
|
|
37
45
|
});
|
|
38
46
|
return {
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["initialZoom", "zoomData", "onZoomChange", "zoomInteractionConfig", "plugins", "apiRef"];
|
|
6
|
+
import * as React from 'react';
|
|
6
7
|
import { useChartsContainerProps } from '@mui/x-charts/internals';
|
|
7
8
|
import { DEFAULT_PLUGINS } from "../internals/plugins/allPlugins.mjs";
|
|
8
|
-
export const useChartsContainerProProps = props => {
|
|
9
|
+
export const useChartsContainerProProps = (props, samplingOptions) => {
|
|
9
10
|
const _ref = props,
|
|
10
11
|
{
|
|
11
12
|
initialZoom,
|
|
@@ -16,6 +17,11 @@ export const useChartsContainerProProps = props => {
|
|
|
16
17
|
apiRef
|
|
17
18
|
} = _ref,
|
|
18
19
|
baseProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
20
|
+
const samplingMethod = samplingOptions?.method;
|
|
21
|
+
const samplingSeriesType = samplingOptions?.seriesType;
|
|
22
|
+
const samplingConfig = React.useMemo(() => samplingMethod ? {
|
|
23
|
+
[samplingSeriesType]: samplingMethod
|
|
24
|
+
} : undefined, [samplingMethod, samplingSeriesType]);
|
|
19
25
|
const {
|
|
20
26
|
chartsDataProviderProps,
|
|
21
27
|
chartsSurfaceProps,
|
|
@@ -27,6 +33,7 @@ export const useChartsContainerProProps = props => {
|
|
|
27
33
|
onZoomChange,
|
|
28
34
|
zoomInteractionConfig,
|
|
29
35
|
apiRef,
|
|
36
|
+
sampling: samplingConfig,
|
|
30
37
|
plugins: plugins ?? DEFAULT_PLUGINS
|
|
31
38
|
});
|
|
32
39
|
return {
|
|
@@ -42,7 +42,7 @@ export declare const defaultSeriesConfigPro: ChartSeriesConfig<'bar' | 'scatter'
|
|
|
42
42
|
* </ChartsDataProviderPro>
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
|
-
declare function ChartsDataProviderPro<SeriesType extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<SeriesType>>(props: ChartsDataProviderProProps<SeriesType, TSignatures>): import("react
|
|
45
|
+
declare function ChartsDataProviderPro<SeriesType extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<SeriesType>>(props: ChartsDataProviderProProps<SeriesType, TSignatures>): import("react").JSX.Element;
|
|
46
46
|
declare namespace ChartsDataProviderPro {
|
|
47
47
|
var propTypes: any;
|
|
48
48
|
}
|
|
@@ -42,7 +42,7 @@ export declare const defaultSeriesConfigPro: ChartSeriesConfig<'bar' | 'scatter'
|
|
|
42
42
|
* </ChartsDataProviderPro>
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
|
-
declare function ChartsDataProviderPro<SeriesType extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<SeriesType>>(props: ChartsDataProviderProProps<SeriesType, TSignatures>): import("react
|
|
45
|
+
declare function ChartsDataProviderPro<SeriesType extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<SeriesType>>(props: ChartsDataProviderProProps<SeriesType, TSignatures>): import("react").JSX.Element;
|
|
46
46
|
declare namespace ChartsDataProviderPro {
|
|
47
47
|
var propTypes: any;
|
|
48
48
|
}
|
|
@@ -16,13 +16,24 @@ var _material = require("../internals/material");
|
|
|
16
16
|
var _allPlugins = require("../internals/plugins/allPlugins");
|
|
17
17
|
var _useChartsDataProviderProProps = require("./useChartsDataProviderProProps");
|
|
18
18
|
var _ChartsWatermark = require("../internals/ChartsWatermark");
|
|
19
|
+
var _barSampler = require("../internals/plugins/useChartProSampling/barSampler");
|
|
20
|
+
var _lineSampler = require("../internals/plugins/useChartProSampling/lineSampler");
|
|
19
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
22
|
const packageInfo = {
|
|
21
|
-
releaseDate: "
|
|
22
|
-
version: "9.
|
|
23
|
+
releaseDate: "MTc4NDI0NjQwMDAwMA==",
|
|
24
|
+
version: "9.10.0",
|
|
23
25
|
name: 'x-charts-pro'
|
|
24
26
|
};
|
|
25
|
-
|
|
27
|
+
// Attach the pro sampling strategies (kept at module scope for a stable identity, so the
|
|
28
|
+
// sampling-aware axis selectors don't recompute on every render).
|
|
29
|
+
const defaultSeriesConfigPro = exports.defaultSeriesConfigPro = (0, _extends2.default)({}, _internals.defaultSeriesConfig, {
|
|
30
|
+
bar: (0, _extends2.default)({}, _internals.defaultSeriesConfig.bar, {
|
|
31
|
+
sampler: _barSampler.barSampler
|
|
32
|
+
}),
|
|
33
|
+
line: (0, _extends2.default)({}, _internals.defaultSeriesConfig.line, {
|
|
34
|
+
sampler: _lineSampler.lineSampler
|
|
35
|
+
})
|
|
36
|
+
});
|
|
26
37
|
|
|
27
38
|
/**
|
|
28
39
|
* Orchestrates the data providers for the chart components and hooks.
|
|
@@ -9,13 +9,24 @@ import { defaultSlotsMaterial } from "../internals/material/index.mjs";
|
|
|
9
9
|
import { DEFAULT_PLUGINS } from "../internals/plugins/allPlugins.mjs";
|
|
10
10
|
import { useChartsDataProviderProProps } from "./useChartsDataProviderProProps.mjs";
|
|
11
11
|
import { ChartsWatermark } from "../internals/ChartsWatermark.mjs";
|
|
12
|
+
import { barSampler } from "../internals/plugins/useChartProSampling/barSampler.mjs";
|
|
13
|
+
import { lineSampler } from "../internals/plugins/useChartProSampling/lineSampler.mjs";
|
|
12
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
15
|
const packageInfo = {
|
|
14
|
-
releaseDate: "
|
|
15
|
-
version: "9.
|
|
16
|
+
releaseDate: "MTc4NDI0NjQwMDAwMA==",
|
|
17
|
+
version: "9.10.0",
|
|
16
18
|
name: 'x-charts-pro'
|
|
17
19
|
};
|
|
18
|
-
|
|
20
|
+
// Attach the pro sampling strategies (kept at module scope for a stable identity, so the
|
|
21
|
+
// sampling-aware axis selectors don't recompute on every render).
|
|
22
|
+
export const defaultSeriesConfigPro = _extends({}, defaultSeriesConfig, {
|
|
23
|
+
bar: _extends({}, defaultSeriesConfig.bar, {
|
|
24
|
+
sampler: barSampler
|
|
25
|
+
}),
|
|
26
|
+
line: _extends({}, defaultSeriesConfig.line, {
|
|
27
|
+
sampler: lineSampler
|
|
28
|
+
})
|
|
29
|
+
});
|
|
19
30
|
|
|
20
31
|
/**
|
|
21
32
|
* Orchestrates the data providers for the chart components and hooks.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChartAnyPluginSignature, ChartSeriesType } from '@mui/x-charts/internals';
|
|
2
2
|
import type { ChartsDataProviderProProps } from "./ChartsDataProviderPro.mjs";
|
|
3
3
|
import type { AllPluginSignatures } from "../internals/plugins/allPlugins.mjs";
|
|
4
|
-
export declare const useChartsDataProviderProProps: <SeriesType extends ChartSeriesType =
|
|
4
|
+
export declare const useChartsDataProviderProProps: <SeriesType extends ChartSeriesType = keyof import("@mui/x-charts/internals").ChartsSeriesConfig, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<SeriesType>>(props: ChartsDataProviderProProps<SeriesType, TSignatures>) => {
|
|
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").ChartsProviderProps<keyof import("@mui/x-charts/internals").ChartsSeriesConfig, TSignatures>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChartAnyPluginSignature, ChartSeriesType } from '@mui/x-charts/internals';
|
|
2
2
|
import type { ChartsDataProviderProProps } from "./ChartsDataProviderPro.js";
|
|
3
3
|
import type { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
4
|
-
export declare const useChartsDataProviderProProps: <SeriesType extends ChartSeriesType =
|
|
4
|
+
export declare const useChartsDataProviderProProps: <SeriesType extends ChartSeriesType = keyof import("@mui/x-charts/internals").ChartsSeriesConfig, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<SeriesType>>(props: ChartsDataProviderProProps<SeriesType, TSignatures>) => {
|
|
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").ChartsProviderProps<keyof import("@mui/x-charts/internals").ChartsSeriesConfig, TSignatures>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { ChartsToolbarProps } from '@mui/x-charts/Toolbar';
|
|
2
3
|
import type { AxisId } from '@mui/x-charts/internals';
|
|
3
4
|
import type { RangeButtonValue } from "./rangeButtonValueToZoom.mjs";
|
|
@@ -42,7 +43,7 @@ declare function ChartsToolbarPro({
|
|
|
42
43
|
rangeButtons,
|
|
43
44
|
rangeButtonsAxisId,
|
|
44
45
|
...other
|
|
45
|
-
}: ChartsToolbarProProps):
|
|
46
|
+
}: ChartsToolbarProProps): React.JSX.Element | null;
|
|
46
47
|
declare namespace ChartsToolbarPro {
|
|
47
48
|
var propTypes: any;
|
|
48
49
|
}
|