@mui/x-charts-pro 8.27.2 → 9.0.0-alpha.1

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 (222) hide show
  1. package/BarChartPro/BarChartPro.d.ts +1 -1
  2. package/BarChartPro/BarChartPro.js +30 -8
  3. package/CHANGELOG.md +279 -34
  4. package/ChartContainerPro/ChartContainerPro.d.ts +17 -31
  5. package/ChartContainerPro/ChartContainerPro.js +14 -287
  6. package/ChartContainerPro/useChartContainerProProps.d.ts +10 -7
  7. package/ChartContainerPro/useChartContainerProProps.js +10 -35
  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 +188 -0
  23. package/ChartsContainerPro/index.d.ts +9 -0
  24. package/ChartsContainerPro/index.js +17 -0
  25. package/ChartsContainerPro/useChartsContainerProProps.d.ts +8 -0
  26. package/ChartsContainerPro/useChartsContainerProProps.js +44 -0
  27. package/FunnelChart/FunnelChart.d.ts +1 -1
  28. package/FunnelChart/FunnelChart.js +9 -8
  29. package/FunnelChart/FunnelSection.d.ts +1 -1
  30. package/FunnelChart/funnel.types.d.ts +1 -1
  31. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +12 -9
  32. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +3 -2
  33. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +3 -3
  34. package/FunnelChart/funnelSlots.types.d.ts +3 -9
  35. package/FunnelChart/index.d.ts +2 -1
  36. package/FunnelChart/index.js +12 -0
  37. package/FunnelChart/seriesConfig/index.js +2 -1
  38. package/FunnelChart/seriesConfig/keyboardFocusHandler.js +1 -14
  39. package/FunnelChart/seriesConfig/legend.js +0 -1
  40. package/Heatmap/Heatmap.d.ts +6 -3
  41. package/Heatmap/Heatmap.js +46 -135
  42. package/Heatmap/Heatmap.types.d.ts +19 -0
  43. package/Heatmap/Heatmap.types.js +5 -0
  44. package/Heatmap/HeatmapItem.d.ts +6 -0
  45. package/Heatmap/HeatmapItem.js +11 -3
  46. package/Heatmap/HeatmapPlot.d.ts +7 -3
  47. package/Heatmap/HeatmapPlot.js +16 -54
  48. package/Heatmap/HeatmapSVGPlot.d.ts +2 -0
  49. package/Heatmap/HeatmapSVGPlot.js +70 -0
  50. package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +18 -2
  51. package/Heatmap/HeatmapTooltip/index.d.ts +1 -1
  52. package/Heatmap/index.d.ts +3 -2
  53. package/Heatmap/seriesConfig/getItemAtPosition.d.ts +2 -2
  54. package/Heatmap/seriesConfig/getItemAtPosition.js +6 -2
  55. package/Heatmap/seriesConfig/index.js +1 -0
  56. package/Heatmap/useHeatmapProps.d.ts +24 -0
  57. package/Heatmap/useHeatmapProps.js +159 -0
  58. package/LineChartPro/LineChartPro.d.ts +1 -1
  59. package/LineChartPro/LineChartPro.js +30 -8
  60. package/PieChartPro/PieChartPro.d.ts +1 -1
  61. package/PieChartPro/PieChartPro.js +9 -8
  62. package/RadarChartPro/RadarChartPro.d.ts +1 -1
  63. package/RadarChartPro/RadarChartPro.js +8 -8
  64. package/SankeyChart/SankeyChart.d.ts +1 -1
  65. package/SankeyChart/SankeyChart.js +9 -23
  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/sankeySlots.types.d.ts +3 -9
  73. package/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +13 -1
  74. package/SankeyChart/seriesConfig/identifierCleaner.d.ts +3 -0
  75. package/SankeyChart/seriesConfig/identifierCleaner.js +24 -0
  76. package/SankeyChart/seriesConfig/index.js +3 -1
  77. package/ScatterChartPro/ScatterChartPro.d.ts +1 -1
  78. package/ScatterChartPro/ScatterChartPro.js +30 -8
  79. package/esm/BarChartPro/BarChartPro.d.ts +1 -1
  80. package/esm/BarChartPro/BarChartPro.js +30 -8
  81. package/esm/ChartContainerPro/ChartContainerPro.d.ts +17 -31
  82. package/esm/ChartContainerPro/ChartContainerPro.js +15 -286
  83. package/esm/ChartContainerPro/useChartContainerProProps.d.ts +10 -7
  84. package/esm/ChartContainerPro/useChartContainerProProps.js +11 -34
  85. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +5 -3
  86. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +2 -2
  87. package/esm/ChartDataProviderPro/index.d.ts +1 -1
  88. package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +3 -3
  89. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +9 -7
  90. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +7 -5
  91. package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
  92. package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +4 -4
  93. package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.js +1 -1
  94. package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +1 -1
  95. package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.js +4 -4
  96. package/esm/ChartsContainer/index.d.ts +1 -0
  97. package/esm/ChartsContainer/index.js +2 -0
  98. package/esm/ChartsContainerPro/ChartsContainerPro.d.ts +37 -0
  99. package/esm/ChartsContainerPro/ChartsContainerPro.js +182 -0
  100. package/esm/ChartsContainerPro/index.d.ts +9 -0
  101. package/esm/ChartsContainerPro/index.js +6 -0
  102. package/esm/ChartsContainerPro/useChartsContainerProProps.d.ts +8 -0
  103. package/esm/ChartsContainerPro/useChartsContainerProProps.js +37 -0
  104. package/esm/FunnelChart/FunnelChart.d.ts +1 -1
  105. package/esm/FunnelChart/FunnelChart.js +9 -8
  106. package/esm/FunnelChart/FunnelSection.d.ts +1 -1
  107. package/esm/FunnelChart/funnel.types.d.ts +1 -1
  108. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +13 -10
  109. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +3 -2
  110. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +3 -3
  111. package/esm/FunnelChart/funnelSlots.types.d.ts +3 -9
  112. package/esm/FunnelChart/index.d.ts +2 -1
  113. package/esm/FunnelChart/index.js +1 -0
  114. package/esm/FunnelChart/seriesConfig/index.js +3 -2
  115. package/esm/FunnelChart/seriesConfig/keyboardFocusHandler.js +2 -15
  116. package/esm/FunnelChart/seriesConfig/legend.js +0 -1
  117. package/esm/Heatmap/Heatmap.d.ts +6 -3
  118. package/esm/Heatmap/Heatmap.js +47 -136
  119. package/esm/Heatmap/Heatmap.types.d.ts +19 -0
  120. package/esm/Heatmap/Heatmap.types.js +1 -0
  121. package/esm/Heatmap/HeatmapItem.d.ts +6 -0
  122. package/esm/Heatmap/HeatmapItem.js +11 -3
  123. package/esm/Heatmap/HeatmapPlot.d.ts +7 -3
  124. package/esm/Heatmap/HeatmapPlot.js +17 -56
  125. package/esm/Heatmap/HeatmapSVGPlot.d.ts +2 -0
  126. package/esm/Heatmap/HeatmapSVGPlot.js +64 -0
  127. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +18 -2
  128. package/esm/Heatmap/HeatmapTooltip/index.d.ts +1 -1
  129. package/esm/Heatmap/index.d.ts +3 -2
  130. package/esm/Heatmap/seriesConfig/getItemAtPosition.d.ts +2 -2
  131. package/esm/Heatmap/seriesConfig/getItemAtPosition.js +6 -2
  132. package/esm/Heatmap/seriesConfig/index.js +2 -1
  133. package/esm/Heatmap/useHeatmapProps.d.ts +24 -0
  134. package/esm/Heatmap/useHeatmapProps.js +151 -0
  135. package/esm/LineChartPro/LineChartPro.d.ts +1 -1
  136. package/esm/LineChartPro/LineChartPro.js +30 -8
  137. package/esm/PieChartPro/PieChartPro.d.ts +1 -1
  138. package/esm/PieChartPro/PieChartPro.js +9 -8
  139. package/esm/RadarChartPro/RadarChartPro.d.ts +1 -1
  140. package/esm/RadarChartPro/RadarChartPro.js +8 -8
  141. package/esm/SankeyChart/SankeyChart.d.ts +1 -1
  142. package/esm/SankeyChart/SankeyChart.js +9 -23
  143. package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +5 -1
  144. package/esm/SankeyChart/SankeyTooltip/index.d.ts +1 -1
  145. package/esm/SankeyChart/index.d.ts +1 -1
  146. package/esm/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +7 -7
  147. package/esm/SankeyChart/sankey.highlight.types.d.ts +4 -0
  148. package/esm/SankeyChart/sankey.types.d.ts +6 -3
  149. package/esm/SankeyChart/sankeySlots.types.d.ts +3 -9
  150. package/esm/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +13 -1
  151. package/esm/SankeyChart/seriesConfig/identifierCleaner.d.ts +3 -0
  152. package/esm/SankeyChart/seriesConfig/identifierCleaner.js +18 -0
  153. package/esm/SankeyChart/seriesConfig/index.js +3 -1
  154. package/esm/ScatterChartPro/ScatterChartPro.d.ts +1 -1
  155. package/esm/ScatterChartPro/ScatterChartPro.js +30 -8
  156. package/esm/index.d.ts +3 -1
  157. package/esm/index.js +2 -1
  158. package/esm/internals/index.d.ts +7 -1
  159. package/esm/internals/index.js +5 -1
  160. package/esm/internals/plugins/useChartProExport/common.d.ts +5 -1
  161. package/esm/internals/plugins/useChartProExport/common.js +36 -0
  162. package/esm/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
  163. package/esm/internals/plugins/useChartProExport/exportImage.js +2 -1
  164. package/esm/internals/plugins/useChartProExport/print.d.ts +1 -1
  165. package/esm/internals/plugins/useChartProExport/print.js +2 -1
  166. package/esm/internals/plugins/useChartProExport/useChartProExport.js +4 -2
  167. package/esm/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.ts +2 -2
  168. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +2 -3
  169. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +4 -2
  170. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +2 -3
  171. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +4 -2
  172. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +2 -3
  173. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +6 -4
  174. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +2 -3
  175. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +7 -5
  176. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +2 -3
  177. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +4 -2
  178. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +2 -3
  179. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +6 -4
  180. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +2 -3
  181. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +6 -4
  182. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +2 -3
  183. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +6 -4
  184. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +5 -5
  185. package/esm/models/seriesType/heatmap.d.ts +3 -3
  186. package/esm/plugins/selectors/useChartHeatmapPosition.selectors.d.ts +1 -1
  187. package/esm/plugins/selectors/useChartHeatmapPosition.selectors.js +3 -1
  188. package/esm/typeOverloads/modules.d.ts +9 -5
  189. package/index.d.ts +3 -1
  190. package/index.js +9 -1
  191. package/internals/index.d.ts +7 -1
  192. package/internals/index.js +43 -1
  193. package/internals/plugins/useChartProExport/common.d.ts +5 -1
  194. package/internals/plugins/useChartProExport/common.js +37 -0
  195. package/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
  196. package/internals/plugins/useChartProExport/exportImage.js +1 -0
  197. package/internals/plugins/useChartProExport/print.d.ts +1 -1
  198. package/internals/plugins/useChartProExport/print.js +1 -0
  199. package/internals/plugins/useChartProExport/useChartProExport.js +4 -2
  200. package/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.ts +2 -2
  201. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +2 -3
  202. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +4 -2
  203. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +2 -3
  204. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +4 -2
  205. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +2 -3
  206. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +5 -3
  207. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +2 -3
  208. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +6 -4
  209. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +2 -3
  210. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +4 -2
  211. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +2 -3
  212. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +5 -3
  213. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +2 -3
  214. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +5 -3
  215. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +2 -3
  216. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +5 -3
  217. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +5 -5
  218. package/models/seriesType/heatmap.d.ts +3 -3
  219. package/package.json +19 -11
  220. package/plugins/selectors/useChartHeatmapPosition.selectors.d.ts +1 -1
  221. package/plugins/selectors/useChartHeatmapPosition.selectors.js +3 -1
  222. package/typeOverloads/modules.d.ts +9 -5
