@mui/x-charts 8.7.0 → 8.8.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 (160) hide show
  1. package/BarChart/BarChart.d.ts +1 -1
  2. package/BarChart/BarChart.js +16 -0
  3. package/CHANGELOG.md +98 -0
  4. package/ChartContainer/ChartContainer.js +22 -0
  5. package/ChartContainer/useChartContainerProps.js +8 -2
  6. package/ChartDataProvider/ChartDataProvider.js +6 -0
  7. package/ChartDataProvider/useChartDataProviderProps.d.ts +1 -1
  8. package/ChartDataProvider/useChartDataProviderProps.js +6 -1
  9. package/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +1 -1
  10. package/ChartsAxisHighlight/ChartsXAxisHighlight.js +34 -24
  11. package/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +1 -1
  12. package/ChartsAxisHighlight/ChartsYAxisHighlight.js +34 -24
  13. package/Gauge/GaugeContainer.d.ts +1 -1
  14. package/LineChart/LineChart.js +22 -0
  15. package/LineChart/LineHighlightPlot.js +10 -4
  16. package/LineChart/MarkPlot.js +17 -3
  17. package/LineChart/useAreaPlotData.js +3 -2
  18. package/PieChart/PieChart.d.ts +1 -1
  19. package/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +1 -1
  20. package/ScatterChart/ScatterChart.d.ts +1 -1
  21. package/ScatterChart/ScatterPlot.js +2 -2
  22. package/ScatterChart/seriesConfig/seriesProcessor.js +3 -0
  23. package/SparkLineChart/SparkLineChart.d.ts +1 -1
  24. package/SparkLineChart/SparkLineChart.js +16 -0
  25. package/esm/BarChart/BarChart.d.ts +1 -1
  26. package/esm/BarChart/BarChart.js +16 -0
  27. package/esm/ChartContainer/ChartContainer.js +22 -0
  28. package/esm/ChartContainer/useChartContainerProps.js +8 -2
  29. package/esm/ChartDataProvider/ChartDataProvider.js +6 -0
  30. package/esm/ChartDataProvider/useChartDataProviderProps.d.ts +1 -1
  31. package/esm/ChartDataProvider/useChartDataProviderProps.js +7 -2
  32. package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +1 -1
  33. package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.js +36 -26
  34. package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +1 -1
  35. package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.js +36 -26
  36. package/esm/Gauge/GaugeContainer.d.ts +1 -1
  37. package/esm/LineChart/LineChart.js +22 -0
  38. package/esm/LineChart/LineHighlightPlot.js +11 -5
  39. package/esm/LineChart/MarkPlot.js +17 -3
  40. package/esm/LineChart/useAreaPlotData.js +3 -2
  41. package/esm/PieChart/PieChart.d.ts +1 -1
  42. package/esm/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +1 -1
  43. package/esm/ScatterChart/ScatterChart.d.ts +1 -1
  44. package/esm/ScatterChart/ScatterPlot.js +2 -2
  45. package/esm/ScatterChart/seriesConfig/seriesProcessor.js +3 -0
  46. package/esm/SparkLineChart/SparkLineChart.d.ts +1 -1
  47. package/esm/SparkLineChart/SparkLineChart.js +16 -0
  48. package/esm/hooks/useAxis.d.ts +2 -2
  49. package/esm/index.js +1 -1
  50. package/esm/internals/constants.d.ts +3 -0
  51. package/esm/internals/constants.js +4 -0
  52. package/esm/internals/getLabel.d.ts +1 -1
  53. package/esm/internals/index.d.ts +1 -0
  54. package/esm/internals/index.js +1 -0
  55. package/esm/internals/plugins/corePlugins/corePlugins.d.ts +3 -2
  56. package/esm/internals/plugins/corePlugins/corePlugins.js +2 -1
  57. package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +1 -1
  58. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +3 -3
  59. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/index.d.ts +3 -0
  60. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/index.js +2 -0
  61. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.ts +3 -0
  62. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.js +27 -0
  63. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +8 -0
  64. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.js +3 -0
  65. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.ts +21 -0
  66. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js +1 -0
  67. package/esm/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +1 -1
  68. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +2 -2
  69. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +5 -1
  70. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -2
  71. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +1 -0
  72. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +5 -2
  73. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +7 -0
  74. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.js +14 -0
  75. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +2 -0
  76. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +2 -0
  77. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +4 -4
  78. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +46 -3
  79. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +18 -1
  80. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -0
  81. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +76 -0
  82. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +10 -5
  83. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +8 -5
  84. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +47 -0
  85. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +48 -0
  86. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +18 -12
  87. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +16 -2
  88. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/zoom.types.d.ts +6 -1
  89. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +5 -5
  90. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +6 -6
  91. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +5 -5
  92. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +7 -8
  93. package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.d.ts +1 -1
  94. package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +1 -1
  95. package/esm/internals/plugins/utils/useLazySelectorEffect.d.ts +7 -0
  96. package/esm/internals/plugins/utils/useLazySelectorEffect.js +70 -0
  97. package/esm/internals/store/useCharts.d.ts +1 -1
  98. package/esm/models/axis.d.ts +15 -0
  99. package/esm/models/axis.js +4 -0
  100. package/esm/models/index.d.ts +1 -1
  101. package/esm/models/seriesType/scatter.d.ts +11 -2
  102. package/esm/themeAugmentation/components.d.ts +3 -0
  103. package/esm/themeAugmentation/props.d.ts +2 -0
  104. package/hooks/useAxis.d.ts +2 -2
  105. package/index.js +1 -1
  106. package/internals/constants.d.ts +3 -0
  107. package/internals/constants.js +5 -1
  108. package/internals/getLabel.d.ts +1 -1
  109. package/internals/index.d.ts +1 -0
  110. package/internals/index.js +8 -0
  111. package/internals/plugins/corePlugins/corePlugins.d.ts +3 -2
  112. package/internals/plugins/corePlugins/corePlugins.js +2 -1
  113. package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +1 -1
  114. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +3 -3
  115. package/internals/plugins/corePlugins/useChartExperimentalFeature/index.d.ts +3 -0
  116. package/internals/plugins/corePlugins/useChartExperimentalFeature/index.js +27 -0
  117. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.ts +3 -0
  118. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.js +34 -0
  119. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +8 -0
  120. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.js +10 -0
  121. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.ts +21 -0
  122. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js +5 -0
  123. package/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +1 -1
  124. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +2 -2
  125. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +5 -1
  126. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -2
  127. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +1 -0
  128. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +4 -1
  129. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +7 -0
  130. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.js +21 -0
  131. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +2 -0
  132. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +24 -0
  133. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +4 -4
  134. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +46 -3
  135. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +18 -1
  136. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -0
  137. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +82 -0
  138. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +10 -5
  139. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +9 -6
  140. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +47 -0
  141. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +55 -0
  142. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +18 -12
  143. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +18 -3
  144. package/internals/plugins/featurePlugins/useChartCartesianAxis/zoom.types.d.ts +6 -1
  145. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +5 -5
  146. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +6 -6
  147. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +5 -5
  148. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +7 -8
  149. package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.d.ts +1 -1
  150. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +1 -1
  151. package/internals/plugins/utils/useLazySelectorEffect.d.ts +7 -0
  152. package/internals/plugins/utils/useLazySelectorEffect.js +77 -0
  153. package/internals/store/useCharts.d.ts +1 -1
  154. package/models/axis.d.ts +15 -0
  155. package/models/axis.js +4 -0
  156. package/models/index.d.ts +1 -1
  157. package/models/seriesType/scatter.d.ts +11 -2
  158. package/package.json +4 -4
  159. package/themeAugmentation/components.d.ts +3 -0
  160. package/themeAugmentation/props.d.ts +2 -0
