@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.
Files changed (195) hide show
  1. package/BarChart/BarChart.d.mts +1 -2
  2. package/BarChart/BarChart.d.ts +1 -2
  3. package/BarChart/BarChart.js +2 -913
  4. package/BarChart/BarChart.mjs +2 -913
  5. package/BarChart/seriesConfig/bar/seriesProcessor.js +2 -0
  6. package/BarChart/seriesConfig/bar/seriesProcessor.mjs +2 -0
  7. package/CHANGELOG.md +236 -0
  8. package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.d.mts +55 -0
  9. package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.d.ts +55 -0
  10. package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.js +94 -0
  11. package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.mjs +88 -0
  12. package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.d.mts +13 -0
  13. package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.d.ts +13 -0
  14. package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.js +86 -0
  15. package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.mjs +80 -0
  16. package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.d.mts +18 -0
  17. package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.d.ts +18 -0
  18. package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.js +26 -0
  19. package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.mjs +16 -0
  20. package/ChartsAxisHighlightValue/index.d.mts +1 -0
  21. package/ChartsAxisHighlightValue/index.d.ts +1 -0
  22. package/ChartsAxisHighlightValue/index.js +16 -0
  23. package/ChartsAxisHighlightValue/index.mjs +1 -0
  24. package/ChartsAxisHighlightValue/useAxisHighlightValue.d.mts +14 -0
  25. package/ChartsAxisHighlightValue/useAxisHighlightValue.d.ts +14 -0
  26. package/ChartsAxisHighlightValue/useAxisHighlightValue.js +130 -0
  27. package/ChartsAxisHighlightValue/useAxisHighlightValue.mjs +124 -0
  28. package/ChartsContainer/ChartsContainer.js +4 -1431
  29. package/ChartsContainer/ChartsContainer.mjs +4 -1431
  30. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.d.mts +15 -0
  31. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.d.ts +15 -0
  32. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.js +56 -0
  33. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.mjs +50 -0
  34. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.d.mts +6 -0
  35. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.d.ts +6 -0
  36. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.js +5 -0
  37. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.mjs +1 -0
  38. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlightPath.d.mts +11 -0
  39. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlightPath.d.ts +11 -0
  40. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlightPath.js +70 -0
  41. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlightPath.mjs +64 -0
  42. package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.d.mts +9 -0
  43. package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.d.ts +9 -0
  44. package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.js +104 -0
  45. package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.mjs +98 -0
  46. package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.d.mts +9 -0
  47. package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.d.ts +9 -0
  48. package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.js +98 -0
  49. package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.mjs +92 -0
  50. package/ChartsRadialAxisHighlight/chartsRadialAxisHighlightClasses.d.mts +7 -0
  51. package/ChartsRadialAxisHighlight/chartsRadialAxisHighlightClasses.d.ts +7 -0
  52. package/ChartsRadialAxisHighlight/chartsRadialAxisHighlightClasses.js +14 -0
  53. package/ChartsRadialAxisHighlight/chartsRadialAxisHighlightClasses.mjs +6 -0
  54. package/ChartsRadialAxisHighlight/index.d.mts +5 -0
  55. package/ChartsRadialAxisHighlight/index.d.ts +5 -0
  56. package/ChartsRadialAxisHighlight/index.js +47 -0
  57. package/ChartsRadialAxisHighlight/index.mjs +4 -0
  58. package/ChartsRadiusAxis/ChartsRadiusAxis.d.mts +1 -47
  59. package/ChartsRadiusAxis/ChartsRadiusAxis.d.ts +1 -47
  60. package/ChartsRadiusAxis/ChartsRadiusAxis.js +20 -16
  61. package/ChartsRadiusAxis/ChartsRadiusAxis.mjs +21 -15
  62. package/ChartsRadiusAxis/index.d.mts +3 -2
  63. package/ChartsRadiusAxis/index.d.ts +3 -2
  64. package/ChartsRadiusAxis/index.mjs +3 -1
  65. package/ChartsRotationAxis/ChartsRotationAxis.d.mts +1 -47
  66. package/ChartsRotationAxis/ChartsRotationAxis.d.ts +1 -47
  67. package/ChartsRotationAxis/ChartsRotationAxis.js +16 -19
  68. package/ChartsRotationAxis/ChartsRotationAxis.mjs +17 -18
  69. package/ChartsRotationAxis/index.d.mts +3 -2
  70. package/ChartsRotationAxis/index.d.ts +3 -2
  71. package/ChartsRotationAxis/index.mjs +3 -1
  72. package/ChartsTooltip/useAxesTooltip.d.mts +1 -1
  73. package/ChartsTooltip/useAxesTooltip.d.ts +1 -1
  74. package/ChartsTooltip/useAxesTooltip.js +11 -2
  75. package/ChartsTooltip/useAxesTooltip.mjs +12 -3
  76. package/ChartsXAxis/useAxisTicksProps.d.mts +162 -81
  77. package/ChartsXAxis/useAxisTicksProps.d.ts +162 -81
  78. package/ChartsYAxis/useAxisTicksProps.d.mts +162 -81
  79. package/ChartsYAxis/useAxisTicksProps.d.ts +162 -81
  80. package/LICENSE +2 -0
  81. package/LineChart/LineChart.js +2 -913
  82. package/LineChart/LineChart.mjs +2 -913
  83. package/LineChart/seriesConfig/curveEvaluation.d.mts +19 -1
  84. package/LineChart/seriesConfig/curveEvaluation.d.ts +19 -1
  85. package/LineChart/seriesConfig/curveEvaluation.js +132 -0
  86. package/LineChart/seriesConfig/curveEvaluation.mjs +131 -0
  87. package/LineChart/seriesConfig/getSeriesWithDefaultValues.js +2 -1
  88. package/LineChart/seriesConfig/getSeriesWithDefaultValues.mjs +2 -1
  89. package/LineChart/seriesConfig/seriesProcessor.js +4 -0
  90. package/LineChart/seriesConfig/seriesProcessor.mjs +4 -0
  91. package/LineChart/useAreaPlotData.js +4 -0
  92. package/LineChart/useAreaPlotData.mjs +4 -0
  93. package/LineChart/useLinePlotData.js +2 -0
  94. package/LineChart/useLinePlotData.mjs +2 -0
  95. package/LineChart/useMarkPlotData.js +2 -0
  96. package/LineChart/useMarkPlotData.mjs +2 -0
  97. package/RadarChart/RadarGrid/CircularRadarStripes.js +2 -3
  98. package/RadarChart/RadarGrid/CircularRadarStripes.mjs +2 -3
  99. package/RadarChart/RadarSeriesPlot/useRadarRotationIndex.js +1 -1
  100. package/RadarChart/RadarSeriesPlot/useRadarRotationIndex.mjs +2 -2
  101. package/ScatterChart/FocusedScatterMark.js +10 -24
  102. package/ScatterChart/FocusedScatterMark.mjs +10 -24
  103. package/ScatterChart/HighlightedScatterMark.d.mts +11 -0
  104. package/ScatterChart/HighlightedScatterMark.d.ts +11 -0
  105. package/ScatterChart/HighlightedScatterMark.js +68 -0
  106. package/ScatterChart/HighlightedScatterMark.mjs +62 -0
  107. package/ScatterChart/ScatterChart.d.mts +1 -2
  108. package/ScatterChart/ScatterChart.d.ts +1 -2
  109. package/ScatterChart/ScatterChart.js +2 -913
  110. package/ScatterChart/ScatterChart.mjs +2 -913
  111. package/ScatterChart/index.d.mts +1 -0
  112. package/ScatterChart/index.d.ts +1 -0
  113. package/ScatterChart/index.js +12 -0
  114. package/ScatterChart/index.mjs +1 -0
  115. package/ScatterChart/scatterClasses.d.mts +3 -1
  116. package/ScatterChart/scatterClasses.d.ts +3 -1
  117. package/ScatterChart/scatterClasses.js +3 -2
  118. package/ScatterChart/scatterClasses.mjs +3 -2
  119. package/ScatterChart/useScatterChartProps.js +3 -1
  120. package/ScatterChart/useScatterChartProps.mjs +3 -1
  121. package/ScatterChart/useScatterItemPosition.d.mts +16 -0
  122. package/ScatterChart/useScatterItemPosition.d.ts +16 -0
  123. package/ScatterChart/useScatterItemPosition.js +47 -0
  124. package/ScatterChart/useScatterItemPosition.mjs +41 -0
  125. package/SparkLineChart/SparkLineChart.js +2 -913
  126. package/SparkLineChart/SparkLineChart.mjs +2 -913
  127. package/hooks/useAxis.d.mts +3 -3
  128. package/hooks/useAxis.d.ts +3 -3
  129. package/hooks/useAxisSystem.d.mts +1 -1
  130. package/hooks/useAxisSystem.d.ts +1 -1
  131. package/hooks/useAxisSystem.js +1 -1
  132. package/hooks/useAxisSystem.mjs +1 -1
  133. package/index.d.mts +2 -0
  134. package/index.d.ts +2 -0
  135. package/index.js +25 -1
  136. package/index.mjs +3 -1
  137. package/internals/getRingPath.d.mts +16 -0
  138. package/internals/getRingPath.d.ts +16 -0
  139. package/internals/getRingPath.js +39 -0
  140. package/internals/getRingPath.mjs +33 -0
  141. package/internals/index.d.mts +8 -1
  142. package/internals/index.d.ts +8 -1
  143. package/internals/index.js +67 -0
  144. package/internals/index.mjs +7 -1
  145. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +4 -2
  146. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.mjs +4 -2
  147. package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.mts +2 -2
  148. package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.ts +2 -2
  149. package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.d.mts +3 -3
  150. package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.d.ts +3 -3
  151. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.mts +1 -0
  152. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -0
  153. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +8 -0
  154. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.mjs +1 -0
  155. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.d.mts +6 -1
  156. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.d.ts +6 -1
  157. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.js +48 -36
  158. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.mjs +47 -36
  159. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +77 -3
  160. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +77 -3
  161. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.mts +152 -2
  162. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +152 -2
  163. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.mts +2 -2
  164. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +2 -2
  165. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.mts +4 -7
  166. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +4 -7
  167. package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.d.mts +3 -2
  168. package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.d.ts +3 -2
  169. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.mts +2 -2
  170. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +2 -2
  171. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.d.mts +7 -2
  172. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.d.ts +7 -2
  173. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.js +56 -6
  174. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.mjs +54 -5
  175. package/internals/plugins/featurePlugins/useChartPolarAxis/index.d.mts +2 -1
  176. package/internals/plugins/featurePlugins/useChartPolarAxis/index.d.ts +2 -1
  177. package/internals/plugins/featurePlugins/useChartPolarAxis/index.js +12 -0
  178. package/internals/plugins/featurePlugins/useChartPolarAxis/index.mjs +2 -1
  179. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +1 -1
  180. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.mjs +2 -2
  181. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.mts +4 -4
  182. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +4 -4
  183. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.mts +3 -3
  184. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.ts +3 -3
  185. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.mts +23 -3
  186. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +23 -3
  187. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +73 -12
  188. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.mjs +74 -12
  189. package/models/axis.d.mts +79 -31
  190. package/models/axis.d.ts +79 -31
  191. package/models/axis.js +5 -1
  192. package/models/axis.mjs +5 -1
  193. package/models/seriesType/line.d.mts +6 -6
  194. package/models/seriesType/line.d.ts +6 -6
  195. 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 AxisSideConfig<AxisProps extends ChartsAxisProps> = AxisProps extends ChartsXAxisProps ? {
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
- export type PolarAxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsAxisProps = ChartsRotationAxisProps | ChartsRadiusAxisProps> = {
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`, `YAxis`, `RotationAxis` or `RadiusAxis`.
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 ChartsAxisProps = ChartsXAxisProps | ChartsYAxisProps> = {
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 = ChartsRotationAxisProps | ChartsRadiusAxisProps> = Omit<PolarAxisConfig<S, V, AxisProps>, 'scaleType'> & AxisScaleConfig[S] & AxisScaleComputedConfig[S] & {
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 = ChartsXAxisProps | ChartsYAxisProps> = MakeRequired<Omit<DefaultedAxis<S, V, AxisProps>, 'scaleType'>, 'offset'> & AxisScaleConfig[S] & AxisScaleComputedConfig[S] & {
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
- } : AxisSideConfig<AxisProps>);
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<AxisConfig<S, V, ChartsRotationAxisProps>, 'id'> : never;
579
- export type RadiusAxis<S extends 'linear' = 'linear', V = any> = S extends 'linear' ? MakeOptional<AxisConfig<S, V, ChartsRadiusAxisProps>, 'id'> : never;
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 = ChartsXAxisProps | ChartsYAxisProps> = AxisConfig<S, V, AxisProps> & {
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 AxisSideConfig<AxisProps extends ChartsAxisProps> = AxisProps extends ChartsXAxisProps ? {
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
- export type PolarAxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsAxisProps = ChartsRotationAxisProps | ChartsRadiusAxisProps> = {
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`, `YAxis`, `RotationAxis` or `RadiusAxis`.
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 ChartsAxisProps = ChartsXAxisProps | ChartsYAxisProps> = {
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 = ChartsRotationAxisProps | ChartsRadiusAxisProps> = Omit<PolarAxisConfig<S, V, AxisProps>, 'scaleType'> & AxisScaleConfig[S] & AxisScaleComputedConfig[S] & {
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 = ChartsXAxisProps | ChartsYAxisProps> = MakeRequired<Omit<DefaultedAxis<S, V, AxisProps>, 'scaleType'>, 'offset'> & AxisScaleConfig[S] & AxisScaleComputedConfig[S] & {
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
- } : AxisSideConfig<AxisProps>);
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<AxisConfig<S, V, ChartsRotationAxisProps>, 'id'> : never;
579
- export type RadiusAxis<S extends 'linear' = 'linear', V = any> = S extends 'linear' ? MakeOptional<AxisConfig<S, V, ChartsRadiusAxisProps>, 'id'> : never;
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 = ChartsXAxisProps | ChartsYAxisProps> = AxisConfig<S, V, AxisProps> & {
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 `XAxis`, `YAxis`, `RotationAxis` or `RadiusAxis`.
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 `XAxis`, `YAxis`, `RotationAxis` or `RadiusAxis`.
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.4",
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.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.4"
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",