@mui/x-charts-pro 8.0.0-beta.3 → 8.1.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.js +796 -14
- package/BarChartPro/BarChartPro.plugins.d.ts +2 -1
- package/BarChartPro/BarChartPro.plugins.js +2 -1
- package/CHANGELOG.md +388 -96
- package/ChartContainerPro/ChartContainerPro.d.ts +1 -0
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
- package/ChartDataProviderPro/ChartDataProviderPro.js +36 -22
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +2 -2
- package/ChartDataProviderPro/useChartDataProviderProProps.js +2 -2
- package/FunnelChart/FunnelChart.js +78 -4
- package/FunnelChart/categoryAxis.types.d.ts +3 -2
- package/FunnelChart/funnelSectionClasses.d.ts +5 -0
- package/FunnelChart/funnelSectionClasses.js +1 -1
- package/FunnelChart/index.d.ts +1 -0
- package/FunnelChart/index.js +12 -0
- package/FunnelChart/useFunnelChartProps.js +3 -3
- package/Heatmap/Heatmap.js +5 -2
- package/Heatmap/HeatmapItem.js +1 -1
- package/Heatmap/heatmapClasses.d.ts +5 -0
- package/Heatmap/heatmapClasses.js +1 -1
- package/LineChartPro/LineChartPro.js +796 -14
- package/LineChartPro/LineChartPro.plugins.d.ts +2 -1
- package/LineChartPro/LineChartPro.plugins.js +2 -1
- package/ScatterChartPro/ScatterChartPro.js +796 -14
- package/ScatterChartPro/ScatterChartPro.plugins.d.ts +2 -1
- package/ScatterChartPro/ScatterChartPro.plugins.js +2 -1
- package/esm/BarChartPro/BarChartPro.js +796 -14
- package/esm/BarChartPro/BarChartPro.plugins.d.ts +2 -1
- package/esm/BarChartPro/BarChartPro.plugins.js +2 -1
- package/esm/ChartContainerPro/ChartContainerPro.d.ts +1 -0
- package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +37 -23
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +2 -2
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.js +2 -2
- package/esm/FunnelChart/FunnelChart.js +78 -4
- package/esm/FunnelChart/categoryAxis.types.d.ts +3 -2
- package/esm/FunnelChart/funnelSectionClasses.d.ts +5 -0
- package/esm/FunnelChart/funnelSectionClasses.js +1 -1
- package/esm/FunnelChart/index.d.ts +1 -0
- package/esm/FunnelChart/index.js +1 -0
- package/esm/FunnelChart/useFunnelChartProps.js +3 -3
- package/esm/Heatmap/Heatmap.js +5 -2
- package/esm/Heatmap/HeatmapItem.js +1 -1
- package/esm/Heatmap/heatmapClasses.d.ts +5 -0
- package/esm/Heatmap/heatmapClasses.js +1 -1
- package/esm/LineChartPro/LineChartPro.js +796 -14
- package/esm/LineChartPro/LineChartPro.plugins.d.ts +2 -1
- package/esm/LineChartPro/LineChartPro.plugins.js +2 -1
- package/esm/ScatterChartPro/ScatterChartPro.js +796 -14
- package/esm/ScatterChartPro/ScatterChartPro.plugins.d.ts +2 -1
- package/esm/ScatterChartPro/ScatterChartPro.plugins.js +2 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/esm/internals/plugins/allPlugins.d.ts +5 -4
- package/esm/internals/plugins/allPlugins.js +3 -2
- package/esm/internals/plugins/useChartProExport/index.d.ts +2 -0
- package/esm/internals/plugins/useChartProExport/index.js +2 -0
- package/esm/internals/plugins/useChartProExport/print.d.ts +4 -0
- package/esm/internals/plugins/useChartProExport/print.js +72 -0
- package/esm/internals/plugins/useChartProExport/useChartProExport.d.ts +3 -0
- package/esm/internals/plugins/useChartProExport/useChartProExport.js +45 -0
- package/esm/internals/plugins/useChartProExport/useChartProExport.types.d.ts +35 -0
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -1
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +73 -56
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +7 -7
- package/esm/locales/index.d.ts +1 -0
- package/esm/locales/index.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +12 -1
- package/internals/plugins/allPlugins.d.ts +5 -4
- package/internals/plugins/allPlugins.js +3 -2
- package/internals/plugins/useChartProExport/index.d.ts +2 -0
- package/internals/plugins/useChartProExport/index.js +27 -0
- package/internals/plugins/useChartProExport/print.d.ts +4 -0
- package/internals/plugins/useChartProExport/print.js +79 -0
- package/internals/plugins/useChartProExport/useChartProExport.d.ts +3 -0
- package/internals/plugins/useChartProExport/useChartProExport.js +53 -0
- package/internals/plugins/useChartProExport/useChartProExport.types.d.ts +35 -0
- package/internals/plugins/useChartProExport/useChartProExport.types.js +5 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -1
- package/internals/plugins/useChartProZoom/useChartProZoom.js +74 -56
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +7 -7
- package/locales/index.d.ts +1 -0
- package/locales/index.js +16 -0
- package/package.json +6 -14
- package/esm/internals/utils/releaseInfo.d.ts +0 -1
- package/esm/internals/utils/releaseInfo.js +0 -13
- package/internals/utils/releaseInfo.d.ts +0 -1
- package/internals/utils/releaseInfo.js +0 -21
- package/modern/BarChartPro/BarChartPro.d.ts +0 -18
- package/modern/BarChartPro/BarChartPro.js +0 -406
- package/modern/BarChartPro/BarChartPro.plugins.d.ts +0 -4
- package/modern/BarChartPro/BarChartPro.plugins.js +0 -3
- package/modern/BarChartPro/index.d.ts +0 -1
- package/modern/BarChartPro/index.js +0 -1
- package/modern/ChartContainerPro/ChartContainerPro.d.ts +0 -35
- package/modern/ChartContainerPro/ChartContainerPro.js +0 -290
- package/modern/ChartContainerPro/index.d.ts +0 -2
- package/modern/ChartContainerPro/index.js +0 -2
- package/modern/ChartContainerPro/useChartContainerProProps.d.ts +0 -9
- package/modern/ChartContainerPro/useChartContainerProProps.js +0 -35
- package/modern/ChartDataProviderPro/ChartDataProviderPro.d.ts +0 -37
- package/modern/ChartDataProviderPro/ChartDataProviderPro.js +0 -106
- package/modern/ChartDataProviderPro/index.d.ts +0 -2
- package/modern/ChartDataProviderPro/index.js +0 -2
- package/modern/ChartDataProviderPro/useChartDataProviderProProps.d.ts +0 -8
- package/modern/ChartDataProviderPro/useChartDataProviderProProps.js +0 -15
- package/modern/FunnelChart/FunnelChart.d.ts +0 -37
- package/modern/FunnelChart/FunnelChart.js +0 -212
- package/modern/FunnelChart/FunnelPlot.d.ts +0 -16
- package/modern/FunnelChart/FunnelPlot.js +0 -184
- package/modern/FunnelChart/FunnelSection.d.ts +0 -15
- package/modern/FunnelChart/FunnelSection.js +0 -56
- package/modern/FunnelChart/categoryAxis.types.d.ts +0 -24
- package/modern/FunnelChart/funnel.types.d.ts +0 -124
- package/modern/FunnelChart/funnel.types.js +0 -1
- package/modern/FunnelChart/funnelPlotSlots.types.d.ts +0 -20
- package/modern/FunnelChart/funnelPlotSlots.types.js +0 -1
- package/modern/FunnelChart/funnelSectionClasses.d.ts +0 -13
- package/modern/FunnelChart/funnelSectionClasses.js +0 -20
- package/modern/FunnelChart/funnelSlots.types.d.ts +0 -19
- package/modern/FunnelChart/funnelSlots.types.js +0 -1
- package/modern/FunnelChart/funnelStepCurve.d.ts +0 -4
- package/modern/FunnelChart/funnelStepCurve.js +0 -67
- package/modern/FunnelChart/index.d.ts +0 -7
- package/modern/FunnelChart/index.js +0 -5
- package/modern/FunnelChart/labelUtils.d.ts +0 -42
- package/modern/FunnelChart/labelUtils.js +0 -166
- package/modern/FunnelChart/seriesConfig/extremums.d.ts +0 -3
- package/modern/FunnelChart/seriesConfig/extremums.js +0 -42
- package/modern/FunnelChart/seriesConfig/getColor.d.ts +0 -3
- package/modern/FunnelChart/seriesConfig/getColor.js +0 -4
- package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +0 -3
- package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +0 -11
- package/modern/FunnelChart/seriesConfig/index.d.ts +0 -2
- package/modern/FunnelChart/seriesConfig/index.js +0 -15
- package/modern/FunnelChart/seriesConfig/legend.d.ts +0 -3
- package/modern/FunnelChart/seriesConfig/legend.js +0 -25
- package/modern/FunnelChart/seriesConfig/seriesProcessor.d.ts +0 -3
- package/modern/FunnelChart/seriesConfig/seriesProcessor.js +0 -89
- package/modern/FunnelChart/seriesConfig/tooltip.d.ts +0 -3
- package/modern/FunnelChart/seriesConfig/tooltip.js +0 -29
- package/modern/FunnelChart/useFunnelChartProps.d.ts +0 -30
- package/modern/FunnelChart/useFunnelChartProps.js +0 -161
- package/modern/Heatmap/Heatmap.d.ts +0 -57
- package/modern/Heatmap/Heatmap.js +0 -389
- package/modern/Heatmap/Heatmap.plugins.d.ts +0 -3
- package/modern/Heatmap/Heatmap.plugins.js +0 -2
- package/modern/Heatmap/HeatmapItem.d.ts +0 -49
- package/modern/Heatmap/HeatmapItem.js +0 -106
- package/modern/Heatmap/HeatmapPlot.d.ts +0 -8
- package/modern/Heatmap/HeatmapPlot.js +0 -59
- package/modern/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +0 -16
- package/modern/Heatmap/HeatmapTooltip/HeatmapTooltip.js +0 -284
- package/modern/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.d.ts +0 -4
- package/modern/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.js +0 -22
- package/modern/Heatmap/HeatmapTooltip/index.d.ts +0 -1
- package/modern/Heatmap/HeatmapTooltip/index.js +0 -1
- package/modern/Heatmap/heatmapClasses.d.ts +0 -11
- package/modern/Heatmap/heatmapClasses.js +0 -14
- package/modern/Heatmap/index.d.ts +0 -4
- package/modern/Heatmap/index.js +0 -4
- package/modern/Heatmap/seriesConfig/extremums.d.ts +0 -2
- package/modern/Heatmap/seriesConfig/extremums.js +0 -8
- package/modern/Heatmap/seriesConfig/getColor.d.ts +0 -3
- package/modern/Heatmap/seriesConfig/getColor.js +0 -15
- package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +0 -3
- package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +0 -8
- package/modern/Heatmap/seriesConfig/index.d.ts +0 -2
- package/modern/Heatmap/seriesConfig/index.js +0 -14
- package/modern/Heatmap/seriesConfig/seriesProcessor.d.ts +0 -3
- package/modern/Heatmap/seriesConfig/seriesProcessor.js +0 -21
- package/modern/Heatmap/seriesConfig/tooltip.d.ts +0 -3
- package/modern/Heatmap/seriesConfig/tooltip.js +0 -25
- package/modern/LineChartPro/LineChartPro.d.ts +0 -17
- package/modern/LineChartPro/LineChartPro.js +0 -403
- package/modern/LineChartPro/LineChartPro.plugins.d.ts +0 -4
- package/modern/LineChartPro/LineChartPro.plugins.js +0 -3
- package/modern/LineChartPro/index.d.ts +0 -1
- package/modern/LineChartPro/index.js +0 -1
- package/modern/ScatterChartPro/ScatterChartPro.d.ts +0 -17
- package/modern/ScatterChartPro/ScatterChartPro.js +0 -397
- package/modern/ScatterChartPro/ScatterChartPro.plugins.d.ts +0 -4
- package/modern/ScatterChartPro/ScatterChartPro.plugins.js +0 -3
- package/modern/ScatterChartPro/index.d.ts +0 -1
- package/modern/ScatterChartPro/index.js +0 -1
- package/modern/hooks/index.d.ts +0 -2
- package/modern/hooks/index.js +0 -2
- package/modern/hooks/useFunnelSeries.d.ts +0 -33
- package/modern/hooks/useFunnelSeries.js +0 -42
- package/modern/hooks/useHeatmapSeries.d.ts +0 -33
- package/modern/hooks/useHeatmapSeries.js +0 -42
- package/modern/hooks/zoom/index.d.ts +0 -1
- package/modern/hooks/zoom/index.js +0 -1
- package/modern/hooks/zoom/useIsZoomInteracting.d.ts +0 -6
- package/modern/hooks/zoom/useIsZoomInteracting.js +0 -14
- package/modern/index.d.ts +0 -34
- package/modern/index.js +0 -45
- package/modern/internals/plugins/allPlugins.d.ts +0 -8
- package/modern/internals/plugins/allPlugins.js +0 -6
- package/modern/internals/plugins/useChartProZoom/index.d.ts +0 -3
- package/modern/internals/plugins/useChartProZoom/index.js +0 -3
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.d.ts +0 -3
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.js +0 -350
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +0 -203
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +0 -4
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +0 -53
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.js +0 -1
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +0 -45
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.js +0 -126
- package/modern/internals/utils/releaseInfo.d.ts +0 -1
- package/modern/internals/utils/releaseInfo.js +0 -13
- package/modern/models/index.d.ts +0 -2
- package/modern/models/index.js +0 -2
- package/modern/models/seriesType/heatmap.d.ts +0 -28
- package/modern/models/seriesType/heatmap.js +0 -1
- package/modern/models/seriesType/index.d.ts +0 -1
- package/modern/models/seriesType/index.js +0 -1
- package/modern/package.json +0 -1
- package/modern/themeAugmentation/components.d.ts +0 -23
- package/modern/themeAugmentation/index.d.ts +0 -4
- package/modern/themeAugmentation/index.js +0 -0
- package/modern/themeAugmentation/overrides.d.ts +0 -11
- package/modern/themeAugmentation/props.d.ts +0 -20
- package/modern/typeOverloads/index.d.ts +0 -1
- package/modern/typeOverloads/index.js +0 -1
- package/modern/typeOverloads/modules.d.ts +0 -33
- package/modern/typeOverloads/modules.js +0 -1
- package/tsconfig.build.tsbuildinfo +0 -1
- /package/{modern/FunnelChart/categoryAxis.types.js → esm/internals/plugins/useChartProExport/useChartProExport.types.js} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
2
|
+
import { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
2
3
|
import { UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
|
|
3
|
-
export type BarChartProPluginsSignatures = [UseChartZAxisSignature, UseChartCartesianAxisSignature<'bar'>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature];
|
|
4
|
+
export type BarChartProPluginsSignatures = [UseChartZAxisSignature, UseChartCartesianAxisSignature<'bar'>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature, UseChartProExportSignature];
|
|
4
5
|
export declare const BAR_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<BarChartProPluginsSignatures>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight } from '@mui/x-charts/internals';
|
|
2
|
+
import { useChartProExport } from "../internals/plugins/useChartProExport/index.js";
|
|
2
3
|
import { useChartProZoom } from "../internals/plugins/useChartProZoom/index.js";
|
|
3
|
-
export const BAR_CHART_PRO_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartProZoom];
|
|
4
|
+
export const BAR_CHART_PRO_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartProZoom, useChartProExport];
|
|
@@ -7,6 +7,7 @@ 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']>;
|
|
10
11
|
/**
|
|
11
12
|
* It sets up the data providers as well as the `<svg>` for the chart.
|
|
12
13
|
*
|
|
@@ -2,7 +2,7 @@ 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
4
|
import { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
-
export type ChartDataProviderProProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartDataProviderProps<TSeries, TSignatures> &
|
|
5
|
+
export type ChartDataProviderProProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartDataProviderProps<TSeries, TSignatures> & ChartProviderProps<TSeries, TSignatures>['pluginParams'];
|
|
6
6
|
/**
|
|
7
7
|
* Orchestrates the data providers for the chart components and hooks.
|
|
8
8
|
*
|
|
@@ -4,12 +4,13 @@ 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
|
|
7
|
+
import { ChartProvider } from '@mui/x-charts/internals';
|
|
8
|
+
import { ChartsLocalizationProvider } from '@mui/x-charts/ChartsLocalizationProvider';
|
|
8
9
|
import { useLicenseVerifier } from '@mui/x-license/useLicenseVerifier';
|
|
10
|
+
import { DEFAULT_PLUGINS } from "../internals/plugins/allPlugins.js";
|
|
9
11
|
import { useChartDataProviderProProps } from "./useChartDataProviderProProps.js";
|
|
10
|
-
import { getReleaseInfo } from "../internals/utils/releaseInfo.js";
|
|
11
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
const releaseInfo =
|
|
13
|
+
const releaseInfo = "MTc0NTQ0NTYwMDAwMA==";
|
|
13
14
|
const packageIdentifier = 'x-charts-pro';
|
|
14
15
|
/**
|
|
15
16
|
* Orchestrates the data providers for the chart components and hooks.
|
|
@@ -41,17 +42,20 @@ const packageIdentifier = 'x-charts-pro';
|
|
|
41
42
|
function ChartDataProviderPro(props) {
|
|
42
43
|
const {
|
|
43
44
|
children,
|
|
44
|
-
|
|
45
|
+
localeText,
|
|
45
46
|
chartProviderProps
|
|
46
|
-
} = useChartDataProviderProProps(props
|
|
47
|
+
} = useChartDataProviderProProps(_extends({}, props, {
|
|
48
|
+
plugins: props.plugins ?? DEFAULT_PLUGINS
|
|
49
|
+
}));
|
|
47
50
|
useLicenseVerifier(packageIdentifier, releaseInfo);
|
|
48
|
-
return /*#__PURE__*/
|
|
49
|
-
children: /*#__PURE__*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
return /*#__PURE__*/_jsxs(ChartProvider, _extends({}, chartProviderProps, {
|
|
52
|
+
children: [/*#__PURE__*/_jsx(ChartsLocalizationProvider, {
|
|
53
|
+
localeText: localeText,
|
|
54
|
+
children: children
|
|
55
|
+
}), /*#__PURE__*/_jsx(Watermark, {
|
|
56
|
+
packageName: packageIdentifier,
|
|
57
|
+
releaseInfo: releaseInfo
|
|
58
|
+
})]
|
|
55
59
|
}));
|
|
56
60
|
}
|
|
57
61
|
process.env.NODE_ENV !== "production" ? ChartDataProviderPro.propTypes = {
|
|
@@ -59,48 +63,58 @@ process.env.NODE_ENV !== "production" ? ChartDataProviderPro.propTypes = {
|
|
|
59
63
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
60
64
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
61
65
|
// ----------------------------------------------------------------------
|
|
62
|
-
apiRef: PropTypes.
|
|
63
|
-
|
|
66
|
+
apiRef: PropTypes.shape({
|
|
67
|
+
current: PropTypes.any
|
|
68
|
+
}),
|
|
64
69
|
/**
|
|
65
70
|
* Color palette used to colorize multiple series.
|
|
66
71
|
* @default rainbowSurgePalette
|
|
67
72
|
*/
|
|
68
|
-
colors: PropTypes.
|
|
73
|
+
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
69
74
|
/**
|
|
70
75
|
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
71
76
|
*/
|
|
72
|
-
dataset: PropTypes.
|
|
77
|
+
dataset: PropTypes.arrayOf(PropTypes.object),
|
|
73
78
|
/**
|
|
74
79
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
75
80
|
*/
|
|
76
|
-
height: PropTypes.
|
|
81
|
+
height: PropTypes.number,
|
|
77
82
|
/**
|
|
78
83
|
* This prop is used to help implement the accessibility logic.
|
|
79
84
|
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
80
85
|
*/
|
|
81
|
-
id: PropTypes.
|
|
86
|
+
id: PropTypes.string,
|
|
87
|
+
/**
|
|
88
|
+
* Localized text for chart components.
|
|
89
|
+
*/
|
|
90
|
+
localeText: PropTypes.object,
|
|
82
91
|
/**
|
|
83
92
|
* The margin between the SVG and the drawing area.
|
|
84
93
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
85
94
|
*
|
|
86
95
|
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
87
96
|
*/
|
|
88
|
-
margin: PropTypes.
|
|
97
|
+
margin: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
98
|
+
bottom: PropTypes.number,
|
|
99
|
+
left: PropTypes.number,
|
|
100
|
+
right: PropTypes.number,
|
|
101
|
+
top: PropTypes.number
|
|
102
|
+
})]),
|
|
89
103
|
/**
|
|
90
104
|
* The array of series to display.
|
|
91
105
|
* Each type of series has its own specificity.
|
|
92
106
|
* Please refer to the appropriate docs page to learn more about it.
|
|
93
107
|
*/
|
|
94
|
-
series: PropTypes.
|
|
108
|
+
series: PropTypes.arrayOf(PropTypes.object),
|
|
95
109
|
/**
|
|
96
110
|
* If `true`, animations are skipped.
|
|
97
111
|
* If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
|
|
98
112
|
*/
|
|
99
|
-
skipAnimation: PropTypes.
|
|
100
|
-
theme: PropTypes.
|
|
113
|
+
skipAnimation: PropTypes.bool,
|
|
114
|
+
theme: PropTypes.oneOf(['dark', 'light']),
|
|
101
115
|
/**
|
|
102
116
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
103
117
|
*/
|
|
104
|
-
width: PropTypes.
|
|
118
|
+
width: PropTypes.number
|
|
105
119
|
} : void 0;
|
|
106
120
|
export { ChartDataProviderPro };
|
|
@@ -3,6 +3,6 @@ import type { ChartDataProviderProProps } from './ChartDataProviderPro';
|
|
|
3
3
|
import type { AllPluginSignatures } from '../internals/plugins/allPlugins';
|
|
4
4
|
export declare const useChartDataProviderProProps: <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartDataProviderProProps<TSeries, TSignatures>) => {
|
|
5
5
|
children: import("react").ReactNode;
|
|
6
|
-
|
|
7
|
-
chartProviderProps:
|
|
6
|
+
localeText: Partial<import("@mui/x-charts/locales").ChartsLocaleText> | undefined;
|
|
7
|
+
chartProviderProps: import("@mui/x-charts/internals").ChartProviderProps<TSeries, TSignatures>;
|
|
8
8
|
};
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import { useChartDataProviderProps } from '@mui/x-charts/internals';
|
|
4
4
|
export const useChartDataProviderProProps = props => {
|
|
5
5
|
const {
|
|
6
|
-
animationProviderProps,
|
|
7
6
|
chartProviderProps,
|
|
7
|
+
localeText,
|
|
8
8
|
children
|
|
9
9
|
} = useChartDataProviderProps(props);
|
|
10
10
|
return {
|
|
11
11
|
children,
|
|
12
|
-
|
|
12
|
+
localeText,
|
|
13
13
|
chartProviderProps
|
|
14
14
|
};
|
|
15
15
|
};
|
|
@@ -63,6 +63,7 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
|
|
|
63
63
|
// ----------------------------------------------------------------------
|
|
64
64
|
apiRef: PropTypes.shape({
|
|
65
65
|
current: PropTypes.shape({
|
|
66
|
+
exportAsPrint: PropTypes.func.isRequired,
|
|
66
67
|
setZoomData: PropTypes.func.isRequired
|
|
67
68
|
})
|
|
68
69
|
}),
|
|
@@ -81,18 +82,87 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
|
|
|
81
82
|
*
|
|
82
83
|
* @default { position: 'none' }
|
|
83
84
|
*/
|
|
84
|
-
categoryAxis: PropTypes.shape({
|
|
85
|
+
categoryAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
85
86
|
categories: PropTypes.arrayOf(PropTypes.string),
|
|
86
87
|
disableLine: PropTypes.bool,
|
|
87
88
|
disableTicks: PropTypes.bool,
|
|
88
89
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
89
90
|
position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
|
|
90
|
-
scaleType: PropTypes.oneOf(['band'
|
|
91
|
+
scaleType: PropTypes.oneOf(['band']),
|
|
91
92
|
size: PropTypes.number,
|
|
92
93
|
tickLabelStyle: PropTypes.object,
|
|
93
94
|
tickSize: PropTypes.number
|
|
94
|
-
}),
|
|
95
|
-
|
|
95
|
+
}), PropTypes.shape({
|
|
96
|
+
categories: PropTypes.arrayOf(PropTypes.string),
|
|
97
|
+
disableLine: PropTypes.bool,
|
|
98
|
+
disableTicks: PropTypes.bool,
|
|
99
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
100
|
+
position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
|
|
101
|
+
scaleType: PropTypes.oneOf(['point']),
|
|
102
|
+
size: PropTypes.number,
|
|
103
|
+
tickLabelStyle: PropTypes.object,
|
|
104
|
+
tickSize: PropTypes.number
|
|
105
|
+
}), PropTypes.shape({
|
|
106
|
+
categories: PropTypes.arrayOf(PropTypes.string),
|
|
107
|
+
disableLine: PropTypes.bool,
|
|
108
|
+
disableTicks: PropTypes.bool,
|
|
109
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
110
|
+
position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
|
|
111
|
+
scaleType: PropTypes.oneOf(['log']),
|
|
112
|
+
size: PropTypes.number,
|
|
113
|
+
tickLabelStyle: PropTypes.object,
|
|
114
|
+
tickSize: PropTypes.number
|
|
115
|
+
}), PropTypes.shape({
|
|
116
|
+
categories: PropTypes.arrayOf(PropTypes.string),
|
|
117
|
+
disableLine: PropTypes.bool,
|
|
118
|
+
disableTicks: PropTypes.bool,
|
|
119
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
120
|
+
position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
|
|
121
|
+
scaleType: PropTypes.oneOf(['pow']),
|
|
122
|
+
size: PropTypes.number,
|
|
123
|
+
tickLabelStyle: PropTypes.object,
|
|
124
|
+
tickSize: PropTypes.number
|
|
125
|
+
}), PropTypes.shape({
|
|
126
|
+
categories: PropTypes.arrayOf(PropTypes.string),
|
|
127
|
+
disableLine: PropTypes.bool,
|
|
128
|
+
disableTicks: PropTypes.bool,
|
|
129
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
130
|
+
position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
|
|
131
|
+
scaleType: PropTypes.oneOf(['sqrt']),
|
|
132
|
+
size: PropTypes.number,
|
|
133
|
+
tickLabelStyle: PropTypes.object,
|
|
134
|
+
tickSize: PropTypes.number
|
|
135
|
+
}), PropTypes.shape({
|
|
136
|
+
categories: PropTypes.arrayOf(PropTypes.string),
|
|
137
|
+
disableLine: PropTypes.bool,
|
|
138
|
+
disableTicks: PropTypes.bool,
|
|
139
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
140
|
+
position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
|
|
141
|
+
scaleType: PropTypes.oneOf(['time']),
|
|
142
|
+
size: PropTypes.number,
|
|
143
|
+
tickLabelStyle: PropTypes.object,
|
|
144
|
+
tickSize: PropTypes.number
|
|
145
|
+
}), PropTypes.shape({
|
|
146
|
+
categories: PropTypes.arrayOf(PropTypes.string),
|
|
147
|
+
disableLine: PropTypes.bool,
|
|
148
|
+
disableTicks: PropTypes.bool,
|
|
149
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
150
|
+
position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
|
|
151
|
+
scaleType: PropTypes.oneOf(['utc']),
|
|
152
|
+
size: PropTypes.number,
|
|
153
|
+
tickLabelStyle: PropTypes.object,
|
|
154
|
+
tickSize: PropTypes.number
|
|
155
|
+
}), PropTypes.shape({
|
|
156
|
+
categories: PropTypes.arrayOf(PropTypes.string),
|
|
157
|
+
disableLine: PropTypes.bool,
|
|
158
|
+
disableTicks: PropTypes.bool,
|
|
159
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
160
|
+
position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
|
|
161
|
+
scaleType: PropTypes.oneOf(['linear']),
|
|
162
|
+
size: PropTypes.number,
|
|
163
|
+
tickLabelStyle: PropTypes.object,
|
|
164
|
+
tickSize: PropTypes.number
|
|
165
|
+
})]),
|
|
96
166
|
className: PropTypes.string,
|
|
97
167
|
/**
|
|
98
168
|
* Color palette used to colorize multiple series.
|
|
@@ -142,6 +212,10 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
|
|
|
142
212
|
* @default false
|
|
143
213
|
*/
|
|
144
214
|
loading: PropTypes.bool,
|
|
215
|
+
/**
|
|
216
|
+
* Localized text for chart components.
|
|
217
|
+
*/
|
|
218
|
+
localeText: PropTypes.object,
|
|
145
219
|
/**
|
|
146
220
|
* The margin between the SVG and the drawing area.
|
|
147
221
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxisConfig, ScaleName } from '@mui/x-charts/models';
|
|
2
2
|
import { MakeOptional } from '@mui/x-internals/types';
|
|
3
|
-
export type CategoryAxis = {
|
|
3
|
+
export type CategoryAxis<S extends ScaleName = ScaleName> = S extends ScaleName ? {
|
|
4
4
|
/**
|
|
5
5
|
* The categories to be displayed on the axis.
|
|
6
6
|
* The order of the categories is the order in which they are displayed.
|
|
@@ -21,4 +21,5 @@ export type CategoryAxis = {
|
|
|
21
21
|
* - If the axis is vertical, the size is the width of the axis.
|
|
22
22
|
*/
|
|
23
23
|
size?: number;
|
|
24
|
-
|
|
24
|
+
scaleType?: S;
|
|
25
|
+
} & MakeOptional<Pick<AxisConfig<S, any>, 'disableLine' | 'disableTicks' | 'tickLabelStyle' | 'tickSize' | 'id'>, 'id'> : never;
|
|
@@ -8,6 +8,11 @@ export interface FunnelSectionClasses {
|
|
|
8
8
|
faded: string;
|
|
9
9
|
/** Styles applied to the label element. */
|
|
10
10
|
label: string;
|
|
11
|
+
/**
|
|
12
|
+
* Styles applied to the root element for a specified series.
|
|
13
|
+
* Needs to be suffixed with the series ID: `.${funnelSectionClasses.series}-${seriesId}`.
|
|
14
|
+
*/
|
|
15
|
+
series: string;
|
|
11
16
|
}
|
|
12
17
|
export declare const useUtilityClasses: (props: FunnelSectionProps) => Record<"label" | "highlighted" | "faded" | "root", string>;
|
|
13
18
|
export declare const funnelSectionClasses: FunnelSectionClasses;
|
|
@@ -17,4 +17,4 @@ export const useUtilityClasses = props => {
|
|
|
17
17
|
};
|
|
18
18
|
return composeClasses(slots, getFunnelSectionUtilityClass, classes);
|
|
19
19
|
};
|
|
20
|
-
export const funnelSectionClasses = generateUtilityClasses('MuiFunnelSection', ['root', 'highlighted', 'faded', 'label']);
|
|
20
|
+
export const funnelSectionClasses = generateUtilityClasses('MuiFunnelSection', ['root', 'highlighted', 'faded', 'label', 'series']);
|
|
@@ -2,6 +2,7 @@ export { FunnelChart as Unstable_FunnelChart } from "./FunnelChart.js";
|
|
|
2
2
|
export type { FunnelChartProps } from './FunnelChart';
|
|
3
3
|
export * from "./FunnelPlot.js";
|
|
4
4
|
export * from "./funnel.types.js";
|
|
5
|
+
export * from "./categoryAxis.types.js";
|
|
5
6
|
export * from "./funnelSlots.types.js";
|
|
6
7
|
export { funnelSectionClasses } from "./funnelSectionClasses.js";
|
|
7
8
|
export type { FunnelSectionClasses } from './funnelSectionClasses';
|
package/esm/FunnelChart/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { FunnelChart as Unstable_FunnelChart } from "./FunnelChart.js";
|
|
2
2
|
export * from "./FunnelPlot.js";
|
|
3
3
|
export * from "./funnel.types.js";
|
|
4
|
+
export * from "./categoryAxis.types.js";
|
|
4
5
|
export * from "./funnelSlots.types.js";
|
|
5
6
|
export { funnelSectionClasses } from "./funnelSectionClasses.js";
|
|
@@ -29,7 +29,6 @@ function getCategoryAxisConfig(categoryAxis, series, isHorizontal, direction) {
|
|
|
29
29
|
// If the scaleType is not defined or is 'band', our job is simple.
|
|
30
30
|
if (!categoryAxis?.scaleType || categoryAxis.scaleType === 'band') {
|
|
31
31
|
return _extends({
|
|
32
|
-
scaleType: 'band',
|
|
33
32
|
categoryGapRatio: 0,
|
|
34
33
|
// Use the categories as the domain if they are defined.
|
|
35
34
|
data: categoryAxis?.categories ? categoryAxis.categories :
|
|
@@ -38,7 +37,9 @@ function getCategoryAxisConfig(categoryAxis, series, isHorizontal, direction) {
|
|
|
38
37
|
length: maxSeriesLength
|
|
39
38
|
}, (_, index) => index),
|
|
40
39
|
tickLabelPlacement: 'middle'
|
|
41
|
-
}, categoryValues
|
|
40
|
+
}, categoryValues, {
|
|
41
|
+
scaleType: 'band'
|
|
42
|
+
});
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
// If the scaleType is other than 'band', we have to do some magic.
|
|
@@ -47,7 +48,6 @@ function getCategoryAxisConfig(categoryAxis, series, isHorizontal, direction) {
|
|
|
47
48
|
// We add the total value of the series as the last tick value
|
|
48
49
|
maxSeriesValue.reduce((a, value) => a + value, 0)];
|
|
49
50
|
return _extends({
|
|
50
|
-
scaleType: categoryAxis.scaleType,
|
|
51
51
|
domainLimit: 'strict',
|
|
52
52
|
tickLabelPlacement: 'middle',
|
|
53
53
|
tickInterval: tickValues,
|
package/esm/Heatmap/Heatmap.js
CHANGED
|
@@ -128,7 +128,6 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
128
128
|
apiRef: PropTypes.shape({
|
|
129
129
|
current: PropTypes.object
|
|
130
130
|
}),
|
|
131
|
-
children: PropTypes.node,
|
|
132
131
|
className: PropTypes.string,
|
|
133
132
|
/**
|
|
134
133
|
* Color palette used to colorize multiple series.
|
|
@@ -168,6 +167,10 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
168
167
|
* @default false
|
|
169
168
|
*/
|
|
170
169
|
loading: PropTypes.bool,
|
|
170
|
+
/**
|
|
171
|
+
* Localized text for chart components.
|
|
172
|
+
*/
|
|
173
|
+
localeText: PropTypes.object,
|
|
171
174
|
/**
|
|
172
175
|
* The margin between the SVG and the drawing area.
|
|
173
176
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
@@ -199,7 +202,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
199
202
|
*/
|
|
200
203
|
series: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
201
204
|
/**
|
|
202
|
-
* The configuration helpers used to compute attributes according to the
|
|
205
|
+
* The configuration helpers used to compute attributes according to the series type.
|
|
203
206
|
* @ignore Unstable props for internal usage.
|
|
204
207
|
*/
|
|
205
208
|
seriesConfig: PropTypes.object,
|
|
@@ -13,7 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
const HeatmapCell = styled('rect', {
|
|
14
14
|
name: 'MuiHeatmap',
|
|
15
15
|
slot: 'Cell',
|
|
16
|
-
overridesResolver: (_, styles) => styles.arc
|
|
16
|
+
overridesResolver: (_, styles) => styles.arc // FIXME: Inconsistent naming with slot
|
|
17
17
|
})(({
|
|
18
18
|
ownerState
|
|
19
19
|
}) => ({
|
|
@@ -5,6 +5,11 @@ export interface HeatmapClasses {
|
|
|
5
5
|
highlighted: string;
|
|
6
6
|
/** Styles applied to the cell element if faded. */
|
|
7
7
|
faded: string;
|
|
8
|
+
/**
|
|
9
|
+
* Styles applied to the root element for a specified series.
|
|
10
|
+
* Needs to be suffixed with the series ID: `.${heatmapClasses.series}-${seriesId}`.
|
|
11
|
+
*/
|
|
12
|
+
series: string;
|
|
8
13
|
}
|
|
9
14
|
export type HeatmapClassKey = keyof HeatmapClasses;
|
|
10
15
|
export declare function getHeatmapUtilityClass(slot: string): string;
|
|
@@ -8,7 +8,7 @@ export function getHeatmapUtilityClass(slot) {
|
|
|
8
8
|
}
|
|
9
9
|
return generateUtilityClass('MuiHeatmap', slot);
|
|
10
10
|
}
|
|
11
|
-
export const heatmapClasses = _extends({}, generateUtilityClasses('MuiHeatmap', ['cell']), {
|
|
11
|
+
export const heatmapClasses = _extends({}, generateUtilityClasses('MuiHeatmap', ['cell', 'series']), {
|
|
12
12
|
highlighted: 'Charts-highlighted',
|
|
13
13
|
faded: 'Charts-faded'
|
|
14
14
|
});
|