@mui/x-charts 8.0.0-alpha.8 → 8.0.0-alpha.9

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.
Files changed (116) hide show
  1. package/BarChart/BarChart.js +1 -1
  2. package/BarChart/plugin.js +2 -0
  3. package/CHANGELOG.md +436 -3
  4. package/ChartContainer/ChartContainer.d.ts +2 -2
  5. package/ChartContainer/ChartContainer.js +2 -2
  6. package/ChartContainer/useChartContainerProps.d.ts +1 -1
  7. package/{context/ChartDataProvider → ChartDataProvider}/ChartDataProvider.d.ts +7 -7
  8. package/{context/ChartDataProvider → ChartDataProvider}/ChartDataProvider.js +4 -4
  9. package/ChartDataProvider/package.json +6 -0
  10. package/ChartDataProvider/useChartDataProviderProps.d.ts +13 -0
  11. package/ChartsSurface/ChartsSurface.d.ts +1 -1
  12. package/ChartsSurface/ChartsSurface.js +1 -1
  13. package/ChartsTooltip/utils.js +2 -0
  14. package/Gauge/GaugeProvider.js +2 -0
  15. package/LineChart/AreaPlot.js +43 -10
  16. package/LineChart/CircleMarkElement.d.ts +0 -4
  17. package/LineChart/CircleMarkElement.js +2 -7
  18. package/LineChart/LineChart.d.ts +0 -4
  19. package/LineChart/LineChart.js +1 -5
  20. package/LineChart/LineHighlightElement.d.ts +5 -1
  21. package/LineChart/LineHighlightElement.js +29 -9
  22. package/LineChart/LineHighlightPlot.js +4 -2
  23. package/LineChart/LinePlot.js +43 -9
  24. package/LineChart/MarkPlot.d.ts +0 -6
  25. package/LineChart/MarkPlot.js +6 -12
  26. package/LineChart/plugin.js +2 -0
  27. package/LineChart/useLineChartProps.js +3 -5
  28. package/PieChart/PieChart.js +1 -1
  29. package/PieChart/plugin.js +3 -1
  30. package/ScatterChart/ScatterChart.js +1 -1
  31. package/ScatterChart/plugin.js +2 -0
  32. package/context/AnimationProvider/AnimationProvider.js +1 -1
  33. package/context/InteractionSelectors.d.ts +11 -11
  34. package/context/index.d.ts +0 -2
  35. package/context/index.js +1 -2
  36. package/hooks/useLegend.js +8 -13
  37. package/index.d.ts +1 -0
  38. package/index.js +3 -2
  39. package/internals/defaultizeColor.d.ts +2 -0
  40. package/internals/index.d.ts +1 -2
  41. package/internals/index.js +1 -2
  42. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +5 -5
  43. package/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +1 -1
  44. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +2 -2
  45. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -0
  46. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +1 -0
  47. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.selectors.d.ts +90 -126
  48. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.selectors.js +3 -1
  49. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +0 -1
  50. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +11 -11
  51. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +1 -1
  52. package/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +2 -1
  53. package/models/seriesType/line.d.ts +11 -0
  54. package/modern/BarChart/BarChart.js +1 -1
  55. package/modern/BarChart/plugin.js +2 -0
  56. package/modern/ChartContainer/ChartContainer.js +2 -2
  57. package/modern/{context/ChartDataProvider → ChartDataProvider}/ChartDataProvider.js +4 -4
  58. package/modern/ChartsSurface/ChartsSurface.js +1 -1
  59. package/modern/ChartsTooltip/utils.js +2 -0
  60. package/modern/Gauge/GaugeProvider.js +2 -0
  61. package/modern/LineChart/AreaPlot.js +43 -10
  62. package/modern/LineChart/CircleMarkElement.js +2 -7
  63. package/modern/LineChart/LineChart.js +1 -5
  64. package/modern/LineChart/LineHighlightElement.js +29 -9
  65. package/modern/LineChart/LineHighlightPlot.js +4 -2
  66. package/modern/LineChart/LinePlot.js +43 -9
  67. package/modern/LineChart/MarkPlot.js +6 -12
  68. package/modern/LineChart/plugin.js +2 -0
  69. package/modern/LineChart/useLineChartProps.js +3 -5
  70. package/modern/PieChart/PieChart.js +1 -1
  71. package/modern/PieChart/plugin.js +3 -1
  72. package/modern/ScatterChart/ScatterChart.js +1 -1
  73. package/modern/ScatterChart/plugin.js +2 -0
  74. package/modern/context/AnimationProvider/AnimationProvider.js +1 -1
  75. package/modern/context/index.js +1 -2
  76. package/modern/hooks/useLegend.js +8 -13
  77. package/modern/index.js +3 -2
  78. package/modern/internals/index.js +1 -2
  79. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +1 -0
  80. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.selectors.js +3 -1
  81. package/node/BarChart/BarChart.js +2 -2
  82. package/node/BarChart/plugin.js +2 -0
  83. package/node/ChartContainer/ChartContainer.js +2 -2
  84. package/node/{context/ChartDataProvider → ChartDataProvider}/ChartDataProvider.js +4 -4
  85. package/node/ChartsSurface/ChartsSurface.js +1 -1
  86. package/node/ChartsTooltip/utils.js +1 -0
  87. package/node/Gauge/GaugeProvider.js +2 -2
  88. package/node/LineChart/AreaPlot.js +43 -10
  89. package/node/LineChart/CircleMarkElement.js +2 -7
  90. package/node/LineChart/LineChart.js +2 -6
  91. package/node/LineChart/LineHighlightElement.js +29 -9
  92. package/node/LineChart/LineHighlightPlot.js +4 -2
  93. package/node/LineChart/LinePlot.js +43 -9
  94. package/node/LineChart/MarkPlot.js +6 -12
  95. package/node/LineChart/plugin.js +2 -0
  96. package/node/LineChart/useLineChartProps.js +3 -5
  97. package/node/PieChart/PieChart.js +2 -2
  98. package/node/PieChart/plugin.js +3 -1
  99. package/node/ScatterChart/ScatterChart.js +2 -2
  100. package/node/ScatterChart/plugin.js +2 -0
  101. package/node/context/AnimationProvider/AnimationProvider.js +1 -1
  102. package/node/context/index.js +1 -12
  103. package/node/hooks/useLegend.js +8 -14
  104. package/node/index.js +12 -1
  105. package/node/internals/index.js +1 -13
  106. package/node/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +12 -0
  107. package/node/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.selectors.js +3 -1
  108. package/package.json +3 -3
  109. package/context/ChartDataProvider/useChartDataProviderProps.d.ts +0 -13
  110. /package/{context/ChartDataProvider → ChartDataProvider}/index.d.ts +0 -0
  111. /package/{context/ChartDataProvider → ChartDataProvider}/index.js +0 -0
  112. /package/{context/ChartDataProvider → ChartDataProvider}/useChartDataProviderProps.js +0 -0
  113. /package/modern/{context/ChartDataProvider → ChartDataProvider}/index.js +0 -0
  114. /package/modern/{context/ChartDataProvider → ChartDataProvider}/useChartDataProviderProps.js +0 -0
  115. /package/node/{context/ChartDataProvider → ChartDataProvider}/index.js +0 -0
  116. /package/node/{context/ChartDataProvider → ChartDataProvider}/useChartDataProviderProps.js +0 -0
