@mui/x-charts-pro 8.0.0-alpha.11 → 8.0.0-alpha.12
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 +3 -4
- package/BarChartPro/BarChartPro.js +227 -221
- package/BarChartPro/BarChartPro.plugins.d.ts +3 -9
- package/BarChartPro/BarChartPro.plugins.js +9 -3
- package/BarChartPro/index.d.ts +1 -1
- package/BarChartPro/index.js +16 -1
- package/CHANGELOG.md +161 -1
- package/ChartContainerPro/ChartContainerPro.d.ts +4 -4
- package/ChartContainerPro/ChartContainerPro.js +178 -172
- package/ChartContainerPro/index.d.ts +2 -1
- package/ChartContainerPro/index.js +17 -1
- package/ChartContainerPro/useChartContainerProProps.d.ts +3 -3
- package/ChartContainerPro/useChartContainerProProps.js +17 -10
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +3 -3
- package/ChartDataProviderPro/ChartDataProviderPro.js +34 -28
- package/ChartDataProviderPro/index.d.ts +2 -1
- package/ChartDataProviderPro/index.js +17 -1
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +4 -4
- package/ChartDataProviderPro/useChartDataProviderProProps.js +10 -4
- package/Heatmap/Heatmap.d.ts +43 -43
- package/Heatmap/Heatmap.js +210 -204
- package/Heatmap/Heatmap.plugins.d.ts +2 -7
- package/Heatmap/Heatmap.plugins.js +8 -2
- package/Heatmap/HeatmapItem.d.ts +33 -33
- package/Heatmap/HeatmapItem.js +39 -32
- package/Heatmap/HeatmapPlot.d.ts +4 -5
- package/Heatmap/HeatmapPlot.js +22 -16
- package/Heatmap/HeatmapTooltip.d.ts +3 -4
- package/Heatmap/HeatmapTooltip.js +97 -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/index.d.ts +2 -0
- package/{node/Heatmap/plugin.js → Heatmap/seriesConfig/index.js} +4 -4
- package/Heatmap/seriesConfig/seriesProcessor.d.ts +3 -0
- package/{node/Heatmap/formatter.js → Heatmap/seriesConfig/seriesProcessor.js} +2 -2
- package/Heatmap/{tooltip.d.ts → seriesConfig/tooltip.d.ts} +1 -1
- package/LineChartPro/LineChartPro.d.ts +3 -4
- package/LineChartPro/LineChartPro.js +239 -233
- package/LineChartPro/LineChartPro.plugins.d.ts +3 -9
- package/LineChartPro/LineChartPro.plugins.js +9 -3
- package/LineChartPro/index.d.ts +1 -1
- package/LineChartPro/index.js +16 -1
- package/ScatterChartPro/ScatterChartPro.d.ts +4 -4
- package/ScatterChartPro/ScatterChartPro.js +216 -212
- package/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -10
- package/ScatterChartPro/ScatterChartPro.plugins.js +9 -3
- package/ScatterChartPro/index.d.ts +1 -1
- package/ScatterChartPro/index.js +16 -1
- package/esm/BarChartPro/BarChartPro.d.ts +17 -0
- package/esm/BarChartPro/BarChartPro.js +455 -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 +33 -0
- package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +37 -0
- package/{node → esm}/ChartDataProviderPro/ChartDataProviderPro.js +28 -34
- 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/Heatmap/Heatmap.d.ts +56 -0
- package/esm/Heatmap/Heatmap.js +402 -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 +276 -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/index.d.ts +2 -0
- package/{Heatmap/plugin.js → esm/Heatmap/seriesConfig/index.js} +3 -3
- 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/LineChartPro/LineChartPro.d.ts +16 -0
- package/esm/LineChartPro/LineChartPro.js +506 -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 +400 -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/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 +32 -0
- package/esm/index.js +43 -0
- package/esm/internals/plugins/allPlugins.d.ts +5 -0
- package/esm/internals/plugins/allPlugins.js +5 -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 +33 -44
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +201 -0
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +4 -0
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +44 -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/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 +22 -0
- package/esm/typeOverloads/modules.js +1 -0
- package/hooks/index.d.ts +2 -2
- package/hooks/index.js +27 -2
- 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 +8 -7
- package/index.js +347 -36
- package/internals/plugins/allPlugins.d.ts +3 -9
- package/internals/plugins/allPlugins.js +9 -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 +40 -37
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +149 -325
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +11 -10
- package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +35 -41
- 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 +17 -18
- 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 +17 -0
- package/modern/BarChartPro/BarChartPro.plugins.d.ts +4 -0
- package/modern/BarChartPro/index.d.ts +1 -0
- package/modern/ChartContainerPro/ChartContainerPro.d.ts +35 -0
- 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/ChartDataProviderPro/ChartDataProviderPro.d.ts +37 -0
- 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/Heatmap/Heatmap.d.ts +56 -0
- package/modern/Heatmap/Heatmap.js +2 -2
- package/modern/Heatmap/Heatmap.plugins.d.ts +3 -0
- package/modern/Heatmap/HeatmapItem.d.ts +49 -0
- 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 +6 -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/index.d.ts +2 -0
- package/modern/Heatmap/{plugin.js → seriesConfig/index.js} +3 -3
- 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/LineChartPro/LineChartPro.d.ts +16 -0
- package/modern/LineChartPro/LineChartPro.plugins.d.ts +4 -0
- package/modern/LineChartPro/index.d.ts +1 -0
- package/modern/ScatterChartPro/ScatterChartPro.d.ts +17 -0
- package/modern/ScatterChartPro/ScatterChartPro.js +1 -3
- package/modern/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -0
- package/modern/ScatterChartPro/ScatterChartPro.plugins.js +2 -2
- 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/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 +32 -0
- package/modern/index.js +2 -2
- package/modern/internals/plugins/allPlugins.d.ts +5 -0
- 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 +4 -8
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +201 -0
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +1 -7
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +44 -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 +22 -0
- package/package.json +41 -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 +20 -23
- 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/LineChartPro/package.json +0 -6
- package/ScatterChartPro/package.json +0 -6
- package/hooks/package.json +0 -6
- package/hooks/useSeries.d.ts +0 -9
- 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/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 -461
- package/node/BarChartPro/BarChartPro.plugins.js +0 -9
- package/node/BarChartPro/index.js +0 -16
- package/node/ChartContainerPro/ChartContainerPro.js +0 -296
- package/node/ChartContainerPro/index.js +0 -16
- package/node/ChartContainerPro/useChartContainerProProps.js +0 -40
- package/node/ChartDataProviderPro/index.js +0 -16
- package/node/ChartDataProviderPro/useChartDataProviderProProps.js +0 -21
- package/node/Heatmap/Heatmap.js +0 -408
- package/node/Heatmap/Heatmap.plugins.js +0 -8
- 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/LineChartPro/LineChartPro.js +0 -512
- package/node/LineChartPro/LineChartPro.plugins.js +0 -9
- package/node/LineChartPro/index.js +0 -16
- package/node/ScatterChartPro/ScatterChartPro.js +0 -408
- package/node/ScatterChartPro/ScatterChartPro.plugins.js +0 -9
- 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 -354
- 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/plugins/useChartProZoom/useChartProZoom.types.js +0 -5
- package/node/internals/plugins/useChartProZoom/zoom.types.js +0 -5
- package/node/internals/utils/releaseInfo.js +0 -21
- package/node/models/index.js +0 -16
- package/node/models/seriesType/heatmap.js +0 -5
- package/node/models/seriesType/index.js +0 -16
- package/node/themeAugmentation/index.js +0 -1
- package/node/typeOverloads/index.js +0 -6
- package/node/typeOverloads/modules.js +0 -5
- package/themeAugmentation/package.json +0 -6
- package/typeOverloads/package.json +0 -6
- /package/{node/Heatmap → Heatmap/seriesConfig}/extremums.js +0 -0
- /package/{node/Heatmap → Heatmap/seriesConfig}/getColor.js +0 -0
- /package/{node/Heatmap → Heatmap/seriesConfig}/tooltip.js +0 -0
- /package/{Heatmap → esm/Heatmap/seriesConfig}/extremums.js +0 -0
- /package/{Heatmap → esm/Heatmap/seriesConfig}/getColor.js +0 -0
- /package/{Heatmap → esm/Heatmap/seriesConfig}/tooltip.js +0 -0
- /package/{internals/plugins/useChartProZoom/zoom.types.js → esm/internals/plugins/useChartProZoom/useChartProZoom.types.js} +0 -0
- /package/{modern/internals/plugins/useChartProZoom/zoom.types.js → esm/models/seriesType/heatmap.js} +0 -0
- /package/modern/Heatmap/{extremums.js → seriesConfig/extremums.js} +0 -0
- /package/modern/Heatmap/{getColor.js → seriesConfig/getColor.js} +0 -0
- /package/modern/Heatmap/{tooltip.js → seriesConfig/tooltip.js} +0 -0
|
@@ -1,50 +1,44 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UseChartSeriesSignature, ChartPluginSignature, UseChartCartesianAxisSignature, UseChartCartesianAxisDefaultizedParameters, ZoomData } from '@mui/x-charts/internals';
|
|
2
2
|
export interface UseChartProZoomParameters {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
/**
|
|
4
|
+
* The list of zoom data related to each axis.
|
|
5
|
+
*/
|
|
6
|
+
initialZoom?: ZoomData[];
|
|
7
|
+
/**
|
|
8
|
+
* Callback fired when the zoom has changed.
|
|
9
|
+
*
|
|
10
|
+
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
11
|
+
*/
|
|
12
|
+
onZoomChange?: (zoomData: ZoomData[] | ((zoomData: ZoomData[]) => ZoomData[])) => void;
|
|
13
13
|
}
|
|
14
|
-
export type UseChartProZoomDefaultizedParameters = UseChartProZoomParameters & UseChartCartesianAxisDefaultizedParameters
|
|
14
|
+
export type UseChartProZoomDefaultizedParameters = UseChartProZoomParameters & UseChartCartesianAxisDefaultizedParameters;
|
|
15
|
+
export interface UseChartProZoomState {
|
|
16
|
+
zoom: {
|
|
15
17
|
/**
|
|
16
|
-
*
|
|
18
|
+
* Whether the user is currently interacting with the chart.
|
|
19
|
+
* This is useful to disable animations while the user is interacting.
|
|
17
20
|
*/
|
|
18
|
-
|
|
19
|
-
};
|
|
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: ZoomData[];
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
export interface UseChartProZoomPublicApi {
|
|
21
|
+
isInteracting: boolean;
|
|
34
22
|
/**
|
|
35
|
-
*
|
|
36
|
-
* @param {ZoomData[] | ((prev: ZoomData[]) => ZoomData[])} value The new value. Can either be the new zoom data, or an updater function.
|
|
37
|
-
* @returns {void}
|
|
23
|
+
* Mapping of axis id to the zoom data.
|
|
38
24
|
*/
|
|
39
|
-
|
|
25
|
+
zoomData: ZoomData[];
|
|
26
|
+
};
|
|
40
27
|
}
|
|
41
|
-
export interface
|
|
28
|
+
export interface UseChartProZoomPublicApi {
|
|
29
|
+
/**
|
|
30
|
+
* Set the zoom data state.
|
|
31
|
+
* @param {ZoomData[] | ((prev: ZoomData[]) => ZoomData[])} value The new value. Can either be the new zoom data, or an updater function.
|
|
32
|
+
* @returns {void}
|
|
33
|
+
*/
|
|
34
|
+
setZoomData: (value: ZoomData[] | ((prev: ZoomData[]) => ZoomData[])) => void;
|
|
42
35
|
}
|
|
36
|
+
export interface UseChartProZoomInstance extends UseChartProZoomPublicApi {}
|
|
43
37
|
export type UseChartProZoomSignature = ChartPluginSignature<{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}>;
|
|
38
|
+
params: UseChartProZoomParameters;
|
|
39
|
+
defaultizedParams: UseChartProZoomDefaultizedParameters;
|
|
40
|
+
state: UseChartProZoomState;
|
|
41
|
+
publicAPI: UseChartProZoomPublicApi;
|
|
42
|
+
instance: UseChartProZoomInstance;
|
|
43
|
+
dependencies: [UseChartSeriesSignature, UseChartCartesianAxisSignature];
|
|
44
|
+
}>;
|
|
@@ -14,32 +14,32 @@ export declare function isSpanValid(minRange: number, maxRange: number, isZoomIn
|
|
|
14
14
|
* Get the scale ratio and if it's a zoom in or out from a wheel event.
|
|
15
15
|
*/
|
|
16
16
|
export declare function getWheelScaleRatio(event: WheelEvent, step: number): {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
scaleRatio: number;
|
|
18
|
+
isZoomIn: boolean;
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
21
|
* Get the scale ratio and if it's a zoom in or out from a pinch gesture.
|
|
22
22
|
*/
|
|
23
23
|
export declare function getPinchScaleRatio(curDiff: number, prevDiff: number, step: number): {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
scaleRatio: number;
|
|
25
|
+
isZoomIn: boolean;
|
|
26
26
|
};
|
|
27
27
|
export declare function getDiff(eventCache: PointerEvent[]): number;
|
|
28
28
|
/**
|
|
29
29
|
* Get the ratio of the point in the horizontal center of the area.
|
|
30
30
|
*/
|
|
31
31
|
export declare function getHorizontalCenterRatio(point: {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
34
|
}, area: {
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
left: number;
|
|
36
|
+
width: number;
|
|
37
37
|
}): number;
|
|
38
38
|
export declare function preventDefault(event: TouchEvent): void;
|
|
39
39
|
export declare function getVerticalCenterRatio(point: {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
42
|
}, area: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}): number;
|
|
43
|
+
top: number;
|
|
44
|
+
height: number;
|
|
45
|
+
}): number;
|
|
@@ -1,10 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getDiff = getDiff;
|
|
7
|
+
exports.getHorizontalCenterRatio = getHorizontalCenterRatio;
|
|
8
|
+
exports.getPinchScaleRatio = getPinchScaleRatio;
|
|
9
|
+
exports.getVerticalCenterRatio = getVerticalCenterRatio;
|
|
10
|
+
exports.getWheelScaleRatio = getWheelScaleRatio;
|
|
11
|
+
exports.isSpanValid = isSpanValid;
|
|
12
|
+
exports.preventDefault = preventDefault;
|
|
13
|
+
exports.zoomAtPoint = void 0;
|
|
1
14
|
/**
|
|
2
15
|
* Helper to get the range (in percents of a reference range) corresponding to a given scale.
|
|
3
16
|
* @param centerRatio {number} The ratio of the point that should not move between the previous and next range.
|
|
4
17
|
* @param scaleRatio {number} The target scale ratio.
|
|
5
18
|
* @returns The range to display.
|
|
6
19
|
*/
|
|
7
|
-
|
|
20
|
+
const zoomAtPoint = (centerRatio, scaleRatio, currentZoomData, options) => {
|
|
8
21
|
const MIN_RANGE = options.minStart;
|
|
9
22
|
const MAX_RANGE = options.maxEnd;
|
|
10
23
|
const MIN_ALLOWED_SPAN = options.minSpan;
|
|
@@ -36,7 +49,8 @@ export const zoomAtPoint = (centerRatio, scaleRatio, currentZoomData, options) =
|
|
|
36
49
|
/**
|
|
37
50
|
* Checks if the new span is valid.
|
|
38
51
|
*/
|
|
39
|
-
|
|
52
|
+
exports.zoomAtPoint = zoomAtPoint;
|
|
53
|
+
function isSpanValid(minRange, maxRange, isZoomIn, option) {
|
|
40
54
|
const newSpanPercent = maxRange - minRange;
|
|
41
55
|
if (isZoomIn && newSpanPercent < option.minSpan || !isZoomIn && newSpanPercent > option.maxSpan) {
|
|
42
56
|
return false;
|
|
@@ -63,7 +77,7 @@ function getMultiplier(event) {
|
|
|
63
77
|
/**
|
|
64
78
|
* Get the scale ratio and if it's a zoom in or out from a wheel event.
|
|
65
79
|
*/
|
|
66
|
-
|
|
80
|
+
function getWheelScaleRatio(event, step) {
|
|
67
81
|
const deltaY = -event.deltaY;
|
|
68
82
|
const multiplier = getMultiplier(event);
|
|
69
83
|
const scaledStep = step * multiplier * deltaY / 1000;
|
|
@@ -79,7 +93,7 @@ export function getWheelScaleRatio(event, step) {
|
|
|
79
93
|
/**
|
|
80
94
|
* Get the scale ratio and if it's a zoom in or out from a pinch gesture.
|
|
81
95
|
*/
|
|
82
|
-
|
|
96
|
+
function getPinchScaleRatio(curDiff, prevDiff, step) {
|
|
83
97
|
const scaledStep = step / 1000;
|
|
84
98
|
let scaleRatio = 0;
|
|
85
99
|
let isZoomIn = false;
|
|
@@ -99,7 +113,7 @@ export function getPinchScaleRatio(curDiff, prevDiff, step) {
|
|
|
99
113
|
isZoomIn
|
|
100
114
|
};
|
|
101
115
|
}
|
|
102
|
-
|
|
116
|
+
function getDiff(eventCache) {
|
|
103
117
|
const [firstEvent, secondEvent] = eventCache;
|
|
104
118
|
return Math.hypot(firstEvent.pageX - secondEvent.pageX, firstEvent.pageY - secondEvent.pageY);
|
|
105
119
|
}
|
|
@@ -107,17 +121,17 @@ export function getDiff(eventCache) {
|
|
|
107
121
|
/**
|
|
108
122
|
* Get the ratio of the point in the horizontal center of the area.
|
|
109
123
|
*/
|
|
110
|
-
|
|
124
|
+
function getHorizontalCenterRatio(point, area) {
|
|
111
125
|
const {
|
|
112
126
|
left,
|
|
113
127
|
width
|
|
114
128
|
} = area;
|
|
115
129
|
return (point.x - left) / width;
|
|
116
130
|
}
|
|
117
|
-
|
|
131
|
+
function preventDefault(event) {
|
|
118
132
|
event.preventDefault();
|
|
119
133
|
}
|
|
120
|
-
|
|
134
|
+
function getVerticalCenterRatio(point, area) {
|
|
121
135
|
const {
|
|
122
136
|
top,
|
|
123
137
|
height
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getReleaseInfo: () => any;
|
|
1
|
+
export declare const getReleaseInfo: () => any;
|
|
@@ -1,13 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getReleaseInfo = void 0;
|
|
8
|
+
var _ponyfillGlobal = _interopRequireDefault(require("@mui/utils/ponyfillGlobal"));
|
|
9
|
+
const getReleaseInfo = () => {
|
|
10
|
+
const releaseInfo = "MTczOTc0NjgwMDAwMA==";
|
|
4
11
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
12
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
13
|
// eslint-disable-next-line no-useless-concat
|
|
7
14
|
if (releaseInfo === '__RELEASE' + '_INFO__') {
|
|
8
15
|
// eslint-disable-next-line no-underscore-dangle
|
|
9
|
-
return
|
|
16
|
+
return _ponyfillGlobal.default.__MUI_RELEASE_INFO__;
|
|
10
17
|
}
|
|
11
18
|
}
|
|
12
19
|
return releaseInfo;
|
|
13
|
-
};
|
|
20
|
+
};
|
|
21
|
+
exports.getReleaseInfo = getReleaseInfo;
|
package/models/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type { ZoomData } from '@mui/x-charts/internals';
|
|
2
|
-
export * from
|
|
2
|
+
export * from "./seriesType/index.js";
|
package/models/index.js
CHANGED
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _seriesType = require("./seriesType");
|
|
7
|
+
Object.keys(_seriesType).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _seriesType[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _seriesType[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -2,28 +2,27 @@ import { DefaultizedProps } from '@mui/x-internals/types';
|
|
|
2
2
|
import { CommonDefaultizedProps, CommonSeriesType, CartesianSeriesType } from '@mui/x-charts/internals';
|
|
3
3
|
export type HeatmapValueType = [number, number, number];
|
|
4
4
|
export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType>, 'color'>, CartesianSeriesType {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
type: 'heatmap';
|
|
6
|
+
/**
|
|
7
|
+
* Data associated to each bar.
|
|
8
|
+
*/
|
|
9
|
+
data?: HeatmapValueType[];
|
|
10
|
+
/**
|
|
11
|
+
* The key used to retrieve data from the dataset.
|
|
12
|
+
*/
|
|
13
|
+
dataKey?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The label to display on the tooltip or the legend. It can be a string or a function.
|
|
16
|
+
*/
|
|
17
|
+
label?: string | ((location: 'tooltip' | 'legend') => string);
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* An object that allows to identify a single bar.
|
|
21
21
|
* Used for item interaction
|
|
22
22
|
*/
|
|
23
23
|
export type HeatmapItemIdentifier = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
type: 'heatmap';
|
|
25
|
+
seriesId: DefaultizedHeatmapSeriesType['id'];
|
|
26
|
+
dataIndex: number;
|
|
27
27
|
};
|
|
28
|
-
export interface DefaultizedHeatmapSeriesType extends DefaultizedProps<HeatmapSeriesType, CommonDefaultizedProps> {
|
|
29
|
-
}
|
|
28
|
+
export interface DefaultizedHeatmapSeriesType extends DefaultizedProps<HeatmapSeriesType, CommonDefaultizedProps> {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./heatmap.js";
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _heatmap = require("./heatmap");
|
|
7
|
+
Object.keys(_heatmap).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _heatmap[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _heatmap[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { BarChartProps } from '@mui/x-charts/BarChart';
|
|
3
|
+
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
4
|
+
export interface BarChartProProps extends Omit<BarChartProps, 'apiRef'>, Omit<ChartContainerProProps<'bar'>, 'series' | 'plugins' | 'seriesConfig'> {}
|
|
5
|
+
/**
|
|
6
|
+
* Demos:
|
|
7
|
+
*
|
|
8
|
+
* - [Bars](https://mui.com/x/react-charts/bars/)
|
|
9
|
+
* - [Bar demonstration](https://mui.com/x/react-charts/bar-demo/)
|
|
10
|
+
* - [Stacking](https://mui.com/x/react-charts/stacking/)
|
|
11
|
+
*
|
|
12
|
+
* API:
|
|
13
|
+
*
|
|
14
|
+
* - [BarChart API](https://mui.com/x/api/charts/bar-chart/)
|
|
15
|
+
*/
|
|
16
|
+
declare const BarChartPro: React.ForwardRefExoticComponent<BarChartProProps & React.RefAttributes<SVGSVGElement>>;
|
|
17
|
+
export { BarChartPro };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
2
|
+
import { UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
|
|
3
|
+
export type BarChartProPluginsSignatures = [UseChartZAxisSignature, UseChartCartesianAxisSignature<'bar'>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature];
|
|
4
|
+
export declare const BAR_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<BarChartProPluginsSignatures>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./BarChartPro.js";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ChartsSurfaceProps } from '@mui/x-charts/ChartsSurface';
|
|
3
|
+
import { ChartAnyPluginSignature, ChartSeriesType } from '@mui/x-charts/internals';
|
|
4
|
+
import { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
+
import { ChartDataProviderProProps } from "../ChartDataProviderPro/index.js";
|
|
6
|
+
export type ChartContainerProProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartDataProviderProProps<TSeries, TSignatures> & ChartsSurfaceProps;
|
|
7
|
+
type ChartContainerProComponent = <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartContainerProProps<TSeries, TSignatures> & {
|
|
8
|
+
ref?: React.ForwardedRef<SVGSVGElement>;
|
|
9
|
+
}) => React.JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* It sets up the data providers as well as the `<svg>` for the chart.
|
|
12
|
+
*
|
|
13
|
+
* This is a combination of both the `ChartDataProviderPro` and `ChartsSurface` components.
|
|
14
|
+
*
|
|
15
|
+
* Demos:
|
|
16
|
+
*
|
|
17
|
+
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
18
|
+
*
|
|
19
|
+
* API:
|
|
20
|
+
*
|
|
21
|
+
* - [ChartContainer API](https://mui.com/x/api/charts/chart-container/)
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```jsx
|
|
25
|
+
* <ChartContainerPro
|
|
26
|
+
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
27
|
+
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
28
|
+
* >
|
|
29
|
+
* <BarPlot />
|
|
30
|
+
* <ChartsXAxis position="bottom" axisId="x-axis" />
|
|
31
|
+
* </ChartContainerPro>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
declare const ChartContainerPro: ChartContainerProComponent;
|
|
35
|
+
export { ChartContainerPro };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChartAnyPluginSignature, ChartSeriesType, UseChartContainerPropsReturnValue } from '@mui/x-charts/internals';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ChartDataProviderProps } from '@mui/x-charts/ChartDataProvider';
|
|
4
|
+
import type { ChartContainerProProps } from './ChartContainerPro';
|
|
5
|
+
import { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
6
|
+
export type UseChartContainerProPropsReturnValue<TSeries extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = Pick<UseChartContainerPropsReturnValue<TSeries, TSignatures>, 'chartsSurfaceProps' | 'children'> & {
|
|
7
|
+
chartDataProviderProProps: ChartDataProviderProps<TSeries, TSignatures>;
|
|
8
|
+
};
|
|
9
|
+
export declare const useChartContainerProProps: <TSeries extends ChartSeriesType = keyof import("@mui/x-charts/internals").ChartsSeriesConfig, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartContainerProProps<TSeries, TSignatures>, ref: React.Ref<SVGSVGElement>) => UseChartContainerProPropsReturnValue<TSeries, TSignatures>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ChartSeriesType, ChartAnyPluginSignature, ChartProviderProps } from '@mui/x-charts/internals';
|
|
3
|
+
import { ChartDataProviderProps } from '@mui/x-charts/ChartDataProvider';
|
|
4
|
+
import { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
+
export type ChartDataProviderProProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartDataProviderProps<TSeries, TSignatures> & Omit<ChartProviderProps<TSeries, TSignatures>['pluginParams'], 'children'>;
|
|
6
|
+
/**
|
|
7
|
+
* Orchestrates the data providers for the chart components and hooks.
|
|
8
|
+
*
|
|
9
|
+
* Use this component if you have custom HTML components that need to access the chart data.
|
|
10
|
+
*
|
|
11
|
+
* Demos:
|
|
12
|
+
*
|
|
13
|
+
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
14
|
+
*
|
|
15
|
+
* API:
|
|
16
|
+
*
|
|
17
|
+
* - [ChartDataProviderPro API](https://mui.com/x/api/charts/chart-data-provider/)
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```jsx
|
|
21
|
+
* <ChartDataProviderPro
|
|
22
|
+
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
23
|
+
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
24
|
+
* >
|
|
25
|
+
* <ChartsSurface>
|
|
26
|
+
* <BarPlot />
|
|
27
|
+
* <ChartsXAxis position="bottom" axisId="x-axis" />
|
|
28
|
+
* </ChartsSurface>
|
|
29
|
+
* {'Custom Legend Component'}
|
|
30
|
+
* </ChartDataProviderPro>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
declare function ChartDataProviderPro<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartDataProviderProProps<TSeries, TSignatures>): React.JSX.Element;
|
|
34
|
+
declare namespace ChartDataProviderPro {
|
|
35
|
+
var propTypes: any;
|
|
36
|
+
}
|
|
37
|
+
export { ChartDataProviderPro };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ChartAnyPluginSignature, ChartSeriesType } from '@mui/x-charts/internals';
|
|
2
|
+
import type { ChartDataProviderProProps } from './ChartDataProviderPro';
|
|
3
|
+
import type { AllPluginSignatures } from '../internals/plugins/allPlugins';
|
|
4
|
+
export declare const useChartDataProviderProProps: <TSeries extends ChartSeriesType = keyof import("@mui/x-charts/internals").ChartsSeriesConfig, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartDataProviderProProps<TSeries, TSignatures>) => {
|
|
5
|
+
children: import("react").ReactNode;
|
|
6
|
+
animationProviderProps: Omit<import("@mui/x-charts/internals").AnimationProviderProps, "children">;
|
|
7
|
+
chartProviderProps: Omit<import("@mui/x-charts/internals").ChartProviderProps<TSeries, TSignatures>, "children">;
|
|
8
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { MakeOptional } from '@mui/x-internals/types';
|
|
3
|
+
import { ChartsAxisProps } from '@mui/x-charts/ChartsAxis';
|
|
4
|
+
import { ChartsTooltipProps } from '@mui/x-charts/ChartsTooltip';
|
|
5
|
+
import { ChartsAxisSlots, ChartsAxisSlotProps, ChartsXAxisProps, ChartsYAxisProps, AxisConfig } from '@mui/x-charts/internals';
|
|
6
|
+
import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from '@mui/x-charts/ChartsOverlay';
|
|
7
|
+
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
8
|
+
import { HeatmapSeriesType } from "../models/seriesType/heatmap.js";
|
|
9
|
+
import { HeatmapTooltipProps } from "./HeatmapTooltip.js";
|
|
10
|
+
import { HeatmapItemSlotProps, HeatmapItemSlots } from "./HeatmapItem.js";
|
|
11
|
+
export interface HeatmapSlots extends ChartsAxisSlots, ChartsOverlaySlots, HeatmapItemSlots {
|
|
12
|
+
/**
|
|
13
|
+
* Custom component for the tooltip popper.
|
|
14
|
+
* @default ChartsTooltipRoot
|
|
15
|
+
*/
|
|
16
|
+
tooltip?: React.ElementType<HeatmapTooltipProps>;
|
|
17
|
+
}
|
|
18
|
+
export interface HeatmapSlotProps extends ChartsAxisSlotProps, ChartsOverlaySlotProps, HeatmapItemSlotProps {
|
|
19
|
+
tooltip?: Partial<HeatmapTooltipProps>;
|
|
20
|
+
}
|
|
21
|
+
export interface HeatmapProps extends Omit<ChartContainerProProps, 'series' | 'plugins' | 'xAxis' | 'yAxis' | 'zoom' | 'onZoomChange' | 'skipAnimation'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
|
|
22
|
+
/**
|
|
23
|
+
* The configuration of the x-axes.
|
|
24
|
+
* If not provided, a default axis config is used.
|
|
25
|
+
* An array of [[AxisConfig]] objects.
|
|
26
|
+
*/
|
|
27
|
+
xAxis: MakeOptional<AxisConfig<'band', any, ChartsXAxisProps>, 'id' | 'scaleType'>[];
|
|
28
|
+
/**
|
|
29
|
+
* The configuration of the y-axes.
|
|
30
|
+
* If not provided, a default axis config is used.
|
|
31
|
+
* An array of [[AxisConfig]] objects.
|
|
32
|
+
*/
|
|
33
|
+
yAxis: MakeOptional<AxisConfig<'band', any, ChartsYAxisProps>, 'id' | 'scaleType'>[];
|
|
34
|
+
/**
|
|
35
|
+
* The series to display in the bar chart.
|
|
36
|
+
* An array of [[HeatmapSeriesType]] objects.
|
|
37
|
+
*/
|
|
38
|
+
series: MakeOptional<HeatmapSeriesType, 'type'>[];
|
|
39
|
+
/**
|
|
40
|
+
* The configuration of the tooltip.
|
|
41
|
+
* @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
|
|
42
|
+
*/
|
|
43
|
+
tooltip?: ChartsTooltipProps;
|
|
44
|
+
/**
|
|
45
|
+
* Overridable component slots.
|
|
46
|
+
* @default {}
|
|
47
|
+
*/
|
|
48
|
+
slots?: HeatmapSlots;
|
|
49
|
+
/**
|
|
50
|
+
* The props used for each component slot.
|
|
51
|
+
* @default {}
|
|
52
|
+
*/
|
|
53
|
+
slotProps?: HeatmapSlotProps;
|
|
54
|
+
}
|
|
55
|
+
declare const Heatmap: React.ForwardRefExoticComponent<HeatmapProps & React.RefAttributes<SVGSVGElement>>;
|
|
56
|
+
export { Heatmap };
|
|
@@ -11,14 +11,14 @@ import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
|
|
|
11
11
|
import { ChartsOverlay } from '@mui/x-charts/ChartsOverlay';
|
|
12
12
|
import { ChartContainerPro } from "../ChartContainerPro/index.js";
|
|
13
13
|
import { HeatmapPlot } from "./HeatmapPlot.js";
|
|
14
|
-
import {
|
|
14
|
+
import { seriesConfig as heatmapSeriesConfig } from "./seriesConfig/index.js";
|
|
15
15
|
import { HeatmapTooltip } from "./HeatmapTooltip.js";
|
|
16
16
|
import { HEATMAP_PLUGINS } from "./Heatmap.plugins.js";
|
|
17
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
18
|
// The GnBu: https://github.com/d3/d3-scale-chromatic/blob/main/src/sequential-multi/GnBu.js
|
|
19
19
|
const defaultColorMap = interpolateRgbBasis(['#f7fcf0', '#e0f3db', '#ccebc5', '#a8ddb5', '#7bccc4', '#4eb3d3', '#2b8cbe', '#0868ac', '#084081']);
|
|
20
20
|
const seriesConfig = {
|
|
21
|
-
heatmap:
|
|
21
|
+
heatmap: heatmapSeriesConfig
|
|
22
22
|
};
|
|
23
23
|
const Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap(inProps, ref) {
|
|
24
24
|
const props = useThemeProps({
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
2
|
+
export type HeatmapPluginsSignatures = [UseChartZAxisSignature, UseChartCartesianAxisSignature<'heatmap'>, UseChartInteractionSignature, UseChartHighlightSignature];
|
|
3
|
+
export declare const HEATMAP_PLUGINS: ConvertSignaturesIntoPlugins<HeatmapPluginsSignatures>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SeriesId } from '@mui/x-charts/internals';
|
|
3
|
+
import { HeatmapClasses } from "./heatmapClasses.js";
|
|
4
|
+
export interface HeatmapItemSlots {
|
|
5
|
+
/**
|
|
6
|
+
* The component that renders the heatmap cell.
|
|
7
|
+
* @default HeatmapCell
|
|
8
|
+
*/
|
|
9
|
+
cell?: React.ElementType;
|
|
10
|
+
}
|
|
11
|
+
export interface HeatmapItemSlotProps {
|
|
12
|
+
cell?: Partial<React.ComponentPropsWithRef<'rect'>>;
|
|
13
|
+
}
|
|
14
|
+
export interface HeatmapItemProps {
|
|
15
|
+
dataIndex: number;
|
|
16
|
+
seriesId: SeriesId;
|
|
17
|
+
value: number;
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
color: string;
|
|
23
|
+
/**
|
|
24
|
+
* The props used for each component slot.
|
|
25
|
+
* @default {}
|
|
26
|
+
*/
|
|
27
|
+
slotProps?: HeatmapItemSlotProps;
|
|
28
|
+
/**
|
|
29
|
+
* Overridable component slots.
|
|
30
|
+
* @default {}
|
|
31
|
+
*/
|
|
32
|
+
slots?: HeatmapItemSlots;
|
|
33
|
+
}
|
|
34
|
+
export interface HeatmapItemOwnerState {
|
|
35
|
+
seriesId: SeriesId;
|
|
36
|
+
dataIndex: number;
|
|
37
|
+
color: string;
|
|
38
|
+
isFaded: boolean;
|
|
39
|
+
isHighlighted: boolean;
|
|
40
|
+
classes?: Partial<HeatmapClasses>;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* @ignore - internal component.
|
|
44
|
+
*/
|
|
45
|
+
declare function HeatmapItem(props: HeatmapItemProps): React.JSX.Element;
|
|
46
|
+
declare namespace HeatmapItem {
|
|
47
|
+
var propTypes: any;
|
|
48
|
+
}
|
|
49
|
+
export { HeatmapItem };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { HeatmapItemProps } from "./HeatmapItem.js";
|
|
3
|
+
export interface HeatmapPlotProps extends Pick<HeatmapItemProps, 'slots' | 'slotProps'> {}
|
|
4
|
+
declare function HeatmapPlot(props: HeatmapPlotProps): React.JSX.Element | null;
|
|
5
|
+
declare namespace HeatmapPlot {
|
|
6
|
+
var propTypes: any;
|
|
7
|
+
}
|
|
8
|
+
export { HeatmapPlot };
|