@mui/x-charts 9.5.0 → 9.6.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 (200) hide show
  1. package/BarChart/BarChart.js +1 -1
  2. package/BarChart/BarChart.mjs +1 -1
  3. package/BarChart/BarElement.js +2 -1
  4. package/BarChart/BarElement.mjs +2 -1
  5. package/BarChart/BarLabel/BarLabel.js +1 -1
  6. package/BarChart/BarLabel/BarLabel.mjs +1 -1
  7. package/BarChart/BarPlot.js +1 -1
  8. package/BarChart/BarPlot.mjs +1 -1
  9. package/CHANGELOG.md +151 -0
  10. package/ChartsAxis/ChartsAxis.js +1 -1
  11. package/ChartsAxis/ChartsAxis.mjs +1 -1
  12. package/ChartsAxisHighlight/ChartsAxisHighlight.js +1 -1
  13. package/ChartsAxisHighlight/ChartsAxisHighlight.mjs +1 -1
  14. package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.js +2 -2
  15. package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.mjs +2 -2
  16. package/ChartsBrushOverlay/ChartsBrushOverlay.d.mts +5 -1
  17. package/ChartsBrushOverlay/ChartsBrushOverlay.d.ts +5 -1
  18. package/ChartsBrushOverlay/ChartsBrushOverlay.js +12 -1
  19. package/ChartsBrushOverlay/ChartsBrushOverlay.mjs +14 -2
  20. package/ChartsClipPath/ChartsClipPath.js +1 -1
  21. package/ChartsClipPath/ChartsClipPath.mjs +1 -1
  22. package/ChartsContainer/ChartsContainer.js +5 -3
  23. package/ChartsContainer/ChartsContainer.mjs +5 -3
  24. package/ChartsDataProvider/ChartsDataProvider.js +5 -1
  25. package/ChartsDataProvider/ChartsDataProvider.mjs +5 -1
  26. package/ChartsGrid/ChartsGrid.js +5 -1
  27. package/ChartsGrid/ChartsGrid.mjs +5 -1
  28. package/ChartsLayerContainer/ChartsLayerContainer.js +1 -1
  29. package/ChartsLayerContainer/ChartsLayerContainer.mjs +1 -1
  30. package/ChartsLocalizationProvider/ChartsLocalizationProvider.js +1 -1
  31. package/ChartsLocalizationProvider/ChartsLocalizationProvider.mjs +1 -1
  32. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.js +2 -2
  33. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.mjs +2 -2
  34. package/ChartsRadialDataProvider/ChartsRadialDataProvider.js +9 -1
  35. package/ChartsRadialDataProvider/ChartsRadialDataProvider.mjs +9 -1
  36. package/ChartsRadialGrid/ChartsRadialGrid.js +5 -1
  37. package/ChartsRadialGrid/ChartsRadialGrid.mjs +5 -1
  38. package/ChartsRadiusAxis/ChartsRadiusAxis.d.mts +8 -2
  39. package/ChartsRadiusAxis/ChartsRadiusAxis.d.ts +8 -2
  40. package/ChartsRadiusAxis/ChartsRadiusAxis.js +143 -3
  41. package/ChartsRadiusAxis/ChartsRadiusAxis.mjs +144 -5
  42. package/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
  43. package/ChartsReferenceLine/ChartsReferenceLine.mjs +1 -1
  44. package/ChartsRotationAxis/ChartsRotationAxis.d.mts +8 -2
  45. package/ChartsRotationAxis/ChartsRotationAxis.d.ts +8 -2
  46. package/ChartsRotationAxis/ChartsRotationAxis.js +140 -3
  47. package/ChartsRotationAxis/ChartsRotationAxis.mjs +141 -5
  48. package/ChartsRotationAxis/index.d.mts +1 -1
  49. package/ChartsRotationAxis/index.d.ts +1 -1
  50. package/ChartsSurface/ChartsSurface.js +1 -1
  51. package/ChartsSurface/ChartsSurface.mjs +1 -1
  52. package/ChartsSvgLayer/ChartsSvgLayer.js +1 -1
  53. package/ChartsSvgLayer/ChartsSvgLayer.mjs +1 -1
  54. package/ChartsText/ChartsText.js +2 -2
  55. package/ChartsText/ChartsText.mjs +2 -2
  56. package/ChartsTooltip/ChartsAxisTooltipContent.js +22 -3
  57. package/ChartsTooltip/ChartsAxisTooltipContent.mjs +22 -3
  58. package/ChartsTooltip/ChartsItemTooltipContent.js +52 -1
  59. package/ChartsTooltip/ChartsItemTooltipContent.mjs +52 -1
  60. package/ChartsTooltip/ChartsTooltip.js +13 -33
  61. package/ChartsTooltip/ChartsTooltip.mjs +13 -33
  62. package/ChartsTooltip/ChartsTooltipContainer.js +6 -26
  63. package/ChartsTooltip/ChartsTooltipContainer.mjs +6 -26
  64. package/ChartsWrapper/ChartsWrapper.js +1 -1
  65. package/ChartsWrapper/ChartsWrapper.mjs +1 -1
  66. package/ChartsXAxis/ChartsSingleXAxisTicks.js +1 -1
  67. package/ChartsXAxis/ChartsSingleXAxisTicks.mjs +1 -1
  68. package/ChartsXAxis/ChartsXAxis.js +11 -2
  69. package/ChartsXAxis/ChartsXAxis.mjs +11 -2
  70. package/ChartsYAxis/ChartsSingleYAxisTicks.js +1 -1
  71. package/ChartsYAxis/ChartsSingleYAxisTicks.mjs +1 -1
  72. package/ChartsYAxis/ChartsYAxis.js +11 -2
  73. package/ChartsYAxis/ChartsYAxis.mjs +11 -2
  74. package/ChartsYAxis/ChartsYAxisImpl.js +1 -1
  75. package/ChartsYAxis/ChartsYAxisImpl.mjs +1 -1
  76. package/Gauge/Gauge.js +1 -1
  77. package/Gauge/Gauge.mjs +1 -1
  78. package/Gauge/GaugeContainer.js +1 -1
  79. package/Gauge/GaugeContainer.mjs +1 -1
  80. package/Gauge/GaugeValueArc.js +2 -2
  81. package/Gauge/GaugeValueArc.mjs +2 -2
  82. package/Gauge/GaugeValueText.js +1 -1
  83. package/Gauge/GaugeValueText.mjs +1 -1
  84. package/LineChart/AnimatedArea.js +3 -3
  85. package/LineChart/AnimatedArea.mjs +3 -3
  86. package/LineChart/AnimatedLine.js +1 -1
  87. package/LineChart/AnimatedLine.mjs +1 -1
  88. package/LineChart/AreaElement.js +1 -1
  89. package/LineChart/AreaElement.mjs +1 -1
  90. package/LineChart/AreaPlot.js +1 -1
  91. package/LineChart/AreaPlot.mjs +1 -1
  92. package/LineChart/LineChart.js +1 -1
  93. package/LineChart/LineChart.mjs +1 -1
  94. package/LineChart/LineElement.js +4 -2
  95. package/LineChart/LineElement.mjs +4 -2
  96. package/LineChart/LineHighlightElement.js +1 -2
  97. package/LineChart/LineHighlightElement.mjs +1 -2
  98. package/LineChart/LineHighlightPlot.js +1 -1
  99. package/LineChart/LineHighlightPlot.mjs +1 -1
  100. package/LineChart/LinePlot.js +1 -1
  101. package/LineChart/LinePlot.mjs +1 -1
  102. package/LineChart/MarkElement.js +3 -2
  103. package/LineChart/MarkElement.mjs +3 -2
  104. package/LineChart/MarkPlot.js +2 -1
  105. package/LineChart/MarkPlot.mjs +2 -1
  106. package/PieChart/FocusedPieArc.d.mts +5 -1
  107. package/PieChart/FocusedPieArc.d.ts +5 -1
  108. package/PieChart/FocusedPieArc.js +22 -1
  109. package/PieChart/FocusedPieArc.mjs +24 -2
  110. package/PieChart/PieArc.js +1 -1
  111. package/PieChart/PieArc.mjs +1 -1
  112. package/PieChart/PieArcLabel.js +1 -1
  113. package/PieChart/PieArcLabel.mjs +1 -1
  114. package/PieChart/PieArcLabelPlot.js +7 -6
  115. package/PieChart/PieArcLabelPlot.mjs +7 -6
  116. package/PieChart/PieArcPlot.js +7 -6
  117. package/PieChart/PieArcPlot.mjs +7 -6
  118. package/PieChart/PieChart.js +1 -1
  119. package/PieChart/PieChart.mjs +1 -1
  120. package/PieChart/PiePlot.js +2 -1
  121. package/PieChart/PiePlot.mjs +2 -1
  122. package/RadarChart/RadarAxis/RadarAxis.js +5 -1
  123. package/RadarChart/RadarAxis/RadarAxis.mjs +5 -1
  124. package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.js +6 -2
  125. package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.mjs +6 -2
  126. package/RadarChart/RadarChart.js +1 -1
  127. package/RadarChart/RadarChart.mjs +1 -1
  128. package/RadarChart/RadarGrid/RadarGrid.js +1 -5
  129. package/RadarChart/RadarGrid/RadarGrid.mjs +1 -5
  130. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +5 -1
  131. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.mjs +5 -1
  132. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +5 -1
  133. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.mjs +5 -1
  134. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +5 -1
  135. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.mjs +5 -1
  136. package/ScatterChart/Scatter.js +1 -1
  137. package/ScatterChart/Scatter.mjs +1 -1
  138. package/ScatterChart/ScatterChart.js +5 -3
  139. package/ScatterChart/ScatterChart.mjs +5 -3
  140. package/ScatterChart/ScatterMarker.js +2 -2
  141. package/ScatterChart/ScatterMarker.mjs +2 -2
  142. package/ScatterChart/ScatterPlot.d.mts +8 -1
  143. package/ScatterChart/ScatterPlot.d.ts +8 -1
  144. package/ScatterChart/ScatterPlot.js +5 -2
  145. package/ScatterChart/ScatterPlot.mjs +5 -2
  146. package/ScatterChart/seriesConfig/getColor.js +6 -15
  147. package/ScatterChart/seriesConfig/getColor.mjs +6 -15
  148. package/SparkLineChart/SparkLineChart.js +1 -1
  149. package/SparkLineChart/SparkLineChart.mjs +1 -1
  150. package/Toolbar/Toolbar.js +1 -1
  151. package/Toolbar/Toolbar.mjs +1 -1
  152. package/Toolbar/ToolbarButton.js +1 -1
  153. package/Toolbar/ToolbarButton.mjs +1 -1
  154. package/index.d.mts +1 -1
  155. package/index.d.ts +1 -1
  156. package/index.js +1 -1
  157. package/index.mjs +1 -1
  158. package/internals/colorScale.d.mts +2 -2
  159. package/internals/colorScale.d.ts +2 -2
  160. package/internals/colorScale.js +2 -2
  161. package/internals/colorScale.mjs +2 -2
  162. package/internals/index.d.mts +2 -0
  163. package/internals/index.d.ts +2 -0
  164. package/internals/index.js +8 -0
  165. package/internals/index.mjs +2 -0
  166. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +16 -30
  167. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.mjs +17 -31
  168. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.mts +8 -1
  169. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +8 -1
  170. package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.mts +1 -1
  171. package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.ts +1 -1
  172. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.mts +7 -0
  173. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.ts +7 -0
  174. package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.mts +0 -8
  175. package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +0 -8
  176. package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +1 -2
  177. package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.mjs +2 -2
  178. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +6 -1
  179. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.mjs +6 -1
  180. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.js +6 -2
  181. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.mjs +6 -2
  182. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.d.mts +49 -0
  183. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.d.ts +49 -0
  184. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.js +124 -0
  185. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.mjs +117 -0
  186. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.types.d.mts +64 -0
  187. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.types.d.ts +64 -0
  188. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.types.js +5 -0
  189. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.types.mjs +1 -0
  190. package/internals/resolveColorProcessor.js +4 -7
  191. package/internals/resolveColorProcessor.mjs +4 -7
  192. package/models/axis.d.mts +20 -4
  193. package/models/axis.d.ts +20 -4
  194. package/models/colorMapping.d.mts +8 -0
  195. package/models/colorMapping.d.ts +8 -0
  196. package/package.json +7 -4
  197. package/hooks/useIsHydrated.d.mts +0 -4
  198. package/hooks/useIsHydrated.d.ts +0 -4
  199. package/hooks/useIsHydrated.js +0 -19
  200. package/hooks/useIsHydrated.mjs +0 -14
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.ChartsRotationAxis = ChartsRotationAxis;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _clsx = _interopRequireDefault(require("clsx"));
11
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
12
  var _styles = require("@mui/material/styles");
