@mui/x-charts-pro 8.0.0-alpha.9 → 8.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChartPro/BarChartPro.d.ts +4 -4
- package/BarChartPro/BarChartPro.js +240 -284
- package/BarChartPro/BarChartPro.plugins.d.ts +4 -0
- package/BarChartPro/BarChartPro.plugins.js +9 -0
- package/BarChartPro/index.d.ts +1 -1
- package/BarChartPro/index.js +16 -1
- package/CHANGELOG.md +1446 -0
- package/ChartContainerPro/ChartContainerPro.d.ts +8 -9
- package/ChartContainerPro/ChartContainerPro.js +181 -174
- package/ChartContainerPro/index.d.ts +2 -1
- package/ChartContainerPro/index.js +17 -1
- package/ChartContainerPro/useChartContainerProProps.d.ts +5 -5
- package/ChartContainerPro/useChartContainerProProps.js +28 -19
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +7 -7
- package/ChartDataProviderPro/ChartDataProviderPro.js +40 -220
- package/ChartDataProviderPro/index.d.ts +2 -1
- package/ChartDataProviderPro/index.js +17 -1
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +7 -7
- package/ChartDataProviderPro/useChartDataProviderProProps.js +10 -6
- package/FunnelChart/FunnelChart.d.ts +37 -0
- package/FunnelChart/FunnelChart.js +218 -0
- package/FunnelChart/FunnelPlot.d.ts +16 -0
- package/FunnelChart/FunnelPlot.js +191 -0
- package/FunnelChart/FunnelSection.d.ts +15 -0
- package/FunnelChart/FunnelSection.js +62 -0
- package/FunnelChart/categoryAxis.types.d.ts +24 -0
- package/FunnelChart/funnel.types.d.ts +124 -0
- package/FunnelChart/funnelPlotSlots.types.d.ts +20 -0
- package/FunnelChart/funnelSectionClasses.d.ts +13 -0
- package/FunnelChart/funnelSectionClasses.js +28 -0
- package/FunnelChart/funnelSlots.types.d.ts +19 -0
- package/FunnelChart/funnelStepCurve.d.ts +4 -0
- package/FunnelChart/funnelStepCurve.js +74 -0
- package/FunnelChart/index.d.ts +7 -0
- package/FunnelChart/index.js +59 -0
- package/FunnelChart/labelUtils.d.ts +42 -0
- package/FunnelChart/labelUtils.js +174 -0
- package/FunnelChart/seriesConfig/extremums.d.ts +3 -0
- package/FunnelChart/seriesConfig/extremums.js +50 -0
- package/FunnelChart/seriesConfig/getColor.d.ts +3 -0
- package/FunnelChart/seriesConfig/getColor.js +10 -0
- package/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +18 -0
- package/FunnelChart/seriesConfig/index.d.ts +2 -0
- package/FunnelChart/seriesConfig/index.js +22 -0
- package/FunnelChart/seriesConfig/legend.d.ts +3 -0
- package/FunnelChart/seriesConfig/legend.js +31 -0
- package/FunnelChart/seriesConfig/seriesProcessor.d.ts +3 -0
- package/FunnelChart/seriesConfig/seriesProcessor.js +96 -0
- package/FunnelChart/seriesConfig/tooltip.d.ts +3 -0
- package/FunnelChart/seriesConfig/tooltip.js +36 -0
- package/FunnelChart/useFunnelChartProps.d.ts +30 -0
- package/FunnelChart/useFunnelChartProps.js +168 -0
- package/Heatmap/Heatmap.d.ts +45 -45
- package/Heatmap/Heatmap.js +236 -244
- package/Heatmap/Heatmap.plugins.d.ts +3 -0
- package/Heatmap/Heatmap.plugins.js +8 -0
- package/Heatmap/HeatmapItem.d.ts +33 -33
- package/Heatmap/HeatmapItem.js +43 -36
- package/Heatmap/HeatmapPlot.d.ts +4 -5
- package/Heatmap/HeatmapPlot.js +22 -16
- package/Heatmap/HeatmapTooltip.d.ts +3 -4
- package/Heatmap/HeatmapTooltip.js +101 -89
- package/Heatmap/heatmapClasses.d.ts +7 -7
- package/Heatmap/heatmapClasses.js +15 -7
- package/Heatmap/index.d.ts +4 -4
- package/Heatmap/index.js +47 -4
- package/Heatmap/{extremums.d.ts → seriesConfig/extremums.d.ts} +1 -1
- package/Heatmap/{getColor.d.ts → seriesConfig/getColor.d.ts} +1 -1
- package/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +15 -0
- package/Heatmap/seriesConfig/index.d.ts +2 -0
- package/Heatmap/seriesConfig/index.js +21 -0
- package/Heatmap/seriesConfig/seriesProcessor.d.ts +3 -0
- package/{node/Heatmap/formatter.js → Heatmap/seriesConfig/seriesProcessor.js} +2 -2
- package/Heatmap/seriesConfig/tooltip.d.ts +3 -0
- package/Heatmap/seriesConfig/tooltip.js +31 -0
- package/LineChartPro/LineChartPro.d.ts +4 -4
- package/LineChartPro/LineChartPro.js +242 -340
- package/LineChartPro/LineChartPro.plugins.d.ts +4 -0
- package/LineChartPro/LineChartPro.plugins.js +9 -0
- package/LineChartPro/index.d.ts +1 -1
- package/LineChartPro/index.js +16 -1
- package/README.md +1 -1
- package/ScatterChartPro/ScatterChartPro.d.ts +4 -4
- package/ScatterChartPro/ScatterChartPro.js +244 -235
- package/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -0
- package/ScatterChartPro/ScatterChartPro.plugins.js +9 -0
- package/ScatterChartPro/index.d.ts +1 -1
- package/ScatterChartPro/index.js +16 -1
- package/esm/BarChartPro/BarChartPro.d.ts +18 -0
- package/esm/BarChartPro/BarChartPro.js +404 -0
- package/esm/BarChartPro/BarChartPro.plugins.d.ts +4 -0
- package/esm/BarChartPro/BarChartPro.plugins.js +3 -0
- package/esm/BarChartPro/index.d.ts +1 -0
- package/esm/BarChartPro/index.js +1 -0
- package/esm/ChartContainerPro/ChartContainerPro.d.ts +35 -0
- package/esm/ChartContainerPro/ChartContainerPro.js +290 -0
- package/esm/ChartContainerPro/index.d.ts +2 -0
- package/esm/ChartContainerPro/index.js +2 -0
- package/esm/ChartContainerPro/useChartContainerProProps.d.ts +9 -0
- package/esm/ChartContainerPro/useChartContainerProProps.js +35 -0
- package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +37 -0
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +106 -0
- package/esm/ChartDataProviderPro/index.d.ts +2 -0
- package/esm/ChartDataProviderPro/index.js +2 -0
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +8 -0
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.js +15 -0
- package/esm/FunnelChart/FunnelChart.d.ts +37 -0
- package/esm/FunnelChart/FunnelChart.js +212 -0
- package/esm/FunnelChart/FunnelPlot.d.ts +16 -0
- package/esm/FunnelChart/FunnelPlot.js +184 -0
- package/esm/FunnelChart/FunnelSection.d.ts +15 -0
- package/esm/FunnelChart/FunnelSection.js +56 -0
- package/esm/FunnelChart/categoryAxis.types.d.ts +24 -0
- package/esm/FunnelChart/funnel.types.d.ts +124 -0
- package/esm/FunnelChart/funnelPlotSlots.types.d.ts +20 -0
- package/esm/FunnelChart/funnelPlotSlots.types.js +1 -0
- package/esm/FunnelChart/funnelSectionClasses.d.ts +13 -0
- package/esm/FunnelChart/funnelSectionClasses.js +20 -0
- package/esm/FunnelChart/funnelSlots.types.d.ts +19 -0
- package/esm/FunnelChart/funnelSlots.types.js +1 -0
- package/esm/FunnelChart/funnelStepCurve.d.ts +4 -0
- package/esm/FunnelChart/funnelStepCurve.js +67 -0
- package/esm/FunnelChart/index.d.ts +7 -0
- package/esm/FunnelChart/index.js +5 -0
- package/esm/FunnelChart/labelUtils.d.ts +42 -0
- package/esm/FunnelChart/labelUtils.js +166 -0
- package/esm/FunnelChart/seriesConfig/extremums.d.ts +3 -0
- package/esm/FunnelChart/seriesConfig/extremums.js +42 -0
- package/esm/FunnelChart/seriesConfig/getColor.d.ts +3 -0
- package/esm/FunnelChart/seriesConfig/getColor.js +4 -0
- package/esm/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/esm/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +11 -0
- package/esm/FunnelChart/seriesConfig/index.d.ts +2 -0
- package/esm/FunnelChart/seriesConfig/index.js +15 -0
- package/esm/FunnelChart/seriesConfig/legend.d.ts +3 -0
- package/esm/FunnelChart/seriesConfig/legend.js +25 -0
- package/esm/FunnelChart/seriesConfig/seriesProcessor.d.ts +3 -0
- package/esm/FunnelChart/seriesConfig/seriesProcessor.js +89 -0
- package/esm/FunnelChart/seriesConfig/tooltip.d.ts +3 -0
- package/esm/FunnelChart/seriesConfig/tooltip.js +29 -0
- package/esm/FunnelChart/useFunnelChartProps.d.ts +30 -0
- package/esm/FunnelChart/useFunnelChartProps.js +161 -0
- package/esm/Heatmap/Heatmap.d.ts +57 -0
- package/esm/Heatmap/Heatmap.js +387 -0
- package/esm/Heatmap/Heatmap.plugins.d.ts +3 -0
- package/esm/Heatmap/Heatmap.plugins.js +2 -0
- package/esm/Heatmap/HeatmapItem.d.ts +49 -0
- package/esm/Heatmap/HeatmapItem.js +106 -0
- package/esm/Heatmap/HeatmapPlot.d.ts +8 -0
- package/{node → esm}/Heatmap/HeatmapPlot.js +16 -22
- package/esm/Heatmap/HeatmapTooltip.d.ts +8 -0
- package/esm/Heatmap/HeatmapTooltip.js +280 -0
- package/esm/Heatmap/heatmapClasses.d.ts +11 -0
- package/esm/Heatmap/heatmapClasses.js +14 -0
- package/esm/Heatmap/index.d.ts +4 -0
- package/esm/Heatmap/index.js +4 -0
- package/esm/Heatmap/seriesConfig/extremums.d.ts +2 -0
- package/esm/Heatmap/seriesConfig/getColor.d.ts +3 -0
- package/esm/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/esm/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +8 -0
- package/esm/Heatmap/seriesConfig/index.d.ts +2 -0
- package/esm/Heatmap/seriesConfig/index.js +14 -0
- package/esm/Heatmap/seriesConfig/seriesProcessor.d.ts +3 -0
- package/{Heatmap/formatter.js → esm/Heatmap/seriesConfig/seriesProcessor.js} +2 -2
- package/esm/Heatmap/seriesConfig/tooltip.d.ts +3 -0
- package/esm/Heatmap/seriesConfig/tooltip.js +25 -0
- package/esm/LineChartPro/LineChartPro.d.ts +17 -0
- package/esm/LineChartPro/LineChartPro.js +401 -0
- package/esm/LineChartPro/LineChartPro.plugins.d.ts +4 -0
- package/esm/LineChartPro/LineChartPro.plugins.js +3 -0
- package/esm/LineChartPro/index.d.ts +1 -0
- package/esm/LineChartPro/index.js +1 -0
- package/esm/ScatterChartPro/ScatterChartPro.d.ts +17 -0
- package/esm/ScatterChartPro/ScatterChartPro.js +395 -0
- package/esm/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -0
- package/esm/ScatterChartPro/ScatterChartPro.plugins.js +3 -0
- package/esm/ScatterChartPro/index.d.ts +1 -0
- package/esm/ScatterChartPro/index.js +1 -0
- package/esm/hooks/index.d.ts +2 -0
- package/esm/hooks/index.js +2 -0
- package/esm/hooks/useFunnelSeries.d.ts +33 -0
- package/esm/hooks/useFunnelSeries.js +42 -0
- package/esm/hooks/useHeatmapSeries.d.ts +33 -0
- package/esm/hooks/useHeatmapSeries.js +42 -0
- package/esm/hooks/zoom/index.d.ts +1 -0
- package/esm/hooks/zoom/index.js +1 -0
- package/esm/hooks/zoom/useIsZoomInteracting.d.ts +6 -0
- package/esm/hooks/zoom/useIsZoomInteracting.js +14 -0
- package/esm/index.d.ts +34 -0
- package/esm/index.js +45 -0
- package/esm/internals/plugins/allPlugins.d.ts +8 -0
- package/esm/internals/plugins/allPlugins.js +6 -0
- package/esm/internals/plugins/useChartProZoom/index.d.ts +3 -0
- package/esm/internals/plugins/useChartProZoom/index.js +3 -0
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.d.ts +3 -0
- package/{node → esm}/internals/plugins/useChartProZoom/useChartProZoom.js +94 -54
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +203 -0
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +4 -0
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +53 -0
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.js +1 -0
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +45 -0
- package/{node → esm}/internals/plugins/useChartProZoom/useChartProZoom.utils.js +8 -22
- package/esm/internals/utils/releaseInfo.d.ts +1 -0
- package/esm/internals/utils/releaseInfo.js +13 -0
- package/esm/models/index.d.ts +2 -0
- package/esm/models/index.js +2 -0
- package/esm/models/seriesType/heatmap.d.ts +28 -0
- package/esm/models/seriesType/heatmap.js +1 -0
- package/esm/models/seriesType/index.d.ts +1 -0
- package/esm/models/seriesType/index.js +1 -0
- package/esm/package.json +1 -0
- package/esm/themeAugmentation/components.d.ts +23 -0
- package/esm/themeAugmentation/index.d.ts +4 -0
- package/esm/themeAugmentation/index.js +0 -0
- package/esm/themeAugmentation/overrides.d.ts +11 -0
- package/esm/themeAugmentation/props.d.ts +20 -0
- package/esm/typeOverloads/index.d.ts +1 -0
- package/esm/typeOverloads/index.js +1 -0
- package/esm/typeOverloads/modules.d.ts +33 -0
- package/esm/typeOverloads/modules.js +1 -0
- package/hooks/index.d.ts +2 -2
- package/hooks/index.js +27 -2
- package/hooks/useFunnelSeries.d.ts +33 -0
- package/hooks/useFunnelSeries.js +48 -0
- package/hooks/useHeatmapSeries.d.ts +33 -0
- package/hooks/useHeatmapSeries.js +48 -0
- package/hooks/zoom/index.d.ts +1 -1
- package/hooks/zoom/index.js +16 -1
- package/hooks/zoom/useIsZoomInteracting.d.ts +1 -1
- package/hooks/zoom/useIsZoomInteracting.js +10 -5
- package/index.d.ts +10 -8
- package/index.js +369 -37
- package/internals/plugins/allPlugins.d.ts +7 -9
- package/internals/plugins/allPlugins.js +10 -3
- package/internals/plugins/useChartProZoom/index.d.ts +3 -3
- package/internals/plugins/useChartProZoom/index.js +38 -3
- package/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -2
- package/internals/plugins/useChartProZoom/useChartProZoom.js +101 -47
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +154 -328
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +11 -10
- package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +42 -39
- package/internals/plugins/useChartProZoom/useChartProZoom.types.js +5 -1
- package/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +13 -13
- package/internals/plugins/useChartProZoom/useChartProZoom.utils.js +22 -8
- package/internals/utils/releaseInfo.d.ts +1 -1
- package/internals/utils/releaseInfo.js +13 -5
- package/models/index.d.ts +1 -1
- package/models/index.js +16 -2
- package/models/seriesType/heatmap.d.ts +18 -19
- package/models/seriesType/heatmap.js +5 -1
- package/models/seriesType/index.d.ts +1 -1
- package/models/seriesType/index.js +16 -1
- package/modern/BarChartPro/BarChartPro.d.ts +18 -0
- package/modern/BarChartPro/BarChartPro.js +35 -85
- package/modern/BarChartPro/BarChartPro.plugins.d.ts +4 -0
- package/modern/BarChartPro/BarChartPro.plugins.js +3 -0
- package/modern/BarChartPro/index.d.ts +1 -0
- package/modern/ChartContainerPro/ChartContainerPro.d.ts +35 -0
- package/modern/ChartContainerPro/ChartContainerPro.js +4 -3
- package/modern/ChartContainerPro/index.d.ts +2 -0
- package/modern/ChartContainerPro/index.js +1 -0
- package/modern/ChartContainerPro/useChartContainerProProps.d.ts +9 -0
- package/modern/ChartContainerPro/useChartContainerProProps.js +15 -13
- package/modern/ChartDataProviderPro/ChartDataProviderPro.d.ts +37 -0
- package/modern/ChartDataProviderPro/ChartDataProviderPro.js +18 -204
- package/modern/ChartDataProviderPro/index.d.ts +2 -0
- package/modern/ChartDataProviderPro/index.js +1 -0
- package/modern/ChartDataProviderPro/useChartDataProviderProProps.d.ts +8 -0
- package/modern/ChartDataProviderPro/useChartDataProviderProProps.js +0 -2
- package/modern/FunnelChart/FunnelChart.d.ts +37 -0
- package/modern/FunnelChart/FunnelChart.js +212 -0
- package/modern/FunnelChart/FunnelPlot.d.ts +16 -0
- package/modern/FunnelChart/FunnelPlot.js +184 -0
- package/modern/FunnelChart/FunnelSection.d.ts +15 -0
- package/modern/FunnelChart/FunnelSection.js +56 -0
- package/modern/FunnelChart/categoryAxis.types.d.ts +24 -0
- package/modern/FunnelChart/categoryAxis.types.js +1 -0
- package/modern/FunnelChart/funnel.types.d.ts +124 -0
- package/modern/FunnelChart/funnel.types.js +1 -0
- package/modern/FunnelChart/funnelPlotSlots.types.d.ts +20 -0
- package/modern/FunnelChart/funnelPlotSlots.types.js +1 -0
- package/modern/FunnelChart/funnelSectionClasses.d.ts +13 -0
- package/modern/FunnelChart/funnelSectionClasses.js +20 -0
- package/modern/FunnelChart/funnelSlots.types.d.ts +19 -0
- package/modern/FunnelChart/funnelSlots.types.js +1 -0
- package/modern/FunnelChart/funnelStepCurve.d.ts +4 -0
- package/modern/FunnelChart/funnelStepCurve.js +67 -0
- package/modern/FunnelChart/index.d.ts +7 -0
- package/modern/FunnelChart/index.js +5 -0
- package/modern/FunnelChart/labelUtils.d.ts +42 -0
- package/modern/FunnelChart/labelUtils.js +166 -0
- package/modern/FunnelChart/seriesConfig/extremums.d.ts +3 -0
- package/modern/FunnelChart/seriesConfig/extremums.js +42 -0
- package/modern/FunnelChart/seriesConfig/getColor.d.ts +3 -0
- package/modern/FunnelChart/seriesConfig/getColor.js +4 -0
- package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +11 -0
- package/modern/FunnelChart/seriesConfig/index.d.ts +2 -0
- package/modern/FunnelChart/seriesConfig/index.js +15 -0
- package/modern/FunnelChart/seriesConfig/legend.d.ts +3 -0
- package/modern/FunnelChart/seriesConfig/legend.js +25 -0
- package/modern/FunnelChart/seriesConfig/seriesProcessor.d.ts +3 -0
- package/modern/FunnelChart/seriesConfig/seriesProcessor.js +89 -0
- package/modern/FunnelChart/seriesConfig/tooltip.d.ts +3 -0
- package/modern/FunnelChart/seriesConfig/tooltip.js +29 -0
- package/modern/FunnelChart/useFunnelChartProps.d.ts +30 -0
- package/modern/FunnelChart/useFunnelChartProps.js +161 -0
- package/modern/Heatmap/Heatmap.d.ts +57 -0
- package/modern/Heatmap/Heatmap.js +47 -61
- package/modern/Heatmap/Heatmap.plugins.d.ts +3 -0
- package/modern/Heatmap/Heatmap.plugins.js +2 -0
- package/modern/Heatmap/HeatmapItem.d.ts +49 -0
- package/modern/Heatmap/HeatmapItem.js +7 -7
- package/modern/Heatmap/HeatmapPlot.d.ts +8 -0
- package/modern/Heatmap/HeatmapPlot.js +2 -2
- package/modern/Heatmap/HeatmapTooltip.d.ts +8 -0
- package/modern/Heatmap/HeatmapTooltip.js +10 -4
- package/modern/Heatmap/heatmapClasses.d.ts +11 -0
- package/modern/Heatmap/index.d.ts +4 -0
- package/modern/Heatmap/seriesConfig/extremums.d.ts +2 -0
- package/modern/Heatmap/seriesConfig/getColor.d.ts +3 -0
- package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +8 -0
- package/modern/Heatmap/seriesConfig/index.d.ts +2 -0
- package/modern/Heatmap/seriesConfig/index.js +14 -0
- package/modern/Heatmap/seriesConfig/seriesProcessor.d.ts +3 -0
- package/modern/Heatmap/{formatter.js → seriesConfig/seriesProcessor.js} +2 -2
- package/modern/Heatmap/seriesConfig/tooltip.d.ts +3 -0
- package/modern/Heatmap/seriesConfig/tooltip.js +25 -0
- package/modern/LineChartPro/LineChartPro.d.ts +17 -0
- package/modern/LineChartPro/LineChartPro.js +36 -140
- package/modern/LineChartPro/LineChartPro.plugins.d.ts +4 -0
- package/modern/LineChartPro/LineChartPro.plugins.js +3 -0
- package/modern/LineChartPro/index.d.ts +1 -0
- package/modern/ScatterChartPro/ScatterChartPro.d.ts +17 -0
- package/modern/ScatterChartPro/ScatterChartPro.js +40 -37
- package/modern/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -0
- package/modern/ScatterChartPro/ScatterChartPro.plugins.js +3 -0
- package/modern/ScatterChartPro/index.d.ts +1 -0
- package/modern/hooks/index.d.ts +2 -0
- package/modern/hooks/index.js +1 -1
- package/modern/hooks/useFunnelSeries.d.ts +33 -0
- package/modern/hooks/useFunnelSeries.js +42 -0
- package/modern/hooks/useHeatmapSeries.d.ts +33 -0
- package/modern/hooks/useHeatmapSeries.js +42 -0
- package/modern/hooks/zoom/index.d.ts +1 -0
- package/modern/hooks/zoom/useIsZoomInteracting.d.ts +6 -0
- package/modern/index.d.ts +34 -0
- package/modern/index.js +5 -4
- package/modern/internals/plugins/allPlugins.d.ts +8 -0
- package/modern/internals/plugins/allPlugins.js +3 -2
- package/modern/internals/plugins/useChartProZoom/index.d.ts +3 -0
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.d.ts +3 -0
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.js +65 -18
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +203 -0
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +1 -7
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +53 -0
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +45 -0
- package/modern/internals/utils/releaseInfo.d.ts +1 -0
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/modern/models/index.d.ts +2 -0
- package/modern/models/seriesType/heatmap.d.ts +28 -0
- package/modern/models/seriesType/index.d.ts +1 -0
- package/modern/package.json +1 -0
- package/modern/themeAugmentation/components.d.ts +23 -0
- package/modern/themeAugmentation/index.d.ts +4 -0
- package/modern/themeAugmentation/overrides.d.ts +11 -0
- package/modern/themeAugmentation/props.d.ts +20 -0
- package/modern/typeOverloads/index.d.ts +1 -0
- package/modern/typeOverloads/modules.d.ts +33 -0
- package/package.json +44 -11
- package/themeAugmentation/components.d.ts +1 -3
- package/themeAugmentation/index.d.ts +1 -1
- package/themeAugmentation/index.js +1 -0
- package/themeAugmentation/overrides.d.ts +2 -4
- package/themeAugmentation/props.d.ts +5 -7
- package/tsconfig.build.tsbuildinfo +1 -0
- package/typeOverloads/index.d.ts +1 -1
- package/typeOverloads/index.js +6 -1
- package/typeOverloads/modules.d.ts +32 -24
- package/typeOverloads/modules.js +5 -1
- package/BarChartPro/package.json +0 -6
- package/ChartContainerPro/package.json +0 -6
- package/ChartDataProviderPro/package.json +0 -6
- package/Heatmap/formatter.d.ts +0 -3
- package/Heatmap/package.json +0 -6
- package/Heatmap/plugin.d.ts +0 -2
- package/Heatmap/plugin.js +0 -10
- package/LineChartPro/package.json +0 -6
- package/ScatterChartPro/package.json +0 -6
- package/hooks/package.json +0 -6
- package/hooks/useSeries.d.ts +0 -11
- package/hooks/useSeries.js +0 -16
- package/internals/plugins/useChartProZoom/creatZoomLookup.d.ts +0 -3
- package/internals/plugins/useChartProZoom/creatZoomLookup.js +0 -12
- package/internals/plugins/useChartProZoom/defaultizeZoom.d.ts +0 -2
- package/internals/plugins/useChartProZoom/defaultizeZoom.js +0 -25
- package/internals/plugins/useChartProZoom/zoom.types.d.ts +0 -53
- package/models/package.json +0 -6
- package/modern/Heatmap/plugin.js +0 -10
- package/modern/hooks/useSeries.js +0 -16
- package/modern/internals/plugins/useChartProZoom/creatZoomLookup.js +0 -12
- package/modern/internals/plugins/useChartProZoom/defaultizeZoom.js +0 -25
- package/node/BarChartPro/BarChartPro.js +0 -460
- package/node/BarChartPro/index.js +0 -16
- package/node/ChartContainerPro/ChartContainerPro.js +0 -295
- package/node/ChartContainerPro/index.js +0 -16
- package/node/ChartContainerPro/useChartContainerProProps.js +0 -40
- package/node/ChartDataProviderPro/ChartDataProviderPro.js +0 -298
- package/node/ChartDataProviderPro/index.js +0 -16
- package/node/ChartDataProviderPro/useChartDataProviderProProps.js +0 -23
- package/node/Heatmap/Heatmap.js +0 -407
- package/node/Heatmap/HeatmapItem.js +0 -113
- package/node/Heatmap/HeatmapTooltip.js +0 -280
- package/node/Heatmap/heatmapClasses.js +0 -22
- package/node/Heatmap/index.js +0 -47
- package/node/Heatmap/plugin.js +0 -17
- package/node/LineChartPro/LineChartPro.js +0 -511
- package/node/LineChartPro/index.js +0 -16
- package/node/ScatterChartPro/ScatterChartPro.js +0 -398
- package/node/ScatterChartPro/index.js +0 -16
- package/node/hooks/index.js +0 -27
- package/node/hooks/useSeries.js +0 -21
- package/node/hooks/zoom/index.js +0 -16
- package/node/hooks/zoom/useIsZoomInteracting.js +0 -19
- package/node/index.js +0 -365
- package/node/internals/plugins/allPlugins.js +0 -11
- package/node/internals/plugins/useChartProZoom/creatZoomLookup.js +0 -19
- package/node/internals/plugins/useChartProZoom/defaultizeZoom.js +0 -33
- package/node/internals/plugins/useChartProZoom/index.js +0 -38
- package/node/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +0 -18
- package/node/internals/utils/releaseInfo.js +0 -21
- package/node/models/index.js +0 -16
- package/node/models/seriesType/index.js +0 -16
- package/node/themeAugmentation/index.js +0 -1
- package/node/typeOverloads/index.js +0 -6
- package/themeAugmentation/package.json +0 -6
- package/typeOverloads/package.json +0 -6
- /package/{node/internals/plugins/useChartProZoom/useChartProZoom.types.js → FunnelChart/categoryAxis.types.js} +0 -0
- /package/{node/internals/plugins/useChartProZoom/zoom.types.js → FunnelChart/funnel.types.js} +0 -0
- /package/{node/models/seriesType/heatmap.js → FunnelChart/funnelPlotSlots.types.js} +0 -0
- /package/{node/typeOverloads/modules.js → FunnelChart/funnelSlots.types.js} +0 -0
- /package/{node/Heatmap → Heatmap/seriesConfig}/extremums.js +0 -0
- /package/{node/Heatmap → Heatmap/seriesConfig}/getColor.js +0 -0
- /package/{internals/plugins/useChartProZoom/zoom.types.js → esm/FunnelChart/categoryAxis.types.js} +0 -0
- /package/{modern/internals/plugins/useChartProZoom/zoom.types.js → esm/FunnelChart/funnel.types.js} +0 -0
- /package/{Heatmap → esm/Heatmap/seriesConfig}/extremums.js +0 -0
- /package/{Heatmap → esm/Heatmap/seriesConfig}/getColor.js +0 -0
- /package/modern/Heatmap/{extremums.js → seriesConfig/extremums.js} +0 -0
- /package/modern/Heatmap/{getColor.js → seriesConfig/getColor.js} +0 -0
package/esm/index.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @mui/x-charts-pro v8.0.0-beta.0
|
|
3
|
+
*
|
|
4
|
+
* @license MUI X Commercial
|
|
5
|
+
* This source code is licensed under the commercial license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import "./typeOverloads/modules.js";
|
|
9
|
+
|
|
10
|
+
// exports from MIT package
|
|
11
|
+
export * from '@mui/x-charts/constants';
|
|
12
|
+
export * from '@mui/x-charts/context';
|
|
13
|
+
export * from '@mui/x-charts/hooks';
|
|
14
|
+
export * from '@mui/x-charts/colorPalettes';
|
|
15
|
+
export * from '@mui/x-charts/models';
|
|
16
|
+
export * from '@mui/x-charts/ChartsClipPath';
|
|
17
|
+
export * from '@mui/x-charts/ChartsReferenceLine';
|
|
18
|
+
export * from '@mui/x-charts/ChartsAxis';
|
|
19
|
+
export * from '@mui/x-charts/ChartsXAxis';
|
|
20
|
+
export * from '@mui/x-charts/ChartsYAxis';
|
|
21
|
+
export * from '@mui/x-charts/ChartsGrid';
|
|
22
|
+
export * from '@mui/x-charts/ChartsText';
|
|
23
|
+
export * from '@mui/x-charts/ChartsTooltip';
|
|
24
|
+
export * from '@mui/x-charts/ChartsLegend';
|
|
25
|
+
export * from '@mui/x-charts/ChartsAxisHighlight';
|
|
26
|
+
export * from '@mui/x-charts/BarChart';
|
|
27
|
+
export * from '@mui/x-charts/LineChart';
|
|
28
|
+
export * from '@mui/x-charts/PieChart';
|
|
29
|
+
export * from '@mui/x-charts/ScatterChart';
|
|
30
|
+
export * from '@mui/x-charts/SparkLineChart';
|
|
31
|
+
export * from '@mui/x-charts/Gauge';
|
|
32
|
+
export * from '@mui/x-charts/RadarChart';
|
|
33
|
+
export * from '@mui/x-charts/ChartsSurface';
|
|
34
|
+
export * from '@mui/x-charts/ChartDataProvider';
|
|
35
|
+
export * from '@mui/x-charts/ChartsLabel';
|
|
36
|
+
|
|
37
|
+
// Pro components
|
|
38
|
+
export * from "./hooks/index.js";
|
|
39
|
+
export * from "./Heatmap/index.js";
|
|
40
|
+
export * from "./ChartContainerPro/index.js";
|
|
41
|
+
export * from "./ChartDataProviderPro/index.js";
|
|
42
|
+
export * from "./ScatterChartPro/index.js";
|
|
43
|
+
export * from "./BarChartPro/index.js";
|
|
44
|
+
export * from "./LineChartPro/index.js";
|
|
45
|
+
export * from "./FunnelChart/index.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ChartSeriesType, ConvertSignaturesIntoPlugins, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartZAxisSignature, UseChartHighlightSignature, UseChartPolarAxisSignature } from '@mui/x-charts/internals';
|
|
2
|
+
import { UseChartProZoomSignature } from "./useChartProZoom/index.js";
|
|
3
|
+
export type AllPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature];
|
|
4
|
+
export type AllPluginsType<TSeries extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<AllPluginSignatures<TSeries>>;
|
|
5
|
+
export declare const ALL_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartPolarAxisSignature<any>>)[];
|
|
6
|
+
export type DefaultPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature];
|
|
7
|
+
export type DefaultPluginsType<TSeries extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<DefaultPluginSignatures<TSeries>>;
|
|
8
|
+
export declare const DEFAULT_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>>)[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file should be removed after creating all plugins in favor of a file per chart type.
|
|
2
|
+
|
|
3
|
+
import { useChartCartesianAxis, useChartInteraction, useChartZAxis, useChartHighlight, useChartPolarAxis } from '@mui/x-charts/internals';
|
|
4
|
+
import { useChartProZoom } from "./useChartProZoom/index.js";
|
|
5
|
+
export const ALL_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartPolarAxis, useChartInteraction, useChartHighlight, useChartProZoom];
|
|
6
|
+
export const DEFAULT_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartProZoom];
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
'use client';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
var React = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _internals = require("@mui/x-charts/internals");
|
|
13
|
-
var _creatZoomLookup = require("./creatZoomLookup");
|
|
14
|
-
var _useChartProZoom = require("./useChartProZoom.utils");
|
|
15
|
-
var _useChartProZoom2 = require("./useChartProZoom.selectors");
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
6
|
+
import { useSelector, getSVGPoint, selectorChartDrawingArea, createZoomLookup, selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
|
|
7
|
+
import { getDiff, getHorizontalCenterRatio, getPinchScaleRatio, getVerticalCenterRatio, getWheelScaleRatio, isSpanValid, preventDefault, zoomAtPoint } from "./useChartProZoom.utils.js";
|
|
8
|
+
|
|
16
9
|
// It is helpful to avoid the need to provide the possibly auto-generated id for each axis.
|
|
17
10
|
function initializeZoomData(options) {
|
|
18
11
|
return Object.values(options).map(({
|
|
@@ -25,39 +18,79 @@ function initializeZoomData(options) {
|
|
|
25
18
|
end
|
|
26
19
|
}));
|
|
27
20
|
}
|
|
28
|
-
const useChartProZoom = ({
|
|
21
|
+
export const useChartProZoom = ({
|
|
29
22
|
store,
|
|
30
23
|
instance,
|
|
31
24
|
svgRef,
|
|
32
25
|
params
|
|
33
26
|
}) => {
|
|
34
|
-
const
|
|
35
|
-
|
|
27
|
+
const {
|
|
28
|
+
zoomData: paramsZoomData,
|
|
29
|
+
onZoomChange
|
|
30
|
+
} = params;
|
|
31
|
+
const drawingArea = useSelector(store, selectorChartDrawingArea);
|
|
32
|
+
const optionsLookup = useSelector(store, selectorChartZoomOptionsLookup);
|
|
36
33
|
const isZoomEnabled = Object.keys(optionsLookup).length > 0;
|
|
37
34
|
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
// Manage controlled state
|
|
36
|
+
|
|
37
|
+
useEnhancedEffect(() => {
|
|
38
|
+
if (paramsZoomData === undefined) {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
store.update(prevState => {
|
|
42
|
+
if (process.env.NODE_ENV !== 'production' && !prevState.zoom.isControlled) {
|
|
43
|
+
console.error([`MUI X: A chart component is changing the \`zoomData\` from uncontrolled to controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', 'Decide between using a controlled or uncontrolled for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n'));
|
|
44
|
+
}
|
|
45
|
+
return _extends({}, prevState, {
|
|
46
|
+
zoom: _extends({}, prevState.zoom, {
|
|
47
|
+
isInteracting: true,
|
|
48
|
+
zoomData: paramsZoomData
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
const timeout = setTimeout(() => {
|
|
53
|
+
store.update(prevState => {
|
|
54
|
+
return _extends({}, prevState, {
|
|
55
|
+
zoom: _extends({}, prevState.zoom, {
|
|
56
|
+
isInteracting: false
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
}, 166);
|
|
61
|
+
return () => {
|
|
62
|
+
clearTimeout(timeout);
|
|
63
|
+
};
|
|
64
|
+
}, [store, paramsZoomData]);
|
|
65
|
+
|
|
66
|
+
// Add instance methods
|
|
43
67
|
const setIsInteracting = React.useCallback(isInteracting => {
|
|
44
|
-
store.update(prev => (
|
|
45
|
-
zoom: (
|
|
68
|
+
store.update(prev => _extends({}, prev, {
|
|
69
|
+
zoom: _extends({}, prev.zoom, {
|
|
46
70
|
isInteracting
|
|
47
71
|
})
|
|
48
72
|
}));
|
|
49
73
|
}, [store]);
|
|
50
74
|
const setZoomDataCallback = React.useCallback(zoomData => {
|
|
51
75
|
store.update(prevState => {
|
|
52
|
-
const newZoomData = typeof zoomData === 'function' ? zoomData(prevState.zoom.zoomData) : zoomData;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
76
|
+
const newZoomData = typeof zoomData === 'function' ? zoomData([...prevState.zoom.zoomData]) : zoomData;
|
|
77
|
+
onZoomChange?.(newZoomData);
|
|
78
|
+
if (prevState.zoom.isControlled) {
|
|
79
|
+
return prevState;
|
|
80
|
+
}
|
|
81
|
+
return _extends({}, prevState, {
|
|
82
|
+
zoom: _extends({}, prevState.zoom, {
|
|
56
83
|
zoomData: newZoomData
|
|
57
84
|
})
|
|
58
85
|
});
|
|
59
86
|
});
|
|
60
|
-
}, [
|
|
87
|
+
}, [onZoomChange, store]);
|
|
88
|
+
|
|
89
|
+
// Add events
|
|
90
|
+
const panningEventCacheRef = React.useRef([]);
|
|
91
|
+
const zoomEventCacheRef = React.useRef([]);
|
|
92
|
+
const eventPrevDiff = React.useRef(0);
|
|
93
|
+
const interactionTimeoutRef = React.useRef(undefined);
|
|
61
94
|
|
|
62
95
|
// Add event for chart panning
|
|
63
96
|
const isPanEnabled = React.useMemo(() => Object.values(optionsLookup).some(v => v.panning) || false, [optionsLookup]);
|
|
@@ -75,7 +108,7 @@ const useChartProZoom = ({
|
|
|
75
108
|
if (touchStartRef.current == null) {
|
|
76
109
|
return;
|
|
77
110
|
}
|
|
78
|
-
const point =
|
|
111
|
+
const point = getSVGPoint(element, event);
|
|
79
112
|
const movementX = point.x - touchStartRef.current.x;
|
|
80
113
|
const movementY = (point.y - touchStartRef.current.y) * -1;
|
|
81
114
|
const newZoomData = touchStartRef.current.zoomData.map(zoom => {
|
|
@@ -103,7 +136,7 @@ const useChartProZoom = ({
|
|
|
103
136
|
if (newMinPercent < MIN_PERCENT || newMaxPercent > MAX_PERCENT || span < options.minSpan || span > options.maxSpan) {
|
|
104
137
|
return zoom;
|
|
105
138
|
}
|
|
106
|
-
return (
|
|
139
|
+
return _extends({}, zoom, {
|
|
107
140
|
start: newMinPercent,
|
|
108
141
|
end: newMaxPercent
|
|
109
142
|
});
|
|
@@ -112,7 +145,7 @@ const useChartProZoom = ({
|
|
|
112
145
|
};
|
|
113
146
|
const handleDown = event => {
|
|
114
147
|
panningEventCacheRef.current.push(event);
|
|
115
|
-
const point =
|
|
148
|
+
const point = getSVGPoint(element, event);
|
|
116
149
|
if (!instance.isPointInside(point)) {
|
|
117
150
|
return;
|
|
118
151
|
}
|
|
@@ -158,7 +191,7 @@ const useChartProZoom = ({
|
|
|
158
191
|
if (element === null) {
|
|
159
192
|
return;
|
|
160
193
|
}
|
|
161
|
-
const point =
|
|
194
|
+
const point = getSVGPoint(element, event);
|
|
162
195
|
if (!instance.isPointInside(point)) {
|
|
163
196
|
return;
|
|
164
197
|
}
|
|
@@ -178,13 +211,13 @@ const useChartProZoom = ({
|
|
|
178
211
|
if (!option) {
|
|
179
212
|
return zoom;
|
|
180
213
|
}
|
|
181
|
-
const centerRatio = option.axisDirection === 'x' ?
|
|
214
|
+
const centerRatio = option.axisDirection === 'x' ? getHorizontalCenterRatio(point, drawingArea) : getVerticalCenterRatio(point, drawingArea);
|
|
182
215
|
const {
|
|
183
216
|
scaleRatio,
|
|
184
217
|
isZoomIn
|
|
185
|
-
} =
|
|
186
|
-
const [newMinRange, newMaxRange] =
|
|
187
|
-
if (!
|
|
218
|
+
} = getWheelScaleRatio(event, option.step);
|
|
219
|
+
const [newMinRange, newMaxRange] = zoomAtPoint(centerRatio, scaleRatio, zoom, option);
|
|
220
|
+
if (!isSpanValid(newMinRange, newMaxRange, isZoomIn, option)) {
|
|
188
221
|
return zoom;
|
|
189
222
|
}
|
|
190
223
|
return {
|
|
@@ -211,7 +244,7 @@ const useChartProZoom = ({
|
|
|
211
244
|
return;
|
|
212
245
|
}
|
|
213
246
|
const firstEvent = zoomEventCacheRef.current[0];
|
|
214
|
-
const curDiff =
|
|
247
|
+
const curDiff = getDiff(zoomEventCacheRef.current);
|
|
215
248
|
setZoomDataCallback(prevZoomData => {
|
|
216
249
|
const newZoomData = prevZoomData.map(zoom => {
|
|
217
250
|
const option = optionsLookup[zoom.axisId];
|
|
@@ -221,16 +254,16 @@ const useChartProZoom = ({
|
|
|
221
254
|
const {
|
|
222
255
|
scaleRatio,
|
|
223
256
|
isZoomIn
|
|
224
|
-
} =
|
|
257
|
+
} = getPinchScaleRatio(curDiff, eventPrevDiff.current, option.step);
|
|
225
258
|
|
|
226
259
|
// If the scale ratio is 0, it means the pinch gesture is not valid.
|
|
227
260
|
if (scaleRatio === 0) {
|
|
228
261
|
return zoom;
|
|
229
262
|
}
|
|
230
|
-
const point =
|
|
231
|
-
const centerRatio = option.axisDirection === 'x' ?
|
|
232
|
-
const [newMinRange, newMaxRange] =
|
|
233
|
-
if (!
|
|
263
|
+
const point = getSVGPoint(element, firstEvent);
|
|
264
|
+
const centerRatio = option.axisDirection === 'x' ? getHorizontalCenterRatio(point, drawingArea) : getVerticalCenterRatio(point, drawingArea);
|
|
265
|
+
const [newMinRange, newMaxRange] = zoomAtPoint(centerRatio, scaleRatio, zoom, option);
|
|
266
|
+
if (!isSpanValid(newMinRange, newMaxRange, isZoomIn, option)) {
|
|
234
267
|
return zoom;
|
|
235
268
|
}
|
|
236
269
|
return {
|
|
@@ -261,8 +294,8 @@ const useChartProZoom = ({
|
|
|
261
294
|
element.addEventListener('pointerleave', pointerUpHandler);
|
|
262
295
|
|
|
263
296
|
// Prevent zooming the entire page on touch devices
|
|
264
|
-
element.addEventListener('touchstart',
|
|
265
|
-
element.addEventListener('touchmove',
|
|
297
|
+
element.addEventListener('touchstart', preventDefault);
|
|
298
|
+
element.addEventListener('touchmove', preventDefault);
|
|
266
299
|
return () => {
|
|
267
300
|
element.removeEventListener('wheel', wheelHandler);
|
|
268
301
|
element.removeEventListener('pointerdown', pointerDownHandler);
|
|
@@ -271,8 +304,8 @@ const useChartProZoom = ({
|
|
|
271
304
|
element.removeEventListener('pointercancel', pointerUpHandler);
|
|
272
305
|
element.removeEventListener('pointerout', pointerUpHandler);
|
|
273
306
|
element.removeEventListener('pointerleave', pointerUpHandler);
|
|
274
|
-
element.removeEventListener('touchstart',
|
|
275
|
-
element.removeEventListener('touchmove',
|
|
307
|
+
element.removeEventListener('touchstart', preventDefault);
|
|
308
|
+
element.removeEventListener('touchmove', preventDefault);
|
|
276
309
|
if (interactionTimeoutRef.current) {
|
|
277
310
|
clearTimeout(interactionTimeoutRef.current);
|
|
278
311
|
}
|
|
@@ -287,24 +320,31 @@ const useChartProZoom = ({
|
|
|
287
320
|
}
|
|
288
321
|
};
|
|
289
322
|
};
|
|
290
|
-
exports.useChartProZoom = useChartProZoom;
|
|
291
323
|
useChartProZoom.params = {
|
|
292
324
|
initialZoom: true,
|
|
293
|
-
onZoomChange: true
|
|
325
|
+
onZoomChange: true,
|
|
326
|
+
zoomData: true
|
|
294
327
|
};
|
|
295
328
|
useChartProZoom.getDefaultizedParams = ({
|
|
296
329
|
params
|
|
297
330
|
}) => {
|
|
298
|
-
|
|
299
|
-
return (0, _extends2.default)({}, params, {
|
|
300
|
-
optionsLookup
|
|
301
|
-
});
|
|
331
|
+
return _extends({}, params);
|
|
302
332
|
};
|
|
303
333
|
useChartProZoom.getInitialState = params => {
|
|
334
|
+
const {
|
|
335
|
+
initialZoom,
|
|
336
|
+
zoomData,
|
|
337
|
+
defaultizedXAxis,
|
|
338
|
+
defaultizedYAxis
|
|
339
|
+
} = params;
|
|
340
|
+
const optionsLookup = _extends({}, createZoomLookup('x')(defaultizedXAxis), createZoomLookup('y')(defaultizedYAxis));
|
|
304
341
|
return {
|
|
305
342
|
zoom: {
|
|
306
|
-
zoomData:
|
|
307
|
-
|
|
343
|
+
zoomData:
|
|
344
|
+
// eslint-disable-next-line no-nested-ternary
|
|
345
|
+
zoomData !== undefined ? zoomData : initialZoom !== undefined ? initialZoom : initializeZoomData(optionsLookup),
|
|
346
|
+
isInteracting: false,
|
|
347
|
+
isControlled: zoomData !== undefined
|
|
308
348
|
}
|
|
309
349
|
};
|
|
310
350
|
};
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { ChartRootSelector } from '@mui/x-charts/internals';
|
|
2
|
+
import { UseChartProZoomSignature } from "./useChartProZoom.types.js";
|
|
3
|
+
export declare const selectorChartZoomState: ChartRootSelector<UseChartProZoomSignature>;
|
|
4
|
+
export declare const selectorChartZoomIsInteracting: ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("./useChartProZoom.types").UseChartProZoomState & Partial<{}> & {
|
|
5
|
+
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
6
|
+
}) => boolean) & {
|
|
7
|
+
clearCache: () => void;
|
|
8
|
+
resultsCount: () => number;
|
|
9
|
+
resetResultsCount: () => void;
|
|
10
|
+
} & {
|
|
11
|
+
resultFunc: (resultFuncArgs_0: {
|
|
12
|
+
isInteracting: boolean;
|
|
13
|
+
zoomData: readonly import("@mui/x-charts/internals").ZoomData[];
|
|
14
|
+
isControlled: boolean;
|
|
15
|
+
}) => boolean;
|
|
16
|
+
memoizedResultFunc: ((resultFuncArgs_0: {
|
|
17
|
+
isInteracting: boolean;
|
|
18
|
+
zoomData: readonly import("@mui/x-charts/internals").ZoomData[];
|
|
19
|
+
isControlled: boolean;
|
|
20
|
+
}) => boolean) & {
|
|
21
|
+
clearCache: () => void;
|
|
22
|
+
resultsCount: () => number;
|
|
23
|
+
resetResultsCount: () => void;
|
|
24
|
+
};
|
|
25
|
+
lastResult: () => boolean;
|
|
26
|
+
dependencies: [ChartRootSelector<UseChartProZoomSignature>];
|
|
27
|
+
recomputations: () => number;
|
|
28
|
+
resetRecomputations: () => void;
|
|
29
|
+
dependencyRecomputations: () => number;
|
|
30
|
+
resetDependencyRecomputations: () => void;
|
|
31
|
+
} & {
|
|
32
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
33
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
34
|
+
};
|
|
35
|
+
export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
|
|
36
|
+
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
37
|
+
}) => boolean) & {
|
|
38
|
+
clearCache: () => void;
|
|
39
|
+
resultsCount: () => number;
|
|
40
|
+
resetResultsCount: () => void;
|
|
41
|
+
} & {
|
|
42
|
+
resultFunc: (resultFuncArgs_0: {
|
|
43
|
+
[x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
|
|
44
|
+
[x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
|
|
45
|
+
}) => boolean;
|
|
46
|
+
memoizedResultFunc: ((resultFuncArgs_0: {
|
|
47
|
+
[x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
|
|
48
|
+
[x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
|
|
49
|
+
}) => boolean) & {
|
|
50
|
+
clearCache: () => void;
|
|
51
|
+
resultsCount: () => number;
|
|
52
|
+
resetResultsCount: () => void;
|
|
53
|
+
};
|
|
54
|
+
lastResult: () => boolean;
|
|
55
|
+
dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
|
|
56
|
+
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
57
|
+
}) => {
|
|
58
|
+
[x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
|
|
59
|
+
[x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
|
|
60
|
+
}) & {
|
|
61
|
+
clearCache: () => void;
|
|
62
|
+
resultsCount: () => number;
|
|
63
|
+
resetResultsCount: () => void;
|
|
64
|
+
} & {
|
|
65
|
+
resultFunc: (resultFuncArgs_0: Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>, resultFuncArgs_1: Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) => {
|
|
66
|
+
[x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
|
|
67
|
+
[x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
|
|
68
|
+
};
|
|
69
|
+
memoizedResultFunc: ((resultFuncArgs_0: Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>, resultFuncArgs_1: Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) => {
|
|
70
|
+
[x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
|
|
71
|
+
[x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
|
|
72
|
+
}) & {
|
|
73
|
+
clearCache: () => void;
|
|
74
|
+
resultsCount: () => number;
|
|
75
|
+
resetResultsCount: () => void;
|
|
76
|
+
};
|
|
77
|
+
lastResult: () => {
|
|
78
|
+
[x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
|
|
79
|
+
[x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
|
|
80
|
+
};
|
|
81
|
+
dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
|
|
82
|
+
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
83
|
+
}) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
|
|
84
|
+
clearCache: () => void;
|
|
85
|
+
resultsCount: () => number;
|
|
86
|
+
resetResultsCount: () => void;
|
|
87
|
+
} & {
|
|
88
|
+
resultFunc: (resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
|
|
89
|
+
memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
|
|
90
|
+
clearCache: () => void;
|
|
91
|
+
resultsCount: () => number;
|
|
92
|
+
resetResultsCount: () => void;
|
|
93
|
+
};
|
|
94
|
+
lastResult: () => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
|
|
95
|
+
dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
|
|
96
|
+
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
97
|
+
}) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined) & {
|
|
98
|
+
clearCache: () => void;
|
|
99
|
+
resultsCount: () => number;
|
|
100
|
+
resetResultsCount: () => void;
|
|
101
|
+
} & {
|
|
102
|
+
resultFunc: (resultFuncArgs_0: {
|
|
103
|
+
x: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsXAxisProps>[];
|
|
104
|
+
y: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsYAxisProps>[];
|
|
105
|
+
} | undefined) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined;
|
|
106
|
+
memoizedResultFunc: ((resultFuncArgs_0: {
|
|
107
|
+
x: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsXAxisProps>[];
|
|
108
|
+
y: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsYAxisProps>[];
|
|
109
|
+
} | undefined) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined) & {
|
|
110
|
+
clearCache: () => void;
|
|
111
|
+
resultsCount: () => number;
|
|
112
|
+
resetResultsCount: () => void;
|
|
113
|
+
};
|
|
114
|
+
lastResult: () => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined;
|
|
115
|
+
dependencies: [(state: import("@mui/x-charts/internals").ChartState<[], [import("@mui/x-charts/internals").UseChartCartesianAxisSignature]>) => {
|
|
116
|
+
x: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsXAxisProps>[];
|
|
117
|
+
y: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsYAxisProps>[];
|
|
118
|
+
} | undefined];
|
|
119
|
+
recomputations: () => number;
|
|
120
|
+
resetRecomputations: () => void;
|
|
121
|
+
dependencyRecomputations: () => number;
|
|
122
|
+
resetDependencyRecomputations: () => void;
|
|
123
|
+
} & {
|
|
124
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
125
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
126
|
+
}];
|
|
127
|
+
recomputations: () => number;
|
|
128
|
+
resetRecomputations: () => void;
|
|
129
|
+
dependencyRecomputations: () => number;
|
|
130
|
+
resetDependencyRecomputations: () => void;
|
|
131
|
+
} & {
|
|
132
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
133
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
134
|
+
}, ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
|
|
135
|
+
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
136
|
+
}) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
|
|
137
|
+
clearCache: () => void;
|
|
138
|
+
resultsCount: () => number;
|
|
139
|
+
resetResultsCount: () => void;
|
|
140
|
+
} & {
|
|
141
|
+
resultFunc: (resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
|
|
142
|
+
memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
|
|
143
|
+
clearCache: () => void;
|
|
144
|
+
resultsCount: () => number;
|
|
145
|
+
resetResultsCount: () => void;
|
|
146
|
+
};
|
|
147
|
+
lastResult: () => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
|
|
148
|
+
dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
|
|
149
|
+
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
150
|
+
}) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined) & {
|
|
151
|
+
clearCache: () => void;
|
|
152
|
+
resultsCount: () => number;
|
|
153
|
+
resetResultsCount: () => void;
|
|
154
|
+
} & {
|
|
155
|
+
resultFunc: (resultFuncArgs_0: {
|
|
156
|
+
x: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsXAxisProps>[];
|
|
157
|
+
y: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsYAxisProps>[];
|
|
158
|
+
} | undefined) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined;
|
|
159
|
+
memoizedResultFunc: ((resultFuncArgs_0: {
|
|
160
|
+
x: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsXAxisProps>[];
|
|
161
|
+
y: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsYAxisProps>[];
|
|
162
|
+
} | undefined) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined) & {
|
|
163
|
+
clearCache: () => void;
|
|
164
|
+
resultsCount: () => number;
|
|
165
|
+
resetResultsCount: () => void;
|
|
166
|
+
};
|
|
167
|
+
lastResult: () => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined;
|
|
168
|
+
dependencies: [(state: import("@mui/x-charts/internals").ChartState<[], [import("@mui/x-charts/internals").UseChartCartesianAxisSignature]>) => {
|
|
169
|
+
x: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsXAxisProps>[];
|
|
170
|
+
y: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsYAxisProps>[];
|
|
171
|
+
} | undefined];
|
|
172
|
+
recomputations: () => number;
|
|
173
|
+
resetRecomputations: () => void;
|
|
174
|
+
dependencyRecomputations: () => number;
|
|
175
|
+
resetDependencyRecomputations: () => void;
|
|
176
|
+
} & {
|
|
177
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
178
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
179
|
+
}];
|
|
180
|
+
recomputations: () => number;
|
|
181
|
+
resetRecomputations: () => void;
|
|
182
|
+
dependencyRecomputations: () => number;
|
|
183
|
+
resetDependencyRecomputations: () => void;
|
|
184
|
+
} & {
|
|
185
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
186
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
187
|
+
}];
|
|
188
|
+
recomputations: () => number;
|
|
189
|
+
resetRecomputations: () => void;
|
|
190
|
+
dependencyRecomputations: () => number;
|
|
191
|
+
resetDependencyRecomputations: () => void;
|
|
192
|
+
} & {
|
|
193
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
194
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
195
|
+
}];
|
|
196
|
+
recomputations: () => number;
|
|
197
|
+
resetRecomputations: () => void;
|
|
198
|
+
dependencyRecomputations: () => number;
|
|
199
|
+
resetDependencyRecomputations: () => void;
|
|
200
|
+
} & {
|
|
201
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
202
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
203
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createSelector, selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
|
|
2
|
+
export const selectorChartZoomState = state => state.zoom;
|
|
3
|
+
export const selectorChartZoomIsInteracting = createSelector(selectorChartZoomState, zoom => zoom.isInteracting);
|
|
4
|
+
export const selectorChartZoomIsEnabled = createSelector(selectorChartZoomOptionsLookup, optionsLookup => Object.keys(optionsLookup).length > 0);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { UseChartSeriesSignature, ChartPluginSignature, UseChartCartesianAxisSignature, UseChartCartesianAxisDefaultizedParameters, ZoomData } from '@mui/x-charts/internals';
|
|
2
|
+
export interface UseChartProZoomParameters {
|
|
3
|
+
/**
|
|
4
|
+
* The list of zoom data related to each axis.
|
|
5
|
+
* Used to initialize the zoom in a specific configuration without controlling it.
|
|
6
|
+
*/
|
|
7
|
+
initialZoom?: readonly ZoomData[];
|
|
8
|
+
/**
|
|
9
|
+
* Callback fired when the zoom has changed.
|
|
10
|
+
*
|
|
11
|
+
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
12
|
+
*/
|
|
13
|
+
onZoomChange?: (zoomData: ZoomData[]) => void;
|
|
14
|
+
/**
|
|
15
|
+
* The list of zoom data related to each axis.
|
|
16
|
+
*/
|
|
17
|
+
zoomData?: readonly ZoomData[];
|
|
18
|
+
}
|
|
19
|
+
export type UseChartProZoomDefaultizedParameters = UseChartProZoomParameters & UseChartCartesianAxisDefaultizedParameters;
|
|
20
|
+
export interface UseChartProZoomState {
|
|
21
|
+
zoom: {
|
|
22
|
+
/**
|
|
23
|
+
* Whether the user is currently interacting with the chart.
|
|
24
|
+
* This is useful to disable animations while the user is interacting.
|
|
25
|
+
*/
|
|
26
|
+
isInteracting: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Mapping of axis id to the zoom data.
|
|
29
|
+
*/
|
|
30
|
+
zoomData: readonly ZoomData[];
|
|
31
|
+
/**
|
|
32
|
+
* Internal information to know if the user control the state or not.
|
|
33
|
+
*/
|
|
34
|
+
isControlled: boolean;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export interface UseChartProZoomPublicApi {
|
|
38
|
+
/**
|
|
39
|
+
* Set the zoom data state.
|
|
40
|
+
* @param {ZoomData[] | ((prev: ZoomData[]) => ZoomData[])} value The new value. Can either be the new zoom data, or an updater function.
|
|
41
|
+
* @returns {void}
|
|
42
|
+
*/
|
|
43
|
+
setZoomData: (value: ZoomData[] | ((prev: ZoomData[]) => ZoomData[])) => void;
|
|
44
|
+
}
|
|
45
|
+
export interface UseChartProZoomInstance extends UseChartProZoomPublicApi {}
|
|
46
|
+
export type UseChartProZoomSignature = ChartPluginSignature<{
|
|
47
|
+
params: UseChartProZoomParameters;
|
|
48
|
+
defaultizedParams: UseChartProZoomDefaultizedParameters;
|
|
49
|
+
state: UseChartProZoomState;
|
|
50
|
+
publicAPI: UseChartProZoomPublicApi;
|
|
51
|
+
instance: UseChartProZoomInstance;
|
|
52
|
+
dependencies: [UseChartSeriesSignature, UseChartCartesianAxisSignature];
|
|
53
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|