@@ -0,0 +1,24 @@
1
+ import { type ChartsWrapperProps } from '@mui/x-charts/ChartsWrapper';
2
+ import * as React from 'react';
3
+ import { type ChartsLegendProps, type ChartsLegendSlotExtension } from '@mui/x-charts/ChartsLegend';
4
+ import type { ChartsOverlayProps } from '@mui/x-charts/ChartsOverlay';
5
+ import { type ChartsClipPathProps } from '@mui/x-charts/ChartsClipPath';
6
+ import type { ChartsAxisProps } from '@mui/x-charts/ChartsAxis';
7
+ import { type HeatmapPluginSignatures } from "./Heatmap.plugins.js";
8
+ import { type HeatmapProps } from "./Heatmap.js";
9
+ import { type ChartDataProviderProProps } from "../ChartDataProviderPro/index.js";
10
+ import { type HeatmapPlotProps } from "./HeatmapPlot.js";
11
+ export type UseHeatmapProps = HeatmapProps;
12
+ export declare function useHeatmapProps(props: UseHeatmapProps): {
13
+ chartDataProviderProProps: ChartDataProviderProProps<"heatmap", HeatmapPluginSignatures>;
14
+ chartsWrapperProps: Omit<ChartsWrapperProps, "children">;
15
+ heatmapPlotProps: HeatmapPlotProps;
16
+ clipPathProps: ChartsClipPathProps;
17
+ clipPathGroupProps: {
18
+ clipPath: string;
19
+ };
20
+ overlayProps: ChartsOverlayProps;
21
+ chartsAxisProps: ChartsAxisProps;
22
+ legendProps: ChartsLegendProps | ChartsLegendSlotExtension;
23
+ children: React.ReactNode;
24
+ };
@@ -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
+ }
@@ -28,5 +28,5 @@ export interface LineChartProProps extends Omit<LineChartProps, 'apiRef' | 'slot
28
28
  *