12
13
  var _useTicks = require("../hooks/useTicks");
13
14
  var _useAxis = require("../hooks/useAxis");
@@ -17,7 +18,8 @@ var _chartsRotationAxisClasses = require("./chartsRotationAxisClasses");
17
18
  var _createGetLabelTextAnchors = require("../ChartsRadiusAxis/createGetLabelTextAnchors");
18
19
  var _getLabelTransform = require("./getLabelTransform");
19
20
  var _jsxRuntime = require("react/jsx-runtime");
20
- /* Gap between a tick and its label. */const TICK_LABEL_GAP = 3;
21
+ /* Gap between a tick and its label. */
22
+ const TICK_LABEL_GAP = 3;
21
23
  const getLabelTextAnchors = (0, _createGetLabelTextAnchors.createGetLabelTextAnchors)(_getLabelTransform.getLabelTransform);
22
24
  function ChartsRotationAxis(props) {
23
25
  const rotationAxis = (0, _useAxis.useRotationAxis)(props.axisId);
@@ -25,6 +27,7 @@ function ChartsRotationAxis(props) {
25
27
  const {
26
28
  disableLine,
27
29
  disableTicks,
30
+ disableTickLabel,
28
31
  position = 'outside',
29
32
  tickLabelPosition = position === 'outside' ? 'after' : 'before',
30
33
  tickPosition = position === 'outside' ? 'after' : 'before',
@@ -122,7 +125,7 @@ function ChartsRotationAxis(props) {
122
125
  y2: ty + tickDy,
123
126
  stroke: stroke,
124
127
  className: classes.tick
125
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("text", (0, _extends2.default)({
128
+ }), !disableTickLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)("text", (0, _extends2.default)({
126
129
  x: labelX,
127
130
  y: labelY,
128
131
  fill: stroke,
@@ -135,4 +138,138 @@ function ChartsRotationAxis(props) {
135
138
  }, index);
136
139
  })]
137
140
  });
138
- }
141
+ }
142
+ process.env.NODE_ENV !== "production" ? ChartsRotationAxis.propTypes /* remove-proptypes */ = {
143
+ // ----------------------------- Warning --------------------------------
144
+ // | These PropTypes are generated from the TypeScript type definitions |
145
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
146
+ // ----------------------------------------------------------------------
147
+ axis: _propTypes.default.oneOf(['rotation']),
148
+ /**
149
+ * The id of the axis to render.
150
+ * If undefined, it will be the first defined axis.
151
+ */
152
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
153
+ /**
154
+ * Override or extend the styles applied to the component.
155
+ */
156
+ classes: _propTypes.default.object,
157
+ /**
158
+ * A CSS class name applied to the root element.
159
+ */
160
+ className: _propTypes.default.string,
161
+ /**
162
+ * If true, the axis line is disabled.
163
+ * @default false
164
+ */
165
+ disableLine: _propTypes.default.bool,
166
+ /**
167
+ * If true, the tick labels are not rendered.
168
+ * @default false
169
+ */
170
+ disableTickLabel: _propTypes.default.bool,
171
+ /**
172
+ * If true, the ticks are disabled.
173
+ * @default false
174
+ */
175
+ disableTicks: _propTypes.default.bool,
176
+ /**
177
+ * The end angle (in deg).
178
+ */
179
+ endAngle: _propTypes.default.number,
180
+ /**
181
+ * The label of the axis.
182
+ */
183
+ label: _propTypes.default.string,
184
+ /**
185
+ * The gap between the axis and the label.
186
+ */
187
+ labelGap: _propTypes.default.number,
188
+ /**
189
+ * The style applied to the axis label.
190
+ */
191
+ labelStyle: _propTypes.default.object,
192
+ /**
193
+ * The position of the rotation axis.
194
+ * It can be 'inside' or 'outside'.
195
+ * @default 'outside'
196
+ */
197
+ position: _propTypes.default.oneOf(['inside', 'none', 'outside']),
198
+ /**
199
+ * The start angle (in deg).
200
+ */
201
+ startAngle: _propTypes.default.number,
202
+ sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
203
+ /**
204
+ * Defines which ticks are displayed.
205
+ * Its value can be:
206
+ * - 'auto' In such case the ticks are computed based on axis scale and other parameters.
207
+ * - a filtering function of the form `(value, index) => boolean` which is available only if the axis has "point" scale.
208
+ * - an array containing the values where ticks should be displayed.
209
+ * @see See {@link https://mui.com/x/react-charts/axis/#fixed-tick-positions}
210
+ * @default 'auto'
211
+ */
212
+ tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
213
+ /**
214
+ * Defines which ticks get its label displayed. Its value can be:
215
+ * - 'auto' In such case, labels are displayed if they do not overlap with the previous one.
216
+ * - a filtering function of the form (value, index) => boolean. Warning: the index is tick index, not data ones.
217
+ * @default 'auto'
218
+ */
219
+ tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
220
+ /**
221
+ * The placement of ticks label. Can be the middle of the band, or the tick position.
222
+ * Only used if scale is 'band'.
223
+ * @default 'middle'
224
+ */
225
+ tickLabelPlacement: _propTypes.default.oneOf(['middle', 'tick']),
226
+ /**
227
+ * Set the position of the tick labels relative to the axis line.
228
+ * `'after'` places them outside the arc, `'before'` inside.
229
+ * @default position === 'outside' ? 'after' : 'before'
230
+ */
231
+ tickLabelPosition: _propTypes.default.oneOf(['after', 'before']),
232
+ /**
233
+ * The style applied to ticks text.
234
+ */
235
+ tickLabelStyle: _propTypes.default.object,
236
+ /**
237
+ * Maximal step between two ticks.
238
+ * When using time data, the value is assumed to be in ms.
239
+ * Not supported by categorical axis (band, points).
240
+ */
241
+ tickMaxStep: _propTypes.default.number,
242
+ /**
243
+ * Minimal step between two ticks.
244
+ * When using time data, the value is assumed to be in ms.
245
+ * Not supported by categorical axis (band, points).
246
+ */
247
+ tickMinStep: _propTypes.default.number,
248
+ /**
249
+ * The number of ticks. This number is not guaranteed.
250
+ * Not supported by categorical axis (band, points).
251
+ */
252
+ tickNumber: _propTypes.default.number,
253
+ /**
254
+ * The placement of ticks in regard to the band interval.
255
+ * Only used if scale is 'band'.
256
+ * @default 'extremities'
257
+ */
258
+ tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
259
+ /**
260
+ * Set the position of the tick relative to the axis line.
261
+ * `'after'` places them outside the arc, `'before'` inside.
262
+ * @default position === 'outside' ? 'after' : 'before'
263
+ */
264
+ tickPosition: _propTypes.default.oneOf(['after', 'before']),
265
+ /**
266
+ * The size of the ticks.
267
+ * @default 6
268
+ */
269
+ tickSize: _propTypes.default.number,
270
+ /**
271
+ * The minimum space between ticks when using an ordinal scale. It defines the minimum distance in pixels between two ticks.
272
+ * @default 0
273
+ */
274
+ tickSpacing: _propTypes.default.number
275
+ } : void 0;
@@ -2,6 +2,7 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import clsx from 'clsx';
5
+ import PropTypes from 'prop-types';
5
6
  import { useTheme } from '@mui/material/styles';
