@mui/x-charts-pro 8.26.0 → 9.0.0-alpha.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 (220) hide show
  1. package/BarChartPro/BarChartPro.d.ts +1 -1
  2. package/BarChartPro/BarChartPro.js +9 -4
  3. package/CHANGELOG.md +355 -3
  4. package/ChartContainerPro/ChartContainerPro.d.ts +17 -31
  5. package/ChartContainerPro/ChartContainerPro.js +14 -287
  6. package/ChartContainerPro/useChartContainerProProps.d.ts +9 -5
  7. package/ChartContainerPro/useChartContainerProProps.js +9 -34
  8. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +5 -3
  9. package/ChartDataProviderPro/ChartDataProviderPro.js +2 -2
  10. package/ChartDataProviderPro/index.d.ts +1 -1
  11. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +3 -3
  12. package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +8 -6
  13. package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +6 -4
  14. package/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
  15. package/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +4 -4
  16. package/ChartZoomSlider/internals/previews/BarPreviewPlot.js +1 -1
  17. package/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +1 -1
  18. package/ChartZoomSlider/internals/previews/LinePreviewPlot.js +4 -4
  19. package/ChartsContainer/index.d.ts +1 -0
  20. package/ChartsContainer/index.js +16 -0
  21. package/ChartsContainerPro/ChartsContainerPro.d.ts +37 -0
  22. package/ChartsContainerPro/ChartsContainerPro.js +187 -0
  23. package/ChartsContainerPro/index.d.ts +9 -0
  24. package/ChartsContainerPro/index.js +17 -0
  25. package/ChartsContainerPro/useChartsContainerProProps.d.ts +9 -0
  26. package/ChartsContainerPro/useChartsContainerProProps.js +44 -0
  27. package/FunnelChart/FunnelChart.js +4 -4
  28. package/FunnelChart/FunnelSection.d.ts +1 -1
  29. package/FunnelChart/funnel.types.d.ts +1 -1
  30. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +12 -9
  31. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +3 -2
  32. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +3 -3
  33. package/FunnelChart/index.d.ts +1 -0
  34. package/FunnelChart/index.js +12 -0
  35. package/FunnelChart/seriesConfig/index.js +2 -1
  36. package/FunnelChart/seriesConfig/legend.js +0 -1
  37. package/Heatmap/Heatmap.d.ts +14 -2
  38. package/Heatmap/Heatmap.js +36 -130
  39. package/Heatmap/Heatmap.plugins.d.ts +2 -2
  40. package/Heatmap/Heatmap.plugins.js +1 -1
  41. package/Heatmap/Heatmap.types.d.ts +19 -0
  42. package/Heatmap/Heatmap.types.js +5 -0
  43. package/Heatmap/HeatmapItem.d.ts +6 -0
  44. package/Heatmap/HeatmapItem.js +11 -3
  45. package/Heatmap/HeatmapPlot.d.ts +7 -3
  46. package/Heatmap/HeatmapPlot.js +16 -54
  47. package/Heatmap/HeatmapSVGPlot.d.ts +2 -0
  48. package/Heatmap/HeatmapSVGPlot.js +70 -0
  49. package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +5 -1
  50. package/Heatmap/HeatmapTooltip/index.d.ts +1 -1
  51. package/Heatmap/index.d.ts +3 -2
  52. package/Heatmap/seriesConfig/getItemAtPosition.d.ts +6 -0
  53. package/Heatmap/seriesConfig/getItemAtPosition.js +45 -0
  54. package/Heatmap/seriesConfig/index.js +3 -0
  55. package/Heatmap/useHeatmapProps.d.ts +24 -0
  56. package/Heatmap/useHeatmapProps.js +159 -0
  57. package/LineChartPro/LineChartPro.d.ts +1 -1
  58. package/LineChartPro/LineChartPro.js +9 -4
  59. package/PieChartPro/PieChartPro.d.ts +1 -1
  60. package/PieChartPro/PieChartPro.js +4 -4
  61. package/RadarChartPro/RadarChartPro.d.ts +1 -1
  62. package/RadarChartPro/RadarChartPro.js +4 -4
  63. package/RadarChartPro/RadarChartPro.plugins.d.ts +2 -2
  64. package/RadarChartPro/RadarChartPro.plugins.js +1 -1
  65. package/SankeyChart/SankeyChart.js +4 -4
  66. package/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +5 -1
  67. package/SankeyChart/SankeyTooltip/index.d.ts +1 -1
  68. package/SankeyChart/index.d.ts +1 -1
  69. package/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +7 -7
  70. package/SankeyChart/sankey.highlight.types.d.ts +4 -0
  71. package/SankeyChart/sankey.types.d.ts +6 -3
  72. package/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +13 -1
  73. package/SankeyChart/seriesConfig/identifierCleaner.d.ts +3 -0
  74. package/SankeyChart/seriesConfig/identifierCleaner.js +24 -0
  75. package/SankeyChart/seriesConfig/index.js +3 -1
  76. package/ScatterChartPro/ScatterChartPro.d.ts +1 -1
  77. package/ScatterChartPro/ScatterChartPro.js +9 -4
  78. package/esm/BarChartPro/BarChartPro.d.ts +1 -1
  79. package/esm/BarChartPro/BarChartPro.js +9 -4
  80. package/esm/ChartContainerPro/ChartContainerPro.d.ts +17 -31
  81. package/esm/ChartContainerPro/ChartContainerPro.js +15 -286
  82. package/esm/ChartContainerPro/useChartContainerProProps.d.ts +9 -5
  83. package/esm/ChartContainerPro/useChartContainerProProps.js +10 -33
  84. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +5 -3
  85. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +2 -2
  86. package/esm/ChartDataProviderPro/index.d.ts +1 -1
  87. package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +3 -3
  88. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +9 -7
  89. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +7 -5
  90. package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
  91. package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +4 -4
  92. package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.js +1 -1
  93. package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +1 -1
  94. package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.js +4 -4
  95. package/esm/ChartsContainer/index.d.ts +1 -0
  96. package/esm/ChartsContainer/index.js +2 -0
  97. package/esm/ChartsContainerPro/ChartsContainerPro.d.ts +37 -0
  98. package/esm/ChartsContainerPro/ChartsContainerPro.js +181 -0
  99. package/esm/ChartsContainerPro/index.d.ts +9 -0
  100. package/esm/ChartsContainerPro/index.js +6 -0
  101. package/esm/ChartsContainerPro/useChartsContainerProProps.d.ts +9 -0
  102. package/esm/ChartsContainerPro/useChartsContainerProProps.js +37 -0
  103. package/esm/FunnelChart/FunnelChart.js +4 -4
  104. package/esm/FunnelChart/FunnelSection.d.ts +1 -1
  105. package/esm/FunnelChart/funnel.types.d.ts +1 -1
  106. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +13 -10
  107. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +3 -2
  108. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +3 -3
  109. package/esm/FunnelChart/index.d.ts +1 -0
  110. package/esm/FunnelChart/index.js +1 -0
  111. package/esm/FunnelChart/seriesConfig/index.js +3 -2
  112. package/esm/FunnelChart/seriesConfig/legend.js +0 -1
  113. package/esm/Heatmap/Heatmap.d.ts +14 -2
  114. package/esm/Heatmap/Heatmap.js +37 -131
  115. package/esm/Heatmap/Heatmap.plugins.d.ts +2 -2
  116. package/esm/Heatmap/Heatmap.plugins.js +2 -2
  117. package/esm/Heatmap/Heatmap.types.d.ts +19 -0
  118. package/esm/Heatmap/Heatmap.types.js +1 -0
  119. package/esm/Heatmap/HeatmapItem.d.ts +6 -0
  120. package/esm/Heatmap/HeatmapItem.js +11 -3
  121. package/esm/Heatmap/HeatmapPlot.d.ts +7 -3
  122. package/esm/Heatmap/HeatmapPlot.js +17 -56
  123. package/esm/Heatmap/HeatmapSVGPlot.d.ts +2 -0
  124. package/esm/Heatmap/HeatmapSVGPlot.js +64 -0
  125. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +5 -1
  126. package/esm/Heatmap/HeatmapTooltip/index.d.ts +1 -1
  127. package/esm/Heatmap/index.d.ts +3 -2
  128. package/esm/Heatmap/seriesConfig/getItemAtPosition.d.ts +6 -0
  129. package/esm/Heatmap/seriesConfig/getItemAtPosition.js +39 -0
  130. package/esm/Heatmap/seriesConfig/index.js +4 -1
  131. package/esm/Heatmap/useHeatmapProps.d.ts +24 -0
  132. package/esm/Heatmap/useHeatmapProps.js +151 -0
  133. package/esm/LineChartPro/LineChartPro.d.ts +1 -1
  134. package/esm/LineChartPro/LineChartPro.js +9 -4
  135. package/esm/PieChartPro/PieChartPro.d.ts +1 -1
  136. package/esm/PieChartPro/PieChartPro.js +4 -4
  137. package/esm/RadarChartPro/RadarChartPro.d.ts +1 -1
  138. package/esm/RadarChartPro/RadarChartPro.js +4 -4
  139. package/esm/RadarChartPro/RadarChartPro.plugins.d.ts +2 -2
  140. package/esm/RadarChartPro/RadarChartPro.plugins.js +2 -2
  141. package/esm/SankeyChart/SankeyChart.js +4 -4
  142. package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +5 -1
  143. package/esm/SankeyChart/SankeyTooltip/index.d.ts +1 -1
  144. package/esm/SankeyChart/index.d.ts +1 -1
  145. package/esm/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +7 -7
  146. package/esm/SankeyChart/sankey.highlight.types.d.ts +4 -0
  147. package/esm/SankeyChart/sankey.types.d.ts +6 -3
  148. package/esm/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +13 -1
  149. package/esm/SankeyChart/seriesConfig/identifierCleaner.d.ts +3 -0
  150. package/esm/SankeyChart/seriesConfig/identifierCleaner.js +18 -0
  151. package/esm/SankeyChart/seriesConfig/index.js +3 -1
  152. package/esm/ScatterChartPro/ScatterChartPro.d.ts +1 -1
  153. package/esm/ScatterChartPro/ScatterChartPro.js +9 -4
  154. package/esm/index.d.ts +3 -1
  155. package/esm/index.js +2 -1
  156. package/esm/internals/index.d.ts +8 -1
  157. package/esm/internals/index.js +6 -1
  158. package/esm/internals/plugins/useChartProExport/common.d.ts +5 -1
  159. package/esm/internals/plugins/useChartProExport/common.js +36 -0
  160. package/esm/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
  161. package/esm/internals/plugins/useChartProExport/exportImage.js +10 -1
  162. package/esm/internals/plugins/useChartProExport/print.d.ts +1 -1
  163. package/esm/internals/plugins/useChartProExport/print.js +2 -1
  164. package/esm/internals/plugins/useChartProExport/useChartProExport.js +4 -2
  165. package/esm/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.ts +2 -2
  166. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +2 -3
  167. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +4 -2
  168. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +2 -3
  169. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +4 -2
  170. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +2 -3
  171. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +6 -4
  172. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +2 -3
  173. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +7 -5
  174. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +2 -3
  175. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +4 -2
  176. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +2 -3
  177. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +6 -4
  178. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +2 -3
  179. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +6 -4
  180. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +2 -3
  181. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +6 -4
  182. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +5 -5
  183. package/esm/models/seriesType/heatmap.d.ts +3 -3
  184. package/esm/plugins/selectors/useChartHeatmapPosition.selectors.d.ts +1 -1
  185. package/esm/plugins/selectors/useChartHeatmapPosition.selectors.js +3 -1
  186. package/esm/typeOverloads/modules.d.ts +9 -5
  187. package/index.d.ts +3 -1
  188. package/index.js +9 -1
  189. package/internals/index.d.ts +8 -1
  190. package/internals/index.js +50 -1
  191. package/internals/plugins/useChartProExport/common.d.ts +5 -1
  192. package/internals/plugins/useChartProExport/common.js +37 -0
  193. package/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
  194. package/internals/plugins/useChartProExport/exportImage.js +9 -0
  195. package/internals/plugins/useChartProExport/print.d.ts +1 -1
  196. package/internals/plugins/useChartProExport/print.js +1 -0
  197. package/internals/plugins/useChartProExport/useChartProExport.js +4 -2
  198. package/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.ts +2 -2
  199. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +2 -3
  200. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +4 -2
  201. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +2 -3
  202. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +4 -2
  203. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +2 -3
  204. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +5 -3
  205. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +2 -3
  206. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +6 -4
  207. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +2 -3
  208. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +4 -2
  209. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +2 -3
  210. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +5 -3
  211. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +2 -3
  212. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +5 -3
  213. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +2 -3
  214. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +5 -3
  215. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +5 -5
  216. package/models/seriesType/heatmap.d.ts +3 -3
  217. package/package.json +8 -8
  218. package/plugins/selectors/useChartHeatmapPosition.selectors.d.ts +1 -1
  219. package/plugins/selectors/useChartHeatmapPosition.selectors.js +3 -1
  220. package/typeOverloads/modules.d.ts +9 -5