29
29
  * - [LineChart API](https://mui.com/x/api/charts/line-chart/)
30
30
  */
31
- declare const LineChartPro: React.ForwardRefExoticComponent<LineChartProProps & React.RefAttributes<SVGSVGElement>>;
31
+ declare const LineChartPro: React.ForwardRefExoticComponent<LineChartProProps & React.RefAttributes<HTMLDivElement>>;
32
32
  export { LineChartPro };
@@ -79,11 +79,12 @@ const LineChartPro = exports.LineChartPro = /*#__PURE__*/React.forwardRef(functi
79
79
  onZoomChange,
80
80
  apiRef,
81
81
  plugins: _LineChartPro2.LINE_CHART_PRO_PLUGINS
82
- }), ref);
82
+ }));
83
83
  const Tooltip = props.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
84
84
  const Toolbar = props.slots?.toolbar ?? _ChartsToolbarPro.ChartsToolbarPro;
85
85
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, chartDataProviderProProps, {
86
86
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
87
+ ref: ref,
87
88
  children: [showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, (0, _extends2.default)({}, props.slotProps?.toolbar)) : null, !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
88
89
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", (0, _extends2.default)({}, clipPathGroupProps, {
89
90
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LineChart.AreaPlot, (0, _extends2.default)({}, areaPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LineChart.LinePlot, (0, _extends2.default)({}, linePlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps))]
@@ -109,6 +110,11 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
109
110
  setZoomData: _propTypes.default.func.isRequired