@@ -15,7 +15,7 @@ import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from "
15
15
  import { BarChartPluginsSignatures } from "./BarChart.plugins.js";
16
16
  export interface BarChartSlots extends ChartsAxisSlots, BarPlotSlots, ChartsLegendSlots, ChartsOverlaySlots, ChartsTooltipSlots, ChartsToolbarSlots, Partial<ChartsSlots> {}
17
17
  export interface BarChartSlotProps extends ChartsAxisSlotProps, BarPlotSlotProps, ChartsLegendSlotProps, ChartsOverlaySlotProps, ChartsTooltipSlotProps, ChartsToolbarSlotProps, Partial<ChartsSlotProps> {}
18
- export interface BarChartProps extends Omit<ChartContainerProps<'bar', BarChartPluginsSignatures>, 'series' | 'plugins' | 'zAxis'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<BarPlotProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
18
+ export interface BarChartProps extends Omit<ChartContainerProps<'bar', BarChartPluginsSignatures>, 'series' | 'plugins' | 'zAxis' | 'experimentalFeatures'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<BarPlotProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
19
19
  /**
20
20
  * The series to display in the bar chart.
21
21
  * An array of [[BarSeriesType]] objects.
@@ -134,6 +134,14 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
134
134
  * If `true`, the legend is not rendered.
135
135
  */
136
136
  hideLegend: _propTypes.default.bool,
137
+ /**
138
+ * The controlled axis highlight.
139
+ * Identified by the axis id, and data index.
140
+ */
141
+ highlightedAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
142
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
143
+ dataIndex: _propTypes.default.number.isRequired
144
+ })),
137
145
  /**
138
146
  * The highlighted item.
139
147
  * Used when the highlight is controlled.
@@ -186,6 +194,14 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
186
194
  * @param {HighlightItemData | null} highlightedItem The newly highlighted item.
187
195
  */
188
196
  onHighlightChange: _propTypes.default.func,