@@ -0,0 +1,159 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.useHeatmapProps = useHeatmapProps;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _useId = _interopRequireDefault(require("@mui/utils/useId"));
11
+ var _d3Interpolate = require("@mui/x-charts-vendor/d3-interpolate");
12
+ var React = _interopRequireWildcard(require("react"));
13
+ var _constants = require("@mui/x-charts/constants");
14
+ var _ChartsLegend = require("@mui/x-charts/ChartsLegend");
15
+ var _Heatmap = require("./Heatmap.plugins");
16
+ var _seriesConfig = require("./seriesConfig");
17
+ const seriesConfig = {
18
+ heatmap: _seriesConfig.heatmapSeriesConfig
19
+ };
20
+
21
+ // The GnBu: https://github.com/d3/d3-scale-chromatic/blob/main/src/sequential-multi/GnBu.js
22
+ const defaultColorMap = (0, _d3Interpolate.interpolateRgbBasis)(['#f7fcf0', '#e0f3db', '#ccebc5', '#a8ddb5', '#7bccc4', '#4eb3d3', '#2b8cbe', '#0868ac', '#084081']);
23
+ function getDefaultDataForAxis(series, dimension) {
24
+ if (series?.[0]?.data === undefined || series[0].data.length === 0) {
25
+ return [];
26
+ }
27
+ return Array.from({
28
+ length: Math.max(...series[0].data.map(dataPoint => dataPoint[dimension])) + 1
29
+ }, (_, index) => index);
30
+ }
31
+ const getDefaultDataForXAxis = series => getDefaultDataForAxis(series, 0);
32
+ const getDefaultDataForYAxis = series => getDefaultDataForAxis(series, 1);
33
+ function useHeatmapProps(props) {
34
+ const {
35
+ apiRef,
36
+ xAxis,
37
+ yAxis,
38
+ zAxis,
39
+ series,
40
+ width,
41
+ height,
42
+ margin,
43
+ colors,
44
+ dataset,
45
+ sx,
46
+ onAxisClick,
47
+ onItemClick,
48
+ children,
49
+ slots,
50
+ slotProps,
51
+ loading,
52
+ highlightedItem,
53
+ onHighlightChange,
54
+ enableKeyboardNavigation,
55
+ borderRadius,
56
+ hideLegend
57
+ } = props;
58
+ const id = (0, _useId.default)();
59
+ const clipPathId = `${id}-clip-path`;
60
+ const xAxisWithDefault = React.useMemo(() => (xAxis && xAxis.length > 0 ? xAxis : [{
61
+ id: _constants.DEFAULT_X_AXIS_KEY
62
+ }]).map(axis => (0, _extends2.default)({
63
+ scaleType: 'band',
64
+ categoryGapRatio: 0
65
+ }, axis, {
66
+ data: axis.data ?? getDefaultDataForXAxis(series)
67
+ })), [series, xAxis]);
68
+ const yAxisWithDefault = React.useMemo(() => (yAxis && yAxis.length > 0 ? yAxis : [{
69
+ id: _constants.DEFAULT_Y_AXIS_KEY
70
+ }]).map(axis => (0, _extends2.default)({
71
+ scaleType: 'band',
72
+ categoryGapRatio: 0
73
+ }, axis, {
74
+ data: axis.data ?? getDefaultDataForYAxis(series)
75
+ })), [series, yAxis]);
76
+ const zAxisWithDefault = React.useMemo(() => zAxis ?? [{
77
+ colorMap: {
78
+ type: 'continuous',
79
+ min: 0,
80
+ max: 100,
81
+ color: defaultColorMap
82
+ }
83
+ }], [zAxis]);
84
+ const seriesWithDefault = series.map(s => (0, _extends2.default)({
85
+ type: 'heatmap'
86
+ }, s));
87
+ const chartsWrapperProps = {
88
+ sx,
89
+ legendPosition: props.slotProps?.legend?.position,
90
+ legendDirection: props.slotProps?.legend?.direction,
91
+ hideLegend
92
+ };
93
+ const chartDataProviderProProps = {
94
+ apiRef,
95
+ seriesConfig,
96
+ series: seriesWithDefault,
97
+ width,
98
+ height,
99
+ margin,
100
+ xAxis: xAxisWithDefault,
101
+ yAxis: yAxisWithDefault,
102
+ zAxis: zAxisWithDefault,
103
+ colors,
104
+ dataset,
105
+ disableAxisListener: true,
106
+ highlightedItem,
107
+ onHighlightChange,
108
+ enableKeyboardNavigation,
109
+ onAxisClick,
110
+ onItemClick,
111
+ plugins: _Heatmap.HEATMAP_PLUGINS
112
+ };
113
+ const heatmapPlotProps = {
114
+ borderRadius,
115
+ slots,
116
+ slotProps
117
+ };
118
+ const overlayProps = {
119
+ slots,
120
+ slotProps,
121
+ loading
122
+ };
123
+ const clipPathGroupProps = {
124
+ clipPath: `url(#${clipPathId})`
125
+ };
126
+ const clipPathProps = {
127
+ id: clipPathId
128
+ };
129
+ const chartsAxisProps = {
130
+ slots,
131
+ slotProps
132
+ };
133
+ const legendProps = {
134
+ slots: (0, _extends2.default)({}, slots, {
135
+ legend: slots?.legend ?? _ChartsLegend.ContinuousColorLegend
136
+ }),
137
+ slotProps: {
138
+ legend: (0, _extends2.default)({
139
+ labelPosition: 'extremes'
140
+ }, slotProps?.legend)
141
+ },
142
+ sx: slotProps?.legend?.direction === 'vertical' ? {
143
+ height: 150
144
+ } : {
145
+ width: '50%'
146
+ }
147
+ };
148
+ return {
149
+ chartDataProviderProProps,
150
+ chartsWrapperProps,
151
+ heatmapPlotProps,
152
+ clipPathProps,
153
+ clipPathGroupProps,
154
+ overlayProps,
155
+ chartsAxisProps,
156
+ legendProps,
157
+ children
158
+ };
159
+ }
@@ -6,7 +6,7 @@ import { type ChartContainerProProps } from "../ChartContainerPro/index.js";
6
6
  import { type LineChartProPluginSignatures } from "./LineChartPro.plugins.js";
