@mui/x-charts-pro 8.27.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 (200) hide show
  1. package/BarChartPro/BarChartPro.js +9 -4
  2. package/CHANGELOG.md +255 -3
  3. package/ChartContainerPro/ChartContainerPro.d.ts +17 -31
  4. package/ChartContainerPro/ChartContainerPro.js +14 -287
  5. package/ChartContainerPro/useChartContainerProProps.d.ts +9 -5
  6. package/ChartContainerPro/useChartContainerProProps.js +9 -34
  7. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +5 -3
  8. package/ChartDataProviderPro/ChartDataProviderPro.js +2 -2
  9. package/ChartDataProviderPro/index.d.ts +1 -1
  10. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +3 -3
  11. package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +8 -6
  12. package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +6 -4
  13. package/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
  14. package/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +4 -4
  15. package/ChartZoomSlider/internals/previews/BarPreviewPlot.js +1 -1
  16. package/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +1 -1
  17. package/ChartZoomSlider/internals/previews/LinePreviewPlot.js +4 -4
  18. package/ChartsContainer/index.d.ts +1 -0
  19. package/ChartsContainer/index.js +16 -0
  20. package/ChartsContainerPro/ChartsContainerPro.d.ts +37 -0
  21. package/ChartsContainerPro/ChartsContainerPro.js +187 -0
  22. package/ChartsContainerPro/index.d.ts +9 -0
  23. package/ChartsContainerPro/index.js +17 -0
  24. package/ChartsContainerPro/useChartsContainerProProps.d.ts +9 -0
  25. package/ChartsContainerPro/useChartsContainerProProps.js +44 -0
  26. package/FunnelChart/FunnelChart.js +4 -4
  27. package/FunnelChart/FunnelSection.d.ts +1 -1
  28. package/FunnelChart/funnel.types.d.ts +1 -1
  29. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +12 -9
  30. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +3 -2
  31. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +3 -3
  32. package/FunnelChart/index.d.ts +1 -0
  33. package/FunnelChart/index.js +12 -0
  34. package/FunnelChart/seriesConfig/index.js +2 -1
  35. package/FunnelChart/seriesConfig/legend.js +0 -1
  36. package/Heatmap/Heatmap.d.ts +5 -2
  37. package/Heatmap/Heatmap.js +27 -132
  38. package/Heatmap/Heatmap.types.d.ts +19 -0
  39. package/Heatmap/Heatmap.types.js +5 -0
  40. package/Heatmap/HeatmapItem.d.ts +6 -0
  41. package/Heatmap/HeatmapItem.js +11 -3
  42. package/Heatmap/HeatmapPlot.d.ts +7 -3
  43. package/Heatmap/HeatmapPlot.js +16 -54
  44. package/Heatmap/HeatmapSVGPlot.d.ts +2 -0
  45. package/Heatmap/HeatmapSVGPlot.js +70 -0
  46. package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +5 -1
  47. package/Heatmap/HeatmapTooltip/index.d.ts +1 -1
  48. package/Heatmap/index.d.ts +3 -2
  49. package/Heatmap/seriesConfig/getItemAtPosition.js +6 -2
  50. package/Heatmap/seriesConfig/index.js +1 -0
  51. package/Heatmap/useHeatmapProps.d.ts +24 -0
  52. package/Heatmap/useHeatmapProps.js +159 -0
  53. package/LineChartPro/LineChartPro.js +9 -4
  54. package/PieChartPro/PieChartPro.js +4 -4
  55. package/RadarChartPro/RadarChartPro.js +4 -4
  56. package/SankeyChart/SankeyChart.js +4 -4
  57. package/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +5 -1
  58. package/SankeyChart/SankeyTooltip/index.d.ts +1 -1
  59. package/SankeyChart/index.d.ts +1 -1
  60. package/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +7 -7
  61. package/SankeyChart/sankey.highlight.types.d.ts +4 -0
  62. package/SankeyChart/sankey.types.d.ts +6 -3
  63. package/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +13 -1
  64. package/SankeyChart/seriesConfig/identifierCleaner.d.ts +3 -0
  65. package/SankeyChart/seriesConfig/identifierCleaner.js +24 -0
  66. package/SankeyChart/seriesConfig/index.js +3 -1
  67. package/ScatterChartPro/ScatterChartPro.js +9 -4
  68. package/esm/BarChartPro/BarChartPro.js +9 -4
  69. package/esm/ChartContainerPro/ChartContainerPro.d.ts +17 -31
  70. package/esm/ChartContainerPro/ChartContainerPro.js +15 -286
  71. package/esm/ChartContainerPro/useChartContainerProProps.d.ts +9 -5
  72. package/esm/ChartContainerPro/useChartContainerProProps.js +10 -33
  73. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +5 -3
  74. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +2 -2
  75. package/esm/ChartDataProviderPro/index.d.ts +1 -1
  76. package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +3 -3
  77. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +9 -7
  78. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +7 -5
  79. package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
  80. package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +4 -4
  81. package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.js +1 -1
  82. package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +1 -1
  83. package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.js +4 -4
  84. package/esm/ChartsContainer/index.d.ts +1 -0
  85. package/esm/ChartsContainer/index.js +2 -0
  86. package/esm/ChartsContainerPro/ChartsContainerPro.d.ts +37 -0
  87. package/esm/ChartsContainerPro/ChartsContainerPro.js +181 -0
  88. package/esm/ChartsContainerPro/index.d.ts +9 -0
  89. package/esm/ChartsContainerPro/index.js +6 -0
  90. package/esm/ChartsContainerPro/useChartsContainerProProps.d.ts +9 -0
  91. package/esm/ChartsContainerPro/useChartsContainerProProps.js +37 -0
  92. package/esm/FunnelChart/FunnelChart.js +4 -4
  93. package/esm/FunnelChart/FunnelSection.d.ts +1 -1
  94. package/esm/FunnelChart/funnel.types.d.ts +1 -1
  95. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +13 -10
  96. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +3 -2
  97. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +3 -3
  98. package/esm/FunnelChart/index.d.ts +1 -0
  99. package/esm/FunnelChart/index.js +1 -0
  100. package/esm/FunnelChart/seriesConfig/index.js +3 -2
  101. package/esm/FunnelChart/seriesConfig/legend.js +0 -1
  102. package/esm/Heatmap/Heatmap.d.ts +5 -2
  103. package/esm/Heatmap/Heatmap.js +28 -133
  104. package/esm/Heatmap/Heatmap.types.d.ts +19 -0
  105. package/esm/Heatmap/Heatmap.types.js +1 -0
  106. package/esm/Heatmap/HeatmapItem.d.ts +6 -0
  107. package/esm/Heatmap/HeatmapItem.js +11 -3
  108. package/esm/Heatmap/HeatmapPlot.d.ts +7 -3
  109. package/esm/Heatmap/HeatmapPlot.js +17 -56
  110. package/esm/Heatmap/HeatmapSVGPlot.d.ts +2 -0
  111. package/esm/Heatmap/HeatmapSVGPlot.js +64 -0
  112. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +5 -1
  113. package/esm/Heatmap/HeatmapTooltip/index.d.ts +1 -1
  114. package/esm/Heatmap/index.d.ts +3 -2
  115. package/esm/Heatmap/seriesConfig/getItemAtPosition.js +6 -2
  116. package/esm/Heatmap/seriesConfig/index.js +2 -1
  117. package/esm/Heatmap/useHeatmapProps.d.ts +24 -0
  118. package/esm/Heatmap/useHeatmapProps.js +151 -0
  119. package/esm/LineChartPro/LineChartPro.js +9 -4
  120. package/esm/PieChartPro/PieChartPro.js +4 -4
  121. package/esm/RadarChartPro/RadarChartPro.js +4 -4
  122. package/esm/SankeyChart/SankeyChart.js +4 -4
  123. package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +5 -1
  124. package/esm/SankeyChart/SankeyTooltip/index.d.ts +1 -1
  125. package/esm/SankeyChart/index.d.ts +1 -1
  126. package/esm/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +7 -7
  127. package/esm/SankeyChart/sankey.highlight.types.d.ts +4 -0
  128. package/esm/SankeyChart/sankey.types.d.ts +6 -3
  129. package/esm/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +13 -1
  130. package/esm/SankeyChart/seriesConfig/identifierCleaner.d.ts +3 -0
  131. package/esm/SankeyChart/seriesConfig/identifierCleaner.js +18 -0
  132. package/esm/SankeyChart/seriesConfig/index.js +3 -1
  133. package/esm/ScatterChartPro/ScatterChartPro.js +9 -4
  134. package/esm/index.d.ts +3 -1
  135. package/esm/index.js +2 -1
  136. package/esm/internals/index.d.ts +7 -1
  137. package/esm/internals/index.js +5 -1
  138. package/esm/internals/plugins/useChartProExport/common.d.ts +5 -1
  139. package/esm/internals/plugins/useChartProExport/common.js +36 -0
  140. package/esm/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
  141. package/esm/internals/plugins/useChartProExport/exportImage.js +10 -1
  142. package/esm/internals/plugins/useChartProExport/print.d.ts +1 -1
  143. package/esm/internals/plugins/useChartProExport/print.js +2 -1
  144. package/esm/internals/plugins/useChartProExport/useChartProExport.js +4 -2
  145. package/esm/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.ts +2 -2
  146. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +2 -3
  147. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +4 -2
  148. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +2 -3
  149. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +4 -2
  150. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +2 -3
  151. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +6 -4
  152. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +2 -3
  153. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +7 -5
  154. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +2 -3
  155. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +4 -2
  156. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +2 -3
  157. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +6 -4
  158. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +2 -3
  159. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +6 -4
  160. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +2 -3
  161. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +6 -4
  162. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +5 -5
  163. package/esm/models/seriesType/heatmap.d.ts +3 -3
  164. package/esm/plugins/selectors/useChartHeatmapPosition.selectors.d.ts +1 -1
  165. package/esm/plugins/selectors/useChartHeatmapPosition.selectors.js +3 -1
  166. package/esm/typeOverloads/modules.d.ts +9 -5
  167. package/index.d.ts +3 -1
  168. package/index.js +9 -1
  169. package/internals/index.d.ts +7 -1
  170. package/internals/index.js +43 -1
  171. package/internals/plugins/useChartProExport/common.d.ts +5 -1
  172. package/internals/plugins/useChartProExport/common.js +37 -0
  173. package/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
  174. package/internals/plugins/useChartProExport/exportImage.js +9 -0
  175. package/internals/plugins/useChartProExport/print.d.ts +1 -1
  176. package/internals/plugins/useChartProExport/print.js +1 -0
  177. package/internals/plugins/useChartProExport/useChartProExport.js +4 -2
  178. package/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.ts +2 -2
  179. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +2 -3
  180. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +4 -2
  181. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +2 -3
  182. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +4 -2
  183. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +2 -3
  184. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +5 -3
  185. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +2 -3
  186. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +6 -4
  187. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +2 -3
  188. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +4 -2
  189. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +2 -3
  190. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +5 -3
  191. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +2 -3
  192. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +5 -3
  193. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +2 -3
  194. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +5 -3
  195. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +5 -5
  196. package/models/seriesType/heatmap.d.ts +3 -3
  197. package/package.json +8 -8
  198. package/plugins/selectors/useChartHeatmapPosition.selectors.d.ts +1 -1
  199. package/plugins/selectors/useChartHeatmapPosition.selectors.js +3 -1
  200. package/typeOverloads/modules.d.ts +9 -5