6
7
  import { useTicks } from "../hooks/useTicks.mjs";
7
8
  import { useRadiusAxis, useRotationAxis } from "../hooks/useAxis.mjs";
@@ -10,17 +11,17 @@ import { selectorChartPolarCenter } from "../internals/plugins/featurePlugins/us
10
11
  import { useUtilityClasses } from "./chartsRotationAxisClasses.mjs";
11
12
  import { createGetLabelTextAnchors } from "../ChartsRadiusAxis/createGetLabelTextAnchors.mjs";
12
13
  import { getLabelTransform } from "./getLabelTransform.mjs";
13
-
14
- /* Gap between a tick and its label. */
15
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
+ /* Gap between a tick and its label. */
16
16
  const TICK_LABEL_GAP = 3;
17
17
  const getLabelTextAnchors = createGetLabelTextAnchors(getLabelTransform);
18
- export function ChartsRotationAxis(props) {
18
+ function ChartsRotationAxis(props) {
19
19
  const rotationAxis = useRotationAxis(props.axisId);
20
20
  const settings = _extends({}, rotationAxis, props);
21
21
  const {
22
22
  disableLine,
23
23
  disableTicks,
24
+ disableTickLabel,
24
25
  position = 'outside',
25
26
  tickLabelPosition = position === 'outside' ? 'after' : 'before',
26
27
  tickPosition = position === 'outside' ? 'after' : 'before',
@@ -118,7 +119,7 @@ export function ChartsRotationAxis(props) {
118
119
  y2: ty + tickDy,
119
120
  stroke: stroke,
120
121
  className: classes.tick
121
- }), /*#__PURE__*/_jsx("text", _extends({
122
+ }), !disableTickLabel && /*#__PURE__*/_jsx("text", _extends({
122
123
  x: labelX,
123
124
  y: labelY,
124
125
  fill: stroke,
@@ -131,4 +132,139 @@ export function ChartsRotationAxis(props) {
131
132
  }, index);
132
133
  })]
133
134
  });