7
7
  export interface LineChartProSlots extends Omit<LineChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
8
8
  export interface LineChartProSlotProps extends Omit<LineChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
9
- export interface LineChartProProps extends Omit<LineChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<ChartContainerProProps<'line', LineChartProPluginSignatures>, 'series' | 'plugins' | 'seriesConfig' | 'slots' | 'slotProps'> {
9
+ export interface LineChartProProps extends Omit<LineChartProps, 'apiRef' | 'slots' | 'slotProps' | 'plugins' | 'seriesConfig'>, Omit<ChartContainerProProps<'line', LineChartProPluginSignatures>, 'series' | 'slots' | 'slotProps'> {
10
10
  /**
11
11
  * Overridable component slots.
12
12
  * @default {}
@@ -109,6 +109,11 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
109
109
  setZoomData: _propTypes.default.func.isRequired
110
110
  })
111
111
  }),
112
+ /**
113
+ * A gap added between axes when multiple axes are rendered on the same side of the chart.
114
+ * @default 0
115
+ */
116
+ axesGap: _propTypes.default.number,
112
117
  /**
113
118
  * The configuration of axes highlight.
114
119
  * @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details.
@@ -188,7 +193,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
188
193
  */
189
194
  hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
190
195
  dataIndex: _propTypes.default.number,
191
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
196
+ seriesId: _propTypes.default.string,
192
197
  type: _propTypes.default.oneOf(['line']).isRequired
193
198
  })),