197
+ /**
198
+ * The function called when the pointer position corresponds to a new axis data item.
199
+ * This update can either be caused by a pointer movement, or an axis update.
200
+ * In case of multiple axes, the function is called if at least one axis is updated.
201
+ * The argument contains the identifier for all axes with a `data` property.
202
+ * @param {AxisItemIdentifier[]} axisItems The array of axes item identifiers.
203
+ */
204
+ onHighlightedAxisChange: _propTypes.default.func,
189
205
  /**
190
206
  * Callback fired when a bar item is clicked.
191
207
  * @param {React.MouseEvent<SVGElement, MouseEvent>} event The event source of the callback.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,104 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.8.0
9
+
10
+ _Jul 11, 2025_
11
+
12
+ We'd like to extend a big thank you to the 13 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 📊 Chart zoom preview can be enabled
15
+
16
+ <img width="758" alt="chart with x-axis preview" src="https://github.com/user-attachments/assets/50ce6f61-16dc-4e9b-a727-ca65d80927d7" />
17
+
18
+ - 🌎 Add Indonesian (id-ID) locale on the Data Grid
19
+
20
+ Special thanks go out to the community members for their valuable contributions:
21
+ @kennarddh
22
+
23
+ The following are all team members who have contributed to this release:
24
+ @alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @noraleonte, @prakhargupta1, @rita-codes, @siriwatknp
25
+
26
+ ### Data Grid
27
+
28
+ #### `@mui/x-data-grid@8.8.0`
29
+
30
+ - [DataGrid] Fix `useGridSelector` missing subscription in `React.StrictMode` (#18676) @cherniavskii
31
+ - [DataGrid] Fix scrollbar filler `z-index` (#18688) @KenanYusuf
32
+ - [DataGrid] Set correct data source cache chunk size when pagination is disabled (#18636) @arminmeh
33
+ - [l10n] Add Indonesian (id-ID) locale (#18710) @kennarddh
34
+
35
+ #### `@mui/x-data-grid-pro@8.8.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
36
+
37
+ Same changes as in `@mui/x-data-grid@8.8.0`, plus:
38
+
39
+ - [DataGridPro] Fix row ordering not auto-scrolling when moving beyond viewport (#18557) @MBilalShafi
40
+ - [DataGridPro] Set correct parent paths when tree is refreshed with data source tree data and row grouping (#18715) @arminmeh
41
+
42
+ #### `@mui/x-data-grid-premium@8.8.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
43
+
44
+ Same changes as in `@mui/x-data-grid-pro@8.8.0`.
45
+
46
+ ### Date and Time Pickers
47
+
48
+ #### `@mui/x-date-pickers@8.8.0`
49
+
50
+ Internal changes.
51
+
52
+ #### `@mui/x-date-pickers-pro@8.8.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
53
+
54
+ Same changes as in `@mui/x-date-pickers@8.8.0`.
55
+
56
+ ### Charts
57
+
58
+ #### `@mui/x-charts@8.8.0`
59
+
60
+ - [charts] Add control to the axis highlight (#17900) @alexfauquette
61
+ - [charts] Avoid processing area plot data if area isn't used in series (#18712) @bernardobelchior
62
+ - [charts] Make smarter default domain limit (#18506) @alexfauquette
63
+
64
+ #### `@mui/x-charts-pro@8.8.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
65
+
66
+ Same changes as in `@mui/x-charts@8.8.0`, plus:
67
+
68
+ - [charts-pro] Add `funnelDirection` to control pyramid direction (#18568) @JCQuintas
69
+ - [charts-pro] Add `onBeforeExport` callback (#18722) @bernardobelchior
70
+ - [charts-pro] Add chart zoom preview (#18267) @bernardobelchior
71
+ - [charts-pro] Allow customizing scatter preview marker size (#18726) @bernardobelchior
72
+ - [charts-pro] Allow disabling the copy of styles in charts export (#18753) @bernardobelchior
73
+
74
+ ### Tree View
75
+
76
+ #### `@mui/x-tree-view@8.8.0`
77
+
78
+ - [tree view] Fix state update that caused scrolling bug when lazy loading and `checkboxSelection` are enabled (#18749) @rita-codes
79
+
80
+ #### `@mui/x-tree-view-pro@8.8.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
81
+
82
+ Same changes as in `@mui/x-tree-view@8.8.0`.
83
+
84
+ ### Codemod
85
+
86
+ #### `@mui/x-codemod@8.8.0`
87
+
88
+ Internal changes.
89
+
90
+ ### Docs
91
+
92
+ - [docs] Add standalone Pyramid chart page to improve SEO (#18527) @prakhargupta1
93
+ - [docs] Add example to customise line interaction (#18539) @alexfauquette
94
+ - [docs] Fix `size` column filtering in files tree demo (#17952) @cherniavskii
95
+ - [docs] Generate `llms.txt` for X and their products (#18595) @siriwatknp
96
+ - [docs] Improve bar chart demos on mobile (#18721) @alexfauquette
97
+ - [docs] Refine charts overview page (#17447) @noraleonte
98
+
99
+ ### Miscellaneous
100
+
101
+ - [code-infra] Ensure all `@mui/*` packages are picked by `Material UI` renovate group (#18711) @LukasTy
102
+ - [code-infra] Fix broken CI (#18716) @LukasTy
103
+ - [code-infra] Refactor `prettier` config resolving (#18720) @LukasTy
104
+ - [test] Increase data points in chart benchmarks (#18714) @bernardobelchior
105
+
8
106
  ## 8.7.0
9
107
 
10
108
  _Jul 4, 2025_
@@ -83,10 +83,24 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
83
83
  * If true, the voronoi interaction are ignored.
84
84
  */
85
85
  disableVoronoi: _propTypes.default.bool,
86
+ /**
87
+ * Options to enable features planned for the next major.
88
+ */
89
+ experimentalFeatures: _propTypes.default.shape({
90
+ preferStrictDomainInLineCharts: _propTypes.default.bool
91
+ }),
86
92
  /**
87
93
  * The height of the chart in px. If not defined, it takes the height of the parent element.
88
94
  */
89
95
  height: _propTypes.default.number,
96
+ /**
97
+ * The controlled axis highlight.
98
+ * Identified by the axis id, and data index.
99
+ */
100
+ highlightedAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
101
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
102
+ dataIndex: _propTypes.default.number.isRequired
103
+ })),
90
104
  /**
91
105
  * The highlighted item.
92
106
  * Used when the highlight is controlled.
@@ -129,6 +143,14 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
129
143
  * @param {HighlightItemData | null} highlightedItem The newly highlighted item.
130
144
  */
131
145
  onHighlightChange: _propTypes.default.func,
