@mui/x-charts 9.0.1 → 9.0.3

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 (206) hide show
  1. package/BarChart/BarChart.js +29 -10
  2. package/BarChart/BarChart.mjs +29 -10
  3. package/BarChart/BarElement.js +1 -5
  4. package/BarChart/BarElement.mjs +1 -5
  5. package/BarChart/BarPlot.js +2 -1
  6. package/BarChart/BarPlot.mjs +2 -1
  7. package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.mts +8 -7
  8. package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +8 -7
  9. package/BarChart/seriesConfig/bar/seriesProcessor.js +37 -13
  10. package/BarChart/seriesConfig/bar/seriesProcessor.mjs +37 -13
  11. package/CHANGELOG.md +257 -0
  12. package/ChartsContainer/ChartsContainer.js +59 -30
  13. package/ChartsContainer/ChartsContainer.mjs +59 -30
  14. package/ChartsDataProvider/useChartsDataProviderProps.js +1 -6
  15. package/ChartsDataProvider/useChartsDataProviderProps.mjs +1 -6
  16. package/ChartsGrid/styledComponents.js +2 -2
  17. package/ChartsGrid/styledComponents.mjs +2 -2
  18. package/ChartsRadialDataProvider/ChartsRadialDataProvider.d.mts +38 -0
  19. package/ChartsRadialDataProvider/ChartsRadialDataProvider.d.ts +38 -0
  20. package/ChartsRadialDataProvider/ChartsRadialDataProvider.js +115 -0
  21. package/ChartsRadialDataProvider/ChartsRadialDataProvider.mjs +109 -0
  22. package/ChartsRadialDataProvider/ChartsRadialDataProvider.plugins.d.mts +9 -0
  23. package/ChartsRadialDataProvider/ChartsRadialDataProvider.plugins.d.ts +9 -0
  24. package/ChartsRadialDataProvider/ChartsRadialDataProvider.plugins.js +13 -0
  25. package/ChartsRadialDataProvider/ChartsRadialDataProvider.plugins.mjs +7 -0
  26. package/ChartsRadialDataProvider/index.d.mts +2 -0
  27. package/ChartsRadialDataProvider/index.d.ts +2 -0
  28. package/ChartsRadialDataProvider/index.js +27 -0
  29. package/ChartsRadialDataProvider/index.mjs +2 -0
  30. package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.d.mts +13 -0
  31. package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.d.ts +13 -0
  32. package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.js +46 -0
  33. package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.mjs +39 -0
  34. package/ChartsRadialGrid/ChartsRadialGrid.d.mts +33 -0
  35. package/ChartsRadialGrid/ChartsRadialGrid.d.ts +33 -0
  36. package/ChartsRadialGrid/ChartsRadialGrid.js +101 -0
  37. package/ChartsRadialGrid/ChartsRadialGrid.mjs +96 -0
  38. package/ChartsRadialGrid/ChartsRadiusGrid.d.mts +14 -0
  39. package/ChartsRadialGrid/ChartsRadiusGrid.d.ts +14 -0
  40. package/ChartsRadialGrid/ChartsRadiusGrid.js +72 -0
  41. package/ChartsRadialGrid/ChartsRadiusGrid.mjs +65 -0
  42. package/ChartsRadialGrid/ChartsRotationGrid.d.mts +13 -0
  43. package/ChartsRadialGrid/ChartsRotationGrid.d.ts +13 -0
  44. package/ChartsRadialGrid/ChartsRotationGrid.js +65 -0
  45. package/ChartsRadialGrid/ChartsRotationGrid.mjs +58 -0
  46. package/ChartsRadialGrid/chartsRadialGridClasses.d.mts +13 -0
  47. package/ChartsRadialGrid/chartsRadialGridClasses.d.ts +13 -0
  48. package/ChartsRadialGrid/chartsRadialGridClasses.js +14 -0
  49. package/ChartsRadialGrid/chartsRadialGridClasses.mjs +6 -0
  50. package/ChartsRadialGrid/index.d.mts +3 -0
  51. package/ChartsRadialGrid/index.d.ts +3 -0
  52. package/ChartsRadialGrid/index.js +19 -0
  53. package/ChartsRadialGrid/index.mjs +2 -0
  54. package/ChartsRadialGrid/styledComponents.d.mts +4 -0
  55. package/ChartsRadialGrid/styledComponents.d.ts +4 -0
  56. package/ChartsRadialGrid/styledComponents.js +50 -0
  57. package/ChartsRadialGrid/styledComponents.mjs +44 -0
  58. package/ChartsRadiusAxis/ChartsRadiusAxis.d.mts +48 -0
  59. package/ChartsRadiusAxis/ChartsRadiusAxis.d.ts +48 -0
  60. package/ChartsRadiusAxis/ChartsRadiusAxis.js +147 -0
  61. package/ChartsRadiusAxis/ChartsRadiusAxis.mjs +141 -0
  62. package/ChartsRadiusAxis/chartsRadiusAxisClasses.d.mts +6 -0
  63. package/ChartsRadiusAxis/chartsRadiusAxisClasses.d.ts +6 -0
  64. package/ChartsRadiusAxis/chartsRadiusAxisClasses.js +30 -0
  65. package/ChartsRadiusAxis/chartsRadiusAxisClasses.mjs +17 -0
  66. package/ChartsRadiusAxis/createGetLabelTextAnchors.d.mts +10 -0
  67. package/ChartsRadiusAxis/createGetLabelTextAnchors.d.ts +10 -0
  68. package/ChartsRadiusAxis/createGetLabelTextAnchors.js +46 -0
  69. package/ChartsRadiusAxis/createGetLabelTextAnchors.mjs +39 -0
  70. package/ChartsRadiusAxis/getLabelTransform.d.mts +11 -0
  71. package/ChartsRadiusAxis/getLabelTransform.d.ts +11 -0
  72. package/ChartsRadiusAxis/getLabelTransform.js +37 -0
  73. package/ChartsRadiusAxis/getLabelTransform.mjs +31 -0
  74. package/ChartsRadiusAxis/index.d.mts +3 -0
  75. package/ChartsRadiusAxis/index.d.ts +3 -0
  76. package/ChartsRadiusAxis/index.js +19 -0
  77. package/ChartsRadiusAxis/index.mjs +2 -0
  78. package/ChartsRadiusAxis/sharedRadialAxisClasses.d.mts +21 -0
  79. package/ChartsRadiusAxis/sharedRadialAxisClasses.d.ts +21 -0
  80. package/ChartsRadiusAxis/sharedRadialAxisClasses.js +14 -0
  81. package/ChartsRadiusAxis/sharedRadialAxisClasses.mjs +6 -0
  82. package/ChartsRotationAxis/ChartsRotationAxis.d.mts +48 -0
  83. package/ChartsRotationAxis/ChartsRotationAxis.d.ts +48 -0
  84. package/ChartsRotationAxis/ChartsRotationAxis.js +141 -0
  85. package/ChartsRotationAxis/ChartsRotationAxis.mjs +135 -0
  86. package/ChartsRotationAxis/chartsRotationAxisClasses.d.mts +5 -0
  87. package/ChartsRotationAxis/chartsRotationAxisClasses.d.ts +5 -0
  88. package/ChartsRotationAxis/chartsRotationAxisClasses.js +29 -0
  89. package/ChartsRotationAxis/chartsRotationAxisClasses.mjs +16 -0
  90. package/ChartsRotationAxis/getLabelTransform.d.mts +11 -0
  91. package/ChartsRotationAxis/getLabelTransform.d.ts +11 -0
  92. package/ChartsRotationAxis/getLabelTransform.js +37 -0
  93. package/ChartsRotationAxis/getLabelTransform.mjs +31 -0
  94. package/ChartsRotationAxis/index.d.mts +2 -0
  95. package/ChartsRotationAxis/index.d.ts +2 -0
  96. package/ChartsRotationAxis/index.js +19 -0
  97. package/ChartsRotationAxis/index.mjs +2 -0
  98. package/ChartsTooltip/useAxesTooltip.js +7 -4
  99. package/ChartsTooltip/useAxesTooltip.mjs +8 -5
  100. package/ChartsTooltip/useItemTooltip.d.mts +1 -1
  101. package/ChartsTooltip/useItemTooltip.d.ts +1 -1
  102. package/ChartsTooltip/useItemTooltip.js +17 -2
  103. package/ChartsTooltip/useItemTooltip.mjs +18 -3
  104. package/ChartsXAxis/useAxisTicksProps.d.mts +652 -490
  105. package/ChartsXAxis/useAxisTicksProps.d.ts +652 -490
  106. package/ChartsYAxis/useAxisTicksProps.d.mts +652 -490
  107. package/ChartsYAxis/useAxisTicksProps.d.ts +652 -490
  108. package/LineChart/LineChart.js +27 -9
  109. package/LineChart/LineChart.mjs +27 -9
  110. package/LineChart/seriesConfig/curveEvaluation.js +24 -19
  111. package/LineChart/seriesConfig/curveEvaluation.mjs +24 -19
  112. package/LineChart/seriesConfig/getItemAtPosition.js +14 -3
  113. package/LineChart/seriesConfig/getItemAtPosition.mjs +14 -3
  114. package/LineChart/seriesConfig/getSeriesWithDefaultValues.js +4 -6
  115. package/LineChart/seriesConfig/getSeriesWithDefaultValues.mjs +4 -6
  116. package/LineChart/seriesConfig/seriesProcessor.d.mts +4 -2
  117. package/LineChart/seriesConfig/seriesProcessor.d.ts +4 -2
  118. package/LineChart/seriesConfig/seriesProcessor.js +39 -15
  119. package/LineChart/seriesConfig/seriesProcessor.mjs +39 -15
  120. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.mts +2 -2
  121. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +2 -2
  122. package/ScatterChart/Scatter.d.mts +11 -0
  123. package/ScatterChart/Scatter.d.ts +11 -0
  124. package/ScatterChart/Scatter.js +11 -0
  125. package/ScatterChart/Scatter.mjs +14 -0
  126. package/ScatterChart/ScatterChart.js +29 -10
  127. package/ScatterChart/ScatterChart.mjs +29 -10
  128. package/ScatterChart/seriesConfig/seriesProcessor.js +9 -4
  129. package/ScatterChart/seriesConfig/seriesProcessor.mjs +9 -4
  130. package/SparkLineChart/SparkLineChart.js +27 -9
  131. package/SparkLineChart/SparkLineChart.mjs +27 -9
  132. package/hooks/useAxis.d.mts +2 -2
  133. package/hooks/useAxis.d.ts +2 -2
  134. package/hooks/useTicks.d.mts +1 -1
  135. package/hooks/useTicks.d.ts +1 -1
  136. package/hooks/useTicks.js +21 -3
  137. package/hooks/useTicks.mjs +21 -3
  138. package/index.d.mts +4 -0
  139. package/index.d.ts +4 -0
  140. package/index.js +46 -2
  141. package/index.mjs +5 -1
  142. package/internals/cubiqSolver.d.mts +5 -0
  143. package/internals/cubiqSolver.d.ts +5 -0
  144. package/internals/cubiqSolver.js +62 -0
  145. package/internals/cubiqSolver.mjs +56 -0
  146. package/internals/index.d.mts +5 -1
  147. package/internals/index.d.ts +5 -1
  148. package/internals/index.js +47 -2
  149. package/internals/index.mjs +5 -1
  150. package/internals/isPolar.d.mts +3 -2
  151. package/internals/isPolar.d.ts +3 -2
  152. package/internals/isPolar.js +4 -0
  153. package/internals/isPolar.mjs +3 -0
  154. package/internals/material/index.js +6 -1
  155. package/internals/material/index.mjs +6 -1
  156. package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.mts +8 -9
  157. package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.ts +8 -9
  158. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +8 -12
  159. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.mjs +8 -12
  160. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +1 -0
  161. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +1 -0
  162. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.mts +3 -2
  163. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +3 -2
  164. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +29 -16
  165. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.mjs +30 -17
  166. package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.js +3 -3
  167. package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.mjs +3 -3
  168. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.mts +2 -2
  169. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +2 -2
  170. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +3 -3
  171. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.mjs +3 -3
  172. package/models/axis.d.mts +13 -2
  173. package/models/axis.d.ts +13 -2
  174. package/models/seriesType/bar.d.mts +21 -7
  175. package/models/seriesType/bar.d.ts +21 -7
  176. package/models/seriesType/common.d.mts +10 -0
  177. package/models/seriesType/common.d.ts +10 -0
  178. package/models/seriesType/composition.d.mts +3 -1
  179. package/models/seriesType/composition.d.ts +3 -1
  180. package/models/seriesType/composition.js +6 -2
  181. package/models/seriesType/composition.mjs +5 -1
  182. package/models/seriesType/index.d.mts +3 -3
  183. package/models/seriesType/index.d.ts +3 -3
  184. package/models/seriesType/index.js +0 -22
  185. package/models/seriesType/index.mjs +0 -2
  186. package/models/seriesType/line.d.mts +22 -8
  187. package/models/seriesType/line.d.ts +22 -8
  188. package/models/seriesType/scatter.d.mts +9 -0
  189. package/models/seriesType/scatter.d.ts +9 -0
  190. package/models/slots/chartsBaseSlotProps.d.mts +17 -0
  191. package/models/slots/chartsBaseSlotProps.d.ts +17 -0
  192. package/models/slots/chartsBaseSlots.d.mts +7 -1
  193. package/models/slots/chartsBaseSlots.d.ts +7 -1
  194. package/models/z-axis.d.mts +9 -0
  195. package/models/z-axis.d.ts +9 -0
  196. package/package.json +182 -126
  197. package/themeAugmentation/components.d.mts +4 -0
  198. package/themeAugmentation/components.d.ts +4 -0
  199. package/themeAugmentation/overrides.d.mts +2 -0
  200. package/themeAugmentation/overrides.d.ts +2 -0
  201. package/themeAugmentation/props.d.mts +2 -0
  202. package/themeAugmentation/props.d.ts +2 -0
  203. package/utils/epsilon.d.mts +1 -0
  204. package/utils/epsilon.d.ts +1 -0
  205. package/utils/epsilon.js +7 -0
  206. package/utils/epsilon.mjs +1 -0
