@mui/x-charts 9.3.0 → 9.4.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.
Files changed (168) hide show
  1. package/BarChart/BarElement.d.mts +3 -2
  2. package/BarChart/BarElement.d.ts +3 -2
  3. package/BarChart/BarLabel/BarLabelItem.d.mts +3 -2
  4. package/BarChart/BarLabel/BarLabelItem.d.ts +3 -2
  5. package/BarChart/seriesConfig/bar/extremums.js +7 -2
  6. package/BarChart/seriesConfig/bar/extremums.mjs +7 -2
  7. package/CHANGELOG.md +196 -0
  8. package/ChartsContainer/ChartsContainer.js +21 -0
  9. package/ChartsContainer/ChartsContainer.mjs +21 -0
  10. package/ChartsLabel/ChartsLabelMark.js +1 -21
  11. package/ChartsLabel/ChartsLabelMark.mjs +0 -20
  12. package/ChartsLegend/chartsLegend.types.d.mts +3 -2
  13. package/ChartsLegend/chartsLegend.types.d.ts +3 -2
  14. package/ChartsLegend/piecewiseColorLegendClasses.js +8 -2
  15. package/ChartsLegend/piecewiseColorLegendClasses.mjs +8 -2
  16. package/ChartsOverlay/ChartsOverlay.d.mts +5 -4
  17. package/ChartsOverlay/ChartsOverlay.d.ts +5 -4
  18. package/ChartsReferenceLine/ChartsXReferenceLine.js +6 -1
  19. package/ChartsReferenceLine/ChartsXReferenceLine.mjs +6 -1
  20. package/ChartsReferenceLine/ChartsYReferenceLine.js +5 -0
  21. package/ChartsReferenceLine/ChartsYReferenceLine.mjs +5 -0
  22. package/ChartsTooltip/ChartTooltip.types.d.mts +3 -2
  23. package/ChartsTooltip/ChartTooltip.types.d.ts +3 -2
  24. package/ChartsTooltip/useAxesTooltip.js +2 -2
  25. package/ChartsTooltip/useAxesTooltip.mjs +2 -2
  26. package/ChartsTooltip/useItemTooltip.js +2 -2
  27. package/ChartsTooltip/useItemTooltip.mjs +2 -2
  28. package/ChartsXAxis/useAxisTicksProps.d.mts +84 -3
  29. package/ChartsXAxis/useAxisTicksProps.d.ts +84 -3
  30. package/ChartsYAxis/useAxisTicksProps.d.mts +84 -3
  31. package/ChartsYAxis/useAxisTicksProps.d.ts +84 -3
  32. package/LineChart/AreaElement.d.mts +3 -2
  33. package/LineChart/AreaElement.d.ts +3 -2
  34. package/LineChart/LineElement.d.mts +3 -2
  35. package/LineChart/LineElement.d.ts +3 -2
  36. package/LineChart/LineHighlightPlot.d.mts +3 -2
  37. package/LineChart/LineHighlightPlot.d.ts +3 -2
  38. package/LineChart/LineHighlightPlot.js +65 -45
  39. package/LineChart/LineHighlightPlot.mjs +65 -45
  40. package/LineChart/MarkPlot.d.mts +3 -2
  41. package/LineChart/MarkPlot.d.ts +3 -2
  42. package/LineChart/seriesConfig/curveEvaluation.js +28 -14
  43. package/LineChart/seriesConfig/curveEvaluation.mjs +27 -14
  44. package/LineChart/seriesConfig/extremums.js +5 -1
  45. package/LineChart/seriesConfig/extremums.mjs +5 -1
  46. package/LineChart/useMarkPlotData.js +3 -1
  47. package/LineChart/useMarkPlotData.mjs +3 -1
  48. package/PieChart/PieArcLabelPlot.d.mts +3 -2
  49. package/PieChart/PieArcLabelPlot.d.ts +3 -2
  50. package/PieChart/PieArcPlot.d.mts +3 -2
  51. package/PieChart/PieArcPlot.d.ts +3 -2
  52. package/RadarChart/RadarAxis/RadarAxis.utils.d.mts +2 -2
  53. package/RadarChart/RadarAxis/RadarAxis.utils.d.ts +2 -2
  54. package/ScatterChart/BatchScatter.d.mts +2 -8
  55. package/ScatterChart/BatchScatter.d.ts +2 -8
  56. package/ScatterChart/BatchScatter.js +17 -12
  57. package/ScatterChart/BatchScatter.mjs +17 -12
  58. package/ScatterChart/FocusedScatterMark.js +2 -2
  59. package/ScatterChart/FocusedScatterMark.mjs +2 -2
  60. package/ScatterChart/HighlightedScatterMark.js +3 -3
  61. package/ScatterChart/HighlightedScatterMark.mjs +3 -3
  62. package/ScatterChart/Scatter.d.mts +5 -0
  63. package/ScatterChart/Scatter.d.ts +5 -0
  64. package/ScatterChart/Scatter.js +7 -2
  65. package/ScatterChart/Scatter.mjs +7 -2
  66. package/ScatterChart/ScatterChart.d.mts +2 -1
  67. package/ScatterChart/ScatterChart.d.ts +2 -1
  68. package/ScatterChart/ScatterChart.js +21 -0
  69. package/ScatterChart/ScatterChart.mjs +21 -0
  70. package/ScatterChart/ScatterMarker.types.d.mts +3 -2
  71. package/ScatterChart/ScatterMarker.types.d.ts +3 -2
  72. package/ScatterChart/ScatterPlot.d.mts +3 -2
  73. package/ScatterChart/ScatterPlot.d.ts +3 -2
  74. package/ScatterChart/ScatterPlot.js +6 -1
  75. package/ScatterChart/ScatterPlot.mjs +6 -1
  76. package/ScatterChart/seriesConfig/extremums.js +6 -0
  77. package/ScatterChart/seriesConfig/extremums.mjs +6 -0
  78. package/ScatterChart/seriesConfig/getColor.js +1 -1
  79. package/ScatterChart/seriesConfig/getColor.mjs +1 -1
  80. package/ScatterChart/seriesConfig/getMarkerSize.d.mts +18 -0
  81. package/ScatterChart/seriesConfig/getMarkerSize.d.ts +18 -0
  82. package/ScatterChart/seriesConfig/getMarkerSize.js +43 -0
  83. package/ScatterChart/seriesConfig/getMarkerSize.mjs +37 -0
  84. package/ScatterChart/seriesConfig/seriesProcessor.js +23 -8
  85. package/ScatterChart/seriesConfig/seriesProcessor.mjs +23 -8
  86. package/ScatterChart/useScatterItemPosition.d.mts +4 -0
  87. package/ScatterChart/useScatterItemPosition.d.ts +4 -0
  88. package/ScatterChart/useScatterItemPosition.js +9 -0
  89. package/ScatterChart/useScatterItemPosition.mjs +8 -0
  90. package/Toolbar/Toolbar.types.d.mts +3 -2
  91. package/Toolbar/Toolbar.types.d.ts +3 -2
  92. package/index.js +1 -1
  93. package/index.mjs +1 -1
  94. package/internals/animation/animation.d.mts +1 -2
  95. package/internals/animation/animation.d.ts +1 -2
  96. package/internals/commonNextFocusItem.d.mts +10 -2
  97. package/internals/commonNextFocusItem.d.ts +10 -2
  98. package/internals/commonNextFocusItem.js +12 -4
  99. package/internals/commonNextFocusItem.mjs +12 -4
  100. package/internals/createCommonKeyboardFocusHandler.d.mts +1 -1
  101. package/internals/createCommonKeyboardFocusHandler.d.ts +1 -1
  102. package/internals/createCommonKeyboardFocusHandler.js +3 -3
  103. package/internals/createCommonKeyboardFocusHandler.mjs +3 -3
  104. package/internals/incompleteDatasetKeysError.d.mts +1 -0
  105. package/internals/incompleteDatasetKeysError.d.ts +1 -0
  106. package/internals/incompleteDatasetKeysError.js +11 -0
  107. package/internals/incompleteDatasetKeysError.mjs +4 -0
  108. package/internals/index.d.mts +2 -0
  109. package/internals/index.d.ts +2 -0
  110. package/internals/index.js +24 -0
  111. package/internals/index.mjs +2 -0
  112. package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.js +3 -2
  113. package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.mjs +4 -3
  114. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +2 -2
  115. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.mjs +3 -3
  116. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.mts +10 -1
  117. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +10 -1
  118. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +18 -1
  119. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.mjs +16 -0
  120. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +11 -3
  121. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +11 -3
  122. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +24 -5
  123. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.mjs +24 -5
  124. package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.mts +1 -1
  125. package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +1 -1
  126. package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +46 -2
  127. package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.mjs +47 -2
  128. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +46 -11
  129. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.mjs +46 -11
  130. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.mts +2 -1
  131. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.ts +2 -1
  132. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +3 -2
  133. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.mjs +3 -2
  134. package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.mts +4 -0
  135. package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.ts +4 -0
  136. package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.js +3 -1
  137. package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.mjs +1 -0
  138. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +5 -3
  139. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.mjs +7 -5
  140. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +17 -3
  141. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.mjs +17 -3
  142. package/internals/sizeScale.d.mts +6 -0
  143. package/internals/sizeScale.d.ts +6 -0
  144. package/internals/sizeScale.js +46 -0
  145. package/internals/sizeScale.mjs +38 -0
  146. package/models/axis.d.mts +18 -12
  147. package/models/axis.d.ts +18 -12
  148. package/models/chartsSlotsComponentsProps.d.mts +25 -0
  149. package/models/chartsSlotsComponentsProps.d.ts +25 -0
  150. package/models/chartsSlotsComponentsProps.js +5 -0
  151. package/models/chartsSlotsComponentsProps.mjs +1 -0
  152. package/models/index.d.mts +1 -0
  153. package/models/index.d.ts +1 -0
  154. package/models/index.js +11 -0
  155. package/models/index.mjs +1 -0
  156. package/models/seriesType/line.d.mts +5 -2
  157. package/models/seriesType/line.d.ts +5 -2
  158. package/models/seriesType/scatter.d.mts +34 -2
  159. package/models/seriesType/scatter.d.ts +34 -2
  160. package/models/sizeMapping.d.mts +64 -0
  161. package/models/sizeMapping.d.ts +64 -0
  162. package/models/sizeMapping.js +5 -0
  163. package/models/sizeMapping.mjs +1 -0
  164. package/models/slots/chartsBaseSlots.d.mts +6 -5
  165. package/models/slots/chartsBaseSlots.d.ts +6 -5
  166. package/models/z-axis.d.mts +10 -1
  167. package/models/z-axis.d.ts +10 -1
  168. package/package.json +6 -6
