@mui/x-charts 9.0.4 → 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/BarChart/BarChart.d.mts +1 -2
- package/BarChart/BarChart.d.ts +1 -2
- package/BarChart/BarChart.js +2 -913
- package/BarChart/BarChart.mjs +2 -913
- package/BarChart/seriesConfig/bar/seriesProcessor.js +2 -0
- package/BarChart/seriesConfig/bar/seriesProcessor.mjs +2 -0
- package/CHANGELOG.md +236 -0
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.d.mts +55 -0
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.d.ts +55 -0
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.js +94 -0
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.mjs +88 -0
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.d.mts +13 -0
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.d.ts +13 -0
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.js +86 -0
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.mjs +80 -0
- package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.d.mts +18 -0
- package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.d.ts +18 -0
- package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.js +26 -0
- package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.mjs +16 -0
- package/ChartsAxisHighlightValue/index.d.mts +1 -0
- package/ChartsAxisHighlightValue/index.d.ts +1 -0
- package/ChartsAxisHighlightValue/index.js +16 -0
- package/ChartsAxisHighlightValue/index.mjs +1 -0
- package/ChartsAxisHighlightValue/useAxisHighlightValue.d.mts +14 -0
- package/ChartsAxisHighlightValue/useAxisHighlightValue.d.ts +14 -0
- package/ChartsAxisHighlightValue/useAxisHighlightValue.js +130 -0
- package/ChartsAxisHighlightValue/useAxisHighlightValue.mjs +124 -0
- package/ChartsContainer/ChartsContainer.js +4 -1431
- package/ChartsContainer/ChartsContainer.mjs +4 -1431
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.d.mts +15 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.d.ts +15 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.js +56 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.mjs +50 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.d.mts +6 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.d.ts +6 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.js +5 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.mjs +1 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlightPath.d.mts +11 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlightPath.d.ts +11 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlightPath.js +70 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlightPath.mjs +64 -0
- package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.d.mts +9 -0
- package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.d.ts +9 -0
- package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.js +104 -0
- package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.mjs +98 -0
- package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.d.mts +9 -0
- package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.d.ts +9 -0
- package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.js +98 -0
- package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.mjs +92 -0
- package/ChartsRadialAxisHighlight/chartsRadialAxisHighlightClasses.d.mts +7 -0
- package/ChartsRadialAxisHighlight/chartsRadialAxisHighlightClasses.d.ts +7 -0
- package/ChartsRadialAxisHighlight/chartsRadialAxisHighlightClasses.js +14 -0
- package/ChartsRadialAxisHighlight/chartsRadialAxisHighlightClasses.mjs +6 -0
- package/ChartsRadialAxisHighlight/index.d.mts +5 -0
- package/ChartsRadialAxisHighlight/index.d.ts +5 -0
- package/ChartsRadialAxisHighlight/index.js +47 -0
- package/ChartsRadialAxisHighlight/index.mjs +4 -0
- 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/ChartsRadiusAxis/index.d.mts +3 -2
- package/ChartsRadiusAxis/index.d.ts +3 -2
- package/ChartsRadiusAxis/index.mjs +3 -1
- 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/ChartsRotationAxis/index.d.mts +3 -2
- package/ChartsRotationAxis/index.d.ts +3 -2
- package/ChartsRotationAxis/index.mjs +3 -1
- 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/useAxisTicksProps.d.mts +162 -81
- package/ChartsXAxis/useAxisTicksProps.d.ts +162 -81
- package/ChartsYAxis/useAxisTicksProps.d.mts +162 -81
- package/ChartsYAxis/useAxisTicksProps.d.ts +162 -81
- package/LICENSE +2 -0
- package/LineChart/LineChart.js +2 -913
- package/LineChart/LineChart.mjs +2 -913
- package/LineChart/seriesConfig/curveEvaluation.d.mts +19 -1
- package/LineChart/seriesConfig/curveEvaluation.d.ts +19 -1
- package/LineChart/seriesConfig/curveEvaluation.js +132 -0
- package/LineChart/seriesConfig/curveEvaluation.mjs +131 -0
- package/LineChart/seriesConfig/getSeriesWithDefaultValues.js +2 -1
- package/LineChart/seriesConfig/getSeriesWithDefaultValues.mjs +2 -1
- package/LineChart/seriesConfig/seriesProcessor.js +4 -0
- package/LineChart/seriesConfig/seriesProcessor.mjs +4 -0
- package/LineChart/useAreaPlotData.js +4 -0
- package/LineChart/useAreaPlotData.mjs +4 -0
- package/LineChart/useLinePlotData.js +2 -0
- package/LineChart/useLinePlotData.mjs +2 -0
- package/LineChart/useMarkPlotData.js +2 -0
- package/LineChart/useMarkPlotData.mjs +2 -0
- 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/ScatterChart/FocusedScatterMark.js +10 -24
- package/ScatterChart/FocusedScatterMark.mjs +10 -24
- package/ScatterChart/HighlightedScatterMark.d.mts +11 -0
- package/ScatterChart/HighlightedScatterMark.d.ts +11 -0
- package/ScatterChart/HighlightedScatterMark.js +68 -0
- package/ScatterChart/HighlightedScatterMark.mjs +62 -0
- package/ScatterChart/ScatterChart.d.mts +1 -2
- package/ScatterChart/ScatterChart.d.ts +1 -2
- package/ScatterChart/ScatterChart.js +2 -913
- package/ScatterChart/ScatterChart.mjs +2 -913
- package/ScatterChart/index.d.mts +1 -0
- package/ScatterChart/index.d.ts +1 -0
- package/ScatterChart/index.js +12 -0
- package/ScatterChart/index.mjs +1 -0
- package/ScatterChart/scatterClasses.d.mts +3 -1
- package/ScatterChart/scatterClasses.d.ts +3 -1
- package/ScatterChart/scatterClasses.js +3 -2
- package/ScatterChart/scatterClasses.mjs +3 -2
- package/ScatterChart/useScatterChartProps.js +3 -1
- package/ScatterChart/useScatterChartProps.mjs +3 -1
- package/ScatterChart/useScatterItemPosition.d.mts +16 -0
- package/ScatterChart/useScatterItemPosition.d.ts +16 -0
- package/ScatterChart/useScatterItemPosition.js +47 -0
- package/ScatterChart/useScatterItemPosition.mjs +41 -0
- package/SparkLineChart/SparkLineChart.js +2 -913
- package/SparkLineChart/SparkLineChart.mjs +2 -913
- package/hooks/useAxis.d.mts +3 -3
- package/hooks/useAxis.d.ts +3 -3
- package/hooks/useAxisSystem.d.mts +1 -1
- package/hooks/useAxisSystem.d.ts +1 -1
- package/hooks/useAxisSystem.js +1 -1
- package/hooks/useAxisSystem.mjs +1 -1
- package/index.d.mts +2 -0
- package/index.d.ts +2 -0
- package/index.js +25 -1
- package/index.mjs +3 -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 +8 -1
- package/internals/index.d.ts +8 -1
- package/internals/index.js +67 -0
- package/internals/index.mjs +7 -1
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +4 -2
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.mjs +4 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.mts +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.ts +2 -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 +77 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +77 -3
- 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/computeAxisValue.d.mts +4 -7
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +4 -7
- package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.d.mts +3 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.d.ts +3 -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 +7 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.d.ts +7 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.js +56 -6
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.mjs +54 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/index.d.mts +2 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/index.d.ts +2 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/index.js +12 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/index.mjs +2 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.mjs +2 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.mts +4 -4
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.mts +3 -3
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.mts +23 -3
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +23 -3
- 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 +79 -31
- package/models/axis.d.ts +79 -31
- package/models/axis.js +5 -1
- package/models/axis.mjs +5 -1
- package/models/seriesType/line.d.mts +6 -6
- package/models/seriesType/line.d.ts +6 -6
- package/package.json +32 -4
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
|
*
|
|
@@ -149,36 +152,22 @@ type AxisSideConfig<AxisProps extends ChartsAxisProps> = AxisProps extends Chart
|
|
|
149
152
|
*
|
|
150
153
|
* The first axis in the list will always have a default position.
|
|
151
154
|
*/
|
|
152
|
-
position?: 'top' | 'bottom' | 'none';
|
|
155
|
+
position?: (AxisProps extends ChartsXAxisProps ? 'top' | 'bottom' : 'none') | (AxisProps extends ChartsYAxisProps ? 'left' | 'right' : 'none') | 'none';
|
|
153
156
|
/**
|
|
154
157
|
* The height of the axis.
|
|
155
158
|
* Set to `'auto'` to automatically calculate the height based on tick label measurements.
|
|
156
159
|
* @default 45 if an axis label is provided, 25 otherwise.
|
|
157
160
|
*/
|
|
158
|
-
height?: number | 'auto';
|
|
159
|
-
} : AxisProps extends ChartsYAxisProps ? {
|
|
160
|
-
/**
|
|
161
|
-
* Position of the axis.
|
|
162
|
-
*
|
|
163
|
-
* When set, the space for the axis is reserved, even if the axis is not displayed due to missing data.
|
|
164
|
-
*
|
|
165
|
-
* Set to 'none' to hide the axis.
|
|
166
|
-
*
|
|
167
|
-
* The first axis in the list will always have a default position.
|
|
168
|
-
*/
|
|
169
|
-
position?: 'left' | 'right' | 'none';
|
|
161
|
+
height?: AxisProps extends ChartsXAxisProps ? number | 'auto' : never;
|
|
170
162
|
/**
|
|
171
163
|
* The width of the axis.
|
|
172
164
|
* Set to `'auto'` to automatically calculate the width based on tick label measurements.
|
|
173
165
|
* @default 65 if an axis label is provided, 45 otherwise.
|
|
174
166
|
*/
|
|
175
|
-
width?: number | 'auto';
|
|
176
|
-
} : {
|
|
177
|
-
position?: 'top' | 'bottom' | 'left' | 'right' | 'none';
|
|
178
|
-
height?: number | 'auto';
|
|
179
|
-
width?: number | 'auto';
|
|
167
|
+
width?: AxisProps extends ChartsYAxisProps ? number | 'auto' : never;
|
|
180
168
|
};
|
|
181
169
|
export interface ChartsRotationAxisProps extends ChartsAxisProps {
|
|
170
|
+
axis?: 'rotation';
|
|
182
171
|
/**
|
|
183
172
|
* The start angle (in deg).
|
|
184
173
|
*/
|
|
@@ -191,8 +180,31 @@ export interface ChartsRotationAxisProps extends ChartsAxisProps {
|
|
|
191
180
|
* The gap between the axis and the label.
|
|
192
181
|
*/
|
|
193
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>;
|
|
194
205
|
}
|
|
195
206
|
export interface ChartsRadiusAxisProps extends ChartsAxisProps {
|
|
207
|
+
axis?: 'radius';
|
|
196
208
|
/**
|
|
197
209
|
* The minimal radius.
|
|
198
210
|
*/
|
|
@@ -201,6 +213,29 @@ export interface ChartsRadiusAxisProps extends ChartsAxisProps {
|
|
|
201
213
|
* The maximal radius.
|
|
202
214
|
*/
|
|
203
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>;
|
|
204
239
|
}
|
|
205
240
|
export type ScaleName = keyof AxisScaleConfig;
|
|
206
241
|
export type ContinuousScaleName = 'linear' | 'log' | 'symlog' | 'pow' | 'sqrt' | 'time' | 'utc';
|
|
@@ -485,7 +520,10 @@ type CommonAxisConfig<S extends ScaleName = ScaleName, V = any> = {
|
|
|
485
520
|
*/
|
|
486
521
|
ignoreTooltip?: boolean;
|
|
487
522
|
};
|
|
488
|
-
|
|
523
|
+
/**
|
|
524
|
+
* Use this type for advanced typing. For basic usage, use `RotationAxis` or `RadiusAxis`.
|
|
525
|
+
*/
|
|
526
|
+
export type PolarAxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsRadialAxisProps = ChartsRadialAxisProps> = {
|
|
489
527
|
/**
|
|
490
528
|
* The offset of the axis in pixels. It can be used to move the axis from its default position.
|
|
491
529
|
* X-axis: A top axis will move up, and a bottom axis will move down.
|
|
@@ -493,11 +531,11 @@ export type PolarAxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps
|
|
|
493
531
|
* @default 0
|
|
494
532
|
*/
|
|
495
533
|
offset?: number;
|
|
496
|
-
} & CommonAxisConfig<S, V> & MinMaxConfig<S> & Omit<Partial<AxisProps>, 'axisId'> & Partial<Omit<AxisScaleConfig[S], 'scale'>> & AxisConfigExtension;
|
|
534
|
+
} & CommonAxisConfig<S, V> & MinMaxConfig<S> & Omit<Partial<AxisProps>, 'axisId'> & Partial<Omit<AxisScaleConfig[S], 'scale'>> & TickParams & AxisConfigExtension;
|
|
497
535
|
/**
|
|
498
|
-
* Use this type for advanced typing. For basic usage, use `XAxis
|
|
536
|
+
* Use this type for advanced typing. For basic usage, use `XAxis` or `YAxis`.
|
|
499
537
|
*/
|
|
500
|
-
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> = {
|
|
501
539
|
/**
|
|
502
540
|
* The offset of the axis in pixels. It can be used to move the axis from its default position.
|
|
503
541
|
* X-axis: A top axis will move up, and a bottom axis will move down.
|
|
@@ -507,13 +545,13 @@ export type AxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps exten
|
|
|
507
545
|
offset?: number;
|
|
508
546
|
} & CommonAxisConfig<S, V> & MinMaxConfig<S> & Omit<Partial<AxisProps>, 'axisId'> & Partial<Omit<AxisScaleConfig[S], 'scale'>> & AxisSideConfig<AxisProps> & TickParams & AxisConfigExtension;
|
|
509
547
|
export interface AxisConfigExtension {}
|
|
510
|
-
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] & {
|
|
511
549
|
/**
|
|
512
550
|
* If true, the contents of the axis will be displayed by a tooltip with `trigger='axis'`.
|
|
513
551
|
*/
|
|
514
552
|
triggerTooltip?: boolean;
|
|
515
553
|
};
|
|
516
|
-
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] & {
|
|
517
555
|
/**
|
|
518
556
|
* An indication of the expected number of ticks.
|
|
519
557
|
*/
|
|
@@ -524,20 +562,30 @@ export type ComputedAxis<S extends ScaleName = ScaleName, V = any, AxisProps ext
|
|
|
524
562
|
triggerTooltip?: boolean;
|
|
525
563
|
/** @ignore - internal. True when a rotation axis covers a full circle. */
|
|
526
564
|
isFullCircle?: boolean;
|
|
527
|
-
} & (AxisProps extends ChartsXAxisProps ? AxisSideConfig<AxisProps> & {
|
|
565
|
+
} & AxisProps & (AxisProps extends ChartsXAxisProps ? AxisSideConfig<AxisProps> & {
|
|
528
566
|
height: number;
|
|
529
|
-
} : AxisProps extends ChartsYAxisProps ? AxisSideConfig<AxisProps> & {
|
|
567
|
+
} : {}) & (AxisProps extends ChartsYAxisProps ? AxisSideConfig<AxisProps> & {
|
|
530
568
|
width: number;
|
|
531
|
-
} :
|
|
569
|
+
} : {}) : never;
|
|
532
570
|
export type ComputedXAxis<S extends ScaleName = ScaleName, V = any> = ComputedAxis<S, V, ChartsXAxisProps>;
|
|
533
571
|
export type ComputedYAxis<S extends ScaleName = ScaleName, V = any> = ComputedAxis<S, V, ChartsYAxisProps>;
|
|
572
|
+
export declare function isBandScaleConfig(scaleConfig: PolarAxisConfig<ScaleName>): scaleConfig is PolarAxisConfig<'band'> & {
|
|
573
|
+
scaleType: 'band';
|
|
574
|
+
};
|
|
534
575
|
export declare function isBandScaleConfig(scaleConfig: AxisConfig<ScaleName>): scaleConfig is AxisConfig<'band'> & {
|
|
535
576
|
scaleType: 'band';
|
|
536
577
|
};
|
|
578
|
+
export declare function isPointScaleConfig(scaleConfig: PolarAxisConfig<ScaleName>): scaleConfig is PolarAxisConfig<'point'> & {
|
|
579
|
+
scaleType: 'point';
|
|
580
|
+
};
|
|
537
581
|
export declare function isPointScaleConfig(scaleConfig: AxisConfig<ScaleName>): scaleConfig is AxisConfig<'point'> & {
|
|
538
582
|
scaleType: 'point';
|
|
539
583
|
};
|
|
584
|
+
export declare function isContinuousScaleConfig(scaleConfig: PolarAxisConfig<ScaleName>): scaleConfig is PolarAxisConfig<ContinuousScaleName>;
|
|
540
585
|
export declare function isContinuousScaleConfig(scaleConfig: AxisConfig<ScaleName>): scaleConfig is AxisConfig<ContinuousScaleName>;
|
|
586
|
+
export declare function isSymlogScaleConfig(scaleConfig: PolarAxisConfig<ScaleName>): scaleConfig is PolarAxisConfig<'symlog'> & {
|
|
587
|
+
scaleType: 'symlog';
|
|
588
|
+
};
|
|
541
589
|
export declare function isSymlogScaleConfig(scaleConfig: AxisConfig<ScaleName>): scaleConfig is AxisConfig<'symlog'> & {
|
|
542
590
|
scaleType: 'symlog';
|
|
543
591
|
};
|
|
@@ -575,12 +623,12 @@ export interface AxisItemIdentifier {
|
|
|
575
623
|
}
|
|
576
624
|
export type XAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<AxisConfig<S, V, ChartsXAxisProps>, 'id'> : never;
|
|
577
625
|
export type YAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<AxisConfig<S, V, ChartsYAxisProps>, 'id'> : never;
|
|
578
|
-
export type RotationAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<
|
|
579
|
-
export type RadiusAxis<S extends
|
|
626
|
+
export type RotationAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<PolarAxisConfig<S, V, ChartsRotationAxisProps>, 'id'> : never;
|
|
627
|
+
export type RadiusAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<PolarAxisConfig<S, V, ChartsRadiusAxisProps>, 'id'> : never;
|
|
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
|
*
|
|
@@ -149,36 +152,22 @@ type AxisSideConfig<AxisProps extends ChartsAxisProps> = AxisProps extends Chart
|
|
|
149
152
|
*
|
|
150
153
|
* The first axis in the list will always have a default position.
|
|
151
154
|
*/
|
|
152
|
-
position?: 'top' | 'bottom' | 'none';
|
|
155
|
+
position?: (AxisProps extends ChartsXAxisProps ? 'top' | 'bottom' : 'none') | (AxisProps extends ChartsYAxisProps ? 'left' | 'right' : 'none') | 'none';
|
|
153
156
|
/**
|
|
154
157
|
* The height of the axis.
|
|
155
158
|
* Set to `'auto'` to automatically calculate the height based on tick label measurements.
|
|
156
159
|
* @default 45 if an axis label is provided, 25 otherwise.
|
|
157
160
|
*/
|
|
158
|
-
height?: number | 'auto';
|
|
159
|
-
} : AxisProps extends ChartsYAxisProps ? {
|
|
160
|
-
/**
|
|
161
|
-
* Position of the axis.
|
|
162
|
-
*
|
|
163
|
-
* When set, the space for the axis is reserved, even if the axis is not displayed due to missing data.
|
|
164
|
-
*
|
|
165
|
-
* Set to 'none' to hide the axis.
|
|
166
|
-
*
|
|
167
|
-
* The first axis in the list will always have a default position.
|
|
168
|
-
*/
|
|
169
|
-
position?: 'left' | 'right' | 'none';
|
|
161
|
+
height?: AxisProps extends ChartsXAxisProps ? number | 'auto' : never;
|
|
170
162
|
/**
|
|
171
163
|
* The width of the axis.
|
|
172
164
|
* Set to `'auto'` to automatically calculate the width based on tick label measurements.
|
|
173
165
|
* @default 65 if an axis label is provided, 45 otherwise.
|
|
174
166
|
*/
|
|
175
|
-
width?: number | 'auto';
|
|
176
|
-
} : {
|
|
177
|
-
position?: 'top' | 'bottom' | 'left' | 'right' | 'none';
|
|
178
|
-
height?: number | 'auto';
|
|
179
|
-
width?: number | 'auto';
|
|
167
|
+
width?: AxisProps extends ChartsYAxisProps ? number | 'auto' : never;
|
|
180
168
|
};
|
|
181
169
|
export interface ChartsRotationAxisProps extends ChartsAxisProps {
|
|
170
|
+
axis?: 'rotation';
|
|
182
171
|
/**
|
|
183
172
|
* The start angle (in deg).
|
|
184
173
|
*/
|
|
@@ -191,8 +180,31 @@ export interface ChartsRotationAxisProps extends ChartsAxisProps {
|
|
|
191
180
|
* The gap between the axis and the label.
|
|
192
181
|
*/
|
|
193
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>;
|
|
194
205
|
}
|
|
195
206
|
export interface ChartsRadiusAxisProps extends ChartsAxisProps {
|
|
207
|
+
axis?: 'radius';
|
|
196
208
|
/**
|
|
197
209
|
* The minimal radius.
|
|
198
210
|
*/
|
|
@@ -201,6 +213,29 @@ export interface ChartsRadiusAxisProps extends ChartsAxisProps {
|
|
|
201
213
|
* The maximal radius.
|
|
202
214
|
*/
|
|
203
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>;
|
|
204
239
|
}
|
|
205
240
|
export type ScaleName = keyof AxisScaleConfig;
|
|
206
241
|
export type ContinuousScaleName = 'linear' | 'log' | 'symlog' | 'pow' | 'sqrt' | 'time' | 'utc';
|
|
@@ -485,7 +520,10 @@ type CommonAxisConfig<S extends ScaleName = ScaleName, V = any> = {
|
|
|
485
520
|
*/
|
|
486
521
|
ignoreTooltip?: boolean;
|
|
487
522
|
};
|
|
488
|
-
|
|
523
|
+
/**
|
|
524
|
+
* Use this type for advanced typing. For basic usage, use `RotationAxis` or `RadiusAxis`.
|
|
525
|
+
*/
|
|
526
|
+
export type PolarAxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsRadialAxisProps = ChartsRadialAxisProps> = {
|
|
489
527
|
/**
|
|
490
528
|
* The offset of the axis in pixels. It can be used to move the axis from its default position.
|
|
491
529
|
* X-axis: A top axis will move up, and a bottom axis will move down.
|
|
@@ -493,11 +531,11 @@ export type PolarAxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps
|
|
|
493
531
|
* @default 0
|
|
494
532
|
*/
|
|
495
533
|
offset?: number;
|
|
496
|
-
} & CommonAxisConfig<S, V> & MinMaxConfig<S> & Omit<Partial<AxisProps>, 'axisId'> & Partial<Omit<AxisScaleConfig[S], 'scale'>> & AxisConfigExtension;
|
|
534
|
+
} & CommonAxisConfig<S, V> & MinMaxConfig<S> & Omit<Partial<AxisProps>, 'axisId'> & Partial<Omit<AxisScaleConfig[S], 'scale'>> & TickParams & AxisConfigExtension;
|
|
497
535
|
/**
|
|
498
|
-
* Use this type for advanced typing. For basic usage, use `XAxis
|
|
536
|
+
* Use this type for advanced typing. For basic usage, use `XAxis` or `YAxis`.
|
|
499
537
|
*/
|
|
500
|
-
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> = {
|
|
501
539
|
/**
|
|
502
540
|
* The offset of the axis in pixels. It can be used to move the axis from its default position.
|
|
503
541
|
* X-axis: A top axis will move up, and a bottom axis will move down.
|
|
@@ -507,13 +545,13 @@ export type AxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps exten
|
|
|
507
545
|
offset?: number;
|
|
508
546
|
} & CommonAxisConfig<S, V> & MinMaxConfig<S> & Omit<Partial<AxisProps>, 'axisId'> & Partial<Omit<AxisScaleConfig[S], 'scale'>> & AxisSideConfig<AxisProps> & TickParams & AxisConfigExtension;
|
|
509
547
|
export interface AxisConfigExtension {}
|
|
510
|
-
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] & {
|
|
511
549
|
/**
|
|
512
550
|
* If true, the contents of the axis will be displayed by a tooltip with `trigger='axis'`.
|
|
513
551
|
*/
|
|
514
552
|
triggerTooltip?: boolean;
|
|
515
553
|
};
|
|
516
|
-
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] & {
|
|
517
555
|
/**
|
|
518
556
|
* An indication of the expected number of ticks.
|
|
519
557
|
*/
|
|
@@ -524,20 +562,30 @@ export type ComputedAxis<S extends ScaleName = ScaleName, V = any, AxisProps ext
|
|
|
524
562
|
triggerTooltip?: boolean;
|
|
525
563
|
/** @ignore - internal. True when a rotation axis covers a full circle. */
|
|
526
564
|
isFullCircle?: boolean;
|
|
527
|
-
} & (AxisProps extends ChartsXAxisProps ? AxisSideConfig<AxisProps> & {
|
|
565
|
+
} & AxisProps & (AxisProps extends ChartsXAxisProps ? AxisSideConfig<AxisProps> & {
|
|
528
566
|
height: number;
|
|
529
|
-
} : AxisProps extends ChartsYAxisProps ? AxisSideConfig<AxisProps> & {
|
|
567
|
+
} : {}) & (AxisProps extends ChartsYAxisProps ? AxisSideConfig<AxisProps> & {
|
|
530
568
|
width: number;
|
|
531
|
-
} :
|
|
569
|
+
} : {}) : never;
|
|
532
570
|
export type ComputedXAxis<S extends ScaleName = ScaleName, V = any> = ComputedAxis<S, V, ChartsXAxisProps>;
|
|
533
571
|
export type ComputedYAxis<S extends ScaleName = ScaleName, V = any> = ComputedAxis<S, V, ChartsYAxisProps>;
|
|
572
|
+
export declare function isBandScaleConfig(scaleConfig: PolarAxisConfig<ScaleName>): scaleConfig is PolarAxisConfig<'band'> & {
|
|
573
|
+
scaleType: 'band';
|
|
574
|
+
};
|
|
534
575
|
export declare function isBandScaleConfig(scaleConfig: AxisConfig<ScaleName>): scaleConfig is AxisConfig<'band'> & {
|
|
535
576
|
scaleType: 'band';
|
|
536
577
|
};
|
|
578
|
+
export declare function isPointScaleConfig(scaleConfig: PolarAxisConfig<ScaleName>): scaleConfig is PolarAxisConfig<'point'> & {
|
|
579
|
+
scaleType: 'point';
|
|
580
|
+
};
|
|
537
581
|
export declare function isPointScaleConfig(scaleConfig: AxisConfig<ScaleName>): scaleConfig is AxisConfig<'point'> & {
|
|
538
582
|
scaleType: 'point';
|
|
539
583
|
};
|
|
584
|
+
export declare function isContinuousScaleConfig(scaleConfig: PolarAxisConfig<ScaleName>): scaleConfig is PolarAxisConfig<ContinuousScaleName>;
|
|
540
585
|
export declare function isContinuousScaleConfig(scaleConfig: AxisConfig<ScaleName>): scaleConfig is AxisConfig<ContinuousScaleName>;
|
|
586
|
+
export declare function isSymlogScaleConfig(scaleConfig: PolarAxisConfig<ScaleName>): scaleConfig is PolarAxisConfig<'symlog'> & {
|
|
587
|
+
scaleType: 'symlog';
|
|
588
|
+
};
|
|
541
589
|
export declare function isSymlogScaleConfig(scaleConfig: AxisConfig<ScaleName>): scaleConfig is AxisConfig<'symlog'> & {
|
|
542
590
|
scaleType: 'symlog';
|
|
543
591
|
};
|
|
@@ -575,12 +623,12 @@ export interface AxisItemIdentifier {
|
|
|
575
623
|
}
|
|
576
624
|
export type XAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<AxisConfig<S, V, ChartsXAxisProps>, 'id'> : never;
|
|
577
625
|
export type YAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<AxisConfig<S, V, ChartsYAxisProps>, 'id'> : never;
|
|
578
|
-
export type RotationAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<
|
|
579
|
-
export type RadiusAxis<S extends
|
|
626
|
+
export type RotationAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<PolarAxisConfig<S, V, ChartsRotationAxisProps>, 'id'> : never;
|
|
627
|
+
export type RadiusAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<PolarAxisConfig<S, V, ChartsRadiusAxisProps>, 'id'> : never;
|
|
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.js
CHANGED
|
@@ -17,7 +17,11 @@ exports.isSymlogScaleConfig = isSymlogScaleConfig;
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* Use this type for advanced typing. For basic usage, use `
|
|
20
|
+
* Use this type for advanced typing. For basic usage, use `RotationAxis` or `RadiusAxis`.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Use this type for advanced typing. For basic usage, use `XAxis` or `YAxis`.
|
|
21
25
|
*/
|
|
22
26
|
|
|
23
27
|
function isBandScaleConfig(scaleConfig) {
|
package/models/axis.mjs
CHANGED
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Use this type for advanced typing. For basic usage, use `
|
|
11
|
+
* Use this type for advanced typing. For basic usage, use `RotationAxis` or `RadiusAxis`.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Use this type for advanced typing. For basic usage, use `XAxis` or `YAxis`.
|
|
12
16
|
*/
|
|
13
17
|
|
|
14
18
|
export function isBandScaleConfig(scaleConfig) {
|
|
@@ -54,12 +54,6 @@ export interface CommonLineSeriesType {
|
|
|
54
54
|
* The label to display on the tooltip or the legend. It can be a string or a function.
|
|
55
55
|
*/
|
|
56
56
|
label?: string | ((location: 'tooltip' | 'legend') => string);
|
|
57
|
-
/**
|
|
58
|
-
* The type of curve to use for the line.
|
|
59
|
-
* Read more about curves at [line interpolation](https://mui.com/x/react-charts/lines/#interpolation).
|
|
60
|
-
* @default 'monotoneX'
|
|
61
|
-
*/
|
|
62
|
-
curve?: CurveType;
|
|
63
57
|
/**
|
|
64
58
|
* If `true`, step curve starts and end at the first and last point.
|
|
65
59
|
* By default the line is extended to fill the space before and after.
|
|
@@ -106,6 +100,12 @@ export interface LineSeriesType extends CommonSeriesType<number | null, 'line'>,
|
|
|
106
100
|
* @default 'none'
|
|
107
101
|
*/
|
|
108
102
|
stackOffset?: StackOffsetType;
|
|
103
|
+
/**
|
|
104
|
+
* The type of curve to use for the line.
|
|
105
|
+
* Read more about curves at [line interpolation](https://mui.com/x/react-charts/lines/#interpolation).
|
|
106
|
+
* @default 'monotoneX'
|
|
107
|
+
*/
|
|
108
|
+
curve?: CurveType;
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
111
111
|
* An object that allows to identify a single line.
|
|
@@ -54,12 +54,6 @@ export interface CommonLineSeriesType {
|
|
|
54
54
|
* The label to display on the tooltip or the legend. It can be a string or a function.
|
|
55
55
|
*/
|
|
56
56
|
label?: string | ((location: 'tooltip' | 'legend') => string);
|
|
57
|
-
/**
|
|
58
|
-
* The type of curve to use for the line.
|
|
59
|
-
* Read more about curves at [line interpolation](https://mui.com/x/react-charts/lines/#interpolation).
|
|
60
|
-
* @default 'monotoneX'
|
|
61
|
-
*/
|
|
62
|
-
curve?: CurveType;
|
|
63
57
|
/**
|
|
64
58
|
* If `true`, step curve starts and end at the first and last point.
|
|
65
59
|
* By default the line is extended to fill the space before and after.
|
|
@@ -106,6 +100,12 @@ export interface LineSeriesType extends CommonSeriesType<number | null, 'line'>,
|
|
|
106
100
|
* @default 'none'
|
|
107
101
|
*/
|
|
108
102
|
stackOffset?: StackOffsetType;
|
|
103
|
+
/**
|
|
104
|
+
* The type of curve to use for the line.
|
|
105
|
+
* Read more about curves at [line interpolation](https://mui.com/x/react-charts/lines/#interpolation).
|
|
106
|
+
* @default 'monotoneX'
|
|
107
|
+
*/
|
|
108
|
+
curve?: CurveType;
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
111
111
|
* An object that allows to identify a single line.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-charts",
|
|
3
|
-
"version": "9.0
|
|
3
|
+
"version": "9.2.0",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The community edition of MUI X Charts components.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,15 +28,15 @@
|
|
|
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.0.2",
|
|
38
37
|
"@mui/x-charts-vendor": "^9.0.0",
|
|
39
|
-
"@mui/x-internals": "^9.0
|
|
38
|
+
"@mui/x-internals": "^9.1.0",
|
|
39
|
+
"@mui/x-internal-gestures": "^9.2.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@emotion/react": "^11.9.0",
|
|
@@ -116,6 +116,20 @@
|
|
|
116
116
|
"default": "./ChartsAxisHighlight/index.mjs"
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
|
+
"./ChartsAxisHighlightValue": {
|
|
120
|
+
"import": {
|
|
121
|
+
"types": "./ChartsAxisHighlightValue/index.d.mts",
|
|
122
|
+
"default": "./ChartsAxisHighlightValue/index.mjs"
|
|
123
|
+
},
|
|
124
|
+
"require": {
|
|
125
|
+
"types": "./ChartsAxisHighlightValue/index.d.ts",
|
|
126
|
+
"default": "./ChartsAxisHighlightValue/index.js"
|
|
127
|
+
},
|
|
128
|
+
"default": {
|
|
129
|
+
"types": "./ChartsAxisHighlightValue/index.d.mts",
|
|
130
|
+
"default": "./ChartsAxisHighlightValue/index.mjs"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
119
133
|
"./ChartsBrushOverlay": {
|
|
120
134
|
"import": {
|
|
121
135
|
"types": "./ChartsBrushOverlay/index.d.mts",
|
|
@@ -256,6 +270,20 @@
|
|
|
256
270
|
"default": "./ChartsOverlay/index.mjs"
|
|
257
271
|
}
|
|
258
272
|
},
|
|
273
|
+
"./ChartsRadialAxisHighlight": {
|
|
274
|
+
"import": {
|
|
275
|
+
"types": "./ChartsRadialAxisHighlight/index.d.mts",
|
|
276
|
+
"default": "./ChartsRadialAxisHighlight/index.mjs"
|
|
277
|
+
},
|
|
278
|
+
"require": {
|
|
279
|
+
"types": "./ChartsRadialAxisHighlight/index.d.ts",
|
|
280
|
+
"default": "./ChartsRadialAxisHighlight/index.js"
|
|
281
|
+
},
|
|
282
|
+
"default": {
|
|
283
|
+
"types": "./ChartsRadialAxisHighlight/index.d.mts",
|
|
284
|
+
"default": "./ChartsRadialAxisHighlight/index.mjs"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
259
287
|
"./ChartsRadialDataProvider": {
|
|
260
288
|
"import": {
|
|
261
289
|
"types": "./ChartsRadialDataProvider/index.d.mts",
|