@mui/x-charts 9.0.1 → 9.0.3

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 (206) hide show
  1. package/BarChart/BarChart.js +29 -10
  2. package/BarChart/BarChart.mjs +29 -10
  3. package/BarChart/BarElement.js +1 -5
  4. package/BarChart/BarElement.mjs +1 -5
  5. package/BarChart/BarPlot.js +2 -1
  6. package/BarChart/BarPlot.mjs +2 -1
  7. package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.mts +8 -7
  8. package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +8 -7
  9. package/BarChart/seriesConfig/bar/seriesProcessor.js +37 -13
  10. package/BarChart/seriesConfig/bar/seriesProcessor.mjs +37 -13
  11. package/CHANGELOG.md +257 -0
  12. package/ChartsContainer/ChartsContainer.js +59 -30
  13. package/ChartsContainer/ChartsContainer.mjs +59 -30
  14. package/ChartsDataProvider/useChartsDataProviderProps.js +1 -6
  15. package/ChartsDataProvider/useChartsDataProviderProps.mjs +1 -6
  16. package/ChartsGrid/styledComponents.js +2 -2
  17. package/ChartsGrid/styledComponents.mjs +2 -2
  18. package/ChartsRadialDataProvider/ChartsRadialDataProvider.d.mts +38 -0
  19. package/ChartsRadialDataProvider/ChartsRadialDataProvider.d.ts +38 -0
  20. package/ChartsRadialDataProvider/ChartsRadialDataProvider.js +115 -0
  21. package/ChartsRadialDataProvider/ChartsRadialDataProvider.mjs +109 -0
  22. package/ChartsRadialDataProvider/ChartsRadialDataProvider.plugins.d.mts +9 -0
  23. package/ChartsRadialDataProvider/ChartsRadialDataProvider.plugins.d.ts +9 -0
  24. package/ChartsRadialDataProvider/ChartsRadialDataProvider.plugins.js +13 -0
  25. package/ChartsRadialDataProvider/ChartsRadialDataProvider.plugins.mjs +7 -0
  26. package/ChartsRadialDataProvider/index.d.mts +2 -0
  27. package/ChartsRadialDataProvider/index.d.ts +2 -0
  28. package/ChartsRadialDataProvider/index.js +27 -0
  29. package/ChartsRadialDataProvider/index.mjs +2 -0
  30. package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.d.mts +13 -0
  31. package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.d.ts +13 -0
  32. package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.js +46 -0
  33. package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.mjs +39 -0
  34. package/ChartsRadialGrid/ChartsRadialGrid.d.mts +33 -0
  35. package/ChartsRadialGrid/ChartsRadialGrid.d.ts +33 -0
  36. package/ChartsRadialGrid/ChartsRadialGrid.js +101 -0
  37. package/ChartsRadialGrid/ChartsRadialGrid.mjs +96 -0
  38. package/ChartsRadialGrid/ChartsRadiusGrid.d.mts +14 -0
  39. package/ChartsRadialGrid/ChartsRadiusGrid.d.ts +14 -0
  40. package/ChartsRadialGrid/ChartsRadiusGrid.js +72 -0
  41. package/ChartsRadialGrid/ChartsRadiusGrid.mjs +65 -0
  42. package/ChartsRadialGrid/ChartsRotationGrid.d.mts +13 -0
  43. package/ChartsRadialGrid/ChartsRotationGrid.d.ts +13 -0
  44. package/ChartsRadialGrid/ChartsRotationGrid.js +65 -0
  45. package/ChartsRadialGrid/ChartsRotationGrid.mjs +58 -0
  46. package/ChartsRadialGrid/chartsRadialGridClasses.d.mts +13 -0
  47. package/ChartsRadialGrid/chartsRadialGridClasses.d.ts +13 -0
  48. package/ChartsRadialGrid/chartsRadialGridClasses.js +14 -0
  49. package/ChartsRadialGrid/chartsRadialGridClasses.mjs +6 -0
  50. package/ChartsRadialGrid/index.d.mts +3 -0
  51. package/ChartsRadialGrid/index.d.ts +3 -0
  52. package/ChartsRadialGrid/index.js +19 -0
  53. package/ChartsRadialGrid/index.mjs +2 -0
  54. package/ChartsRadialGrid/styledComponents.d.mts +4 -0
  55. package/ChartsRadialGrid/styledComponents.d.ts +4 -0
  56. package/ChartsRadialGrid/styledComponents.js +50 -0
  57. package/ChartsRadialGrid/styledComponents.mjs +44 -0
  58. package/ChartsRadiusAxis/ChartsRadiusAxis.d.mts +48 -0
  59. package/ChartsRadiusAxis/ChartsRadiusAxis.d.ts +48 -0
  60. package/ChartsRadiusAxis/ChartsRadiusAxis.js +147 -0
  61. package/ChartsRadiusAxis/ChartsRadiusAxis.mjs +141 -0
  62. package/ChartsRadiusAxis/chartsRadiusAxisClasses.d.mts +6 -0
  63. package/ChartsRadiusAxis/chartsRadiusAxisClasses.d.ts +6 -0
  64. package/ChartsRadiusAxis/chartsRadiusAxisClasses.js +30 -0
  65. package/ChartsRadiusAxis/chartsRadiusAxisClasses.mjs +17 -0
  66. package/ChartsRadiusAxis/createGetLabelTextAnchors.d.mts +10 -0
  67. package/ChartsRadiusAxis/createGetLabelTextAnchors.d.ts +10 -0
  68. package/ChartsRadiusAxis/createGetLabelTextAnchors.js +46 -0
  69. package/ChartsRadiusAxis/createGetLabelTextAnchors.mjs +39 -0
  70. package/ChartsRadiusAxis/getLabelTransform.d.mts +11 -0
  71. package/ChartsRadiusAxis/getLabelTransform.d.ts +11 -0
  72. package/ChartsRadiusAxis/getLabelTransform.js +37 -0
  73. package/ChartsRadiusAxis/getLabelTransform.mjs +31 -0
  74. package/ChartsRadiusAxis/index.d.mts +3 -0
  75. package/ChartsRadiusAxis/index.d.ts +3 -0
  76. package/ChartsRadiusAxis/index.js +19 -0
  77. package/ChartsRadiusAxis/index.mjs +2 -0
  78. package/ChartsRadiusAxis/sharedRadialAxisClasses.d.mts +21 -0
  79. package/ChartsRadiusAxis/sharedRadialAxisClasses.d.ts +21 -0
  80. package/ChartsRadiusAxis/sharedRadialAxisClasses.js +14 -0
  81. package/ChartsRadiusAxis/sharedRadialAxisClasses.mjs +6 -0
  82. package/ChartsRotationAxis/ChartsRotationAxis.d.mts +48 -0
  83. package/ChartsRotationAxis/ChartsRotationAxis.d.ts +48 -0
  84. package/ChartsRotationAxis/ChartsRotationAxis.js +141 -0
  85. package/ChartsRotationAxis/ChartsRotationAxis.mjs +135 -0
  86. package/ChartsRotationAxis/chartsRotationAxisClasses.d.mts +5 -0
  87. package/ChartsRotationAxis/chartsRotationAxisClasses.d.ts +5 -0
  88. package/ChartsRotationAxis/chartsRotationAxisClasses.js +29 -0
  89. package/ChartsRotationAxis/chartsRotationAxisClasses.mjs +16 -0
  90. package/ChartsRotationAxis/getLabelTransform.d.mts +11 -0
  91. package/ChartsRotationAxis/getLabelTransform.d.ts +11 -0
  92. package/ChartsRotationAxis/getLabelTransform.js +37 -0
  93. package/ChartsRotationAxis/getLabelTransform.mjs +31 -0
  94. package/ChartsRotationAxis/index.d.mts +2 -0
  95. package/ChartsRotationAxis/index.d.ts +2 -0
  96. package/ChartsRotationAxis/index.js +19 -0
  97. package/ChartsRotationAxis/index.mjs +2 -0
  98. package/ChartsTooltip/useAxesTooltip.js +7 -4
  99. package/ChartsTooltip/useAxesTooltip.mjs +8 -5
  100. package/ChartsTooltip/useItemTooltip.d.mts +1 -1
  101. package/ChartsTooltip/useItemTooltip.d.ts +1 -1
  102. package/ChartsTooltip/useItemTooltip.js +17 -2
  103. package/ChartsTooltip/useItemTooltip.mjs +18 -3
  104. package/ChartsXAxis/useAxisTicksProps.d.mts +652 -490
  105. package/ChartsXAxis/useAxisTicksProps.d.ts +652 -490
  106. package/ChartsYAxis/useAxisTicksProps.d.mts +652 -490
  107. package/ChartsYAxis/useAxisTicksProps.d.ts +652 -490
  108. package/LineChart/LineChart.js +27 -9
  109. package/LineChart/LineChart.mjs +27 -9
  110. package/LineChart/seriesConfig/curveEvaluation.js +24 -19
  111. package/LineChart/seriesConfig/curveEvaluation.mjs +24 -19
  112. package/LineChart/seriesConfig/getItemAtPosition.js +14 -3
  113. package/LineChart/seriesConfig/getItemAtPosition.mjs +14 -3
  114. package/LineChart/seriesConfig/getSeriesWithDefaultValues.js +4 -6
  115. package/LineChart/seriesConfig/getSeriesWithDefaultValues.mjs +4 -6
  116. package/LineChart/seriesConfig/seriesProcessor.d.mts +4 -2
  117. package/LineChart/seriesConfig/seriesProcessor.d.ts +4 -2
  118. package/LineChart/seriesConfig/seriesProcessor.js +39 -15
  119. package/LineChart/seriesConfig/seriesProcessor.mjs +39 -15
  120. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.mts +2 -2
  121. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +2 -2
  122. package/ScatterChart/Scatter.d.mts +11 -0
  123. package/ScatterChart/Scatter.d.ts +11 -0
  124. package/ScatterChart/Scatter.js +11 -0
  125. package/ScatterChart/Scatter.mjs +14 -0
  126. package/ScatterChart/ScatterChart.js +29 -10
  127. package/ScatterChart/ScatterChart.mjs +29 -10
  128. package/ScatterChart/seriesConfig/seriesProcessor.js +9 -4
  129. package/ScatterChart/seriesConfig/seriesProcessor.mjs +9 -4
  130. package/SparkLineChart/SparkLineChart.js +27 -9
  131. package/SparkLineChart/SparkLineChart.mjs +27 -9
  132. package/hooks/useAxis.d.mts +2 -2
  133. package/hooks/useAxis.d.ts +2 -2
  134. package/hooks/useTicks.d.mts +1 -1
  135. package/hooks/useTicks.d.ts +1 -1
  136. package/hooks/useTicks.js +21 -3
  137. package/hooks/useTicks.mjs +21 -3
  138. package/index.d.mts +4 -0
  139. package/index.d.ts +4 -0
  140. package/index.js +46 -2
  141. package/index.mjs +5 -1
  142. package/internals/cubiqSolver.d.mts +5 -0
  143. package/internals/cubiqSolver.d.ts +5 -0
  144. package/internals/cubiqSolver.js +62 -0
  145. package/internals/cubiqSolver.mjs +56 -0
  146. package/internals/index.d.mts +5 -1
  147. package/internals/index.d.ts +5 -1
  148. package/internals/index.js +47 -2
  149. package/internals/index.mjs +5 -1
  150. package/internals/isPolar.d.mts +3 -2
  151. package/internals/isPolar.d.ts +3 -2
  152. package/internals/isPolar.js +4 -0
  153. package/internals/isPolar.mjs +3 -0
  154. package/internals/material/index.js +6 -1
  155. package/internals/material/index.mjs +6 -1
  156. package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.mts +8 -9
  157. package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.ts +8 -9
  158. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +8 -12
  159. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.mjs +8 -12
  160. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +1 -0
  161. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +1 -0
  162. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.mts +3 -2
  163. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +3 -2
  164. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +29 -16
  165. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.mjs +30 -17
  166. package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.js +3 -3
  167. package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.mjs +3 -3
  168. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.mts +2 -2
  169. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +2 -2
  170. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +3 -3
  171. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.mjs +3 -3
  172. package/models/axis.d.mts +13 -2
  173. package/models/axis.d.ts +13 -2
  174. package/models/seriesType/bar.d.mts +21 -7
  175. package/models/seriesType/bar.d.ts +21 -7
  176. package/models/seriesType/common.d.mts +10 -0
  177. package/models/seriesType/common.d.ts +10 -0
  178. package/models/seriesType/composition.d.mts +3 -1
  179. package/models/seriesType/composition.d.ts +3 -1
  180. package/models/seriesType/composition.js +6 -2
  181. package/models/seriesType/composition.mjs +5 -1
  182. package/models/seriesType/index.d.mts +3 -3
  183. package/models/seriesType/index.d.ts +3 -3
  184. package/models/seriesType/index.js +0 -22
  185. package/models/seriesType/index.mjs +0 -2
  186. package/models/seriesType/line.d.mts +22 -8
  187. package/models/seriesType/line.d.ts +22 -8
  188. package/models/seriesType/scatter.d.mts +9 -0
  189. package/models/seriesType/scatter.d.ts +9 -0
  190. package/models/slots/chartsBaseSlotProps.d.mts +17 -0
  191. package/models/slots/chartsBaseSlotProps.d.ts +17 -0
  192. package/models/slots/chartsBaseSlots.d.mts +7 -1
  193. package/models/slots/chartsBaseSlots.d.ts +7 -1
  194. package/models/z-axis.d.mts +9 -0
  195. package/models/z-axis.d.ts +9 -0
  196. package/package.json +182 -126
  197. package/themeAugmentation/components.d.mts +4 -0
  198. package/themeAugmentation/components.d.ts +4 -0
  199. package/themeAugmentation/overrides.d.mts +2 -0
  200. package/themeAugmentation/overrides.d.ts +2 -0
  201. package/themeAugmentation/props.d.mts +2 -0
  202. package/themeAugmentation/props.d.ts +2 -0
  203. package/utils/epsilon.d.mts +1 -0
  204. package/utils/epsilon.d.ts +1 -0
  205. package/utils/epsilon.js +7 -0
  206. package/utils/epsilon.mjs +1 -0