146
+ /**
147
+ * The function called when the pointer position corresponds to a new axis data item.
148
+ * This update can either be caused by a pointer movement, or an axis update.
149
+ * In case of multiple axes, the function is called if at least one axis is updated.
150
+ * The argument contains the identifier for all axes with a `data` property.
151
+ * @param {AxisItemIdentifier[]} axisItems The array of axes item identifiers.
152
+ */
153
+ onHighlightedAxisChange: _propTypes.default.func,
132
154
  /**
133
155
  * Callback fired when clicking close to an item.
134
156
  * This is only available for scatter plot for now.
@@ -9,7 +9,7 @@ exports.useChartContainerProps = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
11
  var _allPlugins = require("../internals/plugins/allPlugins");
12
- const _excluded = ["width", "height", "margin", "children", "series", "colors", "dataset", "desc", "onAxisClick", "disableVoronoi", "voronoiMaxRadius", "onItemClick", "disableAxisListener", "highlightedItem", "onHighlightChange", "sx", "title", "xAxis", "yAxis", "zAxis", "rotationAxis", "radiusAxis", "skipAnimation", "seriesConfig", "plugins", "localeText", "slots", "slotProps"];
12
+ const _excluded = ["width", "height", "margin", "children", "series", "colors", "dataset", "desc", "onAxisClick", "highlightedAxis", "onHighlightedAxisChange", "disableVoronoi", "voronoiMaxRadius", "onItemClick", "disableAxisListener", "highlightedItem", "onHighlightChange", "sx", "title", "xAxis", "yAxis", "zAxis", "rotationAxis", "radiusAxis", "skipAnimation", "seriesConfig", "plugins", "localeText", "slots", "slotProps", "experimentalFeatures"];
13
13
  const useChartContainerProps = (props, ref) => {
14
14
  const _ref = props,
15
15
  {
@@ -22,6 +22,8 @@ const useChartContainerProps = (props, ref) => {
22
22
  dataset,
23
23
  desc,
24
24
  onAxisClick,
25
+ highlightedAxis,
26
+ onHighlightedAxisChange,
25
27
  disableVoronoi,
26
28
  voronoiMaxRadius,
27
29
  onItemClick,
@@ -40,7 +42,8 @@ const useChartContainerProps = (props, ref) => {
40
42
  plugins,
41
43
  localeText,
42
44
  slots,
43
- slotProps
45
+ slotProps,
46
+ experimentalFeatures
44
47
  } = _ref,
45
48
  other = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
46
49
  const chartsSurfaceProps = (0, _extends2.default)({
@@ -58,6 +61,8 @@ const useChartContainerProps = (props, ref) => {
58
61
  highlightedItem,
59
62
  onHighlightChange,
60
63
  onAxisClick,
64
+ highlightedAxis,
65
+ onHighlightedAxisChange,
61
66
  disableVoronoi,
62
67
  voronoiMaxRadius,
63
68
  onItemClick,
@@ -71,6 +76,7 @@ const useChartContainerProps = (props, ref) => {
71
76
  height,
72
77
  localeText,
73
78
  seriesConfig,
79
+ experimentalFeatures,
74
80
  plugins: plugins ?? _allPlugins.DEFAULT_PLUGINS,
75
81
  slots,
76
82
  slotProps
@@ -80,6 +80,12 @@ process.env.NODE_ENV !== "production" ? ChartDataProvider.propTypes = {
80
80
  * An array of objects that can be used to populate series and axes data using their `dataKey` property.
81
81
  */
82
82
  dataset: _propTypes.default.arrayOf(_propTypes.default.object),
83
+ /**
84
+ * Options to enable features planned for the next major.
85
+ */
86
+ experimentalFeatures: _propTypes.default.shape({
87
+ preferStrictDomainInLineCharts: _propTypes.default.bool
88
+ }),
83
89
  /**
84
90
  * The height of the chart in px. If not defined, it takes the height of the parent element.
85
91
  */
@@ -4,7 +4,7 @@ import { ChartAnyPluginSignature } from "../internals/plugins/models/index.js";
4
4
  import { ChartSeriesType } from "../models/seriesType/config.js";
