@mui/x-charts-pro 9.0.0-alpha.2 → 9.0.0-alpha.4
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 +2 -2
- package/BarChartPro/BarChartPro.d.ts +2 -2
- package/BarChartPro/BarChartPro.js +43 -10
- package/BarChartPro/BarChartPro.mjs +43 -10
- package/CHANGELOG.md +246 -1
- package/ChartsContainerPro/ChartsContainerPro.d.mts +2 -2
- package/ChartsContainerPro/ChartsContainerPro.d.ts +2 -2
- package/ChartsContainerPro/ChartsContainerPro.js +2 -2
- package/ChartsContainerPro/ChartsContainerPro.mjs +2 -2
- package/ChartsContainerPro/useChartsContainerProProps.d.mts +4 -4
- package/ChartsContainerPro/useChartsContainerProProps.d.ts +4 -4
- package/ChartsContainerPro/useChartsContainerProProps.js +3 -3
- package/ChartsContainerPro/useChartsContainerProProps.mjs +3 -3
- package/ChartsDataProviderPro/ChartsDataProviderPro.d.mts +2 -2
- package/ChartsDataProviderPro/ChartsDataProviderPro.d.ts +2 -2
- package/ChartsDataProviderPro/ChartsDataProviderPro.js +8 -11
- package/ChartsDataProviderPro/ChartsDataProviderPro.mjs +8 -11
- package/ChartsDataProviderPro/useChartsDataProviderProProps.d.mts +1 -1
- package/ChartsDataProviderPro/useChartsDataProviderProProps.d.ts +1 -1
- package/ChartsToolbarPro/ChartsToolbarPro.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarPro.mjs +2 -2
- package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.mjs +2 -2
- package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.mjs +2 -2
- package/ChartsToolbarPro/index.d.mts +2 -1
- package/ChartsToolbarPro/index.d.ts +2 -1
- package/ChartsToolbarPro/index.mjs +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.js +1 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.mjs +2 -2
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.js +1 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.mjs +2 -2
- package/FunnelChart/FunnelChart.d.mts +2 -2
- package/FunnelChart/FunnelChart.d.ts +2 -2
- package/FunnelChart/FunnelChart.js +23 -8
- package/FunnelChart/FunnelChart.mjs +23 -8
- package/FunnelChart/FunnelPlot.js +8 -3
- package/FunnelChart/FunnelPlot.mjs +8 -3
- package/FunnelChart/FunnelSection.d.mts +3 -3
- package/FunnelChart/FunnelSection.d.ts +3 -3
- package/FunnelChart/FunnelSection.js +8 -9
- package/FunnelChart/FunnelSection.mjs +8 -9
- package/FunnelChart/FunnelSectionLabel.d.mts +9 -3
- package/FunnelChart/FunnelSectionLabel.d.ts +9 -3
- package/FunnelChart/FunnelSectionLabel.js +15 -6
- package/FunnelChart/FunnelSectionLabel.mjs +15 -6
- package/FunnelChart/funnelAxisPlugin/computeAxisValue.d.mts +3 -3
- package/FunnelChart/funnelAxisPlugin/computeAxisValue.d.ts +3 -3
- package/FunnelChart/funnelClasses.d.mts +29 -0
- package/FunnelChart/funnelClasses.d.ts +29 -0
- package/FunnelChart/funnelClasses.js +29 -0
- package/FunnelChart/funnelClasses.mjs +19 -0
- package/FunnelChart/index.d.mts +2 -2
- package/FunnelChart/index.d.ts +2 -2
- package/FunnelChart/index.js +4 -4
- package/FunnelChart/index.mjs +1 -1
- package/FunnelChart/seriesConfig/legend.js +0 -2
- package/FunnelChart/seriesConfig/legend.mjs +0 -2
- package/FunnelChart/useFunnelChartProps.d.mts +2 -2
- package/FunnelChart/useFunnelChartProps.d.ts +2 -2
- package/FunnelChart/useFunnelChartProps.js +2 -2
- package/FunnelChart/useFunnelChartProps.mjs +2 -2
- package/Heatmap/Heatmap.d.mts +2 -11
- package/Heatmap/Heatmap.d.ts +2 -11
- package/Heatmap/Heatmap.js +25 -19
- package/Heatmap/Heatmap.mjs +25 -19
- package/Heatmap/HeatmapCell.d.mts +33 -0
- package/Heatmap/HeatmapCell.d.ts +33 -0
- package/Heatmap/HeatmapCell.js +62 -0
- package/Heatmap/HeatmapCell.mjs +55 -0
- package/Heatmap/HeatmapItem.d.mts +1 -9
- package/Heatmap/HeatmapItem.d.ts +1 -9
- package/Heatmap/HeatmapItem.js +5 -23
- package/Heatmap/HeatmapItem.mjs +5 -23
- package/Heatmap/HeatmapSVGPlot.js +14 -7
- package/Heatmap/HeatmapSVGPlot.mjs +15 -8
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.js +2 -2
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.mjs +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.js +16 -13
- package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.mjs +16 -13
- package/Heatmap/heatmapClasses.d.mts +6 -1
- package/Heatmap/heatmapClasses.d.ts +6 -1
- package/Heatmap/heatmapClasses.js +18 -3
- package/Heatmap/heatmapClasses.mjs +16 -2
- package/Heatmap/index.d.mts +4 -2
- package/Heatmap/index.d.ts +4 -2
- package/Heatmap/index.js +17 -13
- package/Heatmap/index.mjs +2 -1
- package/Heatmap/seriesConfig/getColor.js +5 -3
- package/Heatmap/seriesConfig/getColor.mjs +5 -3
- package/Heatmap/seriesConfig/getItemAtPosition.d.mts +2 -2
- package/Heatmap/seriesConfig/getItemAtPosition.d.ts +2 -2
- package/Heatmap/seriesConfig/getItemAtPosition.js +3 -11
- package/Heatmap/seriesConfig/getItemAtPosition.mjs +3 -11
- package/Heatmap/seriesConfig/identifierCleaner.d.mts +3 -0
- package/Heatmap/seriesConfig/identifierCleaner.d.ts +3 -0
- package/Heatmap/seriesConfig/identifierCleaner.js +15 -0
- package/Heatmap/seriesConfig/identifierCleaner.mjs +9 -0
- package/Heatmap/seriesConfig/identifierSerializer.d.mts +3 -0
- package/Heatmap/seriesConfig/identifierSerializer.d.ts +3 -0
- package/Heatmap/seriesConfig/identifierSerializer.js +11 -0
- package/Heatmap/seriesConfig/identifierSerializer.mjs +5 -0
- package/Heatmap/seriesConfig/index.js +4 -2
- package/Heatmap/seriesConfig/index.mjs +5 -3
- package/Heatmap/seriesConfig/keyboardFocusHandler.js +6 -19
- package/Heatmap/seriesConfig/keyboardFocusHandler.mjs +6 -19
- package/Heatmap/seriesConfig/seriesProcessor.js +8 -3
- package/Heatmap/seriesConfig/seriesProcessor.mjs +8 -3
- package/Heatmap/seriesConfig/tooltip.js +7 -6
- package/Heatmap/seriesConfig/tooltip.mjs +7 -6
- package/Heatmap/seriesConfig/tooltipPosition.js +3 -4
- package/Heatmap/seriesConfig/tooltipPosition.mjs +3 -4
- package/Heatmap/shouldRegisterPointerInteractionsGlobally.js +1 -1
- package/Heatmap/shouldRegisterPointerInteractionsGlobally.mjs +1 -1
- package/Heatmap/useHeatmapProps.d.mts +2 -2
- package/Heatmap/useHeatmapProps.d.ts +2 -2
- package/Heatmap/useHeatmapProps.js +4 -6
- package/Heatmap/useHeatmapProps.mjs +4 -6
- package/LineChartPro/LineChartPro.d.mts +2 -2
- package/LineChartPro/LineChartPro.d.ts +2 -2
- package/LineChartPro/LineChartPro.js +40 -13
- package/LineChartPro/LineChartPro.mjs +40 -13
- package/PieChartPro/PieChartPro.d.mts +2 -2
- package/PieChartPro/PieChartPro.d.ts +2 -2
- package/PieChartPro/PieChartPro.js +22 -7
- package/PieChartPro/PieChartPro.mjs +22 -7
- package/RadarChartPro/RadarChartPro.d.mts +1 -1
- package/RadarChartPro/RadarChartPro.d.ts +1 -1
- package/RadarChartPro/RadarChartPro.js +20 -2
- package/RadarChartPro/RadarChartPro.mjs +20 -2
- package/SankeyChart/SankeyChart.d.mts +2 -2
- package/SankeyChart/SankeyChart.d.ts +2 -2
- package/SankeyChart/SankeyChart.js +21 -12
- package/SankeyChart/SankeyChart.mjs +21 -12
- package/SankeyChart/SankeyDataProvider.d.mts +2 -2
- package/SankeyChart/SankeyDataProvider.d.ts +2 -2
- package/SankeyChart/SankeyDataProvider.js +2 -2
- package/SankeyChart/SankeyDataProvider.mjs +2 -2
- package/SankeyChart/SankeyLinkElement.js +7 -3
- package/SankeyChart/SankeyLinkElement.mjs +8 -4
- package/SankeyChart/SankeyLinkLabel.js +3 -0
- package/SankeyChart/SankeyLinkLabel.mjs +3 -0
- package/SankeyChart/SankeyLinkLabelPlot.d.mts +2 -2
- package/SankeyChart/SankeyLinkLabelPlot.d.ts +2 -2
- package/SankeyChart/SankeyLinkLabelPlot.js +1 -1
- package/SankeyChart/SankeyLinkLabelPlot.mjs +1 -1
- package/SankeyChart/SankeyLinkPlot.d.mts +2 -2
- package/SankeyChart/SankeyLinkPlot.d.ts +2 -2
- package/SankeyChart/SankeyLinkPlot.js +1 -1
- package/SankeyChart/SankeyLinkPlot.mjs +1 -1
- package/SankeyChart/SankeyNodeElement.d.mts +1 -1
- package/SankeyChart/SankeyNodeElement.d.ts +1 -1
- package/SankeyChart/SankeyNodeElement.js +20 -18
- package/SankeyChart/SankeyNodeElement.mjs +21 -19
- package/SankeyChart/SankeyNodeLabel.js +3 -0
- package/SankeyChart/SankeyNodeLabel.mjs +3 -0
- package/SankeyChart/SankeyNodeLabelPlot.d.mts +2 -2
- package/SankeyChart/SankeyNodeLabelPlot.d.ts +2 -2
- package/SankeyChart/SankeyNodeLabelPlot.js +1 -1
- package/SankeyChart/SankeyNodeLabelPlot.mjs +1 -1
- package/SankeyChart/SankeyNodePlot.d.mts +2 -2
- package/SankeyChart/SankeyNodePlot.d.ts +2 -2
- package/SankeyChart/SankeyNodePlot.js +1 -1
- package/SankeyChart/SankeyNodePlot.mjs +1 -1
- package/SankeyChart/SankeyPlot.d.mts +2 -2
- package/SankeyChart/SankeyPlot.d.ts +2 -2
- package/SankeyChart/SankeyPlot.js +3 -3
- package/SankeyChart/SankeyPlot.mjs +3 -3
- package/SankeyChart/SankeyTooltip/SankeyTooltip.classes.js +2 -2
- package/SankeyChart/SankeyTooltip/SankeyTooltip.classes.mjs +1 -1
- package/SankeyChart/index.d.mts +2 -1
- package/SankeyChart/index.d.ts +2 -1
- package/SankeyChart/index.js +3 -3
- package/SankeyChart/index.mjs +1 -1
- package/SankeyChart/sankeyClasses.d.mts +15 -6
- package/SankeyChart/sankeyClasses.d.ts +15 -6
- package/SankeyChart/sankeyClasses.js +12 -8
- package/SankeyChart/sankeyClasses.mjs +10 -6
- package/SankeyChart/sankeyHighlightHooks.d.mts +2 -2
- package/SankeyChart/sankeyHighlightHooks.d.ts +2 -2
- package/SankeyChart/sankeyHighlightHooks.js +2 -10
- package/SankeyChart/sankeyHighlightHooks.mjs +3 -11
- package/SankeyChart/useSankeyChartProps.d.mts +2 -2
- package/SankeyChart/useSankeyChartProps.d.ts +2 -2
- package/SankeyChart/useSankeyChartProps.js +2 -2
- package/SankeyChart/useSankeyChartProps.mjs +2 -2
- package/ScatterChartPro/ScatterChartPro.d.mts +2 -2
- package/ScatterChartPro/ScatterChartPro.d.ts +2 -2
- package/ScatterChartPro/ScatterChartPro.js +62 -17
- package/ScatterChartPro/ScatterChartPro.mjs +62 -17
- package/context/useChartProApiContext.d.mts +1 -1
- package/context/useChartProApiContext.d.ts +1 -1
- package/context/useChartProApiContext.js +1 -1
- package/context/useChartProApiContext.mjs +1 -1
- package/index.d.mts +0 -4
- package/index.d.ts +0 -4
- package/index.js +2 -34
- package/index.mjs +1 -4
- package/internals/ChartsWatermark.d.mts +2 -2
- package/internals/ChartsWatermark.d.ts +2 -2
- package/internals/ChartsWatermark.js +5 -8
- package/internals/ChartsWatermark.mjs +3 -6
- package/internals/index.d.mts +0 -1
- package/internals/index.d.ts +0 -1
- package/internals/index.js +0 -8
- package/internals/index.mjs +0 -1
- package/internals/plugins/allPlugins.d.mts +4 -4
- package/internals/plugins/allPlugins.d.ts +4 -4
- package/internals/plugins/useChartProExport/common.js +4 -8
- package/internals/plugins/useChartProExport/common.mjs +4 -8
- package/internals/plugins/useChartProExport/exportImage.js +1 -1
- package/internals/plugins/useChartProExport/exportImage.mjs +1 -1
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.mts +1 -1
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +16 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.mjs +16 -1
- package/models/seriesType/heatmap.d.mts +36 -9
- package/models/seriesType/heatmap.d.ts +36 -9
- package/models/seriesType/heatmap.js +28 -1
- package/models/seriesType/heatmap.mjs +25 -1
- package/package.json +5 -61
- package/plugins/selectors/useChartHeatmapPosition.selectors.d.mts +2 -2
- package/plugins/selectors/useChartHeatmapPosition.selectors.d.ts +2 -2
- package/plugins/selectors/useChartHeatmapPosition.selectors.js +4 -4
- package/plugins/selectors/useChartHeatmapPosition.selectors.mjs +4 -4
- package/themeAugmentation/components.d.mts +19 -1
- package/themeAugmentation/components.d.ts +19 -1
- package/themeAugmentation/overrides.d.mts +5 -2
- package/themeAugmentation/overrides.d.ts +5 -2
- package/themeAugmentation/props.d.mts +8 -0
- package/themeAugmentation/props.d.ts +8 -0
- package/typeOverloads/modules.d.mts +2 -2
- package/typeOverloads/modules.d.ts +2 -2
- package/ChartContainer/index.d.mts +0 -1
- package/ChartContainer/index.d.ts +0 -1
- package/ChartContainer/index.js +0 -16
- package/ChartContainer/index.mjs +0 -2
- package/ChartContainerPro/ChartContainerPro.d.mts +0 -21
- package/ChartContainerPro/ChartContainerPro.d.ts +0 -21
- package/ChartContainerPro/ChartContainerPro.js +0 -24
- package/ChartContainerPro/ChartContainerPro.mjs +0 -20
- package/ChartContainerPro/index.d.mts +0 -9
- package/ChartContainerPro/index.d.ts +0 -9
- package/ChartContainerPro/index.js +0 -17
- package/ChartContainerPro/index.mjs +0 -6
- package/ChartContainerPro/useChartContainerProProps.d.mts +0 -12
- package/ChartContainerPro/useChartContainerProProps.d.ts +0 -12
- package/ChartContainerPro/useChartContainerProProps.js +0 -19
- package/ChartContainerPro/useChartContainerProProps.mjs +0 -14
- package/ChartDataProvider/index.d.mts +0 -1
- package/ChartDataProvider/index.d.ts +0 -1
- package/ChartDataProvider/index.js +0 -16
- package/ChartDataProvider/index.mjs +0 -2
- package/ChartDataProviderPro/ChartDataProviderPro.d.mts +0 -20
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +0 -20
- package/ChartDataProviderPro/ChartDataProviderPro.js +0 -30
- package/ChartDataProviderPro/ChartDataProviderPro.mjs +0 -21
- package/ChartDataProviderPro/index.d.mts +0 -2
- package/ChartDataProviderPro/index.d.ts +0 -2
- package/ChartDataProviderPro/index.js +0 -13
- package/ChartDataProviderPro/index.mjs +0 -2
- package/ChartDataProviderPro/useChartDataProviderProProps.d.mts +0 -10
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +0 -10
- package/ChartDataProviderPro/useChartDataProviderProProps.js +0 -12
- package/ChartDataProviderPro/useChartDataProviderProProps.mjs +0 -8
- package/FunnelChart/funnelSectionClasses.d.mts +0 -30
- package/FunnelChart/funnelSectionClasses.d.ts +0 -30
- package/FunnelChart/funnelSectionClasses.js +0 -44
- package/FunnelChart/funnelSectionClasses.mjs +0 -35
- package/Heatmap/internals/HeatmapCell.d.mts +0 -21
- package/Heatmap/internals/HeatmapCell.d.ts +0 -21
- package/Heatmap/internals/HeatmapCell.js +0 -18
- package/Heatmap/internals/HeatmapCell.mjs +0 -12
- package/tests/constants.js +0 -7
- package/tests/constants.mjs +0 -1
|
@@ -20,8 +20,8 @@ import { ChartsWrapper } from '@mui/x-charts/ChartsWrapper';
|
|
|
20
20
|
import { ChartsBrushOverlay } from '@mui/x-charts/ChartsBrushOverlay';
|
|
21
21
|
import { ChartsZoomSlider } from "../ChartsZoomSlider/index.mjs";
|
|
22
22
|
import { ChartsToolbarPro } from "../ChartsToolbarPro/index.mjs";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
23
|
+
import { useChartsContainerProProps } from "../ChartsContainerPro/useChartsContainerProProps.mjs";
|
|
24
|
+
import { ChartsDataProviderPro } from "../ChartsDataProviderPro/index.mjs";
|
|
25
25
|
import { LINE_CHART_PRO_PLUGINS } from "./LineChartPro.plugins.mjs";
|
|
26
26
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
27
|
/**
|
|
@@ -49,7 +49,7 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
|
|
|
49
49
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
50
50
|
const {
|
|
51
51
|
chartsWrapperProps,
|
|
52
|
-
|
|
52
|
+
chartsContainerProps,
|
|
53
53
|
gridProps,
|
|
54
54
|
clipPathProps,
|
|
55
55
|
clipPathGroupProps,
|
|
@@ -64,9 +64,9 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
|
|
|
64
64
|
children
|
|
65
65
|
} = useLineChartProps(other);
|
|
66
66
|
const {
|
|
67
|
-
|
|
67
|
+
chartsDataProviderProProps,
|
|
68
68
|
chartsSurfaceProps
|
|
69
|
-
} =
|
|
69
|
+
} = useChartsContainerProProps(_extends({}, chartsContainerProps, {
|
|
70
70
|
initialZoom,
|
|
71
71
|
zoomData,
|
|
72
72
|
onZoomChange,
|
|
@@ -75,7 +75,7 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
|
|
|
75
75
|
}));
|
|
76
76
|
const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
|
|
77
77
|
const Toolbar = props.slots?.toolbar ?? ChartsToolbarPro;
|
|
78
|
-
return /*#__PURE__*/_jsx(
|
|
78
|
+
return /*#__PURE__*/_jsx(ChartsDataProviderPro, _extends({}, chartsDataProviderProProps, {
|
|
79
79
|
children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
|
|
80
80
|
ref: ref,
|
|
81
81
|
children: [showToolbar ? /*#__PURE__*/_jsx(Toolbar, _extends({}, props.slotProps?.toolbar)) : null, !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
@@ -136,6 +136,10 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
136
136
|
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
137
137
|
*/
|
|
138
138
|
dataset: PropTypes.arrayOf(PropTypes.object),
|
|
139
|
+
/**
|
|
140
|
+
* The description of the chart.
|
|
141
|
+
* Used to provide an accessible description for the chart.
|
|
142
|
+
*/
|
|
139
143
|
desc: PropTypes.string,
|
|
140
144
|
/**
|
|
141
145
|
* If `true`, the charts will not listen to the mouse move event.
|
|
@@ -143,17 +147,18 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
143
147
|
* @default false
|
|
144
148
|
*/
|
|
145
149
|
disableAxisListener: PropTypes.bool,
|
|
150
|
+
/**
|
|
151
|
+
* If `true`, disables keyboard navigation for the chart.
|
|
152
|
+
*/
|
|
153
|
+
disableKeyboardNavigation: PropTypes.bool,
|
|
146
154
|
/**
|
|
147
155
|
* If `true`, render the line highlight item.
|
|
148
156
|
*/
|
|
149
157
|
disableLineItemHighlight: PropTypes.bool,
|
|
150
|
-
enableKeyboardNavigation: PropTypes.bool,
|
|
151
158
|
/**
|
|
152
159
|
* Options to enable features planned for the next major.
|
|
153
160
|
*/
|
|
154
|
-
experimentalFeatures: PropTypes.
|
|
155
|
-
preferStrictDomainInLineCharts: PropTypes.bool
|
|
156
|
-
}),
|
|
161
|
+
experimentalFeatures: PropTypes.object,
|
|
157
162
|
/**
|
|
158
163
|
* Option to display a cartesian grid in the background.
|
|
159
164
|
*/
|
|
@@ -332,7 +337,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
332
337
|
/**
|
|
333
338
|
* The callback fired when the tooltip item changes.
|
|
334
339
|
*
|
|
335
|
-
* @param {SeriesItemIdentifier<
|
|
340
|
+
* @param {SeriesItemIdentifier<SeriesType> | null} tooltipItem The newly highlighted item.
|
|
336
341
|
*/
|
|
337
342
|
onTooltipItemChange: PropTypes.func,
|
|
338
343
|
/**
|
|
@@ -368,6 +373,10 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
368
373
|
slots: PropTypes.object,
|
|
369
374
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
370
375
|
theme: PropTypes.oneOf(['dark', 'light']),
|
|
376
|
+
/**
|
|
377
|
+
* The title of the chart.
|
|
378
|
+
* Used to provide an accessible label for the chart.
|
|
379
|
+
*/
|
|
371
380
|
title: PropTypes.string,
|
|
372
381
|
/**
|
|
373
382
|
* The controlled axis tooltip.
|
|
@@ -403,6 +412,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
403
412
|
barGapRatio: PropTypes.number,
|
|
404
413
|
categoryGapRatio: PropTypes.number,
|
|
405
414
|
classes: PropTypes.object,
|
|
415
|
+
className: PropTypes.string,
|
|
406
416
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
407
417
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
408
418
|
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
@@ -476,6 +486,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
476
486
|
}), PropTypes.shape({
|
|
477
487
|
axis: PropTypes.oneOf(['x']),
|
|
478
488
|
classes: PropTypes.object,
|
|
489
|
+
className: PropTypes.string,
|
|
479
490
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
480
491
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
481
492
|
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
@@ -549,6 +560,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
549
560
|
}), PropTypes.shape({
|
|
550
561
|
axis: PropTypes.oneOf(['x']),
|
|
551
562
|
classes: PropTypes.object,
|
|
563
|
+
className: PropTypes.string,
|
|
552
564
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
553
565
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
554
566
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -609,6 +621,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
609
621
|
}), PropTypes.shape({
|
|
610
622
|
axis: PropTypes.oneOf(['x']),
|
|
611
623
|
classes: PropTypes.object,
|
|
624
|
+
className: PropTypes.string,
|
|
612
625
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
613
626
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
614
627
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -670,6 +683,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
670
683
|
}), PropTypes.shape({
|
|
671
684
|
axis: PropTypes.oneOf(['x']),
|
|
672
685
|
classes: PropTypes.object,
|
|
686
|
+
className: PropTypes.string,
|
|
673
687
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
674
688
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
675
689
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -730,6 +744,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
730
744
|
}), PropTypes.shape({
|
|
731
745
|
axis: PropTypes.oneOf(['x']),
|
|
732
746
|
classes: PropTypes.object,
|
|
747
|
+
className: PropTypes.string,
|
|
733
748
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
734
749
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
735
750
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -790,6 +805,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
790
805
|
}), PropTypes.shape({
|
|
791
806
|
axis: PropTypes.oneOf(['x']),
|
|
792
807
|
classes: PropTypes.object,
|
|
808
|
+
className: PropTypes.string,
|
|
793
809
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
794
810
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
795
811
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -854,6 +870,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
854
870
|
}), PropTypes.shape({
|
|
855
871
|
axis: PropTypes.oneOf(['x']),
|
|
856
872
|
classes: PropTypes.object,
|
|
873
|
+
className: PropTypes.string,
|
|
857
874
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
858
875
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
859
876
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -918,6 +935,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
918
935
|
}), PropTypes.shape({
|
|
919
936
|
axis: PropTypes.oneOf(['x']),
|
|
920
937
|
classes: PropTypes.object,
|
|
938
|
+
className: PropTypes.string,
|
|
921
939
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
922
940
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
923
941
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -986,6 +1004,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
986
1004
|
barGapRatio: PropTypes.number,
|
|
987
1005
|
categoryGapRatio: PropTypes.number,
|
|
988
1006
|
classes: PropTypes.object,
|
|
1007
|
+
className: PropTypes.string,
|
|
989
1008
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
990
1009
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
991
1010
|
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
@@ -1058,6 +1077,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1058
1077
|
}), PropTypes.shape({
|
|
1059
1078
|
axis: PropTypes.oneOf(['y']),
|
|
1060
1079
|
classes: PropTypes.object,
|
|
1080
|
+
className: PropTypes.string,
|
|
1061
1081
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
1062
1082
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
1063
1083
|
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
@@ -1130,6 +1150,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1130
1150
|
}), PropTypes.shape({
|
|
1131
1151
|
axis: PropTypes.oneOf(['y']),
|
|
1132
1152
|
classes: PropTypes.object,
|
|
1153
|
+
className: PropTypes.string,
|
|
1133
1154
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
1134
1155
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
1135
1156
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -1189,6 +1210,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1189
1210
|
}), PropTypes.shape({
|
|
1190
1211
|
axis: PropTypes.oneOf(['y']),
|
|
1191
1212
|
classes: PropTypes.object,
|
|
1213
|
+
className: PropTypes.string,
|
|
1192
1214
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
1193
1215
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
1194
1216
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -1249,6 +1271,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1249
1271
|
}), PropTypes.shape({
|
|
1250
1272
|
axis: PropTypes.oneOf(['y']),
|
|
1251
1273
|
classes: PropTypes.object,
|
|
1274
|
+
className: PropTypes.string,
|
|
1252
1275
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
1253
1276
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
1254
1277
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -1308,6 +1331,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1308
1331
|
}), PropTypes.shape({
|
|
1309
1332
|
axis: PropTypes.oneOf(['y']),
|
|
1310
1333
|
classes: PropTypes.object,
|
|
1334
|
+
className: PropTypes.string,
|
|
1311
1335
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
1312
1336
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
1313
1337
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -1367,6 +1391,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1367
1391
|
}), PropTypes.shape({
|
|
1368
1392
|
axis: PropTypes.oneOf(['y']),
|
|
1369
1393
|
classes: PropTypes.object,
|
|
1394
|
+
className: PropTypes.string,
|
|
1370
1395
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
1371
1396
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
1372
1397
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -1430,6 +1455,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1430
1455
|
}), PropTypes.shape({
|
|
1431
1456
|
axis: PropTypes.oneOf(['y']),
|
|
1432
1457
|
classes: PropTypes.object,
|
|
1458
|
+
className: PropTypes.string,
|
|
1433
1459
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
1434
1460
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
1435
1461
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -1493,6 +1519,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1493
1519
|
}), PropTypes.shape({
|
|
1494
1520
|
axis: PropTypes.oneOf(['y']),
|
|
1495
1521
|
classes: PropTypes.object,
|
|
1522
|
+
className: PropTypes.string,
|
|
1496
1523
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
1497
1524
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
1498
1525
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -1618,8 +1645,8 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1618
1645
|
requiredKeys: PropTypes.arrayOf(PropTypes.string),
|
|
1619
1646
|
type: PropTypes.oneOf(['doubleTapReset']).isRequired
|
|
1620
1647
|
}), PropTypes.shape({
|
|
1621
|
-
pointerMode: PropTypes.
|
|
1622
|
-
requiredKeys: PropTypes.
|
|
1648
|
+
pointerMode: PropTypes.oneOf(['mouse', 'touch']),
|
|
1649
|
+
requiredKeys: PropTypes.arrayOf(PropTypes.string),
|
|
1623
1650
|
type: PropTypes.oneOf(['brush']).isRequired
|
|
1624
1651
|
})]).isRequired)
|
|
1625
1652
|
})
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type PieChartProps, type PieChartSlotProps, type PieChartSlots } from '@mui/x-charts/PieChart';
|
|
3
3
|
import { type ChartsSlotsPro, type ChartsSlotPropsPro } from "../internals/material/index.mjs";
|
|
4
|
-
import { type
|
|
4
|
+
import { type ChartsContainerProProps } from "../ChartsContainerPro/index.mjs";
|
|
5
5
|
import { type PieChartProPluginSignatures } from "./PieChartPro.plugins.mjs";
|
|
6
6
|
import { type ChartsToolbarProSlotProps, type ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.mjs";
|
|
7
7
|
export interface PieChartProSlots extends Omit<PieChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
8
8
|
export interface PieChartProSlotProps extends Omit<PieChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
9
|
-
export interface PieChartProProps extends Omit<PieChartProps, 'apiRef' | 'slots' | 'slotProps' | 'plugins' | 'seriesConfig'>, Omit<
|
|
9
|
+
export interface PieChartProProps extends Omit<PieChartProps, 'apiRef' | 'slots' | 'slotProps' | 'plugins' | 'seriesConfig'>, Omit<ChartsContainerProProps<'pie', PieChartProPluginSignatures>, 'series' | 'slots' | 'slotProps'> {
|
|
10
10
|
/**
|
|
11
11
|
* Overridable component slots.
|
|
12
12
|
* @default {}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type PieChartProps, type PieChartSlotProps, type PieChartSlots } from '@mui/x-charts/PieChart';
|
|
3
3
|
import { type ChartsSlotsPro, type ChartsSlotPropsPro } from "../internals/material/index.js";
|
|
4
|
-
import { type
|
|
4
|
+
import { type ChartsContainerProProps } from "../ChartsContainerPro/index.js";
|
|
5
5
|
import { type PieChartProPluginSignatures } from "./PieChartPro.plugins.js";
|
|
6
6
|
import { type ChartsToolbarProSlotProps, type ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
7
7
|
export interface PieChartProSlots extends Omit<PieChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
8
8
|
export interface PieChartProSlotProps extends Omit<PieChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
9
|
-
export interface PieChartProProps extends Omit<PieChartProps, 'apiRef' | 'slots' | 'slotProps' | 'plugins' | 'seriesConfig'>, Omit<
|
|
9
|
+
export interface PieChartProProps extends Omit<PieChartProps, 'apiRef' | 'slots' | 'slotProps' | 'plugins' | 'seriesConfig'>, Omit<ChartsContainerProProps<'pie', PieChartProPluginSignatures>, 'series' | 'slots' | 'slotProps'> {
|
|
10
10
|
/**
|
|
11
11
|
* Overridable component slots.
|
|
12
12
|
* @default {}
|
|
@@ -18,8 +18,8 @@ var _ChartsLegend = require("@mui/x-charts/ChartsLegend");
|
|
|
18
18
|
var _ChartsSurface = require("@mui/x-charts/ChartsSurface");
|
|
19
19
|
var _PieChart = require("@mui/x-charts/PieChart");
|
|
20
20
|
var _ChartsWrapper = require("@mui/x-charts/ChartsWrapper");
|
|
21
|
-
var
|
|
22
|
-
var
|
|
21
|
+
var _useChartsContainerProProps = require("../ChartsContainerPro/useChartsContainerProProps");
|
|
22
|
+
var _ChartsDataProviderPro = require("../ChartsDataProviderPro");
|
|
23
23
|
var _ChartsToolbarPro = require("../ChartsToolbarPro");
|
|
24
24
|
var _PieChartPro2 = require("./PieChartPro.plugins");
|
|
25
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -51,9 +51,9 @@ const PieChartPro = exports.PieChartPro = /*#__PURE__*/React.forwardRef(function
|
|
|
51
51
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
52
52
|
const margin = (0, _internals.defaultizeMargin)(marginProps, _internals.DEFAULT_PIE_CHART_MARGIN);
|
|
53
53
|
const {
|
|
54
|
-
|
|
54
|
+
chartsDataProviderProProps,
|
|
55
55
|
chartsSurfaceProps
|
|
56
|
-
} = (0,
|
|
56
|
+
} = (0, _useChartsContainerProProps.useChartsContainerProProps)((0, _extends2.default)({}, other, {
|
|
57
57
|
series: series.map(s => (0, _extends2.default)({
|
|
58
58
|
type: 'pie'
|
|
59
59
|
}, s)),
|
|
@@ -69,7 +69,7 @@ const PieChartPro = exports.PieChartPro = /*#__PURE__*/React.forwardRef(function
|
|
|
69
69
|
}));
|
|
70
70
|
const Tooltip = slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
|
|
71
71
|
const Toolbar = slots?.toolbar ?? _ChartsToolbarPro.ChartsToolbarPro;
|
|
72
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
72
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsDataProviderPro.ChartsDataProviderPro, (0, _extends2.default)({}, chartsDataProviderProProps, {
|
|
73
73
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, {
|
|
74
74
|
legendPosition: slotProps?.legend?.position,
|
|
75
75
|
legendDirection: slotProps?.legend?.direction ?? 'vertical',
|
|
@@ -119,8 +119,19 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
|
|
|
119
119
|
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
120
120
|
*/
|
|
121
121
|
dataset: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
122
|
+
/**
|
|
123
|
+
* The description of the chart.
|
|
124
|
+
* Used to provide an accessible description for the chart.
|
|
125
|
+
*/
|
|
122
126
|
desc: _propTypes.default.string,
|
|
123
|
-
|
|
127
|
+
/**
|
|
128
|
+
* If `true`, disables keyboard navigation for the chart.
|
|
129
|
+
*/
|
|
130
|
+
disableKeyboardNavigation: _propTypes.default.bool,
|
|
131
|
+
/**
|
|
132
|
+
* Options to enable features planned for the next major.
|
|
133
|
+
*/
|
|
134
|
+
experimentalFeatures: _propTypes.default.object,
|
|
124
135
|
/**
|
|
125
136
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
126
137
|
*/
|
|
@@ -244,7 +255,7 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
|
|
|
244
255
|
/**
|
|
245
256
|
* The callback fired when the tooltip item changes.
|
|
246
257
|
*
|
|
247
|
-
* @param {SeriesItemIdentifier<
|
|
258
|
+
* @param {SeriesItemIdentifier<SeriesType> | null} tooltipItem The newly highlighted item.
|
|
248
259
|
*/
|
|
249
260
|
onTooltipItemChange: _propTypes.default.func,
|
|
250
261
|
/**
|
|
@@ -274,6 +285,10 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
|
|
|
274
285
|
slots: _propTypes.default.object,
|
|
275
286
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
276
287
|
theme: _propTypes.default.oneOf(['dark', 'light']),
|
|
288
|
+
/**
|
|
289
|
+
* The title of the chart.
|
|
290
|
+
* Used to provide an accessible label for the chart.
|
|
291
|
+
*/
|
|
277
292
|
title: _propTypes.default.string,
|
|
278
293
|
/**
|
|
279
294
|
* The tooltip item.
|
|
@@ -11,8 +11,8 @@ import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
|
|
|
11
11
|
import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
|
|
12
12
|
import { PiePlot } from '@mui/x-charts/PieChart';
|
|
13
13
|
import { ChartsWrapper } from '@mui/x-charts/ChartsWrapper';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
14
|
+
import { useChartsContainerProProps } from "../ChartsContainerPro/useChartsContainerProProps.mjs";
|
|
15
|
+
import { ChartsDataProviderPro } from "../ChartsDataProviderPro/index.mjs";
|
|
16
16
|
import { ChartsToolbarPro } from "../ChartsToolbarPro/index.mjs";
|
|
17
17
|
import { PIE_CHART_PRO_PLUGINS } from "./PieChartPro.plugins.mjs";
|
|
18
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -43,9 +43,9 @@ const PieChartPro = /*#__PURE__*/React.forwardRef(function PieChartPro(inProps,
|
|
|
43
43
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
44
44
|
const margin = defaultizeMargin(marginProps, DEFAULT_PIE_CHART_MARGIN);
|
|
45
45
|
const {
|
|
46
|
-
|
|
46
|
+
chartsDataProviderProProps,
|
|
47
47
|
chartsSurfaceProps
|
|
48
|
-
} =
|
|
48
|
+
} = useChartsContainerProProps(_extends({}, other, {
|
|
49
49
|
series: series.map(s => _extends({
|
|
50
50
|
type: 'pie'
|
|
51
51
|
}, s)),
|
|
@@ -61,7 +61,7 @@ const PieChartPro = /*#__PURE__*/React.forwardRef(function PieChartPro(inProps,
|
|
|
61
61
|
}));
|
|
62
62
|
const Tooltip = slots?.tooltip ?? ChartsTooltip;
|
|
63
63
|
const Toolbar = slots?.toolbar ?? ChartsToolbarPro;
|
|
64
|
-
return /*#__PURE__*/_jsx(
|
|
64
|
+
return /*#__PURE__*/_jsx(ChartsDataProviderPro, _extends({}, chartsDataProviderProProps, {
|
|
65
65
|
children: /*#__PURE__*/_jsxs(ChartsWrapper, {
|
|
66
66
|
legendPosition: slotProps?.legend?.position,
|
|
67
67
|
legendDirection: slotProps?.legend?.direction ?? 'vertical',
|
|
@@ -111,8 +111,19 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
|
|
|
111
111
|
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
112
112
|
*/
|
|
113
113
|
dataset: PropTypes.arrayOf(PropTypes.object),
|
|
114
|
+
/**
|
|
115
|
+
* The description of the chart.
|
|
116
|
+
* Used to provide an accessible description for the chart.
|
|
117
|
+
*/
|
|
114
118
|
desc: PropTypes.string,
|
|
115
|
-
|
|
119
|
+
/**
|
|
120
|
+
* If `true`, disables keyboard navigation for the chart.
|
|
121
|
+
*/
|
|
122
|
+
disableKeyboardNavigation: PropTypes.bool,
|
|
123
|
+
/**
|
|
124
|
+
* Options to enable features planned for the next major.
|
|
125
|
+
*/
|
|
126
|
+
experimentalFeatures: PropTypes.object,
|
|
116
127
|
/**
|
|
117
128
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
118
129
|
*/
|
|
@@ -236,7 +247,7 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
|
|
|
236
247
|
/**
|
|
237
248
|
* The callback fired when the tooltip item changes.
|
|
238
249
|
*
|
|
239
|
-
* @param {SeriesItemIdentifier<
|
|
250
|
+
* @param {SeriesItemIdentifier<SeriesType> | null} tooltipItem The newly highlighted item.
|
|
240
251
|
*/
|
|
241
252
|
onTooltipItemChange: PropTypes.func,
|
|
242
253
|
/**
|
|
@@ -266,6 +277,10 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
|
|
|
266
277
|
slots: PropTypes.object,
|
|
267
278
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
268
279
|
theme: PropTypes.oneOf(['dark', 'light']),
|
|
280
|
+
/**
|
|
281
|
+
* The title of the chart.
|
|
282
|
+
* Used to provide an accessible label for the chart.
|
|
283
|
+
*/
|
|
269
284
|
title: PropTypes.string,
|
|
270
285
|
/**
|
|
271
286
|
* The tooltip item.
|
|
@@ -5,7 +5,7 @@ import { type ChartsToolbarProSlotProps, type ChartsToolbarProSlots } from "../C
|
|
|
5
5
|
import { type ChartsSlotPropsPro, type ChartsSlotsPro } from "../internals/material/index.mjs";
|
|
6
6
|
export interface RadarChartProSlots extends Omit<RadarChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
7
7
|
export interface RadarChartProSlotProps extends Omit<RadarChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
8
|
-
export interface RadarChartProProps extends Omit<RadarChartProps, 'apiRef' | 'slots' | 'slotProps' | 'plugins' | 'seriesConfig'>, Omit<RadarDataProviderProps<RadarChartProPluginSignatures>, 'slots' | 'slotProps'
|
|
8
|
+
export interface RadarChartProProps extends Omit<RadarChartProps, 'apiRef' | 'slots' | 'slotProps' | 'plugins' | 'seriesConfig'>, Omit<RadarDataProviderProps<RadarChartProPluginSignatures>, 'slots' | 'slotProps'> {
|
|
9
9
|
/**
|
|
10
10
|
* Overridable component slots.
|
|
11
11
|
* @default {}
|
|
@@ -5,7 +5,7 @@ import { type ChartsToolbarProSlotProps, type ChartsToolbarProSlots } from "../C
|
|
|
5
5
|
import { type ChartsSlotPropsPro, type ChartsSlotsPro } from "../internals/material/index.js";
|
|
6
6
|
export interface RadarChartProSlots extends Omit<RadarChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
7
7
|
export interface RadarChartProSlotProps extends Omit<RadarChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
8
|
-
export interface RadarChartProProps extends Omit<RadarChartProps, 'apiRef' | 'slots' | 'slotProps' | 'plugins' | 'seriesConfig'>, Omit<RadarDataProviderProps<RadarChartProPluginSignatures>, 'slots' | 'slotProps'
|
|
8
|
+
export interface RadarChartProProps extends Omit<RadarChartProps, 'apiRef' | 'slots' | 'slotProps' | 'plugins' | 'seriesConfig'>, Omit<RadarDataProviderProps<RadarChartProPluginSignatures>, 'slots' | 'slotProps'> {
|
|
9
9
|
/**
|
|
10
10
|
* Overridable component slots.
|
|
11
11
|
* @default {}
|
|
@@ -72,12 +72,19 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
|
|
|
72
72
|
exportAsPrint: _propTypes.default.func.isRequired
|
|
73
73
|
})
|
|
74
74
|
}),
|
|
75
|
+
/**
|
|
76
|
+
* A CSS class name applied to the root element.
|
|
77
|
+
*/
|
|
75
78
|
className: _propTypes.default.string,
|
|
76
79
|
/**
|
|
77
80
|
* Color palette used to colorize multiple series.
|
|
78
81
|
* @default rainbowSurgePalette
|
|
79
82
|
*/
|
|
80
83
|
colors: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string), _propTypes.default.func]),
|
|
84
|
+
/**
|
|
85
|
+
* The description of the chart.
|
|
86
|
+
* Used to provide an accessible description for the chart.
|
|
87
|
+
*/
|
|
81
88
|
desc: _propTypes.default.string,
|
|
82
89
|
/**
|
|
83
90
|
* If `true`, the charts will not listen to the mouse move event.
|
|
@@ -85,12 +92,19 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
|
|
|
85
92
|
* @default false
|
|
86
93
|
*/
|
|
87
94
|
disableAxisListener: _propTypes.default.bool,
|
|
95
|
+
/**
|
|
96
|
+
* If `true`, disables keyboard navigation for the chart.
|
|
97
|
+
*/
|
|
98
|
+
disableKeyboardNavigation: _propTypes.default.bool,
|
|
88
99
|
/**
|
|
89
100
|
* The number of divisions in the radar grid.
|
|
90
101
|
* @default 5
|
|
91
102
|
*/
|
|
92
103
|
divisions: _propTypes.default.number,
|
|
93
|
-
|
|
104
|
+
/**
|
|
105
|
+
* Options to enable features planned for the next major.
|
|
106
|
+
*/
|
|
107
|
+
experimentalFeatures: _propTypes.default.object,
|
|
94
108
|
/**
|
|
95
109
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
96
110
|
*/
|
|
@@ -234,7 +248,7 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
|
|
|
234
248
|
/**
|
|
235
249
|
* The callback fired when the tooltip item changes.
|
|
236
250
|
*
|
|
237
|
-
* @param {SeriesItemIdentifier<
|
|
251
|
+
* @param {SeriesItemIdentifier<SeriesType> | null} tooltipItem The newly highlighted item.
|
|
238
252
|
*/
|
|
239
253
|
onTooltipItemChange: _propTypes.default.func,
|
|
240
254
|
/**
|
|
@@ -290,6 +304,10 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
|
|
|
290
304
|
stripeColor: _propTypes.default.func,
|
|
291
305
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
292
306
|
theme: _propTypes.default.oneOf(['dark', 'light']),
|
|
307
|
+
/**
|
|
308
|
+
* The title of the chart.
|
|
309
|
+
* Used to provide an accessible label for the chart.
|
|
310
|
+
*/
|
|
293
311
|
title: _propTypes.default.string,
|
|
294
312
|
/**
|
|
295
313
|
* The tooltip item.
|
|
@@ -65,12 +65,19 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
|
|
|
65
65
|
exportAsPrint: PropTypes.func.isRequired
|
|
66
66
|
})
|
|
67
67
|
}),
|
|
68
|
+
/**
|
|
69
|
+
* A CSS class name applied to the root element.
|
|
70
|
+
*/
|
|
68
71
|
className: PropTypes.string,
|
|
69
72
|
/**
|
|
70
73
|
* Color palette used to colorize multiple series.
|
|
71
74
|
* @default rainbowSurgePalette
|
|
72
75
|
*/
|
|
73
76
|
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
77
|
+
/**
|
|
78
|
+
* The description of the chart.
|
|
79
|
+
* Used to provide an accessible description for the chart.
|
|
80
|
+
*/
|
|
74
81
|
desc: PropTypes.string,
|
|
75
82
|
/**
|
|
76
83
|
* If `true`, the charts will not listen to the mouse move event.
|
|
@@ -78,12 +85,19 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
|
|
|
78
85
|
* @default false
|
|
79
86
|
*/
|
|
80
87
|
disableAxisListener: PropTypes.bool,
|
|
88
|
+
/**
|
|
89
|
+
* If `true`, disables keyboard navigation for the chart.
|
|
90
|
+
*/
|
|
91
|
+
disableKeyboardNavigation: PropTypes.bool,
|
|
81
92
|
/**
|
|
82
93
|
* The number of divisions in the radar grid.
|
|
83
94
|
* @default 5
|
|
84
95
|
*/
|
|
85
96
|
divisions: PropTypes.number,
|
|
86
|
-
|
|
97
|
+
/**
|
|
98
|
+
* Options to enable features planned for the next major.
|
|
99
|
+
*/
|
|
100
|
+
experimentalFeatures: PropTypes.object,
|
|
87
101
|
/**
|
|
88
102
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
89
103
|
*/
|
|
@@ -227,7 +241,7 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
|
|
|
227
241
|
/**
|
|
228
242
|
* The callback fired when the tooltip item changes.
|
|
229
243
|
*
|
|
230
|
-
* @param {SeriesItemIdentifier<
|
|
244
|
+
* @param {SeriesItemIdentifier<SeriesType> | null} tooltipItem The newly highlighted item.
|
|
231
245
|
*/
|
|
232
246
|
onTooltipItemChange: PropTypes.func,
|
|
233
247
|
/**
|
|
@@ -283,6 +297,10 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
|
|
|
283
297
|
stripeColor: PropTypes.func,
|
|
284
298
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
285
299
|
theme: PropTypes.oneOf(['dark', 'light']),
|
|
300
|
+
/**
|
|
301
|
+
* The title of the chart.
|
|
302
|
+
* Used to provide an accessible label for the chart.
|
|
303
|
+
*/
|
|
286
304
|
title: PropTypes.string,
|
|
287
305
|
/**
|
|
288
306
|
* The tooltip item.
|
|
@@ -4,10 +4,10 @@ import type { MakeOptional } from '@mui/x-internals/types';
|
|
|
4
4
|
import { type SankeyPlotProps } from "./SankeyPlot.mjs";
|
|
5
5
|
import type { SankeySeriesType } from "./sankey.types.mjs";
|
|
6
6
|
import type { SankeyChartSlotExtension } from "./sankeySlots.types.mjs";
|
|
7
|
-
import type {
|
|
7
|
+
import type { ChartsContainerProProps } from "../ChartsContainerPro/index.mjs";
|
|
8
8
|
import type { SankeyChartPluginSignatures } from "./SankeyChart.plugins.mjs";
|
|
9
9
|
export type SankeySeries = MakeOptional<SankeySeriesType, 'type'>;
|
|
10
|
-
export interface SankeyChartProps extends Omit<
|
|
10
|
+
export interface SankeyChartProps extends Omit<ChartsContainerProProps<'sankey', SankeyChartPluginSignatures>, 'plugins' | 'series' | 'slotProps' | 'slots' | 'dataset' | 'hideLegend' | 'skipAnimation'>, Omit<SankeyPlotProps, 'data'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'>, SankeyChartSlotExtension {
|
|
11
11
|
/**
|
|
12
12
|
* The series to display in the Sankey chart.
|
|
13
13
|
* A single object is expected.
|
|
@@ -4,10 +4,10 @@ import type { MakeOptional } from '@mui/x-internals/types';
|
|
|
4
4
|
import { type SankeyPlotProps } from "./SankeyPlot.js";
|
|
5
5
|
import type { SankeySeriesType } from "./sankey.types.js";
|
|
6
6
|
import type { SankeyChartSlotExtension } from "./sankeySlots.types.js";
|
|
7
|
-
import type {
|
|
7
|
+
import type { ChartsContainerProProps } from "../ChartsContainerPro/index.js";
|
|
8
8
|
import type { SankeyChartPluginSignatures } from "./SankeyChart.plugins.js";
|
|
9
9
|
export type SankeySeries = MakeOptional<SankeySeriesType, 'type'>;
|
|
10
|
-
export interface SankeyChartProps extends Omit<
|
|
10
|
+
export interface SankeyChartProps extends Omit<ChartsContainerProProps<'sankey', SankeyChartPluginSignatures>, 'plugins' | 'series' | 'slotProps' | 'slots' | 'dataset' | 'hideLegend' | 'skipAnimation'>, Omit<SankeyPlotProps, 'data'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'>, SankeyChartSlotExtension {
|
|
11
11
|
/**
|
|
12
12
|
* The series to display in the Sankey chart.
|
|
13
13
|
* A single object is expected.
|