@@ -648,7 +648,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
648
648
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
649
649
  tickSize: _propTypes.default.number,
650
650
  tickSpacing: _propTypes.default.number,
651
- valueFormatter: _propTypes.default.func
651
+ valueFormatter: _propTypes.default.func,
652
+ valueGetter: _propTypes.default.func
652
653
  }), _propTypes.default.shape({
653
654
  axis: _propTypes.default.oneOf(['x']),
654
655
  classes: _propTypes.default.object,
@@ -707,7 +708,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
707
708
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
708
709
  tickSize: _propTypes.default.number,
709
710
  tickSpacing: _propTypes.default.number,
710
- valueFormatter: _propTypes.default.func
711
+ valueFormatter: _propTypes.default.func,
712
+ valueGetter: _propTypes.default.func
711
713
  }), _propTypes.default.shape({
712
714
  axis: _propTypes.default.oneOf(['x']),
713
715
  classes: _propTypes.default.object,
@@ -753,7 +755,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
753
755
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
754
756
  tickSize: _propTypes.default.number,
755
757
  tickSpacing: _propTypes.default.number,
756
- valueFormatter: _propTypes.default.func
758
+ valueFormatter: _propTypes.default.func,
759
+ valueGetter: _propTypes.default.func
757
760
  }), _propTypes.default.shape({
758
761
  axis: _propTypes.default.oneOf(['x']),
759
762
  classes: _propTypes.default.object,
@@ -800,7 +803,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
800
803
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
801
804
  tickSize: _propTypes.default.number,
802
805
  tickSpacing: _propTypes.default.number,
803
- valueFormatter: _propTypes.default.func
806
+ valueFormatter: _propTypes.default.func,
807
+ valueGetter: _propTypes.default.func
804
808
  }), _propTypes.default.shape({
805
809
  axis: _propTypes.default.oneOf(['x']),
806
810
  classes: _propTypes.default.object,
@@ -846,7 +850,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
846
850
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
847
851
  tickSize: _propTypes.default.number,
848
852
  tickSpacing: _propTypes.default.number,
849
- valueFormatter: _propTypes.default.func
853
+ valueFormatter: _propTypes.default.func,
854
+ valueGetter: _propTypes.default.func
850
855
  }), _propTypes.default.shape({
851
856
  axis: _propTypes.default.oneOf(['x']),
852
857
  classes: _propTypes.default.object,
@@ -892,7 +897,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
892
897
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
893
898
  tickSize: _propTypes.default.number,
894
899
  tickSpacing: _propTypes.default.number,
895
- valueFormatter: _propTypes.default.func
900
+ valueFormatter: _propTypes.default.func,
901
+ valueGetter: _propTypes.default.func
896
902
  }), _propTypes.default.shape({
897
903
  axis: _propTypes.default.oneOf(['x']),
898
904
  classes: _propTypes.default.object,
@@ -942,7 +948,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
942
948
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
943
949
  tickSize: _propTypes.default.number,
944
950
  tickSpacing: _propTypes.default.number,
945
- valueFormatter: _propTypes.default.func
951
+ valueFormatter: _propTypes.default.func,
952
+ valueGetter: _propTypes.default.func
946
953
  }), _propTypes.default.shape({
947
954
  axis: _propTypes.default.oneOf(['x']),
948
955
  classes: _propTypes.default.object,
@@ -992,7 +999,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
992
999
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
993
1000
  tickSize: _propTypes.default.number,
994
1001
  tickSpacing: _propTypes.default.number,
995
- valueFormatter: _propTypes.default.func
1002
+ valueFormatter: _propTypes.default.func,
1003
+ valueGetter: _propTypes.default.func
996
1004
  }), _propTypes.default.shape({
997
1005
  axis: _propTypes.default.oneOf(['x']),
998
1006
  classes: _propTypes.default.object,
@@ -1038,7 +1046,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1038
1046
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
1039
1047
  tickSize: _propTypes.default.number,
1040
1048
  tickSpacing: _propTypes.default.number,
1041
- valueFormatter: _propTypes.default.func
1049
+ valueFormatter: _propTypes.default.func,
1050
+ valueGetter: _propTypes.default.func
1042
1051
  })]),
