@mui/x-charts-pro 8.11.2 → 8.12.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.
- package/BarChartPro/BarChartPro.d.ts +2 -2
- package/BarChartPro/BarChartPro.js +1 -0
- package/BarChartPro/BarChartPro.plugins.d.ts +3 -3
- package/BarChartPro/BarChartPro.plugins.js +1 -1
- package/BarChartPro/index.d.ts +2 -1
- package/BarChartPro/index.js +11 -0
- package/CHANGELOG.md +231 -0
- package/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.js +2 -2
- package/FunnelChart/FunnelChart.d.ts +2 -2
- package/FunnelChart/FunnelChart.plugins.d.ts +2 -2
- package/FunnelChart/FunnelPlot.js +2 -2
- package/FunnelChart/funnelAxisPlugin/computeAxisValue.js +1 -1
- package/FunnelChart/index.d.ts +1 -0
- package/FunnelChart/index.js +12 -0
- package/FunnelChart/useFunnelChartProps.d.ts +2 -2
- package/FunnelChart/useFunnelChartProps.js +4 -3
- package/Heatmap/Heatmap.d.ts +2 -2
- package/Heatmap/Heatmap.js +2 -1
- package/Heatmap/Heatmap.plugins.d.ts +2 -2
- package/Heatmap/index.d.ts +1 -0
- package/Heatmap/index.js +12 -0
- package/LineChartPro/LineChartPro.d.ts +2 -2
- package/LineChartPro/LineChartPro.js +1 -0
- package/LineChartPro/LineChartPro.plugins.d.ts +3 -3
- package/LineChartPro/LineChartPro.plugins.js +1 -1
- package/LineChartPro/index.d.ts +2 -1
- package/LineChartPro/index.js +11 -0
- package/PieChartPro/PieChartPro.js +2 -0
- package/PieChartPro/PieChartPro.plugins.d.ts +2 -2
- package/PieChartPro/index.d.ts +2 -1
- package/PieChartPro/index.js +11 -0
- package/RadarChartPro/RadarChartPro.d.ts +2 -2
- package/RadarChartPro/RadarChartPro.plugins.d.ts +2 -2
- package/RadarChartPro/index.d.ts +2 -1
- package/RadarChartPro/index.js +11 -0
- package/SankeyChart/SankeyChart.d.ts +2 -2
- package/SankeyChart/SankeyChart.js +4 -1
- package/SankeyChart/SankeyChart.plugins.d.ts +3 -2
- package/SankeyChart/SankeyChart.plugins.js +2 -4
- package/SankeyChart/SankeyLinkLabel.js +12 -1
- package/SankeyChart/calculateSankeyLayout.js +8 -2
- package/SankeyChart/sankey.types.d.ts +55 -5
- package/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +2 -0
- package/SankeyChart/seriesConfig/tooltipGetter.js +13 -3
- package/SankeyChart/useSankeyChartProps.d.ts +2 -2
- package/SankeyChart/useSankeyChartProps.js +4 -3
- package/ScatterChartPro/ScatterChartPro.d.ts +2 -2
- package/ScatterChartPro/ScatterChartPro.js +13 -2
- package/ScatterChartPro/ScatterChartPro.plugins.d.ts +3 -3
- package/ScatterChartPro/ScatterChartPro.plugins.js +1 -1
- package/ScatterChartPro/index.d.ts +2 -1
- package/ScatterChartPro/index.js +11 -0
- package/context/ChartProApi.d.ts +14 -12
- package/esm/BarChartPro/BarChartPro.d.ts +2 -2
- package/esm/BarChartPro/BarChartPro.js +1 -0
- package/esm/BarChartPro/BarChartPro.plugins.d.ts +3 -3
- package/esm/BarChartPro/BarChartPro.plugins.js +2 -2
- package/esm/BarChartPro/index.d.ts +2 -1
- package/esm/BarChartPro/index.js +2 -1
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.js +2 -2
- package/esm/FunnelChart/FunnelChart.d.ts +2 -2
- package/esm/FunnelChart/FunnelChart.plugins.d.ts +2 -2
- package/esm/FunnelChart/FunnelPlot.js +3 -3
- package/esm/FunnelChart/funnelAxisPlugin/computeAxisValue.js +2 -2
- package/esm/FunnelChart/index.d.ts +1 -0
- package/esm/FunnelChart/index.js +1 -0
- package/esm/FunnelChart/useFunnelChartProps.d.ts +2 -2
- package/esm/FunnelChart/useFunnelChartProps.js +4 -3
- package/esm/Heatmap/Heatmap.d.ts +2 -2
- package/esm/Heatmap/Heatmap.js +2 -1
- package/esm/Heatmap/Heatmap.plugins.d.ts +2 -2
- package/esm/Heatmap/index.d.ts +1 -0
- package/esm/Heatmap/index.js +1 -0
- package/esm/LineChartPro/LineChartPro.d.ts +2 -2
- package/esm/LineChartPro/LineChartPro.js +1 -0
- package/esm/LineChartPro/LineChartPro.plugins.d.ts +3 -3
- package/esm/LineChartPro/LineChartPro.plugins.js +2 -2
- package/esm/LineChartPro/index.d.ts +2 -1
- package/esm/LineChartPro/index.js +2 -1
- package/esm/PieChartPro/PieChartPro.js +2 -0
- package/esm/PieChartPro/PieChartPro.plugins.d.ts +2 -2
- package/esm/PieChartPro/index.d.ts +2 -1
- package/esm/PieChartPro/index.js +2 -1
- package/esm/RadarChartPro/RadarChartPro.d.ts +2 -2
- package/esm/RadarChartPro/RadarChartPro.plugins.d.ts +2 -2
- package/esm/RadarChartPro/index.d.ts +2 -1
- package/esm/RadarChartPro/index.js +2 -1
- package/esm/SankeyChart/SankeyChart.d.ts +2 -2
- package/esm/SankeyChart/SankeyChart.js +4 -1
- package/esm/SankeyChart/SankeyChart.plugins.d.ts +3 -2
- package/esm/SankeyChart/SankeyChart.plugins.js +2 -6
- package/esm/SankeyChart/SankeyLinkLabel.js +12 -1
- package/esm/SankeyChart/calculateSankeyLayout.js +8 -2
- package/esm/SankeyChart/sankey.types.d.ts +55 -5
- package/esm/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +2 -0
- package/esm/SankeyChart/seriesConfig/tooltipGetter.js +13 -3
- package/esm/SankeyChart/useSankeyChartProps.d.ts +2 -2
- package/esm/SankeyChart/useSankeyChartProps.js +4 -3
- package/esm/ScatterChartPro/ScatterChartPro.d.ts +2 -2
- package/esm/ScatterChartPro/ScatterChartPro.js +13 -2
- package/esm/ScatterChartPro/ScatterChartPro.plugins.d.ts +3 -3
- package/esm/ScatterChartPro/ScatterChartPro.plugins.js +2 -2
- package/esm/ScatterChartPro/index.d.ts +2 -1
- package/esm/ScatterChartPro/index.js +2 -1
- package/esm/context/ChartProApi.d.ts +14 -12
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/esm/internals/material/components/BasePopper.js +2 -2
- package/esm/internals/plugins/useChartProExport/common.d.ts +5 -1
- package/esm/internals/plugins/useChartProExport/common.js +13 -0
- package/esm/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
- package/esm/internals/plugins/useChartProExport/exportImage.js +23 -17
- package/esm/internals/plugins/useChartProExport/print.js +2 -3
- package/esm/internals/plugins/useChartProExport/useChartProExport.js +4 -2
- package/esm/internals/plugins/useChartProExport/useChartProExport.types.d.ts +1 -2
- package/esm/plugins/index.d.ts +3 -0
- package/esm/plugins/index.js +3 -0
- package/index.d.ts +1 -0
- package/index.js +13 -1
- package/internals/material/components/BasePopper.js +2 -2
- package/internals/plugins/useChartProExport/common.d.ts +5 -1
- package/internals/plugins/useChartProExport/common.js +14 -0
- package/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
- package/internals/plugins/useChartProExport/exportImage.js +22 -16
- package/internals/plugins/useChartProExport/print.js +2 -3
- package/internals/plugins/useChartProExport/useChartProExport.js +4 -2
- package/internals/plugins/useChartProExport/useChartProExport.types.d.ts +1 -2
- package/package.json +6 -6
- package/plugins/index.d.ts +3 -0
- package/plugins/index.js +35 -0
package/PieChartPro/index.js
CHANGED
|
@@ -13,4 +13,15 @@ Object.keys(_PieChartPro).forEach(function (key) {
|
|
|
13
13
|
return _PieChartPro[key];
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
+
});
|
|
17
|
+
var _PieChartPro2 = require("./PieChartPro.plugins");
|
|
18
|
+
Object.keys(_PieChartPro2).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _PieChartPro2[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _PieChartPro2[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
16
27
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { RadarChartProps, RadarDataProviderProps, RadarChartSlotProps, RadarChartSlots } from '@mui/x-charts/RadarChart';
|
|
3
|
-
import {
|
|
3
|
+
import { RadarChartProPluginSignatures } from "./RadarChartPro.plugins.js";
|
|
4
4
|
import { ChartsToolbarProSlotProps, ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
5
5
|
import { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
6
6
|
export interface RadarChartProSlots extends Omit<RadarChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
7
7
|
export interface RadarChartProSlotProps extends Omit<RadarChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
8
|
-
export interface RadarChartProProps extends Omit<RadarChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<RadarDataProviderProps<
|
|
8
|
+
export interface RadarChartProProps extends Omit<RadarChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<RadarDataProviderProps<RadarChartProPluginSignatures>, 'plugins' | 'seriesConfig' | 'slots' | 'slotProps' | 'experimentalFeatures'> {
|
|
9
9
|
/**
|
|
10
10
|
* Overridable component slots.
|
|
11
11
|
* @default {}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ConvertSignaturesIntoPlugins, UseChartHighlightSignature, UseChartInteractionSignature, UseChartPolarAxisSignature } from '@mui/x-charts/internals';
|
|
2
2
|
import { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
-
export type
|
|
4
|
-
export declare const RADAR_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<
|
|
3
|
+
export type RadarChartProPluginSignatures = [UseChartPolarAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProExportSignature];
|
|
4
|
+
export declare const RADAR_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<RadarChartProPluginSignatures>;
|
package/RadarChartPro/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from "./RadarChartPro.js";
|
|
1
|
+
export * from "./RadarChartPro.js";
|
|
2
|
+
export * from "./RadarChartPro.plugins.js";
|
package/RadarChartPro/index.js
CHANGED
|
@@ -13,4 +13,15 @@ Object.keys(_RadarChartPro).forEach(function (key) {
|
|
|
13
13
|
return _RadarChartPro[key];
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
+
});
|
|
17
|
+
var _RadarChartPro2 = require("./RadarChartPro.plugins");
|
|
18
|
+
Object.keys(_RadarChartPro2).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _RadarChartPro2[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _RadarChartPro2[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
16
27
|
});
|
|
@@ -3,11 +3,11 @@ import { type ChartsOverlayProps } from '@mui/x-charts/ChartsOverlay';
|
|
|
3
3
|
import type { MakeOptional } from '@mui/x-internals/types';
|
|
4
4
|
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
5
5
|
import { type SankeyPlotProps } from "./SankeyPlot.js";
|
|
6
|
-
import { type
|
|
6
|
+
import { type SankeyChartPluginSignatures } from "./SankeyChart.plugins.js";
|
|
7
7
|
import type { SankeySeriesType } from "./sankey.types.js";
|
|
8
8
|
import type { SankeyChartSlotExtension } from "./sankeySlots.types.js";
|
|
9
9
|
export type SankeySeries = MakeOptional<SankeySeriesType, 'type'>;
|
|
10
|
-
export interface SankeyChartProps extends Omit<ChartContainerProProps<'sankey',
|
|
10
|
+
export interface SankeyChartProps extends Omit<ChartContainerProProps<'sankey', SankeyChartPluginSignatures>, 'plugins' | 'series' | 'slotProps' | 'slots' | 'dataset' | 'hideLegend' | 'skipAnimation' | 'highlightedItem' | 'onHighlightChange'>, Omit<SankeyPlotProps, 'data'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'>, SankeyChartSlotExtension {
|
|
11
11
|
/**
|
|
12
12
|
* The series to display in the Sankey chart.
|
|
13
13
|
* A single object is expected.
|
|
@@ -75,7 +75,10 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
|
|
|
75
75
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
76
76
|
// ----------------------------------------------------------------------
|
|
77
77
|
apiRef: _propTypes.default.shape({
|
|
78
|
-
current: _propTypes.default.
|
|
78
|
+
current: _propTypes.default.shape({
|
|
79
|
+
exportAsImage: _propTypes.default.func.isRequired,
|
|
80
|
+
exportAsPrint: _propTypes.default.func.isRequired
|
|
81
|
+
})
|
|
79
82
|
}),
|
|
80
83
|
/**
|
|
81
84
|
* Classes applied to the various elements.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { ConvertSignaturesIntoPlugins, UseChartHighlightSignature, UseChartInteractionSignature } from '@mui/x-charts/internals';
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
import { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
+
export type SankeyChartPluginSignatures = [UseChartInteractionSignature, UseChartHighlightSignature, UseChartProExportSignature];
|
|
4
|
+
export declare const SANKEY_CHART_PLUGINS: ConvertSignaturesIntoPlugins<SankeyChartPluginSignatures>;
|
|
@@ -5,7 +5,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.SANKEY_CHART_PLUGINS = void 0;
|
|
7
7
|
var _internals = require("@mui/x-charts/internals");
|
|
8
|
-
require("../internals/plugins/useChartProExport");
|
|
9
|
-
const SANKEY_CHART_PLUGINS = exports.SANKEY_CHART_PLUGINS = [_internals.useChartInteraction, _internals.useChartHighlight
|
|
10
|
-
// useChartProExport,
|
|
11
|
-
];
|
|
8
|
+
var _useChartProExport = require("../internals/plugins/useChartProExport");
|
|
9
|
+
const SANKEY_CHART_PLUGINS = exports.SANKEY_CHART_PLUGINS = [_internals.useChartInteraction, _internals.useChartHighlight, _useChartProExport.useChartProExport];
|
|
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.SankeyLinkLabel = void 0;
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _styles = require("@mui/material/styles");
|
|
11
|
+
var _useSankeySeries = require("../hooks/useSankeySeries");
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
const getLinkMidpoint = link => {
|
|
13
14
|
if (link.y0 === undefined || link.y1 === undefined) {
|
|
@@ -36,10 +37,20 @@ const SankeyLinkLabel = exports.SankeyLinkLabel = /*#__PURE__*/React.forwardRef(
|
|
|
36
37
|
link
|
|
37
38
|
} = props;
|
|
38
39
|
const theme = (0, _styles.useTheme)();
|
|
40
|
+
const seriesContext = (0, _useSankeySeries.useSankeySeriesContext)();
|
|
39
41
|
if (!link.path || link.y0 === undefined || link.y1 === undefined) {
|
|
40
42
|
return null; // No path defined or invalid coordinates, nothing to render
|
|
41
43
|
}
|
|
42
44
|
const midpoint = getLinkMidpoint(link);
|
|
45
|
+
|
|
46
|
+
// Get the series data and valueFormatter
|
|
47
|
+
const series = seriesContext?.series[seriesContext.seriesOrder?.[0]];
|
|
48
|
+
const formattedValue = series?.valueFormatter ? series.valueFormatter(link.value, {
|
|
49
|
+
type: 'link',
|
|
50
|
+
sourceId: link.source.id,
|
|
51
|
+
targetId: link.target.id,
|
|
52
|
+
location: 'label'
|
|
53
|
+
}) : link.value;
|
|
43
54
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("text", {
|
|
44
55
|
ref: ref,
|
|
45
56
|
x: midpoint.x,
|
|
@@ -52,7 +63,7 @@ const SankeyLinkLabel = exports.SankeyLinkLabel = /*#__PURE__*/React.forwardRef(
|
|
|
52
63
|
"data-link-target": link.target.id,
|
|
53
64
|
fontFamily: theme.typography.fontFamily,
|
|
54
65
|
pointerEvents: "none",
|
|
55
|
-
children:
|
|
66
|
+
children: formattedValue
|
|
56
67
|
});
|
|
57
68
|
});
|
|
58
69
|
if (process.env.NODE_ENV !== "production") SankeyLinkLabel.displayName = "SankeyLinkLabel";
|
|
@@ -33,7 +33,7 @@ function calculateSankeyLayout(data, drawingArea, theme, series = {}) {
|
|
|
33
33
|
sort: nodeSort = null
|
|
34
34
|
} = nodeOptions ?? {};
|
|
35
35
|
const {
|
|
36
|
-
color: linkColor =
|
|
36
|
+
color: linkColor = 'source',
|
|
37
37
|
sort: linkSort = null,
|
|
38
38
|
curveCorrection = 10
|
|
39
39
|
} = linkOptions ?? {};
|
|
@@ -92,8 +92,14 @@ function calculateSankeyLayout(data, drawingArea, theme, series = {}) {
|
|
|
92
92
|
const originalLink = data.links.find(l => {
|
|
93
93
|
return l.source === link.source.id && l.target === link.target.id;
|
|
94
94
|
});
|
|
95
|
+
let resolvedColor = originalLink?.color ?? linkColor;
|
|
96
|
+
if (resolvedColor === 'source') {
|
|
97
|
+
resolvedColor = link.source.color ?? linkColor;
|
|
98
|
+
} else if (resolvedColor === 'target') {
|
|
99
|
+
resolvedColor = link.target.color ?? linkColor;
|
|
100
|
+
}
|
|
95
101
|
return (0, _extends2.default)({}, originalLink, link, {
|
|
96
|
-
color:
|
|
102
|
+
color: resolvedColor,
|
|
97
103
|
path: improvedNaiveSankeyLinkPathHorizontal(link, curveCorrection)
|
|
98
104
|
});
|
|
99
105
|
});
|
|
@@ -38,9 +38,13 @@ export interface SankeyLink {
|
|
|
38
38
|
*/
|
|
39
39
|
data?: any;
|
|
40
40
|
/**
|
|
41
|
-
* Optional color override for the link
|
|
41
|
+
* Optional color override for the link.
|
|
42
|
+
* Can be a color string, or a keyword:
|
|
43
|
+
* - 'source': Use the color of the source node
|
|
44
|
+
* - 'target': Use the color of the target node
|
|
45
|
+
* @default 'source'
|
|
42
46
|
*/
|
|
43
|
-
color?: string;
|
|
47
|
+
color?: string | 'source' | 'target';
|
|
44
48
|
}
|
|
45
49
|
export type SankeyNodeOptions = {
|
|
46
50
|
/**
|
|
@@ -78,9 +82,13 @@ export type SankeyNodeOptions = {
|
|
|
78
82
|
};
|
|
79
83
|
export type SankeyLinkOptions = {
|
|
80
84
|
/**
|
|
81
|
-
* Default color for links without specified colors
|
|
85
|
+
* Default color for links without specified colors.
|
|
86
|
+
* Can be a color string, or a keyword:
|
|
87
|
+
* - 'source': Use the color of the source node
|
|
88
|
+
* - 'target': Use the color of the target node
|
|
89
|
+
* @default 'source'
|
|
82
90
|
*/
|
|
83
|
-
color?: string;
|
|
91
|
+
color?: string | 'source' | 'target';
|
|
84
92
|
/**
|
|
85
93
|
* Opacity of the links (0-1)
|
|
86
94
|
*/
|
|
@@ -146,6 +154,17 @@ export interface SankeySeriesType {
|
|
|
146
154
|
* @default 6
|
|
147
155
|
*/
|
|
148
156
|
iterations?: number;
|
|
157
|
+
/**
|
|
158
|
+
* Formatter used to render values in tooltip or other data display.
|
|
159
|
+
* @param {number} value The value to render.
|
|
160
|
+
* @param {SankeyValueFormatterContext} context The rendering context of the value.
|
|
161
|
+
* @param {'node' | 'link'} context.type The type of element being formatted.
|
|
162
|
+
* @param {SankeyNodeId} [context.nodeId] For nodes: the node ID. For links: undefined.
|
|
163
|
+
* @param {SankeyNodeId} [context.sourceId] For links: the source node ID. For nodes: undefined.
|
|
164
|
+
* @param {SankeyNodeId} [context.targetId] For links: the target node ID. For nodes: undefined.
|
|
165
|
+
* @returns {string | null} The formatted value to display.
|
|
166
|
+
*/
|
|
167
|
+
valueFormatter?: (value: number, context: SankeyValueFormatterContext) => string | null;
|
|
149
168
|
}
|
|
150
169
|
/**
|
|
151
170
|
* Represents the calculated positions and dimensions for a node in the Sankey diagram
|
|
@@ -170,7 +189,7 @@ export interface SankeyLayout {
|
|
|
170
189
|
nodes: readonly SankeyLayoutNode[];
|
|
171
190
|
links: readonly SankeyLayoutLink[];
|
|
172
191
|
}
|
|
173
|
-
export interface DefaultizedSankeySeriesType extends DefaultizedProps<Omit<SankeySeriesType, 'data'>, 'id'> {
|
|
192
|
+
export interface DefaultizedSankeySeriesType extends DefaultizedProps<Omit<SankeySeriesType, 'data'>, 'id' | 'valueFormatter'> {
|
|
174
193
|
data: {
|
|
175
194
|
nodes: Map<SankeyNodeId, SankeyNode>;
|
|
176
195
|
links: readonly SankeyLink[];
|
|
@@ -222,4 +241,35 @@ export type SankeyLinkIdentifierWithData = SankeyLinkIdentifier & {
|
|
|
222
241
|
};
|
|
223
242
|
export type SankeyItemIdentifier = SankeyNodeIdentifier | SankeyLinkIdentifier;
|
|
224
243
|
export type SankeyItemIdentifierWithData = SankeyNodeIdentifierWithData | SankeyLinkIdentifierWithData;
|
|
244
|
+
export type SankeyValueFormatterContext = {
|
|
245
|
+
/**
|
|
246
|
+
* Where the value will be displayed
|
|
247
|
+
*/
|
|
248
|
+
location: 'tooltip' | 'label';
|
|
249
|
+
/**
|
|
250
|
+
* Can be 'node' or 'link'
|
|
251
|
+
*/
|
|
252
|
+
type: 'node';
|
|
253
|
+
/**
|
|
254
|
+
* The id of the node
|
|
255
|
+
*/
|
|
256
|
+
nodeId: SankeyNodeId;
|
|
257
|
+
} | {
|
|
258
|
+
/**
|
|
259
|
+
* Where the value will be displayed
|
|
260
|
+
*/
|
|
261
|
+
location: 'tooltip' | 'label';
|
|
262
|
+
/**
|
|
263
|
+
* Can be 'node' or 'link'
|
|
264
|
+
*/
|
|
265
|
+
type: 'link';
|
|
266
|
+
/**
|
|
267
|
+
* The id of the source node
|
|
268
|
+
*/
|
|
269
|
+
sourceId: SankeyNodeId;
|
|
270
|
+
/**
|
|
271
|
+
* The id of the target node
|
|
272
|
+
*/
|
|
273
|
+
targetId: SankeyNodeId;
|
|
274
|
+
};
|
|
225
275
|
export {};
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.getSeriesWithDefaultValues = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
const defaultSankeyValueFormatter = v => v == null ? '' : v.toLocaleString();
|
|
9
10
|
const getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {
|
|
10
11
|
const nodeMap = new Map();
|
|
11
12
|
const nodeColor = seriesData.nodeOptions?.color;
|
|
@@ -46,6 +47,7 @@ const getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {
|
|
|
46
47
|
return (0, _extends2.default)({
|
|
47
48
|
id: seriesData.id ?? `auto-generated-id-${seriesIndex}`
|
|
48
49
|
}, seriesData, {
|
|
50
|
+
valueFormatter: seriesData.valueFormatter ?? defaultSankeyValueFormatter,
|
|
49
51
|
data: {
|
|
50
52
|
links: data.links,
|
|
51
53
|
nodes: nodeMap
|
|
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.tooltipGetter = void 0;
|
|
7
7
|
const tooltipGetter = params => {
|
|
8
8
|
const {
|
|
9
|
-
identifier
|
|
9
|
+
identifier,
|
|
10
|
+
series
|
|
10
11
|
} = params;
|
|
11
12
|
if (!identifier) {
|
|
12
13
|
return null;
|
|
@@ -21,7 +22,11 @@ const tooltipGetter = params => {
|
|
|
21
22
|
color: node.color,
|
|
22
23
|
label: `${node.label}:`,
|
|
23
24
|
value: node.value,
|
|
24
|
-
formattedValue:
|
|
25
|
+
formattedValue: series.valueFormatter(node.value, {
|
|
26
|
+
type: 'node',
|
|
27
|
+
nodeId: node.id,
|
|
28
|
+
location: 'tooltip'
|
|
29
|
+
}),
|
|
25
30
|
markType: 'square'
|
|
26
31
|
};
|
|
27
32
|
}
|
|
@@ -37,7 +42,12 @@ const tooltipGetter = params => {
|
|
|
37
42
|
color: link.color,
|
|
38
43
|
label: `${sourceLabel} → ${targetLabel}:`,
|
|
39
44
|
value: link.value,
|
|
40
|
-
formattedValue:
|
|
45
|
+
formattedValue: series.valueFormatter(link.value, {
|
|
46
|
+
type: 'link',
|
|
47
|
+
sourceId: link.source.id,
|
|
48
|
+
targetId: link.target.id,
|
|
49
|
+
location: 'tooltip'
|
|
50
|
+
}),
|
|
41
51
|
markType: 'line'
|
|
42
52
|
};
|
|
43
53
|
}
|
|
@@ -2,7 +2,7 @@ import type { ChartsOverlayProps } from '@mui/x-charts/ChartsOverlay';
|
|
|
2
2
|
import type { ChartsWrapperProps } from '@mui/x-charts/ChartsWrapper';
|
|
3
3
|
import type { SankeyChartProps } from "./SankeyChart.js";
|
|
4
4
|
import type { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
5
|
-
import { type
|
|
5
|
+
import { type SankeyChartPluginSignatures } from "./SankeyChart.plugins.js";
|
|
6
6
|
/**
|
|
7
7
|
* A helper function that extracts SankeyChartProps from the input props
|
|
8
8
|
* and returns an object with props for the children components of SankeyChart.
|
|
@@ -11,7 +11,7 @@ import { type SankeyChartPluginsSignatures } from "./SankeyChart.plugins.js";
|
|
|
11
11
|
* @returns An object with props for the children components of SankeyChart
|
|
12
12
|
*/
|
|
13
13
|
export declare const useSankeyChartProps: (props: SankeyChartProps) => {
|
|
14
|
-
chartContainerProps: ChartContainerProProps<"sankey",
|
|
14
|
+
chartContainerProps: ChartContainerProProps<"sankey", SankeyChartPluginSignatures>;
|
|
15
15
|
sankeyPlotProps: {
|
|
16
16
|
onNodeClick: ((event: React.MouseEvent<SVGElement, MouseEvent>, node: import("./sankey.types.js").SankeyNodeIdentifierWithData) => void) | undefined;
|
|
17
17
|
onLinkClick: ((event: React.MouseEvent<SVGElement, MouseEvent>, link: import("./sankey.types.js").SankeyLinkIdentifierWithData) => void) | undefined;
|
|
@@ -37,9 +37,9 @@ const useSankeyChartProps = props => {
|
|
|
37
37
|
onNodeClick,
|
|
38
38
|
onLinkClick
|
|
39
39
|
} = props,
|
|
40
|
-
|
|
40
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
41
41
|
const margin = (0, _internals.defaultizeMargin)(marginProps, _constants.DEFAULT_MARGINS);
|
|
42
|
-
const chartContainerProps = (0, _extends2.default)({},
|
|
42
|
+
const chartContainerProps = (0, _extends2.default)({}, other, {
|
|
43
43
|
series: [(0, _extends2.default)({
|
|
44
44
|
type: 'sankey'
|
|
45
45
|
}, series)],
|
|
@@ -64,7 +64,8 @@ const useSankeyChartProps = props => {
|
|
|
64
64
|
loading
|
|
65
65
|
};
|
|
66
66
|
const chartsWrapperProps = {
|
|
67
|
-
sx
|
|
67
|
+
sx,
|
|
68
|
+
hideLegend: false
|
|
68
69
|
};
|
|
69
70
|
return {
|
|
70
71
|
chartContainerProps,
|
|
@@ -3,7 +3,7 @@ import { ScatterChartProps, ScatterChartSlotProps, ScatterChartSlots } from '@mu
|
|
|
3
3
|
import { ChartsTooltipProps } from '@mui/x-charts/ChartsTooltip';
|
|
4
4
|
import { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
5
5
|
import { ChartContainerProProps } from "../ChartContainerPro/ChartContainerPro.js";
|
|
6
|
-
import {
|
|
6
|
+
import { ScatterChartProPluginSignatures } from "./ScatterChartPro.plugins.js";
|
|
7
7
|
import { ChartsToolbarProSlots, ChartsToolbarProSlotProps } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
8
8
|
export interface ScatterChartProSlots extends Omit<ScatterChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
9
9
|
export interface ScatterChartProSlotProps extends Omit<ScatterChartSlotProps, 'toolbar' | 'tooltip'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {
|
|
@@ -13,7 +13,7 @@ export interface ScatterChartProSlotProps extends Omit<ScatterChartSlotProps, 't
|
|
|
13
13
|
*/
|
|
14
14
|
tooltip?: Partial<ChartsTooltipProps<'item' | 'none'>>;
|
|
15
15
|
}
|
|
16
|
-
export interface ScatterChartProProps extends Omit<ScatterChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<ChartContainerProProps<'scatter',
|
|
16
|
+
export interface ScatterChartProProps extends Omit<ScatterChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<ChartContainerProProps<'scatter', ScatterChartProPluginSignatures>, 'series' | 'plugins' | 'seriesConfig' | 'onItemClick' | 'slots' | 'slotProps' | 'experimentalFeatures' | 'highlightedAxis' | 'onHighlightedAxisChange'> {
|
|
17
17
|
/**
|
|
18
18
|
* Overridable component slots.
|
|
19
19
|
* @default {}
|
|
@@ -134,6 +134,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
134
134
|
* @default false
|
|
135
135
|
*/
|
|
136
136
|
disableVoronoi: _propTypes.default.bool,
|
|
137
|
+
enableKeyboardNavigation: _propTypes.default.bool,
|
|
137
138
|
/**
|
|
138
139
|
* Option to display a cartesian grid in the background.
|
|
139
140
|
*/
|
|
@@ -217,6 +218,15 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
217
218
|
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
218
219
|
*/
|
|
219
220
|
onZoomChange: _propTypes.default.func,
|
|
221
|
+
/**
|
|
222
|
+
* The type of renderer to use for the scatter plot.
|
|
223
|
+
* - `svg-single`: Renders every scatter item in a `<circle />` element.
|
|
224
|
+
* - `svg-batch`: Batch renders scatter items in `<path />` elements for better performance with large datasets, at the cost of some limitations.
|
|
225
|
+
* Read more: https://mui.com/x/react-charts/scatter/#performance
|
|
226
|
+
*
|
|
227
|
+
* @default 'svg-single'
|
|
228
|
+
*/
|
|
229
|
+
renderer: _propTypes.default.oneOf(['svg-batch', 'svg-single']),
|
|
220
230
|
/**
|
|
221
231
|
* The series to display in the scatter chart.
|
|
222
232
|
* An array of [[ScatterSeries]] objects.
|
|
@@ -246,10 +256,11 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
246
256
|
theme: _propTypes.default.oneOf(['dark', 'light']),
|
|
247
257
|
title: _propTypes.default.string,
|
|
248
258
|
/**
|
|
249
|
-
* Defines the
|
|
259
|
+
* Defines the maximum distance between a scatter point and the pointer that triggers the interaction.
|
|
260
|
+
* If set to `'item'`, the radius is the `markerSize`.
|
|
250
261
|
* If `undefined`, the radius is assumed to be infinite.
|
|
251
262
|
*/
|
|
252
|
-
voronoiMaxRadius: _propTypes.default.number,
|
|
263
|
+
voronoiMaxRadius: _propTypes.default.oneOfType([_propTypes.default.oneOf(['item']), _propTypes.default.number]),
|
|
253
264
|
/**
|
|
254
265
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
255
266
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature,
|
|
1
|
+
import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartClosestPointSignature, UseChartKeyboardNavigationSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
2
2
|
import { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
3
|
import { UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
|
|
4
|
-
export type
|
|
5
|
-
export declare const SCATTER_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<
|
|
4
|
+
export type ScatterChartProPluginSignatures = [UseChartZAxisSignature, UseChartCartesianAxisSignature<'scatter'>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartClosestPointSignature, UseChartKeyboardNavigationSignature, UseChartProZoomSignature, UseChartProExportSignature];
|
|
5
|
+
export declare const SCATTER_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<ScatterChartProPluginSignatures>;
|
|
@@ -7,4 +7,4 @@ exports.SCATTER_CHART_PRO_PLUGINS = void 0;
|
|
|
7
7
|
var _internals = require("@mui/x-charts/internals");
|
|
8
8
|
var _useChartProExport = require("../internals/plugins/useChartProExport");
|
|
9
9
|
var _useChartProZoom = require("../internals/plugins/useChartProZoom");
|
|
10
|
-
const SCATTER_CHART_PRO_PLUGINS = exports.SCATTER_CHART_PRO_PLUGINS = [_internals.useChartZAxis, _internals.useChartCartesianAxis, _internals.useChartInteraction, _internals.useChartHighlight, _internals.
|
|
10
|
+
const SCATTER_CHART_PRO_PLUGINS = exports.SCATTER_CHART_PRO_PLUGINS = [_internals.useChartZAxis, _internals.useChartCartesianAxis, _internals.useChartInteraction, _internals.useChartHighlight, _internals.useChartClosestPoint, _internals.useChartKeyboardNavigation, _useChartProZoom.useChartProZoom, _useChartProExport.useChartProExport];
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from "./ScatterChartPro.js";
|
|
1
|
+
export * from "./ScatterChartPro.js";
|
|
2
|
+
export * from "./ScatterChartPro.plugins.js";
|
package/ScatterChartPro/index.js
CHANGED
|
@@ -13,4 +13,15 @@ Object.keys(_ScatterChartPro).forEach(function (key) {
|
|
|
13
13
|
return _ScatterChartPro[key];
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
+
});
|
|
17
|
+
var _ScatterChartPro2 = require("./ScatterChartPro.plugins");
|
|
18
|
+
Object.keys(_ScatterChartPro2).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _ScatterChartPro2[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _ScatterChartPro2[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
16
27
|
});
|
package/context/ChartProApi.d.ts
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { ChartAnyPluginSignature, ChartPublicAPI } from '@mui/x-charts/internals';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { HeatmapPluginSignatures } from "../Heatmap/Heatmap.plugins.js";
|
|
3
|
+
import { LineChartProPluginSignatures } from "../LineChartPro/LineChartPro.plugins.js";
|
|
4
|
+
import { ScatterChartProPluginSignatures } from "../ScatterChartPro/ScatterChartPro.plugins.js";
|
|
5
|
+
import { BarChartProPluginSignatures } from "../BarChartPro/BarChartPro.plugins.js";
|
|
6
6
|
import { AllPluginSignatures, DefaultPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { FunnelChartPluginSignatures } from "../FunnelChart/FunnelChart.plugins.js";
|
|
8
|
+
import { RadarChartProPluginSignatures } from "../RadarChartPro/RadarChartPro.plugins.js";
|
|
9
9
|
import { PieChartProPluginSignatures } from "../PieChartPro/PieChartPro.plugins.js";
|
|
10
|
+
import { SankeyChartPluginSignatures } from "../SankeyChart/SankeyChart.plugins.js";
|
|
10
11
|
export type ProPluginsPerSeriesType = {
|
|
11
|
-
heatmap:
|
|
12
|
-
line:
|
|
13
|
-
scatter:
|
|
14
|
-
bar:
|
|
15
|
-
funnel:
|
|
16
|
-
radar:
|
|
12
|
+
heatmap: HeatmapPluginSignatures;
|
|
13
|
+
line: LineChartProPluginSignatures;
|
|
14
|
+
scatter: ScatterChartProPluginSignatures;
|
|
15
|
+
bar: BarChartProPluginSignatures;
|
|
16
|
+
funnel: FunnelChartPluginSignatures;
|
|
17
|
+
radar: RadarChartProPluginSignatures;
|
|
17
18
|
pie: PieChartProPluginSignatures;
|
|
19
|
+
sankey: SankeyChartPluginSignatures;
|
|
18
20
|
composition: DefaultPluginSignatures;
|
|
19
21
|
};
|
|
20
22
|
/**
|
|
@@ -3,10 +3,10 @@ import { BarChartProps, BarChartSlotProps, BarChartSlots } from '@mui/x-charts/B
|
|
|
3
3
|
import { ChartsToolbarProSlotProps, ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
4
4
|
import { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
5
5
|
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
6
|
-
import {
|
|
6
|
+
import { BarChartProPluginSignatures } from "./BarChartPro.plugins.js";
|
|
7
7
|
export interface BarChartProSlots extends Omit<BarChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
8
8
|
export interface BarChartProSlotProps extends Omit<BarChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
9
|
-
export interface BarChartProProps extends Omit<BarChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<ChartContainerProProps<'bar',
|
|
9
|
+
export interface BarChartProProps extends Omit<BarChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<ChartContainerProProps<'bar', BarChartProPluginSignatures>, 'series' | 'plugins' | 'seriesConfig' | 'slots' | 'slotProps' | 'experimentalFeatures'> {
|
|
10
10
|
/**
|
|
11
11
|
* Overridable component slots.
|
|
12
12
|
* @default {}
|
|
@@ -136,6 +136,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
136
136
|
* @default false
|
|
137
137
|
*/
|
|
138
138
|
disableAxisListener: PropTypes.bool,
|
|
139
|
+
enableKeyboardNavigation: PropTypes.bool,
|
|
139
140
|
/**
|
|
140
141
|
* Option to display a cartesian grid in the background.
|
|
141
142
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
1
|
+
import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
2
2
|
import { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
3
|
import { UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
|
|
4
|
-
export type
|
|
5
|
-
export declare const BAR_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<
|
|
4
|
+
export type BarChartProPluginSignatures = [UseChartZAxisSignature, UseChartCartesianAxisSignature<'bar'>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartProZoomSignature, UseChartProExportSignature];
|
|
5
|
+
export declare const BAR_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<BarChartProPluginSignatures>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight } from '@mui/x-charts/internals';
|
|
1
|
+
import { useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartKeyboardNavigation } from '@mui/x-charts/internals';
|
|
2
2
|
import { useChartProExport } from "../internals/plugins/useChartProExport/index.js";
|
|
3
3
|
import { useChartProZoom } from "../internals/plugins/useChartProZoom/index.js";
|
|
4
|
-
export const BAR_CHART_PRO_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartProZoom, useChartProExport];
|
|
4
|
+
export const BAR_CHART_PRO_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartKeyboardNavigation, useChartProZoom, useChartProExport];
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from "./BarChartPro.js";
|
|
1
|
+
export * from "./BarChartPro.js";
|
|
2
|
+
export * from "./BarChartPro.plugins.js";
|
package/esm/BarChartPro/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from "./BarChartPro.js";
|
|
1
|
+
export * from "./BarChartPro.js";
|
|
2
|
+
export * from "./BarChartPro.plugins.js";
|
|
@@ -11,7 +11,7 @@ import { defaultSlotsMaterial } from "../internals/material/index.js";
|
|
|
11
11
|
import { DEFAULT_PLUGINS } from "../internals/plugins/allPlugins.js";
|
|
12
12
|
import { useChartDataProviderProProps } from "./useChartDataProviderProProps.js";
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
const releaseInfo = "
|
|
14
|
+
const releaseInfo = "MTc1ODc1MTIwMDAwMA==";
|
|
15
15
|
const packageIdentifier = 'x-charts-pro';
|
|
16
16
|
/**
|
|
17
17
|
* Orchestrates the data providers for the chart components and hooks.
|
|
@@ -38,7 +38,7 @@ export const ChartAxisZoomSliderThumb = /*#__PURE__*/React.forwardRef(function C
|
|
|
38
38
|
rx = 4,
|
|
39
39
|
ry = 4
|
|
40
40
|
} = _ref,
|
|
41
|
-
|
|
41
|
+
other = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
42
42
|
const classes = useUtilityClasses({
|
|
43
43
|
onMove,
|
|
44
44
|
orientation,
|
|
@@ -80,6 +80,6 @@ export const ChartAxisZoomSliderThumb = /*#__PURE__*/React.forwardRef(function C
|
|
|
80
80
|
ref: ref,
|
|
81
81
|
rx: rx,
|
|
82
82
|
ry: ry
|
|
83
|
-
},
|
|
83
|
+
}, other));
|
|
84
84
|
});
|
|
85
85
|
if (process.env.NODE_ENV !== "production") ChartAxisZoomSliderThumb.displayName = "ChartAxisZoomSliderThumb";
|
|
@@ -7,9 +7,9 @@ import { FunnelSeriesType } from "./funnel.types.js";
|
|
|
7
7
|
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
8
8
|
import { FunnelChartSlotExtension } from "./funnelSlots.types.js";
|
|
9
9
|
import { CategoryAxis } from "./categoryAxis.types.js";
|
|
10
|
-
import {
|
|
10
|
+
import { FunnelChartPluginSignatures } from "./FunnelChart.plugins.js";
|
|
11
11
|
export type FunnelSeries = MakeOptional<FunnelSeriesType, 'type'>;
|
|
12
|
-
export interface FunnelChartProps extends Omit<ChartContainerProProps<'funnel',
|
|
12
|
+
export interface FunnelChartProps extends Omit<ChartContainerProProps<'funnel', FunnelChartPluginSignatures>, 'series' | 'plugins' | 'zAxis' | 'zoom' | 'onZoomChange' | 'dataset' | 'yAxis' | 'xAxis' | 'rotationAxis' | 'radiusAxis' | 'slots' | 'slotProps' | 'experimentalFeatures'>, Omit<FunnelPlotProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'>, FunnelChartSlotExtension {
|
|
13
13
|
/**
|
|
14
14
|
* The series to display in the funnel chart.
|
|
15
15
|
* An array of [[FunnelSeries]] objects.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConvertSignaturesIntoPlugins, UseChartHighlightSignature, UseChartInteractionSignature } from '@mui/x-charts/internals';
|
|
2
2
|
import { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
3
|
import { UseChartFunnelAxisSignature } from "./funnelAxisPlugin/useChartFunnelAxis.types.js";
|
|
4
|
-
export type
|
|
5
|
-
export declare const FUNNEL_CHART_PLUGINS: ConvertSignaturesIntoPlugins<
|
|
4
|
+
export type FunnelChartPluginSignatures = [UseChartFunnelAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProExportSignature];
|
|
5
|
+
export declare const FUNNEL_CHART_PLUGINS: ConvertSignaturesIntoPlugins<FunnelChartPluginSignatures>;
|