@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
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { useXScale, useYScale, useZColorScale } from '@mui/x-charts/hooks';
|
|
6
|
-
import {
|
|
6
|
+
import { useHeatmapSeriesContext } from "../hooks/useHeatmapSeries.js";
|
|
7
7
|
import { HeatmapItem } from "./HeatmapItem.js";
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
function HeatmapPlot(props) {
|
|
10
10
|
const xScale = useXScale();
|
|
11
11
|
const yScale = useYScale();
|
|
12
12
|
const colorScale = useZColorScale();
|
|
13
|
-
const series =
|
|
13
|
+
const series = useHeatmapSeriesContext();
|
|
14
14
|
const xDomain = xScale.domain();
|
|
15
15
|
const yDomain = yScale.domain();
|
|
16
16
|
if (!series || series.seriesOrder.length === 0) {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ChartsTooltipContainerProps } from '@mui/x-charts/ChartsTooltip';
|
|
3
|
+
export interface HeatmapTooltipProps extends Omit<ChartsTooltipContainerProps, 'trigger' | 'children'> {}
|
|
4
|
+
declare function HeatmapTooltip(props: HeatmapTooltipProps): React.JSX.Element;
|
|
5
|
+
declare namespace HeatmapTooltip {
|
|
6
|
+
var propTypes: any;
|
|
7
|
+
}
|
|
8
|
+
export { HeatmapTooltip };
|
|
@@ -9,7 +9,7 @@ import composeClasses from '@mui/utils/composeClasses';
|
|
|
9
9
|
import { ChartsTooltipPaper, ChartsTooltipTable, ChartsTooltipRow, ChartsTooltipCell, useItemTooltip, getChartsTooltipUtilityClass, ChartsTooltipContainer } from '@mui/x-charts/ChartsTooltip';
|
|
10
10
|
import { useXAxis, useYAxis } from '@mui/x-charts/hooks';
|
|
11
11
|
import { getLabel, ChartsLabelMark } from '@mui/x-charts/internals';
|
|
12
|
-
import {
|
|
12
|
+
import { useHeatmapSeriesContext } from "../hooks/useHeatmapSeries.js";
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
const useUtilityClasses = ownerState => {
|
|
15
15
|
const {
|
|
@@ -34,7 +34,7 @@ function DefaultHeatmapTooltipContent(props) {
|
|
|
34
34
|
} = props;
|
|
35
35
|
const xAxis = useXAxis();
|
|
36
36
|
const yAxis = useYAxis();
|
|
37
|
-
const heatmapSeries =
|
|
37
|
+
const heatmapSeries = useHeatmapSeriesContext();
|
|
38
38
|
const tooltipData = useItemTooltip();
|
|
39
39
|
if (!tooltipData || !heatmapSeries || heatmapSeries.seriesOrder.length === 0) {
|
|
40
40
|
return null;
|
|
@@ -52,10 +52,12 @@ function DefaultHeatmapTooltipContent(props) {
|
|
|
52
52
|
} = tooltipData;
|
|
53
53
|
const [xIndex, yIndex] = value;
|
|
54
54
|
const formattedX = xAxis.valueFormatter?.(xAxis.data[xIndex], {
|
|
55
|
-
location: 'tooltip'
|
|
55
|
+
location: 'tooltip',
|
|
56
|
+
scale: xAxis.scale
|
|
56
57
|
}) ?? xAxis.data[xIndex].toLocaleString();
|
|
57
58
|
const formattedY = yAxis.valueFormatter?.(yAxis.data[yIndex], {
|
|
58
|
-
location: 'tooltip'
|
|
59
|
+
location: 'tooltip',
|
|
60
|
+
scale: yAxis.scale
|
|
59
61
|
}) ?? yAxis.data[yIndex].toLocaleString();
|
|
60
62
|
const formattedValue = series[seriesId].valueFormatter(value, {
|
|
61
63
|
dataIndex: identifier.dataIndex
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface HeatmapClasses {
|
|
2
|
+
/** Styles applied to the heatmap cells. */
|
|
3
|
+
cell: string;
|
|
4
|
+
/** Styles applied to the cell element if highlighted. */
|
|
5
|
+
highlighted: string;
|
|
6
|
+
/** Styles applied to the cell element if faded. */
|
|
7
|
+
faded: string;
|
|
8
|
+
}
|
|
9
|
+
export type HeatmapClassKey = keyof HeatmapClasses;
|
|
10
|
+
export declare function getHeatmapUtilityClass(slot: string): string;
|
|
11
|
+
export declare const heatmapClasses: HeatmapClasses;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getBaseExtremum } from "./extremums.js";
|
|
2
|
-
import
|
|
2
|
+
import seriesProcessor from "./seriesProcessor.js";
|
|
3
3
|
import getColor from "./getColor.js";
|
|
4
4
|
import tooltipGetter from "./tooltip.js";
|
|
5
|
-
export const
|
|
6
|
-
seriesProcessor
|
|
5
|
+
export const seriesConfig = {
|
|
6
|
+
seriesProcessor,
|
|
7
7
|
colorProcessor: getColor,
|
|
8
8
|
legendGetter: () => [],
|
|
9
9
|
tooltipGetter,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
const
|
|
2
|
+
const seriesProcessor = params => {
|
|
3
3
|
const {
|
|
4
4
|
series,
|
|
5
5
|
seriesOrder
|
|
@@ -18,4 +18,4 @@ const formatter = params => {
|
|
|
18
18
|
seriesOrder
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
-
export default
|
|
21
|
+
export default seriesProcessor;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { LineChartProps } from '@mui/x-charts/LineChart';
|
|
3
|
+
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
4
|
+
export interface LineChartProProps extends Omit<LineChartProps, 'apiRef'>, Omit<ChartContainerProProps<'line'>, 'series' | 'plugins' | 'seriesConfig'> {}
|
|
5
|
+
/**
|
|
6
|
+
* Demos:
|
|
7
|
+
*
|
|
8
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
9
|
+
* - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
|
|
10
|
+
*
|
|
11
|
+
* API:
|
|
12
|
+
*
|
|
13
|
+
* - [LineChart API](https://mui.com/x/api/charts/line-chart/)
|
|
14
|
+
*/
|
|
15
|
+
declare const LineChartPro: React.ForwardRefExoticComponent<LineChartProProps & React.RefAttributes<SVGSVGElement>>;
|
|
16
|
+
export { LineChartPro };
|
|
@@ -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 LineChartProPluginsSignatures = [UseChartZAxisSignature, UseChartCartesianAxisSignature<'line'>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature];
|
|
4
|
+
export declare const LINE_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<LineChartProPluginsSignatures>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./LineChartPro.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ScatterChartProps } from '@mui/x-charts/ScatterChart';
|
|
3
|
+
import { ChartContainerProProps } from "../ChartContainerPro/ChartContainerPro.js";
|
|
4
|
+
import { ScatterChartProPluginsSignatures } from "./ScatterChartPro.plugins.js";
|
|
5
|
+
export interface ScatterChartProProps extends Omit<ScatterChartProps, 'apiRef'>, Omit<ChartContainerProProps<'scatter', ScatterChartProPluginsSignatures>, 'series' | 'plugins' | 'seriesConfig' | 'onItemClick'> {}
|
|
6
|
+
/**
|
|
7
|
+
* Demos:
|
|
8
|
+
*
|
|
9
|
+
* - [Scatter](https://mui.com/x/react-charts/scatter/)
|
|
10
|
+
* - [Scatter demonstration](https://mui.com/x/react-charts/scatter-demo/)
|
|
11
|
+
*
|
|
12
|
+
* API:
|
|
13
|
+
*
|
|
14
|
+
* - [ScatterChart API](https://mui.com/x/api/charts/scatter-chart/)
|
|
15
|
+
*/
|
|
16
|
+
declare const ScatterChartPro: React.ForwardRefExoticComponent<ScatterChartProProps & React.RefAttributes<SVGSVGElement>>;
|
|
17
|
+
export { ScatterChartPro };
|
|
@@ -8,7 +8,6 @@ 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';
|
|
@@ -44,7 +43,6 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
|
|
|
44
43
|
const {
|
|
45
44
|
chartsWrapperProps,
|
|
46
45
|
chartContainerProps,
|
|
47
|
-
voronoiHandlerProps,
|
|
48
46
|
chartsAxisProps,
|
|
49
47
|
gridProps,
|
|
50
48
|
scatterPlotProps,
|
|
@@ -66,7 +64,7 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
|
|
|
66
64
|
return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
|
|
67
65
|
children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
|
|
68
66
|
children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
69
|
-
children: [
|
|
67
|
+
children: [/*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsx("g", {
|
|
70
68
|
"data-drawing-container": true,
|
|
71
69
|
children: /*#__PURE__*/_jsx(ScatterPlot, _extends({}, scatterPlotProps))
|
|
72
70
|
}), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props?.slotProps?.tooltip, {
|
|
@@ -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>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight } from '@mui/x-charts/internals';
|
|
1
|
+
import { useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartVoronoi } from '@mui/x-charts/internals';
|
|
2
2
|
import { useChartProZoom } from "../internals/plugins/useChartProZoom/index.js";
|
|
3
|
-
export const SCATTER_CHART_PRO_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartProZoom];
|
|
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 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,32 @@
|
|
|
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/ChartsSurface';
|
|
24
|
+
export * from '@mui/x-charts/ChartDataProvider';
|
|
25
|
+
export * from '@mui/x-charts/ChartsLabel';
|
|
26
|
+
export * from "./hooks/index.js";
|
|
27
|
+
export * from "./Heatmap/index.js";
|
|
28
|
+
export * from "./ChartContainerPro/index.js";
|
|
29
|
+
export * from "./ChartDataProviderPro/index.js";
|
|
30
|
+
export * from "./ScatterChartPro/index.js";
|
|
31
|
+
export * from "./BarChartPro/index.js";
|
|
32
|
+
export * from "./LineChartPro/index.js";
|
package/modern/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-charts-pro v8.0.0-alpha.
|
|
2
|
+
* @mui/x-charts-pro v8.0.0-alpha.12
|
|
3
3
|
*
|
|
4
4
|
* @license MUI X Commercial
|
|
5
5
|
* This source code is licensed under the commercial license found in the
|
|
@@ -23,7 +23,6 @@ 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
26
|
export * from '@mui/x-charts/BarChart';
|
|
28
27
|
export * from '@mui/x-charts/LineChart';
|
|
29
28
|
export * from '@mui/x-charts/PieChart';
|
|
@@ -35,6 +34,7 @@ export * from '@mui/x-charts/ChartDataProvider';
|
|
|
35
34
|
export * from '@mui/x-charts/ChartsLabel';
|
|
36
35
|
|
|
37
36
|
// Pro components
|
|
37
|
+
export * from "./hooks/index.js";
|
|
38
38
|
export * from "./Heatmap/index.js";
|
|
39
39
|
export * from "./ChartContainerPro/index.js";
|
|
40
40
|
export * from "./ChartDataProviderPro/index.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ChartSeriesType, ConvertSignaturesIntoPlugins, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartZAxisSignature, UseChartHighlightSignature } from '@mui/x-charts/internals';
|
|
2
|
+
import { UseChartProZoomSignature } from "./useChartProZoom/index.js";
|
|
3
|
+
export type AllPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<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>>)[];
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { useSelector, getSVGPoint, selectorChartDrawingArea } from '@mui/x-charts/internals';
|
|
6
|
-
import { creatZoomLookup } from "./creatZoomLookup.js";
|
|
5
|
+
import { useSelector, getSVGPoint, selectorChartDrawingArea, createZoomLookup, selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
|
|
7
6
|
import { getDiff, getHorizontalCenterRatio, getPinchScaleRatio, getVerticalCenterRatio, getWheelScaleRatio, isSpanValid, preventDefault, zoomAtPoint } from "./useChartProZoom.utils.js";
|
|
8
|
-
import { selectorChartZoomOptionsLookup } from "./useChartProZoom.selectors.js";
|
|
9
7
|
|
|
10
8
|
// It is helpful to avoid the need to provide the possibly auto-generated id for each axis.
|
|
11
9
|
function initializeZoomData(options) {
|
|
@@ -288,15 +286,13 @@ useChartProZoom.params = {
|
|
|
288
286
|
useChartProZoom.getDefaultizedParams = ({
|
|
289
287
|
params
|
|
290
288
|
}) => {
|
|
291
|
-
|
|
292
|
-
return _extends({}, params, {
|
|
293
|
-
optionsLookup
|
|
294
|
-
});
|
|
289
|
+
return _extends({}, params);
|
|
295
290
|
};
|
|
296
291
|
useChartProZoom.getInitialState = params => {
|
|
292
|
+
const optionsLookup = _extends({}, createZoomLookup('x')(params.defaultizedXAxis), createZoomLookup('y')(params.defaultizedYAxis));
|
|
297
293
|
return {
|
|
298
294
|
zoom: {
|
|
299
|
-
zoomData: params.initialZoom === undefined ? initializeZoomData(
|
|
295
|
+
zoomData: params.initialZoom === undefined ? initializeZoomData(optionsLookup) : params.initialZoom,
|
|
300
296
|
isInteracting: false
|
|
301
297
|
}
|
|
302
298
|
};
|