@mui/x-charts 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/BarChart/BarChart.d.ts +1 -2
- package/BarChart/BarChart.js +2 -4
- package/BarChart/BarChart.plugins.d.ts +12 -0
- package/BarChart/BarChart.plugins.js +5 -0
- package/BarChart/useBarChartProps.d.ts +2 -3
- package/BarChart/useBarChartProps.js +5 -8
- package/CHANGELOG.md +107 -2
- package/ChartContainer/ChartContainer.d.ts +2 -2
- package/ChartContainer/ChartContainer.js +8 -1
- package/ChartContainer/useChartContainerProps.d.ts +4 -3
- package/ChartContainer/useChartContainerProps.js +11 -7
- package/ChartDataProvider/ChartDataProvider.js +4 -1
- package/ChartsSurface/ChartsSurface.d.ts +0 -6
- package/ChartsSurface/ChartsSurface.js +1 -10
- package/ChartsTooltip/ChartsTooltipContainer.js +2 -2
- package/Gauge/Gauge.js +0 -6
- package/Gauge/GaugeContainer.js +0 -6
- package/LineChart/LineChart.d.ts +1 -2
- package/LineChart/LineChart.js +2 -4
- package/LineChart/LineChart.plugins.d.ts +12 -0
- package/LineChart/LineChart.plugins.js +5 -0
- package/LineChart/useLineChartProps.d.ts +2 -3
- package/LineChart/useLineChartProps.js +5 -8
- package/PieChart/PieChart.d.ts +3 -1
- package/PieChart/PieChart.js +8 -115
- package/PieChart/PieChart.plugins.d.ts +5 -0
- package/PieChart/PieChart.plugins.js +3 -0
- package/ScatterChart/ScatterChart.js +8 -1
- package/ScatterChart/ScatterChart.plugins.d.ts +12 -0
- package/ScatterChart/ScatterChart.plugins.js +5 -0
- package/ScatterChart/useScatterChartProps.d.ts +2 -1
- package/ScatterChart/useScatterChartProps.js +3 -1
- package/SparkLineChart/SparkLineChart.d.ts +12 -0
- package/SparkLineChart/SparkLineChart.js +24 -4
- package/colorPalettes/colorPalettes.d.ts +2 -0
- package/context/ChartProvider/ChartProvider.types.d.ts +2 -1
- package/hooks/useAxisEvents.d.ts +0 -1
- package/hooks/useAxisEvents.js +0 -165
- package/index.d.ts +0 -1
- package/index.js +1 -2
- package/internals/plugins/allPlugins.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +5 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +9 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +59 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.d.ts +1 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +142 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +19 -2
- package/models/axis.d.ts +17 -0
- package/models/axis.js +5 -1
- package/models/index.d.ts +1 -1
- package/modern/BarChart/BarChart.js +2 -4
- package/modern/BarChart/BarChart.plugins.js +5 -0
- package/modern/BarChart/useBarChartProps.js +5 -8
- package/modern/ChartContainer/ChartContainer.js +8 -1
- package/modern/ChartContainer/useChartContainerProps.js +11 -7
- package/modern/ChartDataProvider/ChartDataProvider.js +4 -1
- package/modern/ChartsSurface/ChartsSurface.js +1 -10
- package/modern/ChartsTooltip/ChartsTooltipContainer.js +2 -2
- package/modern/Gauge/Gauge.js +0 -6
- package/modern/Gauge/GaugeContainer.js +0 -6
- package/modern/LineChart/LineChart.js +2 -4
- package/modern/LineChart/LineChart.plugins.js +5 -0
- package/modern/LineChart/useLineChartProps.js +5 -8
- package/modern/PieChart/PieChart.js +8 -115
- package/modern/PieChart/PieChart.plugins.js +3 -0
- package/modern/ScatterChart/ScatterChart.js +8 -1
- package/modern/ScatterChart/ScatterChart.plugins.js +5 -0
- package/modern/ScatterChart/useScatterChartProps.js +3 -1
- package/modern/SparkLineChart/SparkLineChart.js +24 -4
- package/modern/hooks/useAxisEvents.js +0 -165
- package/modern/index.js +1 -2
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +59 -0
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +142 -5
- package/modern/models/axis.js +5 -1
- package/node/BarChart/BarChart.js +2 -4
- package/node/BarChart/BarChart.plugins.js +11 -0
- package/node/BarChart/useBarChartProps.js +5 -8
- package/node/ChartContainer/ChartContainer.js +8 -1
- package/node/ChartContainer/useChartContainerProps.js +11 -7
- package/node/ChartDataProvider/ChartDataProvider.js +4 -1
- package/node/ChartsSurface/ChartsSurface.js +1 -10
- package/node/ChartsTooltip/ChartsTooltipContainer.js +2 -2
- package/node/Gauge/Gauge.js +0 -6
- package/node/Gauge/GaugeContainer.js +0 -6
- package/node/LineChart/LineChart.js +2 -4
- package/node/LineChart/LineChart.plugins.js +11 -0
- package/node/LineChart/useLineChartProps.js +5 -8
- package/node/PieChart/PieChart.js +8 -115
- package/node/PieChart/PieChart.plugins.js +9 -0
- package/node/ScatterChart/ScatterChart.js +8 -1
- package/node/ScatterChart/ScatterChart.plugins.js +11 -0
- package/node/ScatterChart/useScatterChartProps.js +3 -1
- package/node/SparkLineChart/SparkLineChart.js +24 -4
- package/node/hooks/useAxisEvents.js +1 -173
- package/node/index.js +1 -12
- package/node/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +65 -0
- package/node/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +141 -4
- package/node/models/axis.js +5 -1
- package/package.json +2 -2
- package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.d.ts +0 -20
- package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +0 -82
- package/ChartsOnAxisClickHandler/index.d.ts +0 -1
- package/ChartsOnAxisClickHandler/index.js +0 -1
- package/ChartsOnAxisClickHandler/package.json +0 -6
- package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +0 -82
- package/modern/ChartsOnAxisClickHandler/index.js +0 -1
- package/node/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +0 -88
- package/node/ChartsOnAxisClickHandler/index.js +0 -16
package/BarChart/BarChart.d.ts
CHANGED
|
@@ -9,13 +9,12 @@ import { ChartsLegendSlots, ChartsLegendSlotProps } from '../ChartsLegend';
|
|
|
9
9
|
import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight';
|
|
10
10
|
import { ChartsAxisSlots, ChartsAxisSlotProps } from '../models/axis';
|
|
11
11
|
import { ChartsGridProps } from '../ChartsGrid';
|
|
12
|
-
import { ChartsOnAxisClickHandlerProps } from '../ChartsOnAxisClickHandler';
|
|
13
12
|
import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from '../ChartsOverlay/ChartsOverlay';
|
|
14
13
|
export interface BarChartSlots extends ChartsAxisSlots, BarPlotSlots, ChartsLegendSlots, ChartsOverlaySlots, ChartsTooltipSlots {
|
|
15
14
|
}
|
|
16
15
|
export interface BarChartSlotProps extends ChartsAxisSlotProps, BarPlotSlotProps, ChartsLegendSlotProps, ChartsOverlaySlotProps, ChartsTooltipSlotProps {
|
|
17
16
|
}
|
|
18
|
-
export interface BarChartProps extends Omit<ChartContainerProps<'bar'>, 'series' | 'plugins' | 'zAxis'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<BarPlotProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'
|
|
17
|
+
export interface BarChartProps extends Omit<ChartContainerProps<'bar'>, 'series' | 'plugins' | 'zAxis'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<BarPlotProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
|
|
19
18
|
/**
|
|
20
19
|
* The series to display in the bar chart.
|
|
21
20
|
* An array of [[BarSeriesType]] objects.
|
package/BarChart/BarChart.js
CHANGED
|
@@ -11,7 +11,6 @@ import { ChartsLegend } from "../ChartsLegend/index.js";
|
|
|
11
11
|
import { ChartsAxisHighlight } from "../ChartsAxisHighlight/index.js";
|
|
12
12
|
import { ChartsClipPath } from "../ChartsClipPath/index.js";
|
|
13
13
|
import { ChartsGrid } from "../ChartsGrid/index.js";
|
|
14
|
-
import { ChartsOnAxisClickHandler } from "../ChartsOnAxisClickHandler/index.js";
|
|
15
14
|
import { ChartsOverlay } from "../ChartsOverlay/ChartsOverlay.js";
|
|
16
15
|
import { useBarChartProps } from "./useBarChartProps.js";
|
|
17
16
|
import { ChartDataProvider } from "../ChartDataProvider/index.js";
|
|
@@ -39,7 +38,6 @@ const BarChart = /*#__PURE__*/React.forwardRef(function BarChart(inProps, ref) {
|
|
|
39
38
|
chartsWrapperProps,
|
|
40
39
|
chartContainerProps,
|
|
41
40
|
barPlotProps,
|
|
42
|
-
axisClickHandlerProps,
|
|
43
41
|
gridProps,
|
|
44
42
|
clipPathProps,
|
|
45
43
|
clipPathGroupProps,
|
|
@@ -57,7 +55,7 @@ const BarChart = /*#__PURE__*/React.forwardRef(function BarChart(inProps, ref) {
|
|
|
57
55
|
return /*#__PURE__*/_jsx(ChartDataProvider, _extends({}, chartDataProviderProps, {
|
|
58
56
|
children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
|
|
59
57
|
children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
60
|
-
children: [
|
|
58
|
+
children: [/*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
61
59
|
children: [/*#__PURE__*/_jsx(BarPlot, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
|
|
62
60
|
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), children]
|
|
63
61
|
}))]
|
|
@@ -104,7 +102,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
104
102
|
className: PropTypes.string,
|
|
105
103
|
/**
|
|
106
104
|
* Color palette used to colorize multiple series.
|
|
107
|
-
* @default
|
|
105
|
+
* @default rainbowSurgePalette
|
|
108
106
|
*/
|
|
109
107
|
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
110
108
|
/**
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UseChartZAxisSignature } from '../internals/plugins/featurePlugins/useChartZAxis';
|
|
2
|
+
import { UseChartCartesianAxisSignature } from '../internals/plugins/featurePlugins/useChartCartesianAxis';
|
|
3
|
+
import { UseChartInteractionSignature } from '../internals/plugins/featurePlugins/useChartInteraction';
|
|
4
|
+
import { UseChartHighlightSignature } from '../internals/plugins/featurePlugins/useChartHighlight';
|
|
5
|
+
import { ConvertSignaturesIntoPlugins } from '../internals/plugins/models/helpers';
|
|
6
|
+
export type BarChartPluginsSignatures = [
|
|
7
|
+
UseChartZAxisSignature,
|
|
8
|
+
UseChartCartesianAxisSignature<'bar'>,
|
|
9
|
+
UseChartInteractionSignature,
|
|
10
|
+
UseChartHighlightSignature
|
|
11
|
+
];
|
|
12
|
+
export declare const BAR_CHART_PLUGINS: ConvertSignaturesIntoPlugins<BarChartPluginsSignatures>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { useChartZAxis } from "../internals/plugins/featurePlugins/useChartZAxis/index.js";
|
|
2
|
+
import { useChartCartesianAxis } from "../internals/plugins/featurePlugins/useChartCartesianAxis/index.js";
|
|
3
|
+
import { useChartInteraction } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
|
|
4
|
+
import { useChartHighlight } from "../internals/plugins/featurePlugins/useChartHighlight/index.js";
|
|
5
|
+
export const BAR_CHART_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { BarChartProps } from './BarChart';
|
|
2
2
|
import { ChartContainerProps } from '../ChartContainer';
|
|
3
3
|
import { BarPlotProps } from './BarPlot';
|
|
4
|
-
import { ChartsOnAxisClickHandlerProps } from '../ChartsOnAxisClickHandler';
|
|
5
4
|
import { ChartsGridProps } from '../ChartsGrid';
|
|
6
5
|
import { ChartsClipPathProps } from '../ChartsClipPath';
|
|
7
6
|
import { ChartsOverlayProps } from '../ChartsOverlay';
|
|
@@ -9,6 +8,7 @@ import { ChartsAxisProps } from '../ChartsAxis';
|
|
|
9
8
|
import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight';
|
|
10
9
|
import { ChartsLegendSlotExtension } from '../ChartsLegend';
|
|
11
10
|
import type { ChartsWrapperProps } from '../internals/components/ChartsWrapper';
|
|
11
|
+
import { BarChartPluginsSignatures } from './BarChart.plugins';
|
|
12
12
|
/**
|
|
13
13
|
* A helper function that extracts BarChartProps from the input props
|
|
14
14
|
* and returns an object with props for the children components of BarChart.
|
|
@@ -18,9 +18,8 @@ import type { ChartsWrapperProps } from '../internals/components/ChartsWrapper';
|
|
|
18
18
|
*/
|
|
19
19
|
export declare const useBarChartProps: (props: BarChartProps) => {
|
|
20
20
|
chartsWrapperProps: Omit<ChartsWrapperProps, "children">;
|
|
21
|
-
chartContainerProps:
|
|
21
|
+
chartContainerProps: ChartContainerProps<"bar", BarChartPluginsSignatures>;
|
|
22
22
|
barPlotProps: BarPlotProps;
|
|
23
|
-
axisClickHandlerProps: ChartsOnAxisClickHandlerProps;
|
|
24
23
|
gridProps: ChartsGridProps;
|
|
25
24
|
clipPathProps: ChartsClipPathProps;
|
|
26
25
|
clipPathGroupProps: {
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["xAxis", "yAxis", "series", "width", "height", "margin", "colors", "dataset", "sx", "
|
|
5
|
+
const _excluded = ["xAxis", "yAxis", "series", "width", "height", "margin", "colors", "dataset", "sx", "axisHighlight", "grid", "topAxis", "leftAxis", "rightAxis", "bottomAxis", "children", "slots", "slotProps", "skipAnimation", "loading", "layout", "onItemClick", "highlightedItem", "onHighlightChange", "borderRadius", "barLabel", "className", "hideLegend"];
|
|
6
6
|
import useId from '@mui/utils/useId';
|
|
7
7
|
import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from "../constants/index.js";
|
|
8
8
|
import { calculateMargins } from "../internals/calculateMargins.js";
|
|
9
|
+
import { BAR_CHART_PLUGINS } from "./BarChart.plugins.js";
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* A helper function that extracts BarChartProps from the input props
|
|
@@ -25,7 +26,6 @@ export const useBarChartProps = props => {
|
|
|
25
26
|
colors,
|
|
26
27
|
dataset,
|
|
27
28
|
sx,
|
|
28
|
-
onAxisClick,
|
|
29
29
|
axisHighlight,
|
|
30
30
|
grid,
|
|
31
31
|
topAxis,
|
|
@@ -80,9 +80,10 @@ export const useBarChartProps = props => {
|
|
|
80
80
|
}, defaultAxisConfig)] : undefined),
|
|
81
81
|
highlightedItem,
|
|
82
82
|
onHighlightChange,
|
|
83
|
-
disableAxisListener: slotProps?.tooltip?.trigger !== 'axis' && axisHighlight?.x === 'none' && axisHighlight?.y === 'none'
|
|
83
|
+
disableAxisListener: slotProps?.tooltip?.trigger !== 'axis' && axisHighlight?.x === 'none' && axisHighlight?.y === 'none',
|
|
84
84
|
className,
|
|
85
|
-
skipAnimation
|
|
85
|
+
skipAnimation,
|
|
86
|
+
plugins: BAR_CHART_PLUGINS
|
|
86
87
|
});
|
|
87
88
|
const barPlotProps = {
|
|
88
89
|
onItemClick,
|
|
@@ -91,9 +92,6 @@ export const useBarChartProps = props => {
|
|
|
91
92
|
borderRadius,
|
|
92
93
|
barLabel
|
|
93
94
|
};
|
|
94
|
-
const axisClickHandlerProps = {
|
|
95
|
-
onAxisClick
|
|
96
|
-
};
|
|
97
95
|
const gridProps = {
|
|
98
96
|
vertical: grid?.vertical,
|
|
99
97
|
horizontal: grid?.horizontal
|
|
@@ -135,7 +133,6 @@ export const useBarChartProps = props => {
|
|
|
135
133
|
chartsWrapperProps,
|
|
136
134
|
chartContainerProps,
|
|
137
135
|
barPlotProps,
|
|
138
|
-
axisClickHandlerProps,
|
|
139
136
|
gridProps,
|
|
140
137
|
clipPathProps,
|
|
141
138
|
clipPathGroupProps,
|
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`
|
|
@@ -3,8 +3,8 @@ import { ChartSeriesType } from '../models/seriesType/config';
|
|
|
3
3
|
import { ChartDataProviderProps } from '../ChartDataProvider';
|
|
4
4
|
import { ChartsSurfaceProps } from '../ChartsSurface';
|
|
5
5
|
import { AllPluginSignatures } from '../internals/plugins/allPlugins';
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import { ChartAnyPluginSignature } from '../internals/plugins/models';
|
|
7
|
+
export type ChartContainerProps<SeriesType extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<SeriesType>> = Omit<ChartDataProviderProps<SeriesType, TSignatures>, 'children'> & ChartsSurfaceProps;
|
|
8
8
|
/**
|
|
9
9
|
* It sets up the data providers as well as the `<svg>` for the chart.
|
|
10
10
|
*
|
|
@@ -58,7 +58,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
58
58
|
className: PropTypes.string,
|
|
59
59
|
/**
|
|
60
60
|
* Color palette used to colorize multiple series.
|
|
61
|
-
* @default
|
|
61
|
+
* @default rainbowSurgePalette
|
|
62
62
|
*/
|
|
63
63
|
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
64
64
|
/**
|
|
@@ -100,6 +100,13 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
100
100
|
right: PropTypes.number,
|
|
101
101
|
top: PropTypes.number
|
|
102
102
|
}),
|
|
103
|
+
/**
|
|
104
|
+
* The function called for onClick events.
|
|
105
|
+
* The second argument contains information about all line/bar elements at the current mouse position.
|
|
106
|
+
* @param {MouseEvent} event The mouse event recorded on the `<svg/>` element.
|
|
107
|
+
* @param {null | AxisData} data The data about the clicked axis and items associated with it.
|
|
108
|
+
*/
|
|
109
|
+
onAxisClick: PropTypes.func,
|
|
103
110
|
/**
|
|
104
111
|
* The callback fired when the highlighted item changes.
|
|
105
112
|
*
|
|
@@ -4,11 +4,12 @@ import { ChartDataProviderProps } from '../ChartDataProvider';
|
|
|
4
4
|
import type { ChartContainerProps } from './ChartContainer';
|
|
5
5
|
import { ChartSeriesType } from '../models/seriesType/config';
|
|
6
6
|
import { AllPluginSignatures } from '../internals/plugins/allPlugins';
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
import { ChartAnyPluginSignature } from '../internals/plugins/models/plugin';
|
|
8
|
+
export type UseChartContainerPropsReturnValue<TSeries extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = {
|
|
9
|
+
chartDataProviderProps: Omit<ChartDataProviderProps<TSeries, TSignatures>, 'children'>;
|
|
9
10
|
chartsSurfaceProps: ChartsSurfaceProps & {
|
|
10
11
|
ref: React.Ref<SVGSVGElement>;
|
|
11
12
|
};
|
|
12
13
|
children: React.ReactNode;
|
|
13
14
|
};
|
|
14
|
-
export declare const useChartContainerProps: <TSeries extends ChartSeriesType = keyof import("../internals").ChartsSeriesConfig
|
|
15
|
+
export declare const useChartContainerProps: <TSeries extends ChartSeriesType = keyof import("../internals").ChartsSeriesConfig, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartContainerProps<TSeries, TSignatures>, ref: React.Ref<SVGSVGElement>) => UseChartContainerPropsReturnValue<TSeries, TSignatures>;
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["width", "height", "margin", "children", "series", "colors", "dataset", "desc", "disableAxisListener", "highlightedItem", "onHighlightChange", "sx", "title", "xAxis", "yAxis", "zAxis", "skipAnimation", "seriesConfig"];
|
|
5
|
+
const _excluded = ["width", "height", "margin", "children", "series", "colors", "dataset", "desc", "onAxisClick", "disableAxisListener", "highlightedItem", "onHighlightChange", "sx", "title", "xAxis", "yAxis", "zAxis", "skipAnimation", "seriesConfig", "plugins"];
|
|
6
6
|
import { ALL_PLUGINS } from "../internals/plugins/allPlugins.js";
|
|
7
7
|
export const useChartContainerProps = (props, ref) => {
|
|
8
|
-
const
|
|
8
|
+
const _ref = props,
|
|
9
|
+
{
|
|
9
10
|
width,
|
|
10
11
|
height,
|
|
11
12
|
margin,
|
|
@@ -14,6 +15,7 @@ export const useChartContainerProps = (props, ref) => {
|
|
|
14
15
|
colors,
|
|
15
16
|
dataset,
|
|
16
17
|
desc,
|
|
18
|
+
onAxisClick,
|
|
17
19
|
disableAxisListener,
|
|
18
20
|
highlightedItem,
|
|
19
21
|
onHighlightChange,
|
|
@@ -23,14 +25,14 @@ export const useChartContainerProps = (props, ref) => {
|
|
|
23
25
|
yAxis,
|
|
24
26
|
zAxis,
|
|
25
27
|
skipAnimation,
|
|
26
|
-
seriesConfig
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
seriesConfig,
|
|
29
|
+
plugins
|
|
30
|
+
} = _ref,
|
|
31
|
+
other = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
29
32
|
const chartsSurfaceProps = _extends({
|
|
30
33
|
title,
|
|
31
34
|
desc,
|
|
32
35
|
sx,
|
|
33
|
-
disableAxisListener,
|
|
34
36
|
ref
|
|
35
37
|
}, other);
|
|
36
38
|
const chartDataProviderProps = {
|
|
@@ -40,14 +42,16 @@ export const useChartContainerProps = (props, ref) => {
|
|
|
40
42
|
dataset,
|
|
41
43
|
highlightedItem,
|
|
42
44
|
onHighlightChange,
|
|
45
|
+
onAxisClick,
|
|
43
46
|
xAxis,
|
|
44
47
|
yAxis,
|
|
45
48
|
zAxis,
|
|
46
49
|
skipAnimation,
|
|
47
50
|
width,
|
|
48
51
|
height,
|
|
52
|
+
disableAxisListener,
|
|
49
53
|
seriesConfig,
|
|
50
|
-
plugins: ALL_PLUGINS
|
|
54
|
+
plugins: plugins ?? ALL_PLUGINS
|
|
51
55
|
};
|
|
52
56
|
return {
|
|
53
57
|
chartDataProviderProps,
|
|
@@ -55,9 +55,12 @@ process.env.NODE_ENV !== "production" ? ChartDataProvider.propTypes = {
|
|
|
55
55
|
children: PropTypes.node,
|
|
56
56
|
/**
|
|
57
57
|
* Color palette used to colorize multiple series.
|
|
58
|
-
* @default
|
|
58
|
+
* @default rainbowSurgePalette
|
|
59
59
|
*/
|
|
60
60
|
colors: PropTypes.any,
|
|
61
|
+
/**
|
|
62
|
+
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
63
|
+
*/
|
|
61
64
|
dataset: PropTypes.any,
|
|
62
65
|
/**
|
|
63
66
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
@@ -6,12 +6,6 @@ export interface ChartsSurfaceProps {
|
|
|
6
6
|
desc?: string;
|
|
7
7
|
sx?: SxProps<Theme>;
|
|
8
8
|
children?: React.ReactNode;
|
|
9
|
-
/**
|
|
10
|
-
* If `true`, the charts will not listen to the mouse move event.
|
|
11
|
-
* It might break interactive features, but will improve performance.
|
|
12
|
-
* @default false
|
|
13
|
-
*/
|
|
14
|
-
disableAxisListener?: boolean;
|
|
15
9
|
}
|
|
16
10
|
/**
|
|
17
11
|
* It provides the drawing area for the chart elements.
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["children", "
|
|
5
|
+
const _excluded = ["children", "className", "title", "desc"];
|
|
6
6
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import useForkRef from '@mui/utils/useForkRef';
|
|
10
|
-
import { useAxisEvents } from "../hooks/useAxisEvents.js";
|
|
11
10
|
import { ChartsAxesGradients } from "../internals/components/ChartsAxesGradients/index.js";
|
|
12
11
|
import { useSvgRef } from "../hooks/useSvgRef.js";
|
|
13
12
|
import { useSelector } from "../internals/store/useSelector.js";
|
|
@@ -65,14 +64,12 @@ const ChartsSurface = /*#__PURE__*/React.forwardRef(function ChartsSurface(inPro
|
|
|
65
64
|
});
|
|
66
65
|
const {
|
|
67
66
|
children,
|
|
68
|
-
disableAxisListener = false,
|
|
69
67
|
className,
|
|
70
68
|
title,
|
|
71
69
|
desc
|
|
72
70
|
} = themeProps,
|
|
73
71
|
other = _objectWithoutPropertiesLoose(themeProps, _excluded);
|
|
74
72
|
const hasIntrinsicSize = svgHeight > 0 && svgWidth > 0;
|
|
75
|
-
useAxisEvents(disableAxisListener);
|
|
76
73
|
return /*#__PURE__*/_jsxs(ChartsSurfaceStyles, _extends({
|
|
77
74
|
ownerState: {
|
|
78
75
|
width: propsWidth,
|
|
@@ -97,12 +94,6 @@ process.env.NODE_ENV !== "production" ? ChartsSurface.propTypes = {
|
|
|
97
94
|
children: PropTypes.node,
|
|
98
95
|
className: PropTypes.string,
|
|
99
96
|
desc: PropTypes.string,
|
|
100
|
-
/**
|
|
101
|
-
* If `true`, the charts will not listen to the mouse move event.
|
|
102
|
-
* It might break interactive features, but will improve performance.
|
|
103
|
-
* @default false
|
|
104
|
-
*/
|
|
105
|
-
disableAxisListener: PropTypes.bool,
|
|
106
97
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
107
98
|
title: PropTypes.string
|
|
108
99
|
} : void 0;
|
|
@@ -27,6 +27,7 @@ const ChartsTooltipRoot = styled(Popper, {
|
|
|
27
27
|
pointerEvents: 'none',
|
|
28
28
|
zIndex: theme.zIndex.modal
|
|
29
29
|
}));
|
|
30
|
+
const axisHasData = axis => axis?.data !== undefined && axis.data.length !== 0;
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
33
|
* Demos:
|
|
@@ -51,7 +52,6 @@ function ChartsTooltipContainer(inProps) {
|
|
|
51
52
|
const svgRef = useSvgRef();
|
|
52
53
|
const pointerType = usePointerType();
|
|
53
54
|
const xAxis = useXAxis();
|
|
54
|
-
const xAxisHasData = xAxis.data !== undefined && xAxis.data.length !== 0;
|
|
55
55
|
const popperRef = React.useRef(null);
|
|
56
56
|
const positionRef = useLazyRef(() => ({
|
|
57
57
|
x: 0,
|
|
@@ -60,7 +60,7 @@ function ChartsTooltipContainer(inProps) {
|
|
|
60
60
|
const store = useStore();
|
|
61
61
|
const isOpen = useSelector(store,
|
|
62
62
|
// eslint-disable-next-line no-nested-ternary
|
|
63
|
-
trigger === 'axis' ?
|
|
63
|
+
trigger === 'axis' ? axisHasData(xAxis) ? selectorChartsInteractionXAxisIsDefined : selectorChartsInteractionYAxisIsDefined : selectorChartsInteractionItemIsDefined);
|
|
64
64
|
const popperOpen = pointerType !== null && isOpen; // tooltipHasData;
|
|
65
65
|
|
|
66
66
|
React.useEffect(() => {
|
package/Gauge/Gauge.js
CHANGED
|
@@ -73,12 +73,6 @@ process.env.NODE_ENV !== "production" ? Gauge.propTypes = {
|
|
|
73
73
|
*/
|
|
74
74
|
cy: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
75
75
|
desc: PropTypes.string,
|
|
76
|
-
/**
|
|
77
|
-
* If `true`, the charts will not listen to the mouse move event.
|
|
78
|
-
* It might break interactive features, but will improve performance.
|
|
79
|
-
* @default false
|
|
80
|
-
*/
|
|
81
|
-
disableAxisListener: PropTypes.bool,
|
|
82
76
|
/**
|
|
83
77
|
* The end angle (deg).
|
|
84
78
|
* @default 360
|
package/Gauge/GaugeContainer.js
CHANGED
|
@@ -103,12 +103,6 @@ process.env.NODE_ENV !== "production" ? GaugeContainer.propTypes = {
|
|
|
103
103
|
*/
|
|
104
104
|
cy: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
105
105
|
desc: PropTypes.string,
|
|
106
|
-
/**
|
|
107
|
-
* If `true`, the charts will not listen to the mouse move event.
|
|
108
|
-
* It might break interactive features, but will improve performance.
|
|
109
|
-
* @default false
|
|
110
|
-
*/
|
|
111
|
-
disableAxisListener: PropTypes.bool,
|
|
112
106
|
/**
|
|
113
107
|
* The end angle (deg).
|
|
114
108
|
* @default 360
|
package/LineChart/LineChart.d.ts
CHANGED
|
@@ -12,13 +12,12 @@ import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight';
|
|
|
12
12
|
import { ChartsAxisSlotProps, ChartsAxisSlots } from '../models/axis';
|
|
13
13
|
import { LineHighlightPlotSlots, LineHighlightPlotSlotProps } from './LineHighlightPlot';
|
|
14
14
|
import { ChartsGridProps } from '../ChartsGrid';
|
|
15
|
-
import { ChartsOnAxisClickHandlerProps } from '../ChartsOnAxisClickHandler';
|
|
16
15
|
import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from '../ChartsOverlay';
|
|
17
16
|
export interface LineChartSlots extends ChartsAxisSlots, AreaPlotSlots, LinePlotSlots, MarkPlotSlots, LineHighlightPlotSlots, ChartsLegendSlots, ChartsOverlaySlots, ChartsTooltipSlots {
|
|
18
17
|
}
|
|
19
18
|
export interface LineChartSlotProps extends ChartsAxisSlotProps, AreaPlotSlotProps, LinePlotSlotProps, MarkPlotSlotProps, LineHighlightPlotSlotProps, ChartsLegendSlotProps, ChartsOverlaySlotProps, ChartsTooltipSlotProps {
|
|
20
19
|
}
|
|
21
|
-
export interface LineChartProps extends Omit<ChartContainerProps, 'series' | 'plugins' | 'zAxis'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'
|
|
20
|
+
export interface LineChartProps extends Omit<ChartContainerProps, 'series' | 'plugins' | 'zAxis'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
|
|
22
21
|
/**
|
|
23
22
|
* The series to display in the line chart.
|
|
24
23
|
* An array of [[LineSeriesType]] objects.
|
package/LineChart/LineChart.js
CHANGED
|
@@ -14,7 +14,6 @@ import { ChartsAxisHighlight } from "../ChartsAxisHighlight/index.js";
|
|
|
14
14
|
import { ChartsClipPath } from "../ChartsClipPath/index.js";
|
|
15
15
|
import { LineHighlightPlot } from "./LineHighlightPlot.js";
|
|
16
16
|
import { ChartsGrid } from "../ChartsGrid/index.js";
|
|
17
|
-
import { ChartsOnAxisClickHandler } from "../ChartsOnAxisClickHandler/index.js";
|
|
18
17
|
import { ChartsOverlay } from "../ChartsOverlay/index.js";
|
|
19
18
|
import { useLineChartProps } from "./useLineChartProps.js";
|
|
20
19
|
import { useChartContainerProps } from "../ChartContainer/useChartContainerProps.js";
|
|
@@ -40,7 +39,6 @@ const LineChart = /*#__PURE__*/React.forwardRef(function LineChart(inProps, ref)
|
|
|
40
39
|
const {
|
|
41
40
|
chartsWrapperProps,
|
|
42
41
|
chartContainerProps,
|
|
43
|
-
axisClickHandlerProps,
|
|
44
42
|
gridProps,
|
|
45
43
|
clipPathProps,
|
|
46
44
|
clipPathGroupProps,
|
|
@@ -62,7 +60,7 @@ const LineChart = /*#__PURE__*/React.forwardRef(function LineChart(inProps, ref)
|
|
|
62
60
|
return /*#__PURE__*/_jsx(ChartDataProvider, _extends({}, chartDataProviderProps, {
|
|
63
61
|
children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
|
|
64
62
|
children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
65
|
-
children: [
|
|
63
|
+
children: [/*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
66
64
|
children: [/*#__PURE__*/_jsx(AreaPlot, _extends({}, areaPlotProps)), /*#__PURE__*/_jsx(LinePlot, _extends({}, linePlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
|
|
67
65
|
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx("g", {
|
|
68
66
|
"data-drawing-container": true,
|
|
@@ -99,7 +97,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
99
97
|
className: PropTypes.string,
|
|
100
98
|
/**
|
|
101
99
|
* Color palette used to colorize multiple series.
|
|
102
|
-
* @default
|
|
100
|
+
* @default rainbowSurgePalette
|
|
103
101
|
*/
|
|
104
102
|
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
105
103
|
/**
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UseChartZAxisSignature } from '../internals/plugins/featurePlugins/useChartZAxis';
|
|
2
|
+
import { UseChartCartesianAxisSignature } from '../internals/plugins/featurePlugins/useChartCartesianAxis';
|
|
3
|
+
import { UseChartInteractionSignature } from '../internals/plugins/featurePlugins/useChartInteraction';
|
|
4
|
+
import { UseChartHighlightSignature } from '../internals/plugins/featurePlugins/useChartHighlight';
|
|
5
|
+
import { ConvertSignaturesIntoPlugins } from '../internals/plugins/models/helpers';
|
|
6
|
+
export type LineChartPluginsSignatures = [
|
|
7
|
+
UseChartZAxisSignature,
|
|
8
|
+
UseChartCartesianAxisSignature<'line'>,
|
|
9
|
+
UseChartInteractionSignature,
|
|
10
|
+
UseChartHighlightSignature
|
|
11
|
+
];
|
|
12
|
+
export declare const LINE_CHART_PLUGINS: ConvertSignaturesIntoPlugins<LineChartPluginsSignatures>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { useChartZAxis } from "../internals/plugins/featurePlugins/useChartZAxis/index.js";
|
|
2
|
+
import { useChartCartesianAxis } from "../internals/plugins/featurePlugins/useChartCartesianAxis/index.js";
|
|
3
|
+
import { useChartInteraction } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
|
|
4
|
+
import { useChartHighlight } from "../internals/plugins/featurePlugins/useChartHighlight/index.js";
|
|
5
|
+
export const LINE_CHART_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight];
|
|
@@ -3,7 +3,6 @@ import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight';
|
|
|
3
3
|
import { ChartsClipPathProps } from '../ChartsClipPath';
|
|
4
4
|
import { ChartsGridProps } from '../ChartsGrid';
|
|
5
5
|
import { ChartsLegendSlotExtension } from '../ChartsLegend';
|
|
6
|
-
import { ChartsOnAxisClickHandlerProps } from '../ChartsOnAxisClickHandler';
|
|
7
6
|
import { ChartsOverlayProps } from '../ChartsOverlay';
|
|
8
7
|
import { ChartContainerProps } from '../ChartContainer';
|
|
9
8
|
import { AreaPlotProps } from './AreaPlot';
|
|
@@ -12,6 +11,7 @@ import { LineHighlightPlotProps } from './LineHighlightPlot';
|
|
|
12
11
|
import { LinePlotProps } from './LinePlot';
|
|
13
12
|
import { MarkPlotProps } from './MarkPlot';
|
|
14
13
|
import type { ChartsWrapperProps } from '../internals/components/ChartsWrapper';
|
|
14
|
+
import { LineChartPluginsSignatures } from './LineChart.plugins';
|
|
15
15
|
/**
|
|
16
16
|
* A helper function that extracts LineChartProps from the input props
|
|
17
17
|
* and returns an object with props for the children components of LineChart.
|
|
@@ -21,8 +21,7 @@ import type { ChartsWrapperProps } from '../internals/components/ChartsWrapper';
|
|
|
21
21
|
*/
|
|
22
22
|
export declare const useLineChartProps: (props: LineChartProps) => {
|
|
23
23
|
chartsWrapperProps: Omit<ChartsWrapperProps, "children">;
|
|
24
|
-
chartContainerProps:
|
|
25
|
-
axisClickHandlerProps: ChartsOnAxisClickHandlerProps;
|
|
24
|
+
chartContainerProps: ChartContainerProps<"line", LineChartPluginsSignatures>;
|
|
26
25
|
gridProps: ChartsGridProps;
|
|
27
26
|
clipPathProps: ChartsClipPathProps;
|
|
28
27
|
clipPathGroupProps: {
|