@mui/x-charts 8.0.0-alpha.1 → 8.0.0-alpha.3
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/BarChart/BarChart.js +0 -4
- package/BarChart/BarLabel/BarLabel.d.ts +298 -298
- package/CHANGELOG.md +330 -7
- package/ChartContainer/ChartContainer.d.ts +24 -0
- package/ChartContainer/ChartContainer.js +26 -10
- package/ChartContainer/useChartContainerProps.d.ts +0 -1
- package/ChartContainer/useChartContainerProps.js +3 -4
- package/ChartsAxis/axisClasses.js +2 -1
- package/ChartsAxisHighlight/ChartsXAxisHighlight.js +3 -3
- package/ChartsAxisHighlight/ChartsYAxisHighlight.js +3 -3
- package/ChartsLegend/chartsLegendClasses.js +2 -1
- package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
- package/ChartsSurface/ChartsSurface.d.ts +14 -0
- package/ChartsSurface/ChartsSurface.js +38 -6
- package/ChartsTooltip/ChartsTooltip.js +2 -20
- package/ChartsTooltip/ChartsTooltipContainer.js +5 -23
- package/ChartsTooltip/ChartsTooltipTable.js +2 -2
- package/ChartsTooltip/useAxisTooltip.js +3 -3
- package/ChartsTooltip/useItemTooltip.d.ts +2 -3
- package/ChartsTooltip/useItemTooltip.js +3 -3
- package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +3 -3
- package/ChartsXAxis/ChartsXAxis.js +3 -17
- package/ChartsYAxis/ChartsYAxis.js +2 -17
- package/Gauge/Gauge.d.ts +1 -1
- package/Gauge/GaugeContainer.d.ts +2 -2
- package/Gauge/GaugeContainer.js +14 -47
- package/LineChart/CircleMarkElement.js +3 -3
- package/LineChart/LineChart.js +0 -4
- package/LineChart/LineHighlightPlot.js +3 -3
- package/LineChart/MarkElement.js +3 -3
- package/PieChart/PieArc.js +11 -5
- package/PieChart/PieArcPlot.js +9 -13
- package/PieChart/PieChart.js +0 -4
- package/ScatterChart/Scatter.js +3 -3
- package/ScatterChart/ScatterChart.js +0 -4
- package/SparkLineChart/SparkLineChart.js +0 -4
- package/context/CartesianProvider/defaultizeAxis.d.ts +9 -11
- package/context/ChartDataProvider/ChartDataProvider.d.ts +27 -0
- package/context/ChartDataProvider/ChartDataProvider.js +38 -18
- package/context/ChartDataProvider/useChartDataProviderProps.d.ts +18 -22
- package/context/ChartDataProvider/useDefaultizeAxis.d.ts +9 -11
- package/context/ChartProvider/ChartContext.d.ts +6 -0
- package/context/ChartProvider/ChartContext.js +8 -0
- package/context/ChartProvider/ChartProvider.d.ts +4 -0
- package/context/ChartProvider/ChartProvider.js +19 -0
- package/context/ChartProvider/ChartProvider.types.d.ts +24 -0
- package/context/ChartProvider/index.d.ts +3 -0
- package/context/ChartProvider/index.js +3 -0
- package/context/ChartProvider/useChartContext.d.ts +3 -0
- package/context/ChartProvider/useChartContext.js +11 -0
- package/context/DrawingAreaProvider/DrawingAreaContext.d.ts +1 -6
- package/context/DrawingAreaProvider/DrawingAreaContext.js +0 -1
- package/context/InteractionSelectors.d.ts +72 -49
- package/context/SizeProvider/Size.types.d.ts +2 -2
- package/context/SizeProvider/SizeContext.js +3 -1
- package/context/SizeProvider/useChartContainerDimensions.d.ts +1 -1
- package/context/SizeProvider/useChartContainerDimensions.js +5 -1
- package/hooks/useAxisEvents.js +1 -1
- package/hooks/useChartId.js +5 -6
- package/hooks/useInteractionItemProps.js +4 -2
- package/hooks/useSvgRef.d.ts +1 -1
- package/hooks/useSvgRef.js +4 -8
- package/index.js +1 -1
- package/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +2 -5
- package/internals/defaultizeColor.d.ts +1 -1
- package/internals/index.d.ts +1 -3
- package/internals/index.js +1 -3
- package/internals/plugins/allPlugins.d.ts +1 -0
- package/internals/plugins/allPlugins.js +3 -0
- package/internals/plugins/corePlugins/corePlugins.d.ts +10 -0
- package/internals/plugins/corePlugins/corePlugins.js +7 -0
- package/internals/plugins/corePlugins/index.d.ts +2 -0
- package/internals/plugins/corePlugins/index.js +1 -0
- package/internals/plugins/corePlugins/useChartId/index.d.ts +2 -0
- package/internals/plugins/corePlugins/useChartId/index.js +1 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.d.ts +3 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.js +32 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +36 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.selectors.js +9 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.types.d.ts +20 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.utils.d.ts +1 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.utils.js +5 -0
- package/internals/plugins/featurePlugins/useChartInteraction/index.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartInteraction/index.js +2 -0
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +73 -0
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +376 -0
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +10 -0
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.d.ts +57 -0
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.js +1 -0
- package/internals/plugins/models/chart.d.ts +14 -0
- package/internals/plugins/models/chart.js +1 -0
- package/internals/plugins/models/helpers.d.ts +7 -0
- package/internals/plugins/models/helpers.js +1 -0
- package/internals/plugins/models/index.d.ts +3 -35
- package/internals/plugins/models/index.js +3 -1
- package/internals/plugins/models/plugin.d.ts +75 -0
- package/internals/plugins/models/plugin.js +1 -0
- package/internals/plugins/utils/ChartStore.d.ts +9 -8
- package/internals/plugins/utils/ChartStore.js +0 -2
- package/internals/plugins/utils/selectors.d.ts +2 -2
- package/internals/store/useCharts.d.ts +14 -0
- package/internals/store/useCharts.js +72 -0
- package/internals/store/useCharts.types.d.ts +5 -0
- package/internals/store/useCharts.types.js +1 -0
- package/internals/store/useSelector.d.ts +4 -0
- package/internals/store/useStore.d.ts +3 -0
- package/{modern/internals → internals/store}/useStore.js +6 -6
- package/models/axis.d.ts +1 -13
- package/modern/BarChart/BarChart.js +0 -4
- package/modern/ChartContainer/ChartContainer.js +26 -10
- package/modern/ChartContainer/useChartContainerProps.js +3 -4
- package/modern/ChartsAxis/axisClasses.js +2 -1
- package/modern/ChartsAxisHighlight/ChartsXAxisHighlight.js +3 -3
- package/modern/ChartsAxisHighlight/ChartsYAxisHighlight.js +3 -3
- package/modern/ChartsLegend/chartsLegendClasses.js +2 -1
- package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
- package/modern/ChartsSurface/ChartsSurface.js +38 -6
- package/modern/ChartsTooltip/ChartsTooltip.js +2 -20
- package/modern/ChartsTooltip/ChartsTooltipContainer.js +5 -23
- package/modern/ChartsTooltip/ChartsTooltipTable.js +2 -2
- package/modern/ChartsTooltip/useAxisTooltip.js +3 -3
- package/modern/ChartsTooltip/useItemTooltip.js +3 -3
- package/modern/ChartsVoronoiHandler/ChartsVoronoiHandler.js +3 -3
- package/modern/ChartsXAxis/ChartsXAxis.js +3 -17
- package/modern/ChartsYAxis/ChartsYAxis.js +2 -17
- package/modern/Gauge/GaugeContainer.js +14 -47
- package/modern/LineChart/CircleMarkElement.js +3 -3
- package/modern/LineChart/LineChart.js +0 -4
- package/modern/LineChart/LineHighlightPlot.js +3 -3
- package/modern/LineChart/MarkElement.js +3 -3
- package/modern/PieChart/PieArc.js +11 -5
- package/modern/PieChart/PieArcPlot.js +9 -13
- package/modern/PieChart/PieChart.js +0 -4
- package/modern/ScatterChart/Scatter.js +3 -3
- package/modern/ScatterChart/ScatterChart.js +0 -4
- package/modern/SparkLineChart/SparkLineChart.js +0 -4
- package/modern/context/ChartDataProvider/ChartDataProvider.js +38 -18
- package/modern/context/ChartProvider/ChartContext.js +8 -0
- package/modern/context/ChartProvider/ChartProvider.js +19 -0
- package/modern/context/ChartProvider/ChartProvider.types.js +1 -0
- package/modern/context/ChartProvider/index.js +3 -0
- package/modern/context/ChartProvider/useChartContext.js +11 -0
- package/modern/context/DrawingAreaProvider/DrawingAreaContext.js +0 -1
- package/modern/context/SizeProvider/SizeContext.js +3 -1
- package/modern/context/SizeProvider/useChartContainerDimensions.js +5 -1
- package/modern/hooks/useAxisEvents.js +1 -1
- package/modern/hooks/useChartId.js +5 -6
- package/modern/hooks/useInteractionItemProps.js +4 -2
- package/modern/hooks/useSvgRef.js +4 -8
- package/modern/index.js +1 -1
- package/modern/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +2 -5
- package/modern/internals/index.js +1 -3
- package/modern/internals/plugins/allPlugins.js +3 -0
- package/modern/internals/plugins/corePlugins/corePlugins.js +7 -0
- package/modern/internals/plugins/corePlugins/index.js +1 -0
- package/modern/internals/plugins/corePlugins/useChartId/index.js +1 -0
- package/modern/internals/plugins/corePlugins/useChartId/useChartId.js +32 -0
- package/modern/internals/plugins/corePlugins/useChartId/useChartId.selectors.js +9 -0
- package/modern/internals/plugins/corePlugins/useChartId/useChartId.types.js +1 -0
- package/modern/internals/plugins/corePlugins/useChartId/useChartId.utils.js +5 -0
- package/modern/internals/plugins/featurePlugins/useChartInteraction/index.js +2 -0
- package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +73 -0
- package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +10 -0
- package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.js +1 -0
- package/modern/internals/plugins/models/chart.js +1 -0
- package/modern/internals/plugins/models/helpers.js +1 -0
- package/modern/internals/plugins/models/index.js +3 -1
- package/modern/internals/plugins/models/plugin.js +1 -0
- package/modern/internals/plugins/utils/ChartStore.js +0 -2
- package/modern/internals/store/useCharts.js +72 -0
- package/modern/internals/store/useCharts.types.js +1 -0
- package/{internals → modern/internals/store}/useStore.js +6 -6
- package/node/BarChart/BarChart.js +0 -4
- package/node/ChartContainer/ChartContainer.js +26 -10
- package/node/ChartContainer/useChartContainerProps.js +3 -4
- package/node/ChartsAxis/axisClasses.js +5 -3
- package/node/ChartsAxisHighlight/ChartsXAxisHighlight.js +4 -4
- package/node/ChartsAxisHighlight/ChartsYAxisHighlight.js +4 -4
- package/node/ChartsLegend/chartsLegendClasses.js +5 -3
- package/node/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
- package/node/ChartsSurface/ChartsSurface.js +37 -5
- package/node/ChartsTooltip/ChartsTooltip.js +2 -20
- package/node/ChartsTooltip/ChartsTooltipContainer.js +6 -24
- package/node/ChartsTooltip/ChartsTooltipTable.js +3 -3
- package/node/ChartsTooltip/useAxisTooltip.js +4 -4
- package/node/ChartsTooltip/useItemTooltip.js +4 -4
- package/node/ChartsVoronoiHandler/ChartsVoronoiHandler.js +3 -3
- package/node/ChartsXAxis/ChartsXAxis.js +3 -17
- package/node/ChartsYAxis/ChartsYAxis.js +2 -17
- package/node/Gauge/GaugeContainer.js +13 -46
- package/node/LineChart/CircleMarkElement.js +4 -4
- package/node/LineChart/LineChart.js +0 -4
- package/node/LineChart/LineHighlightPlot.js +4 -4
- package/node/LineChart/MarkElement.js +4 -4
- package/node/PieChart/PieArc.js +11 -5
- package/node/PieChart/PieArcPlot.js +9 -13
- package/node/PieChart/PieChart.js +0 -4
- package/node/ScatterChart/Scatter.js +4 -4
- package/node/ScatterChart/ScatterChart.js +0 -4
- package/node/SparkLineChart/SparkLineChart.js +0 -4
- package/node/context/ChartDataProvider/ChartDataProvider.js +38 -18
- package/node/context/ChartProvider/ChartContext.js +15 -0
- package/node/context/ChartProvider/ChartProvider.js +24 -0
- package/node/context/ChartProvider/index.js +38 -0
- package/node/context/ChartProvider/useChartContext.js +18 -0
- package/node/context/DrawingAreaProvider/DrawingAreaContext.js +0 -1
- package/node/context/SizeProvider/SizeContext.js +3 -1
- package/node/context/SizeProvider/useChartContainerDimensions.js +5 -1
- package/node/hooks/useAxisEvents.js +1 -1
- package/node/hooks/useChartId.js +5 -7
- package/node/hooks/useInteractionItemProps.js +4 -2
- package/node/hooks/useSvgRef.js +4 -9
- package/node/index.js +1 -1
- package/node/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +1 -4
- package/node/internals/index.js +4 -28
- package/node/internals/plugins/allPlugins.js +10 -0
- package/node/internals/plugins/corePlugins/corePlugins.js +12 -0
- package/node/internals/plugins/corePlugins/index.js +12 -0
- package/node/internals/plugins/corePlugins/useChartId/index.js +12 -0
- package/node/internals/plugins/corePlugins/useChartId/useChartId.js +41 -0
- package/node/internals/plugins/corePlugins/useChartId/useChartId.selectors.js +15 -0
- package/node/internals/plugins/corePlugins/useChartId/useChartId.types.js +5 -0
- package/node/internals/plugins/corePlugins/useChartId/useChartId.utils.js +12 -0
- package/node/internals/plugins/featurePlugins/useChartInteraction/index.js +27 -0
- package/node/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +81 -0
- package/node/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +16 -0
- package/node/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.js +5 -0
- package/node/internals/plugins/models/chart.js +5 -0
- package/node/internals/plugins/models/helpers.js +5 -0
- package/node/internals/plugins/models/index.js +33 -0
- package/node/internals/plugins/models/plugin.js +5 -0
- package/node/internals/plugins/utils/ChartStore.js +0 -2
- package/node/internals/store/useCharts.js +80 -0
- package/node/internals/store/useCharts.types.js +5 -0
- package/node/internals/{useStore.js → store/useStore.js} +6 -7
- package/package.json +4 -4
- package/ChartContainer/ResizableContainer.d.ts +0 -22
- package/ChartContainer/ResizableContainer.js +0 -60
- package/context/InteractionProvider.d.ts +0 -7
- package/context/InteractionProvider.js +0 -22
- package/context/SvgRefProvider/SvgRef.types.d.ts +0 -8
- package/context/SvgRefProvider/SvgRefContext.d.ts +0 -4
- package/context/SvgRefProvider/SvgRefContext.js +0 -17
- package/context/SvgRefProvider/SvgRefProvider.d.ts +0 -3
- package/context/SvgRefProvider/SvgRefProvider.js +0 -24
- package/context/SvgRefProvider/index.d.ts +0 -4
- package/context/SvgRefProvider/index.js +0 -4
- package/context/SvgRefProvider/useSurfaceRef.d.ts +0 -2
- package/context/SvgRefProvider/useSurfaceRef.js +0 -14
- package/internals/plugins/utils/ChartsStore.d.ts +0 -12
- package/internals/plugins/utils/ChartsStore.js +0 -26
- package/internals/useCharts.d.ts +0 -6
- package/internals/useCharts.js +0 -29
- package/internals/useSelector.d.ts +0 -4
- package/internals/useStore.d.ts +0 -2
- package/modern/ChartContainer/ResizableContainer.js +0 -60
- package/modern/context/InteractionProvider.js +0 -22
- package/modern/context/SvgRefProvider/SvgRefContext.js +0 -17
- package/modern/context/SvgRefProvider/SvgRefProvider.js +0 -24
- package/modern/context/SvgRefProvider/index.js +0 -4
- package/modern/context/SvgRefProvider/useSurfaceRef.js +0 -14
- package/modern/internals/plugins/utils/ChartsStore.js +0 -26
- package/modern/internals/useCharts.js +0 -29
- package/node/ChartContainer/ResizableContainer.js +0 -68
- package/node/context/InteractionProvider.js +0 -28
- package/node/context/SvgRefProvider/SvgRefContext.js +0 -23
- package/node/context/SvgRefProvider/SvgRefProvider.js +0 -31
- package/node/context/SvgRefProvider/index.js +0 -49
- package/node/context/SvgRefProvider/useSurfaceRef.js +0 -20
- package/node/internals/plugins/utils/ChartsStore.js +0 -33
- package/node/internals/useCharts.js +0 -36
- /package/context/{SvgRefProvider/SvgRef.types.js → ChartProvider/ChartProvider.types.js} +0 -0
- /package/{modern/context/SvgRefProvider/SvgRef.types.js → internals/plugins/corePlugins/useChartId/useChartId.types.js} +0 -0
- /package/internals/{useSelector.js → store/useSelector.js} +0 -0
- /package/modern/internals/{useSelector.js → store/useSelector.js} +0 -0
- /package/node/context/{SvgRefProvider/SvgRef.types.js → ChartProvider/ChartProvider.types.js} +0 -0
- /package/node/internals/{useSelector.js → store/useSelector.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { styled } from '@mui/material/styles';
|
|
2
|
-
import { shouldForwardProp } from '@mui/system';
|
|
2
|
+
import { shouldForwardProp } from '@mui/system/createStyled';
|
|
3
3
|
import { chartsTooltipClasses } from "./chartsTooltipClasses.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -96,7 +96,7 @@ export const ChartsTooltipMark = styled('div', {
|
|
|
96
96
|
height: theme.spacing(1),
|
|
97
97
|
borderRadius: '50%',
|
|
98
98
|
boxShadow: theme.shadows[1],
|
|
99
|
-
|
|
99
|
+
background: color,
|
|
100
100
|
borderColor: (theme.vars || theme).palette.background.paper,
|
|
101
101
|
border: `solid ${(theme.vars || theme).palette.background.paper} ${theme.spacing(0.25)}`,
|
|
102
102
|
boxSizing: 'content-box'
|
|
@@ -5,13 +5,13 @@ import { useSeries } from "../hooks/useSeries.js";
|
|
|
5
5
|
import { useCartesianContext } from "../context/CartesianProvider/index.js";
|
|
6
6
|
import { ZAxisContext } from "../context/ZAxisContextProvider.js";
|
|
7
7
|
import { useColorProcessor } from "../context/PluginProvider/useColorProcessor.js";
|
|
8
|
-
import { useStore } from "../internals/useStore.js";
|
|
9
|
-
import { useSelector } from "../internals/useSelector.js";
|
|
8
|
+
import { useStore } from "../internals/store/useStore.js";
|
|
9
|
+
import { useSelector } from "../internals/store/useSelector.js";
|
|
10
10
|
import { getLabel } from "../internals/getLabel.js";
|
|
11
11
|
import { isCartesianSeriesType } from "../internals/isCartesian.js";
|
|
12
12
|
import { utcFormatter } from "./utils.js";
|
|
13
13
|
import { useXAxis, useYAxis } from "../hooks/useAxis.js";
|
|
14
|
-
import { selectorChartsInteractionXAxis, selectorChartsInteractionYAxis } from "../
|
|
14
|
+
import { selectorChartsInteractionXAxis, selectorChartsInteractionYAxis } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
|
|
15
15
|
export function useAxisTooltip() {
|
|
16
16
|
const defaultXAxis = useXAxis();
|
|
17
17
|
const defaultYAxis = useYAxis();
|
|
@@ -7,9 +7,9 @@ import { useCartesianContext } from "../context/CartesianProvider/index.js";
|
|
|
7
7
|
import { ZAxisContext } from "../context/ZAxisContextProvider.js";
|
|
8
8
|
import { useColorProcessor } from "../context/PluginProvider/useColorProcessor.js";
|
|
9
9
|
import { getLabel } from "../internals/getLabel.js";
|
|
10
|
-
import { selectorChartsInteractionItem } from "../
|
|
11
|
-
import { useSelector } from "../internals/useSelector.js";
|
|
12
|
-
import { useStore } from "../internals/useStore.js";
|
|
10
|
+
import { selectorChartsInteractionItem } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
|
|
11
|
+
import { useSelector } from "../internals/store/useSelector.js";
|
|
12
|
+
import { useStore } from "../internals/store/useStore.js";
|
|
13
13
|
export function useItemTooltip() {
|
|
14
14
|
const store = useStore();
|
|
15
15
|
const item = useSelector(store, selectorChartsInteractionItem);
|
|
@@ -7,7 +7,7 @@ import { Delaunay } from '@mui/x-charts-vendor/d3-delaunay';
|
|
|
7
7
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
8
8
|
import { useCartesianContext } from "../context/CartesianProvider/index.js";
|
|
9
9
|
import { getValueToPositionMapper } from "../hooks/useScale.js";
|
|
10
|
-
import { useStore } from "../internals/useStore.js";
|
|
10
|
+
import { useStore } from "../internals/store/useStore.js";
|
|
11
11
|
import { getSVGPoint } from "../internals/getSVGPoint.js";
|
|
12
12
|
import { useDrawingArea, useSvgRef } from "../hooks/index.js";
|
|
13
13
|
import { useHighlighted } from "../context/index.js";
|
|
@@ -101,10 +101,10 @@ function ChartsVoronoiHandler(props) {
|
|
|
101
101
|
lastFind.current = undefined;
|
|
102
102
|
}, [defaultXAxisId, defaultYAxisId, series, seriesOrder, xAxis, yAxis, drawingArea]);
|
|
103
103
|
React.useEffect(() => {
|
|
104
|
-
|
|
105
|
-
if (element === null) {
|
|
104
|
+
if (svgRef.current === null) {
|
|
106
105
|
return undefined;
|
|
107
106
|
}
|
|
107
|
+
const element = svgRef.current;
|
|
108
108
|
function getClosestPoint(event) {
|
|
109
109
|
// Get mouse coordinate in global SVG space
|
|
110
110
|
const svgPoint = getSVGPoint(element, event);
|
|
@@ -137,8 +137,6 @@ function ChartsXAxis(inProps) {
|
|
|
137
137
|
tickLabelStyle,
|
|
138
138
|
label,
|
|
139
139
|
labelStyle,
|
|
140
|
-
tickFontSize,
|
|
141
|
-
labelFontSize,
|
|
142
140
|
tickSize: tickSizeProp,
|
|
143
141
|
valueFormatter,
|
|
144
142
|
slots,
|
|
@@ -171,9 +169,9 @@ function ChartsXAxis(inProps) {
|
|
|
171
169
|
externalSlotProps: slotProps?.axisTickLabel,
|
|
172
170
|
additionalProps: {
|
|
173
171
|
style: _extends({
|
|
172
|
+
fontSize: 12,
|
|
174
173
|
textAnchor: 'middle',
|
|
175
|
-
dominantBaseline: position === 'bottom' ? 'hanging' : 'auto'
|
|
176
|
-
fontSize: tickFontSize ?? 12
|
|
174
|
+
dominantBaseline: position === 'bottom' ? 'hanging' : 'auto'
|
|
177
175
|
}, tickLabelStyle)
|
|
178
176
|
},
|
|
179
177
|
className: classes.tickLabel,
|
|
@@ -202,7 +200,7 @@ function ChartsXAxis(inProps) {
|
|
|
202
200
|
externalSlotProps: slotProps?.axisLabel,
|
|
203
201
|
additionalProps: {
|
|
204
202
|
style: _extends({
|
|
205
|
-
fontSize:
|
|
203
|
+
fontSize: 14,
|
|
206
204
|
textAnchor: 'middle',
|
|
207
205
|
dominantBaseline: position === 'bottom' ? 'hanging' : 'auto'
|
|
208
206
|
}, labelStyle)
|
|
@@ -299,12 +297,6 @@ process.env.NODE_ENV !== "production" ? ChartsXAxis.propTypes = {
|
|
|
299
297
|
* The label of the axis.
|
|
300
298
|
*/
|
|
301
299
|
label: PropTypes.string,
|
|
302
|
-
/**
|
|
303
|
-
* The font size of the axis label.
|
|
304
|
-
* @default 14
|
|
305
|
-
* @deprecated Consider using `labelStyle.fontSize` instead.
|
|
306
|
-
*/
|
|
307
|
-
labelFontSize: PropTypes.number,
|
|
308
300
|
/**
|
|
309
301
|
* The style applied to the axis label.
|
|
310
302
|
*/
|
|
@@ -329,12 +321,6 @@ process.env.NODE_ENV !== "production" ? ChartsXAxis.propTypes = {
|
|
|
329
321
|
*/
|
|
330
322
|
stroke: PropTypes.string,
|
|
331
323
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
332
|
-
/**
|
|
333
|
-
* The font size of the axis ticks text.
|
|
334
|
-
* @default 12
|
|
335
|
-
* @deprecated Consider using `tickLabelStyle.fontSize` instead.
|
|
336
|
-
*/
|
|
337
|
-
tickFontSize: PropTypes.number,
|
|
338
324
|
/**
|
|
339
325
|
* Defines which ticks are displayed.
|
|
340
326
|
* Its value can be:
|
|
@@ -42,8 +42,6 @@ const defaultProps = {
|
|
|
42
42
|
position: 'left',
|
|
43
43
|
disableLine: false,
|
|
44
44
|
disableTicks: false,
|
|
45
|
-
tickFontSize: 12,
|
|
46
|
-
labelFontSize: 14,
|
|
47
45
|
tickSize: 6
|
|
48
46
|
};
|
|
49
47
|
|
|
@@ -76,9 +74,7 @@ function ChartsYAxis(inProps) {
|
|
|
76
74
|
position,
|
|
77
75
|
disableLine,
|
|
78
76
|
disableTicks,
|
|
79
|
-
tickFontSize,
|
|
80
77
|
label,
|
|
81
|
-
labelFontSize,
|
|
82
78
|
labelStyle,
|
|
83
79
|
tickLabelStyle,
|
|
84
80
|
tickSize: tickSizeProp,
|
|
@@ -113,6 +109,7 @@ function ChartsYAxis(inProps) {
|
|
|
113
109
|
tickInterval
|
|
114
110
|
});
|
|
115
111
|
const positionSign = position === 'right' ? 1 : -1;
|
|
112
|
+
const tickFontSize = typeof tickLabelStyle?.fontSize === 'number' ? tickLabelStyle.fontSize : 12;
|
|
116
113
|
const labelRefPoint = {
|
|
117
114
|
x: positionSign * (tickFontSize + tickSize + 10),
|
|
118
115
|
y: top + height / 2
|
|
@@ -140,7 +137,7 @@ function ChartsYAxis(inProps) {
|
|
|
140
137
|
externalSlotProps: slotProps?.axisLabel,
|
|
141
138
|
additionalProps: {
|
|
142
139
|
style: _extends({
|
|
143
|
-
fontSize:
|
|
140
|
+
fontSize: 14,
|
|
144
141
|
angle: positionSign * 90,
|
|
145
142
|
textAnchor: 'middle',
|
|
146
143
|
dominantBaseline: 'auto'
|
|
@@ -243,12 +240,6 @@ process.env.NODE_ENV !== "production" ? ChartsYAxis.propTypes = {
|
|
|
243
240
|
* The label of the axis.
|
|
244
241
|
*/
|
|
245
242
|
label: PropTypes.string,
|
|
246
|
-
/**
|
|
247
|
-
* The font size of the axis label.
|
|
248
|
-
* @default 14
|
|
249
|
-
* @deprecated Consider using `labelStyle.fontSize` instead.
|
|
250
|
-
*/
|
|
251
|
-
labelFontSize: PropTypes.number,
|
|
252
243
|
/**
|
|
253
244
|
* The style applied to the axis label.
|
|
254
245
|
*/
|
|
@@ -273,12 +264,6 @@ process.env.NODE_ENV !== "production" ? ChartsYAxis.propTypes = {
|
|
|
273
264
|
*/
|
|
274
265
|
stroke: PropTypes.string,
|
|
275
266
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
276
|
-
/**
|
|
277
|
-
* The font size of the axis ticks text.
|
|
278
|
-
* @default 12
|
|
279
|
-
* @deprecated Consider using `tickLabelStyle.fontSize` instead.
|
|
280
|
-
*/
|
|
281
|
-
tickFontSize: PropTypes.number,
|
|
282
267
|
/**
|
|
283
268
|
* Defines which ticks are displayed.
|
|
284
269
|
* Its value can be:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["width", "height", "margin", "title", "desc", "value", "valueMin", "valueMax", "startAngle", "endAngle", "outerRadius", "innerRadius", "cornerRadius", "cx", "cy", "children"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
@@ -9,49 +9,16 @@ import { styled } from '@mui/material/styles';
|
|
|
9
9
|
import { ChartsSurface } from "../ChartsSurface/index.js";
|
|
10
10
|
import { DrawingAreaProvider } from "../context/DrawingAreaProvider/index.js";
|
|
11
11
|
import { GaugeProvider } from "./GaugeProvider.js";
|
|
12
|
-
import { SizeProvider
|
|
13
|
-
import {
|
|
12
|
+
import { SizeProvider } from "../context/SizeProvider/index.js";
|
|
13
|
+
import { ChartProvider } from "../context/ChartProvider/index.js";
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
-
const
|
|
16
|
-
name: 'MuiGauge',
|
|
17
|
-
slot: 'Container'
|
|
18
|
-
})(({
|
|
19
|
-
ownerState,
|
|
15
|
+
const GStyled = styled('g')(({
|
|
20
16
|
theme
|
|
21
17
|
}) => ({
|
|
22
|
-
width: ownerState.width ?? '100%',
|
|
23
|
-
height: ownerState.height ?? '100%',
|
|
24
|
-
display: 'flex',
|
|
25
|
-
position: 'relative',
|
|
26
|
-
flexGrow: 1,
|
|
27
|
-
flexDirection: 'column',
|
|
28
|
-
alignItems: 'center',
|
|
29
|
-
justifyContent: 'center',
|
|
30
|
-
overflow: 'hidden',
|
|
31
|
-
'&>svg': {
|
|
32
|
-
width: '100%',
|
|
33
|
-
height: '100%'
|
|
34
|
-
},
|
|
35
18
|
'& text': {
|
|
36
19
|
fill: (theme.vars || theme).palette.text.primary
|
|
37
20
|
}
|
|
38
21
|
}));
|
|
39
|
-
function ResizableContainer(props) {
|
|
40
|
-
const {
|
|
41
|
-
inHeight,
|
|
42
|
-
inWidth,
|
|
43
|
-
hasIntrinsicSize,
|
|
44
|
-
containerRef
|
|
45
|
-
} = useSize();
|
|
46
|
-
return /*#__PURE__*/_jsx(ResizableContainerRoot, _extends({}, props, {
|
|
47
|
-
ownerState: {
|
|
48
|
-
width: inWidth,
|
|
49
|
-
height: inHeight
|
|
50
|
-
},
|
|
51
|
-
ref: containerRef,
|
|
52
|
-
children: hasIntrinsicSize && props.children
|
|
53
|
-
}));
|
|
54
|
-
}
|
|
55
22
|
const GaugeContainer = /*#__PURE__*/React.forwardRef(function GaugeContainer(props, ref) {
|
|
56
23
|
const {
|
|
57
24
|
width: inWidth,
|
|
@@ -72,10 +39,10 @@ const GaugeContainer = /*#__PURE__*/React.forwardRef(function GaugeContainer(pro
|
|
|
72
39
|
children
|
|
73
40
|
} = props,
|
|
74
41
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
75
|
-
return /*#__PURE__*/_jsx(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
42
|
+
return /*#__PURE__*/_jsx(ChartProvider, {
|
|
43
|
+
children: /*#__PURE__*/_jsx(SizeProvider, {
|
|
44
|
+
width: inWidth,
|
|
45
|
+
height: inHeight,
|
|
79
46
|
children: /*#__PURE__*/_jsx(DrawingAreaProvider, {
|
|
80
47
|
margin: _extends({
|
|
81
48
|
left: 10,
|
|
@@ -94,18 +61,18 @@ const GaugeContainer = /*#__PURE__*/React.forwardRef(function GaugeContainer(pro
|
|
|
94
61
|
cornerRadius: cornerRadius,
|
|
95
62
|
cx: cx,
|
|
96
63
|
cy: cy,
|
|
97
|
-
children: /*#__PURE__*/_jsx(
|
|
64
|
+
children: /*#__PURE__*/_jsx(ChartsSurface, _extends({
|
|
65
|
+
title: title,
|
|
66
|
+
desc: desc,
|
|
67
|
+
disableAxisListener: true,
|
|
98
68
|
role: "meter",
|
|
99
69
|
"aria-valuenow": value === null ? undefined : value,
|
|
100
70
|
"aria-valuemin": valueMin,
|
|
101
71
|
"aria-valuemax": valueMax
|
|
102
72
|
}, other, {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
desc: desc,
|
|
106
|
-
disableAxisListener: true,
|
|
73
|
+
ref: ref,
|
|
74
|
+
children: /*#__PURE__*/_jsx(GStyled, {
|
|
107
75
|
"aria-hidden": "true",
|
|
108
|
-
ref: ref,
|
|
109
76
|
children: children
|
|
110
77
|
})
|
|
111
78
|
}))
|
|
@@ -11,9 +11,9 @@ import { animated, useSpring } from '@react-spring/web';
|
|
|
11
11
|
import { useInteractionItemProps } from "../hooks/useInteractionItemProps.js";
|
|
12
12
|
import { useItemHighlighted } from "../context/index.js";
|
|
13
13
|
import { useUtilityClasses } from "./markElementClasses.js";
|
|
14
|
-
import { useSelector } from "../internals/useSelector.js";
|
|
15
|
-
import { selectorChartsInteractionXAxis } from "../
|
|
16
|
-
import { useStore } from "../internals/useStore.js";
|
|
14
|
+
import { useSelector } from "../internals/store/useSelector.js";
|
|
15
|
+
import { selectorChartsInteractionXAxis } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
|
|
16
|
+
import { useStore } from "../internals/store/useStore.js";
|
|
17
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
18
|
/**
|
|
19
19
|
* The line mark element that only render circle for performance improvement.
|
|
@@ -247,7 +247,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
247
247
|
hideTooltip: PropTypes.bool,
|
|
248
248
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
249
249
|
label: PropTypes.string,
|
|
250
|
-
labelFontSize: PropTypes.number,
|
|
251
250
|
labelStyle: PropTypes.object,
|
|
252
251
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
253
252
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -258,7 +257,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
258
257
|
slots: PropTypes.object,
|
|
259
258
|
stroke: PropTypes.string,
|
|
260
259
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
261
|
-
tickFontSize: PropTypes.number,
|
|
262
260
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
263
261
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
264
262
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -301,7 +299,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
301
299
|
hideTooltip: PropTypes.bool,
|
|
302
300
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
303
301
|
label: PropTypes.string,
|
|
304
|
-
labelFontSize: PropTypes.number,
|
|
305
302
|
labelStyle: PropTypes.object,
|
|
306
303
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
307
304
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -312,7 +309,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
312
309
|
slots: PropTypes.object,
|
|
313
310
|
stroke: PropTypes.string,
|
|
314
311
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
315
|
-
tickFontSize: PropTypes.number,
|
|
316
312
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
317
313
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
318
314
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -5,8 +5,8 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
5
5
|
const _excluded = ["slots", "slotProps"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import { useStore } from "../internals/useStore.js";
|
|
9
|
-
import { useSelector } from "../internals/useSelector.js";
|
|
8
|
+
import { useStore } from "../internals/store/useStore.js";
|
|
9
|
+
import { useSelector } from "../internals/store/useSelector.js";
|
|
10
10
|
import { useCartesianContext } from "../context/CartesianProvider/index.js";
|
|
11
11
|
import { LineHighlightElement } from "./LineHighlightElement.js";
|
|
12
12
|
import { getValueToPositionMapper } from "../hooks/useScale.js";
|
|
@@ -14,7 +14,7 @@ import { DEFAULT_X_AXIS_KEY } from "../constants/index.js";
|
|
|
14
14
|
import getColor from "./getColor.js";
|
|
15
15
|
import { useLineSeries } from "../hooks/useSeries.js";
|
|
16
16
|
import { useDrawingArea } from "../hooks/useDrawingArea.js";
|
|
17
|
-
import { selectorChartsInteractionXAxis } from "../
|
|
17
|
+
import { selectorChartsInteractionXAxis } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
|
|
18
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
19
|
/**
|
|
20
20
|
* Demos:
|
|
@@ -12,9 +12,9 @@ import { getSymbol } from "../internals/getSymbol.js";
|
|
|
12
12
|
import { useInteractionItemProps } from "../hooks/useInteractionItemProps.js";
|
|
13
13
|
import { useItemHighlighted } from "../context/index.js";
|
|
14
14
|
import { useUtilityClasses } from "./markElementClasses.js";
|
|
15
|
-
import { selectorChartsInteractionXAxis } from "../
|
|
16
|
-
import { useSelector } from "../internals/useSelector.js";
|
|
17
|
-
import { useStore } from "../internals/useStore.js";
|
|
15
|
+
import { selectorChartsInteractionXAxis } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
|
|
16
|
+
import { useSelector } from "../internals/store/useSelector.js";
|
|
17
|
+
import { useStore } from "../internals/store/useStore.js";
|
|
18
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
19
|
const MarkElementPath = styled(animated.path, {
|
|
20
20
|
name: 'MuiMarkElement',
|
|
@@ -22,10 +22,11 @@ const useUtilityClasses = ownerState => {
|
|
|
22
22
|
classes,
|
|
23
23
|
id,
|
|
24
24
|
isFaded,
|
|
25
|
-
isHighlighted
|
|
25
|
+
isHighlighted,
|
|
26
|
+
dataIndex
|
|
26
27
|
} = ownerState;
|
|
27
28
|
const slots = {
|
|
28
|
-
root: ['root', `series-${id}`, isHighlighted && 'highlighted', isFaded && 'faded']
|
|
29
|
+
root: ['root', `series-${id}`, `data-index-${dataIndex}`, isHighlighted && 'highlighted', isFaded && 'faded']
|
|
29
30
|
};
|
|
30
31
|
return composeClasses(slots, getPieArcUtilityClass, classes);
|
|
31
32
|
};
|
|
@@ -36,9 +37,9 @@ const PieArcRoot = styled(animated.path, {
|
|
|
36
37
|
})(({
|
|
37
38
|
theme
|
|
38
39
|
}) => ({
|
|
40
|
+
// Got to move stroke to an element prop instead of style.
|
|
39
41
|
stroke: (theme.vars || theme).palette.background.paper,
|
|
40
|
-
|
|
41
|
-
strokeLinejoin: 'round'
|
|
42
|
+
transition: 'opacity 0.2s ease-in, fill 0.2s ease-in, filter 0.2s ease-in'
|
|
42
43
|
}));
|
|
43
44
|
function PieArc(props) {
|
|
44
45
|
const {
|
|
@@ -79,7 +80,12 @@ function PieArc(props) {
|
|
|
79
80
|
onClick: onClick,
|
|
80
81
|
cursor: onClick ? 'pointer' : 'unset',
|
|
81
82
|
ownerState: ownerState,
|
|
82
|
-
className: classes.root
|
|
83
|
+
className: classes.root,
|
|
84
|
+
fill: ownerState.color,
|
|
85
|
+
opacity: ownerState.isFaded ? 0.3 : 1,
|
|
86
|
+
filter: ownerState.isHighlighted ? 'brightness(120%)' : 'none',
|
|
87
|
+
strokeWidth: 1,
|
|
88
|
+
strokeLinejoin: "round"
|
|
83
89
|
}, other, getInteractionItemProps({
|
|
84
90
|
type: 'pie',
|
|
85
91
|
seriesId: id,
|
|
@@ -2,8 +2,7 @@
|
|
|
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 = ["slots", "slotProps", "innerRadius", "outerRadius", "cornerRadius", "paddingAngle", "id", "highlighted", "faded", "data", "onItemClick", "skipAnimation"]
|
|
6
|
-
_excluded2 = ["startAngle", "endAngle", "paddingAngle", "innerRadius", "arcLabelRadius", "outerRadius", "cornerRadius"];
|
|
5
|
+
const _excluded = ["slots", "slotProps", "innerRadius", "outerRadius", "cornerRadius", "paddingAngle", "id", "highlighted", "faded", "data", "onItemClick", "skipAnimation"];
|
|
7
6
|
import * as React from 'react';
|
|
8
7
|
import PropTypes from 'prop-types';
|
|
9
8
|
import { useTransition } from '@react-spring/web';
|
|
@@ -47,16 +46,14 @@ function PieArcPlot(props) {
|
|
|
47
46
|
}
|
|
48
47
|
const Arc = slots?.pieArc ?? PieArc;
|
|
49
48
|
return /*#__PURE__*/_jsx("g", _extends({}, other, {
|
|
50
|
-
children: transition((
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
} = _ref,
|
|
59
|
-
style = _objectWithoutPropertiesLoose(_ref, _excluded2);
|
|
49
|
+
children: transition(({
|
|
50
|
+
startAngle,
|
|
51
|
+
endAngle,
|
|
52
|
+
paddingAngle: pA,
|
|
53
|
+
innerRadius: iR,
|
|
54
|
+
outerRadius: oR,
|
|
55
|
+
cornerRadius: cR
|
|
56
|
+
}, item, _, index) => {
|
|
60
57
|
return /*#__PURE__*/_jsx(Arc, _extends({
|
|
61
58
|
startAngle: startAngle,
|
|
62
59
|
endAngle: endAngle,
|
|
@@ -64,7 +61,6 @@ function PieArcPlot(props) {
|
|
|
64
61
|
innerRadius: iR,
|
|
65
62
|
outerRadius: oR,
|
|
66
63
|
cornerRadius: cR,
|
|
67
|
-
style: style,
|
|
68
64
|
id: id,
|
|
69
65
|
color: item.color,
|
|
70
66
|
dataIndex: index,
|
|
@@ -221,7 +221,6 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
221
221
|
hideTooltip: PropTypes.bool,
|
|
222
222
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
223
223
|
label: PropTypes.string,
|
|
224
|
-
labelFontSize: PropTypes.number,
|
|
225
224
|
labelStyle: PropTypes.object,
|
|
226
225
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
227
226
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -232,7 +231,6 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
232
231
|
slots: PropTypes.object,
|
|
233
232
|
stroke: PropTypes.string,
|
|
234
233
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
235
|
-
tickFontSize: PropTypes.number,
|
|
236
234
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
237
235
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
238
236
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -275,7 +273,6 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
275
273
|
hideTooltip: PropTypes.bool,
|
|
276
274
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
277
275
|
label: PropTypes.string,
|
|
278
|
-
labelFontSize: PropTypes.number,
|
|
279
276
|
labelStyle: PropTypes.object,
|
|
280
277
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
281
278
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -286,7 +283,6 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
286
283
|
slots: PropTypes.object,
|
|
287
284
|
stroke: PropTypes.string,
|
|
288
285
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
289
|
-
tickFontSize: PropTypes.number,
|
|
290
286
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
291
287
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
292
288
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -5,11 +5,11 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { getValueToPositionMapper } from "../hooks/useScale.js";
|
|
7
7
|
import { useInteractionItemProps } from "../hooks/useInteractionItemProps.js";
|
|
8
|
-
import { useStore } from "../internals/useStore.js";
|
|
9
|
-
import { useSelector } from "../internals/useSelector.js";
|
|
8
|
+
import { useStore } from "../internals/store/useStore.js";
|
|
9
|
+
import { useSelector } from "../internals/store/useSelector.js";
|
|
10
10
|
import { useHighlighted } from "../context/index.js";
|
|
11
11
|
import { useDrawingArea } from "../hooks/useDrawingArea.js";
|
|
12
|
-
import { selectorChartsInteractionIsVoronoiEnabled } from "../
|
|
12
|
+
import { selectorChartsInteractionIsVoronoiEnabled } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
/**
|
|
15
15
|
* Demos:
|
|
@@ -231,7 +231,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
231
231
|
hideTooltip: PropTypes.bool,
|
|
232
232
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
233
233
|
label: PropTypes.string,
|
|
234
|
-
labelFontSize: PropTypes.number,
|
|
235
234
|
labelStyle: PropTypes.object,
|
|
236
235
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
237
236
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -242,7 +241,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
242
241
|
slots: PropTypes.object,
|
|
243
242
|
stroke: PropTypes.string,
|
|
244
243
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
245
|
-
tickFontSize: PropTypes.number,
|
|
246
244
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
247
245
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
248
246
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -285,7 +283,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
285
283
|
hideTooltip: PropTypes.bool,
|
|
286
284
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
287
285
|
label: PropTypes.string,
|
|
288
|
-
labelFontSize: PropTypes.number,
|
|
289
286
|
labelStyle: PropTypes.object,
|
|
290
287
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
291
288
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -296,7 +293,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
296
293
|
slots: PropTypes.object,
|
|
297
294
|
stroke: PropTypes.string,
|
|
298
295
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
299
|
-
tickFontSize: PropTypes.number,
|
|
300
296
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
301
297
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
302
298
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -260,7 +260,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
260
260
|
hideTooltip: PropTypes.bool,
|
|
261
261
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
262
262
|
label: PropTypes.string,
|
|
263
|
-
labelFontSize: PropTypes.number,
|
|
264
263
|
labelStyle: PropTypes.object,
|
|
265
264
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
266
265
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -271,7 +270,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
271
270
|
slots: PropTypes.object,
|
|
272
271
|
stroke: PropTypes.string,
|
|
273
272
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
274
|
-
tickFontSize: PropTypes.number,
|
|
275
273
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
276
274
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
277
275
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -313,7 +311,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
313
311
|
hideTooltip: PropTypes.bool,
|
|
314
312
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
315
313
|
label: PropTypes.string,
|
|
316
|
-
labelFontSize: PropTypes.number,
|
|
317
314
|
labelStyle: PropTypes.object,
|
|
318
315
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
319
316
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -324,7 +321,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
324
321
|
slots: PropTypes.object,
|
|
325
322
|
stroke: PropTypes.string,
|
|
326
323
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
327
|
-
tickFontSize: PropTypes.number,
|
|
328
324
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
329
325
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
330
326
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|