@@ -0,0 +1,151 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import useId from '@mui/utils/useId';
3
+ import { interpolateRgbBasis } from '@mui/x-charts-vendor/d3-interpolate';
4
+ import * as React from 'react';
5
+ import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from '@mui/x-charts/constants';
6
+ import { ContinuousColorLegend } from '@mui/x-charts/ChartsLegend';
7
+ import { HEATMAP_PLUGINS } from "./Heatmap.plugins.js";
8
+ import { heatmapSeriesConfig } from "./seriesConfig/index.js";
9
+ const seriesConfig = {
10
+ heatmap: heatmapSeriesConfig
11
+ };
12
+
13
+ // The GnBu: https://github.com/d3/d3-scale-chromatic/blob/main/src/sequential-multi/GnBu.js
14
+ const defaultColorMap = interpolateRgbBasis(['#f7fcf0', '#e0f3db', '#ccebc5', '#a8ddb5', '#7bccc4', '#4eb3d3', '#2b8cbe', '#0868ac', '#084081']);
15
+ function getDefaultDataForAxis(series, dimension) {
16
+ if (series?.[0]?.data === undefined || series[0].data.length === 0) {
17
+ return [];
18
+ }
19
+ return Array.from({
20
+ length: Math.max(...series[0].data.map(dataPoint => dataPoint[dimension])) + 1
21
+ }, (_, index) => index);
22
+ }
23
+ const getDefaultDataForXAxis = series => getDefaultDataForAxis(series, 0);
24
+ const getDefaultDataForYAxis = series => getDefaultDataForAxis(series, 1);
25
+ export function useHeatmapProps(props) {
26
+ const {
27
+ apiRef,
28
+ xAxis,
29
+ yAxis,
30
+ zAxis,
31
+ series,
32
+ width,
33
+ height,
34
+ margin,
35
+ colors,
36
+ dataset,
37
+ sx,
38
+ onAxisClick,
39
+ onItemClick,
40
+ children,
41
+ slots,
42
+ slotProps,
43
+ loading,
44
+ highlightedItem,
45
+ onHighlightChange,
46
+ enableKeyboardNavigation,
47
+ borderRadius,
48
+ hideLegend
49
+ } = props;
50
+ const id = useId();
51
+ const clipPathId = `${id}-clip-path`;
52
+ const xAxisWithDefault = React.useMemo(() => (xAxis && xAxis.length > 0 ? xAxis : [{
53
+ id: DEFAULT_X_AXIS_KEY
54
+ }]).map(axis => _extends({
55
+ scaleType: 'band',
56
+ categoryGapRatio: 0
57
+ }, axis, {
58
+ data: axis.data ?? getDefaultDataForXAxis(series)
59
+ })), [series, xAxis]);
60
+ const yAxisWithDefault = React.useMemo(() => (yAxis && yAxis.length > 0 ? yAxis : [{
61
+ id: DEFAULT_Y_AXIS_KEY
62
+ }]).map(axis => _extends({
63
+ scaleType: 'band',
64
+ categoryGapRatio: 0
65
+ }, axis, {
66
+ data: axis.data ?? getDefaultDataForYAxis(series)
67
+ })), [series, yAxis]);
68
+ const zAxisWithDefault = React.useMemo(() => zAxis ?? [{
69
+ colorMap: {
70
+ type: 'continuous',
71
+ min: 0,
72
+ max: 100,
73
+ color: defaultColorMap
74
+ }
75
+ }], [zAxis]);
76
+ const seriesWithDefault = series.map(s => _extends({
77
+ type: 'heatmap'
78
+ }, s));
79
+ const chartsWrapperProps = {
80
+ sx,
81
+ legendPosition: props.slotProps?.legend?.position,
82
+ legendDirection: props.slotProps?.legend?.direction,
83
+ hideLegend
84
+ };
85
+ const chartDataProviderProProps = {
86
+ apiRef,
87
+ seriesConfig,
88
+ series: seriesWithDefault,
89
+ width,
90
+ height,
91
+ margin,
92
+ xAxis: xAxisWithDefault,
93
+ yAxis: yAxisWithDefault,
94
+ zAxis: zAxisWithDefault,
95
+ colors,
96
+ dataset,
97
+ disableAxisListener: true,
98
+ highlightedItem,
99
+ onHighlightChange,
100
+ enableKeyboardNavigation,
101
+ onAxisClick,
102
+ onItemClick,
103
+ plugins: HEATMAP_PLUGINS
104
+ };
105
+ const heatmapPlotProps = {
106
+ borderRadius,
107
+ slots,
108
+ slotProps
109
+ };
110
+ const overlayProps = {
111
+ slots,
112
+ slotProps,
113
+ loading
114
+ };
115
+ const clipPathGroupProps = {
116
+ clipPath: `url(#${clipPathId})`
117
+ };
118
+ const clipPathProps = {
119
+ id: clipPathId
120
+ };
121
+ const chartsAxisProps = {
122
+ slots,
123
+ slotProps
124
+ };
125
+ const legendProps = {
126
+ slots: _extends({}, slots, {
127
+ legend: slots?.legend ?? ContinuousColorLegend
128
+ }),
129
+ slotProps: {
130
+ legend: _extends({
131
+ labelPosition: 'extremes'
132
+ }, slotProps?.legend)
133
+ },
134
+ sx: slotProps?.legend?.direction === 'vertical' ? {
135
+ height: 150
136
+ } : {
137
+ width: '50%'
138
+ }
139
+ };
140
+ return {
141
+ chartDataProviderProProps,
142
+ chartsWrapperProps,
143
+ heatmapPlotProps,
144
+ clipPathProps,
145
+ clipPathGroupProps,
146
+ overlayProps,
147
+ chartsAxisProps,
148
+ legendProps,
149
+ children
150
+ };
151
+ }
@@ -102,6 +102,11 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
102
102
  setZoomData: PropTypes.func.isRequired