110
111
  })
111
112
  }),
113
+ /**
114
+ * A gap added between axes when multiple axes are rendered on the same side of the chart.
115
+ * @default 0
116
+ */
117
+ axesGap: _propTypes.default.number,
112
118
  /**
113
119
  * The configuration of axes highlight.
114
120
  * @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details.
@@ -188,8 +194,8 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
188
194
  */
189
195
  hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
190
196
  dataIndex: _propTypes.default.number,
191
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
192
- type: _propTypes.default.oneOf(['line']).isRequired
197
+ seriesId: _propTypes.default.string.isRequired,
198
+ type: _propTypes.default.oneOf(['line'])
193
199
  })),
194
200
  /**
195
201
  * If `true`, the legend is not rendered.
@@ -209,7 +215,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
209
215
  */
210
216
  highlightedItem: _propTypes.default.shape({
211
217
  dataIndex: _propTypes.default.number,
212
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired
218
+ seriesId: _propTypes.default.string.isRequired
213
219
  }),
214
220
  /**
215
221
  * This prop is used to help implement the accessibility logic.
@@ -239,8 +245,8 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
239
245
  */
240
246
  initialHiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
241
247
  dataIndex: _propTypes.default.number,
242
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
243
- type: _propTypes.default.oneOf(['line']).isRequired
248
+ seriesId: _propTypes.default.string.isRequired,
249
+ type: _propTypes.default.oneOf(['line'])
244
250
  })),