134
- }
135
+ }
136
+ process.env.NODE_ENV !== "production" ? ChartsRotationAxis.propTypes /* remove-proptypes */ = {
137
+ // ----------------------------- Warning --------------------------------
138
+ // | These PropTypes are generated from the TypeScript type definitions |
139
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
140
+ // ----------------------------------------------------------------------
141
+ axis: PropTypes.oneOf(['rotation']),
142
+ /**
143
+ * The id of the axis to render.
144
+ * If undefined, it will be the first defined axis.
145
+ */
146
+ axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
147
+ /**
148
+ * Override or extend the styles applied to the component.
149
+ */
150
+ classes: PropTypes.object,
151
+ /**
152
+ * A CSS class name applied to the root element.
153
+ */
154
+ className: PropTypes.string,
155
+ /**
156
+ * If true, the axis line is disabled.
157
+ * @default false
158
+ */
159
+ disableLine: PropTypes.bool,
160
+ /**
161
+ * If true, the tick labels are not rendered.
162
+ * @default false
163
+ */
164
+ disableTickLabel: PropTypes.bool,
165
+ /**
166
+ * If true, the ticks are disabled.
167
+ * @default false
168
+ */
169
+ disableTicks: PropTypes.bool,
170
+ /**
171
+ * The end angle (in deg).
172
+ */
173
+ endAngle: PropTypes.number,
174
+ /**
175
+ * The label of the axis.
176
+ */
177
+ label: PropTypes.string,
178
+ /**
179
+ * The gap between the axis and the label.
180
+ */
181
+ labelGap: PropTypes.number,
182
+ /**
183
+ * The style applied to the axis label.
184
+ */
185
+ labelStyle: PropTypes.object,
186
+ /**
187
+ * The position of the rotation axis.
188
+ * It can be 'inside' or 'outside'.
189
+ * @default 'outside'
190
+ */
191
+ position: PropTypes.oneOf(['inside', 'none', 'outside']),
192
+ /**
193
+ * The start angle (in deg).
194
+ */
195
+ startAngle: PropTypes.number,
196
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
197
+ /**
198
+ * Defines which ticks are displayed.
199
+ * Its value can be:
200
+ * - 'auto' In such case the ticks are computed based on axis scale and other parameters.
201
+ * - a filtering function of the form `(value, index) => boolean` which is available only if the axis has "point" scale.
202
+ * - an array containing the values where ticks should be displayed.
203
+ * @see See {@link https://mui.com/x/react-charts/axis/#fixed-tick-positions}
204
+ * @default 'auto'
205
+ */
206
+ tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
207
+ /**
208
+ * Defines which ticks get its label displayed. Its value can be:
209
+ * - 'auto' In such case, labels are displayed if they do not overlap with the previous one.
210
+ * - a filtering function of the form (value, index) => boolean. Warning: the index is tick index, not data ones.
211
+ * @default 'auto'
212
+ */
213
+ tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
214
+ /**
215
+ * The placement of ticks label. Can be the middle of the band, or the tick position.
216
+ * Only used if scale is 'band'.
217
+ * @default 'middle'
218
+ */
219
+ tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
220
+ /**
221
+ * Set the position of the tick labels relative to the axis line.
222
+ * `'after'` places them outside the arc, `'before'` inside.
223
+ * @default position === 'outside' ? 'after' : 'before'
224
+ */
225
+ tickLabelPosition: PropTypes.oneOf(['after', 'before']),
226
+ /**
227
+ * The style applied to ticks text.
228
+ */
229
+ tickLabelStyle: PropTypes.object,
230
+ /**
231
+ * Maximal step between two ticks.
232
+ * When using time data, the value is assumed to be in ms.
233
+ * Not supported by categorical axis (band, points).
234
+ */
235
+ tickMaxStep: PropTypes.number,
236
+ /**
237
+ * Minimal step between two ticks.
238
+ * When using time data, the value is assumed to be in ms.
239
+ * Not supported by categorical axis (band, points).
240
+ */
241
+ tickMinStep: PropTypes.number,
242
+ /**
243
+ * The number of ticks. This number is not guaranteed.
244
+ * Not supported by categorical axis (band, points).
245
+ */
246
+ tickNumber: PropTypes.number,
247
+ /**
248
+ * The placement of ticks in regard to the band interval.
249
+ * Only used if scale is 'band'.
250
+ * @default 'extremities'
251
+ */
252
+ tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
253
+ /**
254
+ * Set the position of the tick relative to the axis line.
255
+ * `'after'` places them outside the arc, `'before'` inside.
256
+ * @default position === 'outside' ? 'after' : 'before'
257
+ */
258
+ tickPosition: PropTypes.oneOf(['after', 'before']),
259
+ /**
260
+ * The size of the ticks.
261
+ * @default 6
262
+ */
263
+ tickSize: PropTypes.number,
264
+ /**
265
+ * The minimum space between ticks when using an ordinal scale. It defines the minimum distance in pixels between two ticks.
266
+ * @default 0
267
+ */
268
+ tickSpacing: PropTypes.number
269
+ } : void 0;
270
+ export { ChartsRotationAxis };
@@ -1,5 +1,5 @@
1
1
  import { ChartsRotationAxis } from "./ChartsRotationAxis.mjs";
