@mui/x-charts-pro 8.0.0-beta.2 → 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 +788 -9
- package/CHANGELOG.md +423 -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.d.ts +1 -1
- package/Heatmap/Heatmap.js +4 -3
- package/Heatmap/{HeatmapTooltip.js → HeatmapTooltip/HeatmapTooltip.js} +30 -34
- package/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.d.ts +4 -0
- package/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.js +26 -0
- package/Heatmap/HeatmapTooltip/index.d.ts +1 -0
- package/Heatmap/HeatmapTooltip/index.js +16 -0
- package/Heatmap/heatmapClasses.d.ts +5 -0
- package/Heatmap/heatmapClasses.js +1 -1
- package/Heatmap/index.d.ts +1 -1
- package/LineChartPro/LineChartPro.js +788 -9
- package/ScatterChartPro/ScatterChartPro.js +788 -9
- package/esm/BarChartPro/BarChartPro.js +788 -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.d.ts +1 -1
- package/esm/Heatmap/Heatmap.js +4 -3
- package/{modern/Heatmap → esm/Heatmap/HeatmapTooltip}/HeatmapTooltip.js +30 -34
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.d.ts +4 -0
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.js +22 -0
- package/esm/Heatmap/HeatmapTooltip/index.d.ts +1 -0
- package/esm/Heatmap/HeatmapTooltip/index.js +1 -0
- package/esm/Heatmap/heatmapClasses.d.ts +5 -0
- package/esm/Heatmap/heatmapClasses.js +1 -1
- package/esm/Heatmap/index.d.ts +1 -1
- package/esm/Heatmap/index.js +1 -1
- package/esm/LineChartPro/LineChartPro.js +788 -9
- package/esm/ScatterChartPro/ScatterChartPro.js +788 -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 +9 -19
- package/esm/Heatmap/HeatmapTooltip.js +0 -288
- 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 -404
- 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 -387
- 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.d.ts +0 -16
- 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 -401
- 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 -395
- 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/Heatmap/{HeatmapTooltip.d.ts → HeatmapTooltip/HeatmapTooltip.d.ts} +0 -0
- /package/esm/Heatmap/{HeatmapTooltip.d.ts → HeatmapTooltip/HeatmapTooltip.d.ts} +0 -0
|
@@ -1,404 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["initialZoom", "zoomData", "onZoomChange", "apiRef"];
|
|
6
|
-
import * as React from 'react';
|
|
7
|
-
import PropTypes from 'prop-types';
|
|
8
|
-
import { useThemeProps } from '@mui/material/styles';
|
|
9
|
-
import { BarPlot } from '@mui/x-charts/BarChart';
|
|
10
|
-
import { ChartsGrid } from '@mui/x-charts/ChartsGrid';
|
|
11
|
-
import { ChartsOverlay } from '@mui/x-charts/ChartsOverlay';
|
|
12
|
-
import { ChartsAxis } from '@mui/x-charts/ChartsAxis';
|
|
13
|
-
import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
|
|
14
|
-
import { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight';
|
|
15
|
-
import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
|
|
16
|
-
import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
|
|
17
|
-
import { useBarChartProps, ChartsWrapper } from '@mui/x-charts/internals';
|
|
18
|
-
import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
|
|
19
|
-
import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
|
|
20
|
-
import { ChartDataProviderPro } from "../ChartDataProviderPro/index.js";
|
|
21
|
-
import { BAR_CHART_PRO_PLUGINS } from "./BarChartPro.plugins.js";
|
|
22
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
-
/**
|
|
24
|
-
* Demos:
|
|
25
|
-
*
|
|
26
|
-
* - [Bars](https://mui.com/x/react-charts/bars/)
|
|
27
|
-
* - [Bar demonstration](https://mui.com/x/react-charts/bar-demo/)
|
|
28
|
-
* - [Stacking](https://mui.com/x/react-charts/stacking/)
|
|
29
|
-
*
|
|
30
|
-
* API:
|
|
31
|
-
*
|
|
32
|
-
* - [BarChart API](https://mui.com/x/api/charts/bar-chart/)
|
|
33
|
-
*/
|
|
34
|
-
const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps, ref) {
|
|
35
|
-
const props = useThemeProps({
|
|
36
|
-
props: inProps,
|
|
37
|
-
name: 'MuiBarChartPro'
|
|
38
|
-
});
|
|
39
|
-
const {
|
|
40
|
-
initialZoom,
|
|
41
|
-
zoomData,
|
|
42
|
-
onZoomChange,
|
|
43
|
-
apiRef
|
|
44
|
-
} = props,
|
|
45
|
-
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
46
|
-
const {
|
|
47
|
-
chartsWrapperProps,
|
|
48
|
-
chartContainerProps,
|
|
49
|
-
barPlotProps,
|
|
50
|
-
gridProps,
|
|
51
|
-
clipPathProps,
|
|
52
|
-
clipPathGroupProps,
|
|
53
|
-
overlayProps,
|
|
54
|
-
chartsAxisProps,
|
|
55
|
-
axisHighlightProps,
|
|
56
|
-
legendProps,
|
|
57
|
-
children
|
|
58
|
-
} = useBarChartProps(other);
|
|
59
|
-
const {
|
|
60
|
-
chartDataProviderProProps,
|
|
61
|
-
chartsSurfaceProps
|
|
62
|
-
} = useChartContainerProProps(_extends({}, chartContainerProps, {
|
|
63
|
-
initialZoom,
|
|
64
|
-
zoomData,
|
|
65
|
-
onZoomChange,
|
|
66
|
-
apiRef,
|
|
67
|
-
plugins: BAR_CHART_PRO_PLUGINS
|
|
68
|
-
}), ref);
|
|
69
|
-
const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
|
|
70
|
-
return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
|
|
71
|
-
children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
|
|
72
|
-
children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
73
|
-
children: [/*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
74
|
-
children: [/*#__PURE__*/_jsx(BarPlot, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
|
|
75
|
-
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), children]
|
|
76
|
-
}))]
|
|
77
|
-
}))
|
|
78
|
-
}));
|
|
79
|
-
});
|
|
80
|
-
process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
81
|
-
// ----------------------------- Warning --------------------------------
|
|
82
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
83
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
84
|
-
// ----------------------------------------------------------------------
|
|
85
|
-
apiRef: PropTypes.shape({
|
|
86
|
-
current: PropTypes.shape({
|
|
87
|
-
setZoomData: PropTypes.func.isRequired
|
|
88
|
-
})
|
|
89
|
-
}),
|
|
90
|
-
/**
|
|
91
|
-
* The configuration of axes highlight.
|
|
92
|
-
* Default is set to 'band' in the bar direction.
|
|
93
|
-
* Depends on `layout` prop.
|
|
94
|
-
* @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details.
|
|
95
|
-
*/
|
|
96
|
-
axisHighlight: PropTypes.shape({
|
|
97
|
-
x: PropTypes.oneOf(['band', 'line', 'none']),
|
|
98
|
-
y: PropTypes.oneOf(['band', 'line', 'none'])
|
|
99
|
-
}),
|
|
100
|
-
/**
|
|
101
|
-
* If provided, the function will be used to format the label of the bar.
|
|
102
|
-
* It can be set to 'value' to display the current value.
|
|
103
|
-
* @param {BarItem} item The item to format.
|
|
104
|
-
* @param {BarLabelContext} context data about the bar.
|
|
105
|
-
* @returns {string} The formatted label.
|
|
106
|
-
*/
|
|
107
|
-
barLabel: PropTypes.oneOfType([PropTypes.oneOf(['value']), PropTypes.func]),
|
|
108
|
-
/**
|
|
109
|
-
* Defines the border radius of the bar element.
|
|
110
|
-
*/
|
|
111
|
-
borderRadius: PropTypes.number,
|
|
112
|
-
children: PropTypes.node,
|
|
113
|
-
className: PropTypes.string,
|
|
114
|
-
/**
|
|
115
|
-
* Color palette used to colorize multiple series.
|
|
116
|
-
* @default rainbowSurgePalette
|
|
117
|
-
*/
|
|
118
|
-
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
119
|
-
/**
|
|
120
|
-
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
121
|
-
*/
|
|
122
|
-
dataset: PropTypes.arrayOf(PropTypes.object),
|
|
123
|
-
desc: PropTypes.string,
|
|
124
|
-
/**
|
|
125
|
-
* If `true`, the charts will not listen to the mouse move event.
|
|
126
|
-
* It might break interactive features, but will improve performance.
|
|
127
|
-
* @default false
|
|
128
|
-
*/
|
|
129
|
-
disableAxisListener: PropTypes.bool,
|
|
130
|
-
/**
|
|
131
|
-
* Option to display a cartesian grid in the background.
|
|
132
|
-
*/
|
|
133
|
-
grid: PropTypes.shape({
|
|
134
|
-
horizontal: PropTypes.bool,
|
|
135
|
-
vertical: PropTypes.bool
|
|
136
|
-
}),
|
|
137
|
-
/**
|
|
138
|
-
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
139
|
-
*/
|
|
140
|
-
height: PropTypes.number,
|
|
141
|
-
/**
|
|
142
|
-
* If `true`, the legend is not rendered.
|
|
143
|
-
*/
|
|
144
|
-
hideLegend: PropTypes.bool,
|
|
145
|
-
/**
|
|
146
|
-
* The highlighted item.
|
|
147
|
-
* Used when the highlight is controlled.
|
|
148
|
-
*/
|
|
149
|
-
highlightedItem: PropTypes.shape({
|
|
150
|
-
dataIndex: PropTypes.number,
|
|
151
|
-
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
|
|
152
|
-
}),
|
|
153
|
-
/**
|
|
154
|
-
* This prop is used to help implement the accessibility logic.
|
|
155
|
-
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
156
|
-
*/
|
|
157
|
-
id: PropTypes.string,
|
|
158
|
-
/**
|
|
159
|
-
* The list of zoom data related to each axis.
|
|
160
|
-
* Used to initialize the zoom in a specific configuration without controlling it.
|
|
161
|
-
*/
|
|
162
|
-
initialZoom: PropTypes.arrayOf(PropTypes.shape({
|
|
163
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
164
|
-
end: PropTypes.number.isRequired,
|
|
165
|
-
start: PropTypes.number.isRequired
|
|
166
|
-
})),
|
|
167
|
-
/**
|
|
168
|
-
* The direction of the bar elements.
|
|
169
|
-
* @default 'vertical'
|
|
170
|
-
*/
|
|
171
|
-
layout: PropTypes.oneOf(['horizontal', 'vertical']),
|
|
172
|
-
/**
|
|
173
|
-
* If `true`, a loading overlay is displayed.
|
|
174
|
-
* @default false
|
|
175
|
-
*/
|
|
176
|
-
loading: PropTypes.bool,
|
|
177
|
-
/**
|
|
178
|
-
* The margin between the SVG and the drawing area.
|
|
179
|
-
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
180
|
-
*
|
|
181
|
-
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
182
|
-
*/
|
|
183
|
-
margin: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
184
|
-
bottom: PropTypes.number,
|
|
185
|
-
left: PropTypes.number,
|
|
186
|
-
right: PropTypes.number,
|
|
187
|
-
top: PropTypes.number
|
|
188
|
-
})]),
|
|
189
|
-
/**
|
|
190
|
-
* The function called for onClick events.
|
|
191
|
-
* The second argument contains information about all line/bar elements at the current mouse position.
|
|
192
|
-
* @param {MouseEvent} event The mouse event recorded on the `<svg/>` element.
|
|
193
|
-
* @param {null | AxisData} data The data about the clicked axis and items associated with it.
|
|
194
|
-
*/
|
|
195
|
-
onAxisClick: PropTypes.func,
|
|
196
|
-
/**
|
|
197
|
-
* The callback fired when the highlighted item changes.
|
|
198
|
-
*
|
|
199
|
-
* @param {HighlightItemData | null} highlightedItem The newly highlighted item.
|
|
200
|
-
*/
|
|
201
|
-
onHighlightChange: PropTypes.func,
|
|
202
|
-
/**
|
|
203
|
-
* Callback fired when a bar item is clicked.
|
|
204
|
-
* @param {React.MouseEvent<SVGElement, MouseEvent>} event The event source of the callback.
|
|
205
|
-
* @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
|
|
206
|
-
*/
|
|
207
|
-
onItemClick: PropTypes.func,
|
|
208
|
-
/**
|
|
209
|
-
* Callback fired when the zoom has changed.
|
|
210
|
-
*
|
|
211
|
-
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
212
|
-
*/
|
|
213
|
-
onZoomChange: PropTypes.func,
|
|
214
|
-
/**
|
|
215
|
-
* The series to display in the bar chart.
|
|
216
|
-
* An array of [[BarSeriesType]] objects.
|
|
217
|
-
*/
|
|
218
|
-
series: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
219
|
-
/**
|
|
220
|
-
* If `true`, animations are skipped.
|
|
221
|
-
* If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
|
|
222
|
-
*/
|
|
223
|
-
skipAnimation: PropTypes.bool,
|
|
224
|
-
/**
|
|
225
|
-
* The props used for each component slot.
|
|
226
|
-
* @default {}
|
|
227
|
-
*/
|
|
228
|
-
slotProps: PropTypes.object,
|
|
229
|
-
/**
|
|
230
|
-
* Overridable component slots.
|
|
231
|
-
* @default {}
|
|
232
|
-
*/
|
|
233
|
-
slots: PropTypes.object,
|
|
234
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
235
|
-
theme: PropTypes.oneOf(['dark', 'light']),
|
|
236
|
-
title: PropTypes.string,
|
|
237
|
-
/**
|
|
238
|
-
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
239
|
-
*/
|
|
240
|
-
width: PropTypes.number,
|
|
241
|
-
/**
|
|
242
|
-
* The configuration of the x-axes.
|
|
243
|
-
* If not provided, a default axis config is used.
|
|
244
|
-
* An array of [[AxisConfig]] objects.
|
|
245
|
-
*/
|
|
246
|
-
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
247
|
-
axis: PropTypes.oneOf(['x']),
|
|
248
|
-
classes: PropTypes.object,
|
|
249
|
-
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
250
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
251
|
-
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
252
|
-
unknownColor: PropTypes.string,
|
|
253
|
-
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
254
|
-
}), PropTypes.shape({
|
|
255
|
-
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
256
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
257
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
258
|
-
type: PropTypes.oneOf(['continuous']).isRequired
|
|
259
|
-
}), PropTypes.shape({
|
|
260
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
261
|
-
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
262
|
-
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
263
|
-
})]),
|
|
264
|
-
data: PropTypes.array,
|
|
265
|
-
dataKey: PropTypes.string,
|
|
266
|
-
disableLine: PropTypes.bool,
|
|
267
|
-
disableTicks: PropTypes.bool,
|
|
268
|
-
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
269
|
-
fill: PropTypes.string,
|
|
270
|
-
height: PropTypes.number,
|
|
271
|
-
hideTooltip: PropTypes.bool,
|
|
272
|
-
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
273
|
-
label: PropTypes.string,
|
|
274
|
-
labelStyle: PropTypes.object,
|
|
275
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
276
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
277
|
-
offset: PropTypes.number,
|
|
278
|
-
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
279
|
-
reverse: PropTypes.bool,
|
|
280
|
-
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
281
|
-
slotProps: PropTypes.object,
|
|
282
|
-
slots: PropTypes.object,
|
|
283
|
-
stroke: PropTypes.string,
|
|
284
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
285
|
-
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
286
|
-
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
287
|
-
tickLabelMinGap: PropTypes.number,
|
|
288
|
-
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
289
|
-
tickLabelStyle: PropTypes.object,
|
|
290
|
-
tickMaxStep: PropTypes.number,
|
|
291
|
-
tickMinStep: PropTypes.number,
|
|
292
|
-
tickNumber: PropTypes.number,
|
|
293
|
-
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
294
|
-
tickSize: PropTypes.number,
|
|
295
|
-
valueFormatter: PropTypes.func,
|
|
296
|
-
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
297
|
-
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
298
|
-
maxEnd: PropTypes.number,
|
|
299
|
-
maxSpan: PropTypes.number,
|
|
300
|
-
minSpan: PropTypes.number,
|
|
301
|
-
minStart: PropTypes.number,
|
|
302
|
-
panning: PropTypes.bool,
|
|
303
|
-
step: PropTypes.number
|
|
304
|
-
}), PropTypes.bool])
|
|
305
|
-
})),
|
|
306
|
-
/**
|
|
307
|
-
* The configuration of the y-axes.
|
|
308
|
-
* If not provided, a default axis config is used.
|
|
309
|
-
* An array of [[AxisConfig]] objects.
|
|
310
|
-
*/
|
|
311
|
-
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
312
|
-
axis: PropTypes.oneOf(['y']),
|
|
313
|
-
classes: PropTypes.object,
|
|
314
|
-
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
315
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
316
|
-
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
317
|
-
unknownColor: PropTypes.string,
|
|
318
|
-
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
319
|
-
}), PropTypes.shape({
|
|
320
|
-
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
321
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
322
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
323
|
-
type: PropTypes.oneOf(['continuous']).isRequired
|
|
324
|
-
}), PropTypes.shape({
|
|
325
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
326
|
-
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
327
|
-
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
328
|
-
})]),
|
|
329
|
-
data: PropTypes.array,
|
|
330
|
-
dataKey: PropTypes.string,
|
|
331
|
-
disableLine: PropTypes.bool,
|
|
332
|
-
disableTicks: PropTypes.bool,
|
|
333
|
-
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
334
|
-
fill: PropTypes.string,
|
|
335
|
-
hideTooltip: PropTypes.bool,
|
|
336
|
-
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
337
|
-
label: PropTypes.string,
|
|
338
|
-
labelStyle: PropTypes.object,
|
|
339
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
340
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
341
|
-
offset: PropTypes.number,
|
|
342
|
-
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
343
|
-
reverse: PropTypes.bool,
|
|
344
|
-
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
345
|
-
slotProps: PropTypes.object,
|
|
346
|
-
slots: PropTypes.object,
|
|
347
|
-
stroke: PropTypes.string,
|
|
348
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
349
|
-
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
350
|
-
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
351
|
-
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
352
|
-
tickLabelStyle: PropTypes.object,
|
|
353
|
-
tickMaxStep: PropTypes.number,
|
|
354
|
-
tickMinStep: PropTypes.number,
|
|
355
|
-
tickNumber: PropTypes.number,
|
|
356
|
-
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
357
|
-
tickSize: PropTypes.number,
|
|
358
|
-
valueFormatter: PropTypes.func,
|
|
359
|
-
width: PropTypes.number,
|
|
360
|
-
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
361
|
-
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
362
|
-
maxEnd: PropTypes.number,
|
|
363
|
-
maxSpan: PropTypes.number,
|
|
364
|
-
minSpan: PropTypes.number,
|
|
365
|
-
minStart: PropTypes.number,
|
|
366
|
-
panning: PropTypes.bool,
|
|
367
|
-
step: PropTypes.number
|
|
368
|
-
}), PropTypes.bool])
|
|
369
|
-
})),
|
|
370
|
-
/**
|
|
371
|
-
* The configuration of the z-axes.
|
|
372
|
-
*/
|
|
373
|
-
zAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
374
|
-
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
375
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
376
|
-
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
377
|
-
unknownColor: PropTypes.string,
|
|
378
|
-
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
379
|
-
}), PropTypes.shape({
|
|
380
|
-
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
381
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
382
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
383
|
-
type: PropTypes.oneOf(['continuous']).isRequired
|
|
384
|
-
}), PropTypes.shape({
|
|
385
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
386
|
-
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
387
|
-
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
388
|
-
})]),
|
|
389
|
-
data: PropTypes.array,
|
|
390
|
-
dataKey: PropTypes.string,
|
|
391
|
-
id: PropTypes.string,
|
|
392
|
-
max: PropTypes.number,
|
|
393
|
-
min: PropTypes.number
|
|
394
|
-
})),
|
|
395
|
-
/**
|
|
396
|
-
* The list of zoom data related to each axis.
|
|
397
|
-
*/
|
|
398
|
-
zoomData: PropTypes.arrayOf(PropTypes.shape({
|
|
399
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
400
|
-
end: PropTypes.number.isRequired,
|
|
401
|
-
start: PropTypes.number.isRequired
|
|
402
|
-
}))
|
|
403
|
-
} : void 0;
|
|
404
|
-
export { BarChartPro };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
2
|
-
import { UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
|
|
3
|
-
export type BarChartProPluginsSignatures = [UseChartZAxisSignature, UseChartCartesianAxisSignature<'bar'>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature];
|
|
4
|
-
export declare const BAR_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<BarChartProPluginsSignatures>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight } from '@mui/x-charts/internals';
|
|
2
|
-
import { useChartProZoom } from "../internals/plugins/useChartProZoom/index.js";
|
|
3
|
-
export const BAR_CHART_PRO_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartProZoom];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./BarChartPro.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./BarChartPro.js";
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ChartsSurfaceProps } from '@mui/x-charts/ChartsSurface';
|
|
3
|
-
import { ChartAnyPluginSignature, ChartSeriesType } from '@mui/x-charts/internals';
|
|
4
|
-
import { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
-
import { ChartDataProviderProProps } from "../ChartDataProviderPro/index.js";
|
|
6
|
-
export type ChartContainerProProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartDataProviderProProps<TSeries, TSignatures> & ChartsSurfaceProps;
|
|
7
|
-
type ChartContainerProComponent = <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartContainerProProps<TSeries, TSignatures> & {
|
|
8
|
-
ref?: React.ForwardedRef<SVGSVGElement>;
|
|
9
|
-
}) => React.JSX.Element;
|
|
10
|
-
/**
|
|
11
|
-
* It sets up the data providers as well as the `<svg>` for the chart.
|
|
12
|
-
*
|
|
13
|
-
* This is a combination of both the `ChartDataProviderPro` and `ChartsSurface` components.
|
|
14
|
-
*
|
|
15
|
-
* Demos:
|
|
16
|
-
*
|
|
17
|
-
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
18
|
-
*
|
|
19
|
-
* API:
|
|
20
|
-
*
|
|
21
|
-
* - [ChartContainer API](https://mui.com/x/api/charts/chart-container/)
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```jsx
|
|
25
|
-
* <ChartContainerPro
|
|
26
|
-
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
27
|
-
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
28
|
-
* >
|
|
29
|
-
* <BarPlot />
|
|
30
|
-
* <ChartsXAxis axisId="x-axis" />
|
|
31
|
-
* </ChartContainerPro>
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
declare const ChartContainerPro: ChartContainerProComponent;
|
|
35
|
-
export { ChartContainerPro };
|