245
251
  /**
246
252
  * The list of zoom data related to each axis.
@@ -310,6 +316,14 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
310
316
  * Callback fired when a mark element is clicked.
311
317
  */
312
318
  onMarkClick: _propTypes.default.func,
319
+ /**
320
+ * The function called when the pointer position corresponds to a new axis data item.
321
+ * This update can either be caused by a pointer movement, or an axis update.
322
+ * In case of multiple axes, the function is called if at least one axis is updated.
323
+ * The argument contains the identifier for all axes with a `data` property.
324
+ * @param {AxisItemIdentifier[]} axisItems The array of axes item identifiers.
325
+ */
326
+ onTooltipAxisChange: _propTypes.default.func,
313
327
  /**
314
328
  * The callback fired when the tooltip item changes.
315
329
  *
@@ -350,14 +364,22 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
350
364
  sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
351
365
  theme: _propTypes.default.oneOf(['dark', 'light']),
352
366
  title: _propTypes.default.string,
367
+ /**
368
+ * The controlled axis tooltip.
369
+ * Identified by the axis id, and data index.
370
+ */
371
+ tooltipAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
372
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
373
+ dataIndex: _propTypes.default.number.isRequired
374
+ })),
353
375
  /**
354
376
  * The tooltip item.
355
377
  * Used when the tooltip is controlled.
356
378
  */
357
379
  tooltipItem: _propTypes.default.shape({
358
380
  dataIndex: _propTypes.default.number,
359
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
360
- type: _propTypes.default.oneOf(['line']).isRequired
381
+ seriesId: _propTypes.default.string.isRequired,
382
+ type: _propTypes.default.oneOf(['line'])
361
383
  }),
362
384
  /**
363
385
  * The width of the chart in px. If not defined, it takes the width of the parent element.
@@ -18,5 +18,5 @@ export interface PieChartProProps extends Omit<PieChartProps, 'apiRef' | 'slots'
18
18
  */
19
19
  slotProps?: PieChartProSlotProps;
20
20
  }
21
- declare const PieChartPro: React.ForwardRefExoticComponent<PieChartProProps & React.RefAttributes<SVGSVGElement>>;
21
+ declare const PieChartPro: React.ForwardRefExoticComponent<PieChartProProps & React.RefAttributes<HTMLDivElement>>;
22
22
  export { PieChartPro };
@@ -66,7 +66,7 @@ const PieChartPro = exports.PieChartPro = /*#__PURE__*/React.forwardRef(function
66
66
  className,
67
67
  skipAnimation,
68
68
  plugins: _PieChartPro2.PIE_CHART_PRO_PLUGINS
69
- }), ref);
69
+ }));
70
70
  const Tooltip = slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
71
71
  const Toolbar = slots?.toolbar ?? _ChartsToolbarPro.ChartsToolbarPro;