@@ -1,11 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { type PieArcProps } from "./PieArc.mjs";
3
3
  import { type ComputedPieRadius, type DefaultizedPieSeriesType, type DefaultizedPieValueType, type PieItemIdentifier } from "../models/seriesType/pie.mjs";
4
+ import type { PieArcPropsOverrides } from "../models/chartsSlotsComponentsProps.mjs";
4
5
  export interface PieArcPlotSlots {
5
- pieArc?: React.JSXElementConstructor<PieArcProps>;
6
+ pieArc?: React.JSXElementConstructor<PieArcProps & PieArcPropsOverrides>;
6
7
  }
7
8
  export interface PieArcPlotSlotProps {
8
- pieArc?: Partial<PieArcProps>;
9
+ pieArc?: Partial<PieArcProps> & PieArcPropsOverrides;
9
10
  }
10
11
  export interface PieArcPlotProps extends Pick<DefaultizedPieSeriesType, 'data' | 'faded' | 'highlighted' | 'cornerRadius' | 'paddingAngle'>, ComputedPieRadius {
11
12
  /**
@@ -1,11 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { type PieArcProps } from "./PieArc.js";
3
3
  import { type ComputedPieRadius, type DefaultizedPieSeriesType, type DefaultizedPieValueType, type PieItemIdentifier } from "../models/seriesType/pie.js";
4
+ import type { PieArcPropsOverrides } from "../models/chartsSlotsComponentsProps.js";
4
5
  export interface PieArcPlotSlots {
5
- pieArc?: React.JSXElementConstructor<PieArcProps>;
6
+ pieArc?: React.JSXElementConstructor<PieArcProps & PieArcPropsOverrides>;
6
7
  }
7
8
  export interface PieArcPlotSlotProps {
8
- pieArc?: Partial<PieArcProps>;
9
+ pieArc?: Partial<PieArcProps> & PieArcPropsOverrides;
9
10
  }
10
11
  export interface PieArcPlotProps extends Pick<DefaultizedPieSeriesType, 'data' | 'faded' | 'highlighted' | 'cornerRadius' | 'paddingAngle'>, ComputedPieRadius {
11
12
  /**
@@ -7,13 +7,13 @@ interface GetLabelAttributesParams extends Required<Pick<RadarAxisProps, 'labelO
7
7
  export declare function getLabelAttributes(params: GetLabelAttributesParams): {
8
8
  x: number;
9
9
  y: number;
10
- textAnchor: "inherit" | "end" | "start" | "middle" | undefined;
10
+ textAnchor: "start" | "end" | "inherit" | "middle" | undefined;
11
11
  dominantBaseline: "inherit" | "auto" | "text-before-edge" | "middle" | "central" | "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "use-script" | "no-change" | "reset-size" | undefined;
12
12
  transform?: undefined;
13
13
  } | {
14
14
  x: number;
15
15
  y: number;
16
- textAnchor: "inherit" | "end" | "start" | "middle" | undefined;
16
+ textAnchor: "start" | "end" | "inherit" | "middle" | undefined;
17
17
  dominantBaseline: "inherit" | "auto" | "text-before-edge" | "middle" | "central" | "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "use-script" | "no-change" | "reset-size" | undefined;
18
18
  transform: string;
19
19
  };
@@ -7,13 +7,13 @@ interface GetLabelAttributesParams extends Required<Pick<RadarAxisProps, 'labelO
7
7
  export declare function getLabelAttributes(params: GetLabelAttributesParams): {
8
8
  x: number;
9
9
  y: number;
10
- textAnchor: "inherit" | "end" | "start" | "middle" | undefined;
10
+ textAnchor: "start" | "end" | "inherit" | "middle" | undefined;
11
11
  dominantBaseline: "inherit" | "auto" | "text-before-edge" | "middle" | "central" | "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "use-script" | "no-change" | "reset-size" | undefined;
12
12
  transform?: undefined;
13
13
  } | {
14
14
  x: number;
15
15
  y: number;
16
- textAnchor: "inherit" | "end" | "start" | "middle" | undefined;
16
+ textAnchor: "start" | "end" | "inherit" | "middle" | undefined;
17
17
  dominantBaseline: "inherit" | "auto" | "text-before-edge" | "middle" | "central" | "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "use-script" | "no-change" | "reset-size" | undefined;
18
18
  transform: string;
19
19
  };
@@ -2,23 +2,17 @@ import { type DefaultizedScatterSeriesType } from "../models/seriesType/scatter.
2
2
  import { type D3Scale } from "../models/axis.mjs";
3
3
  import type { ScatterClasses } from "./scatterClasses.mjs";
4
4
  import { type ColorGetter } from "../internals/plugins/corePlugins/useChartSeriesConfig/index.mjs";
5
+ import type { ScatterSizeGetter } from "./seriesConfig/getMarkerSize.mjs";
5
6
  export interface BatchScatterProps {
6
7
  series: DefaultizedScatterSeriesType;
7
8
  xScale: D3Scale;
8
9
  yScale: D3Scale;
9
10
  color: string;
10
11
  colorGetter?: ColorGetter<'scatter'>;
12
+ sizeGetter?: ScatterSizeGetter;
11
13
  classes?: Partial<ScatterClasses>;
12
14
  className?: string;
13
15
  }
14
- export interface BatchScatterPathsProps {
15
- series: DefaultizedScatterSeriesType;
16
- xScale: D3Scale;
17
- yScale: D3Scale;
18
- color: string;
19
- colorGetter?: ColorGetter<'scatter'>;
20
- markerSize: number;
21
- }
22
16
  /**
23
17
  * @internal
24
18
  * A batch version of the Scatter component that uses SVG paths to render points.
@@ -2,23 +2,17 @@ import { type DefaultizedScatterSeriesType } from "../models/seriesType/scatter.
2
2
  import { type D3Scale } from "../models/axis.js";
3
3
  import type { ScatterClasses } from "./scatterClasses.js";
4
4
  import { type ColorGetter } from "../internals/plugins/corePlugins/useChartSeriesConfig/index.js";
5
+ import type { ScatterSizeGetter } from "./seriesConfig/getMarkerSize.js";
5
6
  export interface BatchScatterProps {
6
7
  series: DefaultizedScatterSeriesType;
7
8
  xScale: D3Scale;
8
9
  yScale: D3Scale;
9
10
  color: string;
10
11
  colorGetter?: ColorGetter<'scatter'>;
12
+ sizeGetter?: ScatterSizeGetter;
11
13
  classes?: Partial<ScatterClasses>;
12
14
  className?: string;
13
15
  }
14
- export interface BatchScatterPathsProps {
15
- series: DefaultizedScatterSeriesType;
16
- xScale: D3Scale;
17
- yScale: D3Scale;
18
- color: string;
19
- colorGetter?: ColorGetter<'scatter'>;
20
- markerSize: number;
21
- }
22
16
  /**
23
17
  * @internal
24
18
  * A batch version of the Scatter component that uses SVG paths to render points.
@@ -23,7 +23,7 @@ const ALMOST_ZERO = 0.01;
23
23
  function createPath(x, y, markerSize) {
24
24
  return `M${x - markerSize} ${y} a${markerSize} ${markerSize} 0 1 1 0 ${ALMOST_ZERO}`;
25
25
  }
26
- function useCreatePaths(seriesData, markerSize, xScale, yScale, color, colorGetter) {
26
+ function useCreatePaths(seriesData, markerSize, xScale, yScale, color, colorGetter, sizeGetter) {
27
27
  const {
28
28
  instance
29
29
  } = (0, _ChartsProvider.useChartsContext)();
@@ -38,7 +38,8 @@ function useCreatePaths(seriesData, markerSize, xScale, yScale, color, colorGett
38
38
  if (!instance.isPointInside(x, y)) {
39
39
  continue;
40
40
  }
41
- const path = createPath(x, y, markerSize);
41
+ const radius = sizeGetter ? sizeGetter(i) : markerSize;
42
+ const path = createPath(x, y, radius);
42
43
  const fill = colorGetter ? colorGetter(i) : color;
43
44
  const tempPath = (0, _appendAtKey.appendAtKey)(temporaryPaths, fill, path);
44
45
  if (tempPath.length >= MAX_POINTS_PER_PATH) {
@@ -60,9 +61,10 @@ function BatchScatterPaths(props) {
60
61
  yScale,
61
62
  color,
62
63
  colorGetter,
63
- markerSize
64
+ markerSize,
65
+ sizeGetter
64
66
  } = props;
65
- const paths = useCreatePaths(series.data, markerSize, xScale, yScale, color, colorGetter);
67
+ const paths = useCreatePaths(series.data, markerSize, xScale, yScale, color, colorGetter, sizeGetter);
66
68
  const children = [];
67
69
  let i = 0;
68
70
  for (const [fill, dArray] of paths.entries()) {
@@ -115,6 +117,7 @@ function BatchScatter(props) {
115
117
  yScale,
116
118
  color,
117
119
  colorGetter,
120
+ sizeGetter,
118
121
  className
119
122
  } = props;
120
123
  const {
@@ -122,20 +125,21 @@ function BatchScatter(props) {
122
125
  } = (0, _ChartsProvider.useChartsContext)();
123
126
  const isSeriesHighlighted = store.use(_useChartHighlight.selectorChartIsSeriesHighlighted, series.id);
124
127
  const isSeriesFaded = store.use(_useChartHighlight.selectorChartIsSeriesFaded, series.id);
125
- const seriesHighlightedItem = store.use(_useChartHighlight.selectorChartSeriesHighlightedItem, series.id);
128
+ const seriesHighlightedItemDataIndex = store.use(_useChartHighlight.selectorChartSeriesHighlightedItem, series.id);
126
129
  const seriesUnfadedItem = store.use(_useChartHighlight.selectorChartSeriesUnfadedItem, series.id);
127
130
  const highlightedModifier = 1.2;
128
- const markerSize = series.markerSize * (isSeriesHighlighted ? highlightedModifier : 1);
131
+ const highlightMultiplier = isSeriesHighlighted ? highlightedModifier : 1;
132
+ const getMarkerRadius = index => (sizeGetter ? sizeGetter(index) : series.markerSize) * highlightMultiplier;
129
133
  const classes = (0, _scatterClasses.useUtilityClasses)(props);
130
134
  const siblings = [];
131
- if (seriesHighlightedItem != null) {
132
- const datum = series.data[seriesHighlightedItem];
135
+ if (seriesHighlightedItemDataIndex != null) {
136
+ const datum = series.data[seriesHighlightedItemDataIndex];
133
137
  const getXPosition = (0, _getValueToPositionMapper.getValueToPositionMapper)(xScale);
134
138
  const getYPosition = (0, _getValueToPositionMapper.getValueToPositionMapper)(yScale);
135
139
  siblings.push(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
136
- fill: colorGetter ? colorGetter(seriesHighlightedItem) : color,
140
+ fill: colorGetter ? colorGetter(seriesHighlightedItemDataIndex) : color,
137
141
  "data-highlighted": true,
138
- d: createPath(getXPosition(datum.x), getYPosition(datum.y), markerSize * highlightedModifier)
142
+ d: createPath(getXPosition(datum.x), getYPosition(datum.y), getMarkerRadius(seriesHighlightedItemDataIndex) * highlightedModifier)
139
143
  }, `highlighted-${series.id}`));
140
144
  }
141
145
  if (seriesUnfadedItem != null) {
@@ -144,7 +148,7 @@ function BatchScatter(props) {
144
148
  const getYPosition = (0, _getValueToPositionMapper.getValueToPositionMapper)(yScale);
145
149
  siblings.push(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
146
150
  fill: colorGetter ? colorGetter(seriesUnfadedItem) : color,
147
- d: createPath(getXPosition(datum.x), getYPosition(datum.y), markerSize)
151
+ d: createPath(getXPosition(datum.x), getYPosition(datum.y), getMarkerRadius(seriesUnfadedItem))
148
152
  }, `unfaded-${series.id}`));
149
153
  }
150
154
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
@@ -159,7 +163,8 @@ function BatchScatter(props) {
159
163
  yScale: yScale,
160
164
  color: color,
161
165
  colorGetter: colorGetter,
162
- markerSize: markerSize
166
+ sizeGetter: getMarkerRadius,
167
+ markerSize: series.markerSize
163
168
  })
164
169
  }), siblings]
165
170
  });
@@ -16,7 +16,7 @@ const ALMOST_ZERO = 0.01;
16
16
  function createPath(x, y, markerSize) {
17
17
  return `M${x - markerSize} ${y} a${markerSize} ${markerSize} 0 1 1 0 ${ALMOST_ZERO}`;
18
18
  }
19
- function useCreatePaths(seriesData, markerSize, xScale, yScale, color, colorGetter) {
19
+ function useCreatePaths(seriesData, markerSize, xScale, yScale, color, colorGetter, sizeGetter) {
20
20
  const {
21
21
  instance
22
22
  } = useChartsContext();
@@ -31,7 +31,8 @@ function useCreatePaths(seriesData, markerSize, xScale, yScale, color, colorGett
31
31
  if (!instance.isPointInside(x, y)) {
32
32
  continue;
33
33
  }
34
- const path = createPath(x, y, markerSize);
34
+ const radius = sizeGetter ? sizeGetter(i) : markerSize;
35
+ const path = createPath(x, y, radius);
35
36
  const fill = colorGetter ? colorGetter(i) : color;
36
37
  const tempPath = appendAtKey(temporaryPaths, fill, path);
37
38
  if (tempPath.length >= MAX_POINTS_PER_PATH) {
@@ -53,9 +54,10 @@ function BatchScatterPaths(props) {
53
54
  yScale,
54
55
  color,
55
56
  colorGetter,
56
- markerSize
57
+ markerSize,
58
+ sizeGetter
57
59
  } = props;
58
- const paths = useCreatePaths(series.data, markerSize, xScale, yScale, color, colorGetter);
60
+ const paths = useCreatePaths(series.data, markerSize, xScale, yScale, color, colorGetter, sizeGetter);
59
61
  const children = [];
60
62
  let i = 0;
61
63
  for (const [fill, dArray] of paths.entries()) {
@@ -108,6 +110,7 @@ export function BatchScatter(props) {
108
110
  yScale,
109
111
  color,
110
112
  colorGetter,
113
+ sizeGetter,
111
114
  className
112
115
  } = props;
113
116
  const {
@@ -115,20 +118,21 @@ export function BatchScatter(props) {
115
118
  } = useChartsContext();
116
119
  const isSeriesHighlighted = store.use(selectorChartIsSeriesHighlighted, series.id);
117
120
  const isSeriesFaded = store.use(selectorChartIsSeriesFaded, series.id);
118
- const seriesHighlightedItem = store.use(selectorChartSeriesHighlightedItem, series.id);
121
+ const seriesHighlightedItemDataIndex = store.use(selectorChartSeriesHighlightedItem, series.id);
119
122
  const seriesUnfadedItem = store.use(selectorChartSeriesUnfadedItem, series.id);
120
123
  const highlightedModifier = 1.2;
121
- const markerSize = series.markerSize * (isSeriesHighlighted ? highlightedModifier : 1);
124
+ const highlightMultiplier = isSeriesHighlighted ? highlightedModifier : 1;
125
+ const getMarkerRadius = index => (sizeGetter ? sizeGetter(index) : series.markerSize) * highlightMultiplier;
122
126
  const classes = useUtilityClasses(props);
123
127
  const siblings = [];
124
- if (seriesHighlightedItem != null) {
125
- const datum = series.data[seriesHighlightedItem];
128
+ if (seriesHighlightedItemDataIndex != null) {
129
+ const datum = series.data[seriesHighlightedItemDataIndex];
126
130
  const getXPosition = getValueToPositionMapper(xScale);
127
131
  const getYPosition = getValueToPositionMapper(yScale);
128
132
  siblings.push(/*#__PURE__*/_jsx("path", {
129
- fill: colorGetter ? colorGetter(seriesHighlightedItem) : color,
133
+ fill: colorGetter ? colorGetter(seriesHighlightedItemDataIndex) : color,
130
134
  "data-highlighted": true,
131
- d: createPath(getXPosition(datum.x), getYPosition(datum.y), markerSize * highlightedModifier)
135
+ d: createPath(getXPosition(datum.x), getYPosition(datum.y), getMarkerRadius(seriesHighlightedItemDataIndex) * highlightedModifier)
132
136
  }, `highlighted-${series.id}`));