194
199
  /**
@@ -209,7 +214,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
209
214
  */
210
215
  highlightedItem: _propTypes.default.shape({
211
216
  dataIndex: _propTypes.default.number,
212
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired
217
+ seriesId: _propTypes.default.string.isRequired
213
218
  }),
214
219
  /**
215
220
  * This prop is used to help implement the accessibility logic.
@@ -239,7 +244,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
239
244
  */
240
245
  initialHiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
241
246
  dataIndex: _propTypes.default.number,
242
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
247
+ seriesId: _propTypes.default.string,
243
248
  type: _propTypes.default.oneOf(['line']).isRequired
244
249
  })),
245
250
  /**
@@ -356,7 +361,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
356
361
  */
357
362
  tooltipItem: _propTypes.default.shape({
358
363
  dataIndex: _propTypes.default.number,
359
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
364
+ seriesId: _propTypes.default.string.isRequired,
360
365
  type: _propTypes.default.oneOf(['line']).isRequired
361
366
  }),
362
367
  /**
@@ -6,7 +6,7 @@ import { type PieChartProPluginSignatures } from "./PieChartPro.plugins.js";
6
6
  import { type ChartsToolbarProSlotProps, type ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
7
7
  export interface PieChartProSlots extends Omit<PieChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
8
8
  export interface PieChartProSlotProps extends Omit<PieChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
9
- export interface PieChartProProps extends Omit<PieChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<ChartContainerProProps<'pie', PieChartProPluginSignatures>, 'series' | 'plugins' | 'seriesConfig' | 'slots' | 'slotProps' | 'experimentalFeatures'> {
9
+ export interface PieChartProProps extends Omit<PieChartProps, 'apiRef' | 'slots' | 'slotProps' | 'plugins' | 'seriesConfig'>, Omit<ChartContainerProProps<'pie', PieChartProPluginSignatures>, 'series' | 'slots' | 'slotProps' | 'experimentalFeatures'> {
10
10
  /**
11
11
  * Overridable component slots.
12
12
  * @default {}
@@ -146,7 +146,7 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
146
146
  */