5
5
  import { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
6
6
  import { ChartsLocalizationProviderProps } from "../ChartsLocalizationProvider/index.js";
7
- export declare const useChartDataProviderProps: <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartDataProviderProps<TSeries, TSignatures> & ChartsLocalizationProviderProps) => {
7
+ export declare const useChartDataProviderProps: <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(inProps: ChartDataProviderProps<TSeries, TSignatures> & ChartsLocalizationProviderProps) => {
8
8
  children: import("react").ReactNode;
9
9
  localeText: Partial<import("../locales/index.js").ChartsLocaleText> | undefined;
10
10
  chartProviderProps: ChartProviderProps<TSeries, TSignatures>;
@@ -11,7 +11,12 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
11
11
  var _styles = require("@mui/material/styles");
12
12
  var _allPlugins = require("../internals/plugins/allPlugins");
13
13
  const _excluded = ["children", "localeText", "plugins", "seriesConfig", "slots", "slotProps"];
14
- const useChartDataProviderProps = props => {
14
+ const useChartDataProviderProps = inProps => {
15
+ // eslint-disable-next-line material-ui/mui-name-matches-component-name
16
+ const props = (0, _styles.useThemeProps)({
17
+ props: inProps,
18
+ name: 'MuiChartDataProvider'
19
+ });
15
20
  const {
16
21
  children,
17
22
  localeText,
@@ -7,4 +7,4 @@ import { ChartsAxisHighlightClasses } from "./chartsAxisHighlightClasses.js";
7
7
  export default function ChartsXHighlight(props: {
8
8
  type: ChartsAxisHighlightType;
9
9
  classes: ChartsAxisHighlightClasses;
10
- }): React.JSX.Element;
10
+ }): React.JSX.Element[] | null;
@@ -26,32 +26,42 @@ var _jsxRuntime = require("react/jsx-runtime");
26
26
  top,
27
27
  height
28
28
  } = (0, _hooks.useDrawingArea)();
29
- const xScale = (0, _useScale.useXScale)();
30
29
  const store = (0, _useStore.useStore)();
31
- const axisXValue = (0, _useSelector.useSelector)(store, _useChartCartesianAxis.selectorChartsInteractionXAxisValue);
32
- const getXPosition = (0, _useScale.getValueToPositionMapper)(xScale);
33
- const isBandScaleX = type === 'band' && axisXValue !== null && (0, _isBandScale.isBandScale)(xScale);
34
- if (process.env.NODE_ENV !== 'production') {
35
- const isError = isBandScaleX && xScale(axisXValue) === undefined;
36
- if (isError) {
37
- console.error([`MUI X Charts: The position value provided for the axis is not valid for the current scale.`, `This probably means something is wrong with the data passed to the chart.`, `The ChartsAxisHighlight component will not be displayed.`].join('\n'));
38
- }
30
+ const axisXValues = (0, _useSelector.useSelector)(store, _useChartCartesianAxis.selectorChartsHighlightXAxisValue);
31
+ const xAxes = (0, _useSelector.useSelector)(store, _useChartCartesianAxis.selectorChartXAxis);
32
+ if (axisXValues.length === 0) {
33
+ return null;
39
34
  }
40
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
41
- children: [isBandScaleX && xScale(axisXValue) !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlightPath.ChartsAxisHighlightPath
42
- // @ts-expect-error, xScale value is checked in the statement above
43
- , {
44
- d: `M ${xScale(axisXValue) - (xScale.step() - xScale.bandwidth()) / 2} ${top} l ${xScale.step()} 0 l 0 ${height} l ${-xScale.step()} 0 Z`,
45
- className: classes.root,
46
- ownerState: {
47
- axisHighlight: 'band'
48
- }
49
- }), type === 'line' && axisXValue !== null && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlightPath.ChartsAxisHighlightPath, {
50
- d: `M ${getXPosition(axisXValue)} ${top} L ${getXPosition(axisXValue)} ${top + height}`,
51
- className: classes.root,
52
- ownerState: {
53
- axisHighlight: 'line'
35
+ return axisXValues.map(({
36
+ axisId,
37
+ value
38
+ }) => {
39
+ const xAxis = xAxes.axis[axisId];
40
+ const xScale = xAxis.scale;
41
+ const getXPosition = (0, _useScale.getValueToPositionMapper)(xScale);
42
+ const isBandScaleX = type === 'band' && value !== null && (0, _isBandScale.isBandScale)(xScale);
43
+ if (process.env.NODE_ENV !== 'production') {
44
+ const isError = isBandScaleX && xScale(value) === undefined;
45
+ if (isError) {
46
+ console.error([`MUI X Charts: The position value provided for the axis is not valid for the current scale.`, `This probably means something is wrong with the data passed to the chart.`, `The ChartsAxisHighlight component will not be displayed.`].join('\n'));
54
47
  }
55
- })]
48
+ }
49
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
50
+ children: [isBandScaleX && xScale(value) !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlightPath.ChartsAxisHighlightPath
51
+ // @ts-expect-error, xScale value is checked in the statement above
52
+ , {
53
+ d: `M ${xScale(value) - (xScale.step() - xScale.bandwidth()) / 2} ${top} l ${xScale.step()} 0 l 0 ${height} l ${-xScale.step()} 0 Z`,
54
+ className: classes.root,
55
+ ownerState: {
56
+ axisHighlight: 'band'
57
+ }
58
+ }), type === 'line' && value !== null && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlightPath.ChartsAxisHighlightPath, {
59
+ d: `M ${getXPosition(value)} ${top} L ${getXPosition(value)} ${top + height}`,
60
+ className: classes.root,
61
+ ownerState: {
62
+ axisHighlight: 'line'
63
+ }
64
+ })]
65
+ }, `${axisId}-${value}`);
56
66
  });
57
67
  }
@@ -7,4 +7,4 @@ import { ChartsAxisHighlightClasses } from "./chartsAxisHighlightClasses.js";
7
7
  export default function ChartsYHighlight(props: {
8
8
  type: ChartsAxisHighlightType;
9
9
  classes: ChartsAxisHighlightClasses;
10
- }): React.JSX.Element;
10
+ }): React.JSX.Element[] | null;
@@ -26,32 +26,42 @@ var _jsxRuntime = require("react/jsx-runtime");
26
26
  left,
27
27
  width
28
28
  } = (0, _hooks.useDrawingArea)();
29
- const yScale = (0, _useScale.useYScale)();
30
29
  const store = (0, _useStore.useStore)();