72
72
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, chartDataProviderProProps, {
@@ -75,6 +75,7 @@ const PieChartPro = exports.PieChartPro = /*#__PURE__*/React.forwardRef(function
75
75
  legendDirection: slotProps?.legend?.direction ?? 'vertical',
76
76
  sx: sx,
77
77
  hideLegend: hideLegend ?? false,
78
+ ref: ref,
78
79
  children: [showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, (0, _extends2.default)({}, slotProps?.toolbar)) : null, !hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, {
79
80
  direction: slotProps?.legend?.direction ?? 'vertical',
80
81
  slots: slots,
@@ -146,8 +147,8 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
146
147
  */
147
148
  hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
148
149
  dataIndex: _propTypes.default.number,
149
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
150
- type: _propTypes.default.oneOf(['pie']).isRequired
150
+ seriesId: _propTypes.default.string.isRequired,
151
+ type: _propTypes.default.oneOf(['pie'])
151
152
  })),
152
153
  /**
153
154
  * If `true`, the legend is not rendered.
@@ -159,7 +160,7 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
159
160
  */
160
161
  highlightedItem: _propTypes.default.shape({
161
162
  dataIndex: _propTypes.default.number,
162
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired
163
+ seriesId: _propTypes.default.string.isRequired
163
164
  }),
164
165
  /**
165
166
  * This prop is used to help implement the accessibility logic.
@@ -189,8 +190,8 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
189
190
  */
190
191
  initialHiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
191
192
  dataIndex: _propTypes.default.number,
192
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
193
- type: _propTypes.default.oneOf(['pie']).isRequired
193
+ seriesId: _propTypes.default.string.isRequired,
194
+ type: _propTypes.default.oneOf(['pie'])
194
195
  })),
195
196
  /**
196
197
  * If `true`, a loading overlay is displayed.
@@ -268,8 +269,8 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
268
269
  */
269
270
  tooltipItem: _propTypes.default.shape({
270
271
  dataIndex: _propTypes.default.number.isRequired,
271
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
272
- type: _propTypes.default.oneOf(['pie']).isRequired
272
+ seriesId: _propTypes.default.string.isRequired,
273
+ type: _propTypes.default.oneOf(['pie'])
273
274
  }),
274
275
  /**
275
276
  * The width of the chart in px. If not defined, it takes the width of the parent element.
@@ -26,5 +26,5 @@ export interface RadarChartProProps extends Omit<RadarChartProps, 'apiRef' | 'sl
26
26
  *
27
27
  * - [RadarChart API](https://mui.com/x/api/charts/radar-chart/)
28
28
  */
29
- declare const RadarChartPro: React.ForwardRefExoticComponent<RadarChartProProps & React.RefAttributes<SVGSVGElement>>;
29
+ declare const RadarChartPro: React.ForwardRefExoticComponent<RadarChartProProps & React.RefAttributes<HTMLDivElement>>;
30
30
  export { RadarChartPro };
@@ -53,8 +53,8 @@ const RadarChartPro = exports.RadarChartPro = /*#__PURE__*/React.forwardRef(func
53
53
  });
54
54
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RadarChart.RadarDataProvider, (0, _extends2.default)({}, radarDataProviderProProps, {
55
55
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
56
+ ref: ref,
56
57
  children: [props.showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, (0, _extends2.default)({}, props.slotProps?.toolbar)) : null, !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
57
- ref: ref,
58
58
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_RadarChart.RadarGrid, (0, _extends2.default)({}, radarGrid)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RadarChart.RadarMetricLabels, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RadarChart.RadarSeriesArea, {}), highlight === 'axis' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_RadarChart.RadarAxisHighlight, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RadarChart.RadarSeriesMarks, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), children]
59
59
  })), !props.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, props.slotProps?.tooltip))]
60
60
  }))
@@ -117,8 +117,8 @@ 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]),
121
- type: _propTypes.default.oneOf(['radar']).isRequired
120
+ seriesId: _propTypes.default.string.isRequired,
121
+ type: _propTypes.default.oneOf(['radar'])
122
122
  })),
