@mui/x-charts 7.12.0 → 7.13.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/BarChart/BarChart.js +2 -0
- package/BarChart/BarPlot.js +2 -2
- package/BarChart/extremums.d.ts +1 -1
- package/BarChart/extremums.js +5 -3
- package/BarChart/formatter.d.ts +2 -2
- package/BarChart/getColor.d.ts +3 -3
- package/BarChart/getColor.js +4 -3
- package/BarChart/legend.d.ts +1 -1
- package/BarChart/plugin.d.ts +2 -2
- package/CHANGELOG.md +151 -2
- package/ChartContainer/ChartContainer.d.ts +4 -15
- package/ChartContainer/ChartContainer.js +8 -6
- package/ChartContainer/useChartContainerProps.d.ts +10 -7
- package/ChartContainer/useChartContainerProps.js +16 -19
- package/ChartContainer/useDefaultizeAxis.d.ts +2 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.js +2 -2
- package/ChartsTooltip/ChartsItemTooltipContent.js +2 -2
- package/ChartsTooltip/utils.js +4 -2
- package/ChartsXAxis/ChartsXAxis.js +11 -5
- package/ChartsYAxis/ChartsYAxis.js +11 -5
- package/LineChart/AreaPlot.js +11 -1
- package/LineChart/LineChart.js +2 -0
- package/LineChart/extremums.d.ts +1 -1
- package/LineChart/extremums.js +4 -15
- package/LineChart/formatter.d.ts +2 -2
- package/LineChart/getColor.d.ts +3 -3
- package/LineChart/getColor.js +4 -3
- package/LineChart/legend.d.ts +1 -1
- package/LineChart/plugin.d.ts +2 -2
- package/PieChart/PieChart.js +2 -0
- package/PieChart/formatter.d.ts +2 -2
- package/PieChart/getColor.d.ts +3 -2
- package/PieChart/getColor.js +4 -3
- package/PieChart/legend.d.ts +1 -1
- package/PieChart/plugin.d.ts +2 -2
- package/ResponsiveChartContainer/ResponsiveChartContainer.js +2 -0
- package/ResponsiveChartContainer/useResponsiveChartContainerProps.d.ts +1 -2
- package/ScatterChart/ScatterChart.js +2 -0
- package/ScatterChart/extremums.d.ts +1 -1
- package/ScatterChart/extremums.js +6 -14
- package/ScatterChart/formatter.d.ts +2 -2
- package/ScatterChart/getColor.d.ts +3 -4
- package/ScatterChart/getColor.js +4 -3
- package/ScatterChart/legend.d.ts +1 -1
- package/ScatterChart/plugin.d.ts +2 -2
- package/SparkLineChart/SparkLineChart.js +2 -0
- package/context/CartesianProvider/CartesianProvider.d.ts +3 -12
- package/context/CartesianProvider/CartesianProvider.js +6 -4
- package/context/CartesianProvider/computeValue.d.ts +2 -1
- package/context/CartesianProvider/defaultizeAxis.d.ts +2 -1
- package/context/CartesianProvider/getAxisExtremum.d.ts +2 -2
- package/context/CartesianProvider/getAxisExtremum.js +3 -10
- package/context/PluginProvider/ColorProcessor.types.d.ts +8 -0
- package/context/PluginProvider/ExtremumGetter.types.d.ts +14 -0
- package/context/PluginProvider/ExtremumGetter.types.js +5 -0
- package/context/PluginProvider/Plugin.types.d.ts +25 -0
- package/context/PluginProvider/Plugin.types.js +5 -0
- package/context/PluginProvider/PluginContext.d.ts +4 -0
- package/{hooks/useColor.js → context/PluginProvider/PluginContext.js} +11 -7
- package/context/PluginProvider/PluginProvider.d.ts +4 -0
- package/context/{ColorProvider.js → PluginProvider/PluginProvider.js} +12 -11
- package/context/PluginProvider/SeriesFormatter.types.d.ts +21 -0
- package/context/PluginProvider/SeriesFormatter.types.js +5 -0
- package/context/PluginProvider/index.d.ts +10 -0
- package/context/PluginProvider/index.js +115 -0
- package/context/PluginProvider/mergePlugins.d.ts +36 -0
- package/context/PluginProvider/mergePlugins.js +37 -0
- package/context/PluginProvider/useColorProcessor.d.ts +4 -0
- package/context/PluginProvider/useColorProcessor.js +23 -0
- package/context/PluginProvider/useSeriesFormatter.d.ts +4 -0
- package/context/PluginProvider/useSeriesFormatter.js +23 -0
- package/context/PluginProvider/useXExtremumGetter.d.ts +4 -0
- package/context/PluginProvider/useXExtremumGetter.js +23 -0
- package/context/PluginProvider/useYExtremumGetter.d.ts +4 -0
- package/context/PluginProvider/useYExtremumGetter.js +23 -0
- package/context/SeriesProvider/Series.types.d.ts +4 -10
- package/context/SeriesProvider/SeriesProvider.js +2 -1
- package/context/SeriesProvider/index.d.ts +1 -1
- package/context/SeriesProvider/processSeries.d.ts +2 -1
- package/esm/BarChart/BarChart.js +2 -0
- package/esm/BarChart/BarPlot.js +1 -2
- package/esm/BarChart/extremums.js +5 -3
- package/esm/BarChart/getColor.js +3 -2
- package/esm/ChartContainer/ChartContainer.js +9 -7
- package/esm/ChartContainer/useChartContainerProps.js +14 -19
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +1 -1
- package/esm/ChartsTooltip/ChartsItemTooltipContent.js +1 -1
- package/esm/ChartsTooltip/utils.js +4 -2
- package/esm/ChartsXAxis/ChartsXAxis.js +11 -5
- package/esm/ChartsYAxis/ChartsYAxis.js +11 -5
- package/esm/LineChart/AreaPlot.js +11 -1
- package/esm/LineChart/LineChart.js +2 -0
- package/esm/LineChart/extremums.js +4 -15
- package/esm/LineChart/getColor.js +3 -2
- package/esm/PieChart/PieChart.js +2 -0
- package/esm/PieChart/getColor.js +3 -2
- package/esm/ResponsiveChartContainer/ResponsiveChartContainer.js +2 -0
- package/esm/ScatterChart/ScatterChart.js +2 -0
- package/esm/ScatterChart/extremums.js +6 -14
- package/esm/ScatterChart/getColor.js +3 -2
- package/esm/SparkLineChart/SparkLineChart.js +2 -0
- package/esm/context/CartesianProvider/CartesianProvider.js +6 -4
- package/esm/context/CartesianProvider/getAxisExtremum.js +3 -10
- package/esm/context/PluginProvider/Plugin.types.js +1 -0
- package/esm/context/PluginProvider/PluginContext.js +13 -0
- package/esm/context/PluginProvider/PluginProvider.js +19 -0
- package/esm/context/PluginProvider/SeriesFormatter.types.js +1 -0
- package/esm/context/PluginProvider/index.js +10 -0
- package/esm/context/PluginProvider/mergePlugins.js +30 -0
- package/esm/context/PluginProvider/useColorProcessor.js +15 -0
- package/esm/context/PluginProvider/useSeriesFormatter.js +15 -0
- package/esm/context/PluginProvider/useXExtremumGetter.js +15 -0
- package/esm/context/PluginProvider/useYExtremumGetter.js +15 -0
- package/esm/context/SeriesProvider/SeriesProvider.js +2 -1
- package/esm/hooks/useTicks.js +5 -2
- package/esm/internals/index.js +1 -1
- package/esm/internals/isInfinity.js +3 -0
- package/esm/models/index.js +0 -1
- package/hooks/useTicks.js +5 -2
- package/index.js +1 -1
- package/internals/colorScale.d.ts +1 -1
- package/internals/defaultizeColor.d.ts +1 -0
- package/internals/index.d.ts +1 -1
- package/internals/index.js +12 -12
- package/internals/isInfinity.d.ts +1 -0
- package/internals/isInfinity.js +9 -0
- package/models/axis.d.ts +2 -0
- package/models/index.d.ts +0 -1
- package/models/index.js +0 -11
- package/models/seriesType/config.d.ts +0 -26
- package/models/seriesType/line.d.ts +10 -0
- package/modern/BarChart/BarChart.js +2 -0
- package/modern/BarChart/BarPlot.js +1 -2
- package/modern/BarChart/extremums.js +5 -3
- package/modern/BarChart/getColor.js +3 -2
- package/modern/ChartContainer/ChartContainer.js +9 -7
- package/modern/ChartContainer/useChartContainerProps.js +14 -19
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +1 -1
- package/modern/ChartsTooltip/ChartsItemTooltipContent.js +1 -1
- package/modern/ChartsTooltip/utils.js +4 -2
- package/modern/ChartsXAxis/ChartsXAxis.js +11 -5
- package/modern/ChartsYAxis/ChartsYAxis.js +11 -5
- package/modern/LineChart/AreaPlot.js +11 -1
- package/modern/LineChart/LineChart.js +2 -0
- package/modern/LineChart/extremums.js +4 -15
- package/modern/LineChart/getColor.js +3 -2
- package/modern/PieChart/PieChart.js +2 -0
- package/modern/PieChart/getColor.js +3 -2
- package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +2 -0
- package/modern/ScatterChart/ScatterChart.js +2 -0
- package/modern/ScatterChart/extremums.js +6 -14
- package/modern/ScatterChart/getColor.js +3 -2
- package/modern/SparkLineChart/SparkLineChart.js +2 -0
- package/modern/context/CartesianProvider/CartesianProvider.js +6 -4
- package/modern/context/CartesianProvider/getAxisExtremum.js +3 -10
- package/modern/context/PluginProvider/ColorProcessor.types.js +1 -0
- package/modern/context/PluginProvider/ExtremumGetter.types.js +1 -0
- package/modern/context/PluginProvider/Plugin.types.js +1 -0
- package/modern/context/PluginProvider/PluginContext.js +13 -0
- package/modern/context/PluginProvider/PluginProvider.js +19 -0
- package/modern/context/PluginProvider/SeriesFormatter.types.js +1 -0
- package/modern/context/PluginProvider/index.js +10 -0
- package/modern/context/PluginProvider/mergePlugins.js +30 -0
- package/modern/context/PluginProvider/useColorProcessor.js +15 -0
- package/modern/context/PluginProvider/useSeriesFormatter.js +15 -0
- package/modern/context/PluginProvider/useXExtremumGetter.js +15 -0
- package/modern/context/PluginProvider/useYExtremumGetter.js +15 -0
- package/modern/context/SeriesProvider/SeriesProvider.js +2 -1
- package/modern/hooks/useTicks.js +5 -2
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -1
- package/modern/internals/isInfinity.js +3 -0
- package/modern/models/index.js +0 -1
- package/package.json +2 -2
- package/ChartContainer/defaultPlugins.d.ts +0 -2
- package/ChartContainer/defaultPlugins.js +0 -11
- package/ChartContainer/useChartContainerHooks.d.ts +0 -11
- package/ChartContainer/useChartContainerHooks.js +0 -34
- package/ChartContainer/usePluginsMerge.d.ts +0 -9
- package/ChartContainer/usePluginsMerge.js +0 -39
- package/context/ColorProvider.d.ts +0 -12
- package/esm/ChartContainer/defaultPlugins.js +0 -5
- package/esm/ChartContainer/useChartContainerHooks.js +0 -24
- package/esm/ChartContainer/usePluginsMerge.js +0 -31
- package/esm/context/ColorProvider.js +0 -16
- package/esm/hooks/useColor.js +0 -9
- package/hooks/useColor.d.ts +0 -4
- package/models/plugin.d.ts +0 -19
- package/modern/ChartContainer/defaultPlugins.js +0 -5
- package/modern/ChartContainer/useChartContainerHooks.js +0 -24
- package/modern/ChartContainer/usePluginsMerge.js +0 -31
- package/modern/context/ColorProvider.js +0 -16
- package/modern/hooks/useColor.js +0 -9
- /package/{models/plugin.js → context/PluginProvider/ColorProcessor.types.js} +0 -0
- /package/esm/{models/plugin.js → context/PluginProvider/ColorProcessor.types.js} +0 -0
- /package/{modern/models/plugin.js → esm/context/PluginProvider/ExtremumGetter.types.js} +0 -0
package/BarChart/BarChart.js
CHANGED
|
@@ -282,6 +282,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
282
282
|
slotProps: _propTypes.default.object,
|
|
283
283
|
slots: _propTypes.default.object,
|
|
284
284
|
stroke: _propTypes.default.string,
|
|
285
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
285
286
|
tickFontSize: _propTypes.default.number,
|
|
286
287
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
287
288
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -334,6 +335,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
334
335
|
slotProps: _propTypes.default.object,
|
|
335
336
|
slots: _propTypes.default.object,
|
|
336
337
|
stroke: _propTypes.default.string,
|
|
338
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
337
339
|
tickFontSize: _propTypes.default.number,
|
|
338
340
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
339
341
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
package/BarChart/BarPlot.js
CHANGED
|
@@ -20,6 +20,8 @@ var _checkScaleErrors = require("./checkScaleErrors");
|
|
|
20
20
|
var _useSeries = require("../hooks/useSeries");
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
const _excluded = ["skipAnimation", "onItemClick", "borderRadius", "barLabel"];
|
|
23
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
24
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
25
|
/**
|
|
24
26
|
* Solution of the equations
|
|
25
27
|
* W = barWidth * N + offset * (N-1)
|
|
@@ -29,8 +31,6 @@ const _excluded = ["skipAnimation", "onItemClick", "borderRadius", "barLabel"];
|
|
|
29
31
|
* @param gapRatio The ratio of the gap between bars over the bar width.
|
|
30
32
|
* @returns The bar width and the offset between bars.
|
|
31
33
|
*/
|
|
32
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
33
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
34
34
|
function getBandSize({
|
|
35
35
|
bandWidth: W,
|
|
36
36
|
numberOfGroups: N,
|
package/BarChart/extremums.d.ts
CHANGED
package/BarChart/extremums.js
CHANGED
|
@@ -22,9 +22,11 @@ const getValueExtremum = params => {
|
|
|
22
22
|
const yAxisId = series[seriesId].yAxisId ?? series[seriesId].yAxisKey;
|
|
23
23
|
return yAxisId === axis.id || isDefaultAxis && yAxisId === undefined;
|
|
24
24
|
}).reduce((acc, seriesId) => {
|
|
25
|
-
const [seriesMin, seriesMax] = series[seriesId].stackedData?.reduce((seriesAcc, values) =>
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
const [seriesMin, seriesMax] = series[seriesId].stackedData?.reduce((seriesAcc, values) => {
|
|
26
|
+
return [Math.min(...values, seriesAcc[0]), Math.max(...values, seriesAcc[1])];
|
|
27
|
+
}, [Infinity, -Infinity]) ?? [Infinity, -Infinity];
|
|
28
|
+
return [Math.min(seriesMin, acc[0]), Math.max(seriesMax, acc[1])];
|
|
29
|
+
}, [Infinity, -Infinity]);
|
|
28
30
|
};
|
|
29
31
|
const getExtremumX = params => {
|
|
30
32
|
// Notice that bar should be all horizontal or all vertical.
|
package/BarChart/formatter.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const formatter:
|
|
1
|
+
import { SeriesFormatter } from '../context/PluginProvider/SeriesFormatter.types';
|
|
2
|
+
declare const formatter: SeriesFormatter<'bar'>;
|
|
3
3
|
export default formatter;
|
package/BarChart/getColor.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export default
|
|
1
|
+
import { ColorProcessor } from '../context/PluginProvider/ColorProcessor.types';
|
|
2
|
+
declare const getColor: ColorProcessor<'bar'>;
|
|
3
|
+
export default getColor;
|
package/BarChart/getColor.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
7
|
-
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
const getColor = (series, xAxis, yAxis) => {
|
|
8
8
|
const verticalLayout = series.layout === 'vertical';
|
|
9
9
|
const bandColorScale = verticalLayout ? xAxis?.colorScale : yAxis?.colorScale;
|
|
10
10
|
const valueColorScale = verticalLayout ? yAxis?.colorScale : xAxis?.colorScale;
|
|
@@ -30,4 +30,5 @@ function getColor(series, xAxis, yAxis) {
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
return () => series.color;
|
|
33
|
-
}
|
|
33
|
+
};
|
|
34
|
+
var _default = exports.default = getColor;
|
package/BarChart/legend.d.ts
CHANGED
package/BarChart/plugin.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const plugin:
|
|
1
|
+
import type { ChartsPlugin } from '../context/PluginProvider';
|
|
2
|
+
export declare const plugin: ChartsPlugin<'bar'>;
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,155 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 7.13.0
|
|
7
|
+
|
|
8
|
+
_Aug 16, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 💫 Allow to [edit the label](https://mui.com/x/react-tree-view/rich-tree-view/editing/) of Tree View's items.
|
|
13
|
+
|
|
14
|
+
<img width="344" src="https://github.com/user-attachments/assets/1a6cf765-2dc8-4906-bd93-139086eed148" alt="Item label editing" />
|
|
15
|
+
|
|
16
|
+
- 🔧 Improve rows accessibility on the Data Grid features "Tree Data" and "Row Grouping". Certain "Row Grouping" accessibility updates will only be applied if experimental feature flag is enabled. See the [documentation](https://mui.com/x/react-data-grid/row-grouping/#accessibility-changes-in-v8) for more information.
|
|
17
|
+
- 🌍 Improve Vietnamese (vi-VN) locale on the Data Grid
|
|
18
|
+
- 🐞 Bugfixes
|
|
19
|
+
|
|
20
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
21
|
+
|
|
22
|
+
### Data Grid
|
|
23
|
+
|
|
24
|
+
#### `@mui/x-data-grid@7.13.0`
|
|
25
|
+
|
|
26
|
+
- [DataGrid] Fix CSV export for `null` and `undefined` values (#14166) @k-rajat19
|
|
27
|
+
- [DataGrid] Fix error logged during skeleton loading with nested data grid (#14186) @KenanYusuf
|
|
28
|
+
- [DataGrid] Remove needless check in `useGridStateInitialization` (#14181) @k-rajat19
|
|
29
|
+
- [DataGrid] Add recipe for persisting filters in local storage (#14208) @cherniavskii
|
|
30
|
+
- [l10n] Improve Vietnamese (vi-VN) locale (#14216) @hungnd-casso
|
|
31
|
+
|
|
32
|
+
#### `@mui/x-data-grid-pro@7.13.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
33
|
+
|
|
34
|
+
Same changes as in `@mui/x-data-grid@7.13.0`, plus:
|
|
35
|
+
|
|
36
|
+
- [DataGridPro] Fix Tree Data and Row Grouping rows accessibility (#13623) @arminmeh
|
|
37
|
+
|
|
38
|
+
#### `@mui/x-data-grid-premium@7.13.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
39
|
+
|
|
40
|
+
Same changes as in `@mui/x-data-grid-pro@7.13.0`.
|
|
41
|
+
|
|
42
|
+
### Date and Time Pickers
|
|
43
|
+
|
|
44
|
+
#### `@mui/x-date-pickers@7.13.0`
|
|
45
|
+
|
|
46
|
+
- [pickers] Fix date and time merging to retain milliseconds (#14173) @LukasTy
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-date-pickers-pro@7.13.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
49
|
+
|
|
50
|
+
Same changes as in `@mui/x-date-pickers@7.13.0`.
|
|
51
|
+
|
|
52
|
+
### Charts
|
|
53
|
+
|
|
54
|
+
#### `@mui/x-charts@7.13.0`
|
|
55
|
+
|
|
56
|
+
- [charts] Add `baseline` property to the `LineChart` `series` (#14153) @JCQuintas
|
|
57
|
+
- [charts] Fix issue where tooltip would disappear on mouse click (#14187) @alexfauquette
|
|
58
|
+
- [charts] Rename `CartesianContextProvider` to `CartesianProvider` (#14102) @JCQuintas
|
|
59
|
+
- [charts] Support axis with the same value for all data points (#14191) @alexfauquette
|
|
60
|
+
|
|
61
|
+
#### `@mui/x-date-charts-pro@7.0.0-alpha.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
62
|
+
|
|
63
|
+
Same changes as in `@mui/x-charts@7.13.0`.
|
|
64
|
+
|
|
65
|
+
### Tree View
|
|
66
|
+
|
|
67
|
+
#### `@mui/x-tree-view@7.13.0`
|
|
68
|
+
|
|
69
|
+
- [TreeView] Add label editing feature (#13388) @noraleonte
|
|
70
|
+
- [TreeView] Fix the parameters passed for the `canMoveItemToNewPosition` prop (#14176) @flaviendelangle
|
|
71
|
+
|
|
72
|
+
### Docs
|
|
73
|
+
|
|
74
|
+
- [docs] Extract dataset in the Line chart docs (#14034) @alexfauquette
|
|
75
|
+
- [docs] Remove redundant encoding in the mock data source server (#14185) @MBilalShafi
|
|
76
|
+
- [docs] Use Netflix financial results to document bar charts (#13991) @alexfauquette
|
|
77
|
+
- [docs] Remove relience of abbreviations (#14226) @oliviertassinari
|
|
78
|
+
|
|
79
|
+
### Core
|
|
80
|
+
|
|
81
|
+
- [core] Bump monorepo (#14141) @Janpot
|
|
82
|
+
- [core] Fix ESLint issue (#14207) @LukasTy
|
|
83
|
+
- [core] Fix Netlify build cache issue (#14182) @cherniavskii
|
|
84
|
+
- [code-infra] Refactor Netlify `cache-docs` plugin setup (#14105) @LukasTy
|
|
85
|
+
- [internals] Move utils needed for tree view virtualization to shared package (#14202) @flaviendelangle
|
|
86
|
+
|
|
87
|
+
## 7.12.1
|
|
88
|
+
|
|
89
|
+
_Aug 8, 2024_
|
|
90
|
+
|
|
91
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
92
|
+
|
|
93
|
+
- 🎨 Charts get a new component to display color mapping in the legend
|
|
94
|
+
- 🚀 The `@mui/x-charts-pro` is released in alpha version 🧪. This new package introduces two main features:
|
|
95
|
+
- The Heatmap component
|
|
96
|
+
- The zoom interaction on the bar, line, and scatter charts
|
|
97
|
+
- 🌍 Improve Dutch (nl-NL) locale on the Date and Time Pickers
|
|
98
|
+
- 🐞 Bugfixes
|
|
99
|
+
|
|
100
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
101
|
+
|
|
102
|
+
### Data Grid
|
|
103
|
+
|
|
104
|
+
#### `@mui/x-data-grid@7.12.1`
|
|
105
|
+
|
|
106
|
+
- [DataGrid] Fix `checkboxSelectionVisibleOnly` behavior with server-side pagination (#14083) @MBilalShafi
|
|
107
|
+
- [DataGrid] Fix `columnHeadersContainerRef` being `undefined` before mount (#14051) @samwato
|
|
108
|
+
- [DataGrid] Support Yarn PnP (#14126) @cherniavskii
|
|
109
|
+
|
|
110
|
+
#### `@mui/x-data-grid-pro@7.12.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
111
|
+
|
|
112
|
+
Same changes as in `@mui/x-data-grid@7.12.1`.
|
|
113
|
+
|
|
114
|
+
#### `@mui/x-data-grid-premium@7.12.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
115
|
+
|
|
116
|
+
Same changes as in `@mui/x-data-grid-pro@7.12.1`.
|
|
117
|
+
|
|
118
|
+
### Date and Time Pickers
|
|
119
|
+
|
|
120
|
+
#### `@mui/x-date-pickers@7.12.1`
|
|
121
|
+
|
|
122
|
+
- [l10n] Improve Dutch (nlNL) locale (pickers) (#14036) @Robin1896
|
|
123
|
+
|
|
124
|
+
#### `@mui/x-date-pickers-pro@7.12.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
125
|
+
|
|
126
|
+
Same changes as in `@mui/x-date-pickers@7.12.1`.
|
|
127
|
+
|
|
128
|
+
### Charts
|
|
129
|
+
|
|
130
|
+
#### `@mui/x-charts@7.12.1`
|
|
131
|
+
|
|
132
|
+
- [charts] Fix charts vendor publish config (#14073) @JCQuintas
|
|
133
|
+
- [charts] Move `plugins` to `PluginProvider` (#14056) @JCQuintas
|
|
134
|
+
|
|
135
|
+
#### `@mui/x-date-charts-pro@7.0.0-alpha.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
136
|
+
|
|
137
|
+
Same changes as in `@mui/x-charts@7.12.1`, plus:
|
|
138
|
+
|
|
139
|
+
- [charts-pro] Release the pro package in alpha (#13859) @alexfauquette
|
|
140
|
+
|
|
141
|
+
### Tree View
|
|
142
|
+
|
|
143
|
+
#### `@mui/x-tree-view@7.12.1`
|
|
144
|
+
|
|
145
|
+
### Docs
|
|
146
|
+
|
|
147
|
+
- [docs] Add a warning to promote the usage of `updateRows` (#14027) @MBilalShafi
|
|
148
|
+
- [docs] Disable ad in `Rich Tree View-Ordering` page (#14123) @oliviertassinari
|
|
149
|
+
- [docs] Redesign Date and Time Pickers overview page (#13241) @noraleonte
|
|
150
|
+
|
|
151
|
+
- [CHANGELOG] Polish details @oliviertassinari
|
|
152
|
+
- [code-infra] Use concurrency 1 in CircleCI (#14110) @JCQuintas
|
|
153
|
+
- [infra] Re-added the removal of `Latest Version` section (#14132) @michelengelen
|
|
154
|
+
|
|
6
155
|
## 7.12.0
|
|
7
156
|
|
|
8
157
|
_Aug 1, 2024_
|
|
@@ -24,9 +173,9 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
24
173
|
|
|
25
174
|
- 🎁 Introduce [item reordering using drag and drop](https://mui.com/x/react-tree-view/rich-tree-view/ordering/) on the `RichTreeViewPro` component
|
|
26
175
|
|
|
27
|
-
<img width="
|
|
176
|
+
<img width="287" src="https://github.com/user-attachments/assets/78bd83c5-7ce4-4ed7-acf9-be70b2dbce54" alt="Item reordering using drag and drop" />
|
|
28
177
|
|
|
29
|
-
- 📦 Support
|
|
178
|
+
- 📦 Support CommonJS bundle out of the box on `@mui/x-charts` by adding vendored D3 dependencies.
|
|
30
179
|
|
|
31
180
|
- This modifies how the package imports D3.js. It will impact you if you use `d3` packages installed by `@mui/x-charts` and don't have them in your `package.json`. You shouldn't be affected otherwise.
|
|
32
181
|
- For more context, the initial issue is caused by D3 only exporting ESM.
|
|
@@ -2,13 +2,12 @@ import * as React from 'react';
|
|
|
2
2
|
import { DrawingProviderProps } from '../context/DrawingProvider';
|
|
3
3
|
import { SeriesProviderProps } from '../context/SeriesProvider';
|
|
4
4
|
import { ChartsSurfaceProps } from '../ChartsSurface';
|
|
5
|
-
import {
|
|
5
|
+
import { CartesianProviderProps } from '../context/CartesianProvider';
|
|
6
6
|
import { HighlightedProviderProps, ZAxisContextProviderProps } from '../context';
|
|
7
|
-
import {
|
|
8
|
-
import { ChartSeriesType } from '../models/seriesType/config';
|
|
7
|
+
import { PluginProviderProps } from '../context/PluginProvider';
|
|
9
8
|
import { AxisConfig, ChartsXAxisProps, ChartsYAxisProps, ScaleName } from '../models/axis';
|
|
10
9
|
import { MakeOptional } from '../models/helpers';
|
|
11
|
-
export type ChartContainerProps = Omit<ChartsSurfaceProps & Omit<SeriesProviderProps, 'seriesFormatters'> & Omit<DrawingProviderProps, 'svgRef'> & Pick<
|
|
10
|
+
export type ChartContainerProps = Omit<ChartsSurfaceProps & Omit<SeriesProviderProps, 'seriesFormatters'> & Omit<DrawingProviderProps, 'svgRef'> & Pick<CartesianProviderProps, 'dataset'> & ZAxisContextProviderProps & HighlightedProviderProps & PluginProviderProps, 'children'> & {
|
|
12
11
|
/**
|
|
13
12
|
* The configuration of the x-axes.
|
|
14
13
|
* If not provided, a default axis config is used.
|
|
@@ -22,13 +21,8 @@ export type ChartContainerProps = Omit<ChartsSurfaceProps & Omit<SeriesProviderP
|
|
|
22
21
|
*/
|
|
23
22
|
yAxis?: MakeOptional<AxisConfig<ScaleName, any, ChartsYAxisProps>, 'id'>[];
|
|
24
23
|
children?: React.ReactNode;
|
|
25
|
-
/**
|
|
26
|
-
* An array of plugins defining how to preprocess data.
|
|
27
|
-
* If not provided, the container supports line, bar, scatter and pie charts.
|
|
28
|
-
*/
|
|
29
|
-
plugins?: ChartsPluginType<ChartSeriesType>[];
|
|
30
24
|
};
|
|
31
|
-
declare const ChartContainer: React.ForwardRefExoticComponent<Omit<ChartsSurfaceProps & Omit<SeriesProviderProps, "seriesFormatters"> & Omit<DrawingProviderProps, "svgRef"> & Pick<
|
|
25
|
+
declare const ChartContainer: React.ForwardRefExoticComponent<Omit<ChartsSurfaceProps & Omit<SeriesProviderProps, "seriesFormatters"> & Omit<DrawingProviderProps, "svgRef"> & Pick<CartesianProviderProps, "dataset"> & ZAxisContextProviderProps & HighlightedProviderProps & PluginProviderProps, "children"> & {
|
|
32
26
|
/**
|
|
33
27
|
* The configuration of the x-axes.
|
|
34
28
|
* If not provided, a default axis config is used.
|
|
@@ -42,10 +36,5 @@ declare const ChartContainer: React.ForwardRefExoticComponent<Omit<ChartsSurface
|
|
|
42
36
|
*/
|
|
43
37
|
yAxis?: MakeOptional<AxisConfig<ScaleName, any, ChartsYAxisProps>, "id">[];
|
|
44
38
|
children?: React.ReactNode;
|
|
45
|
-
/**
|
|
46
|
-
* An array of plugins defining how to preprocess data.
|
|
47
|
-
* If not provided, the container supports line, bar, scatter and pie charts.
|
|
48
|
-
*/
|
|
49
|
-
plugins?: ChartsPluginType<ChartSeriesType>[];
|
|
50
39
|
} & React.RefAttributes<unknown>>;
|
|
51
40
|
export { ChartContainer };
|
|
@@ -11,11 +11,11 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
var _DrawingProvider = require("../context/DrawingProvider");
|
|
12
12
|
var _SeriesProvider = require("../context/SeriesProvider");
|
|
13
13
|
var _InteractionProvider = require("../context/InteractionProvider");
|
|
14
|
-
var _ColorProvider = require("../context/ColorProvider");
|
|
15
14
|
var _ChartsSurface = require("../ChartsSurface");
|
|
16
15
|
var _CartesianProvider = require("../context/CartesianProvider");
|
|
17
16
|
var _ChartsAxesGradients = require("../internals/components/ChartsAxesGradients");
|
|
18
17
|
var _context = require("../context");
|
|
18
|
+
var _PluginProvider = require("../context/PluginProvider");
|
|
19
19
|
var _useChartContainerProps = require("./useChartContainerProps");
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
@@ -24,17 +24,17 @@ const ChartContainer = exports.ChartContainer = /*#__PURE__*/React.forwardRef(fu
|
|
|
24
24
|
const {
|
|
25
25
|
children,
|
|
26
26
|
drawingProviderProps,
|
|
27
|
-
colorProviderProps,
|
|
28
27
|
seriesProviderProps,
|
|
29
|
-
|
|
28
|
+
cartesianProviderProps,
|
|
30
29
|
zAxisContextProps,
|
|
31
30
|
highlightedProviderProps,
|
|
32
|
-
chartsSurfaceProps
|
|
31
|
+
chartsSurfaceProps,
|
|
32
|
+
pluginProviderProps
|
|
33
33
|
} = (0, _useChartContainerProps.useChartContainerProps)(props, ref);
|
|
34
34
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DrawingProvider.DrawingProvider, (0, _extends2.default)({}, drawingProviderProps, {
|
|
35
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
35
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PluginProvider.PluginProvider, (0, _extends2.default)({}, pluginProviderProps, {
|
|
36
36
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SeriesProvider.SeriesProvider, (0, _extends2.default)({}, seriesProviderProps, {
|
|
37
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CartesianProvider.
|
|
37
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CartesianProvider.CartesianProvider, (0, _extends2.default)({}, cartesianProviderProps, {
|
|
38
38
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.ZAxisContextProvider, (0, _extends2.default)({}, zAxisContextProps, {
|
|
39
39
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_InteractionProvider.InteractionProvider, {
|
|
40
40
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.HighlightedProvider, (0, _extends2.default)({}, highlightedProviderProps, {
|
|
@@ -164,6 +164,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
164
164
|
slotProps: _propTypes.default.object,
|
|
165
165
|
slots: _propTypes.default.object,
|
|
166
166
|
stroke: _propTypes.default.string,
|
|
167
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
167
168
|
tickFontSize: _propTypes.default.number,
|
|
168
169
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
169
170
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -216,6 +217,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
216
217
|
slotProps: _propTypes.default.object,
|
|
217
218
|
slots: _propTypes.default.object,
|
|
218
219
|
stroke: _propTypes.default.string,
|
|
220
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
219
221
|
tickFontSize: _propTypes.default.number,
|
|
220
222
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
221
223
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { DrawingProviderProps } from '../context/DrawingProvider';
|
|
2
|
-
import type {
|
|
3
|
-
import type { CartesianContextProviderProps } from '../context/CartesianProvider';
|
|
3
|
+
import type { CartesianProviderProps } from '../context/CartesianProvider';
|
|
4
4
|
import type { SeriesProviderProps } from '../context/SeriesProvider';
|
|
5
5
|
import type { ZAxisContextProviderProps } from '../context/ZAxisContextProvider';
|
|
6
6
|
import type { ChartContainerProps } from './ChartContainer';
|
|
7
7
|
import { HighlightedProviderProps } from '../context';
|
|
8
8
|
import { ChartsSurfaceProps } from '../ChartsSurface';
|
|
9
|
+
import { PluginProviderProps } from '../context/PluginProvider';
|
|
9
10
|
export declare const useChartContainerProps: (props: ChartContainerProps, ref: React.ForwardedRef<unknown>) => {
|
|
10
|
-
children:
|
|
11
|
+
children: React.ReactNode;
|
|
11
12
|
drawingProviderProps: Omit<DrawingProviderProps, "children">;
|
|
12
|
-
colorProviderProps: Omit<ColorProviderProps, "children">;
|
|
13
13
|
seriesProviderProps: Omit<SeriesProviderProps, "children">;
|
|
14
|
-
|
|
14
|
+
cartesianProviderProps: Omit<CartesianProviderProps, "children">;
|
|
15
15
|
zAxisContextProps: Omit<ZAxisContextProviderProps, "children">;
|
|
16
16
|
highlightedProviderProps: Omit<HighlightedProviderProps, "children">;
|
|
17
17
|
chartsSurfaceProps: ChartsSurfaceProps & {
|
|
18
18
|
ref: any;
|
|
19
19
|
};
|
|
20
|
+
pluginProviderProps: Omit<PluginProviderProps, "children">;
|
|
20
21
|
xAxis: {
|
|
21
22
|
reverse?: boolean | undefined;
|
|
22
23
|
fill?: string | undefined;
|
|
@@ -25,12 +26,12 @@ export declare const useChartContainerProps: (props: ChartContainerProps, ref: R
|
|
|
25
26
|
label?: string | undefined;
|
|
26
27
|
max?: (number | Date) | undefined;
|
|
27
28
|
min?: (number | Date) | undefined;
|
|
29
|
+
sx?: import("@mui/system").SxProps | undefined;
|
|
28
30
|
classes?: Partial<import("..").ChartsAxisClasses> | undefined;
|
|
29
31
|
slots?: Partial<import("../internals").ChartsAxisSlots> | undefined;
|
|
30
32
|
slotProps?: Partial<import("../internals").ChartsAxisSlotProps> | undefined;
|
|
31
33
|
dataKey?: string | undefined;
|
|
32
34
|
valueFormatter?: ((value: any, context: import("../internals").AxisValueFormatterContext) => string) | undefined;
|
|
33
|
-
colorMap?: import("../models/colorMapping").ContinuousColorConfig<number | Date> | import("../models/colorMapping").PiecewiseColorConfig<number | Date> | import("../models/colorMapping").OrdinalColorConfig<string | number | Date> | undefined;
|
|
34
35
|
tickMaxStep?: number | undefined;
|
|
35
36
|
tickMinStep?: number | undefined;
|
|
36
37
|
tickNumber?: number | undefined;
|
|
@@ -46,6 +47,7 @@ export declare const useChartContainerProps: (props: ChartContainerProps, ref: R
|
|
|
46
47
|
tickPlacement?: ("start" | "end" | "middle" | "extremities") | undefined;
|
|
47
48
|
tickLabelPlacement?: ("middle" | "tick") | undefined;
|
|
48
49
|
scaleType?: "linear" | "time" | "log" | "band" | "point" | "pow" | "sqrt" | "utc" | undefined;
|
|
50
|
+
colorMap?: import("../models/colorMapping").ContinuousColorConfig<number | Date> | import("../models/colorMapping").PiecewiseColorConfig<number | Date> | import("../models/colorMapping").OrdinalColorConfig<string | number | Date> | undefined;
|
|
49
51
|
hideTooltip?: boolean | undefined;
|
|
50
52
|
id: import("../internals").AxisId;
|
|
51
53
|
}[];
|
|
@@ -57,12 +59,12 @@ export declare const useChartContainerProps: (props: ChartContainerProps, ref: R
|
|
|
57
59
|
label?: string | undefined;
|
|
58
60
|
max?: (number | Date) | undefined;
|
|
59
61
|
min?: (number | Date) | undefined;
|
|
62
|
+
sx?: import("@mui/system").SxProps | undefined;
|
|
60
63
|
classes?: Partial<import("..").ChartsAxisClasses> | undefined;
|
|
61
64
|
slots?: Partial<import("../internals").ChartsAxisSlots> | undefined;
|
|
62
65
|
slotProps?: Partial<import("../internals").ChartsAxisSlotProps> | undefined;
|
|
63
66
|
dataKey?: string | undefined;
|
|
64
67
|
valueFormatter?: ((value: any, context: import("../internals").AxisValueFormatterContext) => string) | undefined;
|
|
65
|
-
colorMap?: import("../models/colorMapping").ContinuousColorConfig<number | Date> | import("../models/colorMapping").PiecewiseColorConfig<number | Date> | import("../models/colorMapping").OrdinalColorConfig<string | number | Date> | undefined;
|
|
66
68
|
tickMaxStep?: number | undefined;
|
|
67
69
|
tickMinStep?: number | undefined;
|
|
68
70
|
tickNumber?: number | undefined;
|
|
@@ -78,6 +80,7 @@ export declare const useChartContainerProps: (props: ChartContainerProps, ref: R
|
|
|
78
80
|
tickPlacement?: ("start" | "end" | "middle" | "extremities") | undefined;
|
|
79
81
|
tickLabelPlacement?: ("middle" | "tick") | undefined;
|
|
80
82
|
scaleType?: "linear" | "time" | "log" | "band" | "point" | "pow" | "sqrt" | "utc" | undefined;
|
|
83
|
+
colorMap?: import("../models/colorMapping").ContinuousColorConfig<number | Date> | import("../models/colorMapping").PiecewiseColorConfig<number | Date> | import("../models/colorMapping").OrdinalColorConfig<string | number | Date> | undefined;
|
|
81
84
|
hideTooltip?: boolean | undefined;
|
|
82
85
|
id: import("../internals").AxisId;
|
|
83
86
|
}[];
|
|
@@ -7,9 +7,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.useChartContainerProps = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
|
-
var
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
|
|
11
12
|
var _useDefaultizeAxis = require("./useDefaultizeAxis");
|
|
13
|
+
var _useReducedMotion = require("../hooks/useReducedMotion");
|
|
12
14
|
const _excluded = ["width", "height", "series", "margin", "xAxis", "yAxis", "zAxis", "colors", "dataset", "sx", "title", "desc", "disableAxisListener", "highlightedItem", "onHighlightChange", "plugins", "children"];
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
17
|
const useChartContainerProps = (props, ref) => {
|
|
14
18
|
const {
|
|
15
19
|
width,
|
|
@@ -31,14 +35,10 @@ const useChartContainerProps = (props, ref) => {
|
|
|
31
35
|
children
|
|
32
36
|
} = props,
|
|
33
37
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
yExtremumGetters,
|
|
39
|
-
seriesFormatters,
|
|
40
|
-
colorProcessors
|
|
41
|
-
} = (0, _useChartContainerHooks.useChartContainerHooks)(ref, plugins);
|
|
38
|
+
const svgRef = React.useRef(null);
|
|
39
|
+
const chartSurfaceRef = (0, _useForkRef.default)(ref, svgRef);
|
|
40
|
+
(0, _useReducedMotion.useReducedMotion)(); // a11y reduce motion (see: https://react-spring.dev/docs/utilities/use-reduced-motion)
|
|
41
|
+
|
|
42
42
|
const [defaultizedXAxis, defaultizedYAxis] = (0, _useDefaultizeAxis.useDefaultizeAxis)(xAxis, yAxis);
|
|
43
43
|
const drawingProviderProps = {
|
|
44
44
|
width,
|
|
@@ -46,21 +46,18 @@ const useChartContainerProps = (props, ref) => {
|
|
|
46
46
|
margin,
|
|
47
47
|
svgRef
|
|
48
48
|
};
|
|
49
|
-
const
|
|
50
|
-
|
|
49
|
+
const pluginProviderProps = {
|
|
50
|
+
plugins
|
|
51
51
|
};
|
|
52
52
|
const seriesProviderProps = {
|
|
53
53
|
series,
|
|
54
54
|
colors,
|
|
55
|
-
dataset
|
|
56
|
-
seriesFormatters
|
|
55
|
+
dataset
|
|
57
56
|
};
|
|
58
|
-
const
|
|
57
|
+
const cartesianProviderProps = {
|
|
59
58
|
xAxis: defaultizedXAxis,
|
|
60
59
|
yAxis: defaultizedYAxis,
|
|
61
|
-
dataset
|
|
62
|
-
xExtremumGetters,
|
|
63
|
-
yExtremumGetters
|
|
60
|
+
dataset
|
|
64
61
|
};
|
|
65
62
|
const zAxisContextProps = {
|
|
66
63
|
zAxis,
|
|
@@ -82,12 +79,12 @@ const useChartContainerProps = (props, ref) => {
|
|
|
82
79
|
return {
|
|
83
80
|
children,
|
|
84
81
|
drawingProviderProps,
|
|
85
|
-
colorProviderProps,
|
|
86
82
|
seriesProviderProps,
|
|
87
|
-
|
|
83
|
+
cartesianProviderProps,
|
|
88
84
|
zAxisContextProps,
|
|
89
85
|
highlightedProviderProps,
|
|
90
86
|
chartsSurfaceProps,
|
|
87
|
+
pluginProviderProps,
|
|
91
88
|
xAxis: defaultizedXAxis,
|
|
92
89
|
yAxis: defaultizedYAxis
|
|
93
90
|
};
|
|
@@ -9,12 +9,12 @@ export declare const useDefaultizeAxis: (inXAxis: MakeOptional<AxisConfig<ScaleN
|
|
|
9
9
|
label?: string | undefined;
|
|
10
10
|
max?: (number | Date) | undefined;
|
|
11
11
|
min?: (number | Date) | undefined;
|
|
12
|
+
sx?: import("@mui/system").SxProps | undefined;
|
|
12
13
|
classes?: Partial<import("..").ChartsAxisClasses> | undefined;
|
|
13
14
|
slots?: Partial<import("../models/axis").ChartsAxisSlots> | undefined;
|
|
14
15
|
slotProps?: Partial<import("../models/axis").ChartsAxisSlotProps> | undefined;
|
|
15
16
|
dataKey?: string | undefined;
|
|
16
17
|
valueFormatter?: ((value: any, context: import("../models/axis").AxisValueFormatterContext) => string) | undefined;
|
|
17
|
-
colorMap?: import("../models/colorMapping").ContinuousColorConfig<number | Date> | import("../models/colorMapping").PiecewiseColorConfig<number | Date> | import("../models/colorMapping").OrdinalColorConfig<string | number | Date> | undefined;
|
|
18
18
|
tickMaxStep?: number | undefined;
|
|
19
19
|
tickMinStep?: number | undefined;
|
|
20
20
|
tickNumber?: number | undefined;
|
|
@@ -30,6 +30,7 @@ export declare const useDefaultizeAxis: (inXAxis: MakeOptional<AxisConfig<ScaleN
|
|
|
30
30
|
tickPlacement?: ("start" | "end" | "middle" | "extremities") | undefined;
|
|
31
31
|
tickLabelPlacement?: ("middle" | "tick") | undefined;
|
|
32
32
|
scaleType?: "linear" | "time" | "log" | "band" | "point" | "pow" | "sqrt" | "utc" | undefined;
|
|
33
|
+
colorMap?: import("../models/colorMapping").ContinuousColorConfig<number | Date> | import("../models/colorMapping").PiecewiseColorConfig<number | Date> | import("../models/colorMapping").OrdinalColorConfig<string | number | Date> | undefined;
|
|
33
34
|
hideTooltip?: boolean | undefined;
|
|
34
35
|
id: import("../models/axis").AxisId;
|
|
35
36
|
}[][];
|
|
@@ -11,7 +11,7 @@ var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
|
|
|
11
11
|
var _CartesianProvider = require("../context/CartesianProvider");
|
|
12
12
|
var _DefaultChartsAxisTooltipContent = require("./DefaultChartsAxisTooltipContent");
|
|
13
13
|
var _ZAxisContextProvider = require("../context/ZAxisContextProvider");
|
|
14
|
-
var
|
|
14
|
+
var _useColorProcessor = require("../context/PluginProvider/useColorProcessor");
|
|
15
15
|
var _isCartesian = require("../internals/isCartesian");
|
|
16
16
|
var _useSeries = require("../hooks/useSeries");
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -42,7 +42,7 @@ function ChartsAxisTooltipContent(props) {
|
|
|
42
42
|
zAxis
|
|
43
43
|
} = React.useContext(_ZAxisContextProvider.ZAxisContext);
|
|
44
44
|
const series = (0, _useSeries.useSeries)();
|
|
45
|
-
const colorProcessors = (0,
|
|
45
|
+
const colorProcessors = (0, _useColorProcessor.useColorProcessor)();
|
|
46
46
|
const USED_AXIS_ID = isXaxis ? xAxisIds[0] : yAxisIds[0];
|
|
47
47
|
const relevantSeries = React.useMemo(() => {
|
|
48
48
|
const rep = [];
|
|
@@ -11,7 +11,7 @@ var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
|
|
|
11
11
|
var _DefaultChartsItemTooltipContent = require("./DefaultChartsItemTooltipContent");
|
|
12
12
|
var _CartesianProvider = require("../context/CartesianProvider");
|
|
13
13
|
var _ZAxisContextProvider = require("../context/ZAxisContextProvider");
|
|
14
|
-
var
|
|
14
|
+
var _useColorProcessor = require("../context/PluginProvider/useColorProcessor");
|
|
15
15
|
var _useSeries = require("../hooks/useSeries");
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
@@ -38,7 +38,7 @@ function ChartsItemTooltipContent(props) {
|
|
|
38
38
|
zAxis,
|
|
39
39
|
zAxisIds
|
|
40
40
|
} = React.useContext(_ZAxisContextProvider.ZAxisContext);
|
|
41
|
-
const colorProcessors = (0,
|
|
41
|
+
const colorProcessors = (0, _useColorProcessor.useColorProcessor)();
|
|
42
42
|
const xAxisId = series.xAxisId ?? series.xAxisKey ?? xAxisIds[0];
|
|
43
43
|
const yAxisId = series.yAxisId ?? series.yAxisKey ?? yAxisIds[0];
|
|
44
44
|
const zAxisId = series.zAxisId ?? series.zAxisKey ?? zAxisIds[0];
|
package/ChartsTooltip/utils.js
CHANGED
|
@@ -59,8 +59,10 @@ function useMouseTracker() {
|
|
|
59
59
|
if (element === null) {
|
|
60
60
|
return () => {};
|
|
61
61
|
}
|
|
62
|
-
const handleOut =
|
|
63
|
-
|
|
62
|
+
const handleOut = event => {
|
|
63
|
+
if (event.pointerType !== 'mouse') {
|
|
64
|
+
setMousePosition(null);
|
|
65
|
+
}
|
|
64
66
|
};
|
|
65
67
|
const handleMove = event => {
|
|
66
68
|
setMousePosition({
|