31
- const axisYValue = (0, _useSelector.useSelector)(store, _useChartCartesianAxis.selectorChartsInteractionYAxisValue);
32
- const getYPosition = (0, _useScale.getValueToPositionMapper)(yScale);
33
- const isBandScaleY = type === 'band' && axisYValue !== null && (0, _isBandScale.isBandScale)(yScale);
34
- if (process.env.NODE_ENV !== 'production') {
35
- const isError = isBandScaleY && yScale(axisYValue) === undefined;
36
- if (isError) {
37
- console.error([`MUI X Charts: The position value provided for the axis is not valid for the current scale.`, `This probably means something is wrong with the data passed to the chart.`, `The ChartsAxisHighlight component will not be displayed.`].join('\n'));
38
- }
30
+ const axisYValues = (0, _useSelector.useSelector)(store, _useChartCartesianAxis.selectorChartsHighlightYAxisValue);
31
+ const yAxes = (0, _useSelector.useSelector)(store, _useChartCartesianAxis.selectorChartYAxis);
32
+ if (axisYValues.length === 0) {
33
+ return null;
39
34
  }
40
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
41
- children: [isBandScaleY && yScale(axisYValue) !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlightPath.ChartsAxisHighlightPath, {
42
- d: `M ${left} ${
43
- // @ts-expect-error, yScale value is checked in the statement above
44
- yScale(axisYValue) - (yScale.step() - yScale.bandwidth()) / 2} l 0 ${yScale.step()} l ${width} 0 l 0 ${-yScale.step()} Z`,
45
- className: classes.root,
46
- ownerState: {
47
- axisHighlight: 'band'
48
- }
49
- }), type === 'line' && axisYValue !== null && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlightPath.ChartsAxisHighlightPath, {
50
- d: `M ${left} ${getYPosition(axisYValue)} L ${left + width} ${getYPosition(axisYValue)}`,
51
- className: classes.root,
52
- ownerState: {
53
- axisHighlight: 'line'
35
+ return axisYValues.map(({
36
+ axisId,
37
+ value
38
+ }) => {
39
+ const yAxis = yAxes.axis[axisId];
40
+ const yScale = yAxis.scale;
41
+ const getYPosition = (0, _useScale.getValueToPositionMapper)(yScale);
42
+ const isBandScaleY = type === 'band' && value !== null && (0, _isBandScale.isBandScale)(yScale);
43
+ if (process.env.NODE_ENV !== 'production') {
44
+ const isError = isBandScaleY && yScale(value) === undefined;
45
+ if (isError) {
46
+ console.error([`MUI X Charts: The position value provided for the axis is not valid for the current scale.`, `This probably means something is wrong with the data passed to the chart.`, `The ChartsAxisHighlight component will not be displayed.`].join('\n'));
54
47
  }
55
- })]
48
+ }
49
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
50
+ children: [isBandScaleY && yScale(value) !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlightPath.ChartsAxisHighlightPath, {
51
+ d: `M ${left} ${
52
+ // @ts-expect-error, yScale value is checked in the statement above
53
+ yScale(value) - (yScale.step() - yScale.bandwidth()) / 2} l 0 ${yScale.step()} l ${width} 0 l 0 ${-yScale.step()} Z`,
54
+ className: classes.root,
55
+ ownerState: {
56
+ axisHighlight: 'band'
57
+ }
58
+ }), type === 'line' && value !== null && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlightPath.ChartsAxisHighlightPath, {
59
+ d: `M ${left} ${getYPosition(value)} L ${left + width} ${getYPosition(value)}`,
60
+ className: classes.root,
61
+ ownerState: {
62
+ axisHighlight: 'line'
63
+ }
64
+ })]
65
+ }, `${axisId}-${value}`);
56
66
  });
57
67
  }
@@ -3,7 +3,7 @@ import { ChartsSurfaceProps } from "../ChartsSurface/index.js";
3
3
  import { GaugeProviderProps } from "./GaugeProvider.js";
4
4
  import { MergeSignaturesProperty } from "../internals/plugins/models/index.js";
5
5
  import { ChartCorePluginSignatures } from "../internals/plugins/corePlugins/index.js";
6
- export interface GaugeContainerProps extends Omit<ChartsSurfaceProps, 'children'>, Omit<MergeSignaturesProperty<ChartCorePluginSignatures, 'params'>, 'series' | 'dataset' | 'colors' | 'theme'>, Omit<GaugeProviderProps, 'children'>, Omit<React.SVGProps<SVGSVGElement>, 'width' | 'height'> {
6
+ export interface GaugeContainerProps extends Omit<ChartsSurfaceProps, 'children'>, Omit<MergeSignaturesProperty<ChartCorePluginSignatures, 'params'>, 'series' | 'dataset' | 'colors' | 'theme' | 'experimentalFeatures'>, Omit<GaugeProviderProps, 'children'>, Omit<React.SVGProps<SVGSVGElement>, 'width' | 'height'> {
7
7
  children?: React.ReactNode;
8
8
  }
9
9
  declare const GaugeContainer: React.ForwardRefExoticComponent<Omit<GaugeContainerProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
@@ -118,6 +118,12 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
118
118
  * If `true`, render the line highlight item.
119
119
  */
120
120
  disableLineItemHighlight: _propTypes.default.bool,
121
+ /**
122
+ * Options to enable features planned for the next major.
123
+ */
124
+ experimentalFeatures: _propTypes.default.shape({
125
+ preferStrictDomainInLineCharts: _propTypes.default.bool
126
+ }),
121
127
  /**
122
128
  * Option to display a cartesian grid in the background.
123
129
  */
@@ -133,6 +139,14 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
133
139
  * If `true`, the legend is not rendered.
134
140
  */
135
141
  hideLegend: _propTypes.default.bool,
142
+ /**
143
+ * The controlled axis highlight.
144
+ * Identified by the axis id, and data index.
145
+ */
146
+ highlightedAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
147
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
148
+ dataIndex: _propTypes.default.number.isRequired
149
+ })),
136
150
  /**
137
151
  * The highlighted item.
138
152
  * Used when the highlight is controlled.
@@ -184,6 +198,14 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
184
198
  * @param {HighlightItemData | null} highlightedItem The newly highlighted item.
185
199
  */
