@mui/x-charts 8.22.0 → 8.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChart/BarLabel/BarLabel.types.d.ts +3 -3
- package/BarChart/BarLabel/BarLabelItem.d.ts +1 -1
- package/BarChart/BarLabel/BarLabelPlot.d.ts +9 -9
- package/BarChart/BarLabel/getBarLabel.d.ts +3 -3
- package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +18 -1
- package/CHANGELOG.md +101 -0
- package/ChartsAxisHighlight/ChartsXAxisHighlight.js +2 -3
- package/ChartsAxisHighlight/ChartsYAxisHighlight.js +2 -3
- package/ChartsBrushOverlay/ChartsBrushOverlay.js +6 -7
- package/ChartsSurface/ChartsSurface.js +7 -8
- package/ChartsTooltip/ChartsTooltipContainer.js +4 -5
- package/ChartsTooltip/useAxisTooltip.js +3 -4
- package/ChartsTooltip/useItemTooltip.js +2 -3
- package/ChartsWrapper/ChartsWrapper.js +2 -3
- package/LineChart/LineHighlightPlot.js +1 -2
- package/LineChart/MarkPlot.js +1 -2
- package/PieChart/FocusedPieArc.d.ts +2 -0
- package/PieChart/FocusedPieArc.js +58 -0
- package/PieChart/PieArcPlot.js +3 -31
- package/PieChart/PieChart.js +2 -1
- package/PieChart/dataTransform/getModifiedArcProperties.d.ts +11 -0
- package/PieChart/dataTransform/getModifiedArcProperties.js +42 -0
- package/PieChart/dataTransform/useTransformData.js +15 -20
- package/PieChart/seriesConfig/tooltipPosition.js +11 -20
- package/RadarChart/RadarAxis/useRadarAxis.js +1 -2
- package/RadarChart/RadarAxisHighlight/useRadarAxisHighlight.js +3 -4
- package/RadarChart/RadarGrid/useRadarGridData.js +1 -2
- package/RadarChart/RadarSeriesPlot/useRadarRotationIndex.js +1 -2
- package/ScatterChart/BatchScatter.js +4 -5
- package/ScatterChart/Scatter.js +1 -2
- package/esm/BarChart/BarLabel/BarLabel.types.d.ts +3 -3
- package/esm/BarChart/BarLabel/BarLabelItem.d.ts +1 -1
- package/esm/BarChart/BarLabel/BarLabelPlot.d.ts +9 -9
- package/esm/BarChart/BarLabel/getBarLabel.d.ts +3 -3
- package/esm/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +18 -1
- package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.js +2 -3
- package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.js +2 -3
- package/esm/ChartsBrushOverlay/ChartsBrushOverlay.js +6 -7
- package/esm/ChartsSurface/ChartsSurface.js +7 -8
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +4 -5
- package/esm/ChartsTooltip/useAxisTooltip.js +3 -4
- package/esm/ChartsTooltip/useItemTooltip.js +2 -3
- package/esm/ChartsWrapper/ChartsWrapper.js +2 -3
- package/esm/LineChart/LineHighlightPlot.js +1 -2
- package/esm/LineChart/MarkPlot.js +1 -2
- package/esm/PieChart/FocusedPieArc.d.ts +2 -0
- package/esm/PieChart/FocusedPieArc.js +51 -0
- package/esm/PieChart/PieArcPlot.js +5 -33
- package/esm/PieChart/PieChart.js +2 -1
- package/esm/PieChart/dataTransform/getModifiedArcProperties.d.ts +11 -0
- package/esm/PieChart/dataTransform/getModifiedArcProperties.js +36 -0
- package/esm/PieChart/dataTransform/useTransformData.js +15 -20
- package/esm/PieChart/seriesConfig/tooltipPosition.js +11 -20
- package/esm/RadarChart/RadarAxis/useRadarAxis.js +1 -2
- package/esm/RadarChart/RadarAxisHighlight/useRadarAxisHighlight.js +3 -4
- package/esm/RadarChart/RadarGrid/useRadarGridData.js +1 -2
- package/esm/RadarChart/RadarSeriesPlot/useRadarRotationIndex.js +1 -2
- package/esm/ScatterChart/BatchScatter.js +4 -5
- package/esm/ScatterChart/Scatter.js +1 -2
- package/esm/hooks/useAxis.js +8 -9
- package/esm/hooks/useAxisSystem.js +2 -3
- package/esm/hooks/useBrush.js +1 -2
- package/esm/hooks/useChartId.js +1 -2
- package/esm/hooks/useDataset.js +1 -2
- package/esm/hooks/useDrawingArea.js +1 -2
- package/esm/hooks/useFocusedItem.js +3 -4
- package/esm/hooks/useInteractionItemProps.d.ts +3 -2
- package/esm/hooks/useInteractionItemProps.js +13 -2
- package/esm/hooks/useIsItemFocused.js +1 -2
- package/esm/hooks/useItemHighlighted.js +2 -3
- package/esm/hooks/useItemHighlightedGetter.js +2 -3
- package/esm/hooks/useLegend.js +1 -2
- package/esm/hooks/usePieSeries.js +1 -2
- package/esm/hooks/useSeries.js +1 -2
- package/esm/hooks/useSkipAnimation.js +1 -2
- package/esm/hooks/useZAxis.js +1 -2
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +0 -1
- package/esm/internals/index.js +0 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +1 -2
- package/esm/internals/plugins/corePlugins/useChartSeries/useColorProcessor.js +1 -2
- package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.js +1 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +5 -6
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting.js +1 -2
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +5 -6
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +4 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +6 -7
- package/esm/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.types.d.ts +7 -6
- package/esm/internals/plugins/models/seriesConfig/tooltipGetter.types.d.ts +4 -3
- package/esm/internals/plugins/models/seriesConfig/tooltipItemPositionGetter.types.d.ts +3 -2
- package/esm/internals/seriesSelectorOfType.js +2 -3
- package/esm/models/seriesType/config.d.ts +0 -2
- package/hooks/useAxis.js +8 -9
- package/hooks/useAxisSystem.js +2 -3
- package/hooks/useBrush.js +1 -2
- package/hooks/useChartId.js +1 -2
- package/hooks/useDataset.js +1 -2
- package/hooks/useDrawingArea.js +1 -2
- package/hooks/useFocusedItem.js +3 -4
- package/hooks/useInteractionItemProps.d.ts +3 -2
- package/hooks/useInteractionItemProps.js +13 -2
- package/hooks/useIsItemFocused.js +1 -2
- package/hooks/useItemHighlighted.js +2 -3
- package/hooks/useItemHighlightedGetter.js +2 -3
- package/hooks/useLegend.js +1 -2
- package/hooks/usePieSeries.js +1 -2
- package/hooks/useSeries.js +1 -2
- package/hooks/useSkipAnimation.js +1 -2
- package/hooks/useZAxis.js +1 -2
- package/index.js +1 -1
- package/internals/index.d.ts +0 -1
- package/internals/index.js +0 -12
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +1 -2
- package/internals/plugins/corePlugins/useChartSeries/useColorProcessor.js +1 -2
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.js +1 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +5 -6
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting.js +1 -2
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +5 -6
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +4 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +6 -7
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.types.d.ts +7 -6
- package/internals/plugins/models/seriesConfig/tooltipGetter.types.d.ts +4 -3
- package/internals/plugins/models/seriesConfig/tooltipItemPositionGetter.types.d.ts +3 -2
- package/internals/seriesSelectorOfType.js +2 -3
- package/models/seriesType/config.d.ts +0 -2
- package/package.json +1 -1
- package/esm/internals/store/useSelector.d.ts +0 -2
- package/esm/internals/store/useSelector.js +0 -2
- package/internals/store/useSelector.d.ts +0 -2
- package/internals/store/useSelector.js +0 -8
|
@@ -11,7 +11,7 @@ export interface BarLabelOwnerState {
|
|
|
11
11
|
layout: 'vertical' | 'horizontal';
|
|
12
12
|
classes?: Partial<BarLabelClasses>;
|
|
13
13
|
}
|
|
14
|
-
export type BarItem
|
|
14
|
+
export type BarItem = {
|
|
15
15
|
/**
|
|
16
16
|
* The series id of the bar.
|
|
17
17
|
*/
|
|
@@ -23,7 +23,7 @@ export type BarItem<V extends BarValueType | null = BarValueType | null> = {
|
|
|
23
23
|
/**
|
|
24
24
|
* The value of the data point.
|
|
25
25
|
*/
|
|
26
|
-
value:
|
|
26
|
+
value: BarValueType | null;
|
|
27
27
|
};
|
|
28
28
|
export type BarLabelContext = {
|
|
29
29
|
bar: {
|
|
@@ -39,4 +39,4 @@ export type BarLabelContext = {
|
|
|
39
39
|
width: number;
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
|
-
export type BarLabelFunction
|
|
42
|
+
export type BarLabelFunction = (item: BarItem, context: BarLabelContext) => string | null | undefined;
|
|
@@ -67,7 +67,7 @@ export type BarLabelItemProps<V extends BarValueType | null> = Omit<BarLabelOwne
|
|
|
67
67
|
* @param {BarLabelContext} context data about the bar.
|
|
68
68
|
* @returns {string} The formatted label.
|
|
69
69
|
*/
|
|
70
|
-
barLabel?: 'value' | ((item: BarItem
|
|
70
|
+
barLabel?: 'value' | ((item: BarItem, context: BarLabelContext) => string | null | undefined);
|
|
71
71
|
/**
|
|
72
72
|
* The placement of the bar label.
|
|
73
73
|
* It controls whether the label is rendered in the center or outside the bar.
|
|
@@ -3,29 +3,29 @@ import { type BarLabelItemProps } from "./BarLabelItem.js";
|
|
|
3
3
|
import type { SeriesId } from "../../models/seriesType/common.js";
|
|
4
4
|
import { type BarSeriesType, type BarValueType } from "../../models/seriesType/bar.js";
|
|
5
5
|
import { type BarLabelFunction } from "./BarLabel.types.js";
|
|
6
|
-
interface BarLabelPlotProps
|
|
7
|
-
processedSeries: ProcessedBarLabelSeriesData
|
|
6
|
+
interface BarLabelPlotProps {
|
|
7
|
+
processedSeries: ProcessedBarLabelSeriesData;
|
|
8
8
|
className: string;
|
|
9
9
|
skipAnimation?: boolean;
|
|
10
|
-
barLabel?: BarLabelItemProps<
|
|
10
|
+
barLabel?: BarLabelItemProps<BarValueType | null>['barLabel'];
|
|
11
11
|
}
|
|
12
|
-
export interface ProcessedBarLabelSeriesData
|
|
12
|
+
export interface ProcessedBarLabelSeriesData {
|
|
13
13
|
seriesId: SeriesId;
|
|
14
|
-
data: ProcessedBarLabelData
|
|
15
|
-
barLabel?: 'value' | BarLabelFunction
|
|
14
|
+
data: ProcessedBarLabelData[];
|
|
15
|
+
barLabel?: 'value' | BarLabelFunction;
|
|
16
16
|
barLabelPlacement?: BarSeriesType['barLabelPlacement'];
|
|
17
17
|
layout?: 'vertical' | 'horizontal';
|
|
18
18
|
xOrigin: number;
|
|
19
19
|
yOrigin: number;
|
|
20
20
|
}
|
|
21
|
-
export interface ProcessedBarLabelData
|
|
21
|
+
export interface ProcessedBarLabelData extends AnimationData {
|
|
22
22
|
seriesId: SeriesId;
|
|
23
23
|
dataIndex: number;
|
|
24
24
|
color: string;
|
|
25
|
-
value:
|
|
25
|
+
value: BarValueType | null;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* @ignore - internal component.
|
|
29
29
|
*/
|
|
30
|
-
declare function BarLabelPlot
|
|
30
|
+
declare function BarLabelPlot(props: BarLabelPlotProps): import("react/jsx-runtime").JSX.Element | null;
|
|
31
31
|
export { BarLabelPlot };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type SeriesId } from "../../models/seriesType/common.js";
|
|
2
2
|
import { type BarLabelFunction } from "./BarLabel.types.js";
|
|
3
3
|
import { type BarValueType } from "../../models/seriesType/bar.js";
|
|
4
|
-
export declare function getBarLabel
|
|
5
|
-
barLabel: 'value' | BarLabelFunction
|
|
6
|
-
value:
|
|
4
|
+
export declare function getBarLabel(options: {
|
|
5
|
+
barLabel: 'value' | BarLabelFunction;
|
|
6
|
+
value: BarValueType | null;
|
|
7
7
|
dataIndex: number;
|
|
8
8
|
seriesId: SeriesId;
|
|
9
9
|
height: number;
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import { type AllSeriesType } from "../../../models/seriesType/index.js";
|
|
2
|
-
export declare function getSeriesWithDefaultValues
|
|
2
|
+
export declare function getSeriesWithDefaultValues(seriesData: AllSeriesType<'bar'>, seriesIndex: number, colors: readonly string[]): {
|
|
3
3
|
id: import("../../../index.js").SeriesId;
|
|
4
4
|
color: string;
|
|
5
|
+
type: "bar";
|
|
6
|
+
data?: ReadonlyArray<import("../../../index.js").BarValueType | null>;
|
|
7
|
+
dataKey?: string;
|
|
8
|
+
label?: string | ((location: "tooltip" | "legend") => string);
|
|
9
|
+
layout?: "horizontal" | "vertical";
|
|
10
|
+
stackOffset?: import("../../../index.js").StackOffsetType;
|
|
11
|
+
minBarSize?: number;
|
|
12
|
+
barLabel?: "value" | ((item: import("../../index.js").BarItem, context: import("../../index.js").BarLabelContext) => string | null | undefined);
|
|
13
|
+
barLabelPlacement?: "center" | "outside";
|
|
14
|
+
valueFormatter?: import("../../../internals/index.js").SeriesValueFormatter<number | null> | undefined;
|
|
15
|
+
highlightScope?: import("../../../index.js").HighlightScope;
|
|
16
|
+
labelMarkType?: import("../../../internals/index.js").ChartsLabelMarkType;
|
|
17
|
+
colorGetter?: ((data: import("../../../internals/index.js").ColorCallbackValue<number | null>) => string) | undefined;
|
|
18
|
+
xAxisId?: import("../../../internals/index.js").AxisId;
|
|
19
|
+
yAxisId?: import("../../../internals/index.js").AxisId;
|
|
20
|
+
stack?: string;
|
|
21
|
+
stackOrder?: import("../../../index.js").StackOrderType;
|
|
5
22
|
};
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,107 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.22.1
|
|
9
|
+
|
|
10
|
+
_Dec 17, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🌎 Improve Swedish (sv-SE) locale on the Data Grid
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
|
|
17
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
18
|
+
@KyeongJooni, @VismaAndreasIvarsson
|
|
19
|
+
|
|
20
|
+
The following team members contributed to this release:
|
|
21
|
+
@alelthomas, @alexfauquette, @arminmeh, @bernardobelchior, @Janpot, @JCQuintas, @mapache-salvaje, @michelengelen, @mj12albert, @prakhargupta1, @romgrk, @siriwatknp
|
|
22
|
+
|
|
23
|
+
### Data Grid
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid@8.22.1`
|
|
26
|
+
|
|
27
|
+
- [data grid] Fix column menu keyboard shortcut (#20621) @mj12albert
|
|
28
|
+
- [data grid] Fix row checkbox disabled state on first render and keep cell focusable (ARIA) (#20641) @michelengelen
|
|
29
|
+
- [data grid] Fix tree data selection bug (#20528) @michelengelen
|
|
30
|
+
- [data grid] Prevent clear cell selection on edit mode (#20544) @siriwatknp
|
|
31
|
+
- [data grid] Refactor column merge logic to prioritize defined properties only (#20640) @michelengelen
|
|
32
|
+
- [data grid] Reset row spanning on row expansion change (#20661) @siriwatknp
|
|
33
|
+
- [data grid] Resize newly added rows while resize action is happening (#20676)
|
|
34
|
+
- [l10n] Improve Swedish (sv-SE) locale (#20682) @VismaAndreasIvarsson
|
|
35
|
+
|
|
36
|
+
#### `@mui/x-data-grid-pro@8.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
37
|
+
|
|
38
|
+
Same changes as in `@mui/x-data-grid@8.22.1`.
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-data-grid-premium@8.22.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
41
|
+
|
|
42
|
+
Same changes as in `@mui/x-data-grid-pro@8.22.1`, plus:
|
|
43
|
+
|
|
44
|
+
- [DataGridPremium] Import `useId()` from `@mui/utils` to maintain React 17 compatibility (#20635) @arminmeh
|
|
45
|
+
|
|
46
|
+
### Date and Time Pickers
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-date-pickers@8.22.1`
|
|
49
|
+
|
|
50
|
+
- [pickers] Add minutesStep validation test (#20672) @KyeongJooni
|
|
51
|
+
- [pickers] Fix `onAccept()` returning wrong year after selecting year then month (#20639) @michelengelen
|
|
52
|
+
|
|
53
|
+
#### `@mui/x-date-pickers-pro@8.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
54
|
+
|
|
55
|
+
Same changes as in `@mui/x-date-pickers@8.22.1`.
|
|
56
|
+
|
|
57
|
+
### Charts
|
|
58
|
+
|
|
59
|
+
#### `@mui/x-charts@8.22.1`
|
|
60
|
+
|
|
61
|
+
- [charts] Extract `FocusedPieArc` from `PieArcPlot` (#20613) @alexfauquette
|
|
62
|
+
- [charts] Fix regression on the highlight control (#20627) @alexfauquette
|
|
63
|
+
- [charts] Refactor: `useSelector()` => `store.use()` (#20681) @romgrk
|
|
64
|
+
- [charts] Remove duplicated types (#20694) @alexfauquette
|
|
65
|
+
- [charts] Remove unused generics from bar charts (#20642) @bernardobelchior
|
|
66
|
+
- [charts] Simplify tooltip position getter for pie chart (#20625) @alexfauquette
|
|
67
|
+
|
|
68
|
+
#### `@mui/x-charts-pro@8.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
69
|
+
|
|
70
|
+
Same changes as in `@mui/x-charts@8.22.1`, plus:
|
|
71
|
+
|
|
72
|
+
- [charts-pro] Add heatmap performance benchmark (#20695) @bernardobelchior
|
|
73
|
+
|
|
74
|
+
#### `@mui/x-charts-premium@8.22.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
75
|
+
|
|
76
|
+
Same changes as in `@mui/x-charts-pro@8.22.1`, plus:
|
|
77
|
+
|
|
78
|
+
- [charts-premium] Create `BarChartPremium` (#20643) @bernardobelchior
|
|
79
|
+
|
|
80
|
+
### Tree View
|
|
81
|
+
|
|
82
|
+
#### `@mui/x-tree-view@8.22.1`
|
|
83
|
+
|
|
84
|
+
Internal changes.
|
|
85
|
+
|
|
86
|
+
#### `@mui/x-tree-view-pro@8.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
87
|
+
|
|
88
|
+
Same changes as in `@mui/x-tree-view@8.22.1`.
|
|
89
|
+
|
|
90
|
+
### Codemod
|
|
91
|
+
|
|
92
|
+
#### `@mui/x-codemod@8.22.1`
|
|
93
|
+
|
|
94
|
+
Internal changes.
|
|
95
|
+
|
|
96
|
+
### Docs
|
|
97
|
+
|
|
98
|
+
- [docs] Add button to GitHub source code for the Data Grid advanced demos (DX-50) (#20633) @alelthomas
|
|
99
|
+
- [docs] Remove `seriesConfig` to prevent future confusion (#20678) @alexfauquette
|
|
100
|
+
- [docs] Revise the Data Grid's API object doc for clarity and style (#20649) @mapache-salvaje
|
|
101
|
+
- [docs] Update list of charts (#20479) @prakhargupta1
|
|
102
|
+
|
|
103
|
+
### Core
|
|
104
|
+
|
|
105
|
+
- [code-infra] Regression tests improvements (#20441) @Janpot
|
|
106
|
+
- [code-infra] Test utils upgrade (#20592) @Janpot
|
|
107
|
+
- [code-infra] Try to fix the Tree View flacky tests (#20573) @JCQuintas
|
|
108
|
+
|
|
8
109
|
## 8.22.0
|
|
9
110
|
|
|
10
111
|
_Dec 11, 2025_
|
|
@@ -9,7 +9,6 @@ exports.default = ChartsXHighlight;
|
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _useScale = require("../hooks/useScale");
|
|
11
11
|
var _scaleGuards = require("../internals/scaleGuards");
|
|
12
|
-
var _useSelector = require("../internals/store/useSelector");
|
|
13
12
|
var _useStore = require("../internals/store/useStore");
|
|
14
13
|
var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
|
|
15
14
|
var _hooks = require("../hooks");
|
|
@@ -28,8 +27,8 @@ function ChartsXHighlight(props) {
|
|
|
28
27
|
height
|
|
29
28
|
} = (0, _hooks.useDrawingArea)();
|
|
30
29
|
const store = (0, _useStore.useStore)();
|
|
31
|
-
const axisXValues =
|
|
32
|
-
const xAxes =
|
|
30
|
+
const axisXValues = store.use(_useChartCartesianAxis.selectorChartsHighlightXAxisValue);
|
|
31
|
+
const xAxes = store.use(_useChartCartesianAxis.selectorChartXAxis);
|
|
33
32
|
if (axisXValues.length === 0) {
|
|
34
33
|
return null;
|
|
35
34
|
}
|
|
@@ -9,7 +9,6 @@ exports.default = ChartsYHighlight;
|
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _useScale = require("../hooks/useScale");
|
|
11
11
|
var _scaleGuards = require("../internals/scaleGuards");
|
|
12
|
-
var _useSelector = require("../internals/store/useSelector");
|
|
13
12
|
var _useStore = require("../internals/store/useStore");
|
|
14
13
|
var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
|
|
15
14
|
var _hooks = require("../hooks");
|
|
@@ -28,8 +27,8 @@ function ChartsYHighlight(props) {
|
|
|
28
27
|
width
|
|
29
28
|
} = (0, _hooks.useDrawingArea)();
|
|
30
29
|
const store = (0, _useStore.useStore)();
|
|
31
|
-
const axisYValues =
|
|
32
|
-
const yAxes =
|
|
30
|
+
const axisYValues = store.use(_useChartCartesianAxis.selectorChartsHighlightYAxisValue);
|
|
31
|
+
const yAxes = store.use(_useChartCartesianAxis.selectorChartYAxis);
|
|
33
32
|
if (axisYValues.length === 0) {
|
|
34
33
|
return null;
|
|
35
34
|
}
|
|
@@ -14,7 +14,6 @@ var _styles = require("@mui/material/styles");
|
|
|
14
14
|
var _ChartsBrushOverlay = require("./ChartsBrushOverlay.classes");
|
|
15
15
|
var _useChartDimensions = require("../internals/plugins/corePlugins/useChartDimensions");
|
|
16
16
|
var _useChartBrush = require("../internals/plugins/featurePlugins/useChartBrush");
|
|
17
|
-
var _useSelector = require("../internals/store/useSelector");
|
|
18
17
|
var _useStore = require("../internals/store/useStore");
|
|
19
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
19
|
function BrushRect(props) {
|
|
@@ -30,13 +29,13 @@ function BrushRect(props) {
|
|
|
30
29
|
*/
|
|
31
30
|
function ChartsBrushOverlay(props) {
|
|
32
31
|
const store = (0, _useStore.useStore)();
|
|
33
|
-
const drawingArea =
|
|
32
|
+
const drawingArea = store.use(_useChartDimensions.selectorChartDrawingArea);
|
|
34
33
|
const theme = (0, _styles.useTheme)();
|
|
35
|
-
const brushStartX =
|
|
36
|
-
const brushStartY =
|
|
37
|
-
const brushCurrentX =
|
|
38
|
-
const brushCurrentY =
|
|
39
|
-
const brushConfig =
|
|
34
|
+
const brushStartX = store.use(_useChartBrush.selectorBrushStartX);
|
|
35
|
+
const brushStartY = store.use(_useChartBrush.selectorBrushStartY);
|
|
36
|
+
const brushCurrentX = store.use(_useChartBrush.selectorBrushCurrentX);
|
|
37
|
+
const brushCurrentY = store.use(_useChartBrush.selectorBrushCurrentY);
|
|
38
|
+
const brushConfig = store.use(_useChartBrush.selectorBrushConfig);
|
|
40
39
|
if (brushStartX === null || brushStartY === null || brushCurrentX === null || brushCurrentY === null) {
|
|
41
40
|
return null;
|
|
42
41
|
}
|
|
@@ -16,7 +16,6 @@ var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
|
|
|
16
16
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
17
|
var _ChartsAxesGradients = require("../internals/components/ChartsAxesGradients");
|
|
18
18
|
var _useSvgRef = require("../hooks/useSvgRef");
|
|
19
|
-
var _useSelector = require("../internals/store/useSelector");
|
|
20
19
|
var _useStore = require("../internals/store/useStore");
|
|
21
20
|
var _useChartDimensions = require("../internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors");
|
|
22
21
|
var _useChartKeyboardNavigation = require("../internals/plugins/featurePlugins/useChartKeyboardNavigation");
|
|
@@ -64,13 +63,13 @@ const ChartsSurfaceStyles = (0, _styles.styled)('svg', {
|
|
|
64
63
|
*/
|
|
65
64
|
const ChartsSurface = exports.ChartsSurface = /*#__PURE__*/React.forwardRef(function ChartsSurface(inProps, ref) {
|
|
66
65
|
const store = (0, _useStore.useStore)();
|
|
67
|
-
const svgWidth =
|
|
68
|
-
const svgHeight =
|
|
69
|
-
const propsWidth =
|
|
70
|
-
const propsHeight =
|
|
71
|
-
const isKeyboardNavigationEnabled =
|
|
72
|
-
const hasFocusedItem =
|
|
73
|
-
const hasZoom =
|
|
66
|
+
const svgWidth = store.use(_useChartDimensions.selectorChartSvgWidth);
|
|
67
|
+
const svgHeight = store.use(_useChartDimensions.selectorChartSvgHeight);
|
|
68
|
+
const propsWidth = store.use(_useChartDimensions.selectorChartPropsWidth);
|
|
69
|
+
const propsHeight = store.use(_useChartDimensions.selectorChartPropsHeight);
|
|
70
|
+
const isKeyboardNavigationEnabled = store.use(_useChartKeyboardNavigation.selectorChartsIsKeyboardNavigationEnabled);
|
|
71
|
+
const hasFocusedItem = store.use(_useChartKeyboardNavigation.selectorChartsHasFocusedItem);
|
|
72
|
+
const hasZoom = store.use(_useChartCartesianAxisRendering.selectorChartHasZoom);
|
|
74
73
|
const svgRef = (0, _useSvgRef.useSvgRef)();
|
|
75
74
|
const handleRef = (0, _useForkRef.default)(svgRef, ref);
|
|
76
75
|
const themeProps = (0, _styles.useThemeProps)({
|
|
@@ -19,7 +19,6 @@ var _NoSsr = _interopRequireDefault(require("@mui/material/NoSsr"));
|
|
|
19
19
|
var _rafThrottle = require("@mui/x-internals/rafThrottle");
|
|
20
20
|
var _utils = require("./utils");
|
|
21
21
|
var _chartsTooltipClasses = require("./chartsTooltipClasses");
|
|
22
|
-
var _useSelector = require("../internals/store/useSelector");
|
|
23
22
|
var _useStore = require("../internals/store/useStore");
|
|
24
23
|
var _useChartInteraction = require("../internals/plugins/featurePlugins/useChartInteraction");
|
|
25
24
|
var _useChartTooltip = require("../internals/plugins/featurePlugins/useChartTooltip");
|
|
@@ -90,11 +89,11 @@ function ChartsTooltipContainer(inProps) {
|
|
|
90
89
|
}));
|
|
91
90
|
const axisSystem = (0, _useAxisSystem.useAxisSystem)();
|
|
92
91
|
const store = (0, _useStore.useStore)();
|
|
93
|
-
const shouldPreventBecauseOfBrush =
|
|
94
|
-
const isOpen =
|
|
95
|
-
const lastInteraction =
|
|
92
|
+
const shouldPreventBecauseOfBrush = store.use(_useChartBrush.selectorBrushShouldPreventTooltip);
|
|
93
|
+
const isOpen = store.use(getIsOpenSelector(trigger, axisSystem, shouldPreventBecauseOfBrush));
|
|
94
|
+
const lastInteraction = store.use(_useChartInteraction.selectorChartsLastInteraction);
|
|
96
95
|
const computedAnchor = lastInteraction === 'keyboard' ? 'node' : anchor;
|
|
97
|
-
const itemPosition =
|
|
96
|
+
const itemPosition = store.use(trigger === 'item' && computedAnchor === 'node' ? _useChartTooltip.selectorChartsTooltipItemPosition : selectorReturnNull, position);
|
|
98
97
|
React.useEffect(() => {
|
|
99
98
|
const svgElement = svgRef.current;
|
|
100
99
|
if (svgElement === null) {
|
|
@@ -8,7 +8,6 @@ exports.useAxisTooltip = useAxisTooltip;
|
|
|
8
8
|
var _useSeries = require("../hooks/useSeries");
|
|
9
9
|
var _useColorProcessor = require("../internals/plugins/corePlugins/useChartSeries/useColorProcessor");
|
|
10
10
|
var _useStore = require("../internals/store/useStore");
|
|
11
|
-
var _useSelector = require("../internals/store/useSelector");
|
|
12
11
|
var _getLabel = require("../internals/getLabel");
|
|
13
12
|
var _isCartesian = require("../internals/isCartesian");
|
|
14
13
|
var _utils = require("./utils");
|
|
@@ -48,9 +47,9 @@ function useAxisTooltip(params = {}) {
|
|
|
48
47
|
const defaultYAxis = (0, _useAxis.useYAxis)();
|
|
49
48
|
const defaultRotationAxis = (0, _useAxis.useRotationAxis)();
|
|
50
49
|
const store = (0, _useStore.useStore)();
|
|
51
|
-
const tooltipXAxes =
|
|
52
|
-
const tooltipYAxes =
|
|
53
|
-
const tooltipRotationAxes =
|
|
50
|
+
const tooltipXAxes = store.use(_useChartCartesianAxis.selectorChartsInteractionTooltipXAxes);
|
|
51
|
+
const tooltipYAxes = store.use(_useChartCartesianAxis.selectorChartsInteractionTooltipYAxes);
|
|
52
|
+
const tooltipRotationAxes = store.use(_useChartPolarInteraction.selectorChartsInteractionTooltipRotationAxes);
|
|
54
53
|
const series = (0, _useSeries.useSeries)();
|
|
55
54
|
const {
|
|
56
55
|
xAxis
|
|
@@ -8,7 +8,6 @@ exports.useInternalItemTooltip = useInternalItemTooltip;
|
|
|
8
8
|
exports.useRadarItemTooltip = exports.useItemTooltip = void 0;
|
|
9
9
|
var _useSeries = require("../hooks/useSeries");
|
|
10
10
|
var _useChartTooltip = require("../internals/plugins/featurePlugins/useChartTooltip");
|
|
11
|
-
var _useSelector = require("../internals/store/useSelector");
|
|
12
11
|
var _useStore = require("../internals/store/useStore");
|
|
13
12
|
var _useAxis = require("../hooks/useAxis");
|
|
14
13
|
var _useZAxis = require("../hooks/useZAxis");
|
|
@@ -16,8 +15,8 @@ var _useChartSeries = require("../internals/plugins/corePlugins/useChartSeries/u
|
|
|
16
15
|
var _isCartesian = require("../internals/isCartesian");
|
|
17
16
|
function useInternalItemTooltip() {
|
|
18
17
|
const store = (0, _useStore.useStore)();
|
|
19
|
-
const identifier =
|
|
20
|
-
const seriesConfig =
|
|
18
|
+
const identifier = store.use(_useChartTooltip.selectorChartsTooltipItem);
|
|
19
|
+
const seriesConfig = store.use(_useChartSeries.selectorChartSeriesConfig);
|
|
21
20
|
const series = (0, _useSeries.useSeries)();
|
|
22
21
|
const {
|
|
23
22
|
xAxis,
|
|
@@ -12,7 +12,6 @@ var _styles = require("@mui/material/styles");
|
|
|
12
12
|
var _createStyled = require("@mui/system/createStyled");
|
|
13
13
|
var _useChartRootRef = require("../hooks/useChartRootRef");
|
|
14
14
|
var _useStore = require("../internals/store/useStore");
|
|
15
|
-
var _useSelector = require("../internals/store/useSelector");
|
|
16
15
|
var _useChartDimensions = require("../internals/plugins/corePlugins/useChartDimensions");
|
|
17
16
|
var _Toolbar = require("../Toolbar");
|
|
18
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -125,8 +124,8 @@ function ChartsWrapper(props) {
|
|
|
125
124
|
} = props;
|
|
126
125
|
const chartRootRef = (0, _useChartRootRef.useChartRootRef)();
|
|
127
126
|
const store = (0, _useStore.useStore)();
|
|
128
|
-
const propsWidth =
|
|
129
|
-
const propsHeight =
|
|
127
|
+
const propsWidth = store.use(_useChartDimensions.selectorChartPropsWidth);
|
|
128
|
+
const propsHeight = store.use(_useChartDimensions.selectorChartPropsHeight);
|
|
130
129
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, {
|
|
131
130
|
ref: chartRootRef,
|
|
132
131
|
ownerState: props,
|
|
@@ -12,7 +12,6 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _useStore = require("../internals/store/useStore");
|
|
15
|
-
var _useSelector = require("../internals/store/useSelector");
|
|
16
15
|
var _LineHighlightElement = require("./LineHighlightElement");
|
|
17
16
|
var _useScale = require("../hooks/useScale");
|
|
18
17
|
var _constants = require("../constants");
|
|
@@ -52,7 +51,7 @@ function LineHighlightPlot(props) {
|
|
|
52
51
|
instance
|
|
53
52
|
} = (0, _ChartProvider.useChartContext)();
|
|
54
53
|
const store = (0, _useStore.useStore)();
|
|
55
|
-
const highlightedIndexes =
|
|
54
|
+
const highlightedIndexes = store.use(_useChartCartesianAxis.selectorChartsHighlightXAxisIndex);
|
|
56
55
|
if (highlightedIndexes.length === 0) {
|
|
57
56
|
return null;
|
|
58
57
|
}
|
package/LineChart/MarkPlot.js
CHANGED
|
@@ -17,7 +17,6 @@ var _MarkElement = require("./MarkElement");
|
|
|
17
17
|
var _hooks = require("../hooks");
|
|
18
18
|
var _useInternalIsZoomInteracting = require("../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting");
|
|
19
19
|
var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
|
|
20
|
-
var _useSelector = require("../internals/store/useSelector");
|
|
21
20
|
var _ChartProvider = require("../context/ChartProvider");
|
|
22
21
|
var _useMarkPlotData = require("./useMarkPlotData");
|
|
23
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -55,7 +54,7 @@ function MarkPlot(props) {
|
|
|
55
54
|
isFaded,
|
|
56
55
|
isHighlighted
|
|
57
56
|
} = (0, _hooks.useItemHighlightedGetter)();
|
|
58
|
-
const xAxisHighlightIndexes =
|
|
57
|
+
const xAxisHighlightIndexes = store.use(_useChartCartesianAxis.selectorChartsHighlightXAxisIndex);
|
|
59
58
|
const highlightedItems = React.useMemo(() => {
|
|
60
59
|
const rep = {};
|
|
61
60
|
for (const {
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.FocusedPieArc = FocusedPieArc;
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _styles = require("@mui/material/styles");
|
|
13
|
+
var _useFocusedItem = require("../hooks/useFocusedItem");
|
|
14
|
+
var _usePieSeries = require("../hooks/usePieSeries");
|
|
15
|
+
var _PieArc = require("./PieArc");
|
|
16
|
+
var _useItemHighlighted = require("../hooks/useItemHighlighted");
|
|
17
|
+
var _getModifiedArcProperties = require("./dataTransform/getModifiedArcProperties");
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
+
function FocusedPieArc(props) {
|
|
20
|
+
const theme = (0, _styles.useTheme)();
|
|
21
|
+
const focusedItem = (0, _useFocusedItem.useFocusedItem)();
|
|
22
|
+
const pieSeriesLayout = (0, _usePieSeries.usePieSeriesLayout)();
|
|
23
|
+
const {
|
|
24
|
+
isHighlighted,
|
|
25
|
+
isFaded
|
|
26
|
+
} = (0, _useItemHighlighted.useItemHighlighted)(focusedItem);
|
|
27
|
+
const pieSeries = (0, _usePieSeries.usePieSeriesContext)();
|
|
28
|
+
if (focusedItem === null || focusedItem.seriesType !== 'pie' || !pieSeries) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
const series = pieSeries?.series[focusedItem.seriesId];
|
|
32
|
+
const {
|
|
33
|
+
center,
|
|
34
|
+
radius
|
|
35
|
+
} = pieSeriesLayout[focusedItem.seriesId];
|
|
36
|
+
if (!series || !center || !radius) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
const item = series.data[focusedItem.dataIndex];
|
|
40
|
+
const arcSizes = (0, _getModifiedArcProperties.getModifiedArcProperties)(series, pieSeriesLayout[focusedItem.seriesId], isHighlighted, isFaded);
|
|
41
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PieArc.PieArc, (0, _extends2.default)({
|
|
42
|
+
transform: `translate(${pieSeriesLayout[series.id].center.x}, ${pieSeriesLayout[series.id].center.y})`,
|
|
43
|
+
startAngle: item.startAngle,
|
|
44
|
+
endAngle: item.endAngle,
|
|
45
|
+
color: "transparent",
|
|
46
|
+
pointerEvents: "none",
|
|
47
|
+
skipInteraction: true,
|
|
48
|
+
skipAnimation: true,
|
|
49
|
+
stroke: (theme.vars ?? theme).palette.text.primary,
|
|
50
|
+
id: series.id,
|
|
51
|
+
className: _PieArc.pieArcClasses.focusIndicator,
|
|
52
|
+
dataIndex: focusedItem.dataIndex,
|
|
53
|
+
isFaded: false,
|
|
54
|
+
isHighlighted: false,
|
|
55
|
+
isFocused: false,
|
|
56
|
+
strokeWidth: 3
|
|
57
|
+
}, arcSizes, props));
|
|
58
|
+
}
|
package/PieChart/PieArcPlot.js
CHANGED
|
@@ -11,8 +11,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
-
var _styles = require("@mui/material/styles");
|
|
15
|
-
var _useFocusedItem = require("../hooks/useFocusedItem");
|
|
16
14
|
var _PieArc = require("./PieArc");
|
|
17
15
|
var _useTransformData = require("./dataTransform/useTransformData");
|
|
18
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -35,7 +33,6 @@ function PieArcPlot(props) {
|
|
|
35
33
|
skipAnimation
|
|
36
34
|
} = props,
|
|
37
35
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
38
|
-
const theme = (0, _styles.useTheme)();
|
|
39
36
|
const transformedData = (0, _useTransformData.useTransformData)({
|
|
40
37
|
innerRadius,
|
|
41
38
|
outerRadius,
|
|
@@ -46,18 +43,12 @@ function PieArcPlot(props) {
|
|
|
46
43
|
faded,
|
|
47
44
|
data
|
|
48
45
|
});
|
|
49
|
-
const {
|
|
50
|
-
dataIndex,
|
|
51
|
-
seriesId,
|
|
52
|
-
seriesType
|
|
53
|
-
} = (0, _useFocusedItem.useFocusedItem)() ?? {};
|
|
54
|
-
const focusedItem = dataIndex !== undefined && seriesId === id && seriesType === 'pie' ? transformedData[dataIndex] : null;
|
|
55
46
|
if (data.length === 0) {
|
|
56
47
|
return null;
|
|
57
48
|
}
|
|
58
49
|
const Arc = slots?.pieArc ?? _PieArc.PieArc;
|
|
59
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
60
|
-
children:
|
|
50
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("g", (0, _extends2.default)({}, other, {
|
|
51
|
+
children: transformedData.map((item, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Arc, (0, _extends2.default)({
|
|
61
52
|
startAngle: item.startAngle,
|
|
62
53
|
endAngle: item.endAngle,
|
|
63
54
|
paddingAngle: item.paddingAngle,
|
|
@@ -78,26 +69,7 @@ function PieArcPlot(props) {
|
|
|
78
69
|
dataIndex: index
|
|
79
70
|
}, item);
|
|
80
71
|
})
|
|
81
|
-
}, slotProps?.pieArc), item.dataIndex))
|
|
82
|
-
startAngle: focusedItem.startAngle,
|
|
83
|
-
endAngle: focusedItem.endAngle,
|
|
84
|
-
paddingAngle: focusedItem.paddingAngle,
|
|
85
|
-
innerRadius: focusedItem.innerRadius,
|
|
86
|
-
color: "transparent",
|
|
87
|
-
pointerEvents: "none",
|
|
88
|
-
skipInteraction: true,
|
|
89
|
-
outerRadius: focusedItem.outerRadius,
|
|
90
|
-
cornerRadius: focusedItem.cornerRadius,
|
|
91
|
-
skipAnimation: true,
|
|
92
|
-
stroke: (theme.vars ?? theme).palette.text.primary,
|
|
93
|
-
id: id,
|
|
94
|
-
className: _PieArc.pieArcClasses.focusIndicator,
|
|
95
|
-
dataIndex: focusedItem.dataIndex,
|
|
96
|
-
isFaded: false,
|
|
97
|
-
isHighlighted: false,
|
|
98
|
-
isFocused: false,
|
|
99
|
-
strokeWidth: 3
|
|
100
|
-
})]
|
|
72
|
+
}, slotProps?.pieArc), item.dataIndex))
|
|
101
73
|
}));
|
|
102
74
|
}
|
|
103
75
|
process.env.NODE_ENV !== "production" ? PieArcPlot.propTypes = {
|
package/PieChart/PieChart.js
CHANGED
|
@@ -23,6 +23,7 @@ var _useChartContainerProps = require("../ChartContainer/useChartContainerProps"
|
|
|
23
23
|
var _ChartsWrapper = require("../ChartsWrapper");
|
|
24
24
|
var _PieChart2 = require("./PieChart.plugins");
|
|
25
25
|
var _defaultizeMargin = require("../internals/defaultizeMargin");
|
|
26
|
+
var _FocusedPieArc = require("./FocusedPieArc");
|
|
26
27
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
28
|
const _excluded = ["series", "width", "height", "margin", "colors", "sx", "skipAnimation", "hideLegend", "children", "slots", "slotProps", "onItemClick", "loading", "highlightedItem", "onHighlightChange", "className", "showToolbar"];
|
|
28
29
|
/**
|
|
@@ -95,7 +96,7 @@ const PieChart = exports.PieChart = /*#__PURE__*/React.forwardRef(function PieCh
|
|
|
95
96
|
slots: slots,
|
|
96
97
|
slotProps: slotProps,
|
|
97
98
|
onItemClick: onItemClick
|
|
98
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, {
|
|
99
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FocusedPieArc.FocusedPieArc, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, {
|
|
99
100
|
loading: loading,
|
|
100
101
|
slots: slots,
|
|
101
102
|
slotProps: slotProps
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DefaultizedPieSeriesType, PieSeriesLayout } from "../../models/seriesType/pie.js";
|
|
2
|
+
/**
|
|
3
|
+
* Function that returns arc properties after applying transformation from highlight/fade states.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getModifiedArcProperties(seriesDef: Pick<DefaultizedPieSeriesType, 'cornerRadius' | 'paddingAngle' | 'id' | 'highlighted' | 'faded' | 'data'>, seriesLayout: Pick<PieSeriesLayout, 'radius'>, isHighlighted: boolean, isFaded: boolean): {
|
|
6
|
+
paddingAngle: number;
|
|
7
|
+
innerRadius: number;
|
|
8
|
+
outerRadius: number;
|
|
9
|
+
cornerRadius: number;
|
|
10
|
+
arcLabelRadius: number;
|
|
11
|
+
};
|