@mui/x-charts-pro 8.0.0-alpha.9 → 8.0.0-beta.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 +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 +1523 -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 +9 -2
- package/Heatmap/HeatmapTooltip.js +110 -90
- 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 +16 -0
- package/esm/Heatmap/HeatmapTooltip.js +288 -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 +16 -0
- package/modern/Heatmap/HeatmapTooltip.js +21 -7
- 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
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["initialZoom", "onZoomChange", "apiRef"];
|
|
5
|
+
const _excluded = ["initialZoom", "zoomData", "onZoomChange", "apiRef"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { useThemeProps } from '@mui/material/styles';
|
|
9
9
|
import { ChartsOverlay } from '@mui/x-charts/ChartsOverlay';
|
|
10
10
|
import { ScatterPlot } from '@mui/x-charts/ScatterChart';
|
|
11
|
-
import { ChartsVoronoiHandler } from '@mui/x-charts/ChartsVoronoiHandler';
|
|
12
11
|
import { ChartsAxis } from '@mui/x-charts/ChartsAxis';
|
|
13
12
|
import { ChartsGrid } from '@mui/x-charts/ChartsGrid';
|
|
14
13
|
import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
|
|
@@ -18,6 +17,7 @@ import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
|
|
|
18
17
|
import { useScatterChartProps, ChartsWrapper } from '@mui/x-charts/internals';
|
|
19
18
|
import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
|
|
20
19
|
import { ChartDataProviderPro } from "../ChartDataProviderPro/index.js";
|
|
20
|
+
import { SCATTER_CHART_PRO_PLUGINS } from "./ScatterChartPro.plugins.js";
|
|
21
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
22
|
/**
|
|
23
23
|
* Demos:
|
|
@@ -36,6 +36,7 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
|
|
|
36
36
|
});
|
|
37
37
|
const {
|
|
38
38
|
initialZoom,
|
|
39
|
+
zoomData,
|
|
39
40
|
onZoomChange,
|
|
40
41
|
apiRef
|
|
41
42
|
} = props,
|
|
@@ -43,7 +44,6 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
|
|
|
43
44
|
const {
|
|
44
45
|
chartsWrapperProps,
|
|
45
46
|
chartContainerProps,
|
|
46
|
-
voronoiHandlerProps,
|
|
47
47
|
chartsAxisProps,
|
|
48
48
|
gridProps,
|
|
49
49
|
scatterPlotProps,
|
|
@@ -57,14 +57,16 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
|
|
|
57
57
|
chartsSurfaceProps
|
|
58
58
|
} = useChartContainerProProps(_extends({}, chartContainerProps, {
|
|
59
59
|
initialZoom,
|
|
60
|
+
zoomData,
|
|
60
61
|
onZoomChange,
|
|
61
|
-
apiRef
|
|
62
|
+
apiRef,
|
|
63
|
+
plugins: SCATTER_CHART_PRO_PLUGINS
|
|
62
64
|
}), ref);
|
|
63
65
|
const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
|
|
64
66
|
return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
|
|
65
67
|
children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
|
|
66
68
|
children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
67
|
-
children: [
|
|
69
|
+
children: [/*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsx("g", {
|
|
68
70
|
"data-drawing-container": true,
|
|
69
71
|
children: /*#__PURE__*/_jsx(ScatterPlot, _extends({}, scatterPlotProps))
|
|
70
72
|
}), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props?.slotProps?.tooltip, {
|
|
@@ -93,17 +95,11 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
93
95
|
x: PropTypes.oneOf(['band', 'line', 'none']),
|
|
94
96
|
y: PropTypes.oneOf(['band', 'line', 'none'])
|
|
95
97
|
}),
|
|
96
|
-
/**
|
|
97
|
-
* Indicate which axis to display the bottom of the charts.
|
|
98
|
-
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
99
|
-
* @default xAxisIds[0] The id of the first provided axis
|
|
100
|
-
*/
|
|
101
|
-
bottomAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
102
98
|
children: PropTypes.node,
|
|
103
99
|
className: PropTypes.string,
|
|
104
100
|
/**
|
|
105
101
|
* Color palette used to colorize multiple series.
|
|
106
|
-
* @default
|
|
102
|
+
* @default rainbowSurgePalette
|
|
107
103
|
*/
|
|
108
104
|
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
109
105
|
/**
|
|
@@ -138,11 +134,12 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
138
134
|
*/
|
|
139
135
|
hideLegend: PropTypes.bool,
|
|
140
136
|
/**
|
|
141
|
-
* The
|
|
137
|
+
* The highlighted item.
|
|
138
|
+
* Used when the highlight is controlled.
|
|
142
139
|
*/
|
|
143
140
|
highlightedItem: PropTypes.shape({
|
|
144
141
|
dataIndex: PropTypes.number,
|
|
145
|
-
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
142
|
+
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
|
|
146
143
|
}),
|
|
147
144
|
/**
|
|
148
145
|
* This prop is used to help implement the accessibility logic.
|
|
@@ -151,18 +148,13 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
151
148
|
id: PropTypes.string,
|
|
152
149
|
/**
|
|
153
150
|
* The list of zoom data related to each axis.
|
|
151
|
+
* Used to initialize the zoom in a specific configuration without controlling it.
|
|
154
152
|
*/
|
|
155
153
|
initialZoom: PropTypes.arrayOf(PropTypes.shape({
|
|
156
154
|
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
157
155
|
end: PropTypes.number.isRequired,
|
|
158
156
|
start: PropTypes.number.isRequired
|
|
159
157
|
})),
|
|
160
|
-
/**
|
|
161
|
-
* Indicate which axis to display the left of the charts.
|
|
162
|
-
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
163
|
-
* @default yAxisIds[0] The id of the first provided axis
|
|
164
|
-
*/
|
|
165
|
-
leftAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
166
158
|
/**
|
|
167
159
|
* If `true`, a loading overlay is displayed.
|
|
168
160
|
* @default false
|
|
@@ -171,14 +163,22 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
171
163
|
/**
|
|
172
164
|
* The margin between the SVG and the drawing area.
|
|
173
165
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
174
|
-
*
|
|
166
|
+
*
|
|
167
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
175
168
|
*/
|
|
176
|
-
margin: PropTypes.shape({
|
|
169
|
+
margin: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
177
170
|
bottom: PropTypes.number,
|
|
178
171
|
left: PropTypes.number,
|
|
179
172
|
right: PropTypes.number,
|
|
180
173
|
top: PropTypes.number
|
|
181
|
-
}),
|
|
174
|
+
})]),
|
|
175
|
+
/**
|
|
176
|
+
* The function called for onClick events.
|
|
177
|
+
* The second argument contains information about all line/bar elements at the current mouse position.
|
|
178
|
+
* @param {MouseEvent} event The mouse event recorded on the `<svg/>` element.
|
|
179
|
+
* @param {null | AxisData} data The data about the clicked axis and items associated with it.
|
|
180
|
+
*/
|
|
181
|
+
onAxisClick: PropTypes.func,
|
|
182
182
|
/**
|
|
183
183
|
* The callback fired when the highlighted item changes.
|
|
184
184
|
*
|
|
@@ -197,12 +197,6 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
197
197
|
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
198
198
|
*/
|
|
199
199
|
onZoomChange: PropTypes.func,
|
|
200
|
-
/**
|
|
201
|
-
* Indicate which axis to display the right of the charts.
|
|
202
|
-
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
203
|
-
* @default null
|
|
204
|
-
*/
|
|
205
|
-
rightAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
206
200
|
/**
|
|
207
201
|
* The series to display in the scatter chart.
|
|
208
202
|
* An array of [[ScatterSeriesType]] objects.
|
|
@@ -226,12 +220,6 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
226
220
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
227
221
|
theme: PropTypes.oneOf(['dark', 'light']),
|
|
228
222
|
title: PropTypes.string,
|
|
229
|
-
/**
|
|
230
|
-
* Indicate which axis to display the top of the charts.
|
|
231
|
-
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
232
|
-
* @default null
|
|
233
|
-
*/
|
|
234
|
-
topAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
235
223
|
/**
|
|
236
224
|
* Defines the maximal distance between a scatter point and the pointer that triggers the interaction.
|
|
237
225
|
* If `undefined`, the radius is assumed to be infinite.
|
|
@@ -247,6 +235,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
247
235
|
* An array of [[AxisConfig]] objects.
|
|
248
236
|
*/
|
|
249
237
|
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
238
|
+
axis: PropTypes.oneOf(['x']),
|
|
250
239
|
classes: PropTypes.object,
|
|
251
240
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
252
241
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
@@ -269,13 +258,15 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
269
258
|
disableTicks: PropTypes.bool,
|
|
270
259
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
271
260
|
fill: PropTypes.string,
|
|
261
|
+
height: PropTypes.number,
|
|
272
262
|
hideTooltip: PropTypes.bool,
|
|
273
263
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
274
264
|
label: PropTypes.string,
|
|
275
265
|
labelStyle: PropTypes.object,
|
|
276
266
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
277
267
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
278
|
-
|
|
268
|
+
offset: PropTypes.number,
|
|
269
|
+
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
279
270
|
reverse: PropTypes.bool,
|
|
280
271
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
281
272
|
slotProps: PropTypes.object,
|
|
@@ -284,6 +275,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
284
275
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
285
276
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
286
277
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
278
|
+
tickLabelMinGap: PropTypes.number,
|
|
287
279
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
288
280
|
tickLabelStyle: PropTypes.object,
|
|
289
281
|
tickMaxStep: PropTypes.number,
|
|
@@ -308,6 +300,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
308
300
|
* An array of [[AxisConfig]] objects.
|
|
309
301
|
*/
|
|
310
302
|
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
303
|
+
axis: PropTypes.oneOf(['y']),
|
|
311
304
|
classes: PropTypes.object,
|
|
312
305
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
313
306
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
@@ -336,7 +329,8 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
336
329
|
labelStyle: PropTypes.object,
|
|
337
330
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
338
331
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
339
|
-
|
|
332
|
+
offset: PropTypes.number,
|
|
333
|
+
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
340
334
|
reverse: PropTypes.bool,
|
|
341
335
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
342
336
|
slotProps: PropTypes.object,
|
|
@@ -353,6 +347,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
353
347
|
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
354
348
|
tickSize: PropTypes.number,
|
|
355
349
|
valueFormatter: PropTypes.func,
|
|
350
|
+
width: PropTypes.number,
|
|
356
351
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
357
352
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
358
353
|
maxEnd: PropTypes.number,
|
|
@@ -387,6 +382,14 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
387
382
|
id: PropTypes.string,
|
|
388
383
|
max: PropTypes.number,
|
|
389
384
|
min: PropTypes.number
|
|
385
|
+
})),
|
|
386
|
+
/**
|
|
387
|
+
* The list of zoom data related to each axis.
|
|
388
|
+
*/
|
|
389
|
+
zoomData: PropTypes.arrayOf(PropTypes.shape({
|
|
390
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
391
|
+
end: PropTypes.number.isRequired,
|
|
392
|
+
start: PropTypes.number.isRequired
|
|
390
393
|
}))
|
|
391
394
|
} : void 0;
|
|
392
395
|
export { ScatterChartPro };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartVoronoiSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
2
|
+
import { UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
|
|
3
|
+
export type ScatterChartProPluginsSignatures = [UseChartZAxisSignature, UseChartCartesianAxisSignature<'scatter'>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartVoronoiSignature, UseChartProZoomSignature];
|
|
4
|
+
export declare const SCATTER_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<ScatterChartProPluginsSignatures>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartVoronoi } from '@mui/x-charts/internals';
|
|
2
|
+
import { useChartProZoom } from "../internals/plugins/useChartProZoom/index.js";
|
|
3
|
+
export const SCATTER_CHART_PRO_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartVoronoi, useChartProZoom];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ScatterChartPro.js";
|
package/modern/hooks/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { useHeatmapSeries
|
|
1
|
+
export { useHeatmapSeries } from "./useHeatmapSeries.js";
|
|
2
2
|
export * from "./zoom/index.js";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ProcessedSeries, SeriesId, ChartSeriesDefaultized } from '@mui/x-charts/internals';
|
|
2
|
+
export type UseFunnelSeriesReturnValue = ChartSeriesDefaultized<'funnel'>;
|
|
3
|
+
export type UseFunnelSeriesContextReturnValue = ProcessedSeries['funnel'];
|
|
4
|
+
/**
|
|
5
|
+
* Get access to the internal state of funnel series.
|
|
6
|
+
*
|
|
7
|
+
* @param {SeriesId} seriesId The id of the series to get.
|
|
8
|
+
* @returns {UseFunnelSeriesReturnValue} the funnel series
|
|
9
|
+
*/
|
|
10
|
+
export declare function useFunnelSeries(seriesId: SeriesId): UseFunnelSeriesReturnValue | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Get access to the internal state of funnel series.
|
|
13
|
+
*
|
|
14
|
+
* When called without arguments, it returns all funnel series.
|
|
15
|
+
*
|
|
16
|
+
* @returns {UseFunnelSeriesReturnValue[]} the funnel series
|
|
17
|
+
*/
|
|
18
|
+
export declare function useFunnelSeries(): UseFunnelSeriesReturnValue[];
|
|
19
|
+
/**
|
|
20
|
+
* Get access to the internal state of funnel series.
|
|
21
|
+
*
|
|
22
|
+
* @param {SeriesId[]} seriesIds The ids of the series to get. Order is preserved.
|
|
23
|
+
* @returns {UseFunnelSeriesReturnValue[]} the funnel series
|
|
24
|
+
*/
|
|
25
|
+
export declare function useFunnelSeries(seriesIds: SeriesId[]): UseFunnelSeriesReturnValue[];
|
|
26
|
+
/**
|
|
27
|
+
* Get access to the internal state of funnel series.
|
|
28
|
+
* The returned object contains:
|
|
29
|
+
* - series: a mapping from ids to series attributes.
|
|
30
|
+
* - seriesOrder: the array of series ids.
|
|
31
|
+
* @returns the funnel series
|
|
32
|
+
*/
|
|
33
|
+
export declare function useFunnelSeriesContext(): UseFunnelSeriesContextReturnValue;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { createAllSeriesSelectorOfType, createSeriesSelectorsOfType } from '@mui/x-charts/internals';
|
|
4
|
+
const useSelectorSeries = createSeriesSelectorsOfType('funnel');
|
|
5
|
+
const useSelectorSeriesContext = createAllSeriesSelectorOfType('funnel');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Get access to the internal state of funnel series.
|
|
9
|
+
*
|
|
10
|
+
* @param {SeriesId} seriesId The id of the series to get.
|
|
11
|
+
* @returns {UseFunnelSeriesReturnValue} the funnel series
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Get access to the internal state of funnel series.
|
|
16
|
+
*
|
|
17
|
+
* When called without arguments, it returns all funnel series.
|
|
18
|
+
*
|
|
19
|
+
* @returns {UseFunnelSeriesReturnValue[]} the funnel series
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Get access to the internal state of funnel series.
|
|
24
|
+
*
|
|
25
|
+
* @param {SeriesId[]} seriesIds The ids of the series to get. Order is preserved.
|
|
26
|
+
* @returns {UseFunnelSeriesReturnValue[]} the funnel series
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
export function useFunnelSeries(seriesIds) {
|
|
30
|
+
return useSelectorSeries(seriesIds);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Get access to the internal state of funnel series.
|
|
35
|
+
* The returned object contains:
|
|
36
|
+
* - series: a mapping from ids to series attributes.
|
|
37
|
+
* - seriesOrder: the array of series ids.
|
|
38
|
+
* @returns the funnel series
|
|
39
|
+
*/
|
|
40
|
+
export function useFunnelSeriesContext() {
|
|
41
|
+
return useSelectorSeriesContext();
|
|
42
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ProcessedSeries, SeriesId, ChartSeriesDefaultized } from '@mui/x-charts/internals';
|
|
2
|
+
export type UseHeatmapSeriesReturnValue = ChartSeriesDefaultized<'heatmap'>;
|
|
3
|
+
export type UseHeatmapSeriesContextReturnValue = ProcessedSeries['heatmap'];
|
|
4
|
+
/**
|
|
5
|
+
* Get access to the internal state of heatmap series.
|
|
6
|
+
*
|
|
7
|
+
* @param {SeriesId} seriesId The id of the series to get.
|
|
8
|
+
* @returns {UseHeatmapSeriesReturnValue} the heatmap series
|
|
9
|
+
*/
|
|
10
|
+
export declare function useHeatmapSeries(seriesId: SeriesId): UseHeatmapSeriesReturnValue | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Get access to the internal state of heatmap series.
|
|
13
|
+
*
|
|
14
|
+
* When called without arguments, it returns all heatmap series.
|
|
15
|
+
*
|
|
16
|
+
* @returns {UseHeatmapSeriesReturnValue[]} the heatmap series
|
|
17
|
+
*/
|
|
18
|
+
export declare function useHeatmapSeries(): UseHeatmapSeriesReturnValue[];
|
|
19
|
+
/**
|
|
20
|
+
* Get access to the internal state of heatmap series.
|
|
21
|
+
*
|
|
22
|
+
* @param {SeriesId[]} seriesIds The ids of the series to get. Order is preserved.
|
|
23
|
+
* @returns {UseHeatmapSeriesReturnValue[]} the heatmap series
|
|
24
|
+
*/
|
|
25
|
+
export declare function useHeatmapSeries(seriesIds: SeriesId[]): UseHeatmapSeriesReturnValue[];
|
|
26
|
+
/**
|
|
27
|
+
* Get access to the internal state of heatmap series.
|
|
28
|
+
* The returned object contains:
|
|
29
|
+
* - series: a mapping from ids to series attributes.
|
|
30
|
+
* - seriesOrder: the array of series ids.
|
|
31
|
+
* @returns the heatmap series
|
|
32
|
+
*/
|
|
33
|
+
export declare function useHeatmapSeriesContext(): UseHeatmapSeriesContextReturnValue;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { createAllSeriesSelectorOfType, createSeriesSelectorsOfType } from '@mui/x-charts/internals';
|
|
4
|
+
const useSelectorSeries = createSeriesSelectorsOfType('heatmap');
|
|
5
|
+
const useSelectorSeriesContext = createAllSeriesSelectorOfType('heatmap');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Get access to the internal state of heatmap series.
|
|
9
|
+
*
|
|
10
|
+
* @param {SeriesId} seriesId The id of the series to get.
|
|
11
|
+
* @returns {UseHeatmapSeriesReturnValue} the heatmap series
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Get access to the internal state of heatmap series.
|
|
16
|
+
*
|
|
17
|
+
* When called without arguments, it returns all heatmap series.
|
|
18
|
+
*
|
|
19
|
+
* @returns {UseHeatmapSeriesReturnValue[]} the heatmap series
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Get access to the internal state of heatmap series.
|
|
24
|
+
*
|
|
25
|
+
* @param {SeriesId[]} seriesIds The ids of the series to get. Order is preserved.
|
|
26
|
+
* @returns {UseHeatmapSeriesReturnValue[]} the heatmap series
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
export function useHeatmapSeries(seriesIds) {
|
|
30
|
+
return useSelectorSeries(seriesIds);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Get access to the internal state of heatmap series.
|
|
35
|
+
* The returned object contains:
|
|
36
|
+
* - series: a mapping from ids to series attributes.
|
|
37
|
+
* - seriesOrder: the array of series ids.
|
|
38
|
+
* @returns the heatmap series
|
|
39
|
+
*/
|
|
40
|
+
export function useHeatmapSeriesContext() {
|
|
41
|
+
return useSelectorSeriesContext();
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./useIsZoomInteracting.js";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import "./typeOverloads/modules.js";
|
|
2
|
+
export * from '@mui/x-charts/constants';
|
|
3
|
+
export * from '@mui/x-charts/context';
|
|
4
|
+
export * from '@mui/x-charts/hooks';
|
|
5
|
+
export * from '@mui/x-charts/colorPalettes';
|
|
6
|
+
export * from '@mui/x-charts/models';
|
|
7
|
+
export * from '@mui/x-charts/ChartsClipPath';
|
|
8
|
+
export * from '@mui/x-charts/ChartsReferenceLine';
|
|
9
|
+
export * from '@mui/x-charts/ChartsAxis';
|
|
10
|
+
export * from '@mui/x-charts/ChartsXAxis';
|
|
11
|
+
export * from '@mui/x-charts/ChartsYAxis';
|
|
12
|
+
export * from '@mui/x-charts/ChartsGrid';
|
|
13
|
+
export * from '@mui/x-charts/ChartsText';
|
|
14
|
+
export * from '@mui/x-charts/ChartsTooltip';
|
|
15
|
+
export * from '@mui/x-charts/ChartsLegend';
|
|
16
|
+
export * from '@mui/x-charts/ChartsAxisHighlight';
|
|
17
|
+
export * from '@mui/x-charts/BarChart';
|
|
18
|
+
export * from '@mui/x-charts/LineChart';
|
|
19
|
+
export * from '@mui/x-charts/PieChart';
|
|
20
|
+
export * from '@mui/x-charts/ScatterChart';
|
|
21
|
+
export * from '@mui/x-charts/SparkLineChart';
|
|
22
|
+
export * from '@mui/x-charts/Gauge';
|
|
23
|
+
export * from '@mui/x-charts/RadarChart';
|
|
24
|
+
export * from '@mui/x-charts/ChartsSurface';
|
|
25
|
+
export * from '@mui/x-charts/ChartDataProvider';
|
|
26
|
+
export * from '@mui/x-charts/ChartsLabel';
|
|
27
|
+
export * from "./hooks/index.js";
|
|
28
|
+
export * from "./Heatmap/index.js";
|
|
29
|
+
export * from "./ChartContainerPro/index.js";
|
|
30
|
+
export * from "./ChartDataProviderPro/index.js";
|
|
31
|
+
export * from "./ScatterChartPro/index.js";
|
|
32
|
+
export * from "./BarChartPro/index.js";
|
|
33
|
+
export * from "./LineChartPro/index.js";
|
|
34
|
+
export * from "./FunnelChart/index.js";
|
package/modern/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-charts-pro v8.0.0-
|
|
2
|
+
* @mui/x-charts-pro v8.0.0-beta.1
|
|
3
3
|
*
|
|
4
4
|
* @license MUI X Commercial
|
|
5
5
|
* This source code is licensed under the commercial license found in the
|
|
@@ -23,22 +23,23 @@ export * from '@mui/x-charts/ChartsText';
|
|
|
23
23
|
export * from '@mui/x-charts/ChartsTooltip';
|
|
24
24
|
export * from '@mui/x-charts/ChartsLegend';
|
|
25
25
|
export * from '@mui/x-charts/ChartsAxisHighlight';
|
|
26
|
-
export * from '@mui/x-charts/ChartsVoronoiHandler';
|
|
27
|
-
export * from '@mui/x-charts/ChartsOnAxisClickHandler';
|
|
28
26
|
export * from '@mui/x-charts/BarChart';
|
|
29
27
|
export * from '@mui/x-charts/LineChart';
|
|
30
28
|
export * from '@mui/x-charts/PieChart';
|
|
31
29
|
export * from '@mui/x-charts/ScatterChart';
|
|
32
30
|
export * from '@mui/x-charts/SparkLineChart';
|
|
33
31
|
export * from '@mui/x-charts/Gauge';
|
|
32
|
+
export * from '@mui/x-charts/RadarChart';
|
|
34
33
|
export * from '@mui/x-charts/ChartsSurface';
|
|
35
34
|
export * from '@mui/x-charts/ChartDataProvider';
|
|
36
35
|
export * from '@mui/x-charts/ChartsLabel';
|
|
37
36
|
|
|
38
37
|
// Pro components
|
|
38
|
+
export * from "./hooks/index.js";
|
|
39
39
|
export * from "./Heatmap/index.js";
|
|
40
40
|
export * from "./ChartContainerPro/index.js";
|
|
41
41
|
export * from "./ChartDataProviderPro/index.js";
|
|
42
42
|
export * from "./ScatterChartPro/index.js";
|
|
43
43
|
export * from "./BarChartPro/index.js";
|
|
44
|
-
export * from "./LineChartPro/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>>)[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// This file should be removed after creating all plugins in favor of a file per chart type.
|
|
2
2
|
|
|
3
|
-
import { useChartCartesianAxis, useChartInteraction, useChartZAxis } from '@mui/x-charts/internals';
|
|
3
|
+
import { useChartCartesianAxis, useChartInteraction, useChartZAxis, useChartHighlight, useChartPolarAxis } from '@mui/x-charts/internals';
|
|
4
4
|
import { useChartProZoom } from "./useChartProZoom/index.js";
|
|
5
|
-
export const ALL_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartProZoom];
|
|
5
|
+
export const ALL_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartPolarAxis, useChartInteraction, useChartHighlight, useChartProZoom];
|
|
6
|
+
export const DEFAULT_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartProZoom];
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
5
|
+
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
6
|
+
import { useSelector, getSVGPoint, selectorChartDrawingArea, createZoomLookup, selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
|
|
7
7
|
import { getDiff, getHorizontalCenterRatio, getPinchScaleRatio, getVerticalCenterRatio, getWheelScaleRatio, isSpanValid, preventDefault, zoomAtPoint } from "./useChartProZoom.utils.js";
|
|
8
|
-
import { selectorChartZoomOptionsLookup } from "./useChartProZoom.selectors.js";
|
|
9
8
|
|
|
10
9
|
// It is helpful to avoid the need to provide the possibly auto-generated id for each axis.
|
|
11
10
|
function initializeZoomData(options) {
|
|
@@ -25,15 +24,46 @@ export const useChartProZoom = ({
|
|
|
25
24
|
svgRef,
|
|
26
25
|
params
|
|
27
26
|
}) => {
|
|
27
|
+
const {
|
|
28
|
+
zoomData: paramsZoomData,
|
|
29
|
+
onZoomChange
|
|
30
|
+
} = params;
|
|
28
31
|
const drawingArea = useSelector(store, selectorChartDrawingArea);
|
|
29
32
|
const optionsLookup = useSelector(store, selectorChartZoomOptionsLookup);
|
|
30
33
|
const isZoomEnabled = Object.keys(optionsLookup).length > 0;
|
|
31
34
|
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
|
37
67
|
const setIsInteracting = React.useCallback(isInteracting => {
|
|
38
68
|
store.update(prev => _extends({}, prev, {
|
|
39
69
|
zoom: _extends({}, prev.zoom, {
|
|
@@ -43,15 +73,24 @@ export const useChartProZoom = ({
|
|
|
43
73
|
}, [store]);
|
|
44
74
|
const setZoomDataCallback = React.useCallback(zoomData => {
|
|
45
75
|
store.update(prevState => {
|
|
46
|
-
const newZoomData = typeof zoomData === 'function' ? zoomData(prevState.zoom.zoomData) : zoomData;
|
|
47
|
-
|
|
76
|
+
const newZoomData = typeof zoomData === 'function' ? zoomData([...prevState.zoom.zoomData]) : zoomData;
|
|
77
|
+
onZoomChange?.(newZoomData);
|
|
78
|
+
if (prevState.zoom.isControlled) {
|
|
79
|
+
return prevState;
|
|
80
|
+
}
|
|
48
81
|
return _extends({}, prevState, {
|
|
49
82
|
zoom: _extends({}, prevState.zoom, {
|
|
50
83
|
zoomData: newZoomData
|
|
51
84
|
})
|
|
52
85
|
});
|
|
53
86
|
});
|
|
54
|
-
}, [
|
|
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);
|
|
55
94
|
|
|
56
95
|
// Add event for chart panning
|
|
57
96
|
const isPanEnabled = React.useMemo(() => Object.values(optionsLookup).some(v => v.panning) || false, [optionsLookup]);
|
|
@@ -283,21 +322,29 @@ export const useChartProZoom = ({
|
|
|
283
322
|
};
|
|
284
323
|
useChartProZoom.params = {
|
|
285
324
|
initialZoom: true,
|
|
286
|
-
onZoomChange: true
|
|
325
|
+
onZoomChange: true,
|
|
326
|
+
zoomData: true
|
|
287
327
|
};
|
|
288
328
|
useChartProZoom.getDefaultizedParams = ({
|
|
289
329
|
params
|
|
290
330
|
}) => {
|
|
291
|
-
|
|
292
|
-
return _extends({}, params, {
|
|
293
|
-
optionsLookup
|
|
294
|
-
});
|
|
331
|
+
return _extends({}, params);
|
|
295
332
|
};
|
|
296
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));
|
|
297
341
|
return {
|
|
298
342
|
zoom: {
|
|
299
|
-
zoomData:
|
|
300
|
-
|
|
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
|
|
301
348
|
}
|
|
302
349
|
};
|
|
303
350
|
};
|