186
200
  onHighlightChange: _propTypes.default.func,
201
+ /**
202
+ * The function called when the pointer position corresponds to a new axis data item.
203
+ * This update can either be caused by a pointer movement, or an axis update.
204
+ * In case of multiple axes, the function is called if at least one axis is updated.
205
+ * The argument contains the identifier for all axes with a `data` property.
206
+ * @param {AxisItemIdentifier[]} axisItems The array of axes item identifiers.
207
+ */
208
+ onHighlightedAxisChange: _propTypes.default.func,
187
209
  /**
188
210
  * Callback fired when a line element is clicked.
189
211
  */
@@ -52,8 +52,8 @@ function LineHighlightPlot(props) {
52
52
  instance
53
53
  } = (0, _ChartProvider.useChartContext)();
54
54
  const store = (0, _useStore.useStore)();
55
- const highlightedIndex = (0, _useSelector.useSelector)(store, _useChartCartesianAxis.selectorChartsInteractionXAxisIndex);
56
- if (highlightedIndex === null) {
55
+ const highlightedIndexes = (0, _useSelector.useSelector)(store, _useChartCartesianAxis.selectorChartsHighlightXAxisIndex);
56
+ if (highlightedIndexes.length === 0) {
57
57
  return null;
58
58
  }
59
59
  if (seriesData === undefined) {
@@ -67,7 +67,10 @@ function LineHighlightPlot(props) {
67
67
  const defaultYAxisId = yAxisIds[0];
68
68
  const Element = slots?.lineHighlight ?? _LineHighlightElement.LineHighlightElement;
69
69
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("g", (0, _extends2.default)({}, other, {
70
- children: stackingGroups.flatMap(({
70
+ children: highlightedIndexes.flatMap(({
71
+ dataIndex: highlightedIndex,
72
+ axisId: highlightedAxisId
73
+ }) => stackingGroups.flatMap(({
71
74
  ids: groupIds
72
75
  }) => {
73
76
  return groupIds.flatMap(seriesId => {
@@ -82,6 +85,9 @@ function LineHighlightPlot(props) {
82
85
  if (disableHighlight || data[highlightedIndex] == null) {
83
86
  return null;
84
87
  }
88
+ if (highlightedAxisId !== xAxisId) {
89
+ return null;
90
+ }
85
91
  const xScale = (0, _useScale.getValueToPositionMapper)(xAxis[xAxisId].scale);
86
92
  const yScale = yAxis[yAxisId].scale;
87
93
  const xData = xAxis[xAxisId].data;
@@ -103,7 +109,7 @@ function LineHighlightPlot(props) {
103
109
  shape: shape
104
110
  }, slotProps?.lineHighlight), `${seriesId}`);
105
111
  });
106
- })
112
+ }))
107
113
  }));
108
114
  }
109
115
  process.env.NODE_ENV !== "production" ? LineHighlightPlot.propTypes = {
@@ -11,7 +11,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
11
11
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
12
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
  var React = _interopRequireWildcard(require("react"));
14
- var _useChartCartesianInteraction = require("../internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors");
15
14
  var _constants = require("../constants");
16
15
  var _useSkipAnimation = require("../hooks/useSkipAnimation");
17
16
  var _useChartId = require("../hooks/useChartId");
@@ -24,6 +23,7 @@ var _MarkElement = require("./MarkElement");
24
23
  var _ChartProvider = require("../context/ChartProvider");
25
24
  var _hooks = require("../hooks");
26
25
  var _useInternalIsZoomInteracting = require("../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting");
26
+ var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
27
27
  var _useSelector = require("../internals/store/useSelector");
28
28
  var _jsxRuntime = require("react/jsx-runtime");
29
29
  const _excluded = ["slots", "slotProps", "skipAnimation", "onItemClick"];
@@ -65,7 +65,21 @@ function MarkPlot(props) {
65
65
  isFaded,
66
66
  isHighlighted
67
67
  } = (0, _hooks.useItemHighlightedGetter)();
68
- const xAxisInteractionIndex = (0, _useSelector.useSelector)(store, _useChartCartesianInteraction.selectorChartsInteractionXAxisIndex);
68
+ const xAxisHighlightIndexes = (0, _useSelector.useSelector)(store, _useChartCartesianAxis.selectorChartsHighlightXAxisIndex);
69
+ const highlightedItems = React.useMemo(() => {
70
+ const rep = {};
71
+ for (const {
72
+ dataIndex,
73
+ axisId
74
+ } of xAxisHighlightIndexes) {
75
+ if (rep[axisId] === undefined) {
76
+ rep[axisId] = new Set([dataIndex]);
77
+ } else {
78
+ rep[axisId].add(dataIndex);
79
+ }
80
+ }
81
+ return rep;
82
+ }, [xAxisHighlightIndexes]);
69
83
  if (seriesData === undefined) {
70
84
  return null;
71
85
  }
@@ -163,7 +177,7 @@ function MarkPlot(props) {
163
177
  seriesId,
164
178
  dataIndex: index
165
179
  })),
166
- isHighlighted: xAxisInteractionIndex === index || isSeriesHighlighted,
180
+ isHighlighted: highlightedItems[xAxisId]?.has(index) || isSeriesHighlighted,
167
181
  isFaded: isSeriesFaded
168
182
  }, slotProps?.mark), `${seriesId}-${index}`);
169
183
  })
@@ -40,9 +40,10 @@ function useAreaPlotData(xAxes, yAxes) {
40
40
  connectNulls,
41
41
  baseline,
42
42
  curve,
43
- strictStepCurve
43
+ strictStepCurve,
44
+ area
44
45
  } = series[seriesId];