1043
1052
  /**
1044
1053
  * The yAxis configuration.
@@ -1103,6 +1112,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1103
1112
  tickSize: _propTypes.default.number,
1104
1113
  tickSpacing: _propTypes.default.number,
1105
1114
  valueFormatter: _propTypes.default.func,
1115
+ valueGetter: _propTypes.default.func,
1106
1116
  width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
1107
1117
  }), _propTypes.default.shape({
1108
1118
  axis: _propTypes.default.oneOf(['y']),
@@ -1161,6 +1171,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1161
1171
  tickSize: _propTypes.default.number,
1162
1172
  tickSpacing: _propTypes.default.number,
1163
1173
  valueFormatter: _propTypes.default.func,
1174
+ valueGetter: _propTypes.default.func,
1164
1175
  width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
1165
1176
  }), _propTypes.default.shape({
1166
1177
  axis: _propTypes.default.oneOf(['y']),
@@ -1206,6 +1217,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1206
1217
  tickSize: _propTypes.default.number,
1207
1218
  tickSpacing: _propTypes.default.number,
1208
1219
  valueFormatter: _propTypes.default.func,
1220
+ valueGetter: _propTypes.default.func,
1209
1221
  width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
1210
1222
  }), _propTypes.default.shape({
1211
1223
  axis: _propTypes.default.oneOf(['y']),
@@ -1252,6 +1264,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1252
1264
  tickSize: _propTypes.default.number,
1253
1265
  tickSpacing: _propTypes.default.number,
1254
1266
  valueFormatter: _propTypes.default.func,
1267
+ valueGetter: _propTypes.default.func,
1255
1268
  width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
1256
1269
  }), _propTypes.default.shape({
1257
1270
  axis: _propTypes.default.oneOf(['y']),
@@ -1297,6 +1310,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1297
1310
  tickSize: _propTypes.default.number,
1298
1311
  tickSpacing: _propTypes.default.number,
1299
1312
  valueFormatter: _propTypes.default.func,
1313
+ valueGetter: _propTypes.default.func,
1300
1314
  width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
1301
1315
  }), _propTypes.default.shape({
1302
1316
  axis: _propTypes.default.oneOf(['y']),
@@ -1342,6 +1356,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1342
1356
  tickSize: _propTypes.default.number,
1343
1357
  tickSpacing: _propTypes.default.number,
1344
1358
  valueFormatter: _propTypes.default.func,
1359
+ valueGetter: _propTypes.default.func,
1345
1360
  width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
1346
1361
  }), _propTypes.default.shape({
1347
1362
  axis: _propTypes.default.oneOf(['y']),
@@ -1391,6 +1406,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1391
1406
  tickSize: _propTypes.default.number,
1392
1407
  tickSpacing: _propTypes.default.number,
1393
1408
  valueFormatter: _propTypes.default.func,
1409
+ valueGetter: _propTypes.default.func,
1394
1410
  width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
1395
1411
  }), _propTypes.default.shape({
1396
1412
  axis: _propTypes.default.oneOf(['y']),
@@ -1440,6 +1456,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1440
1456
  tickSize: _propTypes.default.number,
1441
1457
  tickSpacing: _propTypes.default.number,
1442
1458
  valueFormatter: _propTypes.default.func,
1459
+ valueGetter: _propTypes.default.func,
1443
1460
  width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
1444
1461
  }), _propTypes.default.shape({
1445
1462
  axis: _propTypes.default.oneOf(['y']),
@@ -1485,6 +1502,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1485
1502
  tickSize: _propTypes.default.number,
1486
1503
  tickSpacing: _propTypes.default.number,
1487
1504
  valueFormatter: _propTypes.default.func,
1505
+ valueGetter: _propTypes.default.func,
1488
1506
  width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
1489
1507
  })])
1490
1508
  } : void 0;
@@ -641,7 +641,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
641
641
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
642
642
  tickSize: PropTypes.number,
643
643
  tickSpacing: PropTypes.number,
644
- valueFormatter: PropTypes.func
644
+ valueFormatter: PropTypes.func,
645
+ valueGetter: PropTypes.func
645
646
  }), PropTypes.shape({
646
647
  axis: PropTypes.oneOf(['x']),
647
648
  classes: PropTypes.object,
@@ -700,7 +701,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
700
701
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
701
702
  tickSize: PropTypes.number,
702
703
  tickSpacing: PropTypes.number,
703
- valueFormatter: PropTypes.func
704
+ valueFormatter: PropTypes.func,
705
+ valueGetter: PropTypes.func
704
706
  }), PropTypes.shape({
705
707
  axis: PropTypes.oneOf(['x']),
706
708
  classes: PropTypes.object,
@@ -746,7 +748,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
746
748
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
747
749
  tickSize: PropTypes.number,
748
750
  tickSpacing: PropTypes.number,
749
- valueFormatter: PropTypes.func
751
+ valueFormatter: PropTypes.func,
752
+ valueGetter: PropTypes.func
750
753
  }), PropTypes.shape({
751
754
  axis: PropTypes.oneOf(['x']),
752
755
  classes: PropTypes.object,
@@ -793,7 +796,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
793
796
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
794
797
  tickSize: PropTypes.number,
795
798
  tickSpacing: PropTypes.number,
796
- valueFormatter: PropTypes.func
799
+ valueFormatter: PropTypes.func,
800
+ valueGetter: PropTypes.func
797
801
  }), PropTypes.shape({
798
802
  axis: PropTypes.oneOf(['x']),
799
803
  classes: PropTypes.object,
@@ -839,7 +843,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
839
843
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
840
844
  tickSize: PropTypes.number,
841
845
  tickSpacing: PropTypes.number,
842
- valueFormatter: PropTypes.func
846
+ valueFormatter: PropTypes.func,
847
+ valueGetter: PropTypes.func
843
848
  }), PropTypes.shape({
844
849
  axis: PropTypes.oneOf(['x']),
845
850
  classes: PropTypes.object,
@@ -885,7 +890,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
885
890
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
886
891
  tickSize: PropTypes.number,
887
892
  tickSpacing: PropTypes.number,
888
- valueFormatter: PropTypes.func
893
+ valueFormatter: PropTypes.func,
894
+ valueGetter: PropTypes.func
889
895
  }), PropTypes.shape({
890
896
  axis: PropTypes.oneOf(['x']),
891
897
  classes: PropTypes.object,
@@ -935,7 +941,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
935
941
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
936
942
  tickSize: PropTypes.number,
937
943
  tickSpacing: PropTypes.number,
938
- valueFormatter: PropTypes.func
944
+ valueFormatter: PropTypes.func,
945
+ valueGetter: PropTypes.func
939
946
  }), PropTypes.shape({
940
947
  axis: PropTypes.oneOf(['x']),
941
948
  classes: PropTypes.object,
@@ -985,7 +992,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
985
992
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
986
993
  tickSize: PropTypes.number,
987
994
  tickSpacing: PropTypes.number,
988
- valueFormatter: PropTypes.func
995
+ valueFormatter: PropTypes.func,
996
+ valueGetter: PropTypes.func
989
997
  }), PropTypes.shape({
990
998
  axis: PropTypes.oneOf(['x']),
991
999
  classes: PropTypes.object,
@@ -1031,7 +1039,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1031
1039
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
1032
1040
  tickSize: PropTypes.number,
1033
1041
  tickSpacing: PropTypes.number,
1034
- valueFormatter: PropTypes.func
1042
+ valueFormatter: PropTypes.func,
1043
+ valueGetter: PropTypes.func
1035
1044
  })]),
1036
1045
  /**
1037
1046
  * The yAxis configuration.
@@ -1096,6 +1105,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1096
1105
  tickSize: PropTypes.number,
1097
1106
  tickSpacing: PropTypes.number,
1098
1107
  valueFormatter: PropTypes.func,
1108
+ valueGetter: PropTypes.func,
1099
1109
  width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
1100
1110
  }), PropTypes.shape({
1101
1111
  axis: PropTypes.oneOf(['y']),
@@ -1154,6 +1164,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1154
1164
  tickSize: PropTypes.number,
1155
1165
  tickSpacing: PropTypes.number,
1156
1166
  valueFormatter: PropTypes.func,
1167
+ valueGetter: PropTypes.func,
1157
1168
  width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
1158
1169
  }), PropTypes.shape({
1159
1170
  axis: PropTypes.oneOf(['y']),
@@ -1199,6 +1210,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1199
1210
  tickSize: PropTypes.number,
1200
1211
  tickSpacing: PropTypes.number,
1201
1212
  valueFormatter: PropTypes.func,
1213
+ valueGetter: PropTypes.func,
1202
1214
  width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
1203
1215
  }), PropTypes.shape({
1204
1216
  axis: PropTypes.oneOf(['y']),
@@ -1245,6 +1257,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1245
1257
  tickSize: PropTypes.number,
1246
1258
  tickSpacing: PropTypes.number,
1247
1259
  valueFormatter: PropTypes.func,
1260
+ valueGetter: PropTypes.func,
1248
1261
  width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
1249
1262
  }), PropTypes.shape({
1250
1263
  axis: PropTypes.oneOf(['y']),
@@ -1290,6 +1303,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1290
1303
  tickSize: PropTypes.number,
1291
1304
  tickSpacing: PropTypes.number,
1292
1305
  valueFormatter: PropTypes.func,
1306
+ valueGetter: PropTypes.func,
1293
1307
  width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
1294
1308
  }), PropTypes.shape({
1295
1309
  axis: PropTypes.oneOf(['y']),
@@ -1335,6 +1349,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1335
1349
  tickSize: PropTypes.number,
1336
1350
  tickSpacing: PropTypes.number,
1337
1351
  valueFormatter: PropTypes.func,
1352
+ valueGetter: PropTypes.func,
1338
1353
  width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
1339
1354
  }), PropTypes.shape({
1340
1355
  axis: PropTypes.oneOf(['y']),
@@ -1384,6 +1399,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1384
1399
  tickSize: PropTypes.number,
1385
1400
  tickSpacing: PropTypes.number,
1386
1401
  valueFormatter: PropTypes.func,
1402
+ valueGetter: PropTypes.func,
1387
1403
  width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
1388
1404
  }), PropTypes.shape({
1389
1405
  axis: PropTypes.oneOf(['y']),
@@ -1433,6 +1449,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1433
1449
  tickSize: PropTypes.number,
1434
1450
  tickSpacing: PropTypes.number,
1435
1451
  valueFormatter: PropTypes.func,
1452
+ valueGetter: PropTypes.func,
1436
1453
  width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
1437
1454
  }), PropTypes.shape({
1438
1455
  axis: PropTypes.oneOf(['y']),
@@ -1478,6 +1495,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
1478
1495
  tickSize: PropTypes.number,
1479
1496
  tickSpacing: PropTypes.number,
1480
1497
  valueFormatter: PropTypes.func,
1498
+ valueGetter: PropTypes.func,
1481
1499
  width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
1482
1500
  })])
1483
1501
  } : void 0;
@@ -87,7 +87,7 @@ export declare function useYAxis<T extends keyof AxisScaleConfig>(axisId?: AxisI
87
87
  * @see `useRotationAxis` for accessing a single rotation axis
88
88
  */
