@mui/x-charts-pro 8.22.1 → 8.24.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.js +39 -0
- package/BarChartPro/BarChartPro.plugins.d.ts +2 -2
- package/BarChartPro/BarChartPro.plugins.js +1 -1
- package/CHANGELOG.md +211 -0
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +2 -1
- package/ChartDataProviderPro/ChartDataProviderPro.js +5 -1
- package/ChartDataProviderPro/index.d.ts +1 -1
- package/ChartDataProviderPro/index.js +7 -11
- package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +1 -0
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js +4 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +2 -3
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js +6 -22
- package/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.js +4 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +1 -0
- package/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
- package/ChartZoomSlider/internals/previews/LineAreaPreviewPlot.d.ts +4 -0
- package/ChartZoomSlider/internals/previews/LineAreaPreviewPlot.js +22 -0
- package/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +2 -2
- package/ChartZoomSlider/internals/previews/PreviewPlot.types.d.ts +4 -0
- package/ChartZoomSlider/internals/seriesPreviewPlotMap.d.ts +3 -0
- package/ChartZoomSlider/internals/seriesPreviewPlotMap.js +10 -0
- package/FunnelChart/FunnelChart.js +30 -0
- package/FunnelChart/FunnelChart.plugins.d.ts +2 -2
- package/FunnelChart/FunnelChart.plugins.js +1 -1
- package/FunnelChart/FunnelSection.d.ts +1 -1
- package/FunnelChart/FunnelSection.js +4 -1
- package/FunnelChart/seriesConfig/index.d.ts +1 -1
- package/FunnelChart/seriesConfig/index.js +3 -1
- package/FunnelChart/seriesConfig/legend.js +6 -3
- package/Heatmap/Heatmap.d.ts +2 -2
- package/Heatmap/Heatmap.js +109 -5
- package/Heatmap/Heatmap.plugins.d.ts +3 -2
- package/Heatmap/Heatmap.plugins.js +2 -1
- package/Heatmap/HeatmapItem.d.ts +10 -1
- package/Heatmap/HeatmapItem.js +3 -9
- package/Heatmap/HeatmapPlot.js +11 -1
- package/Heatmap/index.d.ts +1 -0
- package/Heatmap/seriesConfig/index.js +3 -1
- package/LineChartPro/LineChartPro.js +30 -0
- package/LineChartPro/LineChartPro.plugins.d.ts +2 -2
- package/LineChartPro/LineChartPro.plugins.js +1 -1
- package/PieChartPro/PieChartPro.js +35 -5
- package/PieChartPro/PieChartPro.plugins.d.ts +2 -2
- package/RadarChartPro/RadarChartPro.js +30 -0
- package/RadarChartPro/RadarChartPro.plugins.d.ts +2 -2
- package/RadarChartPro/RadarChartPro.plugins.js +1 -1
- package/SankeyChart/SankeyPlot.js +4 -1
- package/SankeyChart/seriesConfig/identifierSerializer.d.ts +3 -0
- package/SankeyChart/seriesConfig/identifierSerializer.js +14 -0
- package/SankeyChart/seriesConfig/index.js +3 -1
- package/ScatterChartPro/ScatterChartPro.js +30 -0
- package/ScatterChartPro/ScatterChartPro.plugins.d.ts +2 -2
- package/ScatterChartPro/ScatterChartPro.plugins.js +1 -1
- package/esm/BarChartPro/BarChartPro.js +39 -0
- package/esm/BarChartPro/BarChartPro.plugins.d.ts +2 -2
- package/esm/BarChartPro/BarChartPro.plugins.js +2 -2
- package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +2 -1
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +5 -2
- package/esm/ChartDataProviderPro/index.d.ts +1 -1
- package/esm/ChartDataProviderPro/index.js +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +1 -0
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js +4 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +2 -3
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js +6 -22
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.js +4 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +1 -0
- package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/previews/LineAreaPreviewPlot.d.ts +4 -0
- package/esm/ChartZoomSlider/internals/previews/LineAreaPreviewPlot.js +15 -0
- package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +2 -2
- package/esm/ChartZoomSlider/internals/previews/PreviewPlot.types.d.ts +4 -0
- package/esm/ChartZoomSlider/internals/seriesPreviewPlotMap.d.ts +3 -0
- package/esm/ChartZoomSlider/internals/seriesPreviewPlotMap.js +4 -0
- package/esm/FunnelChart/FunnelChart.js +30 -0
- package/esm/FunnelChart/FunnelChart.plugins.d.ts +2 -2
- package/esm/FunnelChart/FunnelChart.plugins.js +2 -2
- package/esm/FunnelChart/FunnelSection.d.ts +1 -1
- package/esm/FunnelChart/FunnelSection.js +4 -1
- package/esm/FunnelChart/seriesConfig/index.d.ts +1 -1
- package/esm/FunnelChart/seriesConfig/index.js +3 -1
- package/esm/FunnelChart/seriesConfig/legend.js +6 -3
- package/esm/Heatmap/Heatmap.d.ts +2 -2
- package/esm/Heatmap/Heatmap.js +109 -5
- package/esm/Heatmap/Heatmap.plugins.d.ts +3 -2
- package/esm/Heatmap/Heatmap.plugins.js +3 -2
- package/esm/Heatmap/HeatmapItem.d.ts +10 -1
- package/esm/Heatmap/HeatmapItem.js +3 -9
- package/esm/Heatmap/HeatmapPlot.js +11 -1
- package/esm/Heatmap/index.d.ts +1 -0
- package/esm/Heatmap/seriesConfig/index.js +3 -1
- package/esm/LineChartPro/LineChartPro.js +30 -0
- package/esm/LineChartPro/LineChartPro.plugins.d.ts +2 -2
- package/esm/LineChartPro/LineChartPro.plugins.js +2 -2
- package/esm/PieChartPro/PieChartPro.js +35 -5
- package/esm/PieChartPro/PieChartPro.plugins.d.ts +2 -2
- package/esm/RadarChartPro/RadarChartPro.js +30 -0
- package/esm/RadarChartPro/RadarChartPro.plugins.d.ts +2 -2
- package/esm/RadarChartPro/RadarChartPro.plugins.js +2 -2
- package/esm/SankeyChart/SankeyPlot.js +4 -1
- package/esm/SankeyChart/seriesConfig/identifierSerializer.d.ts +3 -0
- package/esm/SankeyChart/seriesConfig/identifierSerializer.js +8 -0
- package/esm/SankeyChart/seriesConfig/index.js +3 -1
- package/esm/ScatterChartPro/ScatterChartPro.js +30 -0
- package/esm/ScatterChartPro/ScatterChartPro.plugins.d.ts +2 -2
- package/esm/ScatterChartPro/ScatterChartPro.plugins.js +2 -2
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +4 -1
- package/esm/internals/index.js +3 -1
- package/esm/internals/plugins/allPlugins.d.ts +5 -5
- package/esm/internals/plugins/allPlugins.js +3 -3
- package/index.js +1 -1
- package/internals/index.d.ts +4 -1
- package/internals/index.js +15 -1
- package/internals/plugins/allPlugins.d.ts +5 -5
- package/internals/plugins/allPlugins.js +2 -2
- package/package.json +6 -6
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.funnelSeriesConfig = void 0;
|
|
8
|
+
var _internals = require("@mui/x-charts/internals");
|
|
8
9
|
var _extremums = require("./extremums");
|
|
9
10
|
var _seriesProcessor = _interopRequireDefault(require("./seriesProcessor"));
|
|
10
11
|
var _getColor = _interopRequireDefault(require("./getColor"));
|
|
@@ -20,5 +21,6 @@ const funnelSeriesConfig = exports.funnelSeriesConfig = {
|
|
|
20
21
|
tooltipItemPositionGetter: _tooltipPosition.default,
|
|
21
22
|
xExtremumGetter: _extremums.getExtremumX,
|
|
22
23
|
yExtremumGetter: _extremums.getExtremumY,
|
|
23
|
-
getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default
|
|
24
|
+
getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default,
|
|
25
|
+
identifierSerializer: _internals.identifierSerializerSeriesIdDataIndex
|
|
24
26
|
};
|
|
@@ -11,16 +11,19 @@ const legendGetter = params => {
|
|
|
11
11
|
series
|
|
12
12
|
} = params;
|
|
13
13
|
return seriesOrder.reduce((acc, seriesId) => {
|
|
14
|
-
series[seriesId].data.forEach(item => {
|
|
14
|
+
series[seriesId].data.forEach((item, dataIndex) => {
|
|
15
15
|
const formattedLabel = (0, _internals.getLabel)(item.label, 'legend');
|
|
16
16
|
if (formattedLabel === undefined) {
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
+
const id = item.id ?? dataIndex;
|
|
19
20
|
acc.push({
|
|
21
|
+
type: 'funnel',
|
|
20
22
|
markType: item.labelMarkType ?? series[seriesId].labelMarkType,
|
|
21
23
|
seriesId,
|
|
22
|
-
id
|
|
23
|
-
itemId:
|
|
24
|
+
id,
|
|
25
|
+
itemId: id,
|
|
26
|
+
dataIndex,
|
|
24
27
|
color: item.color,
|
|
25
28
|
label: formattedLabel
|
|
26
29
|
});
|
package/Heatmap/Heatmap.d.ts
CHANGED
|
@@ -34,13 +34,13 @@ export interface HeatmapProps extends Omit<ChartContainerProProps<'heatmap', Hea
|
|
|
34
34
|
* If not provided, a default axis config is used.
|
|
35
35
|
* An array of [[AxisConfig]] objects.
|
|
36
36
|
*/
|
|
37
|
-
xAxis: Readonly<
|
|
37
|
+
xAxis: Readonly<MakeOptional<XAxis<'band'>, 'scaleType'>[]>;
|
|
38
38
|
/**
|
|
39
39
|
* The configuration of the y-axes.
|
|
40
40
|
* If not provided, a default axis config is used.
|
|
41
41
|
* An array of [[AxisConfig]] objects.
|
|
42
42
|
*/
|
|
43
|
-
yAxis: Readonly<
|
|
43
|
+
yAxis: Readonly<MakeOptional<YAxis<'band'>, 'scaleType'>[]>;
|
|
44
44
|
/**
|
|
45
45
|
* The series to display in the bar chart.
|
|
46
46
|
* An array of [[HeatmapSeries]] objects.
|
package/Heatmap/Heatmap.js
CHANGED
|
@@ -20,6 +20,7 @@ var _ChartsClipPath = require("@mui/x-charts/ChartsClipPath");
|
|
|
20
20
|
var _ChartsOverlay = require("@mui/x-charts/ChartsOverlay");
|
|
21
21
|
var _constants = require("@mui/x-charts/constants");
|
|
22
22
|
var _ChartsLegend = require("@mui/x-charts/ChartsLegend");
|
|
23
|
+
var _ChartsBrushOverlay = require("@mui/x-charts/ChartsBrushOverlay");
|
|
23
24
|
var _HeatmapPlot = require("./HeatmapPlot");
|
|
24
25
|
var _seriesConfig = require("./seriesConfig");
|
|
25
26
|
var _HeatmapTooltip = require("./HeatmapTooltip");
|
|
@@ -155,7 +156,7 @@ const Heatmap = exports.Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap
|
|
|
155
156
|
slotProps: slotProps
|
|
156
157
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, {
|
|
157
158
|
id: clipPathId
|
|
158
|
-
}), children]
|
|
159
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsBrushOverlay.ChartsBrushOverlay, {}), children]
|
|
159
160
|
}), !loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, slotProps?.tooltip))]
|
|
160
161
|
}))
|
|
161
162
|
});
|
|
@@ -169,9 +170,19 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
169
170
|
apiRef: _propTypes.default.shape({
|
|
170
171
|
current: _propTypes.default.shape({
|
|
171
172
|
exportAsImage: _propTypes.default.func.isRequired,
|
|
172
|
-
exportAsPrint: _propTypes.default.func.isRequired
|
|
173
|
+
exportAsPrint: _propTypes.default.func.isRequired,
|
|
174
|
+
setAxisZoomData: _propTypes.default.func.isRequired,
|
|
175
|
+
setZoomData: _propTypes.default.func.isRequired
|
|
173
176
|
})
|
|
174
177
|
}),
|
|
178
|
+
/**
|
|
179
|
+
* Configuration for the brush interaction.
|
|
180
|
+
*/
|
|
181
|
+
brushConfig: _propTypes.default.shape({
|
|
182
|
+
enabled: _propTypes.default.bool,
|
|
183
|
+
preventHighlight: _propTypes.default.bool,
|
|
184
|
+
preventTooltip: _propTypes.default.bool
|
|
185
|
+
}),
|
|
175
186
|
className: _propTypes.default.string,
|
|
176
187
|
/**
|
|
177
188
|
* Color palette used to colorize multiple series.
|
|
@@ -211,6 +222,15 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
211
222
|
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
212
223
|
*/
|
|
213
224
|
id: _propTypes.default.string,
|
|
225
|
+
/**
|
|
226
|
+
* The list of zoom data related to each axis.
|
|
227
|
+
* Used to initialize the zoom in a specific configuration without controlling it.
|
|
228
|
+
*/
|
|
229
|
+
initialZoom: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
230
|
+
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
|
|
231
|
+
end: _propTypes.default.number.isRequired,
|
|
232
|
+
start: _propTypes.default.number.isRequired
|
|
233
|
+
})),
|
|
214
234
|
/**
|
|
215
235
|
* If `true`, a loading overlay is displayed.
|
|
216
236
|
* @default false
|
|
@@ -245,6 +265,12 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
245
265
|
* @param {HighlightItemData | null} highlightedItem The newly highlighted item.
|
|
246
266
|
*/
|
|
247
267
|
onHighlightChange: _propTypes.default.func,
|
|
268
|
+
/**
|
|
269
|
+
* Callback fired when the zoom has changed.
|
|
270
|
+
*
|
|
271
|
+
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
272
|
+
*/
|
|
273
|
+
onZoomChange: _propTypes.default.func,
|
|
248
274
|
/**
|
|
249
275
|
* The series to display in the bar chart.
|
|
250
276
|
* An array of [[HeatmapSeries]] objects.
|
|
@@ -346,7 +372,22 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
346
372
|
tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
347
373
|
tickSize: _propTypes.default.number,
|
|
348
374
|
tickSpacing: _propTypes.default.number,
|
|
349
|
-
valueFormatter: _propTypes.default.func
|
|
375
|
+
valueFormatter: _propTypes.default.func,
|
|
376
|
+
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
377
|
+
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
378
|
+
maxEnd: _propTypes.default.number,
|
|
379
|
+
maxSpan: _propTypes.default.number,
|
|
380
|
+
minSpan: _propTypes.default.number,
|
|
381
|
+
minStart: _propTypes.default.number,
|
|
382
|
+
panning: _propTypes.default.bool,
|
|
383
|
+
slider: _propTypes.default.shape({
|
|
384
|
+
enabled: _propTypes.default.bool,
|
|
385
|
+
preview: _propTypes.default.bool,
|
|
386
|
+
showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
|
|
387
|
+
size: _propTypes.default.number
|
|
388
|
+
}),
|
|
389
|
+
step: _propTypes.default.number
|
|
390
|
+
}), _propTypes.default.bool])
|
|
350
391
|
})).isRequired,
|
|
351
392
|
/**
|
|
352
393
|
* The configuration of the y-axes.
|
|
@@ -411,7 +452,22 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
411
452
|
tickSize: _propTypes.default.number,
|
|
412
453
|
tickSpacing: _propTypes.default.number,
|
|
413
454
|
valueFormatter: _propTypes.default.func,
|
|
414
|
-
width: _propTypes.default.number
|
|
455
|
+
width: _propTypes.default.number,
|
|
456
|
+
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
457
|
+
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
458
|
+
maxEnd: _propTypes.default.number,
|
|
459
|
+
maxSpan: _propTypes.default.number,
|
|
460
|
+
minSpan: _propTypes.default.number,
|
|
461
|
+
minStart: _propTypes.default.number,
|
|
462
|
+
panning: _propTypes.default.bool,
|
|
463
|
+
slider: _propTypes.default.shape({
|
|
464
|
+
enabled: _propTypes.default.bool,
|
|
465
|
+
preview: _propTypes.default.bool,
|
|
466
|
+
showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
|
|
467
|
+
size: _propTypes.default.number
|
|
468
|
+
}),
|
|
469
|
+
step: _propTypes.default.number
|
|
470
|
+
}), _propTypes.default.bool])
|
|
415
471
|
})).isRequired,
|
|
416
472
|
/**
|
|
417
473
|
* The configuration of the z-axes.
|
|
@@ -437,5 +493,53 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
437
493
|
id: _propTypes.default.string,
|
|
438
494
|
max: _propTypes.default.number,
|
|
439
495
|
min: _propTypes.default.number
|
|
440
|
-
}))
|
|
496
|
+
})),
|
|
497
|
+
/**
|
|
498
|
+
* The list of zoom data related to each axis.
|
|
499
|
+
*/
|
|
500
|
+
zoomData: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
501
|
+
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
|
|
502
|
+
end: _propTypes.default.number.isRequired,
|
|
503
|
+
start: _propTypes.default.number.isRequired
|
|
504
|
+
})),
|
|
505
|
+
/**
|
|
506
|
+
* Configuration for zoom interactions.
|
|
507
|
+
*/
|
|
508
|
+
zoomInteractionConfig: _propTypes.default.shape({
|
|
509
|
+
pan: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['drag', 'pressAndDrag', 'wheel']), _propTypes.default.shape({
|
|
510
|
+
pointerMode: _propTypes.default.oneOf(['mouse', 'touch']),
|
|
511
|
+
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
512
|
+
type: _propTypes.default.oneOf(['drag']).isRequired
|
|
513
|
+
}), _propTypes.default.shape({
|
|
514
|
+
pointerMode: _propTypes.default.oneOf(['mouse', 'touch']),
|
|
515
|
+
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
516
|
+
type: _propTypes.default.oneOf(['pressAndDrag']).isRequired
|
|
517
|
+
}), _propTypes.default.shape({
|
|
518
|
+
allowedDirection: _propTypes.default.oneOf(['x', 'xy', 'y']),
|
|
519
|
+
pointerMode: _propTypes.default.any,
|
|
520
|
+
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
521
|
+
type: _propTypes.default.oneOf(['wheel']).isRequired
|
|
522
|
+
})]).isRequired),
|
|
523
|
+
zoom: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['brush', 'doubleTapReset', 'pinch', 'tapAndDrag', 'wheel']), _propTypes.default.shape({
|
|
524
|
+
pointerMode: _propTypes.default.any,
|
|
525
|
+
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
526
|
+
type: _propTypes.default.oneOf(['wheel']).isRequired
|
|
527
|
+
}), _propTypes.default.shape({
|
|
528
|
+
pointerMode: _propTypes.default.any,
|
|
529
|
+
requiredKeys: _propTypes.default.array,
|
|
530
|
+
type: _propTypes.default.oneOf(['pinch']).isRequired
|
|
531
|
+
}), _propTypes.default.shape({
|
|
532
|
+
pointerMode: _propTypes.default.oneOf(['mouse', 'touch']),
|
|
533
|
+
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
534
|
+
type: _propTypes.default.oneOf(['tapAndDrag']).isRequired
|
|
535
|
+
}), _propTypes.default.shape({
|
|
536
|
+
pointerMode: _propTypes.default.oneOf(['mouse', 'touch']),
|
|
537
|
+
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
538
|
+
type: _propTypes.default.oneOf(['doubleTapReset']).isRequired
|
|
539
|
+
}), _propTypes.default.shape({
|
|
540
|
+
pointerMode: _propTypes.default.any,
|
|
541
|
+
requiredKeys: _propTypes.default.array,
|
|
542
|
+
type: _propTypes.default.oneOf(['brush']).isRequired
|
|
543
|
+
})]).isRequired)
|
|
544
|
+
})
|
|
441
545
|
} : void 0;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type UseChartZAxisSignature, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartHighlightSignature, type ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
1
|
+
import { type UseChartZAxisSignature, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartHighlightSignature, type ConvertSignaturesIntoPlugins, type UseChartBrushSignature } from '@mui/x-charts/internals';
|
|
2
2
|
import { type UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
-
|
|
3
|
+
import { type UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
|
|
4
|
+
export type HeatmapPluginSignatures = [UseChartZAxisSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'heatmap'>, UseChartHighlightSignature, UseChartProExportSignature, UseChartBrushSignature, UseChartProZoomSignature];
|
|
4
5
|
export declare const HEATMAP_PLUGINS: ConvertSignaturesIntoPlugins<HeatmapPluginSignatures>;
|
|
@@ -6,4 +6,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.HEATMAP_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 HEATMAP_PLUGINS = exports.HEATMAP_PLUGINS = [_internals.useChartZAxis, _internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartCartesianAxis, _internals.useChartHighlight, _useChartProExport.useChartProExport, _internals.useChartBrush, _useChartProZoom.useChartProZoom];
|
package/Heatmap/HeatmapItem.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface HeatmapItemSlots {
|
|
|
9
9
|
cell?: React.ElementType;
|
|
10
10
|
}
|
|
11
11
|
export interface HeatmapItemSlotProps {
|
|
12
|
-
cell?: Partial<
|
|
12
|
+
cell?: Partial<HeatmapCellProps>;
|
|
13
13
|
}
|
|
14
14
|
export interface HeatmapItemProps {
|
|
15
15
|
dataIndex: number;
|
|
@@ -20,6 +20,8 @@ export interface HeatmapItemProps {
|
|
|
20
20
|
x: number;
|
|
21
21
|
y: number;
|
|
22
22
|
color: string;
|
|
23
|
+
isHighlighted?: boolean;
|
|
24
|
+
isFaded?: boolean;
|
|
23
25
|
/**
|
|
24
26
|
* The props used for each component slot.
|
|
25
27
|
* @default {}
|
|
@@ -39,6 +41,13 @@ export interface HeatmapItemOwnerState {
|
|
|
39
41
|
isHighlighted: boolean;
|
|
40
42
|
classes?: Partial<HeatmapClasses>;
|
|
41
43
|
}
|
|
44
|
+
export interface HeatmapCellProps extends React.ComponentPropsWithRef<'rect'> {
|
|
45
|
+
x: number;
|
|
46
|
+
y: number;
|
|
47
|
+
width: number;
|
|
48
|
+
height: number;
|
|
49
|
+
ownerState: HeatmapItemOwnerState;
|
|
50
|
+
}
|
|
42
51
|
/**
|
|
43
52
|
* @ignore - internal component.
|
|
44
53
|
*/
|
package/Heatmap/HeatmapItem.js
CHANGED
|
@@ -13,11 +13,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
var _styles = require("@mui/material/styles");
|
|
14
14
|
var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
|
|
15
15
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
16
|
-
var _hooks = require("@mui/x-charts/hooks");
|
|
17
16
|
var _internals = require("@mui/x-charts/internals");
|
|
18
17
|
var _heatmapClasses = require("./heatmapClasses");
|
|
19
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const _excluded = ["seriesId", "dataIndex", "color", "value", "slotProps", "slots"];
|
|
19
|
+
const _excluded = ["seriesId", "dataIndex", "color", "value", "isHighlighted", "isFaded", "slotProps", "slots"];
|
|
21
20
|
const HeatmapCell = (0, _styles.styled)('rect', {
|
|
22
21
|
name: 'MuiHeatmap',
|
|
23
22
|
slot: 'Cell',
|
|
@@ -51,6 +50,8 @@ function HeatmapItem(props) {
|
|
|
51
50
|
dataIndex,
|
|
52
51
|
color,
|
|
53
52
|
value,
|
|
53
|
+
isHighlighted = false,
|
|
54
|
+
isFaded = false,
|
|
54
55
|
slotProps = {},
|
|
55
56
|
slots = {}
|
|
56
57
|
} = props,
|
|
@@ -60,13 +61,6 @@ function HeatmapItem(props) {
|
|
|
60
61
|
seriesId,
|
|
61
62
|
dataIndex
|
|
62
63
|
});
|
|
63
|
-
const {
|
|
64
|
-
isFaded,
|
|
65
|
-
isHighlighted
|
|
66
|
-
} = (0, _hooks.useItemHighlighted)({
|
|
67
|
-
seriesId,
|
|
68
|
-
dataIndex
|
|
69
|
-
});
|
|
70
64
|
const ownerState = {
|
|
71
65
|
seriesId,
|
|
72
66
|
dataIndex,
|
package/Heatmap/HeatmapPlot.js
CHANGED
|
@@ -8,14 +8,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.HeatmapPlot = HeatmapPlot;
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _hooks = require("@mui/x-charts/hooks");
|
|
11
|
+
var _internals = require("@mui/x-charts/internals");
|
|
11
12
|
var _useHeatmapSeries = require("../hooks/useHeatmapSeries");
|
|
12
13
|
var _HeatmapItem = require("./HeatmapItem");
|
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
function HeatmapPlot(props) {
|
|
16
|
+
const store = (0, _internals.useStore)();
|
|
15
17
|
const xScale = (0, _hooks.useXScale)();
|
|
16
18
|
const yScale = (0, _hooks.useYScale)();
|
|
17
19
|
const colorScale = (0, _hooks.useZColorScale)();
|
|
18
20
|
const series = (0, _useHeatmapSeries.useHeatmapSeriesContext)();
|
|
21
|
+
const isHighlighted = store.use(_internals.selectorChartsIsHighlightedCallback);
|
|
22
|
+
const isFaded = store.use(_internals.selectorChartsIsFadedCallback);
|
|
19
23
|
const xDomain = xScale.domain();
|
|
20
24
|
const yDomain = yScale.domain();
|
|
21
25
|
if (!series || series.seriesOrder.length === 0) {
|
|
@@ -30,6 +34,10 @@ function HeatmapPlot(props) {
|
|
|
30
34
|
if (x === undefined || y === undefined || !color) {
|
|
31
35
|
return null;
|
|
32
36
|
}
|
|
37
|
+
const item = {
|
|
38
|
+
seriesId: seriesToDisplay.id,
|
|
39
|
+
dataIndex
|
|
40
|
+
};
|
|
33
41
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_HeatmapItem.HeatmapItem, {
|
|
34
42
|
width: xScale.bandwidth(),
|
|
35
43
|
height: yScale.bandwidth(),
|
|
@@ -40,7 +48,9 @@ function HeatmapPlot(props) {
|
|
|
40
48
|
seriesId: series.seriesOrder[0],
|
|
41
49
|
value: value,
|
|
42
50
|
slots: props.slots,
|
|
43
|
-
slotProps: props.slotProps
|
|
51
|
+
slotProps: props.slotProps,
|
|
52
|
+
isHighlighted: isHighlighted(item),
|
|
53
|
+
isFaded: isFaded(item)
|
|
44
54
|
}, `${xIndex}_${yIndex}`);
|
|
45
55
|
})
|
|
46
56
|
});
|
package/Heatmap/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { Heatmap } from "./Heatmap.js";
|
|
2
2
|
export type { HeatmapSeries, HeatmapProps } from "./Heatmap.js";
|
|
3
3
|
export { HeatmapPlot } from "./HeatmapPlot.js";
|
|
4
|
+
export type { HeatmapCellProps } from "./HeatmapItem.js";
|
|
4
5
|
export * from "./HeatmapTooltip/index.js";
|
|
5
6
|
export * from "./Heatmap.plugins.js";
|
|
6
7
|
export * from "./heatmapClasses.js";
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.heatmapSeriesConfig = void 0;
|
|
8
|
+
var _internals = require("@mui/x-charts/internals");
|
|
8
9
|
var _extremums = require("./extremums");
|
|
9
10
|
var _seriesProcessor = _interopRequireDefault(require("./seriesProcessor"));
|
|
10
11
|
var _getColor = _interopRequireDefault(require("./getColor"));
|
|
@@ -19,5 +20,6 @@ const heatmapSeriesConfig = exports.heatmapSeriesConfig = {
|
|
|
19
20
|
tooltipItemPositionGetter: _tooltipPosition.default,
|
|
20
21
|
xExtremumGetter: _extremums.getBaseExtremum,
|
|
21
22
|
yExtremumGetter: _extremums.getBaseExtremum,
|
|
22
|
-
getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default
|
|
23
|
+
getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default,
|
|
24
|
+
identifierSerializer: _internals.identifierSerializerSeriesIdDataIndex
|
|
23
25
|
};
|
|
@@ -166,6 +166,31 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
166
166
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
167
167
|
*/
|
|
168
168
|
height: _propTypes.default.number,
|
|
169
|
+
/**
|
|
170
|
+
* List of hidden series and/or items.
|
|
171
|
+
*
|
|
172
|
+
* Different chart types use different keys.
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```ts
|
|
176
|
+
* [
|
|
177
|
+
* {
|
|
178
|
+
* type: 'pie',
|
|
179
|
+
* seriesId: 'series-1',
|
|
180
|
+
* dataIndex: 3,
|
|
181
|
+
* },
|
|
182
|
+
* {
|
|
183
|
+
* type: 'line',
|
|
184
|
+
* seriesId: 'series-2',
|
|
185
|
+
* }
|
|
186
|
+
* ]
|
|
187
|
+
* ```
|
|
188
|
+
*/
|
|
189
|
+
hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
190
|
+
dataIndex: _propTypes.default.number,
|
|
191
|
+
seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
192
|
+
type: _propTypes.default.oneOf(['line']).isRequired
|
|
193
|
+
})),
|
|
169
194
|
/**
|
|
170
195
|
* If `true`, the legend is not rendered.
|
|
171
196
|
*/
|
|
@@ -232,6 +257,11 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
232
257
|
* @param {null | ChartsAxisData} data The data about the clicked axis and items associated with it.
|
|
233
258
|
*/
|
|
234
259
|
onAxisClick: _propTypes.default.func,
|
|
260
|
+
/**
|
|
261
|
+
* Callback fired when any hidden identifiers change.
|
|
262
|
+
* @param {VisibilityIdentifier[]} hiddenItems The new list of hidden identifiers.
|
|
263
|
+
*/
|
|
264
|
+
onHiddenItemsChange: _propTypes.default.func,
|
|
235
265
|
/**
|
|
236
266
|
* The callback fired when the highlighted item changes.
|
|
237
267
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type UseChartZAxisSignature, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartHighlightSignature, type UseChartKeyboardNavigationSignature, type UseChartBrushSignature, type ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
1
|
+
import { type UseChartZAxisSignature, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartHighlightSignature, type UseChartKeyboardNavigationSignature, type UseChartBrushSignature, type ConvertSignaturesIntoPlugins, type UseChartVisibilityManagerSignature } from '@mui/x-charts/internals';
|
|
2
2
|
import { type UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
3
|
import { type UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
|
|
4
|
-
export type LineChartProPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'line'>, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartProZoomSignature, UseChartProExportSignature];
|
|
4
|
+
export type LineChartProPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'line'>, UseChartHighlightSignature, UseChartVisibilityManagerSignature<'line'>, UseChartKeyboardNavigationSignature, UseChartProZoomSignature, UseChartProExportSignature];
|
|
5
5
|
export declare const LINE_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<LineChartProPluginSignatures>;
|
|
@@ -7,4 +7,4 @@ exports.LINE_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 LINE_CHART_PRO_PLUGINS = exports.LINE_CHART_PRO_PLUGINS = [_internals.useChartZAxis, _internals.useChartBrush, _internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartCartesianAxis, _internals.useChartHighlight, _internals.useChartKeyboardNavigation, _useChartProZoom.useChartProZoom, _useChartProExport.useChartProExport];
|
|
10
|
+
const LINE_CHART_PRO_PLUGINS = exports.LINE_CHART_PRO_PLUGINS = [_internals.useChartZAxis, _internals.useChartBrush, _internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartCartesianAxis, _internals.useChartHighlight, _internals.useChartVisibilityManager, _internals.useChartKeyboardNavigation, _useChartProZoom.useChartProZoom, _useChartProExport.useChartProExport];
|
|
@@ -68,15 +68,15 @@ const PieChartPro = exports.PieChartPro = /*#__PURE__*/React.forwardRef(function
|
|
|
68
68
|
plugins: _PieChartPro2.PIE_CHART_PRO_PLUGINS
|
|
69
69
|
}), ref);
|
|
70
70
|
const Tooltip = slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
|
|
71
|
-
const Toolbar =
|
|
71
|
+
const Toolbar = slots?.toolbar ?? _ChartsToolbarPro.ChartsToolbarPro;
|
|
72
72
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, chartDataProviderProProps, {
|
|
73
73
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, {
|
|
74
|
-
legendPosition:
|
|
75
|
-
legendDirection:
|
|
74
|
+
legendPosition: slotProps?.legend?.position,
|
|
75
|
+
legendDirection: slotProps?.legend?.direction ?? 'vertical',
|
|
76
76
|
sx: sx,
|
|
77
77
|
hideLegend: hideLegend ?? false,
|
|
78
|
-
children: [showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, {}) : null, !hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, {
|
|
79
|
-
direction:
|
|
78
|
+
children: [showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, (0, _extends2.default)({}, slotProps?.toolbar)) : null, !hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, {
|
|
79
|
+
direction: slotProps?.legend?.direction ?? 'vertical',
|
|
80
80
|
slots: slots,
|
|
81
81
|
slotProps: slotProps
|
|
82
82
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
|
|
@@ -124,6 +124,31 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
|
|
|
124
124
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
125
125
|
*/
|
|
126
126
|
height: _propTypes.default.number,
|
|
127
|
+
/**
|
|
128
|
+
* List of hidden series and/or items.
|
|
129
|
+
*
|
|
130
|
+
* Different chart types use different keys.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```ts
|
|
134
|
+
* [
|
|
135
|
+
* {
|
|
136
|
+
* type: 'pie',
|
|
137
|
+
* seriesId: 'series-1',
|
|
138
|
+
* dataIndex: 3,
|
|
139
|
+
* },
|
|
140
|
+
* {
|
|
141
|
+
* type: 'line',
|
|
142
|
+
* seriesId: 'series-2',
|
|
143
|
+
* }
|
|
144
|
+
* ]
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
148
|
+
dataIndex: _propTypes.default.number,
|
|
149
|
+
seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
150
|
+
type: _propTypes.default.oneOf(['pie']).isRequired
|
|
151
|
+
})),
|
|
127
152
|
/**
|
|
128
153
|
* If `true`, the legend is not rendered.
|
|
129
154
|
*/
|
|
@@ -162,6 +187,11 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
|
|
|
162
187
|
right: _propTypes.default.number,
|
|
163
188
|
top: _propTypes.default.number
|
|
164
189
|
})]),
|
|
190
|
+
/**
|
|
191
|
+
* Callback fired when any hidden identifiers change.
|
|
192
|
+
* @param {VisibilityIdentifier[]} hiddenItems The new list of hidden identifiers.
|
|
193
|
+
*/
|
|
194
|
+
onHiddenItemsChange: _propTypes.default.func,
|
|
165
195
|
/**
|
|
166
196
|
* The callback fired when the highlighted item changes.
|
|
167
197
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ConvertSignaturesIntoPlugins, type UseChartHighlightSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartKeyboardNavigationSignature } from '@mui/x-charts/internals';
|
|
1
|
+
import { type ConvertSignaturesIntoPlugins, type UseChartHighlightSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartKeyboardNavigationSignature, type UseChartVisibilityManagerSignature } from '@mui/x-charts/internals';
|
|
2
2
|
import { type UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
-
export type PieChartProPluginSignatures = [UseChartTooltipSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartProExportSignature];
|
|
3
|
+
export type PieChartProPluginSignatures = [UseChartTooltipSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartVisibilityManagerSignature<'pie'>, UseChartKeyboardNavigationSignature, UseChartProExportSignature];
|
|
4
4
|
export declare const PIE_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<PieChartProPluginSignatures>;
|
|
@@ -93,6 +93,31 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
|
|
|
93
93
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
94
94
|
*/
|
|
95
95
|
height: _propTypes.default.number,
|
|
96
|
+
/**
|
|
97
|
+
* List of hidden series and/or items.
|
|
98
|
+
*
|
|
99
|
+
* Different chart types use different keys.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* [
|
|
104
|
+
* {
|
|
105
|
+
* type: 'pie',
|
|
106
|
+
* seriesId: 'series-1',
|
|
107
|
+
* dataIndex: 3,
|
|
108
|
+
* },
|
|
109
|
+
* {
|
|
110
|
+
* type: 'line',
|
|
111
|
+
* seriesId: 'series-2',
|
|
112
|
+
* }
|
|
113
|
+
* ]
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
117
|
+
dataIndex: _propTypes.default.number,
|
|
118
|
+
seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
119
|
+
type: _propTypes.default.oneOf(['radar']).isRequired
|
|
120
|
+
})),
|
|
96
121
|
/**
|
|
97
122
|
* If `true`, the legend is not rendered.
|
|
98
123
|
*/
|
|
@@ -149,6 +174,11 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
|
|
|
149
174
|
* @param {null | ChartsAxisData} data The data about the clicked axis and items associated with it.
|
|
150
175
|
*/
|
|
151
176
|
onAxisClick: _propTypes.default.func,
|
|
177
|
+
/**
|
|
178
|
+
* Callback fired when any hidden identifiers change.
|
|
179
|
+
* @param {VisibilityIdentifier[]} hiddenItems The new list of hidden identifiers.
|
|
180
|
+
*/
|
|
181
|
+
onHiddenItemsChange: _propTypes.default.func,
|
|
152
182
|
/**
|
|
153
183
|
* The callback fired when the highlighted item changes.
|
|
154
184
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ConvertSignaturesIntoPlugins, type UseChartHighlightSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartPolarAxisSignature } from '@mui/x-charts/internals';
|
|
1
|
+
import { type ConvertSignaturesIntoPlugins, type UseChartHighlightSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartPolarAxisSignature, type UseChartVisibilityManagerSignature } from '@mui/x-charts/internals';
|
|
2
2
|
import { type UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
-
export type RadarChartProPluginSignatures = [UseChartTooltipSignature, UseChartInteractionSignature, UseChartPolarAxisSignature, UseChartHighlightSignature, UseChartProExportSignature];
|
|
3
|
+
export type RadarChartProPluginSignatures = [UseChartTooltipSignature, UseChartInteractionSignature, UseChartPolarAxisSignature, UseChartHighlightSignature, UseChartVisibilityManagerSignature<'radar'>, UseChartProExportSignature];
|
|
4
4
|
export declare const RADAR_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<RadarChartProPluginSignatures>;
|
|
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.RADAR_CHART_PRO_PLUGINS = void 0;
|
|
7
7
|
var _internals = require("@mui/x-charts/internals");
|
|
8
8
|
var _useChartProExport = require("../internals/plugins/useChartProExport");
|
|
9
|
-
const RADAR_CHART_PRO_PLUGINS = exports.RADAR_CHART_PRO_PLUGINS = [_internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartPolarAxis, _internals.useChartHighlight, _useChartProExport.useChartProExport];
|
|
9
|
+
const RADAR_CHART_PRO_PLUGINS = exports.RADAR_CHART_PRO_PLUGINS = [_internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartPolarAxis, _internals.useChartHighlight, _internals.useChartVisibilityManager, _useChartProExport.useChartProExport];
|
|
@@ -17,7 +17,10 @@ var _useSankeySeries = require("../hooks/useSankeySeries");
|
|
|
17
17
|
var _sankeyClasses = require("./sankeyClasses");
|
|
18
18
|
var _SankeyNodeLabel = require("./SankeyNodeLabel");
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const SankeyPlotRoot = (0, _styles.styled)('g'
|
|
20
|
+
const SankeyPlotRoot = (0, _styles.styled)('g', {
|
|
21
|
+
slot: 'internal',
|
|
22
|
+
shouldForwardProp: undefined
|
|
23
|
+
})({
|
|
21
24
|
[`.${_sankeyClasses.sankeyPlotClasses.links} path, .${_sankeyClasses.sankeyPlotClasses.nodes} rect`]: {
|
|
22
25
|
transition: 'opacity 0.1s ease-out, filter 0.1s ease-out'
|
|
23
26
|
},
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _internals = require("@mui/x-charts/internals");
|
|
8
|
+
const identifierSerializer = identifier => {
|
|
9
|
+
if (identifier.subType === 'node') {
|
|
10
|
+
return `${(0, _internals.typeSerializer)(identifier.type)}Node(${identifier.nodeId})`;
|
|
11
|
+
}
|
|
12
|
+
return `${(0, _internals.typeSerializer)(identifier.type)}Source(${identifier.sourceId})Target(${identifier.targetId})`;
|
|
13
|
+
};
|
|
14
|
+
var _default = exports.default = identifierSerializer;
|
|
@@ -9,6 +9,7 @@ var _getSeriesWithDefaultValues = require("./getSeriesWithDefaultValues");
|
|
|
9
9
|
var _tooltipGetter = require("./tooltipGetter");
|
|
10
10
|
var _calculateSankeyLayout = require("../calculateSankeyLayout");
|
|
11
11
|
var _tooltipPosition = _interopRequireDefault(require("./tooltipPosition"));
|
|
12
|
+
var _identifierSerializer = _interopRequireDefault(require("./identifierSerializer"));
|
|
12
13
|
// Simple passthrough functions for sankey chart
|
|
13
14
|
const seriesProcessor = series => series;
|
|
14
15
|
const colorProcessor = series => series;
|
|
@@ -30,5 +31,6 @@ const sankeySeriesConfig = exports.sankeySeriesConfig = {
|
|
|
30
31
|
legendGetter,
|
|
31
32
|
tooltipGetter: _tooltipGetter.tooltipGetter,
|
|
32
33
|
tooltipItemPositionGetter: _tooltipPosition.default,
|
|
33
|
-
getSeriesWithDefaultValues: _getSeriesWithDefaultValues.getSeriesWithDefaultValues
|
|
34
|
+
getSeriesWithDefaultValues: _getSeriesWithDefaultValues.getSeriesWithDefaultValues,
|
|
35
|
+
identifierSerializer: _identifierSerializer.default
|
|
34
36
|
};
|