103
103
  })
104
104
  }),
105
+ /**
106
+ * A gap added between axes when multiple axes are rendered on the same side of the chart.
107
+ * @default 0
108
+ */
109
+ axesGap: PropTypes.number,
105
110
  /**
106
111
  * The configuration of axes highlight.
107
112
  * @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details.
@@ -181,7 +186,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
181
186
  */
182
187
  hiddenItems: PropTypes.arrayOf(PropTypes.shape({
183
188
  dataIndex: PropTypes.number,
184
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
189
+ seriesId: PropTypes.string,
185
190
  type: PropTypes.oneOf(['line']).isRequired
186
191
  })),
187
192
  /**
@@ -202,7 +207,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
202
207
  */
203
208
  highlightedItem: PropTypes.shape({
204
209
  dataIndex: PropTypes.number,
205
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
210
+ seriesId: PropTypes.string.isRequired
206
211
  }),
207
212
  /**
208
213
  * This prop is used to help implement the accessibility logic.
@@ -232,7 +237,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
232
237
  */
233
238
  initialHiddenItems: PropTypes.arrayOf(PropTypes.shape({
234
239
  dataIndex: PropTypes.number,
235
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
240
+ seriesId: PropTypes.string,
236
241
  type: PropTypes.oneOf(['line']).isRequired
237
242
  })),