@@ -5,7 +5,7 @@ import { warnOnce } from '@mui/x-internals/warning';
5
5
  import { getStackingGroups } from "../../internals/stacking/index.mjs";
6
6
  const defaultShapes = ['circle', 'square', 'diamond', 'cross', 'star', 'triangle', 'wye'];
7
7
  const lineValueFormatter = v => v == null ? '' : v.toLocaleString();
8
- const seriesProcessor = (params, dataset, isItemVisible) => {
8
+ function seriesProcessor(params, dataset, isItemVisible) {
9
9
  const {
10
10
  seriesOrder,
11
11
  series
@@ -31,22 +31,36 @@ const seriesProcessor = (params, dataset, isItemVisible) => {
31
31
  d3Dataset[dataIndex][id] = value;
32
32
  }
33
33
  });
34
+ } else if (series[id].valueGetter && dataset) {
35
+ // When valueGetter is used without dataKey, populate d3Dataset with the series id as key
36
+ dataset.forEach((entry, dataIndex) => {
37
+ const value = series[id].valueGetter(entry);
38
+ if (d3Dataset.length <= dataIndex) {
39
+ d3Dataset.push({
40
+ [id]: value
41
+ });
42
+ } else {
43
+ d3Dataset[dataIndex][id] = value;
44
+ }
45
+ });
34
46
  } else if (dataset === undefined && process.env.NODE_ENV !== 'production') {
35
47
  throw new Error(process.env.NODE_ENV !== "production" ? `MUI X Charts: Line series with id="${id}" has no data. ` + 'The chart cannot render this series without data. ' + 'Provide a data property to the series or use the dataset prop.' : _formatErrorMessage(27, id));
36
48
  }