2
- export { ChartsRotationAxis } from "./ChartsRotationAxis.mjs";
2
+ export { ChartsRotationAxis, type ChartsRotationAxisSlots, type ChartsRotationAxisSlotProps } from "./ChartsRotationAxis.mjs";
3
3
  /**
4
4
  * @deprecated rotation axis is now stable, import `ChartsRotationAxis` instead
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import { ChartsRotationAxis } from "./ChartsRotationAxis.js";
2
- export { ChartsRotationAxis } from "./ChartsRotationAxis.js";
2
+ export { ChartsRotationAxis, type ChartsRotationAxisSlots, type ChartsRotationAxisSlotProps } from "./ChartsRotationAxis.js";
3
3
  /**
4
4
  * @deprecated rotation axis is now stable, import `ChartsRotationAxis` instead
5
5
  */
@@ -54,7 +54,7 @@ const ChartsSurface = exports.ChartsSurface = /*#__PURE__*/React.forwardRef(func
54
54
  });
55
55
  });
56
56
  if (process.env.NODE_ENV !== "production") ChartsSurface.displayName = "ChartsSurface";
57
- process.env.NODE_ENV !== "production" ? ChartsSurface.propTypes = {
57
+ process.env.NODE_ENV !== "production" ? ChartsSurface.propTypes /* remove-proptypes */ = {
58
58
  // ----------------------------- Warning --------------------------------
59
59
  // | These PropTypes are generated from the TypeScript type definitions |
60
60
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -48,7 +48,7 @@ const ChartsSurface = /*#__PURE__*/React.forwardRef(function ChartsSurface(inPro
48
48
  });
49
49
  });
