@mui/x-charts-pro 8.0.0-beta.3 → 8.0.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 +786 -9
- package/CHANGELOG.md +282 -96
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
- package/ChartDataProviderPro/ChartDataProviderPro.js +27 -22
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -2
- package/ChartDataProviderPro/useChartDataProviderProProps.js +0 -2
- package/FunnelChart/FunnelChart.js +73 -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 +1 -2
- package/Heatmap/heatmapClasses.d.ts +5 -0
- package/Heatmap/heatmapClasses.js +1 -1
- package/LineChartPro/LineChartPro.js +786 -9
- package/ScatterChartPro/ScatterChartPro.js +786 -9
- package/esm/BarChartPro/BarChartPro.js +786 -9
- package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +28 -23
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -2
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.js +0 -2
- package/esm/FunnelChart/FunnelChart.js +73 -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 +1 -2
- package/esm/Heatmap/heatmapClasses.d.ts +5 -0
- package/esm/Heatmap/heatmapClasses.js +1 -1
- package/esm/LineChartPro/LineChartPro.js +786 -9
- package/esm/ScatterChartPro/ScatterChartPro.js +786 -9
- package/esm/index.js +1 -1
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +28 -35
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +7 -7
- package/index.js +1 -1
- package/internals/plugins/useChartProZoom/useChartProZoom.js +28 -34
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +7 -7
- 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/categoryAxis.types.js +0 -1
- 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
|
@@ -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,12 @@ 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
8
|
import { useLicenseVerifier } from '@mui/x-license/useLicenseVerifier';
|
|
9
|
+
import { DEFAULT_PLUGINS } from "../internals/plugins/allPlugins.js";
|
|
9
10
|
import { useChartDataProviderProProps } from "./useChartDataProviderProProps.js";
|
|
10
|
-
import { getReleaseInfo } from "../internals/utils/releaseInfo.js";
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
const releaseInfo =
|
|
12
|
+
const releaseInfo = "MTc0NDg0MDgwMDAwMA==";
|
|
13
13
|
const packageIdentifier = 'x-charts-pro';
|
|
14
14
|
/**
|
|
15
15
|
* Orchestrates the data providers for the chart components and hooks.
|
|
@@ -41,17 +41,16 @@ const packageIdentifier = 'x-charts-pro';
|
|
|
41
41
|
function ChartDataProviderPro(props) {
|
|
42
42
|
const {
|
|
43
43
|
children,
|
|
44
|
-
animationProviderProps,
|
|
45
44
|
chartProviderProps
|
|
46
|
-
} = useChartDataProviderProProps(props
|
|
45
|
+
} = useChartDataProviderProProps(_extends({}, props, {
|
|
46
|
+
plugins: props.plugins ?? DEFAULT_PLUGINS
|
|
47
|
+
}));
|
|
47
48
|
useLicenseVerifier(packageIdentifier, releaseInfo);
|
|
48
|
-
return /*#__PURE__*/
|
|
49
|
-
children: /*#__PURE__*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
})]
|
|
54
|
-
}))
|
|
49
|
+
return /*#__PURE__*/_jsxs(ChartProvider, _extends({}, chartProviderProps, {
|
|
50
|
+
children: [children, /*#__PURE__*/_jsx(Watermark, {
|
|
51
|
+
packageName: packageIdentifier,
|
|
52
|
+
releaseInfo: releaseInfo
|
|
53
|
+
})]
|
|
55
54
|
}));
|
|
56
55
|
}
|
|
57
56
|
process.env.NODE_ENV !== "production" ? ChartDataProviderPro.propTypes = {
|
|
@@ -59,48 +58,54 @@ process.env.NODE_ENV !== "production" ? ChartDataProviderPro.propTypes = {
|
|
|
59
58
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
60
59
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
61
60
|
// ----------------------------------------------------------------------
|
|
62
|
-
apiRef: PropTypes.
|
|
63
|
-
|
|
61
|
+
apiRef: PropTypes.shape({
|
|
62
|
+
current: PropTypes.any
|
|
63
|
+
}),
|
|
64
64
|
/**
|
|
65
65
|
* Color palette used to colorize multiple series.
|
|
66
66
|
* @default rainbowSurgePalette
|
|
67
67
|
*/
|
|
68
|
-
colors: PropTypes.
|
|
68
|
+
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
69
69
|
/**
|
|
70
70
|
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
71
71
|
*/
|
|
72
|
-
dataset: PropTypes.
|
|
72
|
+
dataset: PropTypes.arrayOf(PropTypes.object),
|
|
73
73
|
/**
|
|
74
74
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
75
75
|
*/
|
|
76
|
-
height: PropTypes.
|
|
76
|
+
height: PropTypes.number,
|
|
77
77
|
/**
|
|
78
78
|
* This prop is used to help implement the accessibility logic.
|
|
79
79
|
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
80
80
|
*/
|
|
81
|
-
id: PropTypes.
|
|
81
|
+
id: PropTypes.string,
|
|
82
82
|
/**
|
|
83
83
|
* The margin between the SVG and the drawing area.
|
|
84
84
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
85
85
|
*
|
|
86
86
|
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
87
87
|
*/
|
|
88
|
-
margin: PropTypes.
|
|
88
|
+
margin: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
89
|
+
bottom: PropTypes.number,
|
|
90
|
+
left: PropTypes.number,
|
|
91
|
+
right: PropTypes.number,
|
|
92
|
+
top: PropTypes.number
|
|
93
|
+
})]),
|
|
89
94
|
/**
|
|
90
95
|
* The array of series to display.
|
|
91
96
|
* Each type of series has its own specificity.
|
|
92
97
|
* Please refer to the appropriate docs page to learn more about it.
|
|
93
98
|
*/
|
|
94
|
-
series: PropTypes.
|
|
99
|
+
series: PropTypes.arrayOf(PropTypes.object),
|
|
95
100
|
/**
|
|
96
101
|
* If `true`, animations are skipped.
|
|
97
102
|
* If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
|
|
98
103
|
*/
|
|
99
|
-
skipAnimation: PropTypes.
|
|
100
|
-
theme: PropTypes.
|
|
104
|
+
skipAnimation: PropTypes.bool,
|
|
105
|
+
theme: PropTypes.oneOf(['dark', 'light']),
|
|
101
106
|
/**
|
|
102
107
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
103
108
|
*/
|
|
104
|
-
width: PropTypes.
|
|
109
|
+
width: PropTypes.number
|
|
105
110
|
} : void 0;
|
|
106
111
|
export { ChartDataProviderPro };
|
|
@@ -3,6 +3,5 @@ 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: Omit<import("@mui/x-charts/internals").ChartProviderProps<TSeries, TSignatures>, "children">;
|
|
6
|
+
chartProviderProps: import("@mui/x-charts/internals").ChartProviderProps<TSeries, TSignatures>;
|
|
8
7
|
};
|
|
@@ -3,13 +3,11 @@
|
|
|
3
3
|
import { useChartDataProviderProps } from '@mui/x-charts/internals';
|
|
4
4
|
export const useChartDataProviderProProps = props => {
|
|
5
5
|
const {
|
|
6
|
-
animationProviderProps,
|
|
7
6
|
chartProviderProps,
|
|
8
7
|
children
|
|
9
8
|
} = useChartDataProviderProps(props);
|
|
10
9
|
return {
|
|
11
10
|
children,
|
|
12
|
-
animationProviderProps,
|
|
13
11
|
chartProviderProps
|
|
14
12
|
};
|
|
15
13
|
};
|
|
@@ -81,18 +81,87 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
|
|
|
81
81
|
*
|
|
82
82
|
* @default { position: 'none' }
|
|
83
83
|
*/
|
|
84
|
-
categoryAxis: PropTypes.shape({
|
|
84
|
+
categoryAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
85
85
|
categories: PropTypes.arrayOf(PropTypes.string),
|
|
86
86
|
disableLine: PropTypes.bool,
|
|
87
87
|
disableTicks: PropTypes.bool,
|
|
88
88
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
89
89
|
position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
|
|
90
|
-
scaleType: PropTypes.oneOf(['band'
|
|
90
|
+
scaleType: PropTypes.oneOf(['band']),
|
|
91
91
|
size: PropTypes.number,
|
|
92
92
|
tickLabelStyle: PropTypes.object,
|
|
93
93
|
tickSize: PropTypes.number
|
|
94
|
-
}),
|
|
95
|
-
|
|
94
|
+
}), PropTypes.shape({
|
|
95
|
+
categories: PropTypes.arrayOf(PropTypes.string),
|
|
96
|
+
disableLine: PropTypes.bool,
|
|
97
|
+
disableTicks: PropTypes.bool,
|
|
98
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
99
|
+
position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
|
|
100
|
+
scaleType: PropTypes.oneOf(['point']),
|
|
101
|
+
size: PropTypes.number,
|
|
102
|
+
tickLabelStyle: PropTypes.object,
|
|
103
|
+
tickSize: PropTypes.number
|
|
104
|
+
}), PropTypes.shape({
|
|
105
|
+
categories: PropTypes.arrayOf(PropTypes.string),
|
|
106
|
+
disableLine: PropTypes.bool,
|
|
107
|
+
disableTicks: PropTypes.bool,
|
|
108
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
109
|
+
position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
|
|
110
|
+
scaleType: PropTypes.oneOf(['log']),
|
|
111
|
+
size: PropTypes.number,
|
|
112
|
+
tickLabelStyle: PropTypes.object,
|
|
113
|
+
tickSize: PropTypes.number
|
|
114
|
+
}), PropTypes.shape({
|
|
115
|
+
categories: PropTypes.arrayOf(PropTypes.string),
|
|
116
|
+
disableLine: PropTypes.bool,
|
|
117
|
+
disableTicks: PropTypes.bool,
|
|
118
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
119
|
+
position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
|
|
120
|
+
scaleType: PropTypes.oneOf(['pow']),
|
|
121
|
+
size: PropTypes.number,
|
|
122
|
+
tickLabelStyle: PropTypes.object,
|
|
123
|
+
tickSize: PropTypes.number
|
|
124
|
+
}), PropTypes.shape({
|
|
125
|
+
categories: PropTypes.arrayOf(PropTypes.string),
|
|
126
|
+
disableLine: PropTypes.bool,
|
|
127
|
+
disableTicks: PropTypes.bool,
|
|
128
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
129
|
+
position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
|
|
130
|
+
scaleType: PropTypes.oneOf(['sqrt']),
|
|
131
|
+
size: PropTypes.number,
|
|
132
|
+
tickLabelStyle: PropTypes.object,
|
|
133
|
+
tickSize: PropTypes.number
|
|
134
|
+
}), PropTypes.shape({
|
|
135
|
+
categories: PropTypes.arrayOf(PropTypes.string),
|
|
136
|
+
disableLine: PropTypes.bool,
|
|
137
|
+
disableTicks: PropTypes.bool,
|
|
138
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
139
|
+
position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
|
|
140
|
+
scaleType: PropTypes.oneOf(['time']),
|
|
141
|
+
size: PropTypes.number,
|
|
142
|
+
tickLabelStyle: PropTypes.object,
|
|
143
|
+
tickSize: PropTypes.number
|
|
144
|
+
}), PropTypes.shape({
|
|
145
|
+
categories: PropTypes.arrayOf(PropTypes.string),
|
|
146
|
+
disableLine: PropTypes.bool,
|
|
147
|
+
disableTicks: PropTypes.bool,
|
|
148
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
149
|
+
position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
|
|
150
|
+
scaleType: PropTypes.oneOf(['utc']),
|
|
151
|
+
size: PropTypes.number,
|
|
152
|
+
tickLabelStyle: PropTypes.object,
|
|
153
|
+
tickSize: PropTypes.number
|
|
154
|
+
}), PropTypes.shape({
|
|
155
|
+
categories: PropTypes.arrayOf(PropTypes.string),
|
|
156
|
+
disableLine: PropTypes.bool,
|
|
157
|
+
disableTicks: PropTypes.bool,
|
|
158
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
159
|
+
position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
|
|
160
|
+
scaleType: PropTypes.oneOf(['linear']),
|
|
161
|
+
size: PropTypes.number,
|
|
162
|
+
tickLabelStyle: PropTypes.object,
|
|
163
|
+
tickSize: PropTypes.number
|
|
164
|
+
})]),
|
|
96
165
|
className: PropTypes.string,
|
|
97
166
|
/**
|
|
98
167
|
* Color palette used to colorize multiple series.
|
|
@@ -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.
|
|
@@ -199,7 +198,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
199
198
|
*/
|
|
200
199
|
series: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
201
200
|
/**
|
|
202
|
-
* The configuration helpers used to compute attributes according to the
|
|
201
|
+
* The configuration helpers used to compute attributes according to the series type.
|
|
203
202
|
* @ignore Unstable props for internal usage.
|
|
204
203
|
*/
|
|
205
204
|
seriesConfig: PropTypes.object,
|
|
@@ -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
|
});
|