37
49
  if (process.env.NODE_ENV !== 'production') {
38
50
  if (!data && dataset) {
39
51
  const dataKey = series[id].dataKey;
40
- if (!dataKey) {
41
- throw new Error(`MUI X Charts: Line series with id="${id}" has no data and no dataKey. ` + 'When using the dataset prop, each series must have a dataKey to identify which dataset column to use. ' + 'Add a dataKey property to the series configuration.');
52
+ if (!dataKey && !series[id].valueGetter) {
53
+ throw new Error(`MUI X Charts: Line series with id="${id}" has no data, no dataKey, and no valueGetter. ` + 'When using the dataset prop, each series must have a dataKey or valueGetter to identify which dataset values to use. ' + 'Add a dataKey or valueGetter property to the series configuration.');
42
54
  }
43
- dataset.forEach((entry, index) => {
44
- const value = entry[dataKey];
45
- if (value != null && typeof value !== 'number') {
46
- warnOnce(`MUI X Charts: your dataset key "${dataKey}" is used for plotting lines, but the dataset contains the non-null non-numerical element "${value}" at index ${index}.
55
+ if (dataKey) {
56
+ dataset.forEach((entry, index) => {
57
+ const value = entry[dataKey];
58
+ if (value != null && typeof value !== 'number') {
59
+ warnOnce(`MUI X Charts: your dataset key "${dataKey}" is used for plotting lines, but the dataset contains the non-null non-numerical element "${value}" at index ${index}.
47
60
  Line plots only support numeric and null values.`);
48
- }
49
- });
61
+ }
62
+ });
63
+ }
50
64
  }
51
65
  }
52
66
  });
@@ -81,11 +95,21 @@ Line plots only support numeric and null values.`);
81
95
  return d[key] ?? 0;
82
96
  }).order(fixedOrder).offset(stackingOffset)(d3Dataset);
83
97
  ids.forEach((id, index) => {
84
- const dataKey = series[id].dataKey;
85
- const data = dataKey ? dataset.map(d => {
86
- const value = d[dataKey];
87
- return typeof value === 'number' ? value : null;
88
- }) : series[id].data;
98
+ const {
99
+ dataKey,
100
+ valueGetter
101
+ } = series[id];
102
+ let data;
103
+ if (valueGetter) {
104
+ data = dataset.map(d => valueGetter(d));
105
+ } else if (dataKey) {
106
+ data = dataset.map(d => {
107
+ const value = d[dataKey];
108
+ return typeof value === 'number' ? value : null;
109
+ });
110
+ } else {
111
+ data = series[id].data;
112
+ }
89
113
  const hidden = !isItemVisible?.({
90
114
  type: 'line',
91
115
  seriesId: id
@@ -107,5 +131,5 @@ Line plots only support numeric and null values.`);
107
131
  stackingGroups,
108
132
  series: completedSeries
109
133
  };
110
- };
134
+ }
111
135
  export default seriesProcessor;
@@ -19,14 +19,14 @@ export declare function useRadarSeriesData(querySeriesId?: SeriesId): {
19
19
  }[];
20
20
  hidden: boolean;
21
21
  type: "radar";
22
- label?: string | ((location: "tooltip" | "legend") => string) | undefined;
23
22
  highlightScope?: import("../../internals/index.mjs").CommonHighlightScope | undefined;
24
23
  labelMarkType?: import("../../internals/index.mjs").ChartsLabelMarkType | undefined;
25
24
  colorGetter?: ((data: import("../../internals/index.mjs").ColorCallbackValue<number>) => string) | undefined;
25
+ label?: string | ((location: "tooltip" | "legend") => string) | undefined;
26
26
  hideMark?: boolean | undefined;
27
27
  fillArea?: boolean | undefined;
28
- data: number[];
29
28
  id: SeriesId;
30
29
  valueFormatter: import("../../internals/index.mjs").SeriesValueFormatter<number>;
31
30
  color: string;
31
+ data: number[];
32
32
  }[];
@@ -19,14 +19,14 @@ export declare function useRadarSeriesData(querySeriesId?: SeriesId): {
19
19
  }[];
20
20
  hidden: boolean;
21
21
  type: "radar";
22
- label?: string | ((location: "tooltip" | "legend") => string) | undefined;
23
22
  highlightScope?: import("../../internals/index.js").CommonHighlightScope | undefined;
24
23
  labelMarkType?: import("../../internals/index.js").ChartsLabelMarkType | undefined;
25
24
  colorGetter?: ((data: import("../../internals/index.js").ColorCallbackValue<number>) => string) | undefined;
25
+ label?: string | ((location: "tooltip" | "legend") => string) | undefined;
26
26
  hideMark?: boolean | undefined;
27
27
  fillArea?: boolean | undefined;
28
- data: number[];
29
28
  id: SeriesId;
30
29
  valueFormatter: import("../../internals/index.js").SeriesValueFormatter<number>;
31
30
  color: string;
31
+ data: number[];
32
32
  }[];
@@ -4,6 +4,9 @@ import { type DefaultizedScatterSeriesType, type ScatterItemIdentifier } from ".
4
4
  import { type D3Scale } from "../models/axis.mjs";
5
5
  import { type ColorGetter } from "../internals/plugins/corePlugins/useChartSeriesConfig/index.mjs";
6
6
  import type { ScatterClasses } from "./scatterClasses.mjs";
7
+ /**
8
+ * @deprecated The `Scatter` component is an internal implementation detail of `ScatterPlot` and will be removed from the public API in v10. Use `ScatterPlot` instead.
9
+ */
7
10
  export interface ScatterProps {
8
11
  series: DefaultizedScatterSeriesType;
9
12
  xScale: D3Scale;
@@ -25,9 +28,17 @@ export interface ScatterProps {
25
28
  slots?: ScatterSlots;
26
29
  slotProps?: ScatterSlotProps;
27
30
  }
31
+ /**
32
+ * @deprecated The `Scatter` component is an internal implementation detail of `ScatterPlot` and will be removed from the public API in v10. Use `ScatterPlot` instead.
33
+ */
28
34
  export interface ScatterSlots extends ScatterMarkerSlots {}
35
+ /**
36
+ * @deprecated The `Scatter` component is an internal implementation detail of `ScatterPlot` and will be removed from the public API in v10. Use `ScatterPlot` instead.
37
+ */
29
38
  export interface ScatterSlotProps extends ScatterMarkerSlotProps {}
30
39
  /**
40
+ * @deprecated The `Scatter` component is an internal implementation detail of `ScatterPlot` and will be removed from the public API in v10. Use `ScatterPlot` instead.
41
+ *
31
42
  * Demos:
32
43
  *
33
44
  * - [Scatter](https://mui.com/x/react-charts/scatter/)
@@ -4,6 +4,9 @@ import { type DefaultizedScatterSeriesType, type ScatterItemIdentifier } from ".
4
4
  import { type D3Scale } from "../models/axis.js";
5
5
  import { type ColorGetter } from "../internals/plugins/corePlugins/useChartSeriesConfig/index.js";
6
6
  import type { ScatterClasses } from "./scatterClasses.js";
7
+ /**
8
+ * @deprecated The `Scatter` component is an internal implementation detail of `ScatterPlot` and will be removed from the public API in v10. Use `ScatterPlot` instead.
9
+ */
7
10
  export interface ScatterProps {
8
11
  series: DefaultizedScatterSeriesType;
9
12
  xScale: D3Scale;
@@ -25,9 +28,17 @@ export interface ScatterProps {
25
28
  slots?: ScatterSlots;
26
29
  slotProps?: ScatterSlotProps;
27
30
  }
31
+ /**
32
+ * @deprecated The `Scatter` component is an internal implementation detail of `ScatterPlot` and will be removed from the public API in v10. Use `ScatterPlot` instead.
33
+ */
28
34
  export interface ScatterSlots extends ScatterMarkerSlots {}
35
+ /**
36
+ * @deprecated The `Scatter` component is an internal implementation detail of `ScatterPlot` and will be removed from the public API in v10. Use `ScatterPlot` instead.
37
+ */
29
38
  export interface ScatterSlotProps extends ScatterMarkerSlotProps {}
30
39
  /**
40
+ * @deprecated The `Scatter` component is an internal implementation detail of `ScatterPlot` and will be removed from the public API in v10. Use `ScatterPlot` instead.
41
+ *
31
42
  * Demos:
32
43
  *
33
44
  * - [Scatter](https://mui.com/x/react-charts/scatter/)
@@ -24,6 +24,17 @@ var _ChartsProvider = require("../context/ChartsProvider");
24
24
  var _jsxRuntime = require("react/jsx-runtime");
25
25
  const _excluded = ["ownerState"];
26
26
  /**
27
+ * @deprecated The `Scatter` component is an internal implementation detail of `ScatterPlot` and will be removed from the public API in v10. Use `ScatterPlot` instead.
28
+ */
29
+ /**
30
+ * @deprecated The `Scatter` component is an internal implementation detail of `ScatterPlot` and will be removed from the public API in v10. Use `ScatterPlot` instead.
31
+ */
32
+ /**
33
+ * @deprecated The `Scatter` component is an internal implementation detail of `ScatterPlot` and will be removed from the public API in v10. Use `ScatterPlot` instead.
34
+ */
35
+ /**
36
+ * @deprecated The `Scatter` component is an internal implementation detail of `ScatterPlot` and will be removed from the public API in v10. Use `ScatterPlot` instead.
37
+ *
27
38
  * Demos:
28
39
  *
29
40
  * - [Scatter](https://mui.com/x/react-charts/scatter/)
@@ -15,8 +15,22 @@ import { ScatterMarker } from "./ScatterMarker.mjs";
15
15
  import { useUtilityClasses } from "./scatterClasses.mjs";
16
16
  import { useScatterPlotData } from "./useScatterPlotData.mjs";
17
17
  import { useChartsContext } from "../context/ChartsProvider/index.mjs";
18
+
19
+ /**
20
+ * @deprecated The `Scatter` component is an internal implementation detail of `ScatterPlot` and will be removed from the public API in v10. Use `ScatterPlot` instead.
21
+ */
22
+
23
+ /**
24
+ * @deprecated The `Scatter` component is an internal implementation detail of `ScatterPlot` and will be removed from the public API in v10. Use `ScatterPlot` instead.
25
+ */
26
+
27
+ /**
28
+ * @deprecated The `Scatter` component is an internal implementation detail of `ScatterPlot` and will be removed from the public API in v10. Use `ScatterPlot` instead.
29
+ */
18
30
  import { jsx as _jsx } from "react/jsx-runtime";
19
31
  /**
32
+ * @deprecated The `Scatter` component is an internal implementation detail of `ScatterPlot` and will be removed from the public API in v10. Use `ScatterPlot` instead.
33
+ *
20
34
  * Demos:
21
35
  *
22
36
  * - [Scatter](https://mui.com/x/react-charts/scatter/)
@@ -435,7 +435,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
435
435
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
436
436
  tickSize: _propTypes.default.number,
437
437
  tickSpacing: _propTypes.default.number,
438
- valueFormatter: _propTypes.default.func
438
+ valueFormatter: _propTypes.default.func,
439
+ valueGetter: _propTypes.default.func
439
440
  }), _propTypes.default.shape({
440
441
  axis: _propTypes.default.oneOf(['x']),
441
442
  classes: _propTypes.default.object,
@@ -494,7 +495,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
494
495
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
495
496
  tickSize: _propTypes.default.number,
496
497
  tickSpacing: _propTypes.default.number,
497
- valueFormatter: _propTypes.default.func
498
+ valueFormatter: _propTypes.default.func,
499
+ valueGetter: _propTypes.default.func
498
500
  }), _propTypes.default.shape({
499
501
  axis: _propTypes.default.oneOf(['x']),
500
502
  classes: _propTypes.default.object,
@@ -540,7 +542,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
540
542
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
541
543
  tickSize: _propTypes.default.number,
542
544
  tickSpacing: _propTypes.default.number,
543
- valueFormatter: _propTypes.default.func
545
+ valueFormatter: _propTypes.default.func,
546
+ valueGetter: _propTypes.default.func
544
547
  }), _propTypes.default.shape({
545
548
  axis: _propTypes.default.oneOf(['x']),
546
549
  classes: _propTypes.default.object,
@@ -587,7 +590,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
587
590
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
588
591
  tickSize: _propTypes.default.number,
589
592
  tickSpacing: _propTypes.default.number,
590
- valueFormatter: _propTypes.default.func
593
+ valueFormatter: _propTypes.default.func,
594
+ valueGetter: _propTypes.default.func
591
595
  }), _propTypes.default.shape({
592
596
  axis: _propTypes.default.oneOf(['x']),
593
597
  classes: _propTypes.default.object,
@@ -633,7 +637,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
633
637
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
634
638
  tickSize: _propTypes.default.number,
635
639
  tickSpacing: _propTypes.default.number,
636
- valueFormatter: _propTypes.default.func
640
+ valueFormatter: _propTypes.default.func,
641
+ valueGetter: _propTypes.default.func
637
642
  }), _propTypes.default.shape({
638
643
  axis: _propTypes.default.oneOf(['x']),
639
644
  classes: _propTypes.default.object,
@@ -679,7 +684,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
679
684
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
680
685
  tickSize: _propTypes.default.number,
681
686
  tickSpacing: _propTypes.default.number,
682
- valueFormatter: _propTypes.default.func
687
+ valueFormatter: _propTypes.default.func,
688
+ valueGetter: _propTypes.default.func
683
689
  }), _propTypes.default.shape({
684
690
  axis: _propTypes.default.oneOf(['x']),
685
691
  classes: _propTypes.default.object,
@@ -729,7 +735,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
729
735
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
730
736
  tickSize: _propTypes.default.number,
731
737
  tickSpacing: _propTypes.default.number,
732
- valueFormatter: _propTypes.default.func
738
+ valueFormatter: _propTypes.default.func,
739
+ valueGetter: _propTypes.default.func
733
740
  }), _propTypes.default.shape({
734
741
  axis: _propTypes.default.oneOf(['x']),
735
742
  classes: _propTypes.default.object,
@@ -779,7 +786,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
779
786
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
780
787
  tickSize: _propTypes.default.number,
781
788
  tickSpacing: _propTypes.default.number,
782
- valueFormatter: _propTypes.default.func
789
+ valueFormatter: _propTypes.default.func,
790
+ valueGetter: _propTypes.default.func
783
791
  }), _propTypes.default.shape({
784
792
  axis: _propTypes.default.oneOf(['x']),
785
793
  classes: _propTypes.default.object,
@@ -825,7 +833,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
825
833
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
826
834
  tickSize: _propTypes.default.number,
827
835
  tickSpacing: _propTypes.default.number,
828
- valueFormatter: _propTypes.default.func
836
+ valueFormatter: _propTypes.default.func,
837
+ valueGetter: _propTypes.default.func
829
838
  })]).isRequired),
830
839
  /**
831
840
  * The configuration of the y-axes.
@@ -891,6 +900,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
891
900
  tickSize: _propTypes.default.number,
892
901
  tickSpacing: _propTypes.default.number,
893
902
  valueFormatter: _propTypes.default.func,
903
+ valueGetter: _propTypes.default.func,
894
904
  width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
895
905
  }), _propTypes.default.shape({
896
906
  axis: _propTypes.default.oneOf(['y']),
@@ -949,6 +959,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
949
959
  tickSize: _propTypes.default.number,
950
960
  tickSpacing: _propTypes.default.number,
951
961
  valueFormatter: _propTypes.default.func,
962
+ valueGetter: _propTypes.default.func,
952
963
  width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
953
964
  }), _propTypes.default.shape({
954
965
  axis: _propTypes.default.oneOf(['y']),
@@ -994,6 +1005,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
994
1005
  tickSize: _propTypes.default.number,
995
1006
  tickSpacing: _propTypes.default.number,
996
1007
  valueFormatter: _propTypes.default.func,
1008
+ valueGetter: _propTypes.default.func,
997
1009
  width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
998
1010
  }), _propTypes.default.shape({
999
1011
  axis: _propTypes.default.oneOf(['y']),
@@ -1040,6 +1052,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
1040
1052
  tickSize: _propTypes.default.number,
1041
1053
  tickSpacing: _propTypes.default.number,
1042
1054
  valueFormatter: _propTypes.default.func,
1055
+ valueGetter: _propTypes.default.func,
1043
1056
  width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
1044
1057
  }), _propTypes.default.shape({
1045
1058
  axis: _propTypes.default.oneOf(['y']),
@@ -1085,6 +1098,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
1085
1098
  tickSize: _propTypes.default.number,
1086
1099
  tickSpacing: _propTypes.default.number,
1087
1100
  valueFormatter: _propTypes.default.func,
1101
+ valueGetter: _propTypes.default.func,
1088
1102
  width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
1089
1103
  }), _propTypes.default.shape({
1090
1104
  axis: _propTypes.default.oneOf(['y']),
@@ -1130,6 +1144,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
1130
1144
  tickSize: _propTypes.default.number,
1131
1145
  tickSpacing: _propTypes.default.number,
1132
1146
  valueFormatter: _propTypes.default.func,
1147
+ valueGetter: _propTypes.default.func,
1133
1148
  width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
1134
1149
  }), _propTypes.default.shape({
1135
1150
  axis: _propTypes.default.oneOf(['y']),
@@ -1179,6 +1194,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
1179
1194
  tickSize: _propTypes.default.number,
1180
1195
  tickSpacing: _propTypes.default.number,
1181
1196
  valueFormatter: _propTypes.default.func,
1197
+ valueGetter: _propTypes.default.func,
1182
1198
  width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
1183
1199
  }), _propTypes.default.shape({
1184
1200
  axis: _propTypes.default.oneOf(['y']),
@@ -1228,6 +1244,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
1228
1244
  tickSize: _propTypes.default.number,
1229
1245
  tickSpacing: _propTypes.default.number,
1230
1246
  valueFormatter: _propTypes.default.func,
1247
+ valueGetter: _propTypes.default.func,
1231
1248
  width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
1232
1249
  }), _propTypes.default.shape({
1233
1250
  axis: _propTypes.default.oneOf(['y']),
@@ -1273,6 +1290,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
1273
1290
  tickSize: _propTypes.default.number,
1274
1291
  tickSpacing: _propTypes.default.number,
1275
1292
  valueFormatter: _propTypes.default.func,
1293
+ valueGetter: _propTypes.default.func,
1276
1294
  width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
1277
1295
  })]).isRequired),
1278
1296
  /**
@@ -1298,6 +1316,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
1298
1316
  dataKey: _propTypes.default.string,
1299
1317
  id: _propTypes.default.string,
1300
1318
  max: _propTypes.default.number,
1301
- min: _propTypes.default.number
1319
+ min: _propTypes.default.number,
1320
+ valueGetter: _propTypes.default.func
1302
1321
  }))
1303
1322
  } : void 0;
@@ -428,7 +428,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
428
428
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
429
429
  tickSize: PropTypes.number,
430
430
  tickSpacing: PropTypes.number,
431
- valueFormatter: PropTypes.func
431
+ valueFormatter: PropTypes.func,
432
+ valueGetter: PropTypes.func
432
433
  }), PropTypes.shape({
433
434
  axis: PropTypes.oneOf(['x']),
434
435
  classes: PropTypes.object,
@@ -487,7 +488,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
487
488
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
488
489
  tickSize: PropTypes.number,
489
490
  tickSpacing: PropTypes.number,
490
- valueFormatter: PropTypes.func
491
+ valueFormatter: PropTypes.func,
492
+ valueGetter: PropTypes.func
491
493
  }), PropTypes.shape({
492
494
  axis: PropTypes.oneOf(['x']),
493
495
  classes: PropTypes.object,
@@ -533,7 +535,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
533
535
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
534
536
  tickSize: PropTypes.number,
535
537
  tickSpacing: PropTypes.number,
536
- valueFormatter: PropTypes.func
538
+ valueFormatter: PropTypes.func,
539
+ valueGetter: PropTypes.func
537
540
  }), PropTypes.shape({
538
541
  axis: PropTypes.oneOf(['x']),
539
542
  classes: PropTypes.object,
@@ -580,7 +583,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
580
583
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
581
584
  tickSize: PropTypes.number,
582
585
  tickSpacing: PropTypes.number,
583
- valueFormatter: PropTypes.func
586
+ valueFormatter: PropTypes.func,
587
+ valueGetter: PropTypes.func
584
588
  }), PropTypes.shape({
585
589
  axis: PropTypes.oneOf(['x']),
586
590
  classes: PropTypes.object,
@@ -626,7 +630,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
626
630
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
627
631
  tickSize: PropTypes.number,
628
632
  tickSpacing: PropTypes.number,
629
- valueFormatter: PropTypes.func
633
+ valueFormatter: PropTypes.func,
634
+ valueGetter: PropTypes.func
630
635
  }), PropTypes.shape({
631
636
  axis: PropTypes.oneOf(['x']),
632
637
  classes: PropTypes.object,
@@ -672,7 +677,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
672
677
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
673
678
  tickSize: PropTypes.number,
674
679
  tickSpacing: PropTypes.number,
675
- valueFormatter: PropTypes.func
680
+ valueFormatter: PropTypes.func,
681
+ valueGetter: PropTypes.func
676
682
  }), PropTypes.shape({
677
683
  axis: PropTypes.oneOf(['x']),
678
684
  classes: PropTypes.object,
@@ -722,7 +728,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
722
728
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
723
729
  tickSize: PropTypes.number,
724
730
  tickSpacing: PropTypes.number,
725
- valueFormatter: PropTypes.func
731
+ valueFormatter: PropTypes.func,
732
+ valueGetter: PropTypes.func
726
733
  }), PropTypes.shape({
727
734
  axis: PropTypes.oneOf(['x']),
728
735
  classes: PropTypes.object,
@@ -772,7 +779,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
772
779
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
773
780
  tickSize: PropTypes.number,
774
781
  tickSpacing: PropTypes.number,
775
- valueFormatter: PropTypes.func
782
+ valueFormatter: PropTypes.func,
783
+ valueGetter: PropTypes.func
776
784
  }), PropTypes.shape({
777
785
  axis: PropTypes.oneOf(['x']),
778
786
  classes: PropTypes.object,
@@ -818,7 +826,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
818
826
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
819
827
  tickSize: PropTypes.number,
820
828
  tickSpacing: PropTypes.number,
821
- valueFormatter: PropTypes.func
829
+ valueFormatter: PropTypes.func,
830
+ valueGetter: PropTypes.func
822
831
  })]).isRequired),
823
832
  /**
824
833
  * The configuration of the y-axes.
@@ -884,6 +893,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
884
893
  tickSize: PropTypes.number,
885
894
  tickSpacing: PropTypes.number,
886
895
  valueFormatter: PropTypes.func,
896
+ valueGetter: PropTypes.func,
887
897
  width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
888
898
  }), PropTypes.shape({
889
899
  axis: PropTypes.oneOf(['y']),
@@ -942,6 +952,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
942
952
  tickSize: PropTypes.number,
943
953
  tickSpacing: PropTypes.number,
944
954
  valueFormatter: PropTypes.func,
955
+ valueGetter: PropTypes.func,
945
956
  width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
946
957
  }), PropTypes.shape({
947
958
  axis: PropTypes.oneOf(['y']),
@@ -987,6 +998,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
987
998
  tickSize: PropTypes.number,
988
999
  tickSpacing: PropTypes.number,
989
1000
  valueFormatter: PropTypes.func,
1001
+ valueGetter: PropTypes.func,
990
1002
  width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
991
1003
  }), PropTypes.shape({
992
1004
  axis: PropTypes.oneOf(['y']),
@@ -1033,6 +1045,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
1033
1045
  tickSize: PropTypes.number,
1034
1046
  tickSpacing: PropTypes.number,
1035
1047
  valueFormatter: PropTypes.func,
1048
+ valueGetter: PropTypes.func,
1036
1049
  width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
1037
1050
  }), PropTypes.shape({
1038
1051
  axis: PropTypes.oneOf(['y']),
@@ -1078,6 +1091,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
1078
1091
  tickSize: PropTypes.number,
1079
1092
  tickSpacing: PropTypes.number,
1080
1093
  valueFormatter: PropTypes.func,
1094
+ valueGetter: PropTypes.func,
1081
1095
  width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
1082
1096
  }), PropTypes.shape({
1083
1097
  axis: PropTypes.oneOf(['y']),
@@ -1123,6 +1137,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
1123
1137
  tickSize: PropTypes.number,
1124
1138
  tickSpacing: PropTypes.number,
1125
1139
  valueFormatter: PropTypes.func,
1140
+ valueGetter: PropTypes.func,
1126
1141
  width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
1127
1142
  }), PropTypes.shape({
1128
1143
  axis: PropTypes.oneOf(['y']),
@@ -1172,6 +1187,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
1172
1187
  tickSize: PropTypes.number,
1173
1188
  tickSpacing: PropTypes.number,
1174
1189
  valueFormatter: PropTypes.func,
1190
+ valueGetter: PropTypes.func,
1175
1191
  width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
1176
1192
  }), PropTypes.shape({
1177
1193
  axis: PropTypes.oneOf(['y']),
@@ -1221,6 +1237,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
1221
1237
  tickSize: PropTypes.number,
1222
1238
  tickSpacing: PropTypes.number,
1223
1239
  valueFormatter: PropTypes.func,
1240
+ valueGetter: PropTypes.func,
1224
1241
  width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
1225
1242
  }), PropTypes.shape({
1226
1243
  axis: PropTypes.oneOf(['y']),
@@ -1266,6 +1283,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
1266
1283
  tickSize: PropTypes.number,
1267
1284
  tickSpacing: PropTypes.number,
1268
1285
  valueFormatter: PropTypes.func,
1286
+ valueGetter: PropTypes.func,
1269
1287
  width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
1270
1288
  })]).isRequired),
1271
1289
  /**
@@ -1291,7 +1309,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
1291
1309
  dataKey: PropTypes.string,
1292
1310
  id: PropTypes.string,
1293
1311
  max: PropTypes.number,
1294
- min: PropTypes.number
1312
+ min: PropTypes.number,
1313
+ valueGetter: PropTypes.func
1295
1314
  }))
1296
1315
  } : void 0;
1297
1316
  export { ScatterChart };
@@ -17,14 +17,19 @@ const seriesProcessor = ({
17
17
  if (seriesData?.datasetKeys && missingKeys.length > 0) {
18
18
  throw new Error(process.env.NODE_ENV !== "production" ? `MUI X Charts: Scatter series with id="${seriesId}" has incomplete datasetKeys. ` + `Properties ${missingKeys.map(key => `"${key}"`).join(', ')} are missing. ` + 'Scatter plots require both "x" and "y" keys to map dataset values to coordinates. ' + 'Add the missing datasetKeys to the series configuration.' : (0, _formatErrorMessage2.default)(29, seriesId, missingKeys.map(key => `"${key}"`).join(', ')));
19
19
  }
20
- const data = !datasetKeys ? seriesData.data ?? [] : dataset?.map(d => {
21
- return {
20
+ let data;
21
+ if (seriesData.valueGetter) {
22
+ data = dataset?.map(seriesData.valueGetter) ?? [];
23
+ } else if (datasetKeys) {
24
+ data = dataset?.map(d => ({
22
25
  x: d[datasetKeys.x] ?? null,
23
26
  y: d[datasetKeys.y] ?? null,
24
27
  z: datasetKeys.z && d[datasetKeys.z],
25
28
  id: datasetKeys.id && d[datasetKeys.id]
26
- };
27
- }) ?? [];
29
+ })) ?? [];
30
+ } else {
31
+ data = seriesData.data ?? [];
32
+ }
28
33
  return [seriesId, (0, _extends2.default)({
29
34
  labelMarkType: 'circle',
30
35
  markerSize: 4
@@ -10,14 +10,19 @@ const seriesProcessor = ({
10
10
  if (seriesData?.datasetKeys && missingKeys.length > 0) {
11
11
  throw new Error(process.env.NODE_ENV !== "production" ? `MUI X Charts: Scatter series with id="${seriesId}" has incomplete datasetKeys. ` + `Properties ${missingKeys.map(key => `"${key}"`).join(', ')} are missing. ` + 'Scatter plots require both "x" and "y" keys to map dataset values to coordinates. ' + 'Add the missing datasetKeys to the series configuration.' : _formatErrorMessage(29, seriesId, missingKeys.map(key => `"${key}"`).join(', ')));
12
12
  }
13
- const data = !datasetKeys ? seriesData.data ?? [] : dataset?.map(d => {
14
- return {
13
+ let data;
14
+ if (seriesData.valueGetter) {
15
+ data = dataset?.map(seriesData.valueGetter) ?? [];
16
+ } else if (datasetKeys) {
17
+ data = dataset?.map(d => ({
15
18
  x: d[datasetKeys.x] ?? null,
16
19
  y: d[datasetKeys.y] ?? null,
17
20
  z: datasetKeys.z && d[datasetKeys.z],
18
21
  id: datasetKeys.id && d[datasetKeys.id]
19
- };
20
- }) ?? [];
22
+ })) ?? [];
23
+ } else {
24
+ data = seriesData.data ?? [];
25
+ }
21
26
  return [seriesId, _extends({
22
27
  labelMarkType: 'circle',
23
28
  markerSize: 4