123
123
  /**
124
124
  * If `true`, the legend is not rendered.
@@ -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,8 +165,8 @@ 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]),
169
- type: _propTypes.default.oneOf(['radar']).isRequired
168
+ seriesId: _propTypes.default.string.isRequired,
169
+ type: _propTypes.default.oneOf(['radar'])
170
170
  })),
171
171
  /**
172
172
  * If `true`, a loading overlay is displayed.
@@ -285,8 +285,8 @@ 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,
289
- type: _propTypes.default.oneOf(['radar']).isRequired
288
+ seriesId: _propTypes.default.string.isRequired,
289
+ type: _propTypes.default.oneOf(['radar'])
290
290
  }),
291
291
  /**
292
292
  * The width of the chart in px. If not defined, it takes the width of the parent element.
@@ -28,5 +28,5 @@ export interface SankeyChartProps extends Omit<ChartContainerProProps<'sankey',
28
28
  *
29
29
  * - [SankeyChart API](https://mui.com/x/api/charts/sankey-chart/)
30
30
  */
31
- declare const SankeyChart: React.ForwardRefExoticComponent<SankeyChartProps & React.RefAttributes<SVGSVGElement>>;
31
+ declare const SankeyChart: React.ForwardRefExoticComponent<SankeyChartProps & React.RefAttributes<HTMLDivElement>>;
32
32
  export { SankeyChart };
@@ -50,7 +50,7 @@ const SankeyChart = exports.SankeyChart = /*#__PURE__*/React.forwardRef(function
50
50
  chartsWrapperProps,
51
51
  children
52
52
  } = (0, _useSankeyChartProps.useSankeyChartProps)(themedProps);
53
- const _useChartContainerPro = (0, _useChartContainerProProps.useChartContainerProProps)(chartContainerProps, ref),
53
+ const _useChartContainerPro = (0, _useChartContainerProProps.useChartContainerProProps)(chartContainerProps),
54
54
  {
55
55
  chartDataProviderProProps: {
56
56
  series
@@ -63,6 +63,7 @@ const SankeyChart = exports.SankeyChart = /*#__PURE__*/React.forwardRef(function
63
63
  series: series
64
64
  }, chartDataProviderProProps, {
65
65
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
66
+ ref: ref,
66
67
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
67
68
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SankeyPlot.SankeyPlot, (0, _extends2.default)({}, sankeyPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FocusedSankeyNode.FocusedSankeyNode, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FocusedSankeyLink.FocusedSankeyLink, {}), children]
68
69
  })), !themedProps.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({
@@ -111,7 +112,7 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
111
112
  */
112
113
  highlightedItem: _propTypes.default.oneOfType([_propTypes.default.shape({
113
114
  nodeId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
114
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
115
+ seriesId: _propTypes.default.string.isRequired,
115
116
  subType: _propTypes.default.oneOf([
116
117
  /**
117
118
  * Subtype to differentiate between node and link
@@ -119,7 +120,7 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
119
120
  'node']).isRequired,
120
121
  type: _propTypes.default.oneOf(['sankey']).isRequired
121
122
  }), _propTypes.default.shape({
122
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
123
+ seriesId: _propTypes.default.string.isRequired,
123
124
  sourceId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
124
125
  subType: _propTypes.default.oneOf([
125
126
  /**
@@ -201,26 +202,11 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
201
202
  * The tooltip item.
202
203
  * Used when the tooltip is controlled.
203
204
  */
204
- tooltipItem: _propTypes.default.oneOfType([_propTypes.default.shape({
205
- nodeId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
206
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
207
- subType: _propTypes.default.oneOf([
208
- /**
209
- * Subtype to differentiate between node and link
210
- */
211
- 'node']).isRequired,
212
- type: _propTypes.default.oneOf(['sankey']).isRequired
213
- }), _propTypes.default.shape({
214
- seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
215
- sourceId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
216
- subType: _propTypes.default.oneOf([
217
- /**
218
- * Subtype to differentiate between node and link
219
- */
220
- 'link']).isRequired,
221
- targetId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
222
- type: _propTypes.default.oneOf(['sankey']).isRequired
223
- })]),
205
+ tooltipItem: _propTypes.default.shape({
206
+ seriesId: _propTypes.default.string.isRequired,
207
+ subType: _propTypes.default.oneOf(['link', 'node']).isRequired,
208
+ type: _propTypes.default.oneOf(['sankey'])
209
+ }),
224
210
  /**
225
211
  * The width of the chart in px. If not defined, it takes the width of the parent element.
226
212
  */
@@ -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';