50
50
  if (process.env.NODE_ENV !== "production") ChartsSurface.displayName = "ChartsSurface";
51
- process.env.NODE_ENV !== "production" ? ChartsSurface.propTypes = {
51
+ process.env.NODE_ENV !== "production" ? ChartsSurface.propTypes /* remove-proptypes */ = {
52
52
  // ----------------------------- Warning --------------------------------
53
53
  // | These PropTypes are generated from the TypeScript type definitions |
54
54
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -68,7 +68,7 @@ const ChartsSvgLayer = exports.ChartsSvgLayer = /*#__PURE__*/React.forwardRef(fu
68
68
  }));
69
69
  });
70
70
  if (process.env.NODE_ENV !== "production") ChartsSvgLayer.displayName = "ChartsSvgLayer";
71
- process.env.NODE_ENV !== "production" ? ChartsSvgLayer.propTypes = {
71
+ process.env.NODE_ENV !== "production" ? ChartsSvgLayer.propTypes /* remove-proptypes */ = {
72
72
  // ----------------------------- Warning --------------------------------
73
73
  // | These PropTypes are generated from the TypeScript type definitions |
74
74
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -61,7 +61,7 @@ const ChartsSvgLayer = /*#__PURE__*/React.forwardRef(function ChartsSvgLayer(inP
61
61
  }));
62
62
  });
63
63
  if (process.env.NODE_ENV !== "production") ChartsSvgLayer.displayName = "ChartsSvgLayer";