238
243
  /**
@@ -349,7 +354,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
349
354
  */
350
355
  tooltipItem: PropTypes.shape({
351
356
  dataIndex: PropTypes.number,
352
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
357
+ seriesId: PropTypes.string.isRequired,
353
358
  type: PropTypes.oneOf(['line']).isRequired
354
359
  }),
355
360
  /**
@@ -138,7 +138,7 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
138
138
  */
139
139
  hiddenItems: PropTypes.arrayOf(PropTypes.shape({
140
140
  dataIndex: PropTypes.number,
141
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
141
+ seriesId: PropTypes.string,
142
142
  type: PropTypes.oneOf(['pie']).isRequired
143
143
  })),
144
144
  /**
@@ -151,7 +151,7 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
151
151
  */
152
152
  highlightedItem: PropTypes.shape({
153
153
  dataIndex: PropTypes.number,
154
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
154
+ seriesId: PropTypes.string.isRequired
155
155
  }),
156
156
  /**
157
157
  * This prop is used to help implement the accessibility logic.
@@ -181,7 +181,7 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
181
181
  */
182
182
  initialHiddenItems: PropTypes.arrayOf(PropTypes.shape({
183
183
  dataIndex: PropTypes.number,
184
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
184
+ seriesId: PropTypes.string,
185
185
  type: PropTypes.oneOf(['pie']).isRequired
186
186
  })),
