@mui/x-charts 9.1.0 → 9.3.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/BarChart/BarChart.js +10 -10
- package/BarChart/BarChart.mjs +10 -10
- package/BarChart/seriesConfig/bar/getColor.js +7 -53
- package/BarChart/seriesConfig/bar/getColor.mjs +7 -53
- package/BarChart/seriesConfig/bar/seriesProcessor.js +3 -1
- package/BarChart/seriesConfig/bar/seriesProcessor.mjs +3 -1
- package/BarChart/seriesConfig/bar/tooltip.js +4 -27
- package/BarChart/seriesConfig/bar/tooltip.mjs +4 -27
- package/CHANGELOG.md +221 -0
- package/ChartsContainer/ChartsContainer.js +9 -9
- package/ChartsContainer/ChartsContainer.mjs +9 -9
- package/ChartsLabel/ChartsLabelMark.js +0 -2
- package/ChartsLabel/ChartsLabelMark.mjs +0 -2
- package/ChartsLabel/labelMarkClasses.d.mts +0 -1
- package/ChartsLabel/labelMarkClasses.d.ts +0 -1
- package/ChartsLabel/labelMarkClasses.js +1 -2
- package/ChartsLabel/labelMarkClasses.mjs +2 -2
- package/ChartsLayerContainer/ChartsLayerContainer.js +36 -30
- package/ChartsLayerContainer/ChartsLayerContainer.mjs +36 -30
- 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/ChartsXAxis/ChartsXAxis.js +3 -1
- package/ChartsXAxis/ChartsXAxis.mjs +3 -1
- package/ChartsYAxis/ChartsYAxis.js +3 -1
- package/ChartsYAxis/ChartsYAxis.mjs +3 -1
- package/LineChart/LineChart.js +6 -6
- package/LineChart/LineChart.mjs +6 -6
- package/LineChart/seriesConfig/curveEvaluation.js +12 -1
- package/LineChart/seriesConfig/curveEvaluation.mjs +12 -1
- package/LineChart/seriesConfig/getColor.js +7 -54
- package/LineChart/seriesConfig/getColor.mjs +7 -54
- package/LineChart/seriesConfig/seriesProcessor.d.mts +2 -4
- package/LineChart/seriesConfig/seriesProcessor.d.ts +2 -4
- package/LineChart/seriesConfig/seriesProcessor.js +2 -139
- package/LineChart/seriesConfig/seriesProcessor.mjs +2 -138
- package/LineChart/seriesConfig/tooltip.js +4 -25
- package/LineChart/seriesConfig/tooltip.mjs +4 -25
- package/PieChart/PieChart.js +6 -6
- package/PieChart/PieChart.mjs +6 -6
- package/RadarChart/RadarAxis/useRadarAxis.js +1 -1
- package/RadarChart/RadarAxis/useRadarAxis.mjs +1 -1
- package/RadarChart/RadarChart.js +8 -8
- package/RadarChart/RadarChart.mjs +8 -8
- package/RadarChart/RadarGrid/CircularRadarStripes.js +2 -3
- package/RadarChart/RadarGrid/CircularRadarStripes.mjs +2 -3
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +3 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.mjs +3 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +1 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.mjs +1 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +1 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.mjs +1 -0
- package/RadarChart/RadarSeriesPlot/useRadarRotationIndex.js +1 -1
- package/RadarChart/RadarSeriesPlot/useRadarRotationIndex.mjs +2 -2
- package/ScatterChart/ScatterChart.js +11 -11
- package/ScatterChart/ScatterChart.mjs +11 -11
- package/ScatterChart/seriesConfig/tooltip.js +2 -24
- package/ScatterChart/seriesConfig/tooltip.mjs +2 -24
- package/SparkLineChart/SparkLineChart.js +27 -27
- package/SparkLineChart/SparkLineChart.mjs +27 -27
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.js +1 -1
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.mjs +1 -1
- package/internals/getLineLikeTooltip.d.mts +9 -0
- package/internals/getLineLikeTooltip.d.ts +9 -0
- package/internals/getLineLikeTooltip.js +38 -0
- package/internals/getLineLikeTooltip.mjs +31 -0
- 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 +7 -2
- package/internals/index.d.ts +7 -2
- package/internals/index.js +46 -3
- package/internals/index.mjs +6 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.mts +4 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.ts +4 -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/useChartHighlight/useChartHighlight.js +3 -0
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.mjs +3 -0
- 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/internals/processLineLikeSeries.d.mts +6 -0
- package/internals/processLineLikeSeries.d.ts +6 -0
- package/internals/processLineLikeSeries.js +145 -0
- package/internals/processLineLikeSeries.mjs +138 -0
- package/internals/resolveColorProcessor.d.mts +11 -0
- package/internals/resolveColorProcessor.d.ts +11 -0
- package/internals/resolveColorProcessor.js +62 -0
- package/internals/resolveColorProcessor.mjs +56 -0
- package/models/axis.d.mts +55 -7
- package/models/axis.d.ts +55 -7
- package/package.json +3 -3
package/models/axis.d.mts
CHANGED
|
@@ -10,6 +10,7 @@ import type { ChartsTextProps } from "../ChartsText/index.mjs";
|
|
|
10
10
|
import type { ContinuousColorConfig, OrdinalColorConfig, PiecewiseColorConfig } from "./colorMapping.mjs";
|
|
11
11
|
import type { OrdinalTimeTicks } from "./timeTicks.mjs";
|
|
12
12
|
import { type ChartsTypeFeatureFlags } from "./featureFlags.mjs";
|
|
13
|
+
import { type ChartsRadialAxisClasses } from "../ChartsRadiusAxis/sharedRadialAxisClasses.mjs";
|
|
13
14
|
export type AxisId = string | number;
|
|
14
15
|
export type D3Scale<Domain extends {
|
|
15
16
|
toString(): string;
|
|
@@ -139,7 +140,9 @@ export interface ChartsXAxisProps extends ChartsAxisProps {
|
|
|
139
140
|
*/
|
|
140
141
|
tickLabelMinGap?: number;
|
|
141
142
|
}
|
|
142
|
-
type
|
|
143
|
+
export type ChartsCartesianAxisProps = ChartsXAxisProps | ChartsYAxisProps;
|
|
144
|
+
export type ChartsRadialAxisProps = ChartsRotationAxisProps | ChartsRadiusAxisProps;
|
|
145
|
+
type AxisSideConfig<AxisProps extends ChartsCartesianAxisProps> = {
|
|
143
146
|
/**
|
|
144
147
|
* Position of the axis.
|
|
145
148
|
*
|
|
@@ -177,6 +180,28 @@ export interface ChartsRotationAxisProps extends ChartsAxisProps {
|
|
|
177
180
|
* The gap between the axis and the label.
|
|
178
181
|
*/
|
|
179
182
|
labelGap?: number;
|
|
183
|
+
/**
|
|
184
|
+
* The position of the rotation axis.
|
|
185
|
+
* It can be 'inside' or 'outside'.
|
|
186
|
+
* @default 'outside'
|
|
187
|
+
*/
|
|
188
|
+
position?: 'inside' | 'outside' | 'none';
|
|
189
|
+
/**
|
|
190
|
+
* Set the position of the tick labels relative to the axis line.
|
|
191
|
+
* `'after'` places them outside the arc, `'before'` inside.
|
|
192
|
+
* @default position === 'outside' ? 'after' : 'before'
|
|
193
|
+
*/
|
|
194
|
+
tickLabelPosition?: 'after' | 'before';
|
|
195
|
+
/**
|
|
196
|
+
* Set the position of the tick relative to the axis line.
|
|
197
|
+
* `'after'` places them outside the arc, `'before'` inside.
|
|
198
|
+
* @default position === 'outside' ? 'after' : 'before'
|
|
199
|
+
*/
|
|
200
|
+
tickPosition?: 'after' | 'before';
|
|
201
|
+
/**
|
|
202
|
+
* Override or extend the styles applied to the component.
|
|
203
|
+
*/
|
|
204
|
+
classes?: Partial<ChartsRadialAxisClasses>;
|
|
180
205
|
}
|
|
181
206
|
export interface ChartsRadiusAxisProps extends ChartsAxisProps {
|
|
182
207
|
axis?: 'radius';
|
|
@@ -188,6 +213,29 @@ export interface ChartsRadiusAxisProps extends ChartsAxisProps {
|
|
|
188
213
|
* The maximal radius.
|
|
189
214
|
*/
|
|
190
215
|
maxRadius?: number;
|
|
216
|
+
/**
|
|
217
|
+
* The position of the axis in polar coordinates.
|
|
218
|
+
* It can be 'start', 'end', or a specific angle in degrees.
|
|
219
|
+
* @default 'start'
|
|
220
|
+
*/
|
|
221
|
+
position?: 'start' | 'end' | number | 'none';
|
|
222
|
+
/**
|
|
223
|
+
* Set the position of the tick labels relative to the axis line.
|
|
224
|
+
* The before/after is defined based on clockwise direction.
|
|
225
|
+
* Using `'auto'` sets it to `'before'` if position is `'start'` and `'after'` otherwise.
|
|
226
|
+
* @default 'auto'
|
|
227
|
+
*/
|
|
228
|
+
tickLabelPosition?: 'center' | 'after' | 'before' | 'auto';
|
|
229
|
+
/**
|
|
230
|
+
* Set the position of the tick relative to the axis line.
|
|
231
|
+
* The before/after is defined based on clockwise direction.
|
|
232
|
+
* @default position === 'start' ? 'before' : 'after'
|
|
233
|
+
*/
|
|
234
|
+
tickPosition?: 'after' | 'before';
|
|
235
|
+
/**
|
|
236
|
+
* Override or extend the styles applied to the component.
|
|
237
|
+
*/
|
|
238
|
+
classes?: Partial<ChartsRadialAxisClasses>;
|
|
191
239
|
}
|
|
192
240
|
export type ScaleName = keyof AxisScaleConfig;
|
|
193
241
|
export type ContinuousScaleName = 'linear' | 'log' | 'symlog' | 'pow' | 'sqrt' | 'time' | 'utc';
|
|
@@ -475,7 +523,7 @@ type CommonAxisConfig<S extends ScaleName = ScaleName, V = any> = {
|
|
|
475
523
|
/**
|
|
476
524
|
* Use this type for advanced typing. For basic usage, use `RotationAxis` or `RadiusAxis`.
|
|
477
525
|
*/
|
|
478
|
-
export type PolarAxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps extends
|
|
526
|
+
export type PolarAxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsRadialAxisProps = ChartsRadialAxisProps> = {
|
|
479
527
|
/**
|
|
480
528
|
* The offset of the axis in pixels. It can be used to move the axis from its default position.
|
|
481
529
|
* X-axis: A top axis will move up, and a bottom axis will move down.
|
|
@@ -487,7 +535,7 @@ export type PolarAxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps
|
|
|
487
535
|
/**
|
|
488
536
|
* Use this type for advanced typing. For basic usage, use `XAxis` or `YAxis`.
|
|
489
537
|
*/
|
|
490
|
-
export type AxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps extends
|
|
538
|
+
export type AxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsCartesianAxisProps = ChartsCartesianAxisProps> = {
|
|
491
539
|
/**
|
|
492
540
|
* The offset of the axis in pixels. It can be used to move the axis from its default position.
|
|
493
541
|
* X-axis: A top axis will move up, and a bottom axis will move down.
|
|
@@ -497,13 +545,13 @@ export type AxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps exten
|
|
|
497
545
|
offset?: number;
|
|
498
546
|
} & CommonAxisConfig<S, V> & MinMaxConfig<S> & Omit<Partial<AxisProps>, 'axisId'> & Partial<Omit<AxisScaleConfig[S], 'scale'>> & AxisSideConfig<AxisProps> & TickParams & AxisConfigExtension;
|
|
499
547
|
export interface AxisConfigExtension {}
|
|
500
|
-
export type PolarAxisDefaultized<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsAxisProps =
|
|
548
|
+
export type PolarAxisDefaultized<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsAxisProps = ChartsRadialAxisProps> = Omit<PolarAxisConfig<S, V, AxisProps>, 'scaleType'> & AxisScaleConfig[S] & AxisScaleComputedConfig[S] & {
|
|
501
549
|
/**
|
|
502
550
|
* If true, the contents of the axis will be displayed by a tooltip with `trigger='axis'`.
|
|
503
551
|
*/
|
|
504
552
|
triggerTooltip?: boolean;
|
|
505
553
|
};
|
|
506
|
-
export type ComputedAxis<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsAxisProps =
|
|
554
|
+
export type ComputedAxis<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsAxisProps = ChartsCartesianAxisProps> = AxisProps extends any ? MakeRequired<Omit<DefaultedAxis<S, V, AxisProps>, 'scaleType'>, 'offset'> & AxisScaleConfig[S] & AxisScaleComputedConfig[S] & {
|
|
507
555
|
/**
|
|
508
556
|
* An indication of the expected number of ticks.
|
|
509
557
|
*/
|
|
@@ -518,7 +566,7 @@ export type ComputedAxis<S extends ScaleName = ScaleName, V = any, AxisProps ext
|
|
|
518
566
|
height: number;
|
|
519
567
|
} : {}) & (AxisProps extends ChartsYAxisProps ? AxisSideConfig<AxisProps> & {
|
|
520
568
|
width: number;
|
|
521
|
-
} : {});
|
|
569
|
+
} : {}) : never;
|
|
522
570
|
export type ComputedXAxis<S extends ScaleName = ScaleName, V = any> = ComputedAxis<S, V, ChartsXAxisProps>;
|
|
523
571
|
export type ComputedYAxis<S extends ScaleName = ScaleName, V = any> = ComputedAxis<S, V, ChartsYAxisProps>;
|
|
524
572
|
export declare function isBandScaleConfig(scaleConfig: PolarAxisConfig<ScaleName>): scaleConfig is PolarAxisConfig<'band'> & {
|
|
@@ -580,7 +628,7 @@ export type RadiusAxis<S extends ScaleName = ScaleName, V = any> = S extends Sca
|
|
|
580
628
|
/**
|
|
581
629
|
* The axis configuration with missing values filled with default values.
|
|
582
630
|
*/
|
|
583
|
-
export type DefaultedAxis<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsAxisProps =
|
|
631
|
+
export type DefaultedAxis<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsAxisProps = ChartsCartesianAxisProps> = AxisConfig<S, V, AxisProps> & {
|
|
584
632
|
zoom: DefaultizedZoomOptions | undefined;
|
|
585
633
|
};
|
|
586
634
|
/**
|
package/models/axis.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import type { ChartsTextProps } from "../ChartsText/index.js";
|
|
|
10
10
|
import type { ContinuousColorConfig, OrdinalColorConfig, PiecewiseColorConfig } from "./colorMapping.js";
|
|
11
11
|
import type { OrdinalTimeTicks } from "./timeTicks.js";
|
|
12
12
|
import { type ChartsTypeFeatureFlags } from "./featureFlags.js";
|
|
13
|
+
import { type ChartsRadialAxisClasses } from "../ChartsRadiusAxis/sharedRadialAxisClasses.js";
|
|
13
14
|
export type AxisId = string | number;
|
|
14
15
|
export type D3Scale<Domain extends {
|
|
15
16
|
toString(): string;
|
|
@@ -139,7 +140,9 @@ export interface ChartsXAxisProps extends ChartsAxisProps {
|
|
|
139
140
|
*/
|
|
140
141
|
tickLabelMinGap?: number;
|
|
141
142
|
}
|
|
142
|
-
type
|
|
143
|
+
export type ChartsCartesianAxisProps = ChartsXAxisProps | ChartsYAxisProps;
|
|
144
|
+
export type ChartsRadialAxisProps = ChartsRotationAxisProps | ChartsRadiusAxisProps;
|
|
145
|
+
type AxisSideConfig<AxisProps extends ChartsCartesianAxisProps> = {
|
|
143
146
|
/**
|
|
144
147
|
* Position of the axis.
|
|
145
148
|
*
|
|
@@ -177,6 +180,28 @@ export interface ChartsRotationAxisProps extends ChartsAxisProps {
|
|
|
177
180
|
* The gap between the axis and the label.
|
|
178
181
|
*/
|
|
179
182
|
labelGap?: number;
|
|
183
|
+
/**
|
|
184
|
+
* The position of the rotation axis.
|
|
185
|
+
* It can be 'inside' or 'outside'.
|
|
186
|
+
* @default 'outside'
|
|
187
|
+
*/
|
|
188
|
+
position?: 'inside' | 'outside' | 'none';
|
|
189
|
+
/**
|
|
190
|
+
* Set the position of the tick labels relative to the axis line.
|
|
191
|
+
* `'after'` places them outside the arc, `'before'` inside.
|
|
192
|
+
* @default position === 'outside' ? 'after' : 'before'
|
|
193
|
+
*/
|
|
194
|
+
tickLabelPosition?: 'after' | 'before';
|
|
195
|
+
/**
|
|
196
|
+
* Set the position of the tick relative to the axis line.
|
|
197
|
+
* `'after'` places them outside the arc, `'before'` inside.
|
|
198
|
+
* @default position === 'outside' ? 'after' : 'before'
|
|
199
|
+
*/
|
|
200
|
+
tickPosition?: 'after' | 'before';
|
|
201
|
+
/**
|
|
202
|
+
* Override or extend the styles applied to the component.
|
|
203
|
+
*/
|
|
204
|
+
classes?: Partial<ChartsRadialAxisClasses>;
|
|
180
205
|
}
|
|
181
206
|
export interface ChartsRadiusAxisProps extends ChartsAxisProps {
|
|
182
207
|
axis?: 'radius';
|
|
@@ -188,6 +213,29 @@ export interface ChartsRadiusAxisProps extends ChartsAxisProps {
|
|
|
188
213
|
* The maximal radius.
|
|
189
214
|
*/
|
|
190
215
|
maxRadius?: number;
|
|
216
|
+
/**
|
|
217
|
+
* The position of the axis in polar coordinates.
|
|
218
|
+
* It can be 'start', 'end', or a specific angle in degrees.
|
|
219
|
+
* @default 'start'
|
|
220
|
+
*/
|
|
221
|
+
position?: 'start' | 'end' | number | 'none';
|
|
222
|
+
/**
|
|
223
|
+
* Set the position of the tick labels relative to the axis line.
|
|
224
|
+
* The before/after is defined based on clockwise direction.
|
|
225
|
+
* Using `'auto'` sets it to `'before'` if position is `'start'` and `'after'` otherwise.
|
|
226
|
+
* @default 'auto'
|
|
227
|
+
*/
|
|
228
|
+
tickLabelPosition?: 'center' | 'after' | 'before' | 'auto';
|
|
229
|
+
/**
|
|
230
|
+
* Set the position of the tick relative to the axis line.
|
|
231
|
+
* The before/after is defined based on clockwise direction.
|
|
232
|
+
* @default position === 'start' ? 'before' : 'after'
|
|
233
|
+
*/
|
|
234
|
+
tickPosition?: 'after' | 'before';
|
|
235
|
+
/**
|
|
236
|
+
* Override or extend the styles applied to the component.
|
|
237
|
+
*/
|
|
238
|
+
classes?: Partial<ChartsRadialAxisClasses>;
|
|
191
239
|
}
|
|
192
240
|
export type ScaleName = keyof AxisScaleConfig;
|
|
193
241
|
export type ContinuousScaleName = 'linear' | 'log' | 'symlog' | 'pow' | 'sqrt' | 'time' | 'utc';
|
|
@@ -475,7 +523,7 @@ type CommonAxisConfig<S extends ScaleName = ScaleName, V = any> = {
|
|
|
475
523
|
/**
|
|
476
524
|
* Use this type for advanced typing. For basic usage, use `RotationAxis` or `RadiusAxis`.
|
|
477
525
|
*/
|
|
478
|
-
export type PolarAxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps extends
|
|
526
|
+
export type PolarAxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsRadialAxisProps = ChartsRadialAxisProps> = {
|
|
479
527
|
/**
|
|
480
528
|
* The offset of the axis in pixels. It can be used to move the axis from its default position.
|
|
481
529
|
* X-axis: A top axis will move up, and a bottom axis will move down.
|
|
@@ -487,7 +535,7 @@ export type PolarAxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps
|
|
|
487
535
|
/**
|
|
488
536
|
* Use this type for advanced typing. For basic usage, use `XAxis` or `YAxis`.
|
|
489
537
|
*/
|
|
490
|
-
export type AxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps extends
|
|
538
|
+
export type AxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsCartesianAxisProps = ChartsCartesianAxisProps> = {
|
|
491
539
|
/**
|
|
492
540
|
* The offset of the axis in pixels. It can be used to move the axis from its default position.
|
|
493
541
|
* X-axis: A top axis will move up, and a bottom axis will move down.
|
|
@@ -497,13 +545,13 @@ export type AxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps exten
|
|
|
497
545
|
offset?: number;
|
|
498
546
|
} & CommonAxisConfig<S, V> & MinMaxConfig<S> & Omit<Partial<AxisProps>, 'axisId'> & Partial<Omit<AxisScaleConfig[S], 'scale'>> & AxisSideConfig<AxisProps> & TickParams & AxisConfigExtension;
|
|
499
547
|
export interface AxisConfigExtension {}
|
|
500
|
-
export type PolarAxisDefaultized<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsAxisProps =
|
|
548
|
+
export type PolarAxisDefaultized<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsAxisProps = ChartsRadialAxisProps> = Omit<PolarAxisConfig<S, V, AxisProps>, 'scaleType'> & AxisScaleConfig[S] & AxisScaleComputedConfig[S] & {
|
|
501
549
|
/**
|
|
502
550
|
* If true, the contents of the axis will be displayed by a tooltip with `trigger='axis'`.
|
|
503
551
|
*/
|
|
504
552
|
triggerTooltip?: boolean;
|
|
505
553
|
};
|
|
506
|
-
export type ComputedAxis<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsAxisProps =
|
|
554
|
+
export type ComputedAxis<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsAxisProps = ChartsCartesianAxisProps> = AxisProps extends any ? MakeRequired<Omit<DefaultedAxis<S, V, AxisProps>, 'scaleType'>, 'offset'> & AxisScaleConfig[S] & AxisScaleComputedConfig[S] & {
|
|
507
555
|
/**
|
|
508
556
|
* An indication of the expected number of ticks.
|
|
509
557
|
*/
|
|
@@ -518,7 +566,7 @@ export type ComputedAxis<S extends ScaleName = ScaleName, V = any, AxisProps ext
|
|
|
518
566
|
height: number;
|
|
519
567
|
} : {}) & (AxisProps extends ChartsYAxisProps ? AxisSideConfig<AxisProps> & {
|
|
520
568
|
width: number;
|
|
521
|
-
} : {});
|
|
569
|
+
} : {}) : never;
|
|
522
570
|
export type ComputedXAxis<S extends ScaleName = ScaleName, V = any> = ComputedAxis<S, V, ChartsXAxisProps>;
|
|
523
571
|
export type ComputedYAxis<S extends ScaleName = ScaleName, V = any> = ComputedAxis<S, V, ChartsYAxisProps>;
|
|
524
572
|
export declare function isBandScaleConfig(scaleConfig: PolarAxisConfig<ScaleName>): scaleConfig is PolarAxisConfig<'band'> & {
|
|
@@ -580,7 +628,7 @@ export type RadiusAxis<S extends ScaleName = ScaleName, V = any> = S extends Sca
|
|
|
580
628
|
/**
|
|
581
629
|
* The axis configuration with missing values filled with default values.
|
|
582
630
|
*/
|
|
583
|
-
export type DefaultedAxis<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsAxisProps =
|
|
631
|
+
export type DefaultedAxis<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsAxisProps = ChartsCartesianAxisProps> = AxisConfig<S, V, AxisProps> & {
|
|
584
632
|
zoom: DefaultizedZoomOptions | undefined;
|
|
585
633
|
};
|
|
586
634
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-charts",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.0",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The community edition of MUI X Charts components.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@babel/runtime": "^7.29.2",
|
|
31
|
-
"@mui/utils": "9.0.
|
|
31
|
+
"@mui/utils": "9.0.1",
|
|
32
32
|
"bezier-easing": "^2.1.0",
|
|
33
33
|
"clsx": "^2.1.1",
|
|
34
34
|
"prop-types": "^15.8.1",
|
|
35
35
|
"reselect": "^5.1.1",
|
|
36
36
|
"use-sync-external-store": "^1.6.0",
|
|
37
|
-
"@mui/x-internal-gestures": "^9.
|
|
37
|
+
"@mui/x-internal-gestures": "^9.3.0",
|
|
38
38
|
"@mui/x-charts-vendor": "^9.0.0",
|
|
39
39
|
"@mui/x-internals": "^9.1.0"
|
|
40
40
|
},
|