64
- process.env.NODE_ENV !== "production" ? ChartsSvgLayer.propTypes = {
64
+ process.env.NODE_ENV !== "production" ? ChartsSvgLayer.propTypes /* remove-proptypes */ = {
65
65
  // ----------------------------- Warning --------------------------------
66
66
  // | These PropTypes are generated from the TypeScript type definitions |
67
67
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -11,8 +11,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
11
11
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
12
12
  var React = _interopRequireWildcard(require("react"));
13
13
  var _propTypes = _interopRequireDefault(require("prop-types"));
14
+ var _useIsHydrated = require("@mui/x-internals/useIsHydrated");
14
15
  var _getWordsByLines = require("../internals/getWordsByLines");
15
- var _useIsHydrated = require("../hooks/useIsHydrated");
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
17
  const _excluded = ["x", "y", "style", "text", "ownerState"],
18
18
  _excluded2 = ["angle", "textAnchor", "dominantBaseline"];
@@ -69,7 +69,7 @@ function ChartsText(props) {
69
69
  }, index))
70
70
  }));
71
71
  }
72
- process.env.NODE_ENV !== "production" ? ChartsText.propTypes = {
72
+ process.env.NODE_ENV !== "production" ? ChartsText.propTypes /* remove-proptypes */ = {
73
73
  // ----------------------------- Warning --------------------------------
74
74
  // | These PropTypes are generated from the TypeScript type definitions |
75
75
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -6,8 +6,8 @@ const _excluded = ["x", "y", "style", "text", "ownerState"],
6
6
  _excluded2 = ["angle", "textAnchor", "dominantBaseline"];
7
7
  import * as React from 'react';
8
8
  import PropTypes from 'prop-types';
9
+ import { useIsHydrated } from '@mui/x-internals/useIsHydrated';
9
10
  import { getWordsByLines } from "../internals/getWordsByLines.mjs";
10
- import { useIsHydrated } from "../hooks/useIsHydrated.mjs";
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  /**
13
13
  * Helper component to manage multiline text in SVG
@@ -62,7 +62,7 @@ function ChartsText(props) {
62
62
  }, index))
63
63
  }));
64
64
  }
65
- process.env.NODE_ENV !== "production" ? ChartsText.propTypes = {
65
+ process.env.NODE_ENV !== "production" ? ChartsText.propTypes /* remove-proptypes */ = {
66
66
  // ----------------------------- Warning --------------------------------
67
67
  // | These PropTypes are generated from the TypeScript type definitions |
68
68
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -101,7 +101,26 @@ function DefaultContent(props) {
101
101
  })]
102
102
  });
103
103
  }
104
- process.env.NODE_ENV !== "production" ? ChartsAxisTooltipContent.propTypes = {
104
+ process.env.NODE_ENV !== "production" ? DefaultContent.propTypes /* remove-proptypes */ = {
105
+ // ----------------------------- Warning --------------------------------
106
+ // | These PropTypes are generated from the TypeScript type definitions |
107
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
108
+ // ----------------------------------------------------------------------
109
+ /**
110
+ * Override or extend the styles applied to the component.
111
+ */
112
+ classes: _propTypes.default.object,
113
+ item: _propTypes.default.shape({
114
+ color: _propTypes.default.string.isRequired,
115
+ formattedLabel: _propTypes.default.string,
116
+ formattedValue: _propTypes.default.object.isRequired,
117
+ markShape: _propTypes.default.oneOf(['circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye']),
118
+ markType: _propTypes.default.oneOfType([_propTypes.default.oneOf(['circle', 'line', 'line+mark', 'square']), _propTypes.default.func]),
119
+ seriesId: _propTypes.default.string.isRequired,
120
+ value: _propTypes.default.any.isRequired
121
+ }).isRequired
122
+ } : void 0;
123
+ process.env.NODE_ENV !== "production" ? ChartsAxisTooltipContent.propTypes /* remove-proptypes */ = {
105
124
  // ----------------------------- Warning --------------------------------
106
125
  // | These PropTypes are generated from the TypeScript type definitions |
107
126
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -110,11 +129,11 @@ process.env.NODE_ENV !== "production" ? ChartsAxisTooltipContent.propTypes = {
110
129
  * Override or extend the styles applied to the component.
111
130
  */
112
131
  classes: _propTypes.default.object,
113
- sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
114
132
  /**
115
133
  * The sort in which series items are displayed in the tooltip.
116
134
  * When set to `none`, series are sorted as they are provided in the series property. Otherwise they are sorted by their value.
117
135
  * @default 'none'
118
136
  */
119
- sort: _propTypes.default.oneOf(['none', 'asc', 'desc'])
137
+ sort: _propTypes.default.oneOf(['asc', 'desc', 'none']),
138
+ sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
120
139
  } : void 0;
@@ -95,7 +95,26 @@ function DefaultContent(props) {
95
95
  })]
96
96
  });
97
97
  }