187
187
  /**
@@ -260,7 +260,7 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
260
260
  */
261
261
  tooltipItem: PropTypes.shape({
262
262
  dataIndex: PropTypes.number.isRequired,
263
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
263
+ seriesId: PropTypes.string.isRequired,
264
264
  type: PropTypes.oneOf(['pie']).isRequired
265
265
  }),
266
266
  /**
@@ -110,7 +110,7 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
110
110
  */
111
111
  hiddenItems: PropTypes.arrayOf(PropTypes.shape({
112
112
  dataIndex: PropTypes.number,
113
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
113
+ seriesId: PropTypes.string,
114
114
  type: PropTypes.oneOf(['radar']).isRequired
115
115
  })),
116
116
  /**
@@ -128,7 +128,7 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
128
128
  */
129
129
  highlightedItem: PropTypes.shape({
130
130
  dataIndex: PropTypes.number,
131
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
131
+ seriesId: PropTypes.string.isRequired
132
132
  }),
133
133
  /**
134
134
  * This prop is used to help implement the accessibility logic.
@@ -158,7 +158,7 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
158
158
  */
159
159
  initialHiddenItems: PropTypes.arrayOf(PropTypes.shape({
160
160
  dataIndex: PropTypes.number,
161
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
161
+ seriesId: PropTypes.string,
162
162
  type: PropTypes.oneOf(['radar']).isRequired
163
163
  })),