89
89
  export declare function useRotationAxes(): {
90
- rotationAxis: import("../internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.mjs").DefaultizedAxisConfig<ChartsRotationAxisProps>;
90
+ rotationAxis: import("../internals/index.mjs").ComputedAxisConfig<ChartsRotationAxisProps>;
91
91
  rotationAxisIds: string[];
92
92
  };
93
93
  /**
@@ -106,7 +106,7 @@ export declare function useRotationAxes(): {
106
106
  * @see `useRadiusAxis` for accessing a single radius axis
107
107
  */
108
108
  export declare function useRadiusAxes(): {
109
- radiusAxis: import("../internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.mjs").DefaultizedAxisConfig<ChartsRadiusAxisProps>;
109
+ radiusAxis: import("../internals/index.mjs").ComputedAxisConfig<ChartsRadiusAxisProps>;
110
110
  radiusAxisIds: string[];
111
111
  };
112
112
  /**
@@ -87,7 +87,7 @@ export declare function useYAxis<T extends keyof AxisScaleConfig>(axisId?: AxisI
87
87
  * @see `useRotationAxis` for accessing a single rotation axis
88
88
  */
89
89
  export declare function useRotationAxes(): {
90
- rotationAxis: import("../internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js").DefaultizedAxisConfig<ChartsRotationAxisProps>;
90
+ rotationAxis: import("../internals/index.js").ComputedAxisConfig<ChartsRotationAxisProps>;
91
91
  rotationAxisIds: string[];
92
92
  };