98
- process.env.NODE_ENV !== "production" ? ChartsAxisTooltipContent.propTypes = {
98
+ process.env.NODE_ENV !== "production" ? DefaultContent.propTypes /* remove-proptypes */ = {
99
+ // ----------------------------- Warning --------------------------------
100
+ // | These PropTypes are generated from the TypeScript type definitions |
101
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
102
+ // ----------------------------------------------------------------------
103
+ /**
104
+ * Override or extend the styles applied to the component.
105
+ */
106
+ classes: PropTypes.object,
107
+ item: PropTypes.shape({
108
+ color: PropTypes.string.isRequired,
109
+ formattedLabel: PropTypes.string,
110
+ formattedValue: PropTypes.object.isRequired,
111
+ markShape: PropTypes.oneOf(['circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye']),
112
+ markType: PropTypes.oneOfType([PropTypes.oneOf(['circle', 'line', 'line+mark', 'square']), PropTypes.func]),
113
+ seriesId: PropTypes.string.isRequired,
114
+ value: PropTypes.any.isRequired
115
+ }).isRequired
116
+ } : void 0;
117
+ process.env.NODE_ENV !== "production" ? ChartsAxisTooltipContent.propTypes /* remove-proptypes */ = {
99
118
  // ----------------------------- Warning --------------------------------
100
119
  // | These PropTypes are generated from the TypeScript type definitions |
101
120
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -104,12 +123,12 @@ process.env.NODE_ENV !== "production" ? ChartsAxisTooltipContent.propTypes = {
104
123
  * Override or extend the styles applied to the component.
105
124
  */
106
125
  classes: PropTypes.object,
107
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
108
126
  /**
109
127
  * The sort in which series items are displayed in the tooltip.
110
128
  * When set to `none`, series are sorted as they are provided in the series property. Otherwise they are sorted by their value.
111
129
  * @default 'none'
112
130
  */
113
- sort: PropTypes.oneOf(['none', 'asc', 'desc'])
131
+ sort: PropTypes.oneOf(['asc', 'desc', 'none']),
132
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
114
133
  } : void 0;
115
134
  export { ChartsAxisTooltipContent };
@@ -105,6 +105,34 @@ function DefaultMultipleValueContent({
105
105
  }, value.label))
106
106
  });
107
107
  }
108
+ process.env.NODE_ENV !== "production" ? DefaultMultipleValueContent.propTypes /* remove-proptypes */ = {
109
+ // ----------------------------- Warning --------------------------------
110
+ // | These PropTypes are generated from the TypeScript type definitions |
111
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
112
+ // ----------------------------------------------------------------------
113
+ /**
114
+ * Override or extend the styles applied to the component.
115
+ */
116
+ classes: _propTypes.default.object,
117
+ item: _propTypes.default.shape({
118
+ color: _propTypes.default.string.isRequired,
119
+ identifier: _propTypes.default.shape({
120
+ dataIndex: _propTypes.default.number,
121
+ seriesId: _propTypes.default.string.isRequired,
122
+ type: _propTypes.default.oneOf(['radar']).isRequired
123
+ }).isRequired,
124
+ label: _propTypes.default.string,
125
+ markShape: _propTypes.default.oneOf(['circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye']),
126
+ markType: _propTypes.default.oneOfType([_propTypes.default.oneOf(['circle', 'line', 'line+mark', 'square']), _propTypes.default.func]),
127
+ values: _propTypes.default.arrayOf(_propTypes.default.shape({
128
+ formattedValue: _propTypes.default.string,
129
+ label: _propTypes.default.string,
130
+ markShape: _propTypes.default.oneOf(['circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye']),
131
+ markType: _propTypes.default.oneOfType([_propTypes.default.oneOf(['circle', 'line', 'line+mark', 'square']), _propTypes.default.func]),
132
+ value: _propTypes.default.number.isRequired
133
+ })).isRequired
134
+ }).isRequired
135
+ } : void 0;
108
136
  function DefaultSingleValueContent({
109
137
  classes: propClasses,
110
138
  item
@@ -143,7 +171,30 @@ function DefaultSingleValueContent({
143
171
  })]
144
172
  });
145
173
  }
146
- process.env.NODE_ENV !== "production" ? ChartsItemTooltipContent.propTypes = {
174
+ process.env.NODE_ENV !== "production" ? DefaultSingleValueContent.propTypes /* remove-proptypes */ = {
175
+ // ----------------------------- Warning --------------------------------
176
+ // | These PropTypes are generated from the TypeScript type definitions |
177
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
178
+ // ----------------------------------------------------------------------
179
+ /**
180
+ * Override or extend the styles applied to the component.
181
+ */
182
+ classes: _propTypes.default.object,
183
+ item: _propTypes.default.shape({
184
+ color: _propTypes.default.string.isRequired,
185
+ formattedValue: _propTypes.default.any.isRequired,
186
+ identifier: _propTypes.default.shape({
187
+ dataIndex: _propTypes.default.number,
188
+ seriesId: _propTypes.default.string.isRequired,
189
+ type: _propTypes.default.oneOf(['bar', 'line', 'pie', 'radar', 'scatter']).isRequired
190
+ }).isRequired,
191
+ label: _propTypes.default.string,
192
+ markShape: _propTypes.default.oneOf(['circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye']),
193
+ markType: _propTypes.default.oneOfType([_propTypes.default.oneOf(['circle', 'line', 'line+mark', 'square']), _propTypes.default.func]),
194
+ value: _propTypes.default.any.isRequired
195
+ }).isRequired
196
+ } : void 0;
197
+ process.env.NODE_ENV !== "production" ? ChartsItemTooltipContent.propTypes /* remove-proptypes */ = {
147
198
  // ----------------------------- Warning --------------------------------
148
199
  // | These PropTypes are generated from the TypeScript type definitions |
149
200
  // | To update them edit the TypeScript types and run "pnpm proptypes" |