133
137
  }
134
138
  if (seriesUnfadedItem != null) {
@@ -137,7 +141,7 @@ export function BatchScatter(props) {
137
141
  const getYPosition = getValueToPositionMapper(yScale);
138
142
  siblings.push(/*#__PURE__*/_jsx("path", {
139
143
  fill: colorGetter ? colorGetter(seriesUnfadedItem) : color,
140
- d: createPath(getXPosition(datum.x), getYPosition(datum.y), markerSize)
144
+ d: createPath(getXPosition(datum.x), getYPosition(datum.y), getMarkerRadius(seriesUnfadedItem))
141
145
  }, `unfaded-${series.id}`));
142
146
  }
143
147
  return /*#__PURE__*/_jsxs(React.Fragment, {
@@ -152,7 +156,8 @@ export function BatchScatter(props) {
152
156
  yScale: yScale,
153
157
  color: color,
154
158
  colorGetter: colorGetter,
155
- markerSize: markerSize
159
+ sizeGetter: getMarkerRadius,
160
+ markerSize: series.markerSize
156
161
  })
157
162
  }), siblings]
158
163
  });
@@ -32,9 +32,9 @@ function FocusedScatterMark(_ref) {
32
32
  const {
33
33
  cx,
34
34
  cy,
35
- series
35
+ markerSize
36
36
  } = resolved;
37
- const size = series.markerSize + 3;
37
+ const size = markerSize + 3;
38
38
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("rect", (0, _extends2.default)({
39
39
  className: (0, _clsx.default)(classes.focusedMark, className),
40
40
  fill: "none",
@@ -25,9 +25,9 @@ export function FocusedScatterMark(_ref) {
25
25
  const {
26
26
  cx,
27
27
  cy,
28
- series
28
+ markerSize
29
29
  } = resolved;
30
- const size = series.markerSize + 3;
30
+ const size = markerSize + 3;
31
31
  return /*#__PURE__*/_jsx("rect", _extends({
32
32
  className: clsx(classes.focusedMark, className),
33
33
  fill: "none",
@@ -46,12 +46,12 @@ function HighlightedScatterMark(_ref) {
46
46
  const {
47
47
  cx,
48
48
  cy,
49
- series
49
+ markerSize
50
50
  } = resolved;
51
51
 
52
52
  // Allow a markerSize margin around the drawing area so the highlight ring stays
53
53
  // visible at the edges (e.g. during keyboard navigation) without needing a clip-path.
54
- const margin = series.markerSize;
54
+ const margin = markerSize;
55
55
  if (cx < drawingArea.left - margin || cx > drawingArea.left + drawingArea.width + margin || cy < drawingArea.top - margin || cy > drawingArea.top + drawingArea.height + margin) {
56
56
  return null;
57
57
  }
@@ -62,7 +62,7 @@ function HighlightedScatterMark(_ref) {
62
62
  strokeWidth: 1,
63
63
  cx: cx,
64
64
  cy: cy,
65
- r: series.markerSize,
65
+ r: markerSize,
66
66
  pointerEvents: "none"
67
67
  }, props));
68
68
  }
@@ -40,12 +40,12 @@ export function HighlightedScatterMark(_ref) {
40
40
  const {
41
41
  cx,
42
42
  cy,
43
- series
43
+ markerSize
44
44
  } = resolved;
45
45
 
46
46
  // Allow a markerSize margin around the drawing area so the highlight ring stays
47
47
  // visible at the edges (e.g. during keyboard navigation) without needing a clip-path.
48
- const margin = series.markerSize;
48
+ const margin = markerSize;
49
49
  if (cx < drawingArea.left - margin || cx > drawingArea.left + drawingArea.width + margin || cy < drawingArea.top - margin || cy > drawingArea.top + drawingArea.height + margin) {
50
50
  return null;
51
51
  }
@@ -56,7 +56,7 @@ export function HighlightedScatterMark(_ref) {
56
56
  strokeWidth: 1,
57
57
  cx: cx,
58
58
  cy: cy,
59
- r: series.markerSize,
59
+ r: markerSize,
60
60
  pointerEvents: "none"
61
61
  }, props));
62
62
  }
@@ -3,6 +3,7 @@ import { type ScatterMarkerSlotProps, type ScatterMarkerSlots } from "./ScatterM
3
3
  import { type DefaultizedScatterSeriesType, type ScatterItemIdentifier } from "../models/seriesType/scatter.mjs";
4
4
  import { type D3Scale } from "../models/axis.mjs";
5
5
  import { type ColorGetter } from "../internals/plugins/corePlugins/useChartSeriesConfig/index.mjs";
6
+ import type { ScatterSizeGetter } from "./seriesConfig/getMarkerSize.mjs";
6
7
  import type { ScatterClasses } from "./scatterClasses.mjs";
7
8
  /**
8
9
  * @deprecated The `Scatter` component is an internal implementation detail of `ScatterPlot` and will be removed from the public API in v10. Use `ScatterPlot` instead.
@@ -18,6 +19,10 @@ export interface ScatterProps {
18
19
  * If provided, the color for the specific scatter item is returned.
19
20
  */
20
21
  colorGetter: ColorGetter<'scatter'>;
22
+ /**
23
+ * Function to get the marker size of a scatter item given its data index.
24
+ */
25
+ sizeGetter: ScatterSizeGetter;
21
26
  /**
22
27
  * Callback fired when clicking on a scatter item.
23
28
  * @param {MouseEvent} event Mouse event recorded on the `<svg/>` element.
@@ -3,6 +3,7 @@ import { type ScatterMarkerSlotProps, type ScatterMarkerSlots } from "./ScatterM
3
3
  import { type DefaultizedScatterSeriesType, type ScatterItemIdentifier } from "../models/seriesType/scatter.js";
4
4
  import { type D3Scale } from "../models/axis.js";
5
5
  import { type ColorGetter } from "../internals/plugins/corePlugins/useChartSeriesConfig/index.js";
6
+ import type { ScatterSizeGetter } from "./seriesConfig/getMarkerSize.js";
6
7
  import type { ScatterClasses } from "./scatterClasses.js";
7
8
  /**
8
9
  * @deprecated The `Scatter` component is an internal implementation detail of `ScatterPlot` and will be removed from the public API in v10. Use `ScatterPlot` instead.
@@ -18,6 +19,10 @@ export interface ScatterProps {
18
19
  * If provided, the color for the specific scatter item is returned.
19
20
  */
20
21
  colorGetter: ColorGetter<'scatter'>;
22
+ /**
23
+ * Function to get the marker size of a scatter item given its data index.
24
+ */
25
+ sizeGetter: ScatterSizeGetter;
21
26
  /**
22
27
  * Callback fired when clicking on a scatter item.
23
28
  * @param {MouseEvent} event Mouse event recorded on the `<svg/>` element.
@@ -50,6 +50,7 @@ function Scatter(props) {
50
50
  xScale,
51
51
  yScale,
52
52
  colorGetter,
53
+ sizeGetter,
53
54
  onItemClick,
54
55
  classes: inClasses,
55
56
  slots,
@@ -68,8 +69,7 @@ function Scatter(props) {
68
69
  elementType: Marker,
69
70
  externalSlotProps: slotProps?.marker,
70
71
  additionalProps: {
71
- seriesId: series.id,
72
- size: series.markerSize
72
+ seriesId: series.id
73
73
  },
74
74
  ownerState: {}
75
75
  }),
@@ -88,6 +88,7 @@ function Scatter(props) {
88
88
  className: (0, _clsx.default)(classes.marker, markerProps.className),
89
89
  dataIndex: dataPoint.dataIndex,
90
90
  color: colorGetter(dataPoint.dataIndex),
91
+ size: sizeGetter(dataPoint.dataIndex),
91
92
  isHighlighted: isItemHighlighted,
92
93
  isFaded: isItemFaded,
93
94
  x: dataPoint.x,
@@ -123,6 +124,10 @@ process.env.NODE_ENV !== "production" ? Scatter.propTypes = {
123
124
  */
124
125
  onItemClick: _propTypes.default.func,
125
126
  series: _propTypes.default.object.isRequired,
127
+ /**
128
+ * Function to get the marker size of a scatter item given its data index.
129
+ */
130
+ sizeGetter: _propTypes.default.func.isRequired,
126
131
  slotProps: _propTypes.default.object,
127
132
  slots: _propTypes.default.object,
128
133
  xScale: _propTypes.default.func.isRequired,
@@ -46,6 +46,7 @@ function Scatter(props) {
46
46
  xScale,
47
47
  yScale,
48
48
  colorGetter,
49
+ sizeGetter,
49
50
  onItemClick,
50
51
  classes: inClasses,
51
52
  slots,
@@ -64,8 +65,7 @@ function Scatter(props) {
64
65
  elementType: Marker,
65
66
  externalSlotProps: slotProps?.marker,
66
67
  additionalProps: {
67
- seriesId: series.id,
68
- size: series.markerSize
68
+ seriesId: series.id
69
69
  },
70
70
  ownerState: {}
71
71
  }),
@@ -84,6 +84,7 @@ function Scatter(props) {
84
84
  className: clsx(classes.marker, markerProps.className),
85
85
  dataIndex: dataPoint.dataIndex,
86
86
  color: colorGetter(dataPoint.dataIndex),
87
+ size: sizeGetter(dataPoint.dataIndex),
87
88
  isHighlighted: isItemHighlighted,
88
89
  isFaded: isItemFaded,
89
90
  x: dataPoint.x,
@@ -119,6 +120,10 @@ process.env.NODE_ENV !== "production" ? Scatter.propTypes = {
119
120
  */
120
121
  onItemClick: PropTypes.func,
121
122
  series: PropTypes.object.isRequired,
123
+ /**
124
+ * Function to get the marker size of a scatter item given its data index.
125
+ */
126
+ sizeGetter: PropTypes.func.isRequired,
122
127
  slotProps: PropTypes.object,
123
128
  slots: PropTypes.object,
124
129
  xScale: PropTypes.func.isRequired,
@@ -7,6 +7,7 @@ import { type ChartsContainerProps } from "../ChartsContainer/index.mjs";
7
7
  import { type ScatterSeriesType } from "../models/seriesType/scatter.mjs";
8
8
  import { type ChartsTooltipProps } from "../ChartsTooltip/index.mjs";
9
9
  import { type ChartsTooltipSlots, type ChartsTooltipSlotProps } from "../ChartsTooltip/ChartTooltip.types.mjs";
10
+ import type { TooltipPropsOverrides } from "../models/chartsSlotsComponentsProps.mjs";
10
11
  import { type ChartsLegendSlotProps, type ChartsLegendSlots } from "../ChartsLegend/index.mjs";
11
12
  import { type ChartsOverlayProps, type ChartsOverlaySlotProps, type ChartsOverlaySlots } from "../ChartsOverlay/index.mjs";
12
13
  import { type ChartsAxisHighlightProps } from "../ChartsAxisHighlight/index.mjs";
@@ -20,7 +21,7 @@ export interface ScatterChartSlotProps extends ChartsAxisSlotProps, ScatterPlotS
20
21
  * Slot props for the tooltip component.
21
22
  * @default {}
22
23
  */
23
- tooltip?: Partial<ChartsTooltipProps<'item' | 'none'>>;
24
+ tooltip?: Partial<ChartsTooltipProps<'item' | 'none'>> & TooltipPropsOverrides;
24
25
  }
25
26
  export type ScatterSeries = MakeOptional<ScatterSeriesType, 'type'>;
26
27
  export interface ScatterChartProps extends Omit<ChartsContainerProps<'scatter', ScatterChartPluginSignatures>, 'series' | 'plugins' | 'onItemClick' | 'highlightedAxis' | 'onHighlightedAxisChange'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'>, Pick<ScatterPlotProps, 'renderer'> {
@@ -7,6 +7,7 @@ import { type ChartsContainerProps } from "../ChartsContainer/index.js";
7
7
  import { type ScatterSeriesType } from "../models/seriesType/scatter.js";
8
8
  import { type ChartsTooltipProps } from "../ChartsTooltip/index.js";
9
9
  import { type ChartsTooltipSlots, type ChartsTooltipSlotProps } from "../ChartsTooltip/ChartTooltip.types.js";
10
+ import type { TooltipPropsOverrides } from "../models/chartsSlotsComponentsProps.js";
10
11
  import { type ChartsLegendSlotProps, type ChartsLegendSlots } from "../ChartsLegend/index.js";
11
12
  import { type ChartsOverlayProps, type ChartsOverlaySlotProps, type ChartsOverlaySlots } from "../ChartsOverlay/index.js";
12
13
  import { type ChartsAxisHighlightProps } from "../ChartsAxisHighlight/index.js";
@@ -20,7 +21,7 @@ export interface ScatterChartSlotProps extends ChartsAxisSlotProps, ScatterPlotS
20
21
  * Slot props for the tooltip component.
21
22
  * @default {}
22
23
  */
23
- tooltip?: Partial<ChartsTooltipProps<'item' | 'none'>>;
24
+ tooltip?: Partial<ChartsTooltipProps<'item' | 'none'>> & TooltipPropsOverrides;
24
25
  }
25
26
  export type ScatterSeries = MakeOptional<ScatterSeriesType, 'type'>;
26
27
  export interface ScatterChartProps extends Omit<ChartsContainerProps<'scatter', ScatterChartPluginSignatures>, 'series' | 'plugins' | 'onItemClick' | 'highlightedAxis' | 'onHighlightedAxisChange'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'>, Pick<ScatterPlotProps, 'renderer'> {
@@ -406,6 +406,27 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
406
406
  id: _propTypes.default.string,
407
407
  max: _propTypes.default.number,
408
408
  min: _propTypes.default.number,
409
+ sizeMap: _propTypes.default.oneOfType([_propTypes.default.shape({
410
+ interpolator: _propTypes.default.oneOf(['linear', 'log', 'sqrt']),
411
+ max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
412
+ min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
413
+ size: _propTypes.default.arrayOf(_propTypes.default.number.isRequired).isRequired,
414
+ type: _propTypes.default.oneOf(['continuous']).isRequired
415
+ }), _propTypes.default.shape({
416
+ max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
417
+ min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
418
+ size: _propTypes.default.func.isRequired,
419
+ type: _propTypes.default.oneOf(['continuous']).isRequired
420
+ }), _propTypes.default.shape({
421
+ sizes: _propTypes.default.arrayOf(_propTypes.default.number).isRequired,
422
+ thresholds: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]).isRequired).isRequired,
423
+ type: _propTypes.default.oneOf(['piecewise']).isRequired
424
+ }), _propTypes.default.shape({
425
+ sizes: _propTypes.default.arrayOf(_propTypes.default.number).isRequired,
426
+ type: _propTypes.default.oneOf(['ordinal']).isRequired,
427
+ unknownSize: _propTypes.default.number,
428
+ values: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired)
429
+ })]),
409
430
  valueGetter: _propTypes.default.func