147
147
  hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
148
148
  dataIndex: _propTypes.default.number,
149
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
149
+ seriesId: _propTypes.default.string,
150
150
  type: _propTypes.default.oneOf(['pie']).isRequired
151
151
  })),
152
152
  /**
@@ -159,7 +159,7 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
159
159
  */
160
160
  highlightedItem: _propTypes.default.shape({
161
161
  dataIndex: _propTypes.default.number,
162
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired
162
+ seriesId: _propTypes.default.string.isRequired
163
163
  }),
164
164
  /**
165
165
  * This prop is used to help implement the accessibility logic.
@@ -189,7 +189,7 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
189
189
  */
190
190
  initialHiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
191
191
  dataIndex: _propTypes.default.number,
192
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
192
+ seriesId: _propTypes.default.string,
193
193
  type: _propTypes.default.oneOf(['pie']).isRequired
194
194
  })),
195
195
  /**
@@ -268,7 +268,7 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
268
268
  */
269
269
  tooltipItem: _propTypes.default.shape({
270
270
  dataIndex: _propTypes.default.number.isRequired,
271
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
271
+ seriesId: _propTypes.default.string.isRequired,
272
272
  type: _propTypes.default.oneOf(['pie']).isRequired
273
273
  }),
274
274
  /**
@@ -5,7 +5,7 @@ import { type ChartsToolbarProSlotProps, type ChartsToolbarProSlots } from "../C
5
5
  import { type ChartsSlotPropsPro, type ChartsSlotsPro } from "../internals/material/index.js";
6
6
  export interface RadarChartProSlots extends Omit<RadarChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
7
7
  export interface RadarChartProSlotProps extends Omit<RadarChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
8
- export interface RadarChartProProps extends Omit<RadarChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<RadarDataProviderProps<RadarChartProPluginSignatures>, 'plugins' | 'seriesConfig' | 'slots' | 'slotProps' | 'experimentalFeatures'> {
8
+ export interface RadarChartProProps extends Omit<RadarChartProps, 'apiRef' | 'slots' | 'slotProps' | 'plugins' | 'seriesConfig'>, Omit<RadarDataProviderProps<RadarChartProPluginSignatures>, 'slots' | 'slotProps' | 'experimentalFeatures'> {
9
9
  /**
10
10
  * Overridable component slots.
11
11
  * @default {}
@@ -117,7 +117,7 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
117
117
  */
118
118
  hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
119
119
  dataIndex: _propTypes.default.number,
120
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
120
+ seriesId: _propTypes.default.string,
121
121
  type: _propTypes.default.oneOf(['radar']).isRequired
122
122
  })),
123
123
  /**
@@ -135,7 +135,7 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
135
135
  */
