@mui/x-charts-pro 8.21.0 → 8.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChartPro/BarChartPro.d.ts +5 -5
- package/BarChartPro/BarChartPro.js +20 -0
- package/BarChartPro/BarChartPro.plugins.d.ts +4 -4
- package/BarChartPro/BarChartPro.plugins.js +1 -1
- package/CHANGELOG.md +238 -1
- package/ChartContainerPro/ChartContainerPro.d.ts +4 -4
- package/ChartContainerPro/useChartContainerProProps.d.ts +4 -4
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +4 -4
- package/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSlider.js +2 -2
- package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +9 -9
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.d.ts +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js +2 -2
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +3 -3
- package/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.d.ts +1 -1
- package/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +2 -2
- package/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +2 -2
- package/ChartZoomSlider/internals/previews/BarPreviewPlot.d.ts +1 -1
- package/ChartZoomSlider/internals/previews/BarPreviewPlot.js +2 -2
- package/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +2 -2
- package/ChartZoomSlider/internals/previews/LinePreviewPlot.js +2 -2
- package/ChartZoomSlider/internals/previews/PreviewPlot.types.d.ts +1 -1
- package/ChartZoomSlider/internals/previews/ScatterPreviewPlot.d.ts +1 -1
- package/ChartZoomSlider/internals/previews/ScatterPreviewPlot.js +2 -2
- package/ChartZoomSlider/internals/zoom-utils.d.ts +2 -2
- package/ChartsToolbarPro/ChartsToolbarImageExportTrigger.d.ts +3 -3
- package/ChartsToolbarPro/ChartsToolbarPrintExportTrigger.d.ts +3 -3
- package/ChartsToolbarPro/ChartsToolbarPro.d.ts +3 -3
- package/ChartsToolbarPro/ChartsToolbarPro.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.d.ts +2 -2
- package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.d.ts +2 -2
- package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +1 -1
- package/ChartsToolbarPro/Toolbar.types.d.ts +2 -2
- package/ChartsToolbarPro/internals/ChartsMenu.d.ts +1 -1
- package/ChartsToolbarPro/internals/ChartsToolbarDivider.d.ts +1 -1
- package/FunnelChart/FunnelChart.d.ts +9 -9
- package/FunnelChart/FunnelChart.plugins.d.ts +4 -4
- package/FunnelChart/FunnelChart.plugins.js +1 -1
- package/FunnelChart/FunnelPlot.d.ts +2 -2
- package/FunnelChart/FunnelPlot.js +3 -3
- package/FunnelChart/FunnelSection.d.ts +2 -2
- package/FunnelChart/FunnelSectionLabel.d.ts +2 -2
- package/FunnelChart/categoryAxis.types.d.ts +2 -2
- package/FunnelChart/coordinateMapper.d.ts +2 -2
- package/FunnelChart/curves/borderRadiusPolygon.d.ts +1 -1
- package/FunnelChart/curves/bump.d.ts +1 -1
- package/FunnelChart/curves/curve.types.d.ts +1 -1
- package/FunnelChart/curves/getFunnelCurve.d.ts +1 -1
- package/FunnelChart/curves/linear.d.ts +1 -1
- package/FunnelChart/curves/pyramid.d.ts +1 -1
- package/FunnelChart/curves/step-pyramid.d.ts +1 -1
- package/FunnelChart/curves/step.d.ts +1 -1
- package/FunnelChart/funnel.types.d.ts +5 -5
- package/FunnelChart/funnelAxisPlugin/computeAxisValue.d.ts +4 -4
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.d.ts +2 -2
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +2 -2
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +1 -1
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +2 -2
- package/FunnelChart/funnelPlotSlots.types.d.ts +2 -2
- package/FunnelChart/funnelSlots.types.d.ts +6 -6
- package/FunnelChart/labelUtils.d.ts +2 -2
- package/FunnelChart/seriesConfig/extremums.d.ts +1 -1
- package/FunnelChart/seriesConfig/getColor.d.ts +1 -1
- package/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/FunnelChart/seriesConfig/legend.d.ts +1 -1
- package/FunnelChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/FunnelChart/seriesConfig/tooltip.d.ts +1 -1
- package/FunnelChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/FunnelChart/useFunnelChartProps.d.ts +7 -7
- package/Heatmap/Heatmap.d.ts +13 -13
- package/Heatmap/Heatmap.js +10 -0
- package/Heatmap/Heatmap.plugins.d.ts +3 -3
- package/Heatmap/Heatmap.plugins.js +1 -1
- package/Heatmap/HeatmapItem.d.ts +2 -2
- package/Heatmap/HeatmapPlot.d.ts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.d.ts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +1 -1
- package/Heatmap/seriesConfig/extremums.d.ts +1 -1
- package/Heatmap/seriesConfig/getColor.d.ts +1 -1
- package/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/Heatmap/seriesConfig/index.d.ts +1 -1
- package/Heatmap/seriesConfig/seriesProcessor.d.ts +1 -1
- package/Heatmap/seriesConfig/tooltip.d.ts +1 -1
- package/Heatmap/seriesConfig/tooltipPosition.d.ts +1 -1
- package/LineChartPro/LineChartPro.d.ts +5 -5
- package/LineChartPro/LineChartPro.js +20 -0
- package/LineChartPro/LineChartPro.plugins.d.ts +4 -4
- package/LineChartPro/LineChartPro.plugins.js +1 -1
- package/PieChartPro/PieChartPro.d.ts +5 -5
- package/PieChartPro/PieChartPro.plugins.d.ts +3 -3
- package/RadarChartPro/RadarChartPro.d.ts +4 -4
- package/RadarChartPro/RadarChartPro.plugins.d.ts +3 -3
- package/RadarChartPro/RadarChartPro.plugins.js +1 -1
- package/SankeyChart/SankeyChart.d.ts +1 -1
- package/SankeyChart/SankeyChart.plugins.d.ts +3 -3
- package/SankeyChart/SankeyChart.plugins.js +1 -1
- package/SankeyChart/SankeyLinkElement.js +2 -2
- package/SankeyChart/SankeyLinkLabel.d.ts +1 -1
- package/SankeyChart/SankeyNodeElement.d.ts +0 -4
- package/SankeyChart/SankeyNodeElement.js +5 -24
- package/SankeyChart/SankeyNodeLabel.d.ts +12 -0
- package/SankeyChart/SankeyNodeLabel.js +61 -0
- package/SankeyChart/SankeyPlot.js +10 -7
- package/SankeyChart/SankeyTooltip/SankeyTooltip.d.ts +1 -1
- package/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +1 -1
- package/SankeyChart/SankeyTooltip/SankeyTooltipContent.d.ts +1 -1
- package/SankeyChart/calculateSankeyLayout.d.ts +2 -2
- package/SankeyChart/calculateSankeyLayout.js +12 -33
- package/SankeyChart/d3Sankey/align.d.ts +4 -4
- package/SankeyChart/d3Sankey/sankey.d.ts +3 -3
- package/SankeyChart/d3Sankey/sankey.js +4 -1
- package/SankeyChart/d3Sankey/sankey.types.d.ts +76 -39
- package/SankeyChart/d3Sankey/sankeyLinkHorizontal.d.ts +2 -2
- package/SankeyChart/plugins/useSankeyHighlight.d.ts +1 -1
- package/SankeyChart/plugins/useSankeyHighlight.js +1 -1
- package/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +2 -2
- package/SankeyChart/plugins/useSankeyHighlight.types.d.ts +3 -3
- package/SankeyChart/sankey.types.d.ts +32 -24
- package/SankeyChart/sankeyClasses.d.ts +3 -1
- package/SankeyChart/sankeyClasses.js +2 -1
- package/SankeyChart/sankeySlots.types.d.ts +4 -4
- package/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +63 -14
- package/SankeyChart/seriesConfig/tooltipGetter.js +5 -2
- package/SankeyChart/utils.d.ts +1 -1
- package/ScatterChartPro/ScatterChartPro.d.ts +6 -6
- package/ScatterChartPro/ScatterChartPro.js +20 -0
- package/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -4
- package/ScatterChartPro/ScatterChartPro.plugins.js +1 -1
- package/context/ChartProApi.d.ts +10 -10
- package/context/useChartProApiContext.d.ts +1 -1
- package/esm/BarChartPro/BarChartPro.d.ts +5 -5
- package/esm/BarChartPro/BarChartPro.js +20 -0
- package/esm/BarChartPro/BarChartPro.plugins.d.ts +4 -4
- package/esm/BarChartPro/BarChartPro.plugins.js +2 -2
- package/esm/ChartContainerPro/ChartContainerPro.d.ts +4 -4
- package/esm/ChartContainerPro/useChartContainerProProps.d.ts +4 -4
- package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +4 -4
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.js +3 -3
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +10 -10
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js +3 -3
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js +2 -2
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +3 -3
- package/esm/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +2 -2
- package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +3 -3
- package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.js +3 -3
- package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +2 -2
- package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.js +3 -3
- package/esm/ChartZoomSlider/internals/previews/PreviewPlot.types.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/previews/ScatterPreviewPlot.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/previews/ScatterPreviewPlot.js +3 -3
- package/esm/ChartZoomSlider/internals/zoom-utils.d.ts +2 -2
- package/esm/ChartsToolbarPro/ChartsToolbarImageExportTrigger.d.ts +3 -3
- package/esm/ChartsToolbarPro/ChartsToolbarPrintExportTrigger.d.ts +3 -3
- package/esm/ChartsToolbarPro/ChartsToolbarPro.d.ts +3 -3
- package/esm/ChartsToolbarPro/ChartsToolbarPro.js +2 -2
- package/esm/ChartsToolbarPro/ChartsToolbarZoomInTrigger.d.ts +2 -2
- package/esm/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +2 -2
- package/esm/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.d.ts +2 -2
- package/esm/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +2 -2
- package/esm/ChartsToolbarPro/Toolbar.types.d.ts +2 -2
- package/esm/ChartsToolbarPro/internals/ChartsMenu.d.ts +1 -1
- package/esm/ChartsToolbarPro/internals/ChartsToolbarDivider.d.ts +1 -1
- package/esm/FunnelChart/FunnelChart.d.ts +9 -9
- package/esm/FunnelChart/FunnelChart.plugins.d.ts +4 -4
- package/esm/FunnelChart/FunnelChart.plugins.js +2 -2
- package/esm/FunnelChart/FunnelPlot.d.ts +2 -2
- package/esm/FunnelChart/FunnelPlot.js +4 -4
- package/esm/FunnelChart/FunnelSection.d.ts +2 -2
- package/esm/FunnelChart/FunnelSectionLabel.d.ts +2 -2
- package/esm/FunnelChart/categoryAxis.types.d.ts +2 -2
- package/esm/FunnelChart/coordinateMapper.d.ts +2 -2
- package/esm/FunnelChart/curves/borderRadiusPolygon.d.ts +1 -1
- package/esm/FunnelChart/curves/bump.d.ts +1 -1
- package/esm/FunnelChart/curves/curve.types.d.ts +1 -1
- package/esm/FunnelChart/curves/getFunnelCurve.d.ts +1 -1
- package/esm/FunnelChart/curves/linear.d.ts +1 -1
- package/esm/FunnelChart/curves/pyramid.d.ts +1 -1
- package/esm/FunnelChart/curves/step-pyramid.d.ts +1 -1
- package/esm/FunnelChart/curves/step.d.ts +1 -1
- package/esm/FunnelChart/funnel.types.d.ts +5 -5
- package/esm/FunnelChart/funnelAxisPlugin/computeAxisValue.d.ts +4 -4
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.d.ts +2 -2
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +3 -3
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +1 -1
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +2 -2
- package/esm/FunnelChart/funnelPlotSlots.types.d.ts +2 -2
- package/esm/FunnelChart/funnelSlots.types.d.ts +6 -6
- package/esm/FunnelChart/labelUtils.d.ts +2 -2
- package/esm/FunnelChart/seriesConfig/extremums.d.ts +1 -1
- package/esm/FunnelChart/seriesConfig/getColor.d.ts +1 -1
- package/esm/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/esm/FunnelChart/seriesConfig/legend.d.ts +1 -1
- package/esm/FunnelChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/esm/FunnelChart/seriesConfig/tooltip.d.ts +1 -1
- package/esm/FunnelChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/esm/FunnelChart/useFunnelChartProps.d.ts +7 -7
- package/esm/Heatmap/Heatmap.d.ts +13 -13
- package/esm/Heatmap/Heatmap.js +10 -0
- package/esm/Heatmap/Heatmap.plugins.d.ts +3 -3
- package/esm/Heatmap/Heatmap.plugins.js +2 -2
- package/esm/Heatmap/HeatmapItem.d.ts +2 -2
- package/esm/Heatmap/HeatmapPlot.d.ts +1 -1
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.d.ts +1 -1
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -1
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +1 -1
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +1 -1
- package/esm/Heatmap/seriesConfig/extremums.d.ts +1 -1
- package/esm/Heatmap/seriesConfig/getColor.d.ts +1 -1
- package/esm/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/esm/Heatmap/seriesConfig/index.d.ts +1 -1
- package/esm/Heatmap/seriesConfig/seriesProcessor.d.ts +1 -1
- package/esm/Heatmap/seriesConfig/tooltip.d.ts +1 -1
- package/esm/Heatmap/seriesConfig/tooltipPosition.d.ts +1 -1
- package/esm/LineChartPro/LineChartPro.d.ts +5 -5
- package/esm/LineChartPro/LineChartPro.js +20 -0
- package/esm/LineChartPro/LineChartPro.plugins.d.ts +4 -4
- package/esm/LineChartPro/LineChartPro.plugins.js +2 -2
- package/esm/PieChartPro/PieChartPro.d.ts +5 -5
- package/esm/PieChartPro/PieChartPro.plugins.d.ts +3 -3
- package/esm/RadarChartPro/RadarChartPro.d.ts +4 -4
- package/esm/RadarChartPro/RadarChartPro.plugins.d.ts +3 -3
- package/esm/RadarChartPro/RadarChartPro.plugins.js +2 -2
- package/esm/SankeyChart/SankeyChart.d.ts +1 -1
- package/esm/SankeyChart/SankeyChart.plugins.d.ts +3 -3
- package/esm/SankeyChart/SankeyChart.plugins.js +2 -2
- package/esm/SankeyChart/SankeyLinkElement.js +3 -3
- package/esm/SankeyChart/SankeyLinkLabel.d.ts +1 -1
- package/esm/SankeyChart/SankeyNodeElement.d.ts +0 -4
- package/esm/SankeyChart/SankeyNodeElement.js +7 -26
- package/esm/SankeyChart/SankeyNodeLabel.d.ts +12 -0
- package/esm/SankeyChart/SankeyNodeLabel.js +55 -0
- package/esm/SankeyChart/SankeyPlot.js +10 -7
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.d.ts +1 -1
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +1 -1
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltipContent.d.ts +1 -1
- package/esm/SankeyChart/calculateSankeyLayout.d.ts +2 -2
- package/esm/SankeyChart/calculateSankeyLayout.js +12 -33
- package/esm/SankeyChart/d3Sankey/align.d.ts +4 -4
- package/esm/SankeyChart/d3Sankey/sankey.d.ts +3 -3
- package/esm/SankeyChart/d3Sankey/sankey.js +4 -1
- package/esm/SankeyChart/d3Sankey/sankey.types.d.ts +76 -39
- package/esm/SankeyChart/d3Sankey/sankeyLinkHorizontal.d.ts +2 -2
- package/esm/SankeyChart/plugins/useSankeyHighlight.d.ts +1 -1
- package/esm/SankeyChart/plugins/useSankeyHighlight.js +1 -1
- package/esm/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +2 -2
- package/esm/SankeyChart/plugins/useSankeyHighlight.types.d.ts +3 -3
- package/esm/SankeyChart/sankey.types.d.ts +32 -24
- package/esm/SankeyChart/sankeyClasses.d.ts +3 -1
- package/esm/SankeyChart/sankeyClasses.js +2 -1
- package/esm/SankeyChart/sankeySlots.types.d.ts +4 -4
- package/esm/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +63 -14
- package/esm/SankeyChart/seriesConfig/tooltipGetter.js +5 -2
- package/esm/SankeyChart/utils.d.ts +1 -1
- package/esm/ScatterChartPro/ScatterChartPro.d.ts +6 -6
- package/esm/ScatterChartPro/ScatterChartPro.js +20 -0
- package/esm/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -4
- package/esm/ScatterChartPro/ScatterChartPro.plugins.js +2 -2
- package/esm/context/ChartProApi.d.ts +10 -10
- package/esm/context/useChartProApiContext.d.ts +1 -1
- package/esm/hooks/useChartProApiRef.d.ts +3 -3
- package/esm/hooks/useFunnelSeries.d.ts +1 -1
- package/esm/hooks/useHeatmapSeries.d.ts +1 -1
- package/esm/hooks/useSankeySeries.d.ts +2 -2
- package/esm/hooks/useSankeySeries.js +3 -2
- package/esm/hooks/zoom/useIsZoomInteracting.js +2 -2
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +2 -0
- package/esm/internals/index.js +1 -0
- package/esm/internals/material/components/BaseMenuItem.d.ts +1 -1
- package/esm/internals/material/components/BasePopper.d.ts +1 -1
- package/esm/internals/material/index.d.ts +3 -3
- package/esm/internals/plugins/allPlugins.d.ts +7 -7
- package/esm/internals/plugins/allPlugins.js +3 -3
- package/esm/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
- package/esm/internals/plugins/useChartProExport/print.d.ts +1 -1
- package/esm/internals/plugins/useChartProExport/useChartProExport.d.ts +2 -2
- package/esm/internals/plugins/useChartProExport/useChartProExport.types.d.ts +1 -1
- package/esm/internals/plugins/useChartProZoom/calculateZoom.d.ts +1 -1
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.d.ts +1 -1
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +3 -3
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +4 -4
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +3 -3
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +2 -2
- package/esm/internals/slots/chartBaseSlotProps.d.ts +1 -1
- package/esm/internals/slots/chartsBaseSlots.d.ts +3 -3
- package/esm/internals/slots/chartsIconSlots.d.ts +2 -2
- package/esm/models/seriesType/heatmap.d.ts +2 -2
- package/esm/themeAugmentation/components.d.ts +1 -1
- package/esm/themeAugmentation/overrides.d.ts +1 -1
- package/esm/themeAugmentation/props.d.ts +4 -4
- package/esm/typeOverloads/modules.d.ts +7 -7
- package/hooks/useChartProApiRef.d.ts +3 -3
- package/hooks/useFunnelSeries.d.ts +1 -1
- package/hooks/useHeatmapSeries.d.ts +1 -1
- package/hooks/useSankeySeries.d.ts +2 -2
- package/hooks/useSankeySeries.js +2 -1
- package/hooks/zoom/useIsZoomInteracting.js +1 -1
- package/index.js +1 -1
- package/internals/index.d.ts +2 -0
- package/internals/index.js +12 -0
- package/internals/material/components/BaseMenuItem.d.ts +1 -1
- package/internals/material/components/BasePopper.d.ts +1 -1
- package/internals/material/index.d.ts +3 -3
- package/internals/plugins/allPlugins.d.ts +7 -7
- package/internals/plugins/allPlugins.js +2 -2
- package/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
- package/internals/plugins/useChartProExport/print.d.ts +1 -1
- package/internals/plugins/useChartProExport/useChartProExport.d.ts +2 -2
- package/internals/plugins/useChartProExport/useChartProExport.types.d.ts +1 -1
- package/internals/plugins/useChartProZoom/calculateZoom.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +3 -3
- package/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -2
- package/internals/plugins/useChartProZoom/useChartProZoom.js +2 -2
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +2 -2
- package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +2 -2
- package/internals/slots/chartBaseSlotProps.d.ts +1 -1
- package/internals/slots/chartsBaseSlots.d.ts +3 -3
- package/internals/slots/chartsIconSlots.d.ts +2 -2
- package/models/seriesType/heatmap.d.ts +2 -2
- package/package.json +5 -5
- package/themeAugmentation/components.d.ts +1 -1
- package/themeAugmentation/overrides.d.ts +1 -1
- package/themeAugmentation/props.d.ts +4 -4
- package/typeOverloads/modules.d.ts +7 -7
|
@@ -6,14 +6,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.getSeriesWithDefaultValues = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _d3Sankey = require("../d3Sankey");
|
|
10
|
+
var _utils = require("../utils");
|
|
9
11
|
const defaultSankeyValueFormatter = v => v == null ? '' : v.toLocaleString();
|
|
10
12
|
const getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {
|
|
11
13
|
const nodeMap = new Map();
|
|
12
14
|
const nodeColor = seriesData.nodeOptions?.color;
|
|
13
|
-
const
|
|
15
|
+
const nodeAlign = seriesData.nodeOptions?.align;
|
|
16
|
+
const {
|
|
17
|
+
color: linkColor = 'source'
|
|
18
|
+
} = seriesData.linkOptions ?? {};
|
|
14
19
|
let colorIndex = -1;
|
|
15
|
-
if (data.nodes) {
|
|
16
|
-
data.nodes.forEach(node => {
|
|
20
|
+
if (seriesData.data.nodes) {
|
|
21
|
+
seriesData.data.nodes.forEach(node => {
|
|
17
22
|
const id = node.id || node.label || '';
|
|
18
23
|
const label = node.label || `${id}`;
|
|
19
24
|
colorIndex += 1;
|
|
@@ -24,34 +29,78 @@ const getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {
|
|
|
24
29
|
}));
|
|
25
30
|
});
|
|
26
31
|
}
|
|
27
|
-
data.links.
|
|
28
|
-
|
|
32
|
+
const links = seriesData.data.links.map(link => {
|
|
33
|
+
// Add default values to nodes
|
|
34
|
+
if (!nodeMap.has(link.source)) {
|
|
29
35
|
colorIndex += 1;
|
|
30
36
|
const source = {
|
|
31
|
-
id:
|
|
32
|
-
label: `${
|
|
37
|
+
id: link.source,
|
|
38
|
+
label: `${link.source}`,
|
|
33
39
|
color: nodeColor ?? colors?.[colorIndex % colors.length]
|
|
34
40
|
};
|
|
35
41
|
nodeMap.set(source.id, source);
|
|
36
42
|
}
|
|
37
|
-
if (!nodeMap.has(
|
|
43
|
+
if (!nodeMap.has(link.target)) {
|
|
38
44
|
colorIndex += 1;
|
|
39
45
|
const target = {
|
|
40
|
-
id:
|
|
41
|
-
label: `${
|
|
46
|
+
id: link.target,
|
|
47
|
+
label: `${link.target}`,
|
|
42
48
|
color: nodeColor ?? colors?.[colorIndex % colors.length]
|
|
43
49
|
};
|
|
44
50
|
nodeMap.set(target.id, target);
|
|
45
51
|
}
|
|
52
|
+
|
|
53
|
+
// Add color to links
|
|
54
|
+
let resolvedColor = link.color ?? linkColor;
|
|
55
|
+
if (resolvedColor === 'source') {
|
|
56
|
+
resolvedColor = nodeMap.get(link.source)?.color ?? linkColor;
|
|
57
|
+
} else if (resolvedColor === 'target') {
|
|
58
|
+
resolvedColor = nodeMap.get(link.target)?.color ?? linkColor;
|
|
59
|
+
}
|
|
60
|
+
return (0, _extends2.default)({}, link, {
|
|
61
|
+
color: resolvedColor
|
|
62
|
+
});
|
|
46
63
|
});
|
|
64
|
+
if (!seriesData.data || !links) {
|
|
65
|
+
return (0, _extends2.default)({
|
|
66
|
+
id: seriesData.id ?? `auto-generated-id-${seriesIndex}`
|
|
67
|
+
}, seriesData, {
|
|
68
|
+
valueFormatter: seriesData.valueFormatter ?? defaultSankeyValueFormatter,
|
|
69
|
+
data: {
|
|
70
|
+
nodes: [],
|
|
71
|
+
links: []
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Prepare the data structure expected by d3-sankey
|
|
77
|
+
const graph = {
|
|
78
|
+
nodes: nodeMap.values().toArray().map(v => (0, _extends2.default)({}, v)),
|
|
79
|
+
links: links.map(v => (0, _extends2.default)({}, v))
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
// Create the sankey layout generator
|
|
83
|
+
const sankeyGenerator = (0, _d3Sankey.sankey)(false).nodeAlign((0, _utils.getNodeAlignFunction)(nodeAlign)).nodeId(d => d.id);
|
|
84
|
+
|
|
85
|
+
// Generate the layout
|
|
86
|
+
let data;
|
|
87
|
+
try {
|
|
88
|
+
data = sankeyGenerator(graph);
|
|
89
|
+
} catch (error) {
|
|
90
|
+
// There are two errors that can occur:
|
|
91
|
+
// 1. If the data contains circular references, d3-sankey will throw an error.
|
|
92
|
+
// 2. If there are missing source/target nodes, d3-sankey will throw an error.
|
|
93
|
+
// We handle the second case by building a map of nodes ourselves, so they are always present.
|
|
94
|
+
if (error instanceof Error && error.message === 'circular link') {
|
|
95
|
+
throw new Error('MUI X Charts: Sankey diagram contains circular references.');
|
|
96
|
+
}
|
|
97
|
+
throw error;
|
|
98
|
+
}
|
|
47
99
|
return (0, _extends2.default)({
|
|
48
100
|
id: seriesData.id ?? `auto-generated-id-${seriesIndex}`
|
|
49
101
|
}, seriesData, {
|
|
50
102
|
valueFormatter: seriesData.valueFormatter ?? defaultSankeyValueFormatter,
|
|
51
|
-
data
|
|
52
|
-
links: data.links,
|
|
53
|
-
nodes: nodeMap
|
|
54
|
-
}
|
|
103
|
+
data
|
|
55
104
|
});
|
|
56
105
|
};
|
|
57
106
|
exports.getSeriesWithDefaultValues = getSeriesWithDefaultValues;
|
|
@@ -16,7 +16,10 @@ const tooltipGetter = params => {
|
|
|
16
16
|
subType
|
|
17
17
|
} = identifier;
|
|
18
18
|
if (subType === 'node') {
|
|
19
|
-
const node = identifier.
|
|
19
|
+
const node = series.data.nodes.find(n => n.id === identifier.nodeId);
|
|
20
|
+
if (!node) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
20
23
|
return {
|
|
21
24
|
identifier,
|
|
22
25
|
color: node.color,
|
|
@@ -31,7 +34,7 @@ const tooltipGetter = params => {
|
|
|
31
34
|
};
|
|
32
35
|
}
|
|
33
36
|
if (subType === 'link') {
|
|
34
|
-
const link = identifier.
|
|
37
|
+
const link = series.data.links.find(l => l.source.id === identifier.sourceId && l.target.id === identifier.targetId);
|
|
35
38
|
if (!link) {
|
|
36
39
|
return null;
|
|
37
40
|
}
|
package/SankeyChart/utils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { sankeyJustify } from "./d3Sankey/index.js";
|
|
2
2
|
import type { SankeyNodeOptions } from "./sankey.types.js";
|
|
3
|
-
export declare const getNodeAlignFunction: (align
|
|
3
|
+
export declare const getNodeAlignFunction: (align?: SankeyNodeOptions["align"]) => typeof sankeyJustify;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ScatterChartProps, ScatterChartSlotProps, ScatterChartSlots } from '@mui/x-charts/ScatterChart';
|
|
3
|
-
import { ChartsTooltipProps } from '@mui/x-charts/ChartsTooltip';
|
|
4
|
-
import { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
5
|
-
import { ChartContainerProProps } from "../ChartContainerPro/ChartContainerPro.js";
|
|
6
|
-
import { ScatterChartProPluginSignatures } from "./ScatterChartPro.plugins.js";
|
|
7
|
-
import { ChartsToolbarProSlots, ChartsToolbarProSlotProps } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
2
|
+
import { type ScatterChartProps, type ScatterChartSlotProps, type ScatterChartSlots } from '@mui/x-charts/ScatterChart';
|
|
3
|
+
import { type ChartsTooltipProps } from '@mui/x-charts/ChartsTooltip';
|
|
4
|
+
import { type ChartsSlotPropsPro, type ChartsSlotsPro } from "../internals/material/index.js";
|
|
5
|
+
import { type ChartContainerProProps } from "../ChartContainerPro/ChartContainerPro.js";
|
|
6
|
+
import { type ScatterChartProPluginSignatures } from "./ScatterChartPro.plugins.js";
|
|
7
|
+
import { type ChartsToolbarProSlots, type 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> {
|
|
10
10
|
/**
|
|
@@ -316,6 +316,11 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
316
316
|
label: _propTypes.default.string,
|
|
317
317
|
labelStyle: _propTypes.default.object,
|
|
318
318
|
offset: _propTypes.default.number,
|
|
319
|
+
ordinalTimeTicks: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['biweekly', 'days', 'hours', 'months', 'quarterly', 'weeks', 'years']), _propTypes.default.shape({
|
|
320
|
+
format: _propTypes.default.func.isRequired,
|
|
321
|
+
getTickNumber: _propTypes.default.func.isRequired,
|
|
322
|
+
isTick: _propTypes.default.func.isRequired
|
|
323
|
+
})]).isRequired),
|
|
319
324
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
320
325
|
reverse: _propTypes.default.bool,
|
|
321
326
|
scaleType: _propTypes.default.oneOf(['band']),
|
|
@@ -384,6 +389,11 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
384
389
|
label: _propTypes.default.string,
|
|
385
390
|
labelStyle: _propTypes.default.object,
|
|
386
391
|
offset: _propTypes.default.number,
|
|
392
|
+
ordinalTimeTicks: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['biweekly', 'days', 'hours', 'months', 'quarterly', 'weeks', 'years']), _propTypes.default.shape({
|
|
393
|
+
format: _propTypes.default.func.isRequired,
|
|
394
|
+
getTickNumber: _propTypes.default.func.isRequired,
|
|
395
|
+
isTick: _propTypes.default.func.isRequired
|
|
396
|
+
})]).isRequired),
|
|
387
397
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
388
398
|
reverse: _propTypes.default.bool,
|
|
389
399
|
scaleType: _propTypes.default.oneOf(['point']),
|
|
@@ -888,6 +898,11 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
888
898
|
label: _propTypes.default.string,
|
|
889
899
|
labelStyle: _propTypes.default.object,
|
|
890
900
|
offset: _propTypes.default.number,
|
|
901
|
+
ordinalTimeTicks: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['biweekly', 'days', 'hours', 'months', 'quarterly', 'weeks', 'years']), _propTypes.default.shape({
|
|
902
|
+
format: _propTypes.default.func.isRequired,
|
|
903
|
+
getTickNumber: _propTypes.default.func.isRequired,
|
|
904
|
+
isTick: _propTypes.default.func.isRequired
|
|
905
|
+
})]).isRequired),
|
|
891
906
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
892
907
|
reverse: _propTypes.default.bool,
|
|
893
908
|
scaleType: _propTypes.default.oneOf(['band']),
|
|
@@ -955,6 +970,11 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
955
970
|
label: _propTypes.default.string,
|
|
956
971
|
labelStyle: _propTypes.default.object,
|
|
957
972
|
offset: _propTypes.default.number,
|
|
973
|
+
ordinalTimeTicks: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['biweekly', 'days', 'hours', 'months', 'quarterly', 'weeks', 'years']), _propTypes.default.shape({
|
|
974
|
+
format: _propTypes.default.func.isRequired,
|
|
975
|
+
getTickNumber: _propTypes.default.func.isRequired,
|
|
976
|
+
isTick: _propTypes.default.func.isRequired
|
|
977
|
+
})]).isRequired),
|
|
958
978
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
959
979
|
reverse: _propTypes.default.bool,
|
|
960
980
|
scaleType: _propTypes.default.oneOf(['point']),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartClosestPointSignature, UseChartKeyboardNavigationSignature, UseChartBrushSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
2
|
-
import { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
-
import { UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
|
|
4
|
-
export type ScatterChartProPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'scatter'>, UseChartHighlightSignature, UseChartClosestPointSignature, UseChartKeyboardNavigationSignature, UseChartProZoomSignature, UseChartProExportSignature];
|
|
1
|
+
import { type UseChartZAxisSignature, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartHighlightSignature, type UseChartClosestPointSignature, type UseChartKeyboardNavigationSignature, type UseChartBrushSignature, type ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
2
|
+
import { type UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
+
import { type UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
|
|
4
|
+
export type ScatterChartProPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'scatter'>, UseChartHighlightSignature, UseChartClosestPointSignature, UseChartKeyboardNavigationSignature, UseChartProZoomSignature, UseChartProExportSignature];
|
|
5
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.useChartBrush, _internals.useChartInteraction, _internals.useChartCartesianAxis, _internals.useChartHighlight, _internals.useChartClosestPoint, _internals.useChartKeyboardNavigation, _useChartProZoom.useChartProZoom, _useChartProExport.useChartProExport];
|
|
10
|
+
const SCATTER_CHART_PRO_PLUGINS = exports.SCATTER_CHART_PRO_PLUGINS = [_internals.useChartZAxis, _internals.useChartBrush, _internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartCartesianAxis, _internals.useChartHighlight, _internals.useChartClosestPoint, _internals.useChartKeyboardNavigation, _useChartProZoom.useChartProZoom, _useChartProExport.useChartProExport];
|
package/context/ChartProApi.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ChartAnyPluginSignature, ChartPublicAPI } from '@mui/x-charts/internals';
|
|
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
|
-
import { AllPluginSignatures, DefaultPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
7
|
-
import { FunnelChartPluginSignatures } from "../FunnelChart/FunnelChart.plugins.js";
|
|
8
|
-
import { RadarChartProPluginSignatures } from "../RadarChartPro/RadarChartPro.plugins.js";
|
|
9
|
-
import { PieChartProPluginSignatures } from "../PieChartPro/PieChartPro.plugins.js";
|
|
10
|
-
import { SankeyChartPluginSignatures } from "../SankeyChart/SankeyChart.plugins.js";
|
|
1
|
+
import { type ChartAnyPluginSignature, type ChartPublicAPI } from '@mui/x-charts/internals';
|
|
2
|
+
import { type HeatmapPluginSignatures } from "../Heatmap/Heatmap.plugins.js";
|
|
3
|
+
import { type LineChartProPluginSignatures } from "../LineChartPro/LineChartPro.plugins.js";
|
|
4
|
+
import { type ScatterChartProPluginSignatures } from "../ScatterChartPro/ScatterChartPro.plugins.js";
|
|
5
|
+
import { type BarChartProPluginSignatures } from "../BarChartPro/BarChartPro.plugins.js";
|
|
6
|
+
import { type AllPluginSignatures, type DefaultPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
7
|
+
import { type FunnelChartPluginSignatures } from "../FunnelChart/FunnelChart.plugins.js";
|
|
8
|
+
import { type RadarChartProPluginSignatures } from "../RadarChartPro/RadarChartPro.plugins.js";
|
|
9
|
+
import { type PieChartProPluginSignatures } from "../PieChartPro/PieChartPro.plugins.js";
|
|
10
|
+
import { type SankeyChartPluginSignatures } from "../SankeyChart/SankeyChart.plugins.js";
|
|
11
11
|
export type ProPluginsPerSeriesType = {
|
|
12
12
|
heatmap: HeatmapPluginSignatures;
|
|
13
13
|
line: LineChartProPluginSignatures;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartProApi } from "./ChartProApi.js";
|
|
1
|
+
import { type ChartProApi } from "./ChartProApi.js";
|
|
2
2
|
/**
|
|
3
3
|
* The `useChartProApiContext` hook provides access to the chart API.
|
|
4
4
|
* This is only available when the chart is rendered within a chart or a `ChartDataProvider` component.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { BarChartProps, BarChartSlotProps, BarChartSlots } from '@mui/x-charts/BarChart';
|
|
3
|
-
import { ChartsToolbarProSlotProps, ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
4
|
-
import { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
5
|
-
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
6
|
-
import { BarChartProPluginSignatures } from "./BarChartPro.plugins.js";
|
|
2
|
+
import { type BarChartProps, type BarChartSlotProps, type BarChartSlots } from '@mui/x-charts/BarChart';
|
|
3
|
+
import { type ChartsToolbarProSlotProps, type ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
4
|
+
import { type ChartsSlotPropsPro, type ChartsSlotsPro } from "../internals/material/index.js";
|
|
5
|
+
import { type ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
6
|
+
import { type 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
9
|
export interface BarChartProProps extends Omit<BarChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<ChartContainerProProps<'bar', BarChartProPluginSignatures>, 'series' | 'plugins' | 'seriesConfig' | 'slots' | 'slotProps' | 'experimentalFeatures'> {
|
|
@@ -325,6 +325,11 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
325
325
|
label: PropTypes.string,
|
|
326
326
|
labelStyle: PropTypes.object,
|
|
327
327
|
offset: PropTypes.number,
|
|
328
|
+
ordinalTimeTicks: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['biweekly', 'days', 'hours', 'months', 'quarterly', 'weeks', 'years']), PropTypes.shape({
|
|
329
|
+
format: PropTypes.func.isRequired,
|
|
330
|
+
getTickNumber: PropTypes.func.isRequired,
|
|
331
|
+
isTick: PropTypes.func.isRequired
|
|
332
|
+
})]).isRequired),
|
|
328
333
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
329
334
|
reverse: PropTypes.bool,
|
|
330
335
|
scaleType: PropTypes.oneOf(['band']),
|
|
@@ -393,6 +398,11 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
393
398
|
label: PropTypes.string,
|
|
394
399
|
labelStyle: PropTypes.object,
|
|
395
400
|
offset: PropTypes.number,
|
|
401
|
+
ordinalTimeTicks: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['biweekly', 'days', 'hours', 'months', 'quarterly', 'weeks', 'years']), PropTypes.shape({
|
|
402
|
+
format: PropTypes.func.isRequired,
|
|
403
|
+
getTickNumber: PropTypes.func.isRequired,
|
|
404
|
+
isTick: PropTypes.func.isRequired
|
|
405
|
+
})]).isRequired),
|
|
396
406
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
397
407
|
reverse: PropTypes.bool,
|
|
398
408
|
scaleType: PropTypes.oneOf(['point']),
|
|
@@ -897,6 +907,11 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
897
907
|
label: PropTypes.string,
|
|
898
908
|
labelStyle: PropTypes.object,
|
|
899
909
|
offset: PropTypes.number,
|
|
910
|
+
ordinalTimeTicks: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['biweekly', 'days', 'hours', 'months', 'quarterly', 'weeks', 'years']), PropTypes.shape({
|
|
911
|
+
format: PropTypes.func.isRequired,
|
|
912
|
+
getTickNumber: PropTypes.func.isRequired,
|
|
913
|
+
isTick: PropTypes.func.isRequired
|
|
914
|
+
})]).isRequired),
|
|
900
915
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
901
916
|
reverse: PropTypes.bool,
|
|
902
917
|
scaleType: PropTypes.oneOf(['band']),
|
|
@@ -964,6 +979,11 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
964
979
|
label: PropTypes.string,
|
|
965
980
|
labelStyle: PropTypes.object,
|
|
966
981
|
offset: PropTypes.number,
|
|
982
|
+
ordinalTimeTicks: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['biweekly', 'days', 'hours', 'months', 'quarterly', 'weeks', 'years']), PropTypes.shape({
|
|
983
|
+
format: PropTypes.func.isRequired,
|
|
984
|
+
getTickNumber: PropTypes.func.isRequired,
|
|
985
|
+
isTick: PropTypes.func.isRequired
|
|
986
|
+
})]).isRequired),
|
|
967
987
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
968
988
|
reverse: PropTypes.bool,
|
|
969
989
|
scaleType: PropTypes.oneOf(['point']),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartBrushSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
2
|
-
import { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
-
import { UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
|
|
4
|
-
export type BarChartProPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'bar'>, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartProZoomSignature, UseChartProExportSignature];
|
|
1
|
+
import { type UseChartZAxisSignature, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartHighlightSignature, type UseChartKeyboardNavigationSignature, type UseChartBrushSignature, type ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
2
|
+
import { type UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
+
import { type UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
|
|
4
|
+
export type BarChartProPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'bar'>, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartProZoomSignature, UseChartProExportSignature];
|
|
5
5
|
export declare const BAR_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<BarChartProPluginSignatures>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartKeyboardNavigation, useChartBrush } from '@mui/x-charts/internals';
|
|
1
|
+
import { useChartZAxis, useChartCartesianAxis, useChartTooltip, useChartInteraction, useChartHighlight, useChartKeyboardNavigation, useChartBrush } 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, useChartBrush, useChartInteraction, useChartCartesianAxis, useChartHighlight, useChartKeyboardNavigation, useChartProZoom, useChartProExport];
|
|
4
|
+
export const BAR_CHART_PRO_PLUGINS = [useChartZAxis, useChartBrush, useChartTooltip, useChartInteraction, useChartCartesianAxis, useChartHighlight, useChartKeyboardNavigation, useChartProZoom, useChartProExport];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ChartsSurfaceProps } from '@mui/x-charts/ChartsSurface';
|
|
3
|
-
import { ChartAnyPluginSignature, ChartSeriesType } from '@mui/x-charts/internals';
|
|
4
|
-
import { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
-
import { ChartDataProviderProProps } from "../ChartDataProviderPro/index.js";
|
|
2
|
+
import { type ChartsSurfaceProps } from '@mui/x-charts/ChartsSurface';
|
|
3
|
+
import { type ChartAnyPluginSignature, type ChartSeriesType } from '@mui/x-charts/internals';
|
|
4
|
+
import { type AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
+
import { type ChartDataProviderProProps } from "../ChartDataProviderPro/index.js";
|
|
6
6
|
export type ChartContainerProProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartDataProviderProProps<TSeries, TSignatures> & ChartsSurfaceProps;
|
|
7
7
|
type ChartContainerProComponent = <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartContainerProProps<TSeries, TSignatures> & {
|
|
8
8
|
ref?: React.ForwardedRef<SVGSVGElement>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ChartAnyPluginSignature, ChartSeriesType, UseChartContainerPropsReturnValue } from '@mui/x-charts/internals';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { ChartDataProviderProps } from '@mui/x-charts/ChartDataProvider';
|
|
1
|
+
import { type ChartAnyPluginSignature, type ChartSeriesType, type UseChartContainerPropsReturnValue } from '@mui/x-charts/internals';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
import { type ChartDataProviderProps } from '@mui/x-charts/ChartDataProvider';
|
|
4
4
|
import type { ChartContainerProProps } from "./ChartContainerPro.js";
|
|
5
|
-
import { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
+
import { type AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
6
6
|
export type UseChartContainerProPropsReturnValue<TSeries extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = Pick<UseChartContainerPropsReturnValue<TSeries, TSignatures>, 'chartsSurfaceProps' | 'children'> & {
|
|
7
7
|
chartDataProviderProProps: ChartDataProviderProps<TSeries, TSignatures>;
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ChartSeriesType, ChartAnyPluginSignature, ChartProviderProps } from '@mui/x-charts/internals';
|
|
2
|
-
import { ChartDataProviderProps } from '@mui/x-charts/ChartDataProvider';
|
|
3
|
-
import { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
4
|
-
import { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
1
|
+
import { type ChartSeriesType, type ChartAnyPluginSignature, type ChartProviderProps } from '@mui/x-charts/internals';
|
|
2
|
+
import { type ChartDataProviderProps } from '@mui/x-charts/ChartDataProvider';
|
|
3
|
+
import { type ChartsSlotPropsPro, type ChartsSlotsPro } from "../internals/material/index.js";
|
|
4
|
+
import { type AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
5
|
export type ChartDataProviderProProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartDataProviderProps<TSeries, TSignatures> & ChartProviderProps<TSeries, TSignatures>['pluginParams'] & {
|
|
6
6
|
/**
|
|
7
7
|
* Slots to customize charts' components.
|
|
@@ -10,7 +10,7 @@ import { defaultSlotsMaterial } from "../internals/material/index.js";
|
|
|
10
10
|
import { DEFAULT_PLUGINS } from "../internals/plugins/allPlugins.js";
|
|
11
11
|
import { useChartDataProviderProProps } from "./useChartDataProviderProProps.js";
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
const releaseInfo = "
|
|
13
|
+
const releaseInfo = "MTc2NjAxNjAwMDAwMA==";
|
|
14
14
|
const packageIdentifier = 'x-charts-pro';
|
|
15
15
|
/**
|
|
16
16
|
* Orchestrates the data providers for the chart components and hooks.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartAnyPluginSignature, ChartSeriesType } from '@mui/x-charts/internals';
|
|
1
|
+
import { type ChartAnyPluginSignature, type ChartSeriesType } from '@mui/x-charts/internals';
|
|
2
2
|
import type { ChartDataProviderProProps } from "./ChartDataProviderPro.js";
|
|
3
3
|
import type { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
4
4
|
export declare const useChartDataProviderProProps: <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartDataProviderProProps<TSeries, TSignatures>) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP, selectorChartAxisZoomOptionsLookup, useDrawingArea,
|
|
4
|
+
import { DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP, selectorChartAxisZoomOptionsLookup, useDrawingArea, useStore, ZOOM_SLIDER_MARGIN, ZOOM_SLIDER_PREVIEW_SIZE } from '@mui/x-charts/internals';
|
|
5
5
|
import { useXAxes, useYAxes } from '@mui/x-charts/hooks';
|
|
6
6
|
import { ChartAxisZoomSliderPreview } from "./ChartAxisZoomSliderPreview.js";
|
|
7
7
|
import { ZOOM_SLIDER_ACTIVE_TRACK_SIZE, ZOOM_SLIDER_SIZE, ZOOM_SLIDER_TRACK_SIZE } from "./constants.js";
|
|
@@ -19,8 +19,8 @@ export function ChartAxisZoomSlider({
|
|
|
19
19
|
}) {
|
|
20
20
|
const store = useStore();
|
|
21
21
|
const drawingArea = useDrawingArea();
|
|
22
|
-
const zoomData =
|
|
23
|
-
const zoomOptions =
|
|
22
|
+
const zoomData = store.use(selectorChartAxisZoomData, axisId);
|
|
23
|
+
const zoomOptions = store.use(selectorChartAxisZoomOptionsLookup, axisId);
|
|
24
24
|
const [showTooltip, setShowTooltip] = React.useState(false);
|
|
25
25
|
const {
|
|
26
26
|
xAxis
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import { styled } from '@mui/material/styles';
|
|
5
|
-
import { getSVGPoint, invertScale, selectorChartAxis, selectorChartAxisZoomOptionsLookup, useChartContext, useDrawingArea,
|
|
5
|
+
import { getSVGPoint, invertScale, selectorChartAxis, selectorChartAxisZoomOptionsLookup, useChartContext, useDrawingArea, useStore } from '@mui/x-charts/internals';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { rafThrottle } from '@mui/x-internals/rafThrottle';
|
|
8
8
|
import { shouldForwardProp } from '@mui/system';
|
|
@@ -55,7 +55,7 @@ export function ChartAxisZoomSliderActiveTrack({
|
|
|
55
55
|
svgRef
|
|
56
56
|
} = useChartContext();
|
|
57
57
|
const store = useStore();
|
|
58
|
-
const axis =
|
|
58
|
+
const axis = store.use(selectorChartAxis, axisId);
|
|
59
59
|
const drawingArea = useDrawingArea();
|
|
60
60
|
const activePreviewRectRef = React.useRef(null);
|
|
61
61
|
const [startThumbEl, setStartThumbEl] = React.useState(null);
|
|
@@ -81,7 +81,7 @@ export function ChartAxisZoomSliderActiveTrack({
|
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
83
|
const point = getSVGPoint(element, event);
|
|
84
|
-
const pointerZoom = calculateZoomFromPoint(store.
|
|
84
|
+
const pointerZoom = calculateZoomFromPoint(store.state, axisId, point);
|
|
85
85
|
if (pointerZoom === null) {
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
@@ -97,13 +97,13 @@ export function ChartAxisZoomSliderActiveTrack({
|
|
|
97
97
|
// Prevent text selection when dragging
|
|
98
98
|
event.preventDefault();
|
|
99
99
|
activePreviewRect.setPointerCapture(event.pointerId);
|
|
100
|
-
const axisZoomData = selectorChartAxisZoomData(store.
|
|
100
|
+
const axisZoomData = selectorChartAxisZoomData(store.state, axisId);
|
|
101
101
|
const element = svgRef.current;
|
|
102
102
|
if (!axisZoomData || !element) {
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
105
|
const point = getSVGPoint(element, event);
|
|
106
|
-
const pointerDownZoom = calculateZoomFromPoint(store.
|
|
106
|
+
const pointerDownZoom = calculateZoomFromPoint(store.state, axisId, point);
|
|
107
107
|
if (pointerDownZoom === null) {
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
@@ -126,10 +126,10 @@ export function ChartAxisZoomSliderActiveTrack({
|
|
|
126
126
|
}
|
|
127
127
|
const point = getSVGPoint(element, event);
|
|
128
128
|
instance.setZoomData(prevZoomData => {
|
|
129
|
-
const zoomOptions = selectorChartAxisZoomOptionsLookup(store.
|
|
129
|
+
const zoomOptions = selectorChartAxisZoomOptionsLookup(store.state, axisId);
|
|
130
130
|
return prevZoomData.map(zoom => {
|
|
131
131
|
if (zoom.axisId === axisId) {
|
|
132
|
-
const newStart = calculateZoomFromPoint(store.
|
|
132
|
+
const newStart = calculateZoomFromPoint(store.state, axisId, point);
|
|
133
133
|
if (newStart === null) {
|
|
134
134
|
return zoom;
|
|
135
135
|
}
|
|
@@ -148,10 +148,10 @@ export function ChartAxisZoomSliderActiveTrack({
|
|
|
148
148
|
}
|
|
149
149
|
const point = getSVGPoint(element, event);
|
|
150
150
|
instance.setZoomData(prevZoomData => {
|
|
151
|
-
const zoomOptions = selectorChartAxisZoomOptionsLookup(store.
|
|
151
|
+
const zoomOptions = selectorChartAxisZoomOptionsLookup(store.state, axisId);
|
|
152
152
|
return prevZoomData.map(zoom => {
|
|
153
153
|
if (zoom.axisId === axisId) {
|
|
154
|
-
const newEnd = calculateZoomFromPoint(store.
|
|
154
|
+
const newEnd = calculateZoomFromPoint(store.state, axisId, point);
|
|
155
155
|
if (newEnd === null) {
|
|
156
156
|
return zoom;
|
|
157
157
|
}
|
|
@@ -174,7 +174,7 @@ export function ChartAxisZoomSliderActiveTrack({
|
|
|
174
174
|
const {
|
|
175
175
|
minStart,
|
|
176
176
|
maxEnd
|
|
177
|
-
} = selectorChartAxisZoomOptionsLookup(store.
|
|
177
|
+
} = selectorChartAxisZoomOptionsLookup(store.state, axisId);
|
|
178
178
|
const range = maxEnd - minStart;
|
|
179
179
|
const zoomStart = Math.max(minStart, zoomData.start);
|
|
180
180
|
const zoomEnd = Math.min(zoomData.end, maxEnd);
|
|
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["axisId", "axisDirection", "reverse"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { styled } from '@mui/material/styles';
|
|
6
|
-
import { selectorChartAxisZoomOptionsLookup,
|
|
6
|
+
import { selectorChartAxisZoomOptionsLookup, useStore } from '@mui/x-charts/internals';
|
|
7
7
|
import { alpha } from '@mui/system';
|
|
8
8
|
import useId from '@mui/utils/useId';
|
|
9
9
|
import { selectorChartAxisZoomData } from "../../internals/plugins/useChartProZoom/index.js";
|
|
@@ -42,8 +42,8 @@ function PreviewRectangles(props) {
|
|
|
42
42
|
axisDirection
|
|
43
43
|
} = props;
|
|
44
44
|
const store = useStore();
|
|
45
|
-
const zoomData =
|
|
46
|
-
const zoomOptions =
|
|
45
|
+
const zoomData = store.use(selectorChartAxisZoomData, axisId);
|
|
46
|
+
const zoomOptions = store.use(selectorChartAxisZoomOptionsLookup, axisId);
|
|
47
47
|
const id = useId();
|
|
48
48
|
if (!zoomData) {
|
|
49
49
|
return null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { selectorChartSeriesProcessed,
|
|
3
|
+
import { selectorChartSeriesProcessed, useStore } from '@mui/x-charts/internals';
|
|
4
4
|
import { LinePreviewPlot } from "./previews/LinePreviewPlot.js";
|
|
5
5
|
import { AreaPreviewPlot } from "./previews/AreaPreviewPlot.js";
|
|
6
6
|
import { BarPreviewPlot } from "./previews/BarPreviewPlot.js";
|
|
@@ -15,7 +15,7 @@ export function ChartAxisZoomSliderPreviewContent(props) {
|
|
|
15
15
|
height
|
|
16
16
|
} = props;
|
|
17
17
|
const store = useStore();
|
|
18
|
-
const processedSeries =
|
|
18
|
+
const processedSeries = store.use(selectorChartSeriesProcessed);
|
|
19
19
|
const children = [];
|
|
20
20
|
const clipId = `zoom-preview-mask-${axisId}`;
|
|
21
21
|
const hasLineSeries = (processedSeries.line?.seriesOrder?.length ?? 0) > 0;
|
|
@@ -65,17 +65,17 @@ export function ChartAxisZoomSliderTrack(_ref) {
|
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
const pointerDownPoint = getSVGPoint(element, event);
|
|
68
|
-
const zoomFromPointerDown = calculateZoomFromPoint(store.
|
|
68
|
+
const zoomFromPointerDown = calculateZoomFromPoint(store.state, axisId, pointerDownPoint);
|
|
69
69
|
if (zoomFromPointerDown === null) {
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
72
|
const onPointerMove = rafThrottle(function onPointerMove(pointerMoveEvent) {
|
|
73
73
|
const pointerMovePoint = getSVGPoint(element, pointerMoveEvent);
|
|
74
|
-
const zoomFromPointerMove = calculateZoomFromPoint(store.
|
|
74
|
+
const zoomFromPointerMove = calculateZoomFromPoint(store.state, axisId, pointerMovePoint);
|
|
75
75
|
if (zoomFromPointerMove === null) {
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
const zoomOptions = selectorChartAxisZoomOptionsLookup(store.
|
|
78
|
+
const zoomOptions = selectorChartAxisZoomOptionsLookup(store.state, axisId);
|
|
79
79
|
instance.setAxisZoomData(axisId, prevZoomData => {
|
|
80
80
|
if (zoomFromPointerMove > zoomFromPointerDown) {
|
|
81
81
|
const end = calculateZoomEnd(zoomFromPointerMove, _extends({}, prevZoomData, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { PopperProps } from '@mui/material/Popper';
|
|
2
|
+
import { type PopperProps } from '@mui/material/Popper';
|
|
3
3
|
interface ChartsTooltipZoomSliderValueProps extends Pick<PopperProps, 'anchorEl' | 'open' | 'modifiers' | 'placement'>, React.PropsWithChildren {}
|
|
4
4
|
export declare function ChartsTooltipZoomSliderValue({
|
|
5
5
|
anchorEl,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { SeriesId } from '@mui/x-charts/internals';
|
|
3
|
-
import { PreviewPlotProps } from "./PreviewPlot.types.js";
|
|
2
|
+
import { type SeriesId } from '@mui/x-charts/internals';
|
|
3
|
+
import { type PreviewPlotProps } from "./PreviewPlot.types.js";
|
|
4
4
|
interface AreaPreviewPlotProps extends PreviewPlotProps {}
|
|
5
5
|
export declare function AreaPreviewPlot({
|
|
6
6
|
axisId
|