410
431
  }))
411
432
  } : void 0;
@@ -399,6 +399,27 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
399
399
  id: PropTypes.string,
400
400
  max: PropTypes.number,
401
401
  min: PropTypes.number,
402
+ sizeMap: PropTypes.oneOfType([PropTypes.shape({
403
+ interpolator: PropTypes.oneOf(['linear', 'log', 'sqrt']),
404
+ max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
405
+ min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
406
+ size: PropTypes.arrayOf(PropTypes.number.isRequired).isRequired,
407
+ type: PropTypes.oneOf(['continuous']).isRequired
408
+ }), PropTypes.shape({
409
+ max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
410
+ min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
411
+ size: PropTypes.func.isRequired,
412
+ type: PropTypes.oneOf(['continuous']).isRequired
413
+ }), PropTypes.shape({
414
+ sizes: PropTypes.arrayOf(PropTypes.number).isRequired,
415
+ thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
416
+ type: PropTypes.oneOf(['piecewise']).isRequired
417
+ }), PropTypes.shape({
418
+ sizes: PropTypes.arrayOf(PropTypes.number).isRequired,
419
+ type: PropTypes.oneOf(['ordinal']).isRequired,
420
+ unknownSize: PropTypes.number,
421
+ values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
422
+ })]),
402
423
  valueGetter: PropTypes.func