136
136
  highlightedItem: _propTypes.default.shape({
137
137
  dataIndex: _propTypes.default.number,
138
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired
138
+ seriesId: _propTypes.default.string.isRequired
139
139
  }),
140
140
  /**
141
141
  * This prop is used to help implement the accessibility logic.
@@ -165,7 +165,7 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
165
165
  */
166
166
  initialHiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
167
167
  dataIndex: _propTypes.default.number,
168
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
168
+ seriesId: _propTypes.default.string,
169
169
  type: _propTypes.default.oneOf(['radar']).isRequired
170
170
  })),
171
171
  /**
@@ -285,7 +285,7 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
285
285
  */
286
286
  tooltipItem: _propTypes.default.shape({
287
287
  dataIndex: _propTypes.default.number,
288
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
288
+ seriesId: _propTypes.default.string.isRequired,
289
289
  type: _propTypes.default.oneOf(['radar']).isRequired
290
290
  }),
291
291
  /**
@@ -1,4 +1,4 @@
1
- import { type ConvertSignaturesIntoPlugins, type UseChartHighlightSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartPolarAxisSignature, type UseChartVisibilityManagerSignature } from '@mui/x-charts/internals';
1
+ import type { ConvertSignaturesIntoPlugins, UseChartHighlightSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartPolarAxisSignature, UseChartVisibilityManagerSignature, UseChartKeyboardNavigationSignature } from '@mui/x-charts/internals';
2
2
  import { type UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
3
- export type RadarChartProPluginSignatures = [UseChartTooltipSignature<'radar'>, UseChartInteractionSignature, UseChartPolarAxisSignature, UseChartHighlightSignature, UseChartVisibilityManagerSignature<'radar'>, UseChartProExportSignature];
3
+ export type RadarChartProPluginSignatures = [UseChartTooltipSignature<'radar'>, UseChartInteractionSignature, UseChartPolarAxisSignature, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartVisibilityManagerSignature<'radar'>, UseChartProExportSignature];
4
4
  export declare const RADAR_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<RadarChartProPluginSignatures>;
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.RADAR_CHART_PRO_PLUGINS = void 0;
7
7
  var _internals = require("@mui/x-charts/internals");
8
8
  var _useChartProExport = require("../internals/plugins/useChartProExport");
9
- const RADAR_CHART_PRO_PLUGINS = exports.RADAR_CHART_PRO_PLUGINS = [_internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartPolarAxis, _internals.useChartHighlight, _internals.useChartVisibilityManager, _useChartProExport.useChartProExport];
9
+ const RADAR_CHART_PRO_PLUGINS = exports.RADAR_CHART_PRO_PLUGINS = [..._internals.RADAR_PLUGINS, _useChartProExport.useChartProExport];
@@ -111,7 +111,7 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
111
111
  */