@@ -23,7 +23,7 @@ var _MarkElement = require("./MarkElement");
23
23
  var _ChartProvider = require("../context/ChartProvider");
24
24
  var _hooks = require("../hooks");
25
25
  var _jsxRuntime = require("react/jsx-runtime");
26
- const _excluded = ["slots", "slotProps", "skipAnimation", "onItemClick", "experimentalRendering"];
26
+ const _excluded = ["slots", "slotProps", "skipAnimation", "onItemClick"];
27
27
  /**
28
28
  * Demos:
29
29
  *
@@ -39,8 +39,7 @@ function MarkPlot(props) {
39
39
  slots,
40
40
  slotProps,
41
41
  skipAnimation: inSkipAnimation,
42
- onItemClick,
43
- experimentalRendering
42
+ onItemClick
44
43
  } = props,
45
44
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
46
45
  const skipAnimation = (0, _AnimationProvider.useSkipAnimation)(inSkipAnimation);
@@ -57,7 +56,6 @@ function MarkPlot(props) {
57
56
  const {
58
57
  instance
59
58
  } = (0, _ChartProvider.useChartContext)();
60
- const Mark = slots?.mark ?? (experimentalRendering ? _CircleMarkElement.CircleMarkElement : _MarkElement.MarkElement);
61
59
  if (seriesData === undefined) {
62
60
  return null;
63
61
  }
@@ -77,7 +75,8 @@ function MarkPlot(props) {
77
75
  yAxisId = defaultYAxisId,
78
76
  stackedData,
79
77
  data,
80
- showMark = true
78
+ showMark = true,
79
+ shape = 'circle'
81
80
  } = series[seriesId];
82
81
  if (showMark === false) {
83
82
  return null;
@@ -91,6 +90,7 @@ function MarkPlot(props) {
91
90
  const clipId = (0, _cleanId.cleanId)(`${chartId}-${seriesId}-line-clip`); // We assume that if displaying line mark, the line will also be rendered
92
91
 
93
92
  const colorGetter = (0, _getColor.default)(series[seriesId], xAxis[xAxisId], yAxis[yAxisId]);
93
+ const Mark = slots?.mark ?? (shape === 'circle' ? _CircleMarkElement.CircleMarkElement : _MarkElement.MarkElement);
94
94
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
95
95
  clipPath: `url(#${clipId})`,
96
96
  children: xData?.map((x, index) => {
@@ -138,7 +138,7 @@ function MarkPlot(props) {
138
138
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Mark, (0, _extends2.default)({
139
139
  id: seriesId,
140
140
  dataIndex: index,
141
- shape: "circle",
141
+ shape: shape,
142
142
  color: colorGetter(index),
143
143
  x: x,
144
144
  y: y // Don't know why TS doesn't get from the filter that y can't be null
@@ -161,12 +161,6 @@ process.env.NODE_ENV !== "production" ? MarkPlot.propTypes = {
161
161
  // | These PropTypes are generated from the TypeScript type definitions |
162
162
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
163
163
  // ----------------------------------------------------------------------
164
- /**
165
- * If `true` the mark element will only be able to render circle.
166
- * Giving fewer customization options, but saving around 40ms per 1.000 marks.
167
- * @default false
168
- */
169
- experimentalRendering: _propTypes.default.bool,
170
164
  /**
171
165
  * Callback fired when a line mark item is clicked.
172
166
  * @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
@@ -8,9 +8,11 @@ exports.plugin = void 0;
8
8
  var _extremums = require("./extremums");
9
9
  var _formatter = _interopRequireDefault(require("./formatter"));
10
10
  var _getColor = _interopRequireDefault(require("./getColor"));
11
+ var _legend = _interopRequireDefault(require("./legend"));
11
12
  const plugin = exports.plugin = {
12
13
  colorProcessor: _getColor.default,
13
14
  seriesProcessor: _formatter.default,
15
+ legendGetter: _legend.default,
14
16
  xExtremumGetter: _extremums.getExtremumX,
15
17
  yExtremumGetter: _extremums.getExtremumY
16
18
  };
@@ -11,7 +11,7 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
11
11
  var _useId = _interopRequireDefault(require("@mui/utils/useId"));
12
12
  var _constants = require("../constants");
13
13
  var _calculateMargins = require("../internals/calculateMargins");
14
- const _excluded = ["xAxis", "yAxis", "series", "width", "height", "margin", "colors", "dataset", "sx", "onAxisClick", "onAreaClick", "onLineClick", "onMarkClick", "axisHighlight", "disableLineItemHighlight", "hideLegend", "grid", "topAxis", "leftAxis", "rightAxis", "bottomAxis", "children", "slots", "slotProps", "skipAnimation", "loading", "highlightedItem", "onHighlightChange", "className", "experimentalMarkRendering"];
14
+ const _excluded = ["xAxis", "yAxis", "series", "width", "height", "margin", "colors", "dataset", "sx", "onAxisClick", "onAreaClick", "onLineClick", "onMarkClick", "axisHighlight", "disableLineItemHighlight", "hideLegend", "grid", "topAxis", "leftAxis", "rightAxis", "bottomAxis", "children", "slots", "slotProps", "skipAnimation", "loading", "highlightedItem", "onHighlightChange", "className"];
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.
@@ -49,8 +49,7 @@ const useLineChartProps = props => {
49
49
  loading,
50
50
  highlightedItem,
51
51
  onHighlightChange,
52
- className,
53
- experimentalMarkRendering
52
+ className
54
53
  } = props,
55
54
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
56
55
  const id = (0, _useId.default)();
@@ -111,8 +110,7 @@ const useLineChartProps = props => {
111
110
  slots,
112
111
  slotProps,
113
112
  onItemClick: onMarkClick,
114
- skipAnimation,
115
- experimentalRendering: experimentalMarkRendering
113
+ skipAnimation
116
114
  };
117
115
  const overlayProps = {
118
116
  slots,
@@ -17,7 +17,7 @@ var _ChartsLegend = require("../ChartsLegend");
17
17
  var _PiePlot = require("./PiePlot");
18
18
  var _ChartsOverlay = require("../ChartsOverlay");
19
19
  var _ChartsSurface = require("../ChartsSurface");
20
- var _context = require("../context");
20
+ var _ChartDataProvider = require("../ChartDataProvider");
21
21
  var _useChartContainerProps = require("../ChartContainer/useChartContainerProps");
22
22
  var _ChartsWrapper = require("../internals/components/ChartsWrapper");
23
23
  var _jsxRuntime = require("react/jsx-runtime");
@@ -82,7 +82,7 @@ const PieChart = exports.PieChart = /*#__PURE__*/React.forwardRef(function PieCh
82
82
  skipAnimation
83
83
  }), ref);