403
424
  }))
404
425
  } : void 0;
@@ -1,14 +1,15 @@
1
1
  import type * as React from 'react';
2
2
  import type { ScatterMarkerProps } from "./ScatterMarker.mjs";
3
+ import type { MarkerPropsOverrides } from "../models/chartsSlotsComponentsProps.mjs";
3
4
  export interface ScatterMarkerSlots {
4
5
  /**
5
6
  * The component that renders the marker for a scatter point.
6
7
  * @default ScatterMarker
7
8
  */
8
- marker?: React.JSXElementConstructor<ScatterMarkerProps>;
9
+ marker?: React.JSXElementConstructor<ScatterMarkerProps & MarkerPropsOverrides>;
9
10
  }
10
11
  export interface ScatterMarkerSlotProps {
11
- marker?: ScatterMarkerProps;
12
+ marker?: Partial<ScatterMarkerProps> & MarkerPropsOverrides;
12
13
  }
13
14
  export interface ScatterMarkerSlotExtension {
14
15
  /**
@@ -1,14 +1,15 @@
1
1
  import type * as React from 'react';
2
2
  import type { ScatterMarkerProps } from "./ScatterMarker.js";
3
+ import type { MarkerPropsOverrides } from "../models/chartsSlotsComponentsProps.js";
3
4
  export interface ScatterMarkerSlots {
4
5
  /**
5
6
  * The component that renders the marker for a scatter point.
6
7
  * @default ScatterMarker
7
8
  */
8
- marker?: React.JSXElementConstructor<ScatterMarkerProps>;
9
+ marker?: React.JSXElementConstructor<ScatterMarkerProps & MarkerPropsOverrides>;
9
10
  }