112
112
  highlightedItem: _propTypes.default.oneOfType([_propTypes.default.shape({
113
113
  nodeId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
114
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
114
+ seriesId: _propTypes.default.string.isRequired,
115
115
  subType: _propTypes.default.oneOf([
116
116
  /**
117
117
  * Subtype to differentiate between node and link
@@ -119,7 +119,7 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
119
119
  'node']).isRequired,
120
120
  type: _propTypes.default.oneOf(['sankey']).isRequired
121
121
  }), _propTypes.default.shape({
122
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
122
+ seriesId: _propTypes.default.string.isRequired,
123
123
  sourceId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
124
124
  subType: _propTypes.default.oneOf([
125
125
  /**
@@ -203,7 +203,7 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
203
203
  */
204
204
  tooltipItem: _propTypes.default.oneOfType([_propTypes.default.shape({
205
205
  nodeId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
206
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
206
+ seriesId: _propTypes.default.string.isRequired,
207
207
  subType: _propTypes.default.oneOf([
208
208
  /**
209
209
  * Subtype to differentiate between node and link
@@ -211,7 +211,7 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
211
211
  'node']).isRequired,
212
212
  type: _propTypes.default.oneOf(['sankey']).isRequired
213
213
  }), _propTypes.default.shape({
214
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
214
+ seriesId: _propTypes.default.string.isRequired,
215
215
  sourceId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
216
216
  subType: _propTypes.default.oneOf([
217
217
  /**
@@ -1,4 +1,8 @@
1
- import { type ChartsTooltipContainerProps } from '@mui/x-charts/ChartsTooltip';
1
+ import { type ChartsTooltipContainerProps, type ChartsTooltipClasses, type ChartsTooltipSlots, type ChartsTooltipSlotProps } from '@mui/x-charts/ChartsTooltip';
2
+ export interface SankeyTooltipSlots extends ChartsTooltipSlots {}
3
+ export interface SankeyTooltipSlotProps extends ChartsTooltipSlotProps {}
4
+ export interface SankeyTooltipClasses extends ChartsTooltipClasses {}
5
+ export interface SankeyTooltipContentClasses extends ChartsTooltipClasses {}
2
6
  export interface SankeyTooltipProps extends Omit<ChartsTooltipContainerProps, 'trigger' | 'children'> {
3
7
  /**
4
8
  * Select the kind of tooltip to display
@@ -1,3 +1,3 @@
1
1
  export * from "./SankeyTooltip.js";
2
2
  export * from "./SankeyTooltipContent.js";
3
- export type { SankeyTooltipProps } from "./SankeyTooltip.types.js";
3
+ export type { SankeyTooltipProps, SankeyTooltipClasses, SankeyTooltipContentClasses, SankeyTooltipSlots, SankeyTooltipSlotProps } from "./SankeyTooltip.types.js";
@@ -14,4 +14,4 @@ export * from "./sankeyHighlightHooks.js";
14
14
  export * from "../hooks/useSankeySeries.js";
15
15
  export { type SankeyPlotClasses, sankeyPlotClasses } from "./sankeyClasses.js";
16
16
  export { SankeyTooltip, SankeyTooltipContent } from "./SankeyTooltip/index.js";
17
- export type { SankeyTooltipProps } from "./SankeyTooltip/index.js";
17
+ export type { SankeyTooltipProps, SankeyTooltipClasses, SankeyTooltipContentClasses, SankeyTooltipSlots, SankeyTooltipSlotProps } from "./SankeyTooltip/index.js";
@@ -4,28 +4,28 @@ import type { SankeyLinkFade, SankeyLinkHighlight, SankeyNodeFade, SankeyNodeHig
4
4
  * Get the node highlight configuration from the Sankey series.
5
5
  * Defaults to 'nodes' if not specified.
6
6
  */
7
- export declare const selectorNodeHighlightConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
7
+ export declare const selectorNodeHighlightConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
8
8
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
9
9
  }) => SankeyNodeHighlight;
10
10
  /**
11
11
  * Get the node fade configuration from the Sankey series.
12
12
  * Defaults to 'none' if not specified.
13
13
  */
14
- export declare const selectorNodeFadeConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
14
+ export declare const selectorNodeFadeConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
15
15
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
16
16
  }) => SankeyNodeFade;
17
17
  /**
18
18
  * Get the link highlight configuration from the Sankey series.
19
19
  * Defaults to 'links' if not specified.
20
20
  */
21
- export declare const selectorLinkHighlightConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
21
+ export declare const selectorLinkHighlightConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
22
22
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
23
23
  }) => SankeyLinkHighlight;
24
24
  /**
25
25
  * Get the link fade configuration from the Sankey series.
26
26
  * Defaults to 'none' if not specified.
27
27
  */
28
- export declare const selectorLinkFadeConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
28
+ export declare const selectorLinkFadeConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
29
29
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
30
30
  }) => SankeyLinkFade;
31
31
  /**
@@ -40,7 +40,7 @@ export declare const selectorSankeyHighlightedItem: (args_0: import("./useSankey
40
40
  * - It's the highlighted node (unless highlight mode is 'none')
41
41
  * - It's connected to a highlighted link (based on linkOptions.highlight)
42
42
  */
43
- export declare const selectorIsNodeHighlighted: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
43
+ export declare const selectorIsNodeHighlighted: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
44
44
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
45
45
  }, nodeId: SankeyNodeId) => boolean;
46
46
  /**
@@ -49,7 +49,7 @@ export declare const selectorIsNodeHighlighted: (args_0: import("@mui/x-charts/i
49
49
  * - It's the highlighted link (unless highlight mode is 'none')
50
50
  * - It's connected to a highlighted node (based on nodeOptions.highlight)
51
51
  */
52
- export declare const selectorIsLinkHighlighted: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
52
+ export declare const selectorIsLinkHighlighted: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
53
53
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
54
54
  }, link: import("../index.js").SankeyLayoutLinkWithPosition) => boolean;
55
55
  /**
@@ -59,6 +59,6 @@ export declare const selectorIsLinkHighlighted: (args_0: import("@mui/x-charts/i
59
59
  * - This item is not highlighted
60
60
  * - The fade mode is 'global' for the highlighted element type
61
61
  */
62
- export declare const selectorIsSankeyItemFaded: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
62
+ export declare const selectorIsSankeyItemFaded: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
63
63
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
64
64
  }, isHighlighted: boolean) => boolean;
@@ -39,4 +39,8 @@ export type SankeyLinkHighlightScope = {
39
39
  * @default 'none'
40
40
  */
41
41
  fade?: SankeyLinkFade;
42
+ };
43
+ export type SankeyHighlightScope = {
44
+ nodes: SankeyNodeHighlightScope;
45
+ links: SankeyLinkHighlightScope;
42
46
  };
@@ -1,7 +1,7 @@
1
- import type { HighlightScope, SeriesId } from '@mui/x-charts/internals';
1
+ import type { SeriesId } from '@mui/x-charts/internals';
2
2
  import type { DefaultizedProps, MakeRequired } from '@mui/x-internals/types';
3
3
  import type { SankeyLink as D3SankeyLink, SankeyNode as D3SankeyNode } from "./d3Sankey/index.js";
4
- import type { SankeyLinkHighlightScope, SankeyNodeHighlightScope } from "./sankey.highlight.types.js";
4
+ import type { SankeyHighlightScope, SankeyLinkHighlightScope, SankeyNodeHighlightScope } from "./sankey.highlight.types.js";
5
5
  export type SankeyNodeId = string | number;
