@mui/x-charts 9.1.0 → 9.2.0
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/CHANGELOG.md +103 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.d.mts +1 -1
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.d.ts +1 -1
- package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.js +31 -14
- package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.mjs +32 -15
- package/ChartsRadiusAxis/ChartsRadiusAxis.d.mts +1 -47
- package/ChartsRadiusAxis/ChartsRadiusAxis.d.ts +1 -47
- package/ChartsRadiusAxis/ChartsRadiusAxis.js +20 -16
- package/ChartsRadiusAxis/ChartsRadiusAxis.mjs +21 -15
- package/ChartsRotationAxis/ChartsRotationAxis.d.mts +1 -47
- package/ChartsRotationAxis/ChartsRotationAxis.d.ts +1 -47
- package/ChartsRotationAxis/ChartsRotationAxis.js +16 -19
- package/ChartsRotationAxis/ChartsRotationAxis.mjs +17 -18
- package/ChartsTooltip/useAxesTooltip.d.mts +1 -1
- package/ChartsTooltip/useAxesTooltip.d.ts +1 -1
- package/ChartsTooltip/useAxesTooltip.js +11 -2
- package/ChartsTooltip/useAxesTooltip.mjs +12 -3
- package/RadarChart/RadarGrid/CircularRadarStripes.js +2 -3
- package/RadarChart/RadarGrid/CircularRadarStripes.mjs +2 -3
- package/RadarChart/RadarSeriesPlot/useRadarRotationIndex.js +1 -1
- package/RadarChart/RadarSeriesPlot/useRadarRotationIndex.mjs +2 -2
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/getRingPath.d.mts +16 -0
- package/internals/getRingPath.d.ts +16 -0
- package/internals/getRingPath.js +39 -0
- package/internals/getRingPath.mjs +33 -0
- package/internals/index.d.mts +4 -2
- package/internals/index.d.ts +4 -2
- package/internals/index.js +22 -3
- package/internals/index.mjs +3 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.d.mts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.mts +1 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +8 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.mjs +1 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.d.mts +6 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.d.ts +6 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.js +48 -36
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.mjs +47 -36
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +74 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +74 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.mts +152 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +152 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.mts +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.mts +2 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.d.mts +6 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.d.ts +6 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.js +36 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.mjs +34 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.mjs +2 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.mts +22 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +22 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +73 -12
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.mjs +74 -12
- package/models/axis.d.mts +55 -7
- package/models/axis.d.ts +55 -7
- package/package.json +4 -4
|
@@ -39,7 +39,157 @@ export declare const selectorChartsHighlightYAxisValue: (args_0: import("../../c
|
|
|
39
39
|
}[] | AxisHighlightWithValue[];
|
|
40
40
|
export declare const selectorChartsHighlightXAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.mjs").UseChartCartesianAxisState> & {
|
|
41
41
|
cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
|
|
42
|
-
}) => import("../../../index.mjs").
|
|
42
|
+
}) => ((Omit<Omit<import("../../../index.mjs").DefaultedAxis<keyof import("../../../index.mjs").AxisScaleConfig, any, ChartsAxisProps>, "scaleType">, "offset"> & Required<Pick<Omit<import("../../../index.mjs").DefaultedAxis<keyof import("../../../index.mjs").AxisScaleConfig, any, ChartsAxisProps>, "scaleType">, "offset">> & (({
|
|
43
|
+
scaleType: "linear";
|
|
44
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleLinear<number, number>;
|
|
45
|
+
colorMap?: import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
|
|
46
|
+
} | {
|
|
47
|
+
scaleType: "time";
|
|
48
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleTime<number, number>;
|
|
49
|
+
colorMap?: import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
|
|
50
|
+
} | {
|
|
51
|
+
scaleType: "log";
|
|
52
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleLogarithmic<number, number>;
|
|
53
|
+
colorMap?: import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
|
|
54
|
+
} | ({
|
|
55
|
+
scaleType: "band";
|
|
56
|
+
ordinalTimeTicks?: import("../../../../index.mjs").OrdinalTimeTicks;
|
|
57
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleBand<{
|
|
58
|
+
toString(): string;
|
|
59
|
+
}>;
|
|
60
|
+
categoryGapRatio: number;
|
|
61
|
+
barGapRatio: number;
|
|
62
|
+
colorMap?: import("../../../../models/colorMapping.mjs").OrdinalColorConfig | import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
|
|
63
|
+
} & import("../../../index.mjs").AxisGroups & Pick<import("../../../../hooks/useTicks.mjs").TickParams, "tickPlacement" | "tickLabelPlacement">) | ({
|
|
64
|
+
scaleType: "point";
|
|
65
|
+
ordinalTimeTicks?: import("../../../../index.mjs").OrdinalTimeTicks;
|
|
66
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScalePoint<{
|
|
67
|
+
toString(): string;
|
|
68
|
+
}>;
|
|
69
|
+
colorMap?: import("../../../../models/colorMapping.mjs").OrdinalColorConfig | import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
|
|
70
|
+
} & import("../../../index.mjs").AxisGroups) | {
|
|
71
|
+
scaleType: "symlog";
|
|
72
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleSymLog<number, number>;
|
|
73
|
+
colorMap?: import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
|
|
74
|
+
constant?: number;
|
|
75
|
+
} | {
|
|
76
|
+
scaleType: "pow";
|
|
77
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScalePower<number, number>;
|
|
78
|
+
colorMap?: import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
|
|
79
|
+
} | {
|
|
80
|
+
scaleType: "sqrt";
|
|
81
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScalePower<number, number>;
|
|
82
|
+
colorMap?: import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
|
|
83
|
+
} | {
|
|
84
|
+
scaleType: "utc";
|
|
85
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleTime<number, number>;
|
|
86
|
+
colorMap?: import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
|
|
87
|
+
}) & ({
|
|
88
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
89
|
+
} | {
|
|
90
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string | null>;
|
|
91
|
+
} | {
|
|
92
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
93
|
+
} | {
|
|
94
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleOrdinal<string | number | Date, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleOrdinal<number, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string | null>;
|
|
95
|
+
} | {
|
|
96
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleOrdinal<string | number | Date, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleOrdinal<number, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string | null>;
|
|
97
|
+
} | {
|
|
98
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
99
|
+
} | {
|
|
100
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
101
|
+
} | {
|
|
102
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
103
|
+
} | {
|
|
104
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string | null>;
|
|
105
|
+
}))) & {
|
|
106
|
+
tickNumber: number;
|
|
107
|
+
triggerTooltip?: boolean;
|
|
108
|
+
isFullCircle?: boolean;
|
|
109
|
+
} & ChartsAxisProps & {
|
|
110
|
+
position?: "none" | "bottom" | "left" | "right" | "top" | undefined;
|
|
111
|
+
height?: number | "auto" | undefined;
|
|
112
|
+
width?: number | "auto" | undefined;
|
|
113
|
+
} & {
|
|
114
|
+
height: number;
|
|
115
|
+
} & {
|
|
116
|
+
width: number;
|
|
117
|
+
})[];
|
|
43
118
|
export declare const selectorChartsHighlightYAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.mjs").UseChartCartesianAxisState> & {
|
|
44
119
|
cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
|
|
45
|
-
}) => import("../../../index.mjs").
|
|
120
|
+
}) => ((Omit<Omit<import("../../../index.mjs").DefaultedAxis<keyof import("../../../index.mjs").AxisScaleConfig, any, ChartsAxisProps>, "scaleType">, "offset"> & Required<Pick<Omit<import("../../../index.mjs").DefaultedAxis<keyof import("../../../index.mjs").AxisScaleConfig, any, ChartsAxisProps>, "scaleType">, "offset">> & (({
|
|
121
|
+
scaleType: "linear";
|
|
122
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleLinear<number, number>;
|
|
123
|
+
colorMap?: import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
|
|
124
|
+
} | {
|
|
125
|
+
scaleType: "time";
|
|
126
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleTime<number, number>;
|
|
127
|
+
colorMap?: import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
|
|
128
|
+
} | {
|
|
129
|
+
scaleType: "log";
|
|
130
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleLogarithmic<number, number>;
|
|
131
|
+
colorMap?: import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
|
|
132
|
+
} | ({
|
|
133
|
+
scaleType: "band";
|
|
134
|
+
ordinalTimeTicks?: import("../../../../index.mjs").OrdinalTimeTicks;
|
|
135
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleBand<{
|
|
136
|
+
toString(): string;
|
|
137
|
+
}>;
|
|
138
|
+
categoryGapRatio: number;
|
|
139
|
+
barGapRatio: number;
|
|
140
|
+
colorMap?: import("../../../../models/colorMapping.mjs").OrdinalColorConfig | import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
|
|
141
|
+
} & import("../../../index.mjs").AxisGroups & Pick<import("../../../../hooks/useTicks.mjs").TickParams, "tickPlacement" | "tickLabelPlacement">) | ({
|
|
142
|
+
scaleType: "point";
|
|
143
|
+
ordinalTimeTicks?: import("../../../../index.mjs").OrdinalTimeTicks;
|
|
144
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScalePoint<{
|
|
145
|
+
toString(): string;
|
|
146
|
+
}>;
|
|
147
|
+
colorMap?: import("../../../../models/colorMapping.mjs").OrdinalColorConfig | import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
|
|
148
|
+
} & import("../../../index.mjs").AxisGroups) | {
|
|
149
|
+
scaleType: "symlog";
|
|
150
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleSymLog<number, number>;
|
|
151
|
+
colorMap?: import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
|
|
152
|
+
constant?: number;
|
|
153
|
+
} | {
|
|
154
|
+
scaleType: "pow";
|
|
155
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScalePower<number, number>;
|
|
156
|
+
colorMap?: import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
|
|
157
|
+
} | {
|
|
158
|
+
scaleType: "sqrt";
|
|
159
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScalePower<number, number>;
|
|
160
|
+
colorMap?: import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
|
|
161
|
+
} | {
|
|
162
|
+
scaleType: "utc";
|
|
163
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleTime<number, number>;
|
|
164
|
+
colorMap?: import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
|
|
165
|
+
}) & ({
|
|
166
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
167
|
+
} | {
|
|
168
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string | null>;
|
|
169
|
+
} | {
|
|
170
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
171
|
+
} | {
|
|
172
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleOrdinal<string | number | Date, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleOrdinal<number, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string | null>;
|
|
173
|
+
} | {
|
|
174
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleOrdinal<string | number | Date, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleOrdinal<number, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string | null>;
|
|
175
|
+
} | {
|
|
176
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
177
|
+
} | {
|
|
178
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
179
|
+
} | {
|
|
180
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
181
|
+
} | {
|
|
182
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string | null>;
|
|
183
|
+
}))) & {
|
|
184
|
+
tickNumber: number;
|
|
185
|
+
triggerTooltip?: boolean;
|
|
186
|
+
isFullCircle?: boolean;
|
|
187
|
+
} & ChartsAxisProps & {
|
|
188
|
+
position?: "none" | "bottom" | "left" | "right" | "top" | undefined;
|
|
189
|
+
height?: number | "auto" | undefined;
|
|
190
|
+
width?: number | "auto" | undefined;
|
|
191
|
+
} & {
|
|
192
|
+
height: number;
|
|
193
|
+
} & {
|
|
194
|
+
width: number;
|
|
195
|
+
})[];
|
|
@@ -39,7 +39,157 @@ export declare const selectorChartsHighlightYAxisValue: (args_0: import("../../c
|
|
|
39
39
|
}[] | AxisHighlightWithValue[];
|
|
40
40
|
export declare const selectorChartsHighlightXAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
41
41
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
42
|
-
}) => import("../../../index.js").
|
|
42
|
+
}) => ((Omit<Omit<import("../../../index.js").DefaultedAxis<keyof import("../../../index.js").AxisScaleConfig, any, ChartsAxisProps>, "scaleType">, "offset"> & Required<Pick<Omit<import("../../../index.js").DefaultedAxis<keyof import("../../../index.js").AxisScaleConfig, any, ChartsAxisProps>, "scaleType">, "offset">> & (({
|
|
43
|
+
scaleType: "linear";
|
|
44
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleLinear<number, number>;
|
|
45
|
+
colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
|
|
46
|
+
} | {
|
|
47
|
+
scaleType: "time";
|
|
48
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleTime<number, number>;
|
|
49
|
+
colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
|
|
50
|
+
} | {
|
|
51
|
+
scaleType: "log";
|
|
52
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleLogarithmic<number, number>;
|
|
53
|
+
colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
|
|
54
|
+
} | ({
|
|
55
|
+
scaleType: "band";
|
|
56
|
+
ordinalTimeTicks?: import("../../../../index.js").OrdinalTimeTicks;
|
|
57
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleBand<{
|
|
58
|
+
toString(): string;
|
|
59
|
+
}>;
|
|
60
|
+
categoryGapRatio: number;
|
|
61
|
+
barGapRatio: number;
|
|
62
|
+
colorMap?: import("../../../../models/colorMapping.js").OrdinalColorConfig | import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
|
|
63
|
+
} & import("../../../index.js").AxisGroups & Pick<import("../../../../hooks/useTicks.js").TickParams, "tickPlacement" | "tickLabelPlacement">) | ({
|
|
64
|
+
scaleType: "point";
|
|
65
|
+
ordinalTimeTicks?: import("../../../../index.js").OrdinalTimeTicks;
|
|
66
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScalePoint<{
|
|
67
|
+
toString(): string;
|
|
68
|
+
}>;
|
|
69
|
+
colorMap?: import("../../../../models/colorMapping.js").OrdinalColorConfig | import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
|
|
70
|
+
} & import("../../../index.js").AxisGroups) | {
|
|
71
|
+
scaleType: "symlog";
|
|
72
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleSymLog<number, number>;
|
|
73
|
+
colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
|
|
74
|
+
constant?: number;
|
|
75
|
+
} | {
|
|
76
|
+
scaleType: "pow";
|
|
77
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScalePower<number, number>;
|
|
78
|
+
colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
|
|
79
|
+
} | {
|
|
80
|
+
scaleType: "sqrt";
|
|
81
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScalePower<number, number>;
|
|
82
|
+
colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
|
|
83
|
+
} | {
|
|
84
|
+
scaleType: "utc";
|
|
85
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleTime<number, number>;
|
|
86
|
+
colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
|
|
87
|
+
}) & ({
|
|
88
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
89
|
+
} | {
|
|
90
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string | null>;
|
|
91
|
+
} | {
|
|
92
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
93
|
+
} | {
|
|
94
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleOrdinal<string | number | Date, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleOrdinal<number, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string | null>;
|
|
95
|
+
} | {
|
|
96
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleOrdinal<string | number | Date, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleOrdinal<number, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string | null>;
|
|
97
|
+
} | {
|
|
98
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
99
|
+
} | {
|
|
100
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
101
|
+
} | {
|
|
102
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
103
|
+
} | {
|
|
104
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string | null>;
|
|
105
|
+
}))) & {
|
|
106
|
+
tickNumber: number;
|
|
107
|
+
triggerTooltip?: boolean;
|
|
108
|
+
isFullCircle?: boolean;
|
|
109
|
+
} & ChartsAxisProps & {
|
|
110
|
+
position?: "none" | "bottom" | "left" | "right" | "top" | undefined;
|
|
111
|
+
height?: number | "auto" | undefined;
|
|
112
|
+
width?: number | "auto" | undefined;
|
|
113
|
+
} & {
|
|
114
|
+
height: number;
|
|
115
|
+
} & {
|
|
116
|
+
width: number;
|
|
117
|
+
})[];
|
|
43
118
|
export declare const selectorChartsHighlightYAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
44
119
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
45
|
-
}) => import("../../../index.js").
|
|
120
|
+
}) => ((Omit<Omit<import("../../../index.js").DefaultedAxis<keyof import("../../../index.js").AxisScaleConfig, any, ChartsAxisProps>, "scaleType">, "offset"> & Required<Pick<Omit<import("../../../index.js").DefaultedAxis<keyof import("../../../index.js").AxisScaleConfig, any, ChartsAxisProps>, "scaleType">, "offset">> & (({
|
|
121
|
+
scaleType: "linear";
|
|
122
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleLinear<number, number>;
|
|
123
|
+
colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
|
|
124
|
+
} | {
|
|
125
|
+
scaleType: "time";
|
|
126
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleTime<number, number>;
|
|
127
|
+
colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
|
|
128
|
+
} | {
|
|
129
|
+
scaleType: "log";
|
|
130
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleLogarithmic<number, number>;
|
|
131
|
+
colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
|
|
132
|
+
} | ({
|
|
133
|
+
scaleType: "band";
|
|
134
|
+
ordinalTimeTicks?: import("../../../../index.js").OrdinalTimeTicks;
|
|
135
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleBand<{
|
|
136
|
+
toString(): string;
|
|
137
|
+
}>;
|
|
138
|
+
categoryGapRatio: number;
|
|
139
|
+
barGapRatio: number;
|
|
140
|
+
colorMap?: import("../../../../models/colorMapping.js").OrdinalColorConfig | import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
|
|
141
|
+
} & import("../../../index.js").AxisGroups & Pick<import("../../../../hooks/useTicks.js").TickParams, "tickPlacement" | "tickLabelPlacement">) | ({
|
|
142
|
+
scaleType: "point";
|
|
143
|
+
ordinalTimeTicks?: import("../../../../index.js").OrdinalTimeTicks;
|
|
144
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScalePoint<{
|
|
145
|
+
toString(): string;
|
|
146
|
+
}>;
|
|
147
|
+
colorMap?: import("../../../../models/colorMapping.js").OrdinalColorConfig | import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
|
|
148
|
+
} & import("../../../index.js").AxisGroups) | {
|
|
149
|
+
scaleType: "symlog";
|
|
150
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleSymLog<number, number>;
|
|
151
|
+
colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
|
|
152
|
+
constant?: number;
|
|
153
|
+
} | {
|
|
154
|
+
scaleType: "pow";
|
|
155
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScalePower<number, number>;
|
|
156
|
+
colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
|
|
157
|
+
} | {
|
|
158
|
+
scaleType: "sqrt";
|
|
159
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScalePower<number, number>;
|
|
160
|
+
colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
|
|
161
|
+
} | {
|
|
162
|
+
scaleType: "utc";
|
|
163
|
+
scale: import("@mui/x-charts-vendor/d3-scale").ScaleTime<number, number>;
|
|
164
|
+
colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
|
|
165
|
+
}) & ({
|
|
166
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
167
|
+
} | {
|
|
168
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string | null>;
|
|
169
|
+
} | {
|
|
170
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
171
|
+
} | {
|
|
172
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleOrdinal<string | number | Date, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleOrdinal<number, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string | null>;
|
|
173
|
+
} | {
|
|
174
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleOrdinal<string | number | Date, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleOrdinal<number, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string | null>;
|
|
175
|
+
} | {
|
|
176
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
177
|
+
} | {
|
|
178
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
179
|
+
} | {
|
|
180
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number, string | null>;
|
|
181
|
+
} | {
|
|
182
|
+
colorScale?: import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string | null>;
|
|
183
|
+
}))) & {
|
|
184
|
+
tickNumber: number;
|
|
185
|
+
triggerTooltip?: boolean;
|
|
186
|
+
isFullCircle?: boolean;
|
|
187
|
+
} & ChartsAxisProps & {
|
|
188
|
+
position?: "none" | "bottom" | "left" | "right" | "top" | undefined;
|
|
189
|
+
height?: number | "auto" | undefined;
|
|
190
|
+
width?: number | "auto" | undefined;
|
|
191
|
+
} & {
|
|
192
|
+
height: number;
|
|
193
|
+
} & {
|
|
194
|
+
width: number;
|
|
195
|
+
})[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ChartsCartesianAxisProps, AxisId } from "../../../../models/axis.mjs";
|
|
2
2
|
import { type ComputeResult } from "./computeAxisValue.mjs";
|
|
3
|
-
export declare const selectChartsInteractionAxisIndex: (value: number | null, axes: ComputeResult<
|
|
3
|
+
export declare const selectChartsInteractionAxisIndex: (value: number | null, axes: ComputeResult<ChartsCartesianAxisProps>, id: AxisId | undefined) => number | null;
|
|
4
4
|
export declare const selectorChartsInteractionXAxisIndex: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.mjs").UseChartInteractionState> & {
|
|
5
5
|
cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
|
|
6
6
|
}, id: AxisId | undefined) => number | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ChartsCartesianAxisProps, AxisId } from "../../../../models/axis.js";
|
|
2
2
|
import { type ComputeResult } from "./computeAxisValue.js";
|
|
3
|
-
export declare const selectChartsInteractionAxisIndex: (value: number | null, axes: ComputeResult<
|
|
3
|
+
export declare const selectChartsInteractionAxisIndex: (value: number | null, axes: ComputeResult<ChartsCartesianAxisProps>, id: AxisId | undefined) => number | null;
|
|
4
4
|
export declare const selectorChartsInteractionXAxisIndex: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.js").UseChartInteractionState> & {
|
|
5
5
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
6
6
|
}, id: AxisId | undefined) => number | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChartsRadialAxisProps, ScaleName, PolarAxisConfig } from "../../../../models/axis.mjs";
|
|
2
2
|
import { type PolarChartSeriesType } from "../../../../models/seriesType/config.mjs";
|
|
3
3
|
import { type ChartSeriesConfig } from "../../corePlugins/useChartSeriesConfig/index.mjs";
|
|
4
4
|
import { type ProcessedSeries } from "../../corePlugins/useChartSeries/useChartSeries.types.mjs";
|
|
5
|
-
export declare const getAxisExtremum: <SeriesType extends PolarChartSeriesType>(axis: PolarAxisConfig<ScaleName, any,
|
|
5
|
+
export declare const getAxisExtremum: <SeriesType extends PolarChartSeriesType>(axis: PolarAxisConfig<ScaleName, any, ChartsRadialAxisProps>, axisDirection: "rotation" | "radius", seriesConfig: ChartSeriesConfig<SeriesType>, axisIndex: number, formattedSeries: ProcessedSeries<SeriesType>) => number[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChartsRadialAxisProps, ScaleName, PolarAxisConfig } from "../../../../models/axis.js";
|
|
2
2
|
import { type PolarChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
3
3
|
import { type ChartSeriesConfig } from "../../corePlugins/useChartSeriesConfig/index.js";
|
|
4
4
|
import { type ProcessedSeries } from "../../corePlugins/useChartSeries/useChartSeries.types.js";
|
|
5
|
-
export declare const getAxisExtremum: <SeriesType extends PolarChartSeriesType>(axis: PolarAxisConfig<ScaleName, any,
|
|
5
|
+
export declare const getAxisExtremum: <SeriesType extends PolarChartSeriesType>(axis: PolarAxisConfig<ScaleName, any, ChartsRadialAxisProps>, axisDirection: "rotation" | "radius", seriesConfig: ChartSeriesConfig<SeriesType>, axisIndex: number, formattedSeries: ProcessedSeries<SeriesType>) => number[];
|
|
@@ -3,4 +3,9 @@ import type { ChartsRadiusAxisProps, ChartsRotationAxisProps, ComputedAxis, Scal
|
|
|
3
3
|
* For a pointer coordinate, this function returns the value and dataIndex associated.
|
|
4
4
|
* Returns `-1` if the coordinate does not match a value.
|
|
5
5
|
*/
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function getRotationAxisIndex(axisConfig: ComputedAxis<ScaleName, any, ChartsRotationAxisProps>, pointerValue: number): number;
|
|
7
|
+
/**
|
|
8
|
+
* For a pointer coordinate, this function returns the value and dataIndex associated.
|
|
9
|
+
* Returns `-1` if the coordinate does not match a value.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getRadiusAxisIndex(axisConfig: ComputedAxis<ScaleName, any, ChartsRadiusAxisProps>, pointerValue: number): number;
|
|
@@ -3,4 +3,9 @@ import type { ChartsRadiusAxisProps, ChartsRotationAxisProps, ComputedAxis, Scal
|
|
|
3
3
|
* For a pointer coordinate, this function returns the value and dataIndex associated.
|
|
4
4
|
* Returns `-1` if the coordinate does not match a value.
|
|
5
5
|
*/
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function getRotationAxisIndex(axisConfig: ComputedAxis<ScaleName, any, ChartsRotationAxisProps>, pointerValue: number): number;
|
|
7
|
+
/**
|
|
8
|
+
* For a pointer coordinate, this function returns the value and dataIndex associated.
|
|
9
|
+
* Returns `-1` if the coordinate does not match a value.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getRadiusAxisIndex(axisConfig: ComputedAxis<ScaleName, any, ChartsRadiusAxisProps>, pointerValue: number): number;
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getRadiusAxisIndex = getRadiusAxisIndex;
|
|
7
|
+
exports.getRotationAxisIndex = getRotationAxisIndex;
|
|
7
8
|
var _scaleGuards = require("../../../scaleGuards");
|
|
8
9
|
var _getAsNumber = require("../../../getAsNumber");
|
|
9
10
|
var _findClosestIndex = require("../../../findClosestIndex");
|
|
@@ -12,7 +13,7 @@ var _clampAngle = require("../../../clampAngle");
|
|
|
12
13
|
* For a pointer coordinate, this function returns the value and dataIndex associated.
|
|
13
14
|
* Returns `-1` if the coordinate does not match a value.
|
|
14
15
|
*/
|
|
15
|
-
function
|
|
16
|
+
function getRotationAxisIndex(axisConfig, pointerValue) {
|
|
16
17
|
const {
|
|
17
18
|
scale,
|
|
18
19
|
data: axisData,
|
|
@@ -51,4 +52,37 @@ function getAxisIndex(axisConfig, pointerValue) {
|
|
|
51
52
|
return -1;
|
|
52
53
|
}
|
|
53
54
|
return reverse ? axisData.length - 1 - dataIndex : dataIndex;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* For a pointer coordinate, this function returns the value and dataIndex associated.
|
|
59
|
+
* Returns `-1` if the coordinate does not match a value.
|
|
60
|
+
*/
|
|
61
|
+
function getRadiusAxisIndex(axisConfig, pointerValue) {
|
|
62
|
+
const {
|
|
63
|
+
scale,
|
|
64
|
+
data: axisData,
|
|
65
|
+
reverse
|
|
66
|
+
} = axisConfig;
|
|
67
|
+
if (!(0, _scaleGuards.isOrdinalScale)(scale)) {
|
|
68
|
+
if (axisData === undefined) {
|
|
69
|
+
return -1;
|
|
70
|
+
}
|
|
71
|
+
const valueAsNumber = (0, _getAsNumber.getAsNumber)(scale.invert(pointerValue));
|
|
72
|
+
return (0, _findClosestIndex.findClosestIndex)(axisData, valueAsNumber);
|
|
73
|
+
}
|
|
74
|
+
if (!axisData) {
|
|
75
|
+
return -1;
|
|
76
|
+
}
|
|
77
|
+
let dataIndex;
|
|
78
|
+
const distFromStart = pointerValue - Math.min(...scale.range());
|
|
79
|
+
if (scale.bandwidth() === 0) {
|
|
80
|
+
dataIndex = Math.floor((distFromStart + scale.step() / 2) / scale.step());
|
|
81
|
+
} else {
|
|
82
|
+
dataIndex = Math.floor(distFromStart / scale.step());
|
|
83
|
+
}
|
|
84
|
+
if (dataIndex < 0 || dataIndex >= axisData.length) {
|
|
85
|
+
return -1;
|
|
86
|
+
}
|
|
87
|
+
return reverse ? axisData.length - 1 - dataIndex : dataIndex;
|
|
54
88
|
}
|
|
@@ -7,7 +7,7 @@ import { clampAngleRad } from "../../../clampAngle.mjs";
|
|
|
7
7
|
* For a pointer coordinate, this function returns the value and dataIndex associated.
|
|
8
8
|
* Returns `-1` if the coordinate does not match a value.
|
|
9
9
|
*/
|
|
10
|
-
export function
|
|
10
|
+
export function getRotationAxisIndex(axisConfig, pointerValue) {
|
|
11
11
|
const {
|
|
12
12
|
scale,
|
|
13
13
|
data: axisData,
|
|
@@ -46,4 +46,37 @@ export function getAxisIndex(axisConfig, pointerValue) {
|
|
|
46
46
|
return -1;
|
|
47
47
|
}
|
|
48
48
|
return reverse ? axisData.length - 1 - dataIndex : dataIndex;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* For a pointer coordinate, this function returns the value and dataIndex associated.
|
|
53
|
+
* Returns `-1` if the coordinate does not match a value.
|
|
54
|
+
*/
|
|
55
|
+
export function getRadiusAxisIndex(axisConfig, pointerValue) {
|
|
56
|
+
const {
|
|
57
|
+
scale,
|
|
58
|
+
data: axisData,
|
|
59
|
+
reverse
|
|
60
|
+
} = axisConfig;
|
|
61
|
+
if (!isOrdinalScale(scale)) {
|
|
62
|
+
if (axisData === undefined) {
|
|
63
|
+
return -1;
|
|
64
|
+
}
|
|
65
|
+
const valueAsNumber = getAsNumber(scale.invert(pointerValue));
|
|
66
|
+
return findClosestIndex(axisData, valueAsNumber);
|
|
67
|
+
}
|
|
68
|
+
if (!axisData) {
|
|
69
|
+
return -1;
|
|
70
|
+
}
|
|
71
|
+
let dataIndex;
|
|
72
|
+
const distFromStart = pointerValue - Math.min(...scale.range());
|
|
73
|
+
if (scale.bandwidth() === 0) {
|
|
74
|
+
dataIndex = Math.floor((distFromStart + scale.step() / 2) / scale.step());
|
|
75
|
+
} else {
|
|
76
|
+
dataIndex = Math.floor(distFromStart / scale.step());
|
|
77
|
+
}
|
|
78
|
+
if (dataIndex < 0 || dataIndex >= axisData.length) {
|
|
79
|
+
return -1;
|
|
80
|
+
}
|
|
81
|
+
return reverse ? axisData.length - 1 - dataIndex : dataIndex;
|
|
49
82
|
}
|
|
@@ -177,7 +177,7 @@ const useChartPolarAxis = ({
|
|
|
177
177
|
let isRotationAxis = false;
|
|
178
178
|
const svgPoint = (0, _getChartPoint.getChartPoint)(element, event.detail.srcEvent);
|
|
179
179
|
const rotation = (0, _coordinateTransformation.generateSvg2rotation)(center)(svgPoint.x, svgPoint.y);
|
|
180
|
-
const rotationIndex = (0, _getAxisIndex.
|
|
180
|
+
const rotationIndex = (0, _getAxisIndex.getRotationAxisIndex)(rotationAxisWithScale[usedRotationAxisId], rotation);
|
|
181
181
|
isRotationAxis = rotationIndex !== -1;
|
|
182
182
|
dataIndex = isRotationAxis ? rotationIndex : null; // radius index is not yet implemented.
|
|
183
183
|
|
|
@@ -9,7 +9,7 @@ import { selectorChartsInteractionIsInitialized } from "../useChartInteraction/i
|
|
|
9
9
|
import { selectorChartPolarCenter, selectorChartRadiusAxis, selectorChartRotationAxis } from "./useChartPolarAxis.selectors.mjs";
|
|
10
10
|
import { getChartPoint } from "../../../getChartPoint.mjs";
|
|
11
11
|
import { generatePolar2svg, generateSvg2polar, generateSvg2rotation } from "./coordinateTransformation.mjs";
|
|
12
|
-
import {
|
|
12
|
+
import { getRotationAxisIndex } from "./getAxisIndex.mjs";
|
|
13
13
|
import { selectorChartSeriesProcessed } from "../../corePlugins/useChartSeries/index.mjs";
|
|
14
14
|
import { checkHasInteractionPlugin } from "../useChartInteraction/checkHasInteractionPlugin.mjs";
|
|
15
15
|
export const useChartPolarAxis = ({
|
|
@@ -170,7 +170,7 @@ export const useChartPolarAxis = ({
|
|
|
170
170
|
let isRotationAxis = false;
|
|
171
171
|
const svgPoint = getChartPoint(element, event.detail.srcEvent);
|
|
172
172
|
const rotation = generateSvg2rotation(center)(svgPoint.x, svgPoint.y);
|
|
173
|
-
const rotationIndex =
|
|
173
|
+
const rotationIndex = getRotationAxisIndex(rotationAxisWithScale[usedRotationAxisId], rotation);
|
|
174
174
|
isRotationAxis = rotationIndex !== -1;
|
|
175
175
|
dataIndex = isRotationAxis ? rotationIndex : null; // radius index is not yet implemented.
|
|
176
176
|
|
package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.mts
CHANGED
|
@@ -18,9 +18,29 @@ export declare const selectorChartsInteractionTooltipRotationAxes: (args_0: impo
|
|
|
18
18
|
cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
|
|
19
19
|
}) => AxisItemIdentifier[];
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Helper to get the radius associated to the interaction coordinate.
|
|
22
22
|
*/
|
|
23
|
-
export declare const
|
|
23
|
+
export declare const selectorChartsInteractionRadius: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.mjs").UseChartInteractionState> & {
|
|
24
|
+
cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
|
|
25
|
+
}) => number | null;
|
|
26
|
+
export declare const selectorChartsInteractionRadiusAxisIndex: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.mjs").UseChartInteractionState> & {
|
|
27
|
+
cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
|
|
28
|
+
}) => number | null;
|
|
29
|
+
export declare const selectorChartsInteractionRadiusAxisIndexes: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.mjs").UseChartInteractionState> & {
|
|
30
|
+
cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
|
|
31
|
+
}) => number[] | null;
|
|
32
|
+
export declare const selectorChartsInteractionRadiusAxisValue: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("./useChartPolarAxis.types.mjs").UseChartPolarAxisState> & {
|
|
33
|
+
cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
|
|
34
|
+
}) => any;
|
|
35
|
+
export declare const selectorChartsInteractionRadiusAxisValues: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("./useChartPolarAxis.types.mjs").UseChartPolarAxisState> & {
|
|
36
|
+
cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
|
|
37
|
+
}) => any[] | null;
|
|
38
|
+
/**
|
|
39
|
+
* Get radius-axis ids and corresponding data index that should be display in the tooltip.
|
|
40
|
+
*/
|
|
41
|
+
export declare const selectorChartsInteractionTooltipRadiusAxes: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.mjs").UseChartInteractionState> & {
|
|
42
|
+
cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
|
|
43
|
+
}) => AxisItemIdentifier[];
|
|
24
44
|
/**
|
|
25
45
|
* Return `true` if the axis tooltip has something to display.
|
|
26
46
|
*/
|