84
84
  const Tooltip = slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
85
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.ChartDataProvider, (0, _extends2.default)({}, chartDataProviderProps, {
85
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProvider.ChartDataProvider, (0, _extends2.default)({}, chartDataProviderProps, {
86
86
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, {
87
87
  legendPosition: props.slotProps?.legend?.position,
88
88
  legendDirection: props?.slotProps?.legend?.direction ?? 'vertical',
@@ -7,7 +7,9 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.plugin = void 0;
8
8
  var _formatter = _interopRequireDefault(require("./formatter"));
9
9
  var _getColor = _interopRequireDefault(require("./getColor"));
10
+ var _legend = _interopRequireDefault(require("./legend"));
10
11
  const plugin = exports.plugin = {
11
12
  colorProcessor: _getColor.default,
12
- seriesProcessor: _formatter.default
13
+ seriesProcessor: _formatter.default,
14
+ legendGetter: _legend.default
13
15
  };
@@ -21,7 +21,7 @@ var _ChartsVoronoiHandler = require("../ChartsVoronoiHandler/ChartsVoronoiHandle
21
21
  var _ChartsGrid = require("../ChartsGrid");
22
22
  var _useScatterChartProps = require("./useScatterChartProps");
23
23
  var _useChartContainerProps = require("../ChartContainer/useChartContainerProps");
24
- var _context = require("../context");
24
+ var _ChartDataProvider = require("../ChartDataProvider");
25
25
  var _ChartsSurface = require("../ChartsSurface");
26
26
  var _ChartsWrapper = require("../internals/components/ChartsWrapper");
27
27
  var _jsxRuntime = require("react/jsx-runtime");
@@ -57,7 +57,7 @@ const ScatterChart = exports.ScatterChart = /*#__PURE__*/React.forwardRef(functi
57
57
  chartsSurfaceProps
58
58
  } = (0, _useChartContainerProps.useChartContainerProps)(chartContainerProps, ref);
59
59
  const Tooltip = props.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
60
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.ChartDataProvider, (0, _extends2.default)({}, chartDataProviderProps, {
60
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProvider.ChartDataProvider, (0, _extends2.default)({}, chartDataProviderProps, {
61
61
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
62
62
  children: [!props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
63
63
  children: [!props.disableVoronoi && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsVoronoiHandler.ChartsVoronoiHandler, (0, _extends2.default)({}, voronoiHandlerProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
@@ -8,9 +8,11 @@ exports.plugin = void 0;
8
8
  var _extremums = require("./extremums");
9
9
  var _formatter = _interopRequireDefault(require("./formatter"));
10
10
  var _getColor = _interopRequireDefault(require("./getColor"));
11
+ var _legend = _interopRequireDefault(require("./legend"));
11
12
  const plugin = exports.plugin = {
12
13
  seriesProcessor: _formatter.default,
13
14
  colorProcessor: _getColor.default,
15
+ legendGetter: _legend.default,
14
16
  xExtremumGetter: _extremums.getExtremumX,
15
17
  yExtremumGetter: _extremums.getExtremumY
16
18
  };
@@ -23,7 +23,7 @@ function AnimationProvider(props) {
23
23
 
24
24
  // We use the value of `isAnimationDisabledEnvironment` as the initial value of `skipAnimation` to avoid
25
25
  // re-rendering the component on environments where matchMedia is not supported, hence skipAnimation will always be true.
26
- const [skipAnimation, setSkipAnimation] = React.useState(isAnimationDisabledEnvironment || undefined);
26
+ const [skipAnimation, setSkipAnimation] = React.useState(process.env.NODE_ENV === 'test' ? isAnimationDisabledEnvironment || undefined : undefined);
27
27
  (0, _web.useIsomorphicLayoutEffect)(() => {
28
28
  if (isAnimationDisabledEnvironment) {
29
29
  return undefined;
@@ -3,19 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- var _exportNames = {
7
- ChartDataProvider: true
8
- };
9
- Object.defineProperty(exports, "ChartDataProvider", {
10
- enumerable: true,
11
- get: function () {
12
- return _ChartDataProvider.ChartDataProvider;
13
- }
14
- });
15
6
  var _HighlightedProvider = require("./HighlightedProvider");
16
7
  Object.keys(_HighlightedProvider).forEach(function (key) {
17
8
  if (key === "default" || key === "__esModule") return;
18
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
19
9
  if (key in exports && exports[key] === _HighlightedProvider[key]) return;
20
10
  Object.defineProperty(exports, key, {
21
11
  enumerable: true,
@@ -23,5 +13,4 @@ Object.keys(_HighlightedProvider).forEach(function (key) {
23
13
  return _HighlightedProvider[key];
24
14
  }
25
15
  });
26
- });
27
- var _ChartDataProvider = require("./ChartDataProvider");
16
+ });
@@ -1,25 +1,17 @@
1
1
  "use strict";
2
2
  'use client';
3
3
 
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.useLegend = useLegend;
9
- var _legend = _interopRequireDefault(require("../BarChart/legend"));
10
- var _legend2 = _interopRequireDefault(require("../ScatterChart/legend"));
11
- var _legend3 = _interopRequireDefault(require("../LineChart/legend"));
12
- var _legend4 = _interopRequireDefault(require("../PieChart/legend"));
8
+ var _useChartSeries = require("../internals/plugins/corePlugins/useChartSeries");
13
9
  var _useSeries = require("./useSeries");
14
- const legendGetter = {
15
- bar: _legend.default,
16
- scatter: _legend2.default,
17
- line: _legend3.default,
18
- pie: _legend4.default
19
- };
20
- function getSeriesToDisplay(series) {
10
+ var _useStore = require("../internals/store/useStore");
11
+ var _useSelector = require("../internals/store/useSelector");
12
+ function getSeriesToDisplay(series, seriesConfig) {
21
13
  return Object.keys(series).flatMap(seriesType => {
22
- const getter = legendGetter[seriesType];
14
+ const getter = seriesConfig[seriesType].legendGetter;
23
15
  return getter === undefined ? [] : getter(series[seriesType]);
24
16
  });
25
17
  }
@@ -35,7 +27,9 @@ function getSeriesToDisplay(series) {
35
27
  */
36
28
  function useLegend() {
37
29
  const series = (0, _useSeries.useSeries)();
30
+ const store = (0, _useStore.useStore)();
31
+ const seriesConfig = (0, _useSelector.useSelector)(store, _useChartSeries.selectorChartSeriesConfig);
38
32
  return {
39
- items: getSeriesToDisplay(series)
33
+ items: getSeriesToDisplay(series, seriesConfig)
40
34
  };
41
35
  }
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts v8.0.0-alpha.8
2
+ * @mui/x-charts v8.0.0-alpha.9
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -295,4 +295,15 @@ Object.keys(_ChartContainer).forEach(function (key) {
295
295
  return _ChartContainer[key];
296
296
  }
297
297
  });
298
+ });
299
+ var _ChartDataProvider = require("./ChartDataProvider");
300
+ Object.keys(_ChartDataProvider).forEach(function (key) {
301
+ if (key === "default" || key === "__esModule") return;
302
+ if (key in exports && exports[key] === _ChartDataProvider[key]) return;
303
+ Object.defineProperty(exports, key, {
304
+ enumerable: true,
305
+ get: function () {
306
+ return _ChartDataProvider[key];
307
+ }
308
+ });
298
309
  });
@@ -115,7 +115,7 @@ Object.keys(_useChartContainerProps).forEach(function (key) {
115
115
  }
116
116
  });
117
117
  });
118
- var _useChartDataProviderProps = require("../context/ChartDataProvider/useChartDataProviderProps");
118
+ var _useChartDataProviderProps = require("../ChartDataProvider/useChartDataProviderProps");
119
119
  Object.keys(_useChartDataProviderProps).forEach(function (key) {
120
120
  if (key === "default" || key === "__esModule") return;
121
121
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -333,18 +333,6 @@ Object.keys(_AnimationProvider).forEach(function (key) {
333
333
  });
334
334
  });
335
335
  var _getAxisExtremum = require("./plugins/featurePlugins/useChartCartesianAxis/getAxisExtremum");
336
- var _ChartDataProvider = require("../context/ChartDataProvider");
337
- Object.keys(_ChartDataProvider).forEach(function (key) {
338
- if (key === "default" || key === "__esModule") return;
339
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
340
- if (key in exports && exports[key] === _ChartDataProvider[key]) return;
341
- Object.defineProperty(exports, key, {
342
- enumerable: true,
343
- get: function () {
344
- return _ChartDataProvider[key];
345
- }
346
- });
347
- });
348
336
  var _ChartProvider = require("../context/ChartProvider");
349
337
  Object.keys(_ChartProvider).forEach(function (key) {
350
338
  if (key === "default" || key === "__esModule") return;
@@ -20,6 +20,18 @@ Object.defineProperty(exports, "useChartCartesianAxis", {
20
20
  }
21
21
  });
22
22
  var _useChartCartesianAxis = require("./useChartCartesianAxis");
23
+ var _useChartCartesianAxis2 = require("./useChartCartesianAxis.selectors");
24
+ Object.keys(_useChartCartesianAxis2).forEach(function (key) {
25
+ if (key === "default" || key === "__esModule") return;
26
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
27
+ if (key in exports && exports[key] === _useChartCartesianAxis2[key]) return;
28
+ Object.defineProperty(exports, key, {
29
+ enumerable: true,
30
+ get: function () {
31
+ return _useChartCartesianAxis2[key];
32
+ }
33
+ });
34
+ });
23
35
  var _defaultizeAxis = require("./defaultizeAxis");
24
36
  var _computeAxisValue = require("./computeAxisValue");
25
37
  Object.keys(_computeAxisValue).forEach(function (key) {
@@ -30,7 +30,7 @@ const selectorChartRawYAxis = exports.selectorChartRawYAxis = (0, _selectors.cre
30
30
  */
31
31
 
32
32
  const selectorChartZoomMap = (0, _selectors.createSelector)(selectorChartZoomState, zoom => zoom?.zoomData && createZoomMap(zoom?.zoomData));
33
- const selectorChartZoomOptionsLookup = (0, _selectors.createSelector)(selectorChartZoomState, zoom => zoom?.optionsLookup);
33
+ const selectorChartZoomOptionsLookup = (0, _selectors.createSelector)(selectorChartZoomState, () => undefined);
34
34
  const selectorChartXFilter = (0, _selectors.createSelector)([selectorChartZoomMap, selectorChartZoomOptionsLookup, _useChartSeries.selectorChartSeriesConfig, _useChartSeries.selectorChartSeriesProcessed], (zoomMap, zoomOptions, seriesConfig, formattedSeries) => zoomMap && zoomOptions && (0, _createAxisFilterMapper.createAxisFilterMapper)({
35
35
  zoomMap,
36
36
  zoomOptions,
@@ -51,6 +51,7 @@ const selectorChartZoomAxisFilters = (0, _selectors.createSelector)([selectorCha
51
51
  return undefined;
52
52
  }
53
53
  const xFilters = xAxis.reduce((acc, axis, index) => {
54
+ // @ts-expect-error The type is defined in the pro package
54
55
  const filter = xMapper(axis, index);
55
56
  if (filter !== null) {
56
57
  acc[axis.id] = filter;
@@ -58,6 +59,7 @@ const selectorChartZoomAxisFilters = (0, _selectors.createSelector)([selectorCha
58
59
  return acc;
59
60
  }, {});
60
61
  const yFilters = yAxis.reduce((acc, axis, index) => {
62
+ // @ts-expect-error The type is defined in the pro package
61
63
  const filter = yMapper(axis, index);
62
64
  if (filter !== null) {
63
65
  acc[axis.id] = filter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-charts",
3
- "version": "8.0.0-alpha.8",
3
+ "version": "8.0.0-alpha.9",
4
4
  "description": "The community edition of the Charts components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -38,8 +38,8 @@
38
38
  "react-is": "^18.3.1 || ^19.0.0",
39
39
  "reselect": "^5.1.1",
40
40
  "use-sync-external-store": "^1.4.0",
41
- "@mui/x-charts-vendor": "8.0.0-alpha.8",
42
- "@mui/x-internals": "8.0.0-alpha.8"
41
+ "@mui/x-internals": "8.0.0-alpha.9",
42
+ "@mui/x-charts-vendor": "8.0.0-alpha.8"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@emotion/react": "^11.9.0",
@@ -1,13 +0,0 @@
1
- import type { ChartDataProviderProps } from './ChartDataProvider';
2
- import { HighlightedProviderProps } from '../HighlightedProvider';
3
- import { AnimationProviderProps } from '../AnimationProvider';
4
- import { ChartProviderProps } from '../ChartProvider';
5
- import { ChartAnyPluginSignature } from '../../internals/plugins/models';
6
- import { ChartSeriesType } from '../../models/seriesType/config';
7
- import { AllPluginSignatures } from '../../internals/plugins/allPlugins';
8
- export declare const useChartDataProviderProps: <TSeries extends ChartSeriesType = keyof import("../../internals").ChartsSeriesConfig, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartDataProviderProps<TSeries, TSignatures>) => {
9
- children: import("react").ReactNode;
10
- highlightedProviderProps: Omit<HighlightedProviderProps, "children">;
11
- animationProviderProps: Omit<AnimationProviderProps, "children">;
12
- chartProviderProps: Omit<ChartProviderProps<TSeries, TSignatures>, "children">;
13
- };