6
6
  export interface SankeyNode {
7
7
  /**
@@ -216,7 +216,10 @@ export interface SankeyLayout<WithPosition extends boolean = true> {
216
216
  }
217
217
  export interface DefaultizedSankeySeriesType extends DefaultizedProps<Omit<SankeySeriesType, 'data'>, 'id' | 'valueFormatter'> {
218
218
  data: SankeyLayout<false>;
219
- highlightScope?: HighlightScope;
219
+ /**
220
+ * Highlight scope for the series derived from nodeOptions and linksOptions
221
+ */
222
+ highlightScope: SankeyHighlightScope;
220
223
  }
221
224
  type SankeyNodeIdentifierBase = {
222
225
  type: 'sankey';
@@ -61,6 +61,16 @@ const getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {
61
61
  color: resolvedColor
62
62
  });
63
63
  });
64
+ const highlightScope = {
65
+ nodes: {
66
+ highlight: seriesData.nodeOptions?.highlight ?? 'links',
67
+ fade: seriesData.nodeOptions?.fade ?? 'none'
68
+ },
69
+ links: {
70
+ highlight: seriesData.linkOptions?.highlight ?? 'links',
71
+ fade: seriesData.linkOptions?.fade ?? 'none'
72
+ }
73
+ };
64
74
  if (!seriesData.data || !links) {
65
75
  return (0, _extends2.default)({
66
76
  id: seriesData.id ?? `auto-generated-id-${seriesIndex}`
@@ -69,7 +79,8 @@ const getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {
69
79
  data: {
70
80
  nodes: [],
71
81
  links: []
72
- }
82
+ },
83
+ highlightScope
73
84
  });
74
85
  }
75
86
 
@@ -100,6 +111,7 @@ const getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {
100
111
  id: seriesData.id ?? `auto-generated-id-${seriesIndex}`
101
112
  }, seriesData, {
102
113
  valueFormatter: seriesData.valueFormatter ?? defaultSankeyValueFormatter,
114
+ highlightScope,
103
115
  data
104
116
  });
105
117
  };
@@ -0,0 +1,3 @@
1
+ import type { IdentifierCleaner } from '@mui/x-charts/internals';
2
+ declare const identifierCleaner: IdentifierCleaner<'sankey'>;
3
+ export default identifierCleaner;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ const identifierCleaner = identifier => {
8
+ if (identifier.subType === 'node') {
9
+ return {
10
+ type: identifier.type,
11
+ seriesId: identifier.seriesId,
12
+ subType: 'node',
13
+ nodeId: identifier.nodeId
14
+ };
15
+ }
16
+ return {
17
+ type: identifier.type,
18
+ seriesId: identifier.seriesId,
19
+ subType: 'link',
20
+ sourceId: identifier.sourceId,
21
+ targetId: identifier.targetId
22
+ };
23
+ };
24
+ var _default = exports.default = identifierCleaner;
@@ -11,6 +11,7 @@ var _calculateSankeyLayout = require("../calculateSankeyLayout");
11
11
  var _tooltipPosition = _interopRequireDefault(require("./tooltipPosition"));
12
12
  var _keyboardFocusHandler = _interopRequireDefault(require("./keyboardFocusHandler"));
13
13
  var _identifierSerializer = _interopRequireDefault(require("./identifierSerializer"));
14
+ var _identifierCleaner = _interopRequireDefault(require("./identifierCleaner"));
14
15
  // Simple passthrough functions for sankey chart
15
16
  const seriesProcessor = series => series;
16
17
  const colorProcessor = series => series;
@@ -34,5 +35,6 @@ const sankeySeriesConfig = exports.sankeySeriesConfig = {
34
35
  tooltipItemPositionGetter: _tooltipPosition.default,
35
36
  getSeriesWithDefaultValues: _getSeriesWithDefaultValues.getSeriesWithDefaultValues,
36
37
  keyboardFocusHandler: _keyboardFocusHandler.default,
37
- identifierSerializer: _identifierSerializer.default
38
+ identifierSerializer: _identifierSerializer.default,
39
+ identifierCleaner: _identifierCleaner.default
38
40
  };
@@ -13,7 +13,7 @@ export interface ScatterChartProSlotProps extends Omit<ScatterChartSlotProps, 't
13
13
  */
14
14
  tooltip?: Partial<ChartsTooltipProps<'item' | 'none'>>;
15
15
  }
16
- export interface ScatterChartProProps extends Omit<ScatterChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<ChartContainerProProps<'scatter', ScatterChartProPluginSignatures>, 'series' | 'plugins' | 'seriesConfig' | 'onItemClick' | 'slots' | 'slotProps' | 'experimentalFeatures' | 'highlightedAxis' | 'onHighlightedAxisChange'> {
16
+ export interface ScatterChartProProps extends Omit<ScatterChartProps, 'apiRef' | 'slots' | 'slotProps' | 'plugins' | 'seriesConfig'>, Omit<ChartContainerProProps<'scatter', ScatterChartProPluginSignatures>, 'series' | 'onItemClick' | 'slots' | 'slotProps' | 'experimentalFeatures' | 'highlightedAxis' | 'onHighlightedAxisChange'> {
17
17
  /**
18
18
  * Overridable component slots.
19
19
  * @default {}