10
11
  export interface ScatterMarkerSlotProps {
11
- marker?: ScatterMarkerProps;
12
+ marker?: Partial<ScatterMarkerProps> & MarkerPropsOverrides;
12
13
  }
13
14
  export interface ScatterMarkerSlotExtension {
14
15
  /**
@@ -1,10 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { type ScatterProps, type ScatterSlotProps, type ScatterSlots } from "./Scatter.mjs";
3
+ import type { ScatterPropsOverrides } from "../models/chartsSlotsComponentsProps.mjs";
3
4
  export interface ScatterPlotSlots extends ScatterSlots {
4
- scatter?: React.JSXElementConstructor<ScatterProps>;
5
+ scatter?: React.JSXElementConstructor<ScatterProps & ScatterPropsOverrides>;
5
6
  }
6
7
  export interface ScatterPlotSlotProps extends ScatterSlotProps {
7
- scatter?: Partial<ScatterProps>;
8
+ scatter?: Partial<ScatterProps> & ScatterPropsOverrides;
8
9
  }
9
10
  export type RendererType = 'svg-single' | 'svg-batch';
10
11
  export interface ScatterPlotProps extends Pick<ScatterProps, 'onItemClick' | 'classes'> {
@@ -1,10 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { type ScatterProps, type ScatterSlotProps, type ScatterSlots } from "./Scatter.js";
3
+ import type { ScatterPropsOverrides } from "../models/chartsSlotsComponentsProps.js";
3
4
  export interface ScatterPlotSlots extends ScatterSlots {
4
- scatter?: React.JSXElementConstructor<ScatterProps>;
5
+ scatter?: React.JSXElementConstructor<ScatterProps & ScatterPropsOverrides>;
5
6
  }
6
7
  export interface ScatterPlotSlotProps extends ScatterSlotProps {
7
- scatter?: Partial<ScatterProps>;
8
+ scatter?: Partial<ScatterProps> & ScatterPropsOverrides;
8
9
  }
9
10
  export type RendererType = 'svg-single' | 'svg-batch';
10
11
  export interface ScatterPlotProps extends Pick<ScatterProps, 'onItemClick' | 'classes'> {