164
164
  /**
@@ -278,7 +278,7 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
278
278
  */
279
279
  tooltipItem: PropTypes.shape({
280
280
  dataIndex: PropTypes.number,
281
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
281
+ seriesId: PropTypes.string.isRequired,
282
282
  type: PropTypes.oneOf(['radar']).isRequired
283
283
  }),
284
284
  /**
@@ -104,7 +104,7 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
104
104
  */
105
105
  highlightedItem: PropTypes.oneOfType([PropTypes.shape({
106
106
  nodeId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
107
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
107
+ seriesId: PropTypes.string.isRequired,
108
108
  subType: PropTypes.oneOf([
109
109
  /**
110
110
  * Subtype to differentiate between node and link
@@ -112,7 +112,7 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
112
112
  'node']).isRequired,
113
113
  type: PropTypes.oneOf(['sankey']).isRequired
114
114
  }), PropTypes.shape({
115
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
115
+ seriesId: PropTypes.string.isRequired,
116
116
  sourceId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
117
117
  subType: PropTypes.oneOf([
118
118
  /**
@@ -196,7 +196,7 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
196
196
  */
197
197
  tooltipItem: PropTypes.oneOfType([PropTypes.shape({
198
198
  nodeId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
199
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
199
+ seriesId: PropTypes.string.isRequired,
200
200
  subType: PropTypes.oneOf([
201
201
  /**
202
202
  * Subtype to differentiate between node and link
@@ -204,7 +204,7 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
204
204
  'node']).isRequired,
205
205
  type: PropTypes.oneOf(['sankey']).isRequired
206
206
  }), PropTypes.shape({
207
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
207
+ seriesId: PropTypes.string.isRequired,
208
208
  sourceId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
209
209
  subType: PropTypes.oneOf([
210
210
  /**
@@ -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';
@@ -54,6 +54,16 @@ export const getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {
54
54
  color: resolvedColor
55
55
  });
56
56
  });
57
+ const highlightScope = {
58
+ nodes: {
59
+ highlight: seriesData.nodeOptions?.highlight ?? 'links',
60
+ fade: seriesData.nodeOptions?.fade ?? 'none'
61
+ },
62
+ links: {
63
+ highlight: seriesData.linkOptions?.highlight ?? 'links',
64
+ fade: seriesData.linkOptions?.fade ?? 'none'
65
+ }
66
+ };
57
67
  if (!seriesData.data || !links) {
58
68
  return _extends({
59
69
  id: seriesData.id ?? `auto-generated-id-${seriesIndex}`
@@ -62,7 +72,8 @@ export const getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {
62
72
  data: {
63
73
  nodes: [],
64
74
  links: []
65
- }
75
+ },
76
+ highlightScope
66
77
  });
67
78
  }
68
79
 
@@ -93,6 +104,7 @@ export const getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {
93
104
  id: seriesData.id ?? `auto-generated-id-${seriesIndex}`
94
105
  }, seriesData, {
95
106
  valueFormatter: seriesData.valueFormatter ?? defaultSankeyValueFormatter,
107
+ highlightScope,
96
108
  data
97
109
  });
98
110
  };
@@ -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,18 @@
1
+ const identifierCleaner = identifier => {
2
+ if (identifier.subType === 'node') {
3
+ return {
4
+ type: identifier.type,
5
+ seriesId: identifier.seriesId,
6
+ subType: 'node',
7
+ nodeId: identifier.nodeId
8
+ };
9
+ }
10
+ return {
11
+ type: identifier.type,
12
+ seriesId: identifier.seriesId,
13
+ subType: 'link',
14
+ sourceId: identifier.sourceId,
15
+ targetId: identifier.targetId
16
+ };
17
+ };
18
+ export default identifierCleaner;
@@ -4,6 +4,7 @@ import { calculateSankeyLayout } from "../calculateSankeyLayout.js";
4
4
  import tooltipItemPositionGetter from "./tooltipPosition.js";
5
5
  import keyboardFocusHandler from "./keyboardFocusHandler.js";
6
6
  import identifierSerializer from "./identifierSerializer.js";
7
+ import identifierCleaner from "./identifierCleaner.js";
7
8
 
8
9
  // Simple passthrough functions for sankey chart
9
10
  const seriesProcessor = series => series;
@@ -28,5 +29,6 @@ export const sankeySeriesConfig = {
28
29
  tooltipItemPositionGetter,
29
30
  getSeriesWithDefaultValues,
30
31
  keyboardFocusHandler,
31
- identifierSerializer
32
+ identifierSerializer,
33
+ identifierCleaner
32
34
  };
@@ -96,6 +96,11 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
96
96
  setZoomData: PropTypes.func.isRequired
97
97
  })
98
98
  }),
99
+ /**
100
+ * A gap added between axes when multiple axes are rendered on the same side of the chart.
101
+ * @default 0
102
+ */
103
+ axesGap: PropTypes.number,
99
104
  /**
100
105
  * The configuration of axes highlight.
101
106
  * @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details.
@@ -170,7 +175,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
170
175
  */
171
176
  hiddenItems: PropTypes.arrayOf(PropTypes.shape({
172
177
  dataIndex: PropTypes.number,
173
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
178
+ seriesId: PropTypes.string,
174
179
  type: PropTypes.oneOf(['scatter']).isRequired
175
180
  })),
176
181
  /**
@@ -183,7 +188,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
183
188
  */
184
189
  highlightedItem: PropTypes.shape({
185
190
  dataIndex: PropTypes.number,
186
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
191
+ seriesId: PropTypes.string.isRequired
187
192
  }),
188
193
  /**
189
194
  * This prop is used to help implement the accessibility logic.
@@ -213,7 +218,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
213
218
  */
214
219
  initialHiddenItems: PropTypes.arrayOf(PropTypes.shape({
215
220
  dataIndex: PropTypes.number,
216
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
221
+ seriesId: PropTypes.string,
217
222
  type: PropTypes.oneOf(['scatter']).isRequired
218
223
  })),
219
224
  /**
@@ -325,7 +330,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
325
330
  */
326
331
  tooltipItem: PropTypes.shape({
327
332
  dataIndex: PropTypes.number.isRequired,
328
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
333
+ seriesId: PropTypes.string.isRequired,
329
334
  type: PropTypes.oneOf(['scatter']).isRequired
330
335
  }),
331
336
  /**
package/esm/index.d.ts CHANGED
@@ -29,8 +29,10 @@ export * from "./models/index.js";
29
29
  export * from "./plugins/index.js";
30
30
  export * from "./colorPalettes/index.js";
31
31
  export * from "./Heatmap/index.js";
32
+ export { ChartsContainerPro } from "./ChartsContainerPro/index.js";
33
+ export type { ChartsContainerProProps, ChartsContainerProSlots, ChartsContainerProSlotProps } from "./ChartsContainerPro/index.js";
32
34
  export { ChartContainerPro } from "./ChartContainerPro/index.js";
33
- export type { ChartContainerProProps } from "./ChartContainerPro/index.js";
35
+ export type { ChartContainerProProps, ChartContainerProSlots, ChartContainerProSlotProps } from "./ChartContainerPro/index.js";
34
36
  export * from "./ChartDataProviderPro/index.js";
35
37
  export * from "./ScatterChartPro/index.js";
36
38
  export * from "./SankeyChart/index.js";
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v8.27.0
2
+ * @mui/x-charts-pro v9.0.0-alpha.0
3
3
  *
4
4
  * @license SEE LICENSE IN LICENSE
5
5
  * This source code is licensed under the SEE LICENSE IN LICENSE license found in the
@@ -44,6 +44,7 @@ export * from "./colorPalettes/index.js";
44
44
 
45
45
  // Pro components
46
46
  export * from "./Heatmap/index.js";
47
+ export { ChartsContainerPro } from "./ChartsContainerPro/index.js";
47
48
  export { ChartContainerPro } from "./ChartContainerPro/index.js";
48
49
  export * from "./ChartDataProviderPro/index.js";
49
50
  export * from "./ScatterChartPro/index.js";
@@ -1,7 +1,13 @@
1
+ export { useChartsContainerProProps } from "../ChartsContainerPro/useChartsContainerProProps.js";
2
+ export type { UseChartsContainerProPropsReturnValue } from "../ChartsContainerPro/useChartsContainerProProps.js";
1
3
  export { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
2
4
  export type { ChartsSlotsPro, ChartsSlotPropsPro } from "./material/index.js";
3
5
  export { seriesPreviewPlotMap } from "../ChartZoomSlider/internals/seriesPreviewPlotMap.js";
4
6
  export type { PreviewPlotProps } from "../ChartZoomSlider/internals/previews/PreviewPlot.types.js";
5
7
  export { defaultSeriesConfigPro } from "../ChartDataProviderPro/ChartDataProviderPro.js";
6
8
  export type { ProPluginsPerSeriesType } from "../context/ChartProApi.js";
7
- export { defaultSlotsMaterial } from "./material/index.js";
9
+ export { useHeatmapProps } from "../Heatmap/useHeatmapProps.js";
10
+ export { defaultSlotsMaterial } from "./material/index.js";
11
+ export * from "../Heatmap/HeatmapSVGPlot.js";
12
+ export type * from "../Heatmap/Heatmap.types.js";
13
+ export { selectorHeatmapItemAtPosition } from "../plugins/selectors/useChartHeatmapPosition.selectors.js";
@@ -1,4 +1,8 @@
1
+ export { useChartsContainerProProps } from "../ChartsContainerPro/useChartsContainerProProps.js";
1
2
  export { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
2
3
  export { seriesPreviewPlotMap } from "../ChartZoomSlider/internals/seriesPreviewPlotMap.js";
3
4
  export { defaultSeriesConfigPro } from "../ChartDataProviderPro/ChartDataProviderPro.js";
4
- export { defaultSlotsMaterial } from "./material/index.js";
5
+ export { useHeatmapProps } from "../Heatmap/useHeatmapProps.js";
6
+ export { defaultSlotsMaterial } from "./material/index.js";
7
+ export * from "../Heatmap/HeatmapSVGPlot.js";
8
+ export { selectorHeatmapItemAtPosition } from "../plugins/selectors/useChartHeatmapPosition.selectors.js";
@@ -2,4 +2,8 @@ export declare function createExportIframe(title?: string): HTMLIFrameElement;
2
2
  /**
3
3
  * Applies styles to an element and returns the previous styles.
4
4
  */
5
- export declare function applyStyles(element: HTMLElement | SVGElement, styles: Record<string, string | null>): Record<string, string | null>;
5
+ export declare function applyStyles(element: HTMLElement | SVGElement, styles: Record<string, string | null>): Record<string, string | null>;
6
+ /**
7
+ * Copies the content of all canvases from the original element to the cloned element.
8
+ */
9
+ export declare function copyCanvasesContent(original: Element, clone: Element): Promise<void[]>;