@mui/x-charts-pro 8.4.0 → 8.5.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.d.ts +13 -5
- package/BarChartPro/BarChartPro.js +19 -1
- package/CHANGELOG.md +215 -0
- package/ChartContainerPro/ChartContainerPro.d.ts +0 -1
- package/ChartContainerPro/ChartProApi.d.ts +28 -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 +22 -0
- package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +283 -0
- package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +18 -0
- package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +138 -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 +5 -1
- package/ChartsToolbarPro/ChartsToolbarPro.js +35 -7
- package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.d.ts +17 -0
- package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +57 -0
- package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.d.ts +17 -0
- package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +57 -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/FunnelPlot.js +10 -22
- package/FunnelChart/FunnelSection.d.ts +1 -1
- package/FunnelChart/FunnelSectionLabel.d.ts +21 -0
- package/FunnelChart/FunnelSectionLabel.js +52 -0
- package/FunnelChart/curves/bump.d.ts +10 -4
- package/FunnelChart/curves/bump.js +73 -41
- package/FunnelChart/curves/curve.types.d.ts +6 -1
- package/FunnelChart/curves/getFunnelCurve.js +3 -0
- package/FunnelChart/curves/linear.d.ts +9 -1
- package/FunnelChart/curves/linear.js +82 -5
- package/FunnelChart/funnel.types.d.ts +1 -0
- package/FunnelChart/funnelPlotSlots.types.d.ts +11 -0
- package/FunnelChart/funnelSectionClasses.d.ts +2 -0
- package/FunnelChart/funnelSectionClasses.js +17 -4
- package/FunnelChart/funnelSlots.types.d.ts +4 -3
- package/FunnelChart/index.d.ts +3 -1
- package/FunnelChart/index.js +18 -2
- package/FunnelChart/useFunnelChartProps.d.ts +2 -1
- package/FunnelChart/useFunnelChartProps.js +3 -1
- package/Heatmap/Heatmap.d.ts +22 -4
- package/Heatmap/Heatmap.js +64 -22
- package/Heatmap/Heatmap.plugins.d.ts +2 -1
- package/Heatmap/Heatmap.plugins.js +2 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.d.ts +1 -1
- package/LineChartPro/LineChartPro.d.ts +13 -5
- package/LineChartPro/LineChartPro.js +19 -1
- package/PieChartPro/PieChartPro.d.ts +21 -0
- package/PieChartPro/PieChartPro.js +204 -0
- package/PieChartPro/PieChartPro.plugins.d.ts +4 -0
- package/PieChartPro/PieChartPro.plugins.js +9 -0
- package/PieChartPro/index.d.ts +1 -0
- package/PieChartPro/index.js +16 -0
- 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 +28 -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 +22 -0
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +275 -0
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +18 -0
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +130 -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 +5 -1
- package/esm/ChartsToolbarPro/ChartsToolbarPro.js +36 -9
- package/esm/ChartsToolbarPro/ChartsToolbarZoomInTrigger.d.ts +17 -0
- package/esm/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +51 -0
- package/esm/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.d.ts +17 -0
- package/esm/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +51 -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/FunnelPlot.js +10 -22
- package/esm/FunnelChart/FunnelSection.d.ts +1 -1
- package/esm/FunnelChart/FunnelSectionLabel.d.ts +21 -0
- package/esm/FunnelChart/FunnelSectionLabel.js +46 -0
- package/esm/FunnelChart/curves/bump.d.ts +10 -4
- package/esm/FunnelChart/curves/bump.js +73 -41
- package/esm/FunnelChart/curves/curve.types.d.ts +6 -1
- package/esm/FunnelChart/curves/getFunnelCurve.js +3 -0
- package/esm/FunnelChart/curves/linear.d.ts +9 -1
- package/esm/FunnelChart/curves/linear.js +82 -5
- package/esm/FunnelChart/funnel.types.d.ts +1 -0
- package/esm/FunnelChart/funnelPlotSlots.types.d.ts +11 -0
- package/esm/FunnelChart/funnelSectionClasses.d.ts +2 -0
- package/esm/FunnelChart/funnelSectionClasses.js +15 -3
- package/esm/FunnelChart/funnelSlots.types.d.ts +4 -3
- package/esm/FunnelChart/index.d.ts +3 -1
- package/esm/FunnelChart/index.js +3 -1
- package/esm/FunnelChart/useFunnelChartProps.d.ts +2 -1
- package/esm/FunnelChart/useFunnelChartProps.js +3 -1
- package/esm/Heatmap/Heatmap.d.ts +22 -4
- package/esm/Heatmap/Heatmap.js +64 -22
- package/esm/Heatmap/Heatmap.plugins.d.ts +2 -1
- package/esm/Heatmap/Heatmap.plugins.js +2 -1
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.d.ts +1 -1
- package/esm/LineChartPro/LineChartPro.d.ts +13 -5
- package/esm/LineChartPro/LineChartPro.js +19 -1
- package/esm/PieChartPro/PieChartPro.d.ts +21 -0
- package/esm/PieChartPro/PieChartPro.js +197 -0
- package/esm/PieChartPro/PieChartPro.plugins.d.ts +4 -0
- package/esm/PieChartPro/PieChartPro.plugins.js +3 -0
- package/esm/PieChartPro/index.d.ts +1 -0
- package/esm/PieChartPro/index.js +1 -0
- 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 +3 -1
- package/esm/index.js +3 -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 +3 -1
- package/index.js +23 -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 +7 -7
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./useChartApiContext.js";
|
package/context/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _useChartApiContext = require("./useChartApiContext");
|
|
7
|
+
Object.keys(_useChartApiContext).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _useChartApiContext[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _useChartApiContext[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChartProApi } from "../ChartContainerPro/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* The `useChartApiContext` hook provides access to the chart API.
|
|
4
|
+
* This is only available when the chart is rendered within a chart or a `ChartDataProvider` component.
|
|
5
|
+
* If you want to access the chart API outside those components, you should use the `apiRef` prop instead.
|
|
6
|
+
* @example
|
|
7
|
+
* const apiRef = useChartApiContext<ChartProApi<'bar'>>();
|
|
8
|
+
*/
|
|
9
|
+
export declare function useChartApiContext<Api extends ChartProApi>(): import("react").RefObject<Api>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useChartApiContext = useChartApiContext;
|
|
7
|
+
var _context = require("@mui/x-charts/context");
|
|
8
|
+
/**
|
|
9
|
+
* The `useChartApiContext` hook provides access to the chart API.
|
|
10
|
+
* This is only available when the chart is rendered within a chart or a `ChartDataProvider` component.
|
|
11
|
+
* If you want to access the chart API outside those components, you should use the `apiRef` prop instead.
|
|
12
|
+
* @example
|
|
13
|
+
* const apiRef = useChartApiContext<ChartProApi<'bar'>>();
|
|
14
|
+
*/
|
|
15
|
+
function useChartApiContext() {
|
|
16
|
+
return (0, _context.useChartApiContext)();
|
|
17
|
+
}
|
|
@@ -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:
|
|
@@ -70,9 +70,10 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
|
|
|
70
70
|
plugins: BAR_CHART_PRO_PLUGINS
|
|
71
71
|
}), ref);
|
|
72
72
|
const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
|
|
73
|
+
const Toolbar = props.slots?.toolbar ?? ChartsToolbarPro;
|
|
73
74
|
return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
|
|
74
75
|
children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
|
|
75
|
-
children: [showToolbar ? /*#__PURE__*/_jsx(
|
|
76
|
+
children: [showToolbar ? /*#__PURE__*/_jsx(Toolbar, _extends({}, props.slotProps?.toolbar)) : null, !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
76
77
|
children: [/*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
77
78
|
children: [/*#__PURE__*/_jsx(BarPlot, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
|
|
78
79
|
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartZoomSlider, {}), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), children]
|
|
@@ -90,6 +91,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
90
91
|
current: PropTypes.shape({
|
|
91
92
|
exportAsImage: PropTypes.func.isRequired,
|
|
92
93
|
exportAsPrint: PropTypes.func.isRequired,
|
|
94
|
+
setAxisZoomData: PropTypes.func.isRequired,
|
|
93
95
|
setZoomData: PropTypes.func.isRequired
|
|
94
96
|
})
|
|
95
97
|
}),
|
|
@@ -320,6 +322,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
320
322
|
panning: PropTypes.bool,
|
|
321
323
|
slider: PropTypes.shape({
|
|
322
324
|
enabled: PropTypes.bool,
|
|
325
|
+
showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
|
|
323
326
|
size: PropTypes.number
|
|
324
327
|
}),
|
|
325
328
|
step: PropTypes.number
|
|
@@ -384,6 +387,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
384
387
|
panning: PropTypes.bool,
|
|
385
388
|
slider: PropTypes.shape({
|
|
386
389
|
enabled: PropTypes.bool,
|
|
390
|
+
showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
|
|
387
391
|
size: PropTypes.number
|
|
388
392
|
}),
|
|
389
393
|
step: PropTypes.number
|
|
@@ -443,6 +447,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
443
447
|
panning: PropTypes.bool,
|
|
444
448
|
slider: PropTypes.shape({
|
|
445
449
|
enabled: PropTypes.bool,
|
|
450
|
+
showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
|
|
446
451
|
size: PropTypes.number
|
|
447
452
|
}),
|
|
448
453
|
step: PropTypes.number
|
|
@@ -502,6 +507,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
502
507
|
panning: PropTypes.bool,
|
|
503
508
|
slider: PropTypes.shape({
|
|
504
509
|
enabled: PropTypes.bool,
|
|
510
|
+
showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
|
|
505
511
|
size: PropTypes.number
|
|
506
512
|
}),
|
|
507
513
|
step: PropTypes.number
|
|
@@ -561,6 +567,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
561
567
|
panning: PropTypes.bool,
|
|
562
568
|
slider: PropTypes.shape({
|
|
563
569
|
enabled: PropTypes.bool,
|
|
570
|
+
showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
|
|
564
571
|
size: PropTypes.number
|
|
565
572
|
}),
|
|
566
573
|
step: PropTypes.number
|
|
@@ -620,6 +627,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
620
627
|
panning: PropTypes.bool,
|
|
621
628
|
slider: PropTypes.shape({
|
|
622
629
|
enabled: PropTypes.bool,
|
|
630
|
+
showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
|
|
623
631
|
size: PropTypes.number
|
|
624
632
|
}),
|
|
625
633
|
step: PropTypes.number
|
|
@@ -679,6 +687,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
679
687
|
panning: PropTypes.bool,
|
|
680
688
|
slider: PropTypes.shape({
|
|
681
689
|
enabled: PropTypes.bool,
|
|
690
|
+
showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
|
|
682
691
|
size: PropTypes.number
|
|
683
692
|
}),
|
|
684
693
|
step: PropTypes.number
|
|
@@ -738,6 +747,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
738
747
|
panning: PropTypes.bool,
|
|
739
748
|
slider: PropTypes.shape({
|
|
740
749
|
enabled: PropTypes.bool,
|
|
750
|
+
showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
|
|
741
751
|
size: PropTypes.number
|
|
742
752
|
}),
|
|
743
753
|
step: PropTypes.number
|
|
@@ -809,6 +819,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
809
819
|
panning: PropTypes.bool,
|
|
810
820
|
slider: PropTypes.shape({
|
|
811
821
|
enabled: PropTypes.bool,
|
|
822
|
+
showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
|
|
812
823
|
size: PropTypes.number
|
|
813
824
|
}),
|
|
814
825
|
step: PropTypes.number
|
|
@@ -872,6 +883,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
872
883
|
panning: PropTypes.bool,
|
|
873
884
|
slider: PropTypes.shape({
|
|
874
885
|
enabled: PropTypes.bool,
|
|
886
|
+
showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
|
|
875
887
|
size: PropTypes.number
|
|
876
888
|
}),
|
|
877
889
|
step: PropTypes.number
|
|
@@ -930,6 +942,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
930
942
|
panning: PropTypes.bool,
|
|
931
943
|
slider: PropTypes.shape({
|
|
932
944
|
enabled: PropTypes.bool,
|
|
945
|
+
showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
|
|
933
946
|
size: PropTypes.number
|
|
934
947
|
}),
|
|
935
948
|
step: PropTypes.number
|
|
@@ -988,6 +1001,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
988
1001
|
panning: PropTypes.bool,
|
|
989
1002
|
slider: PropTypes.shape({
|
|
990
1003
|
enabled: PropTypes.bool,
|
|
1004
|
+
showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
|
|
991
1005
|
size: PropTypes.number
|
|
992
1006
|
}),
|
|
993
1007
|
step: PropTypes.number
|
|
@@ -1046,6 +1060,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
1046
1060
|
panning: PropTypes.bool,
|
|
1047
1061
|
slider: PropTypes.shape({
|
|
1048
1062
|
enabled: PropTypes.bool,
|
|
1063
|
+
showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
|
|
1049
1064
|
size: PropTypes.number
|
|
1050
1065
|
}),
|
|
1051
1066
|
step: PropTypes.number
|
|
@@ -1104,6 +1119,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
1104
1119
|
panning: PropTypes.bool,
|
|
1105
1120
|
slider: PropTypes.shape({
|
|
1106
1121
|
enabled: PropTypes.bool,
|
|
1122
|
+
showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
|
|
1107
1123
|
size: PropTypes.number
|
|
1108
1124
|
}),
|
|
1109
1125
|
step: PropTypes.number
|
|
@@ -1162,6 +1178,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
1162
1178
|
panning: PropTypes.bool,
|
|
1163
1179
|
slider: PropTypes.shape({
|
|
1164
1180
|
enabled: PropTypes.bool,
|
|
1181
|
+
showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
|
|
1165
1182
|
size: PropTypes.number
|
|
1166
1183
|
}),
|
|
1167
1184
|
step: PropTypes.number
|
|
@@ -1220,6 +1237,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
1220
1237
|
panning: PropTypes.bool,
|
|
1221
1238
|
slider: PropTypes.shape({
|
|
1222
1239
|
enabled: PropTypes.bool,
|
|
1240
|
+
showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
|
|
1223
1241
|
size: PropTypes.number
|
|
1224
1242
|
}),
|
|
1225
1243
|
step: PropTypes.number
|
|
@@ -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,28 @@
|
|
|
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
|
+
import { PieChartProPluginSignatures } from "../PieChartPro/PieChartPro.plugins.js";
|
|
10
|
+
type PluginsPerSeriesType = {
|
|
11
|
+
heatmap: HeatmapPluginsSignatures;
|
|
12
|
+
line: LineChartProPluginsSignatures;
|
|
13
|
+
scatter: ScatterChartProPluginsSignatures;
|
|
14
|
+
bar: BarChartProPluginsSignatures;
|
|
15
|
+
funnel: FunnelChartPluginsSignatures;
|
|
16
|
+
radar: RadarChartProPluginsSignatures;
|
|
17
|
+
pie: PieChartProPluginSignatures;
|
|
18
|
+
composition: DefaultPluginSignatures;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* The API of the chart `apiRef` object.
|
|
22
|
+
* The chart type can be passed as the first generic parameter to narrow down the API to the specific chart type.
|
|
23
|
+
* @example ChartProApi<'bar'>
|
|
24
|
+
* If the chart is being created using composition, the `composition` value can be used.
|
|
25
|
+
* @example ChartProApi<'composition'>
|
|
26
|
+
*/
|
|
27
|
+
export type ChartProApi<TSeries extends keyof PluginsPerSeriesType | undefined = undefined, TSignatures extends readonly ChartAnyPluginSignature[] = (TSeries extends keyof PluginsPerSeriesType ? PluginsPerSeriesType[TSeries] : AllPluginSignatures)> = ChartPublicAPI<TSignatures>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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
|
*
|
|
@@ -4,13 +4,14 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { Watermark } from '@mui/x-license/Watermark';
|
|
7
|
-
import { ChartProvider } from '@mui/x-charts/internals';
|
|
7
|
+
import { ChartProvider, ChartsSlotsProvider } from '@mui/x-charts/internals';
|
|
8
8
|
import { ChartsLocalizationProvider } from '@mui/x-charts/ChartsLocalizationProvider';
|
|
9
9
|
import { useLicenseVerifier } from '@mui/x-license/useLicenseVerifier';
|
|
10
|
+
import { defaultSlotsMaterial } from "../internals/material/index.js";
|
|
10
11
|
import { DEFAULT_PLUGINS } from "../internals/plugins/allPlugins.js";
|
|
11
12
|
import { useChartDataProviderProProps } from "./useChartDataProviderProProps.js";
|
|
12
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
const releaseInfo = "
|
|
14
|
+
const releaseInfo = "MTc0OTA3MDgwMDAwMA==";
|
|
14
15
|
const packageIdentifier = 'x-charts-pro';
|
|
15
16
|
/**
|
|
16
17
|
* Orchestrates the data providers for the chart components and hooks.
|
|
@@ -43,7 +44,9 @@ function ChartDataProviderPro(props) {
|
|
|
43
44
|
const {
|
|
44
45
|
children,
|
|
45
46
|
localeText,
|
|
46
|
-
chartProviderProps
|
|
47
|
+
chartProviderProps,
|
|
48
|
+
slots,
|
|
49
|
+
slotProps
|
|
47
50
|
} = useChartDataProviderProProps(_extends({}, props, {
|
|
48
51
|
plugins: props.plugins ?? DEFAULT_PLUGINS
|
|
49
52
|
}));
|
|
@@ -51,7 +54,12 @@ function ChartDataProviderPro(props) {
|
|
|
51
54
|
return /*#__PURE__*/_jsxs(ChartProvider, _extends({}, chartProviderProps, {
|
|
52
55
|
children: [/*#__PURE__*/_jsx(ChartsLocalizationProvider, {
|
|
53
56
|
localeText: localeText,
|
|
54
|
-
children:
|
|
57
|
+
children: /*#__PURE__*/_jsx(ChartsSlotsProvider, {
|
|
58
|
+
slots: slots,
|
|
59
|
+
slotProps: slotProps,
|
|
60
|
+
defaultSlots: defaultSlotsMaterial,
|
|
61
|
+
children: children
|
|
62
|
+
})
|
|
55
63
|
}), /*#__PURE__*/_jsx(Watermark, {
|
|
56
64
|
packageName: packageIdentifier,
|
|
57
65
|
releaseInfo: releaseInfo
|
|
@@ -111,6 +119,14 @@ process.env.NODE_ENV !== "production" ? ChartDataProviderPro.propTypes = {
|
|
|
111
119
|
* If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
|
|
112
120
|
*/
|
|
113
121
|
skipAnimation: PropTypes.bool,
|
|
122
|
+
/**
|
|
123
|
+
* The props for the slots.
|
|
124
|
+
*/
|
|
125
|
+
slotProps: PropTypes.object,
|
|
126
|
+
/**
|
|
127
|
+
* Slots to customize charts' components.
|
|
128
|
+
*/
|
|
129
|
+
slots: PropTypes.object,
|
|
114
130
|
theme: PropTypes.oneOf(['dark', 'light']),
|
|
115
131
|
/**
|
|
116
132
|
* 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
|
};
|
|
@@ -5,11 +5,15 @@ export const useChartDataProviderProProps = props => {
|
|
|
5
5
|
const {
|
|
6
6
|
chartProviderProps,
|
|
7
7
|
localeText,
|
|
8
|
+
slots,
|
|
9
|
+
slotProps,
|
|
8
10
|
children
|
|
9
11
|
} = useChartDataProviderProps(props);
|
|
10
12
|
return {
|
|
11
13
|
children,
|
|
12
14
|
localeText,
|
|
13
|
-
chartProviderProps
|
|
15
|
+
chartProviderProps,
|
|
16
|
+
slots,
|
|
17
|
+
slotProps
|
|
14
18
|
};
|
|
15
19
|
};
|
|
@@ -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 {};
|