93
93
  /**
@@ -106,7 +106,7 @@ export declare function useRotationAxes(): {
106
106
  * @see `useRadiusAxis` for accessing a single radius axis
107
107
  */
108
108
  export declare function useRadiusAxes(): {
109
- radiusAxis: import("../internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js").DefaultizedAxisConfig<ChartsRadiusAxisProps>;
109
+ radiusAxis: import("../internals/index.js").ComputedAxisConfig<ChartsRadiusAxisProps>;
110
110
  radiusAxisIds: string[];
111
111
  };
112
112
  /**
@@ -86,6 +86,6 @@ interface GetTicksOptions extends Pick<TickParams, 'tickInterval' | 'tickPlaceme
86
86
  }
87
87
  export declare function getTicks(options: GetTicksOptions): TickItem[];
88
88
  export declare function useTicks(options: Omit<GetTicksOptions, 'isInside'> & {
89
- direction: 'x' | 'y';
89
+ direction: 'x' | 'y' | 'rotation' | 'radius';
90
90
  }): TickItem[];
91
91
  export {};
@@ -86,6 +86,6 @@ interface GetTicksOptions extends Pick<TickParams, 'tickInterval' | 'tickPlaceme
86
86
  }
87
87
  export declare function getTicks(options: GetTicksOptions): TickItem[];
88
88
  export declare function useTicks(options: Omit<GetTicksOptions, 'isInside'> & {
89
- direction: 'x' | 'y';
89
+ direction: 'x' | 'y' | 'rotation' | 'radius';
90
90
  }): TickItem[];
91
91
  export {};
package/hooks/useTicks.js CHANGED
@@ -14,6 +14,7 @@ var _isInfinity = require("../internals/isInfinity");
14
14
  var _timeTicks = require("../utils/timeTicks");
15
15
  var _dateHelpers = require("../internals/dateHelpers");
16
16
  var _useChartsContext = require("../context/ChartsProvider/useChartsContext");
17
+ var _epsilon = require("../utils/epsilon");
17
18
  const offsetRatio = {
18
19
  start: 0,
19
20
  extremities: 0,
@@ -238,6 +239,24 @@ function getDefaultTicks(scale, tickNumber) {
238
239
  }
239
240
  return scale.ticks(tickNumber);
240
241
  }
242
+ const alwaysTrue = () => true;
243
+
244
+ // Avoid ticks on more than 360° for rotation axis.
245
+ const isInsideRotation = scale => rotation => Math.abs(scale.range()[0] - rotation) < Math.PI * 2 - _epsilon.EPSILON;
246
+ function getIsInside(scale, direction, instance) {
247
+ switch (direction) {
248
+ case 'rotation':
249
+ return isInsideRotation(scale);
250
+ case 'radius':
251
+ return radiusOffset => radiusOffset >= 1;
252
+ case 'x':
253
+ return instance.isXInside;
254
+ case 'y':
255
+ return instance.isYInside;
256
+ default:
257
+ return alwaysTrue;
258
+ }
259
+ }
241
260
  function useTicks(options) {
242
261
  const {
243
262
  scale,
@@ -253,7 +272,6 @@ function useTicks(options) {
253
272
  const {
254
273
  instance
255
274
  } = (0, _useChartsContext.useChartsContext)();
256
- const isInside = direction === 'x' ? instance.isXInside : instance.isYInside;
257
275
  return React.useMemo(() => getTicks({
258
276
  scale,
259
277
  tickNumber,
@@ -262,7 +280,7 @@ function useTicks(options) {
262
280
  tickLabelPlacement,
263
281
  tickSpacing,
264
282
  valueFormatter,
265
- isInside,
283
+ isInside: getIsInside(scale, direction, instance),
266
284
  ordinalTimeTicks
267
- }), [scale, tickNumber, tickPlacement, tickInterval, tickLabelPlacement, tickSpacing, valueFormatter, isInside, ordinalTimeTicks]);
285
+ }), [scale, tickNumber, tickPlacement, tickInterval, tickLabelPlacement, tickSpacing, valueFormatter, direction, instance, ordinalTimeTicks]);
268
286
  }
@@ -6,6 +6,7 @@ import { isInfinity } from "../internals/isInfinity.mjs";
6
6
  import { tickFrequencies } from "../utils/timeTicks.mjs";
7
7
  import { isDateData } from "../internals/dateHelpers.mjs";
8
8
  import { useChartsContext } from "../context/ChartsProvider/useChartsContext.mjs";
9
+ import { EPSILON } from "../utils/epsilon.mjs";
9
10
  const offsetRatio = {
10
11
  start: 0,
11
12
  extremities: 0,
@@ -230,6 +231,24 @@ function getDefaultTicks(scale, tickNumber) {
230
231
  }
231
232
  return scale.ticks(tickNumber);
232
233
  }
234
+ const alwaysTrue = () => true;
235
+
236
+ // Avoid ticks on more than 360° for rotation axis.
237
+ const isInsideRotation = scale => rotation => Math.abs(scale.range()[0] - rotation) < Math.PI * 2 - EPSILON;
238
+ function getIsInside(scale, direction, instance) {
239
+ switch (direction) {
240
+ case 'rotation':
241
+ return isInsideRotation(scale);
242
+ case 'radius':
243
+ return radiusOffset => radiusOffset >= 1;
244
+ case 'x':
245
+ return instance.isXInside;
246
+ case 'y':
247
+ return instance.isYInside;
248
+ default:
249
+ return alwaysTrue;
250
+ }
251
+ }
233
252
  export function useTicks(options) {
234
253
  const {
235
254
  scale,
@@ -245,7 +264,6 @@ export function useTicks(options) {
245
264
  const {
246
265
  instance
247
266
  } = useChartsContext();
248
- const isInside = direction === 'x' ? instance.isXInside : instance.isYInside;
249
267
  return React.useMemo(() => getTicks({
250
268
  scale,
251
269
  tickNumber,
@@ -254,7 +272,7 @@ export function useTicks(options) {
254
272
  tickLabelPlacement,
255
273
  tickSpacing,
256
274
  valueFormatter,
257
- isInside,
275
+ isInside: getIsInside(scale, direction, instance),
258
276
  ordinalTimeTicks
259
- }), [scale, tickNumber, tickPlacement, tickInterval, tickLabelPlacement, tickSpacing, valueFormatter, isInside, ordinalTimeTicks]);
277
+ }), [scale, tickNumber, tickPlacement, tickInterval, tickLabelPlacement, tickSpacing, valueFormatter, direction, instance, ordinalTimeTicks]);
260
278
  }
package/index.d.mts CHANGED
@@ -27,6 +27,10 @@ export * from "./ChartsSurface/index.mjs";
27
27
  export { ChartsContainer } from "./ChartsContainer/index.mjs";
28
28
  export type { ChartsContainerProps, ChartsContainerSlots, ChartsContainerSlotProps } from "./ChartsContainer/index.mjs";
29
29
  export * from "./ChartsDataProvider/index.mjs";
30
+ export * from "./ChartsRadialDataProvider/index.mjs";
31
+ export * from "./ChartsRadialGrid/index.mjs";
32
+ export * from "./ChartsRadiusAxis/index.mjs";
33
+ export { type ChartsRotationAxisProps, Unstable_ChartsRotationAxis } from "./ChartsRotationAxis/index.mjs";
30
34
  export * from "./Toolbar/index.mjs";
31
35
  export * from "./ChartsWrapper/index.mjs";
32
36
  export * from "./ChartsBrushOverlay/index.mjs";
package/index.d.ts CHANGED
@@ -27,6 +27,10 @@ export * from "./ChartsSurface/index.js";
27
27
  export { ChartsContainer } from "./ChartsContainer/index.js";
28
28
  export type { ChartsContainerProps, ChartsContainerSlots, ChartsContainerSlotProps } from "./ChartsContainer/index.js";
29
29
  export * from "./ChartsDataProvider/index.js";
30
+ export * from "./ChartsRadialDataProvider/index.js";
31
+ export * from "./ChartsRadialGrid/index.js";
32
+ export * from "./ChartsRadiusAxis/index.js";
33
+ export { type ChartsRotationAxisProps, Unstable_ChartsRotationAxis } from "./ChartsRotationAxis/index.js";
30
34
  export * from "./Toolbar/index.js";
31
35
  export * from "./ChartsWrapper/index.js";
32
36
  export * from "./ChartsBrushOverlay/index.js";
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts v9.0.1
2
+ * @mui/x-charts v9.0.3
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -11,7 +11,8 @@ Object.defineProperty(exports, "__esModule", {
11
11
  value: true
12
12
  });
13
13
  var _exportNames = {
14
- ChartsContainer: true
14
+ ChartsContainer: true,
15
+ Unstable_ChartsRotationAxis: true
15
16
  };
16
17
  Object.defineProperty(exports, "ChartsContainer", {
17
18
  enumerable: true,
@@ -19,6 +20,12 @@ Object.defineProperty(exports, "ChartsContainer", {
19
20
  return _ChartsContainer.ChartsContainer;
20
21
  }
21
22
  });
23
+ Object.defineProperty(exports, "Unstable_ChartsRotationAxis", {
24
+ enumerable: true,
25
+ get: function () {
26
+ return _ChartsRotationAxis.Unstable_ChartsRotationAxis;
27
+ }
28
+ });
22
29
  var _constants = require("./constants");
23
30
  Object.keys(_constants).forEach(function (key) {
24
31
  if (key === "default" || key === "__esModule") return;
@@ -344,6 +351,43 @@ Object.keys(_ChartsDataProvider).forEach(function (key) {
344
351
  }
345
352
  });
346
353
  });
354
+ var _ChartsRadialDataProvider = require("./ChartsRadialDataProvider");
355
+ Object.keys(_ChartsRadialDataProvider).forEach(function (key) {
356
+ if (key === "default" || key === "__esModule") return;
357
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
358
+ if (key in exports && exports[key] === _ChartsRadialDataProvider[key]) return;
359
+ Object.defineProperty(exports, key, {
360
+ enumerable: true,
361
+ get: function () {
362
+ return _ChartsRadialDataProvider[key];
363
+ }
364
+ });
365
+ });
366
+ var _ChartsRadialGrid = require("./ChartsRadialGrid");
367
+ Object.keys(_ChartsRadialGrid).forEach(function (key) {
368
+ if (key === "default" || key === "__esModule") return;
369
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
370
+ if (key in exports && exports[key] === _ChartsRadialGrid[key]) return;
371
+ Object.defineProperty(exports, key, {
372
+ enumerable: true,
373
+ get: function () {
374
+ return _ChartsRadialGrid[key];
375
+ }
376
+ });
377
+ });
378
+ var _ChartsRadiusAxis = require("./ChartsRadiusAxis");
379
+ Object.keys(_ChartsRadiusAxis).forEach(function (key) {
380
+ if (key === "default" || key === "__esModule") return;
381
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
382
+ if (key in exports && exports[key] === _ChartsRadiusAxis[key]) return;
383
+ Object.defineProperty(exports, key, {
384
+ enumerable: true,
385
+ get: function () {
386
+ return _ChartsRadiusAxis[key];
387
+ }
388
+ });
389
+ });
390
+ var _ChartsRotationAxis = require("./ChartsRotationAxis");
347
391
  var _Toolbar = require("./Toolbar");
348
392
  Object.keys(_Toolbar).forEach(function (key) {
349
393
  if (key === "default" || key === "__esModule") return;
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts v9.0.1
2
+ * @mui/x-charts v9.0.3
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -33,6 +33,10 @@ export * from "./RadarChart/index.mjs";
33
33
  export * from "./ChartsSurface/index.mjs";
34
34
  export { ChartsContainer } from "./ChartsContainer/index.mjs";
35
35
  export * from "./ChartsDataProvider/index.mjs";
36
+ export * from "./ChartsRadialDataProvider/index.mjs";
37
+ export * from "./ChartsRadialGrid/index.mjs";
38
+ export * from "./ChartsRadiusAxis/index.mjs";
39
+ export { Unstable_ChartsRotationAxis } from "./ChartsRotationAxis/index.mjs";
36
40
  export * from "./Toolbar/index.mjs";
37
41
  export * from "./ChartsWrapper/index.mjs";
38
42
  export * from "./ChartsBrushOverlay/index.mjs";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Cubic equation solver. Only returns real root between 0 and 1, which is the only case we care about for curve evaluation.
3
+ * From https://www.particleincell.com/2013/cubic-line-intersection/
4
+ */
5
+ export declare function cubicRoots(P: [number, number, number, number]): number[];
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Cubic equation solver. Only returns real root between 0 and 1, which is the only case we care about for curve evaluation.
3
+ * From https://www.particleincell.com/2013/cubic-line-intersection/
4
+ */
5
+ export declare function cubicRoots(P: [number, number, number, number]): number[];
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.cubicRoots = cubicRoots;
7
+ /**
8
+ * Cubic equation solver. Only returns real root between 0 and 1, which is the only case we care about for curve evaluation.
9
+ * From https://www.particleincell.com/2013/cubic-line-intersection/
10
+ */
11
+ function cubicRoots(P) {
12
+ const a = P[0];
13
+ const b = P[1];
14
+ const c = P[2];
15
+ const d = P[3];
16
+ if (a === 0) {
17
+ if (b === 0) {
18
+ if (c === 0) {
19
+ return []; // constant case
20
+ }
21
+ return [-d / c].filter(r => r >= 0 && r <= 1); // linear case
22
+ }
23
+
24
+ // quadratic case
25
+ const discriminant = c * c - 4 * b * d;
26
+ if (discriminant < 0) {
27
+ return [];
28
+ }
29
+ const sqrtDisc = Math.sqrt(discriminant);
30
+ return [(-c + sqrtDisc) / (2 * b), (-c - sqrtDisc) / (2 * b)].filter(r => r >= 0 && r <= 1);
31
+ }
32
+
33
+ // cubic case
34
+
35
+ const A = b / a;
36
+ const B = c / a;
37
+ const C = d / a;
38
+ const Q = (3 * B - Math.pow(A, 2)) / 9;
39
+ const R = (9 * A * B - 27 * C - 2 * Math.pow(A, 3)) / 54;
40
+ const D = Math.pow(Q, 3) + Math.pow(R, 2); // polynomial discriminant
41
+
42
+ const result = [];
43
+ if (D >= 0)
44
+ // complex or duplicate roots
45
+ {
46
+ const S = Math.sign(R + Math.sqrt(D)) * Math.pow(Math.abs(R + Math.sqrt(D)), 1 / 3);
47
+ const T = Math.sign(R - Math.sqrt(D)) * Math.pow(Math.abs(R - Math.sqrt(D)), 1 / 3);
48
+ result.push(-A / 3 + (S + T)); // real root
49
+
50
+ if (S - T !== 0) {
51
+ return result.filter(r => r >= 0 && r <= 1);
52
+ }
53
+ result.push(-A / 3 - (S + T) / 2); // real part of complex root
54
+ result.push(-A / 3 - (S + T) / 2); // real part of complex root
55
+ return result.filter(r => r >= 0 && r <= 1);
56
+ }
57
+ const th = Math.acos(R / Math.sqrt(-Math.pow(Q, 3)));
58
+ result.push(2 * Math.sqrt(-Q) * Math.cos(th / 3) - A / 3);
59
+ result.push(2 * Math.sqrt(-Q) * Math.cos((th + 2 * Math.PI) / 3) - A / 3);
60
+ result.push(2 * Math.sqrt(-Q) * Math.cos((th + 4 * Math.PI) / 3) - A / 3);
61
+ return result.filter(r => r >= 0 && r <= 1);
62
+ }