@mui/x-charts-pro 8.0.0-alpha.10 → 8.0.0-alpha.11
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 +5 -5
- package/BarChartPro/BarChartPro.plugins.d.ts +10 -0
- package/BarChartPro/BarChartPro.plugins.js +3 -0
- package/CHANGELOG.md +107 -2
- package/ChartContainerPro/ChartContainerPro.d.ts +3 -4
- package/ChartContainerPro/useChartContainerProProps.d.ts +4 -4
- package/ChartContainerPro/useChartContainerProProps.js +11 -11
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
- package/ChartDataProviderPro/ChartDataProviderPro.js +11 -195
- package/Heatmap/Heatmap.d.ts +1 -2
- package/Heatmap/Heatmap.js +5 -5
- package/Heatmap/Heatmap.plugins.d.ts +8 -0
- package/Heatmap/Heatmap.plugins.js +2 -0
- package/LineChartPro/LineChartPro.js +5 -5
- package/LineChartPro/LineChartPro.plugins.d.ts +10 -0
- package/LineChartPro/LineChartPro.plugins.js +3 -0
- package/ScatterChartPro/ScatterChartPro.js +11 -2
- package/ScatterChartPro/ScatterChartPro.plugins.d.ts +10 -0
- package/ScatterChartPro/ScatterChartPro.plugins.js +3 -0
- package/index.d.ts +0 -1
- package/index.js +1 -2
- package/internals/plugins/allPlugins.d.ts +1 -1
- package/internals/utils/releaseInfo.js +1 -1
- package/modern/BarChartPro/BarChartPro.js +5 -5
- package/modern/BarChartPro/BarChartPro.plugins.js +3 -0
- package/modern/ChartContainerPro/useChartContainerProProps.js +11 -11
- package/modern/ChartDataProviderPro/ChartDataProviderPro.js +11 -195
- package/modern/Heatmap/Heatmap.js +5 -5
- package/modern/Heatmap/Heatmap.plugins.js +2 -0
- package/modern/LineChartPro/LineChartPro.js +5 -5
- package/modern/LineChartPro/LineChartPro.plugins.js +3 -0
- package/modern/ScatterChartPro/ScatterChartPro.js +11 -2
- package/modern/ScatterChartPro/ScatterChartPro.plugins.js +3 -0
- package/modern/index.js +1 -2
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/node/BarChartPro/BarChartPro.js +5 -5
- package/node/BarChartPro/BarChartPro.plugins.js +9 -0
- package/node/ChartContainerPro/useChartContainerProProps.js +11 -11
- package/node/ChartDataProviderPro/ChartDataProviderPro.js +11 -195
- package/node/Heatmap/Heatmap.js +5 -5
- package/node/Heatmap/Heatmap.plugins.js +8 -0
- package/node/LineChartPro/LineChartPro.js +5 -5
- package/node/LineChartPro/LineChartPro.plugins.js +9 -0
- package/node/ScatterChartPro/ScatterChartPro.js +11 -2
- package/node/ScatterChartPro/ScatterChartPro.plugins.js +9 -0
- package/node/index.js +1 -12
- package/node/internals/utils/releaseInfo.js +1 -1
- package/package.json +5 -5
|
@@ -7,7 +7,6 @@ import * as React from 'react';
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { useThemeProps } from '@mui/material/styles';
|
|
9
9
|
import { BarPlot } from '@mui/x-charts/BarChart';
|
|
10
|
-
import { ChartsOnAxisClickHandler } from '@mui/x-charts/ChartsOnAxisClickHandler';
|
|
11
10
|
import { ChartsGrid } from '@mui/x-charts/ChartsGrid';
|
|
12
11
|
import { ChartsOverlay } from '@mui/x-charts/ChartsOverlay';
|
|
13
12
|
import { ChartsAxis } from '@mui/x-charts/ChartsAxis';
|
|
@@ -20,6 +19,7 @@ import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
|
|
|
20
19
|
import { useIsZoomInteracting } from "../hooks/zoom/index.js";
|
|
21
20
|
import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
|
|
22
21
|
import { ChartDataProviderPro } from "../ChartDataProviderPro/index.js";
|
|
22
|
+
import { BAR_CHART_PRO_PLUGINS } from "./BarChartPro.plugins.js";
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
function BarChartPlotZoom(props) {
|
|
25
25
|
const isInteracting = useIsZoomInteracting();
|
|
@@ -92,7 +92,6 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
|
|
|
92
92
|
chartsWrapperProps,
|
|
93
93
|
chartContainerProps,
|
|
94
94
|
barPlotProps,
|
|
95
|
-
axisClickHandlerProps,
|
|
96
95
|
gridProps,
|
|
97
96
|
clipPathProps,
|
|
98
97
|
clipPathGroupProps,
|
|
@@ -108,13 +107,14 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
|
|
|
108
107
|
} = useChartContainerProProps(_extends({}, chartContainerProps, {
|
|
109
108
|
initialZoom,
|
|
110
109
|
onZoomChange,
|
|
111
|
-
apiRef
|
|
110
|
+
apiRef,
|
|
111
|
+
plugins: BAR_CHART_PRO_PLUGINS
|
|
112
112
|
}), ref);
|
|
113
113
|
const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
|
|
114
114
|
return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
|
|
115
115
|
children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
|
|
116
116
|
children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
117
|
-
children: [
|
|
117
|
+
children: [/*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
118
118
|
children: [/*#__PURE__*/_jsx(BarChartPlotZoom, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
|
|
119
119
|
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), children]
|
|
120
120
|
}))]
|
|
@@ -163,7 +163,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
163
163
|
className: PropTypes.string,
|
|
164
164
|
/**
|
|
165
165
|
* Color palette used to colorize multiple series.
|
|
166
|
-
* @default
|
|
166
|
+
* @default rainbowSurgePalette
|
|
167
167
|
*/
|
|
168
168
|
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
169
169
|
/**
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
2
|
+
import { UseChartProZoomSignature } from '../internals/plugins/useChartProZoom';
|
|
3
|
+
export type BarChartProPluginsSignatures = [
|
|
4
|
+
UseChartZAxisSignature,
|
|
5
|
+
UseChartCartesianAxisSignature<'bar'>,
|
|
6
|
+
UseChartInteractionSignature,
|
|
7
|
+
UseChartHighlightSignature,
|
|
8
|
+
UseChartProZoomSignature
|
|
9
|
+
];
|
|
10
|
+
export declare const BAR_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<BarChartProPluginsSignatures>;
|
|
@@ -0,0 +1,3 @@
|
|
|
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];
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,110 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## **8.0.0-alpha.11**
|
|
9
|
+
|
|
10
|
+
_Feb 7, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- ⚡ Mount and resize performance improvements for the Data Grid
|
|
15
|
+
|
|
16
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
17
|
+
@lauri865.
|
|
18
|
+
Following are all team members who have contributed to this release:
|
|
19
|
+
@alexfauquette, @arminmeh, @bernardobelchior, @flaviendelangle, @Janpot, @KenanYusuf, @LukasTy, @MBilalShafi, @noraleonte, @romgrk.
|
|
20
|
+
|
|
21
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
22
|
+
|
|
23
|
+
### Data Grid
|
|
24
|
+
|
|
25
|
+
#### Breaking changes
|
|
26
|
+
|
|
27
|
+
- `createUseGridApiEventHandler()` is not exported anymore.
|
|
28
|
+
- The `filteredRowsLookup` object of the filter state does not contain `true` values anymore. If the row is filtered out, the value is `false`. Otherwise, the row id is not present in the object.
|
|
29
|
+
This change only impacts you if you relied on `filteredRowsLookup` to get ids of filtered rows. In this case,use `gridDataRowIdsSelector` selector to get row ids and check `filteredRowsLookup` for `false` values:
|
|
30
|
+
|
|
31
|
+
```diff
|
|
32
|
+
const filteredRowsLookup = gridFilteredRowsLookupSelector(apiRef);
|
|
33
|
+
-const filteredRowIds = Object.keys(filteredRowsLookup).filter((rowId) => filteredRowsLookup[rowId] === true);
|
|
34
|
+
+const rowIds = gridDataRowIdsSelector(apiRef);
|
|
35
|
+
+const filteredRowIds = rowIds.filter((rowId) => filteredRowsLookup[rowId] !== false);
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
- The `visibleRowsLookup` state does not contain `true` values anymore. If the row is not visible, the value is `false`. Otherwise, the row id is not present in the object:
|
|
39
|
+
|
|
40
|
+
```diff
|
|
41
|
+
const visibleRowsLookup = gridVisibleRowsLookupSelector(apiRef);
|
|
42
|
+
-const isRowVisible = visibleRowsLookup[rowId] === true;
|
|
43
|
+
+const isRowVisible = visibleRowsLookup[rowId] !== false;
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
#### `@mui/x-data-grid@8.0.0-alpha.11`
|
|
47
|
+
|
|
48
|
+
- [DataGrid] Avoid `<GridRoot />` double-render pass on mount in SPA mode (#15648) @lauri865
|
|
49
|
+
- [DataGrid] Fix loading overlay not in sync with scroll (#16437) @MBilalShafi
|
|
50
|
+
- [DataGrid] Refactor: remove material `MenuList` import (#16444) @romgrk
|
|
51
|
+
- [DataGrid] Refactor: simplify `useGridApiEventHandler()` (#16479) @romgrk
|
|
52
|
+
|
|
53
|
+
#### `@mui/x-data-grid-pro@8.0.0-alpha.11` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
54
|
+
|
|
55
|
+
Same changes as in `@mui/x-data-grid@8.0.0-alpha.11`, plus:
|
|
56
|
+
|
|
57
|
+
- [DataGridPro] Fix the return type of `useGridApiContext()` for Pro and Premium packages on React < 19 (#16441) @arminmeh
|
|
58
|
+
|
|
59
|
+
#### `@mui/x-data-grid-premium@8.0.0-alpha.11` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
60
|
+
|
|
61
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.11`, plus:
|
|
62
|
+
|
|
63
|
+
- [DataGridPremium] Fix "no rows" overlay not showing with active aggregation (#16466) @KenanYusuf
|
|
64
|
+
|
|
65
|
+
### Date and Time Pickers
|
|
66
|
+
|
|
67
|
+
#### `@mui/x-date-pickers@8.0.0-alpha.11`
|
|
68
|
+
|
|
69
|
+
Internal changes.
|
|
70
|
+
|
|
71
|
+
#### `@mui/x-date-pickers-pro@8.0.0-alpha.11` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
72
|
+
|
|
73
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-alpha.11`, plus:
|
|
74
|
+
|
|
75
|
+
- [DateRangeCalendar] Support arrow navigation with multiple months rendered (#16363) @flaviendelangle
|
|
76
|
+
- [DateRangePicker] Fix `currentMonthCalendarPosition` prop behavior on mobile (#16455) @LukasTy
|
|
77
|
+
- [DateRangePicker] Fix vertical alignment for multi input fields (#16489) @noraleonte
|
|
78
|
+
|
|
79
|
+
### Charts
|
|
80
|
+
|
|
81
|
+
#### `@mui/x-charts@8.0.0-alpha.11`
|
|
82
|
+
|
|
83
|
+
- [charts] Add `color` prop to `Sparkline` and deprecate `colors` (#16477) @bernardobelchior
|
|
84
|
+
- [charts] Make typescript more flexible about plugins and their params (#16478) @alexfauquette
|
|
85
|
+
- [charts] Remove component for axis event listener (#16314) @alexfauquette
|
|
86
|
+
|
|
87
|
+
#### `@mui/x-charts-pro@8.0.0-alpha.11` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
88
|
+
|
|
89
|
+
Same changes as in `@mui/x-charts@8.0.0-alpha.11`.
|
|
90
|
+
|
|
91
|
+
### Tree View
|
|
92
|
+
|
|
93
|
+
#### `@mui/x-tree-view@8.0.0-alpha.11`
|
|
94
|
+
|
|
95
|
+
Internal changes.
|
|
96
|
+
|
|
97
|
+
#### `@mui/x-tree-view-pro@8.0.0-alpha.11` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
98
|
+
|
|
99
|
+
Same changes as in `@mui/x-tree-view@8.0.0-alpha.11`.
|
|
100
|
+
|
|
101
|
+
### Docs
|
|
102
|
+
|
|
103
|
+
- [docs] Update charts colors default value (#16484) @bernardobelchior
|
|
104
|
+
|
|
105
|
+
### Core
|
|
106
|
+
|
|
107
|
+
- [core] Fix corepack and pnpm installation in CircleCI (#16434) @flaviendelangle
|
|
108
|
+
- [code-infra] Update monorepo (#16112) @Janpot
|
|
109
|
+
- [test] Avoid test warning when running on React 18 (#16486) @LukasTy
|
|
110
|
+
- [test] Disable `react-transition-group` transitions in unit testing (#16288) @lauri865
|
|
111
|
+
|
|
8
112
|
## 8.0.0-alpha.10
|
|
9
113
|
|
|
10
114
|
_Jan 30, 2025_
|
|
@@ -50,6 +154,7 @@ Following are all team members who have contributed to this release:
|
|
|
50
154
|
+ },
|
|
51
155
|
});
|
|
52
156
|
```
|
|
157
|
+
|
|
53
158
|
- The `detailPanels`, `pinnedColumns`, and `pinnedRowsRenderZone` classes have been removed.
|
|
54
159
|
- Return type of the `useGridApiRef()` hook and the type of `apiRef` prop are updated to explicitly include the possibilty of `null`. In addition to this, `useGridApiRef()` returns a reference that is initialized with `null` instead of `{}`.
|
|
55
160
|
|
|
@@ -91,7 +196,7 @@ Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.10`.
|
|
|
91
196
|
|
|
92
197
|
#### Breaking changes
|
|
93
198
|
|
|
94
|
-
- The component passed to the `field` slot no longer receives the `ref`,
|
|
199
|
+
- The component passed to the `field` slot no longer receives the `ref`, `disabled`, `className`, `sx`, `label`, `name`, `formatDensity`, `enableAccessibleFieldDOMStructure`, `selectedSections`, `onSelectedSectionsChange` and `inputRef` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-field)
|
|
95
200
|
- The `MuiPickersPopper` theme entry have been renamed `MuiPickerPopper` and some of its props have been removed — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#muipickerspopper)
|
|
96
201
|
|
|
97
202
|
#### `@mui/x-date-pickers@8.0.0-alpha.10`
|
|
@@ -111,7 +216,7 @@ Same changes as in `@mui/x-date-pickers@8.0.0-alpha.10`.
|
|
|
111
216
|
|
|
112
217
|
- Replace `legend.position.horizontal` from `"left" | "middle" | "right"` to `"start" | "center" | "end"`.
|
|
113
218
|
This is to align with the CSS values and reflect the RTL ability of the legend component.
|
|
114
|
-
- The default colors have changed. To keep using the old palette. It is possible to import `blueberryTwilightPalette` from
|
|
219
|
+
- The default colors have changed. To keep using the old palette. It is possible to import `blueberryTwilightPalette` from `@mui/x-charts/colorPalettes` and set it on the `colors` property of charts.
|
|
115
220
|
- The `id` property is now optional on the `Pie` and `Scatter` data types.
|
|
116
221
|
|
|
117
222
|
#### `@mui/x-charts@8.0.0-alpha.10`
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ChartsSurfaceProps } from '@mui/x-charts/ChartsSurface';
|
|
3
|
-
import { ChartSeriesType } from '@mui/x-charts/internals';
|
|
3
|
+
import { ChartAnyPluginSignature, ChartSeriesType } from '@mui/x-charts/internals';
|
|
4
4
|
import { AllPluginSignatures } from '../internals/plugins/allPlugins';
|
|
5
5
|
import { ChartDataProviderProProps } from '../ChartDataProviderPro';
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
type ChartContainerProComponent = <TSeries extends ChartSeriesType = ChartSeriesType>(props: ChartContainerProProps<TSeries> & {
|
|
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> & {
|
|
9
8
|
ref?: React.ForwardedRef<SVGSVGElement>;
|
|
10
9
|
}) => React.JSX.Element;
|
|
11
10
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ChartSeriesType, UseChartContainerPropsReturnValue } from '@mui/x-charts/internals';
|
|
1
|
+
import { ChartAnyPluginSignature, ChartSeriesType, UseChartContainerPropsReturnValue } from '@mui/x-charts/internals';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ChartDataProviderProps } from '@mui/x-charts/ChartDataProvider';
|
|
4
4
|
import type { ChartContainerProProps } from './ChartContainerPro';
|
|
5
5
|
import { AllPluginSignatures } from '../internals/plugins/allPlugins';
|
|
6
|
-
export type UseChartContainerProPropsReturnValue<TSeries extends ChartSeriesType> = Pick<UseChartContainerPropsReturnValue<TSeries>, 'chartsSurfaceProps' | 'children'> & {
|
|
7
|
-
chartDataProviderProProps: ChartDataProviderProps<TSeries,
|
|
6
|
+
export type UseChartContainerProPropsReturnValue<TSeries extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = Pick<UseChartContainerPropsReturnValue<TSeries, TSignatures>, 'chartsSurfaceProps' | 'children'> & {
|
|
7
|
+
chartDataProviderProProps: ChartDataProviderProps<TSeries, TSignatures>;
|
|
8
8
|
};
|
|
9
|
-
export declare const useChartContainerProProps: <TSeries extends ChartSeriesType = keyof import("@mui/x-charts/internals").ChartsSeriesConfig
|
|
9
|
+
export declare const useChartContainerProProps: <TSeries extends ChartSeriesType = keyof import("@mui/x-charts/internals").ChartsSeriesConfig, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartContainerProProps<TSeries, TSignatures>, ref: React.Ref<SVGSVGElement>) => UseChartContainerProPropsReturnValue<TSeries, TSignatures>;
|
|
@@ -6,27 +6,27 @@ const _excluded = ["initialZoom", "onZoomChange", "plugins", "apiRef"];
|
|
|
6
6
|
import { useChartContainerProps } from '@mui/x-charts/internals';
|
|
7
7
|
import { ALL_PLUGINS } from "../internals/plugins/allPlugins.js";
|
|
8
8
|
export const useChartContainerProProps = (props, ref) => {
|
|
9
|
-
const
|
|
9
|
+
const _ref = props,
|
|
10
|
+
{
|
|
10
11
|
initialZoom,
|
|
11
12
|
onZoomChange,
|
|
12
13
|
plugins,
|
|
13
14
|
apiRef
|
|
14
|
-
} =
|
|
15
|
-
baseProps = _objectWithoutPropertiesLoose(
|
|
16
|
-
const chartDataProviderProProps = {
|
|
17
|
-
initialZoom,
|
|
18
|
-
onZoomChange
|
|
19
|
-
};
|
|
15
|
+
} = _ref,
|
|
16
|
+
baseProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
20
17
|
const {
|
|
21
18
|
chartDataProviderProps,
|
|
22
19
|
chartsSurfaceProps,
|
|
23
20
|
children
|
|
24
21
|
} = useChartContainerProps(baseProps, ref);
|
|
22
|
+
const chartDataProviderProProps = _extends({}, chartDataProviderProps, {
|
|
23
|
+
initialZoom,
|
|
24
|
+
onZoomChange,
|
|
25
|
+
apiRef,
|
|
26
|
+
plugins: plugins ?? ALL_PLUGINS
|
|
27
|
+
});
|
|
25
28
|
return {
|
|
26
|
-
chartDataProviderProProps
|
|
27
|
-
apiRef,
|
|
28
|
-
plugins: plugins ?? ALL_PLUGINS
|
|
29
|
-
}),
|
|
29
|
+
chartDataProviderProProps,
|
|
30
30
|
chartsSurfaceProps,
|
|
31
31
|
children
|
|
32
32
|
};
|
|
@@ -30,7 +30,7 @@ export type ChartDataProviderProProps<TSeries extends ChartSeriesType = ChartSer
|
|
|
30
30
|
* </ChartDataProviderPro>
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
declare function ChartDataProviderPro<TSeries extends ChartSeriesType = ChartSeriesType
|
|
33
|
+
declare function ChartDataProviderPro<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartDataProviderProProps<TSeries, TSignatures>): React.JSX.Element;
|
|
34
34
|
declare namespace ChartDataProviderPro {
|
|
35
35
|
var propTypes: any;
|
|
36
36
|
}
|
|
@@ -59,231 +59,47 @@ process.env.NODE_ENV !== "production" ? ChartDataProviderPro.propTypes = {
|
|
|
59
59
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
60
60
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
61
61
|
// ----------------------------------------------------------------------
|
|
62
|
-
apiRef: PropTypes.
|
|
63
|
-
current: PropTypes.shape({
|
|
64
|
-
setZoomData: PropTypes.func.isRequired
|
|
65
|
-
})
|
|
66
|
-
}),
|
|
62
|
+
apiRef: PropTypes.any,
|
|
67
63
|
children: PropTypes.node,
|
|
68
64
|
/**
|
|
69
65
|
* Color palette used to colorize multiple series.
|
|
70
|
-
* @default
|
|
66
|
+
* @default rainbowSurgePalette
|
|
71
67
|
*/
|
|
72
|
-
colors: PropTypes.
|
|
68
|
+
colors: PropTypes.any,
|
|
73
69
|
/**
|
|
74
70
|
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
75
71
|
*/
|
|
76
|
-
dataset: PropTypes.
|
|
72
|
+
dataset: PropTypes.any,
|
|
77
73
|
/**
|
|
78
74
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
79
75
|
*/
|
|
80
|
-
height: PropTypes.
|
|
81
|
-
/**
|
|
82
|
-
* The highlighted item.
|
|
83
|
-
* Used when the highlight is controlled.
|
|
84
|
-
*/
|
|
85
|
-
highlightedItem: PropTypes.shape({
|
|
86
|
-
dataIndex: PropTypes.number,
|
|
87
|
-
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
|
|
88
|
-
}),
|
|
76
|
+
height: PropTypes.any,
|
|
89
77
|
/**
|
|
90
78
|
* This prop is used to help implement the accessibility logic.
|
|
91
79
|
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
92
80
|
*/
|
|
93
|
-
id: PropTypes.
|
|
94
|
-
/**
|
|
95
|
-
* The list of zoom data related to each axis.
|
|
96
|
-
*/
|
|
97
|
-
initialZoom: PropTypes.arrayOf(PropTypes.shape({
|
|
98
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
99
|
-
end: PropTypes.number.isRequired,
|
|
100
|
-
start: PropTypes.number.isRequired
|
|
101
|
-
})),
|
|
81
|
+
id: PropTypes.any,
|
|
102
82
|
/**
|
|
103
83
|
* The margin between the SVG and the drawing area.
|
|
104
84
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
105
85
|
* Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
106
86
|
*/
|
|
107
|
-
margin: PropTypes.
|
|
108
|
-
bottom: PropTypes.number,
|
|
109
|
-
left: PropTypes.number,
|
|
110
|
-
right: PropTypes.number,
|
|
111
|
-
top: PropTypes.number
|
|
112
|
-
}),
|
|
113
|
-
/**
|
|
114
|
-
* The callback fired when the highlighted item changes.
|
|
115
|
-
*
|
|
116
|
-
* @param {HighlightItemData | null} highlightedItem The newly highlighted item.
|
|
117
|
-
*/
|
|
118
|
-
onHighlightChange: PropTypes.func,
|
|
119
|
-
/**
|
|
120
|
-
* Callback fired when the zoom has changed.
|
|
121
|
-
*
|
|
122
|
-
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
123
|
-
*/
|
|
124
|
-
onZoomChange: PropTypes.func,
|
|
87
|
+
margin: PropTypes.any,
|
|
125
88
|
/**
|
|
126
89
|
* The array of series to display.
|
|
127
90
|
* Each type of series has its own specificity.
|
|
128
91
|
* Please refer to the appropriate docs page to learn more about it.
|
|
129
92
|
*/
|
|
130
|
-
series: PropTypes.
|
|
93
|
+
series: PropTypes.any,
|
|
131
94
|
/**
|
|
132
95
|
* If `true`, animations are skipped.
|
|
133
96
|
* If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
|
|
134
97
|
*/
|
|
135
|
-
skipAnimation: PropTypes.
|
|
136
|
-
theme: PropTypes.
|
|
98
|
+
skipAnimation: PropTypes.any,
|
|
99
|
+
theme: PropTypes.any,
|
|
137
100
|
/**
|
|
138
101
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
139
102
|
*/
|
|
140
|
-
width: PropTypes.
|
|
141
|
-
/**
|
|
142
|
-
* The configuration of the x-axes.
|
|
143
|
-
* If not provided, a default axis config is used.
|
|
144
|
-
* An array of [[AxisConfig]] objects.
|
|
145
|
-
*/
|
|
146
|
-
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
147
|
-
classes: PropTypes.object,
|
|
148
|
-
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
149
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
150
|
-
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
151
|
-
unknownColor: PropTypes.string,
|
|
152
|
-
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
153
|
-
}), PropTypes.shape({
|
|
154
|
-
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
155
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
156
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
157
|
-
type: PropTypes.oneOf(['continuous']).isRequired
|
|
158
|
-
}), PropTypes.shape({
|
|
159
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
160
|
-
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
161
|
-
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
162
|
-
})]),
|
|
163
|
-
data: PropTypes.array,
|
|
164
|
-
dataKey: PropTypes.string,
|
|
165
|
-
disableLine: PropTypes.bool,
|
|
166
|
-
disableTicks: PropTypes.bool,
|
|
167
|
-
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
168
|
-
fill: PropTypes.string,
|
|
169
|
-
hideTooltip: PropTypes.bool,
|
|
170
|
-
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
171
|
-
label: PropTypes.string,
|
|
172
|
-
labelStyle: PropTypes.object,
|
|
173
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
174
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
175
|
-
position: PropTypes.oneOf(['bottom', 'top']),
|
|
176
|
-
reverse: PropTypes.bool,
|
|
177
|
-
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
178
|
-
slotProps: PropTypes.object,
|
|
179
|
-
slots: PropTypes.object,
|
|
180
|
-
stroke: PropTypes.string,
|
|
181
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
182
|
-
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
183
|
-
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
184
|
-
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
185
|
-
tickLabelStyle: PropTypes.object,
|
|
186
|
-
tickMaxStep: PropTypes.number,
|
|
187
|
-
tickMinStep: PropTypes.number,
|
|
188
|
-
tickNumber: PropTypes.number,
|
|
189
|
-
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
190
|
-
tickSize: PropTypes.number,
|
|
191
|
-
valueFormatter: PropTypes.func,
|
|
192
|
-
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
193
|
-
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
194
|
-
maxEnd: PropTypes.number,
|
|
195
|
-
maxSpan: PropTypes.number,
|
|
196
|
-
minSpan: PropTypes.number,
|
|
197
|
-
minStart: PropTypes.number,
|
|
198
|
-
panning: PropTypes.bool,
|
|
199
|
-
step: PropTypes.number
|
|
200
|
-
}), PropTypes.bool])
|
|
201
|
-
})),
|
|
202
|
-
/**
|
|
203
|
-
* The configuration of the y-axes.
|
|
204
|
-
* If not provided, a default axis config is used.
|
|
205
|
-
* An array of [[AxisConfig]] objects.
|
|
206
|
-
*/
|
|
207
|
-
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
208
|
-
classes: PropTypes.object,
|
|
209
|
-
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
210
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
211
|
-
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
212
|
-
unknownColor: PropTypes.string,
|
|
213
|
-
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
214
|
-
}), PropTypes.shape({
|
|
215
|
-
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
216
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
217
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
218
|
-
type: PropTypes.oneOf(['continuous']).isRequired
|
|
219
|
-
}), PropTypes.shape({
|
|
220
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
221
|
-
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
222
|
-
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
223
|
-
})]),
|
|
224
|
-
data: PropTypes.array,
|
|
225
|
-
dataKey: PropTypes.string,
|
|
226
|
-
disableLine: PropTypes.bool,
|
|
227
|
-
disableTicks: PropTypes.bool,
|
|
228
|
-
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
229
|
-
fill: PropTypes.string,
|
|
230
|
-
hideTooltip: PropTypes.bool,
|
|
231
|
-
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
232
|
-
label: PropTypes.string,
|
|
233
|
-
labelStyle: PropTypes.object,
|
|
234
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
235
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
236
|
-
position: PropTypes.oneOf(['left', 'right']),
|
|
237
|
-
reverse: PropTypes.bool,
|
|
238
|
-
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
239
|
-
slotProps: PropTypes.object,
|
|
240
|
-
slots: PropTypes.object,
|
|
241
|
-
stroke: PropTypes.string,
|
|
242
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
243
|
-
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
244
|
-
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
245
|
-
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
246
|
-
tickLabelStyle: PropTypes.object,
|
|
247
|
-
tickMaxStep: PropTypes.number,
|
|
248
|
-
tickMinStep: PropTypes.number,
|
|
249
|
-
tickNumber: PropTypes.number,
|
|
250
|
-
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
251
|
-
tickSize: PropTypes.number,
|
|
252
|
-
valueFormatter: PropTypes.func,
|
|
253
|
-
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
254
|
-
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
255
|
-
maxEnd: PropTypes.number,
|
|
256
|
-
maxSpan: PropTypes.number,
|
|
257
|
-
minSpan: PropTypes.number,
|
|
258
|
-
minStart: PropTypes.number,
|
|
259
|
-
panning: PropTypes.bool,
|
|
260
|
-
step: PropTypes.number
|
|
261
|
-
}), PropTypes.bool])
|
|
262
|
-
})),
|
|
263
|
-
/**
|
|
264
|
-
* The configuration of the z-axes.
|
|
265
|
-
*/
|
|
266
|
-
zAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
267
|
-
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
268
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
269
|
-
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
270
|
-
unknownColor: PropTypes.string,
|
|
271
|
-
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
272
|
-
}), PropTypes.shape({
|
|
273
|
-
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
274
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
275
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
276
|
-
type: PropTypes.oneOf(['continuous']).isRequired
|
|
277
|
-
}), PropTypes.shape({
|
|
278
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
279
|
-
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
280
|
-
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
281
|
-
})]),
|
|
282
|
-
data: PropTypes.array,
|
|
283
|
-
dataKey: PropTypes.string,
|
|
284
|
-
id: PropTypes.string,
|
|
285
|
-
max: PropTypes.number,
|
|
286
|
-
min: PropTypes.number
|
|
287
|
-
}))
|
|
103
|
+
width: PropTypes.any
|
|
288
104
|
} : void 0;
|
|
289
105
|
export { ChartDataProviderPro };
|
package/Heatmap/Heatmap.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { MakeOptional } from '@mui/x-internals/types';
|
|
|
3
3
|
import { ChartsAxisProps } from '@mui/x-charts/ChartsAxis';
|
|
4
4
|
import { ChartsTooltipProps } from '@mui/x-charts/ChartsTooltip';
|
|
5
5
|
import { ChartsAxisSlots, ChartsAxisSlotProps, ChartsXAxisProps, ChartsYAxisProps, AxisConfig } from '@mui/x-charts/internals';
|
|
6
|
-
import { ChartsOnAxisClickHandlerProps } from '@mui/x-charts/ChartsOnAxisClickHandler';
|
|
7
6
|
import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from '@mui/x-charts/ChartsOverlay';
|
|
8
7
|
import { ChartContainerProProps } from '../ChartContainerPro';
|
|
9
8
|
import { HeatmapSeriesType } from '../models/seriesType/heatmap';
|
|
@@ -19,7 +18,7 @@ export interface HeatmapSlots extends ChartsAxisSlots, ChartsOverlaySlots, Heatm
|
|
|
19
18
|
export interface HeatmapSlotProps extends ChartsAxisSlotProps, ChartsOverlaySlotProps, HeatmapItemSlotProps {
|
|
20
19
|
tooltip?: Partial<HeatmapTooltipProps>;
|
|
21
20
|
}
|
|
22
|
-
export interface HeatmapProps extends Omit<ChartContainerProProps, 'series' | 'plugins' | 'xAxis' | 'yAxis' | 'zoom' | 'onZoomChange' | 'skipAnimation'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'
|
|
21
|
+
export interface HeatmapProps extends Omit<ChartContainerProProps, 'series' | 'plugins' | 'xAxis' | 'yAxis' | 'zoom' | 'onZoomChange' | 'skipAnimation'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
|
|
23
22
|
/**
|
|
24
23
|
* The configuration of the x-axes.
|
|
25
24
|
* If not provided, a default axis config is used.
|
package/Heatmap/Heatmap.js
CHANGED
|
@@ -8,12 +8,12 @@ import useId from '@mui/utils/useId';
|
|
|
8
8
|
import { interpolateRgbBasis } from '@mui/x-charts-vendor/d3-interpolate';
|
|
9
9
|
import { ChartsAxis } from '@mui/x-charts/ChartsAxis';
|
|
10
10
|
import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
|
|
11
|
-
import { ChartsOnAxisClickHandler } from '@mui/x-charts/ChartsOnAxisClickHandler';
|
|
12
11
|
import { ChartsOverlay } from '@mui/x-charts/ChartsOverlay';
|
|
13
12
|
import { ChartContainerPro } from "../ChartContainerPro/index.js";
|
|
14
13
|
import { HeatmapPlot } from "./HeatmapPlot.js";
|
|
15
14
|
import { plugin as heatmapPlugin } from "./plugin.js";
|
|
16
15
|
import { HeatmapTooltip } from "./HeatmapTooltip.js";
|
|
16
|
+
import { HEATMAP_PLUGINS } from "./Heatmap.plugins.js";
|
|
17
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
18
|
// The GnBu: https://github.com/d3/d3-scale-chromatic/blob/main/src/sequential-multi/GnBu.js
|
|
19
19
|
const defaultColorMap = interpolateRgbBasis(['#f7fcf0', '#e0f3db', '#ccebc5', '#a8ddb5', '#7bccc4', '#4eb3d3', '#2b8cbe', '#0868ac', '#084081']);
|
|
@@ -85,9 +85,9 @@ const Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap(inProps, ref) {
|
|
|
85
85
|
disableAxisListener: true,
|
|
86
86
|
highlightedItem: highlightedItem,
|
|
87
87
|
onHighlightChange: onHighlightChange,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
onAxisClick: onAxisClick,
|
|
89
|
+
plugins: HEATMAP_PLUGINS,
|
|
90
|
+
children: [/*#__PURE__*/_jsxs("g", {
|
|
91
91
|
clipPath: `url(#${clipPathId})`,
|
|
92
92
|
children: [/*#__PURE__*/_jsx(HeatmapPlot, {
|
|
93
93
|
slots: slots,
|
|
@@ -129,7 +129,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
129
129
|
className: PropTypes.string,
|
|
130
130
|
/**
|
|
131
131
|
* Color palette used to colorize multiple series.
|
|
132
|
-
* @default
|
|
132
|
+
* @default rainbowSurgePalette
|
|
133
133
|
*/
|
|
134
134
|
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
135
135
|
/**
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
2
|
+
export type HeatmapPluginsSignatures = [
|
|
3
|
+
UseChartZAxisSignature,
|
|
4
|
+
UseChartCartesianAxisSignature<'heatmap'>,
|
|
5
|
+
UseChartInteractionSignature,
|
|
6
|
+
UseChartHighlightSignature
|
|
7
|
+
];
|
|
8
|
+
export declare const HEATMAP_PLUGINS: ConvertSignaturesIntoPlugins<HeatmapPluginsSignatures>;
|
|
@@ -7,7 +7,6 @@ import * as React from 'react';
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { useThemeProps } from '@mui/material/styles';
|
|
9
9
|
import { AreaPlot, LineHighlightPlot, LinePlot, MarkPlot } from '@mui/x-charts/LineChart';
|
|
10
|
-
import { ChartsOnAxisClickHandler } from '@mui/x-charts/ChartsOnAxisClickHandler';
|
|
11
10
|
import { ChartsGrid } from '@mui/x-charts/ChartsGrid';
|
|
12
11
|
import { ChartsOverlay } from '@mui/x-charts/ChartsOverlay';
|
|
13
12
|
import { ChartsAxis } from '@mui/x-charts/ChartsAxis';
|
|
@@ -20,6 +19,7 @@ import { useLineChartProps, ChartsWrapper } from '@mui/x-charts/internals';
|
|
|
20
19
|
import { useIsZoomInteracting } from "../hooks/zoom/index.js";
|
|
21
20
|
import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
|
|
22
21
|
import { ChartDataProviderPro } from "../ChartDataProviderPro/index.js";
|
|
22
|
+
import { LINE_CHART_PRO_PLUGINS } from "./LineChartPro.plugins.js";
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
function AreaPlotZoom(props) {
|
|
25
25
|
const isInteracting = useIsZoomInteracting();
|
|
@@ -144,7 +144,6 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
|
|
|
144
144
|
const {
|
|
145
145
|
chartsWrapperProps,
|
|
146
146
|
chartContainerProps,
|
|
147
|
-
axisClickHandlerProps,
|
|
148
147
|
gridProps,
|
|
149
148
|
clipPathProps,
|
|
150
149
|
clipPathGroupProps,
|
|
@@ -164,13 +163,14 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
|
|
|
164
163
|
} = useChartContainerProProps(_extends({}, chartContainerProps, {
|
|
165
164
|
initialZoom,
|
|
166
165
|
onZoomChange,
|
|
167
|
-
apiRef
|
|
166
|
+
apiRef,
|
|
167
|
+
plugins: LINE_CHART_PRO_PLUGINS
|
|
168
168
|
}), ref);
|
|
169
169
|
const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
|
|
170
170
|
return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
|
|
171
171
|
children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
|
|
172
172
|
children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
173
|
-
children: [
|
|
173
|
+
children: [/*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
174
174
|
children: [/*#__PURE__*/_jsx(AreaPlotZoom, _extends({}, areaPlotProps)), /*#__PURE__*/_jsx(LinePlotZoom, _extends({}, linePlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
|
|
175
175
|
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx("g", {
|
|
176
176
|
"data-drawing-container": true,
|
|
@@ -209,7 +209,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
209
209
|
className: PropTypes.string,
|
|
210
210
|
/**
|
|
211
211
|
* Color palette used to colorize multiple series.
|
|
212
|
-
* @default
|
|
212
|
+
* @default rainbowSurgePalette
|
|
213
213
|
*/
|
|
214
214
|
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
215
215
|
/**
|