45
- if (!(xAxisId in xAxes) || !(yAxisId in yAxes)) {
46
+ if (!area || !(xAxisId in xAxes) || !(yAxisId in yAxes)) {
46
47
  continue;
47
48
  }
48
49
  const xScale = xAxes[xAxisId].scale;
@@ -12,7 +12,7 @@ import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from "
12
12
  import { PieChartPluginSignatures } from "./PieChart.plugins.js";
13
13
  export interface PieChartSlots extends PiePlotSlots, ChartsLegendSlots, ChartsOverlaySlots, ChartsTooltipSlots, ChartsToolbarSlots, Partial<ChartsSlots> {}
14
14
  export interface PieChartSlotProps extends PiePlotSlotProps, ChartsLegendSlotProps, ChartsOverlaySlotProps, ChartsTooltipSlotProps, ChartsToolbarSlotProps, Partial<ChartsSlotProps> {}
15
- export interface PieChartProps extends Omit<ChartContainerProps<'pie', PieChartPluginSignatures>, 'series' | 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'>, Pick<PiePlotProps, 'skipAnimation'> {
15
+ export interface PieChartProps extends Omit<ChartContainerProps<'pie', PieChartPluginSignatures>, 'series' | 'slots' | 'slotProps' | 'experimentalFeatures'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'>, Pick<PiePlotProps, 'skipAnimation'> {
16
16
  /**
17
17
  * The series to display in the pie chart.
18
18
  * An array of [[PieSeriesType]] objects.
@@ -5,7 +5,7 @@ import { RadarSeriesType } from "../../models/seriesType/radar.js";
5
5
  import { ChartDataProviderProps } from "../../ChartDataProvider/index.js";
6
6
  import { RadarConfig } from "./radar.types.js";
7
7
  import { ChartAnyPluginSignature } from "../../internals/plugins/models/plugin.js";
8
- export type RadarDataProviderProps<TSignatures extends readonly ChartAnyPluginSignature[] = RadarChartPluginsSignatures> = Omit<ChartDataProviderProps<'radar', TSignatures>, 'series' | 'rotationAxis' | 'radiusAxis' | 'dataset'> & {
8
+ export type RadarDataProviderProps<TSignatures extends readonly ChartAnyPluginSignature[] = RadarChartPluginsSignatures> = Omit<ChartDataProviderProps<'radar', TSignatures>, 'series' | 'rotationAxis' | 'radiusAxis' | 'dataset' | 'experimentalFeatures'> & {
9
9
  /**
10
10
  * The series to display in the bar chart.
11
11
  * An array of [[RadarSeriesType]] objects.
@@ -16,7 +16,7 @@ import { UseChartVoronoiSignature } from "../internals/plugins/featurePlugins/us
16
16
  import { ScatterChartPluginsSignatures } from "./ScatterChart.plugins.js";
17
17
  export interface ScatterChartSlots extends ChartsAxisSlots, ScatterPlotSlots, ChartsLegendSlots, ChartsOverlaySlots, ChartsTooltipSlots, ChartsToolbarSlots, Partial<ChartsSlots> {}
18
18
  export interface ScatterChartSlotProps extends ChartsAxisSlotProps, ScatterPlotSlotProps, ChartsLegendSlotProps, ChartsOverlaySlotProps, ChartsTooltipSlotProps, ChartsToolbarSlotProps, Partial<ChartsSlotProps> {}
19
- export interface ScatterChartProps extends Omit<ChartContainerProps<'scatter', ScatterChartPluginsSignatures>, 'series' | 'plugins' | 'onItemClick'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
19
+ export interface ScatterChartProps extends Omit<ChartContainerProps<'scatter', ScatterChartPluginsSignatures>, 'series' | 'plugins' | 'onItemClick' | 'experimentalFeatures' | 'highlightedAxis' | 'onHighlightedAxisChange'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
20
20
  /**
21
21
  * The series to display in the scatter chart.
22
22
  * An array of [[ScatterSeriesType]] objects.
@@ -12,9 +12,9 @@ var React = _interopRequireWildcard(require("react"));
12
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
  var _Scatter = require("./Scatter");
14
14
  var _useScatterSeries = require("../hooks/useScatterSeries");
15
- var _getColor = _interopRequireDefault(require("./seriesConfig/getColor"));
16
15
  var _hooks = require("../hooks");
17
16
  var _useZAxis = require("../hooks/useZAxis");
17
+ var _seriesConfig = require("./seriesConfig");
18
18
  var _jsxRuntime = require("react/jsx-runtime");
19
19
  /**
20
20
  * Demos:
@@ -65,7 +65,7 @@ function ScatterPlot(props) {
65
65
  zAxisId,
66
66
  color
67
67
  } = series[seriesId];
68
- const colorGetter = (0, _getColor.default)(series[seriesId], xAxis[xAxisId ?? defaultXAxisId], yAxis[yAxisId ?? defaultYAxisId], zAxis[zAxisId ?? defaultZAxisId]);
68
+ const colorGetter = _seriesConfig.seriesConfig.colorProcessor(series[seriesId], xAxis[xAxisId ?? defaultXAxisId], yAxis[yAxisId ?? defaultYAxisId], zAxis[zAxisId ?? defaultZAxisId]);
69
69
  const xScale = xAxis[xAxisId ?? defaultXAxisId].scale;
70
70
  const yScale = yAxis[yAxisId ?? defaultYAxisId].scale;
71
71
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(ScatterItems, (0, _extends2.default)({