@mui/x-charts-pro 9.0.0-alpha.2 → 9.0.0-alpha.4
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.mts +2 -2
- package/BarChartPro/BarChartPro.d.ts +2 -2
- package/BarChartPro/BarChartPro.js +43 -10
- package/BarChartPro/BarChartPro.mjs +43 -10
- package/CHANGELOG.md +246 -1
- package/ChartsContainerPro/ChartsContainerPro.d.mts +2 -2
- package/ChartsContainerPro/ChartsContainerPro.d.ts +2 -2
- package/ChartsContainerPro/ChartsContainerPro.js +2 -2
- package/ChartsContainerPro/ChartsContainerPro.mjs +2 -2
- package/ChartsContainerPro/useChartsContainerProProps.d.mts +4 -4
- package/ChartsContainerPro/useChartsContainerProProps.d.ts +4 -4
- package/ChartsContainerPro/useChartsContainerProProps.js +3 -3
- package/ChartsContainerPro/useChartsContainerProProps.mjs +3 -3
- package/ChartsDataProviderPro/ChartsDataProviderPro.d.mts +2 -2
- package/ChartsDataProviderPro/ChartsDataProviderPro.d.ts +2 -2
- package/ChartsDataProviderPro/ChartsDataProviderPro.js +8 -11
- package/ChartsDataProviderPro/ChartsDataProviderPro.mjs +8 -11
- package/ChartsDataProviderPro/useChartsDataProviderProProps.d.mts +1 -1
- package/ChartsDataProviderPro/useChartsDataProviderProProps.d.ts +1 -1
- package/ChartsToolbarPro/ChartsToolbarPro.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarPro.mjs +2 -2
- package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.mjs +2 -2
- package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.mjs +2 -2
- package/ChartsToolbarPro/index.d.mts +2 -1
- package/ChartsToolbarPro/index.d.ts +2 -1
- package/ChartsToolbarPro/index.mjs +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.js +1 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.mjs +2 -2
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.js +1 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.mjs +2 -2
- package/FunnelChart/FunnelChart.d.mts +2 -2
- package/FunnelChart/FunnelChart.d.ts +2 -2
- package/FunnelChart/FunnelChart.js +23 -8
- package/FunnelChart/FunnelChart.mjs +23 -8
- package/FunnelChart/FunnelPlot.js +8 -3
- package/FunnelChart/FunnelPlot.mjs +8 -3
- package/FunnelChart/FunnelSection.d.mts +3 -3
- package/FunnelChart/FunnelSection.d.ts +3 -3
- package/FunnelChart/FunnelSection.js +8 -9
- package/FunnelChart/FunnelSection.mjs +8 -9
- package/FunnelChart/FunnelSectionLabel.d.mts +9 -3
- package/FunnelChart/FunnelSectionLabel.d.ts +9 -3
- package/FunnelChart/FunnelSectionLabel.js +15 -6
- package/FunnelChart/FunnelSectionLabel.mjs +15 -6
- package/FunnelChart/funnelAxisPlugin/computeAxisValue.d.mts +3 -3
- package/FunnelChart/funnelAxisPlugin/computeAxisValue.d.ts +3 -3
- package/FunnelChart/funnelClasses.d.mts +29 -0
- package/FunnelChart/funnelClasses.d.ts +29 -0
- package/FunnelChart/funnelClasses.js +29 -0
- package/FunnelChart/funnelClasses.mjs +19 -0
- package/FunnelChart/index.d.mts +2 -2
- package/FunnelChart/index.d.ts +2 -2
- package/FunnelChart/index.js +4 -4
- package/FunnelChart/index.mjs +1 -1
- package/FunnelChart/seriesConfig/legend.js +0 -2
- package/FunnelChart/seriesConfig/legend.mjs +0 -2
- package/FunnelChart/useFunnelChartProps.d.mts +2 -2
- package/FunnelChart/useFunnelChartProps.d.ts +2 -2
- package/FunnelChart/useFunnelChartProps.js +2 -2
- package/FunnelChart/useFunnelChartProps.mjs +2 -2
- package/Heatmap/Heatmap.d.mts +2 -11
- package/Heatmap/Heatmap.d.ts +2 -11
- package/Heatmap/Heatmap.js +25 -19
- package/Heatmap/Heatmap.mjs +25 -19
- package/Heatmap/HeatmapCell.d.mts +33 -0
- package/Heatmap/HeatmapCell.d.ts +33 -0
- package/Heatmap/HeatmapCell.js +62 -0
- package/Heatmap/HeatmapCell.mjs +55 -0
- package/Heatmap/HeatmapItem.d.mts +1 -9
- package/Heatmap/HeatmapItem.d.ts +1 -9
- package/Heatmap/HeatmapItem.js +5 -23
- package/Heatmap/HeatmapItem.mjs +5 -23
- package/Heatmap/HeatmapSVGPlot.js +14 -7
- package/Heatmap/HeatmapSVGPlot.mjs +15 -8
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.js +2 -2
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.mjs +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.js +16 -13
- package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.mjs +16 -13
- package/Heatmap/heatmapClasses.d.mts +6 -1
- package/Heatmap/heatmapClasses.d.ts +6 -1
- package/Heatmap/heatmapClasses.js +18 -3
- package/Heatmap/heatmapClasses.mjs +16 -2
- package/Heatmap/index.d.mts +4 -2
- package/Heatmap/index.d.ts +4 -2
- package/Heatmap/index.js +17 -13
- package/Heatmap/index.mjs +2 -1
- package/Heatmap/seriesConfig/getColor.js +5 -3
- package/Heatmap/seriesConfig/getColor.mjs +5 -3
- package/Heatmap/seriesConfig/getItemAtPosition.d.mts +2 -2
- package/Heatmap/seriesConfig/getItemAtPosition.d.ts +2 -2
- package/Heatmap/seriesConfig/getItemAtPosition.js +3 -11
- package/Heatmap/seriesConfig/getItemAtPosition.mjs +3 -11
- package/Heatmap/seriesConfig/identifierCleaner.d.mts +3 -0
- package/Heatmap/seriesConfig/identifierCleaner.d.ts +3 -0
- package/Heatmap/seriesConfig/identifierCleaner.js +15 -0
- package/Heatmap/seriesConfig/identifierCleaner.mjs +9 -0
- package/Heatmap/seriesConfig/identifierSerializer.d.mts +3 -0
- package/Heatmap/seriesConfig/identifierSerializer.d.ts +3 -0
- package/Heatmap/seriesConfig/identifierSerializer.js +11 -0
- package/Heatmap/seriesConfig/identifierSerializer.mjs +5 -0
- package/Heatmap/seriesConfig/index.js +4 -2
- package/Heatmap/seriesConfig/index.mjs +5 -3
- package/Heatmap/seriesConfig/keyboardFocusHandler.js +6 -19
- package/Heatmap/seriesConfig/keyboardFocusHandler.mjs +6 -19
- package/Heatmap/seriesConfig/seriesProcessor.js +8 -3
- package/Heatmap/seriesConfig/seriesProcessor.mjs +8 -3
- package/Heatmap/seriesConfig/tooltip.js +7 -6
- package/Heatmap/seriesConfig/tooltip.mjs +7 -6
- package/Heatmap/seriesConfig/tooltipPosition.js +3 -4
- package/Heatmap/seriesConfig/tooltipPosition.mjs +3 -4
- package/Heatmap/shouldRegisterPointerInteractionsGlobally.js +1 -1
- package/Heatmap/shouldRegisterPointerInteractionsGlobally.mjs +1 -1
- package/Heatmap/useHeatmapProps.d.mts +2 -2
- package/Heatmap/useHeatmapProps.d.ts +2 -2
- package/Heatmap/useHeatmapProps.js +4 -6
- package/Heatmap/useHeatmapProps.mjs +4 -6
- package/LineChartPro/LineChartPro.d.mts +2 -2
- package/LineChartPro/LineChartPro.d.ts +2 -2
- package/LineChartPro/LineChartPro.js +40 -13
- package/LineChartPro/LineChartPro.mjs +40 -13
- package/PieChartPro/PieChartPro.d.mts +2 -2
- package/PieChartPro/PieChartPro.d.ts +2 -2
- package/PieChartPro/PieChartPro.js +22 -7
- package/PieChartPro/PieChartPro.mjs +22 -7
- package/RadarChartPro/RadarChartPro.d.mts +1 -1
- package/RadarChartPro/RadarChartPro.d.ts +1 -1
- package/RadarChartPro/RadarChartPro.js +20 -2
- package/RadarChartPro/RadarChartPro.mjs +20 -2
- package/SankeyChart/SankeyChart.d.mts +2 -2
- package/SankeyChart/SankeyChart.d.ts +2 -2
- package/SankeyChart/SankeyChart.js +21 -12
- package/SankeyChart/SankeyChart.mjs +21 -12
- package/SankeyChart/SankeyDataProvider.d.mts +2 -2
- package/SankeyChart/SankeyDataProvider.d.ts +2 -2
- package/SankeyChart/SankeyDataProvider.js +2 -2
- package/SankeyChart/SankeyDataProvider.mjs +2 -2
- package/SankeyChart/SankeyLinkElement.js +7 -3
- package/SankeyChart/SankeyLinkElement.mjs +8 -4
- package/SankeyChart/SankeyLinkLabel.js +3 -0
- package/SankeyChart/SankeyLinkLabel.mjs +3 -0
- package/SankeyChart/SankeyLinkLabelPlot.d.mts +2 -2
- package/SankeyChart/SankeyLinkLabelPlot.d.ts +2 -2
- package/SankeyChart/SankeyLinkLabelPlot.js +1 -1
- package/SankeyChart/SankeyLinkLabelPlot.mjs +1 -1
- package/SankeyChart/SankeyLinkPlot.d.mts +2 -2
- package/SankeyChart/SankeyLinkPlot.d.ts +2 -2
- package/SankeyChart/SankeyLinkPlot.js +1 -1
- package/SankeyChart/SankeyLinkPlot.mjs +1 -1
- package/SankeyChart/SankeyNodeElement.d.mts +1 -1
- package/SankeyChart/SankeyNodeElement.d.ts +1 -1
- package/SankeyChart/SankeyNodeElement.js +20 -18
- package/SankeyChart/SankeyNodeElement.mjs +21 -19
- package/SankeyChart/SankeyNodeLabel.js +3 -0
- package/SankeyChart/SankeyNodeLabel.mjs +3 -0
- package/SankeyChart/SankeyNodeLabelPlot.d.mts +2 -2
- package/SankeyChart/SankeyNodeLabelPlot.d.ts +2 -2
- package/SankeyChart/SankeyNodeLabelPlot.js +1 -1
- package/SankeyChart/SankeyNodeLabelPlot.mjs +1 -1
- package/SankeyChart/SankeyNodePlot.d.mts +2 -2
- package/SankeyChart/SankeyNodePlot.d.ts +2 -2
- package/SankeyChart/SankeyNodePlot.js +1 -1
- package/SankeyChart/SankeyNodePlot.mjs +1 -1
- package/SankeyChart/SankeyPlot.d.mts +2 -2
- package/SankeyChart/SankeyPlot.d.ts +2 -2
- package/SankeyChart/SankeyPlot.js +3 -3
- package/SankeyChart/SankeyPlot.mjs +3 -3
- package/SankeyChart/SankeyTooltip/SankeyTooltip.classes.js +2 -2
- package/SankeyChart/SankeyTooltip/SankeyTooltip.classes.mjs +1 -1
- package/SankeyChart/index.d.mts +2 -1
- package/SankeyChart/index.d.ts +2 -1
- package/SankeyChart/index.js +3 -3
- package/SankeyChart/index.mjs +1 -1
- package/SankeyChart/sankeyClasses.d.mts +15 -6
- package/SankeyChart/sankeyClasses.d.ts +15 -6
- package/SankeyChart/sankeyClasses.js +12 -8
- package/SankeyChart/sankeyClasses.mjs +10 -6
- package/SankeyChart/sankeyHighlightHooks.d.mts +2 -2
- package/SankeyChart/sankeyHighlightHooks.d.ts +2 -2
- package/SankeyChart/sankeyHighlightHooks.js +2 -10
- package/SankeyChart/sankeyHighlightHooks.mjs +3 -11
- package/SankeyChart/useSankeyChartProps.d.mts +2 -2
- package/SankeyChart/useSankeyChartProps.d.ts +2 -2
- package/SankeyChart/useSankeyChartProps.js +2 -2
- package/SankeyChart/useSankeyChartProps.mjs +2 -2
- package/ScatterChartPro/ScatterChartPro.d.mts +2 -2
- package/ScatterChartPro/ScatterChartPro.d.ts +2 -2
- package/ScatterChartPro/ScatterChartPro.js +62 -17
- package/ScatterChartPro/ScatterChartPro.mjs +62 -17
- package/context/useChartProApiContext.d.mts +1 -1
- package/context/useChartProApiContext.d.ts +1 -1
- package/context/useChartProApiContext.js +1 -1
- package/context/useChartProApiContext.mjs +1 -1
- package/index.d.mts +0 -4
- package/index.d.ts +0 -4
- package/index.js +2 -34
- package/index.mjs +1 -4
- package/internals/ChartsWatermark.d.mts +2 -2
- package/internals/ChartsWatermark.d.ts +2 -2
- package/internals/ChartsWatermark.js +5 -8
- package/internals/ChartsWatermark.mjs +3 -6
- package/internals/index.d.mts +0 -1
- package/internals/index.d.ts +0 -1
- package/internals/index.js +0 -8
- package/internals/index.mjs +0 -1
- package/internals/plugins/allPlugins.d.mts +4 -4
- package/internals/plugins/allPlugins.d.ts +4 -4
- package/internals/plugins/useChartProExport/common.js +4 -8
- package/internals/plugins/useChartProExport/common.mjs +4 -8
- package/internals/plugins/useChartProExport/exportImage.js +1 -1
- package/internals/plugins/useChartProExport/exportImage.mjs +1 -1
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.mts +1 -1
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +16 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.mjs +16 -1
- package/models/seriesType/heatmap.d.mts +36 -9
- package/models/seriesType/heatmap.d.ts +36 -9
- package/models/seriesType/heatmap.js +28 -1
- package/models/seriesType/heatmap.mjs +25 -1
- package/package.json +5 -61
- package/plugins/selectors/useChartHeatmapPosition.selectors.d.mts +2 -2
- package/plugins/selectors/useChartHeatmapPosition.selectors.d.ts +2 -2
- package/plugins/selectors/useChartHeatmapPosition.selectors.js +4 -4
- package/plugins/selectors/useChartHeatmapPosition.selectors.mjs +4 -4
- package/themeAugmentation/components.d.mts +19 -1
- package/themeAugmentation/components.d.ts +19 -1
- package/themeAugmentation/overrides.d.mts +5 -2
- package/themeAugmentation/overrides.d.ts +5 -2
- package/themeAugmentation/props.d.mts +8 -0
- package/themeAugmentation/props.d.ts +8 -0
- package/typeOverloads/modules.d.mts +2 -2
- package/typeOverloads/modules.d.ts +2 -2
- package/ChartContainer/index.d.mts +0 -1
- package/ChartContainer/index.d.ts +0 -1
- package/ChartContainer/index.js +0 -16
- package/ChartContainer/index.mjs +0 -2
- package/ChartContainerPro/ChartContainerPro.d.mts +0 -21
- package/ChartContainerPro/ChartContainerPro.d.ts +0 -21
- package/ChartContainerPro/ChartContainerPro.js +0 -24
- package/ChartContainerPro/ChartContainerPro.mjs +0 -20
- package/ChartContainerPro/index.d.mts +0 -9
- package/ChartContainerPro/index.d.ts +0 -9
- package/ChartContainerPro/index.js +0 -17
- package/ChartContainerPro/index.mjs +0 -6
- package/ChartContainerPro/useChartContainerProProps.d.mts +0 -12
- package/ChartContainerPro/useChartContainerProProps.d.ts +0 -12
- package/ChartContainerPro/useChartContainerProProps.js +0 -19
- package/ChartContainerPro/useChartContainerProProps.mjs +0 -14
- package/ChartDataProvider/index.d.mts +0 -1
- package/ChartDataProvider/index.d.ts +0 -1
- package/ChartDataProvider/index.js +0 -16
- package/ChartDataProvider/index.mjs +0 -2
- package/ChartDataProviderPro/ChartDataProviderPro.d.mts +0 -20
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +0 -20
- package/ChartDataProviderPro/ChartDataProviderPro.js +0 -30
- package/ChartDataProviderPro/ChartDataProviderPro.mjs +0 -21
- package/ChartDataProviderPro/index.d.mts +0 -2
- package/ChartDataProviderPro/index.d.ts +0 -2
- package/ChartDataProviderPro/index.js +0 -13
- package/ChartDataProviderPro/index.mjs +0 -2
- package/ChartDataProviderPro/useChartDataProviderProProps.d.mts +0 -10
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +0 -10
- package/ChartDataProviderPro/useChartDataProviderProProps.js +0 -12
- package/ChartDataProviderPro/useChartDataProviderProProps.mjs +0 -8
- package/FunnelChart/funnelSectionClasses.d.mts +0 -30
- package/FunnelChart/funnelSectionClasses.d.ts +0 -30
- package/FunnelChart/funnelSectionClasses.js +0 -44
- package/FunnelChart/funnelSectionClasses.mjs +0 -35
- package/Heatmap/internals/HeatmapCell.d.mts +0 -21
- package/Heatmap/internals/HeatmapCell.d.ts +0 -21
- package/Heatmap/internals/HeatmapCell.js +0 -18
- package/Heatmap/internals/HeatmapCell.mjs +0 -12
- package/tests/constants.js +0 -7
- package/tests/constants.mjs +0 -1
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-charts-pro v9.0.0-alpha.
|
|
2
|
+
* @mui/x-charts-pro v9.0.0-alpha.4
|
|
3
3
|
*
|
|
4
4
|
* @license SEE LICENSE IN LICENSE
|
|
5
5
|
* This source code is licensed under the SEE LICENSE IN LICENSE license found in the
|
|
@@ -11,15 +11,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
11
11
|
value: true
|
|
12
12
|
});
|
|
13
13
|
var _exportNames = {
|
|
14
|
-
ChartsContainerPro: true
|
|
15
|
-
ChartContainerPro: true
|
|
14
|
+
ChartsContainerPro: true
|
|
16
15
|
};
|
|
17
|
-
Object.defineProperty(exports, "ChartContainerPro", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function () {
|
|
20
|
-
return _ChartContainerPro.ChartContainerPro;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
16
|
Object.defineProperty(exports, "ChartsContainerPro", {
|
|
24
17
|
enumerable: true,
|
|
25
18
|
get: function () {
|
|
@@ -267,18 +260,6 @@ Object.keys(_ChartsDataProvider).forEach(function (key) {
|
|
|
267
260
|
}
|
|
268
261
|
});
|
|
269
262
|
});
|
|
270
|
-
var _ChartDataProvider = require("@mui/x-charts/ChartDataProvider");
|
|
271
|
-
Object.keys(_ChartDataProvider).forEach(function (key) {
|
|
272
|
-
if (key === "default" || key === "__esModule") return;
|
|
273
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
274
|
-
if (key in exports && exports[key] === _ChartDataProvider[key]) return;
|
|
275
|
-
Object.defineProperty(exports, key, {
|
|
276
|
-
enumerable: true,
|
|
277
|
-
get: function () {
|
|
278
|
-
return _ChartDataProvider[key];
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
});
|
|
282
263
|
var _ChartsLabel = require("@mui/x-charts/ChartsLabel");
|
|
283
264
|
Object.keys(_ChartsLabel).forEach(function (key) {
|
|
284
265
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -400,7 +381,6 @@ Object.keys(_Heatmap).forEach(function (key) {
|
|
|
400
381
|
});
|
|
401
382
|
});
|
|
402
383
|
var _ChartsContainerPro = require("./ChartsContainerPro");
|
|
403
|
-
var _ChartContainerPro = require("./ChartContainerPro");
|
|
404
384
|
var _ChartsDataProviderPro = require("./ChartsDataProviderPro");
|
|
405
385
|
Object.keys(_ChartsDataProviderPro).forEach(function (key) {
|
|
406
386
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -413,18 +393,6 @@ Object.keys(_ChartsDataProviderPro).forEach(function (key) {
|
|
|
413
393
|
}
|
|
414
394
|
});
|
|
415
395
|
});
|
|
416
|
-
var _ChartDataProviderPro = require("./ChartDataProviderPro");
|
|
417
|
-
Object.keys(_ChartDataProviderPro).forEach(function (key) {
|
|
418
|
-
if (key === "default" || key === "__esModule") return;
|
|
419
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
420
|
-
if (key in exports && exports[key] === _ChartDataProviderPro[key]) return;
|
|
421
|
-
Object.defineProperty(exports, key, {
|
|
422
|
-
enumerable: true,
|
|
423
|
-
get: function () {
|
|
424
|
-
return _ChartDataProviderPro[key];
|
|
425
|
-
}
|
|
426
|
-
});
|
|
427
|
-
});
|
|
428
396
|
var _ScatterChartPro = require("./ScatterChartPro");
|
|
429
397
|
Object.keys(_ScatterChartPro).forEach(function (key) {
|
|
430
398
|
if (key === "default" || key === "__esModule") return;
|
package/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-charts-pro v9.0.0-alpha.
|
|
2
|
+
* @mui/x-charts-pro v9.0.0-alpha.4
|
|
3
3
|
*
|
|
4
4
|
* @license SEE LICENSE IN LICENSE
|
|
5
5
|
* This source code is licensed under the SEE LICENSE IN LICENSE license found in the
|
|
@@ -28,7 +28,6 @@ export * from '@mui/x-charts/Gauge';
|
|
|
28
28
|
export * from '@mui/x-charts/RadarChart';
|
|
29
29
|
export * from '@mui/x-charts/ChartsSurface';
|
|
30
30
|
export * from '@mui/x-charts/ChartsDataProvider';
|
|
31
|
-
export * from '@mui/x-charts/ChartDataProvider';
|
|
32
31
|
export * from '@mui/x-charts/ChartsLabel';
|
|
33
32
|
export * from '@mui/x-charts/ChartsOverlay';
|
|
34
33
|
export * from '@mui/x-charts/ChartsWrapper';
|
|
@@ -46,9 +45,7 @@ export * from "./colorPalettes/index.mjs";
|
|
|
46
45
|
// Pro components
|
|
47
46
|
export * from "./Heatmap/index.mjs";
|
|
48
47
|
export { ChartsContainerPro } from "./ChartsContainerPro/index.mjs";
|
|
49
|
-
export { ChartContainerPro } from "./ChartContainerPro/index.mjs";
|
|
50
48
|
export * from "./ChartsDataProviderPro/index.mjs";
|
|
51
|
-
export * from "./ChartDataProviderPro/index.mjs";
|
|
52
49
|
export * from "./ScatterChartPro/index.mjs";
|
|
53
50
|
export * from "./SankeyChart/index.mjs";
|
|
54
51
|
export * from "./BarChartPro/index.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type CommercialPackageInfo } from '@mui/x-license/internals';
|
|
2
2
|
interface ChartsWatermarkProps {
|
|
3
|
-
|
|
3
|
+
packageInfo: CommercialPackageInfo;
|
|
4
4
|
}
|
|
5
5
|
export declare function ChartsWatermark(props: ChartsWatermarkProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type CommercialPackageInfo } from '@mui/x-license/internals';
|
|
2
2
|
interface ChartsWatermarkProps {
|
|
3
|
-
|
|
3
|
+
packageInfo: CommercialPackageInfo;
|
|
4
4
|
}
|
|
5
5
|
export declare function ChartsWatermark(props: ChartsWatermarkProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -8,20 +8,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.ChartsWatermark = ChartsWatermark;
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
var ReactDOM = _interopRequireWildcard(require("react-dom"));
|
|
11
|
-
var
|
|
11
|
+
var _internals = require("@mui/x-license/internals");
|
|
12
12
|
var _hooks = require("../hooks");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
const releaseInfo = "MTc3MjY2ODgwMDAwMA==";
|
|
15
14
|
function ChartsWatermark(props) {
|
|
16
15
|
const layerContainerRef = (0, _hooks.useChartsLayerContainerRef)();
|
|
17
16
|
if (!layerContainerRef.current) {
|
|
18
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
19
|
-
|
|
20
|
-
releaseInfo: releaseInfo
|
|
17
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.Watermark, {
|
|
18
|
+
packageInfo: props.packageInfo
|
|
21
19
|
});
|
|
22
20
|
}
|
|
23
|
-
return /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
24
|
-
|
|
25
|
-
releaseInfo: releaseInfo
|
|
21
|
+
return /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.Watermark, {
|
|
22
|
+
packageInfo: props.packageInfo
|
|
26
23
|
}), layerContainerRef.current);
|
|
27
24
|
}
|
|
@@ -2,20 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as ReactDOM from 'react-dom';
|
|
5
|
-
import { Watermark } from '@mui/x-license/
|
|
5
|
+
import { Watermark } from '@mui/x-license/internals';
|
|
6
6
|
import { useChartsLayerContainerRef } from "../hooks/index.mjs";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
const releaseInfo = "MTc3MjY2ODgwMDAwMA==";
|
|
9
8
|
export function ChartsWatermark(props) {
|
|
10
9
|
const layerContainerRef = useChartsLayerContainerRef();
|
|
11
10
|
if (!layerContainerRef.current) {
|
|
12
11
|
return /*#__PURE__*/_jsx(Watermark, {
|
|
13
|
-
|
|
14
|
-
releaseInfo: releaseInfo
|
|
12
|
+
packageInfo: props.packageInfo
|
|
15
13
|
});
|
|
16
14
|
}
|
|
17
15
|
return /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/_jsx(Watermark, {
|
|
18
|
-
|
|
19
|
-
releaseInfo: releaseInfo
|
|
16
|
+
packageInfo: props.packageInfo
|
|
20
17
|
}), layerContainerRef.current);
|
|
21
18
|
}
|
package/internals/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { useChartsContainerProProps } from "../ChartsContainerPro/useChartsContainerProProps.mjs";
|
|
2
2
|
export type { UseChartsContainerProPropsReturnValue } from "../ChartsContainerPro/useChartsContainerProProps.mjs";
|
|
3
|
-
export { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.mjs";
|
|
4
3
|
export type { ChartsSlotsPro, ChartsSlotPropsPro } from "./material/index.mjs";
|
|
5
4
|
export { seriesPreviewPlotMap } from "../ChartsZoomSlider/internals/seriesPreviewPlotMap.mjs";
|
|
6
5
|
export type { PreviewPlotProps } from "../ChartsZoomSlider/internals/previews/PreviewPlot.types.mjs";
|
package/internals/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { useChartsContainerProProps } from "../ChartsContainerPro/useChartsContainerProProps.js";
|
|
2
2
|
export type { UseChartsContainerProPropsReturnValue } from "../ChartsContainerPro/useChartsContainerProProps.js";
|
|
3
|
-
export { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
|
|
4
3
|
export type { ChartsSlotsPro, ChartsSlotPropsPro } from "./material/index.js";
|
|
5
4
|
export { seriesPreviewPlotMap } from "../ChartsZoomSlider/internals/seriesPreviewPlotMap.js";
|
|
6
5
|
export type { PreviewPlotProps } from "../ChartsZoomSlider/internals/previews/PreviewPlot.types.js";
|
package/internals/index.js
CHANGED
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
7
|
useChartsContainerProProps: true,
|
|
8
|
-
useChartContainerProProps: true,
|
|
9
8
|
seriesPreviewPlotMap: true,
|
|
10
9
|
defaultSeriesConfigPro: true,
|
|
11
10
|
useHeatmapProps: true,
|
|
@@ -36,12 +35,6 @@ Object.defineProperty(exports, "seriesPreviewPlotMap", {
|
|
|
36
35
|
return _seriesPreviewPlotMap.seriesPreviewPlotMap;
|
|
37
36
|
}
|
|
38
37
|
});
|
|
39
|
-
Object.defineProperty(exports, "useChartContainerProProps", {
|
|
40
|
-
enumerable: true,
|
|
41
|
-
get: function () {
|
|
42
|
-
return _useChartContainerProProps.useChartContainerProProps;
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
38
|
Object.defineProperty(exports, "useChartsContainerProProps", {
|
|
46
39
|
enumerable: true,
|
|
47
40
|
get: function () {
|
|
@@ -55,7 +48,6 @@ Object.defineProperty(exports, "useHeatmapProps", {
|
|
|
55
48
|
}
|
|
56
49
|
});
|
|
57
50
|
var _useChartsContainerProProps = require("../ChartsContainerPro/useChartsContainerProProps");
|
|
58
|
-
var _useChartContainerProProps = require("../ChartContainerPro/useChartContainerProProps");
|
|
59
51
|
var _seriesPreviewPlotMap = require("../ChartsZoomSlider/internals/seriesPreviewPlotMap");
|
|
60
52
|
var _ChartsDataProviderPro = require("../ChartsDataProviderPro/ChartsDataProviderPro");
|
|
61
53
|
var _useHeatmapProps = require("../Heatmap/useHeatmapProps");
|
package/internals/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { useChartsContainerProProps } from "../ChartsContainerPro/useChartsContainerProProps.mjs";
|
|
2
|
-
export { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.mjs";
|
|
3
2
|
export { seriesPreviewPlotMap } from "../ChartsZoomSlider/internals/seriesPreviewPlotMap.mjs";
|
|
4
3
|
export { defaultSeriesConfigPro } from "../ChartsDataProviderPro/ChartsDataProviderPro.mjs";
|
|
5
4
|
export { useHeatmapProps } from "../Heatmap/useHeatmapProps.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ChartSeriesType, type ConvertSignaturesIntoPlugins, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartZAxisSignature, type UseChartHighlightSignature, type UseChartPolarAxisSignature, type UseChartBrushSignature, type UseChartVisibilityManagerSignature } from '@mui/x-charts/internals';
|
|
2
2
|
import { type UseChartProExportSignature } from "./useChartProExport/index.mjs";
|
|
3
3
|
import { type UseChartProZoomSignature } from "./useChartProZoom/index.mjs";
|
|
4
|
-
export type AllPluginSignatures<
|
|
5
|
-
export type AllPluginsType<
|
|
4
|
+
export type AllPluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature<SeriesType>, UseChartInteractionSignature, UseChartCartesianAxisSignature<SeriesType>, UseChartPolarAxisSignature<SeriesType>, UseChartHighlightSignature<SeriesType>, UseChartVisibilityManagerSignature<SeriesType>, UseChartProZoomSignature, UseChartProExportSignature, UseChartVisibilityManagerSignature<SeriesType>];
|
|
5
|
+
export type AllPluginsType<SeriesType extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<AllPluginSignatures<SeriesType>>;
|
|
6
6
|
export declare const ALL_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartProExportSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartBrushSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartTooltipSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartPolarAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartVisibilityManagerSignature<any>>)[];
|
|
7
|
-
export type DefaultPluginSignatures<
|
|
8
|
-
export type DefaultPluginsType<
|
|
7
|
+
export type DefaultPluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature<SeriesType>, UseChartInteractionSignature, UseChartCartesianAxisSignature<SeriesType>, UseChartPolarAxisSignature<SeriesType>, UseChartHighlightSignature<SeriesType>, UseChartVisibilityManagerSignature<SeriesType>, UseChartProZoomSignature, UseChartProExportSignature, UseChartVisibilityManagerSignature<SeriesType>];
|
|
8
|
+
export type DefaultPluginsType<SeriesType extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<DefaultPluginSignatures<SeriesType>>;
|
|
9
9
|
export declare const DEFAULT_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartProExportSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartBrushSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartTooltipSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartVisibilityManagerSignature<any>>)[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ChartSeriesType, type ConvertSignaturesIntoPlugins, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartZAxisSignature, type UseChartHighlightSignature, type UseChartPolarAxisSignature, type UseChartBrushSignature, type UseChartVisibilityManagerSignature } from '@mui/x-charts/internals';
|
|
2
2
|
import { type UseChartProExportSignature } from "./useChartProExport/index.js";
|
|
3
3
|
import { type UseChartProZoomSignature } from "./useChartProZoom/index.js";
|
|
4
|
-
export type AllPluginSignatures<
|
|
5
|
-
export type AllPluginsType<
|
|
4
|
+
export type AllPluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature<SeriesType>, UseChartInteractionSignature, UseChartCartesianAxisSignature<SeriesType>, UseChartPolarAxisSignature<SeriesType>, UseChartHighlightSignature<SeriesType>, UseChartVisibilityManagerSignature<SeriesType>, UseChartProZoomSignature, UseChartProExportSignature, UseChartVisibilityManagerSignature<SeriesType>];
|
|
5
|
+
export type AllPluginsType<SeriesType extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<AllPluginSignatures<SeriesType>>;
|
|
6
6
|
export declare const ALL_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartProExportSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartBrushSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartTooltipSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartPolarAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartVisibilityManagerSignature<any>>)[];
|
|
7
|
-
export type DefaultPluginSignatures<
|
|
8
|
-
export type DefaultPluginsType<
|
|
7
|
+
export type DefaultPluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature<SeriesType>, UseChartInteractionSignature, UseChartCartesianAxisSignature<SeriesType>, UseChartPolarAxisSignature<SeriesType>, UseChartHighlightSignature<SeriesType>, UseChartVisibilityManagerSignature<SeriesType>, UseChartProZoomSignature, UseChartProExportSignature, UseChartVisibilityManagerSignature<SeriesType>];
|
|
8
|
+
export type DefaultPluginsType<SeriesType extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<DefaultPluginSignatures<SeriesType>>;
|
|
9
9
|
export declare const DEFAULT_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartProExportSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartBrushSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartTooltipSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartVisibilityManagerSignature<any>>)[];
|
|
@@ -41,14 +41,10 @@ function copyCanvasesContent(original, clone) {
|
|
|
41
41
|
const dataURL = originalCanvas.toDataURL();
|
|
42
42
|
const img = cloneCanvas.ownerDocument.createElement('img');
|
|
43
43
|
img.src = dataURL;
|
|
44
|
-
|
|
45
|
-
img.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
continue;
|
|
49
|
-
}
|
|
50
|
-
img.style[styleKey] = cloneCanvas.style[styleKey];
|
|
51
|
-
}
|
|
44
|
+
// Use the CSS dimensions (not canvas.width/height which are in device pixels)
|
|
45
|
+
img.width = originalCanvas.clientWidth;
|
|
46
|
+
img.height = originalCanvas.clientHeight;
|
|
47
|
+
img.style.cssText = cloneCanvas.style.cssText;
|
|
52
48
|
cloneCanvas.replaceWith(img);
|
|
53
49
|
img.onload = () => {
|
|
54
50
|
resolve();
|
|
@@ -33,14 +33,10 @@ export function copyCanvasesContent(original, clone) {
|
|
|
33
33
|
const dataURL = originalCanvas.toDataURL();
|
|
34
34
|
const img = cloneCanvas.ownerDocument.createElement('img');
|
|
35
35
|
img.src = dataURL;
|
|
36
|
-
|
|
37
|
-
img.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
img.style[styleKey] = cloneCanvas.style[styleKey];
|
|
43
|
-
}
|
|
36
|
+
// Use the CSS dimensions (not canvas.width/height which are in device pixels)
|
|
37
|
+
img.width = originalCanvas.clientWidth;
|
|
38
|
+
img.height = originalCanvas.clientHeight;
|
|
39
|
+
img.style.cssText = cloneCanvas.style.cssText;
|
|
44
40
|
cloneCanvas.replaceWith(img);
|
|
45
41
|
img.onload = () => {
|
|
46
42
|
resolve();
|
|
@@ -34,6 +34,7 @@ async function exportImage(element, svg, params) {
|
|
|
34
34
|
} = params ?? {};
|
|
35
35
|
const drawDocumentPromise = getDrawDocument();
|
|
36
36
|
const doc = (0, _ownerDocument.default)(element);
|
|
37
|
+
const ratio = Math.max(window.devicePixelRatio || 1, 1);
|
|
37
38
|
const iframe = (0, _common.createExportIframe)(fileName);
|
|
38
39
|
/* We apply the min/max width and height to ensure the SVG doesn't resize in the export.
|
|
39
40
|
* We apply to the original SVG so that the cloned tree will contain the styles and revert these
|
|
@@ -74,7 +75,6 @@ async function exportImage(element, svg, params) {
|
|
|
74
75
|
/* Use the size from the export body in case `onBeforeExport` adds some elements that should be in the export. */
|
|
75
76
|
const exportDocBodySize = iframe.contentDocument.body.getBoundingClientRect();
|
|
76
77
|
const canvas = document.createElement('canvas');
|
|
77
|
-
const ratio = window.devicePixelRatio || 1;
|
|
78
78
|
canvas.width = exportDocBodySize.width * ratio;
|
|
79
79
|
canvas.height = exportDocBodySize.height * ratio;
|
|
80
80
|
canvas.style.width = `${exportDocBodySize.width}px`;
|
|
@@ -24,6 +24,7 @@ export async function exportImage(element, svg, params) {
|
|
|
24
24
|
} = params ?? {};
|
|
25
25
|
const drawDocumentPromise = getDrawDocument();
|
|
26
26
|
const doc = ownerDocument(element);
|
|
27
|
+
const ratio = Math.max(window.devicePixelRatio || 1, 1);
|
|
27
28
|
const iframe = createExportIframe(fileName);
|
|
28
29
|
/* We apply the min/max width and height to ensure the SVG doesn't resize in the export.
|
|
29
30
|
* We apply to the original SVG so that the cloned tree will contain the styles and revert these
|
|
@@ -64,7 +65,6 @@ export async function exportImage(element, svg, params) {
|
|
|
64
65
|
/* Use the size from the export body in case `onBeforeExport` adds some elements that should be in the export. */
|
|
65
66
|
const exportDocBodySize = iframe.contentDocument.body.getBoundingClientRect();
|
|
66
67
|
const canvas = document.createElement('canvas');
|
|
67
|
-
const ratio = window.devicePixelRatio || 1;
|
|
68
68
|
canvas.width = exportDocBodySize.width * ratio;
|
|
69
69
|
canvas.height = exportDocBodySize.height * ratio;
|
|
70
70
|
canvas.style.width = `${exportDocBodySize.width}px`;
|
|
@@ -99,7 +99,7 @@ export type DoubleTapResetInteraction = Unpack<{
|
|
|
99
99
|
} & AllModeProp & AllKeysProp>;
|
|
100
100
|
export type BrushInteraction = Unpack<{
|
|
101
101
|
type: 'brush';
|
|
102
|
-
} &
|
|
102
|
+
} & AllModeProp & AllKeysProp>;
|
|
103
103
|
export type AnyInteraction = {
|
|
104
104
|
type: string;
|
|
105
105
|
pointerMode?: InteractionMode;
|
|
@@ -99,7 +99,7 @@ export type DoubleTapResetInteraction = Unpack<{
|
|
|
99
99
|
} & AllModeProp & AllKeysProp>;
|
|
100
100
|
export type BrushInteraction = Unpack<{
|
|
101
101
|
type: 'brush';
|
|
102
|
-
} &
|
|
102
|
+
} & AllModeProp & AllKeysProp>;
|
|
103
103
|
export type AnyInteraction = {
|
|
104
104
|
type: string;
|
|
105
105
|
pointerMode?: InteractionMode;
|
|
@@ -22,8 +22,23 @@ const useZoomOnBrush = ({
|
|
|
22
22
|
const config = store.use(_ZoomInteractionConfig.selectorZoomInteractionConfig, 'brush');
|
|
23
23
|
const isZoomOnBrushEnabled = Object.keys(optionsLookup).length > 0 && Boolean(config);
|
|
24
24
|
React.useEffect(() => {
|
|
25
|
-
instance
|
|
25
|
+
if ('setZoomBrushEnabled' in instance) {
|
|
26
|
+
instance.setZoomBrushEnabled(isZoomOnBrushEnabled);
|
|
27
|
+
}
|
|
26
28
|
}, [isZoomOnBrushEnabled, instance]);
|
|
29
|
+
React.useEffect(() => {
|
|
30
|
+
if (!isZoomOnBrushEnabled) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
instance.updateZoomInteractionListeners('brush', {
|
|
34
|
+
requiredKeys: config.requiredKeys,
|
|
35
|
+
pointerMode: config.pointerMode,
|
|
36
|
+
pointerOptions: {
|
|
37
|
+
mouse: config.mouse,
|
|
38
|
+
touch: config.touch
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}, [isZoomOnBrushEnabled, config, instance]);
|
|
27
42
|
|
|
28
43
|
// Zoom on brush
|
|
29
44
|
React.useEffect(() => {
|
|
@@ -16,8 +16,23 @@ export const useZoomOnBrush = ({
|
|
|
16
16
|
const config = store.use(selectorZoomInteractionConfig, 'brush');
|
|
17
17
|
const isZoomOnBrushEnabled = Object.keys(optionsLookup).length > 0 && Boolean(config);
|
|
18
18
|
React.useEffect(() => {
|
|
19
|
-
instance
|
|
19
|
+
if ('setZoomBrushEnabled' in instance) {
|
|
20
|
+
instance.setZoomBrushEnabled(isZoomOnBrushEnabled);
|
|
21
|
+
}
|
|
20
22
|
}, [isZoomOnBrushEnabled, instance]);
|
|
23
|
+
React.useEffect(() => {
|
|
24
|
+
if (!isZoomOnBrushEnabled) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
instance.updateZoomInteractionListeners('brush', {
|
|
28
|
+
requiredKeys: config.requiredKeys,
|
|
29
|
+
pointerMode: config.pointerMode,
|
|
30
|
+
pointerOptions: {
|
|
31
|
+
mouse: config.mouse,
|
|
32
|
+
touch: config.touch
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}, [isZoomOnBrushEnabled, config, instance]);
|
|
21
36
|
|
|
22
37
|
// Zoom on brush
|
|
23
38
|
React.useEffect(() => {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { type DefaultizedProps } from '@mui/x-internals/types';
|
|
2
2
|
import { type CommonDefaultizedProps, type CommonSeriesType, type CartesianSeriesType } from '@mui/x-charts/internals';
|
|
3
3
|
export type HeatmapValueType = readonly [number, number, number];
|
|
4
|
-
export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType, 'heatmap'>, 'color' | 'colorGetter'>, CartesianSeriesType {
|
|
4
|
+
export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType, 'heatmap'>, 'color' | 'colorGetter' | 'valueFormatter'>, CartesianSeriesType {
|
|
5
5
|
type: 'heatmap';
|
|
6
6
|
/**
|
|
7
|
-
* Data associated to each
|
|
7
|
+
* Data associated to each cell in the heatmap.
|
|
8
|
+
* Each entry is a tuple [xIndex, yIndex, value].
|
|
8
9
|
*/
|
|
9
10
|
data?: readonly HeatmapValueType[];
|
|
10
11
|
/**
|
|
@@ -15,9 +16,21 @@ export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueTyp
|
|
|
15
16
|
* The label to display on the tooltip or the legend. It can be a string or a function.
|
|
16
17
|
*/
|
|
17
18
|
label?: string | ((location: 'tooltip' | 'legend') => string);
|
|
19
|
+
/**
|
|
20
|
+
* Function that formats values to be displayed in a tooltip.
|
|
21
|
+
* @param {number | null} value The series' value to render. Can be `null` if the cell doesn't contain any value.
|
|
22
|
+
* @param {{ xIndex: number; yIndex: number}} context The rendering context of the value.
|
|
23
|
+
* @param {number} context.xIndex The x index of the cell the value belongs to.
|
|
24
|
+
* @param {number} context.yIndex The y index of the cell the value belongs to.
|
|
25
|
+
* @returns {string | null} The string to display or null if the value should not be shown.
|
|
26
|
+
*/
|
|
27
|
+
valueFormatter?: (value: number | null, context: {
|
|
28
|
+
xIndex: number;
|
|
29
|
+
yIndex: number;
|
|
30
|
+
}) => string | null;
|
|
18
31
|
}
|
|
19
32
|
/**
|
|
20
|
-
* An object that allows to identify a single
|
|
33
|
+
* An object that allows to identify a single cell.
|
|
21
34
|
* Used for item interaction
|
|
22
35
|
*/
|
|
23
36
|
export type HeatmapItemIdentifier = {
|
|
@@ -26,11 +39,6 @@ export type HeatmapItemIdentifier = {
|
|
|
26
39
|
* The id of the series the cell belongs to.
|
|
27
40
|
*/
|
|
28
41
|
seriesId: DefaultizedHeatmapSeriesType['id'];
|
|
29
|
-
/**
|
|
30
|
-
* The data index of the cell.
|
|
31
|
-
* Is defined only if some data is associated to the cell.
|
|
32
|
-
*/
|
|
33
|
-
dataIndex?: number;
|
|
34
42
|
/**
|
|
35
43
|
* The x index of the cell. Useful to identify the cell position in the heatmap even if there is no data.
|
|
36
44
|
*/
|
|
@@ -40,4 +48,23 @@ export type HeatmapItemIdentifier = {
|
|
|
40
48
|
*/
|
|
41
49
|
yIndex: number;
|
|
42
50
|
};
|
|
43
|
-
|
|
51
|
+
/**
|
|
52
|
+
* The cell identifier with the associated data value.
|
|
53
|
+
*/
|
|
54
|
+
export type HeatmapItemIdentifierWithData = HeatmapItemIdentifier & {
|
|
55
|
+
/**
|
|
56
|
+
* The value of the cell. Null if there is no data associated.
|
|
57
|
+
*/
|
|
58
|
+
value: number | null;
|
|
59
|
+
};
|
|
60
|
+
export declare class HeatmapData {
|
|
61
|
+
private valueLookup;
|
|
62
|
+
constructor(data: readonly HeatmapValueType[]);
|
|
63
|
+
getValue(xIndex: number, yIndex: number): number | null;
|
|
64
|
+
}
|
|
65
|
+
export interface DefaultizedHeatmapSeriesType extends DefaultizedProps<HeatmapSeriesType, CommonDefaultizedProps> {
|
|
66
|
+
/**
|
|
67
|
+
* Maps the `xIndex` and `yIndex` to the corresponding value of the cell.
|
|
68
|
+
*/
|
|
69
|
+
heatmapData: HeatmapData;
|
|
70
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { type DefaultizedProps } from '@mui/x-internals/types';
|
|
2
2
|
import { type CommonDefaultizedProps, type CommonSeriesType, type CartesianSeriesType } from '@mui/x-charts/internals';
|
|
3
3
|
export type HeatmapValueType = readonly [number, number, number];
|
|
4
|
-
export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType, 'heatmap'>, 'color' | 'colorGetter'>, CartesianSeriesType {
|
|
4
|
+
export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType, 'heatmap'>, 'color' | 'colorGetter' | 'valueFormatter'>, CartesianSeriesType {
|
|
5
5
|
type: 'heatmap';
|
|
6
6
|
/**
|
|
7
|
-
* Data associated to each
|
|
7
|
+
* Data associated to each cell in the heatmap.
|
|
8
|
+
* Each entry is a tuple [xIndex, yIndex, value].
|
|
8
9
|
*/
|
|
9
10
|
data?: readonly HeatmapValueType[];
|
|
10
11
|
/**
|
|
@@ -15,9 +16,21 @@ export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueTyp
|
|
|
15
16
|
* The label to display on the tooltip or the legend. It can be a string or a function.
|
|
16
17
|
*/
|
|
17
18
|
label?: string | ((location: 'tooltip' | 'legend') => string);
|
|
19
|
+
/**
|
|
20
|
+
* Function that formats values to be displayed in a tooltip.
|
|
21
|
+
* @param {number | null} value The series' value to render. Can be `null` if the cell doesn't contain any value.
|
|
22
|
+
* @param {{ xIndex: number; yIndex: number}} context The rendering context of the value.
|
|
23
|
+
* @param {number} context.xIndex The x index of the cell the value belongs to.
|
|
24
|
+
* @param {number} context.yIndex The y index of the cell the value belongs to.
|
|
25
|
+
* @returns {string | null} The string to display or null if the value should not be shown.
|
|
26
|
+
*/
|
|
27
|
+
valueFormatter?: (value: number | null, context: {
|
|
28
|
+
xIndex: number;
|
|
29
|
+
yIndex: number;
|
|
30
|
+
}) => string | null;
|
|
18
31
|
}
|
|
19
32
|
/**
|
|
20
|
-
* An object that allows to identify a single
|
|
33
|
+
* An object that allows to identify a single cell.
|
|
21
34
|
* Used for item interaction
|
|
22
35
|
*/
|
|
23
36
|
export type HeatmapItemIdentifier = {
|
|
@@ -26,11 +39,6 @@ export type HeatmapItemIdentifier = {
|
|
|
26
39
|
* The id of the series the cell belongs to.
|
|
27
40
|
*/
|
|
28
41
|
seriesId: DefaultizedHeatmapSeriesType['id'];
|
|
29
|
-
/**
|
|
30
|
-
* The data index of the cell.
|
|
31
|
-
* Is defined only if some data is associated to the cell.
|
|
32
|
-
*/
|
|
33
|
-
dataIndex?: number;
|
|
34
42
|
/**
|
|
35
43
|
* The x index of the cell. Useful to identify the cell position in the heatmap even if there is no data.
|
|
36
44
|
*/
|
|
@@ -40,4 +48,23 @@ export type HeatmapItemIdentifier = {
|
|
|
40
48
|
*/
|
|
41
49
|
yIndex: number;
|
|
42
50
|
};
|
|
43
|
-
|
|
51
|
+
/**
|
|
52
|
+
* The cell identifier with the associated data value.
|
|
53
|
+
*/
|
|
54
|
+
export type HeatmapItemIdentifierWithData = HeatmapItemIdentifier & {
|
|
55
|
+
/**
|
|
56
|
+
* The value of the cell. Null if there is no data associated.
|
|
57
|
+
*/
|
|
58
|
+
value: number | null;
|
|
59
|
+
};
|
|
60
|
+
export declare class HeatmapData {
|
|
61
|
+
private valueLookup;
|
|
62
|
+
constructor(data: readonly HeatmapValueType[]);
|
|
63
|
+
getValue(xIndex: number, yIndex: number): number | null;
|
|
64
|
+
}
|
|
65
|
+
export interface DefaultizedHeatmapSeriesType extends DefaultizedProps<HeatmapSeriesType, CommonDefaultizedProps> {
|
|
66
|
+
/**
|
|
67
|
+
* Maps the `xIndex` and `yIndex` to the corresponding value of the cell.
|
|
68
|
+
*/
|
|
69
|
+
heatmapData: HeatmapData;
|
|
70
|
+
}
|
|
@@ -2,4 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
|
-
});
|
|
5
|
+
});
|
|
6
|
+
exports.HeatmapData = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* An object that allows to identify a single cell.
|
|
9
|
+
* Used for item interaction
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The cell identifier with the associated data value.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
class HeatmapData {
|
|
17
|
+
constructor(data) {
|
|
18
|
+
this.valueLookup = new Map();
|
|
19
|
+
for (const [xIndex, yIndex, value] of data) {
|
|
20
|
+
let column = this.valueLookup.get(xIndex);
|
|
21
|
+
if (!column) {
|
|
22
|
+
column = new Map();
|
|
23
|
+
this.valueLookup.set(xIndex, column);
|
|
24
|
+
}
|
|
25
|
+
column.set(yIndex, value);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
getValue(xIndex, yIndex) {
|
|
29
|
+
return this.valueLookup.get(xIndex)?.get(yIndex) ?? null;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.HeatmapData = HeatmapData;
|
|
@@ -1 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* An object that allows to identify a single cell.
|
|
3
|
+
* Used for item interaction
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The cell identifier with the associated data value.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export class HeatmapData {
|
|
11
|
+
constructor(data) {
|
|
12
|
+
this.valueLookup = new Map();
|
|
13
|
+
for (const [xIndex, yIndex, value] of data) {
|
|
14
|
+
let column = this.valueLookup.get(xIndex);
|
|
15
|
+
if (!column) {
|
|
16
|
+
column = new Map();
|
|
17
|
+
this.valueLookup.set(xIndex, column);
|
|
18
|
+
}
|
|
19
|
+
column.set(yIndex, value);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
getValue(xIndex, yIndex) {
|
|
23
|
+
return this.valueLookup.get(xIndex)?.get(yIndex) ?? null;
|
|
24
|
+
}
|
|
25
|
+
}
|