@mui/x-charts 8.0.0-alpha.1 → 8.0.0-alpha.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 (278) hide show
  1. package/BarChart/BarChart.js +0 -4
  2. package/BarChart/BarLabel/BarLabel.d.ts +298 -298
  3. package/CHANGELOG.md +330 -7
  4. package/ChartContainer/ChartContainer.d.ts +24 -0
  5. package/ChartContainer/ChartContainer.js +26 -10
  6. package/ChartContainer/useChartContainerProps.d.ts +0 -1
  7. package/ChartContainer/useChartContainerProps.js +3 -4
  8. package/ChartsAxis/axisClasses.js +2 -1
  9. package/ChartsAxisHighlight/ChartsXAxisHighlight.js +3 -3
  10. package/ChartsAxisHighlight/ChartsYAxisHighlight.js +3 -3
  11. package/ChartsLegend/chartsLegendClasses.js +2 -1
  12. package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
  13. package/ChartsSurface/ChartsSurface.d.ts +14 -0
  14. package/ChartsSurface/ChartsSurface.js +38 -6
  15. package/ChartsTooltip/ChartsTooltip.js +2 -20
  16. package/ChartsTooltip/ChartsTooltipContainer.js +5 -23
  17. package/ChartsTooltip/ChartsTooltipTable.js +2 -2
  18. package/ChartsTooltip/useAxisTooltip.js +3 -3
  19. package/ChartsTooltip/useItemTooltip.d.ts +2 -3
  20. package/ChartsTooltip/useItemTooltip.js +3 -3
  21. package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +3 -3
  22. package/ChartsXAxis/ChartsXAxis.js +3 -17
  23. package/ChartsYAxis/ChartsYAxis.js +2 -17
  24. package/Gauge/Gauge.d.ts +1 -1
  25. package/Gauge/GaugeContainer.d.ts +2 -2
  26. package/Gauge/GaugeContainer.js +14 -47
  27. package/LineChart/CircleMarkElement.js +3 -3
  28. package/LineChart/LineChart.js +0 -4
  29. package/LineChart/LineHighlightPlot.js +3 -3
  30. package/LineChart/MarkElement.js +3 -3
  31. package/PieChart/PieArc.js +11 -5
  32. package/PieChart/PieArcPlot.js +9 -13
  33. package/PieChart/PieChart.js +0 -4
  34. package/ScatterChart/Scatter.js +3 -3
  35. package/ScatterChart/ScatterChart.js +0 -4
  36. package/SparkLineChart/SparkLineChart.js +0 -4
  37. package/context/CartesianProvider/defaultizeAxis.d.ts +9 -11
  38. package/context/ChartDataProvider/ChartDataProvider.d.ts +27 -0
  39. package/context/ChartDataProvider/ChartDataProvider.js +38 -18
  40. package/context/ChartDataProvider/useChartDataProviderProps.d.ts +18 -22
  41. package/context/ChartDataProvider/useDefaultizeAxis.d.ts +9 -11
  42. package/context/ChartProvider/ChartContext.d.ts +6 -0
  43. package/context/ChartProvider/ChartContext.js +8 -0
  44. package/context/ChartProvider/ChartProvider.d.ts +4 -0
  45. package/context/ChartProvider/ChartProvider.js +19 -0
  46. package/context/ChartProvider/ChartProvider.types.d.ts +24 -0
  47. package/context/ChartProvider/index.d.ts +3 -0
  48. package/context/ChartProvider/index.js +3 -0
  49. package/context/ChartProvider/useChartContext.d.ts +3 -0
  50. package/context/ChartProvider/useChartContext.js +11 -0
  51. package/context/DrawingAreaProvider/DrawingAreaContext.d.ts +1 -6
  52. package/context/DrawingAreaProvider/DrawingAreaContext.js +0 -1
  53. package/context/InteractionSelectors.d.ts +72 -49
  54. package/context/SizeProvider/Size.types.d.ts +2 -2
  55. package/context/SizeProvider/SizeContext.js +3 -1
  56. package/context/SizeProvider/useChartContainerDimensions.d.ts +1 -1
  57. package/context/SizeProvider/useChartContainerDimensions.js +5 -1
  58. package/hooks/useAxisEvents.js +1 -1
  59. package/hooks/useChartId.js +5 -6
  60. package/hooks/useInteractionItemProps.js +4 -2
  61. package/hooks/useSvgRef.d.ts +1 -1
  62. package/hooks/useSvgRef.js +4 -8
  63. package/index.js +1 -1
  64. package/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +2 -5
  65. package/internals/defaultizeColor.d.ts +1 -1
  66. package/internals/index.d.ts +1 -3
  67. package/internals/index.js +1 -3
  68. package/internals/plugins/allPlugins.d.ts +1 -0
  69. package/internals/plugins/allPlugins.js +3 -0
  70. package/internals/plugins/corePlugins/corePlugins.d.ts +10 -0
  71. package/internals/plugins/corePlugins/corePlugins.js +7 -0
  72. package/internals/plugins/corePlugins/index.d.ts +2 -0
  73. package/internals/plugins/corePlugins/index.js +1 -0
  74. package/internals/plugins/corePlugins/useChartId/index.d.ts +2 -0
  75. package/internals/plugins/corePlugins/useChartId/index.js +1 -0
  76. package/internals/plugins/corePlugins/useChartId/useChartId.d.ts +3 -0
  77. package/internals/plugins/corePlugins/useChartId/useChartId.js +32 -0
  78. package/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +36 -0
  79. package/internals/plugins/corePlugins/useChartId/useChartId.selectors.js +9 -0
  80. package/internals/plugins/corePlugins/useChartId/useChartId.types.d.ts +20 -0
  81. package/internals/plugins/corePlugins/useChartId/useChartId.utils.d.ts +1 -0
  82. package/internals/plugins/corePlugins/useChartId/useChartId.utils.js +5 -0
  83. package/internals/plugins/featurePlugins/useChartInteraction/index.d.ts +3 -0
  84. package/internals/plugins/featurePlugins/useChartInteraction/index.js +2 -0
  85. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.d.ts +3 -0
  86. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +73 -0
  87. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +376 -0
  88. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +10 -0
  89. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.d.ts +57 -0
  90. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.js +1 -0
  91. package/internals/plugins/models/chart.d.ts +14 -0
  92. package/internals/plugins/models/chart.js +1 -0
  93. package/internals/plugins/models/helpers.d.ts +7 -0
  94. package/internals/plugins/models/helpers.js +1 -0
  95. package/internals/plugins/models/index.d.ts +3 -35
  96. package/internals/plugins/models/index.js +3 -1
  97. package/internals/plugins/models/plugin.d.ts +75 -0
  98. package/internals/plugins/models/plugin.js +1 -0
  99. package/internals/plugins/utils/ChartStore.d.ts +9 -8
  100. package/internals/plugins/utils/ChartStore.js +0 -2
  101. package/internals/plugins/utils/selectors.d.ts +2 -2
  102. package/internals/store/useCharts.d.ts +14 -0
  103. package/internals/store/useCharts.js +72 -0
  104. package/internals/store/useCharts.types.d.ts +5 -0
  105. package/internals/store/useCharts.types.js +1 -0
  106. package/internals/store/useSelector.d.ts +4 -0
  107. package/internals/store/useStore.d.ts +3 -0
  108. package/{modern/internals → internals/store}/useStore.js +6 -6
  109. package/models/axis.d.ts +1 -13
  110. package/modern/BarChart/BarChart.js +0 -4
  111. package/modern/ChartContainer/ChartContainer.js +26 -10
  112. package/modern/ChartContainer/useChartContainerProps.js +3 -4
  113. package/modern/ChartsAxis/axisClasses.js +2 -1
  114. package/modern/ChartsAxisHighlight/ChartsXAxisHighlight.js +3 -3
  115. package/modern/ChartsAxisHighlight/ChartsYAxisHighlight.js +3 -3
  116. package/modern/ChartsLegend/chartsLegendClasses.js +2 -1
  117. package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
  118. package/modern/ChartsSurface/ChartsSurface.js +38 -6
  119. package/modern/ChartsTooltip/ChartsTooltip.js +2 -20
  120. package/modern/ChartsTooltip/ChartsTooltipContainer.js +5 -23
  121. package/modern/ChartsTooltip/ChartsTooltipTable.js +2 -2
  122. package/modern/ChartsTooltip/useAxisTooltip.js +3 -3
  123. package/modern/ChartsTooltip/useItemTooltip.js +3 -3
  124. package/modern/ChartsVoronoiHandler/ChartsVoronoiHandler.js +3 -3
  125. package/modern/ChartsXAxis/ChartsXAxis.js +3 -17
  126. package/modern/ChartsYAxis/ChartsYAxis.js +2 -17
  127. package/modern/Gauge/GaugeContainer.js +14 -47
  128. package/modern/LineChart/CircleMarkElement.js +3 -3
  129. package/modern/LineChart/LineChart.js +0 -4
  130. package/modern/LineChart/LineHighlightPlot.js +3 -3
  131. package/modern/LineChart/MarkElement.js +3 -3
  132. package/modern/PieChart/PieArc.js +11 -5
  133. package/modern/PieChart/PieArcPlot.js +9 -13
  134. package/modern/PieChart/PieChart.js +0 -4
  135. package/modern/ScatterChart/Scatter.js +3 -3
  136. package/modern/ScatterChart/ScatterChart.js +0 -4
  137. package/modern/SparkLineChart/SparkLineChart.js +0 -4
  138. package/modern/context/ChartDataProvider/ChartDataProvider.js +38 -18
  139. package/modern/context/ChartProvider/ChartContext.js +8 -0
  140. package/modern/context/ChartProvider/ChartProvider.js +19 -0
  141. package/modern/context/ChartProvider/ChartProvider.types.js +1 -0
  142. package/modern/context/ChartProvider/index.js +3 -0
  143. package/modern/context/ChartProvider/useChartContext.js +11 -0
  144. package/modern/context/DrawingAreaProvider/DrawingAreaContext.js +0 -1
  145. package/modern/context/SizeProvider/SizeContext.js +3 -1
  146. package/modern/context/SizeProvider/useChartContainerDimensions.js +5 -1
  147. package/modern/hooks/useAxisEvents.js +1 -1
  148. package/modern/hooks/useChartId.js +5 -6
  149. package/modern/hooks/useInteractionItemProps.js +4 -2
  150. package/modern/hooks/useSvgRef.js +4 -8
  151. package/modern/index.js +1 -1
  152. package/modern/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +2 -5
  153. package/modern/internals/index.js +1 -3
  154. package/modern/internals/plugins/allPlugins.js +3 -0
  155. package/modern/internals/plugins/corePlugins/corePlugins.js +7 -0
  156. package/modern/internals/plugins/corePlugins/index.js +1 -0
  157. package/modern/internals/plugins/corePlugins/useChartId/index.js +1 -0
  158. package/modern/internals/plugins/corePlugins/useChartId/useChartId.js +32 -0
  159. package/modern/internals/plugins/corePlugins/useChartId/useChartId.selectors.js +9 -0
  160. package/modern/internals/plugins/corePlugins/useChartId/useChartId.types.js +1 -0
  161. package/modern/internals/plugins/corePlugins/useChartId/useChartId.utils.js +5 -0
  162. package/modern/internals/plugins/featurePlugins/useChartInteraction/index.js +2 -0
  163. package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +73 -0
  164. package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +10 -0
  165. package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.js +1 -0
  166. package/modern/internals/plugins/models/chart.js +1 -0
  167. package/modern/internals/plugins/models/helpers.js +1 -0
  168. package/modern/internals/plugins/models/index.js +3 -1
  169. package/modern/internals/plugins/models/plugin.js +1 -0
  170. package/modern/internals/plugins/utils/ChartStore.js +0 -2
  171. package/modern/internals/store/useCharts.js +72 -0
  172. package/modern/internals/store/useCharts.types.js +1 -0
  173. package/{internals → modern/internals/store}/useStore.js +6 -6
  174. package/node/BarChart/BarChart.js +0 -4
  175. package/node/ChartContainer/ChartContainer.js +26 -10
  176. package/node/ChartContainer/useChartContainerProps.js +3 -4
  177. package/node/ChartsAxis/axisClasses.js +5 -3
  178. package/node/ChartsAxisHighlight/ChartsXAxisHighlight.js +4 -4
  179. package/node/ChartsAxisHighlight/ChartsYAxisHighlight.js +4 -4
  180. package/node/ChartsLegend/chartsLegendClasses.js +5 -3
  181. package/node/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
  182. package/node/ChartsSurface/ChartsSurface.js +37 -5
  183. package/node/ChartsTooltip/ChartsTooltip.js +2 -20
  184. package/node/ChartsTooltip/ChartsTooltipContainer.js +6 -24
  185. package/node/ChartsTooltip/ChartsTooltipTable.js +3 -3
  186. package/node/ChartsTooltip/useAxisTooltip.js +4 -4
  187. package/node/ChartsTooltip/useItemTooltip.js +4 -4
  188. package/node/ChartsVoronoiHandler/ChartsVoronoiHandler.js +3 -3
  189. package/node/ChartsXAxis/ChartsXAxis.js +3 -17
  190. package/node/ChartsYAxis/ChartsYAxis.js +2 -17
  191. package/node/Gauge/GaugeContainer.js +13 -46
  192. package/node/LineChart/CircleMarkElement.js +4 -4
  193. package/node/LineChart/LineChart.js +0 -4
  194. package/node/LineChart/LineHighlightPlot.js +4 -4
  195. package/node/LineChart/MarkElement.js +4 -4
  196. package/node/PieChart/PieArc.js +11 -5
  197. package/node/PieChart/PieArcPlot.js +9 -13
  198. package/node/PieChart/PieChart.js +0 -4
  199. package/node/ScatterChart/Scatter.js +4 -4
  200. package/node/ScatterChart/ScatterChart.js +0 -4
  201. package/node/SparkLineChart/SparkLineChart.js +0 -4
  202. package/node/context/ChartDataProvider/ChartDataProvider.js +38 -18
  203. package/node/context/ChartProvider/ChartContext.js +15 -0
  204. package/node/context/ChartProvider/ChartProvider.js +24 -0
  205. package/node/context/ChartProvider/index.js +38 -0
  206. package/node/context/ChartProvider/useChartContext.js +18 -0
  207. package/node/context/DrawingAreaProvider/DrawingAreaContext.js +0 -1
  208. package/node/context/SizeProvider/SizeContext.js +3 -1
  209. package/node/context/SizeProvider/useChartContainerDimensions.js +5 -1
  210. package/node/hooks/useAxisEvents.js +1 -1
  211. package/node/hooks/useChartId.js +5 -7
  212. package/node/hooks/useInteractionItemProps.js +4 -2
  213. package/node/hooks/useSvgRef.js +4 -9
  214. package/node/index.js +1 -1
  215. package/node/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +1 -4
  216. package/node/internals/index.js +4 -28
  217. package/node/internals/plugins/allPlugins.js +10 -0
  218. package/node/internals/plugins/corePlugins/corePlugins.js +12 -0
  219. package/node/internals/plugins/corePlugins/index.js +12 -0
  220. package/node/internals/plugins/corePlugins/useChartId/index.js +12 -0
  221. package/node/internals/plugins/corePlugins/useChartId/useChartId.js +41 -0
  222. package/node/internals/plugins/corePlugins/useChartId/useChartId.selectors.js +15 -0
  223. package/node/internals/plugins/corePlugins/useChartId/useChartId.types.js +5 -0
  224. package/node/internals/plugins/corePlugins/useChartId/useChartId.utils.js +12 -0
  225. package/node/internals/plugins/featurePlugins/useChartInteraction/index.js +27 -0
  226. package/node/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +81 -0
  227. package/node/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +16 -0
  228. package/node/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.js +5 -0
  229. package/node/internals/plugins/models/chart.js +5 -0
  230. package/node/internals/plugins/models/helpers.js +5 -0
  231. package/node/internals/plugins/models/index.js +33 -0
  232. package/node/internals/plugins/models/plugin.js +5 -0
  233. package/node/internals/plugins/utils/ChartStore.js +0 -2
  234. package/node/internals/store/useCharts.js +80 -0
  235. package/node/internals/store/useCharts.types.js +5 -0
  236. package/node/internals/{useStore.js → store/useStore.js} +6 -7
  237. package/package.json +4 -4
  238. package/ChartContainer/ResizableContainer.d.ts +0 -22
  239. package/ChartContainer/ResizableContainer.js +0 -60
  240. package/context/InteractionProvider.d.ts +0 -7
  241. package/context/InteractionProvider.js +0 -22
  242. package/context/SvgRefProvider/SvgRef.types.d.ts +0 -8
  243. package/context/SvgRefProvider/SvgRefContext.d.ts +0 -4
  244. package/context/SvgRefProvider/SvgRefContext.js +0 -17
  245. package/context/SvgRefProvider/SvgRefProvider.d.ts +0 -3
  246. package/context/SvgRefProvider/SvgRefProvider.js +0 -24
  247. package/context/SvgRefProvider/index.d.ts +0 -4
  248. package/context/SvgRefProvider/index.js +0 -4
  249. package/context/SvgRefProvider/useSurfaceRef.d.ts +0 -2
  250. package/context/SvgRefProvider/useSurfaceRef.js +0 -14
  251. package/internals/plugins/utils/ChartsStore.d.ts +0 -12
  252. package/internals/plugins/utils/ChartsStore.js +0 -26
  253. package/internals/useCharts.d.ts +0 -6
  254. package/internals/useCharts.js +0 -29
  255. package/internals/useSelector.d.ts +0 -4
  256. package/internals/useStore.d.ts +0 -2
  257. package/modern/ChartContainer/ResizableContainer.js +0 -60
  258. package/modern/context/InteractionProvider.js +0 -22
  259. package/modern/context/SvgRefProvider/SvgRefContext.js +0 -17
  260. package/modern/context/SvgRefProvider/SvgRefProvider.js +0 -24
  261. package/modern/context/SvgRefProvider/index.js +0 -4
  262. package/modern/context/SvgRefProvider/useSurfaceRef.js +0 -14
  263. package/modern/internals/plugins/utils/ChartsStore.js +0 -26
  264. package/modern/internals/useCharts.js +0 -29
  265. package/node/ChartContainer/ResizableContainer.js +0 -68
  266. package/node/context/InteractionProvider.js +0 -28
  267. package/node/context/SvgRefProvider/SvgRefContext.js +0 -23
  268. package/node/context/SvgRefProvider/SvgRefProvider.js +0 -31
  269. package/node/context/SvgRefProvider/index.js +0 -49
  270. package/node/context/SvgRefProvider/useSurfaceRef.js +0 -20
  271. package/node/internals/plugins/utils/ChartsStore.js +0 -33
  272. package/node/internals/useCharts.js +0 -36
  273. /package/context/{SvgRefProvider/SvgRef.types.js → ChartProvider/ChartProvider.types.js} +0 -0
  274. /package/{modern/context/SvgRefProvider/SvgRef.types.js → internals/plugins/corePlugins/useChartId/useChartId.types.js} +0 -0
  275. /package/internals/{useSelector.js → store/useSelector.js} +0 -0
  276. /package/modern/internals/{useSelector.js → store/useSelector.js} +0 -0
  277. /package/node/context/{SvgRefProvider/SvgRef.types.js → ChartProvider/ChartProvider.types.js} +0 -0
  278. /package/node/internals/{useSelector.js → store/useSelector.js} +0 -0
@@ -5,7 +5,6 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { DrawingAreaProvider } from "../DrawingAreaProvider/index.js";
7
7
  import { SeriesProvider } from "../SeriesProvider/index.js";
8
- import { InteractionProvider } from "../InteractionProvider.js";
9
8
  import { CartesianProvider } from "../CartesianProvider/index.js";
10
9
  import { PluginProvider } from "../PluginProvider/index.js";
11
10
  import { useChartDataProviderProps } from "./useChartDataProviderProps.js";
@@ -13,8 +12,35 @@ import { AnimationProvider } from "../AnimationProvider/index.js";
13
12
  import { ZAxisContextProvider } from "../ZAxisContextProvider.js";
14
13
  import { HighlightedProvider } from "../HighlightedProvider/index.js";
15
14
  import { SizeProvider } from "../SizeProvider/index.js";
16
- import { SvgRefProvider } from "../SvgRefProvider/index.js";
15
+ import { ChartProvider } from "../ChartProvider/index.js";
17
16
  import { jsx as _jsx } from "react/jsx-runtime";
17
+ /**
18
+ * Orchestrates the data providers for the chart components and hooks.
19
+ *
20
+ * Use this component if you have custom HTML components that need to access the chart data.
21
+ *
22
+ * Demos:
23
+ *
24
+ * - [Composition](http://localhost:3001/x/react-charts/composition/)
25
+ *
26
+ * API:
27
+ *
28
+ * - [ChartDataProvider API](https://mui.com/x/api/charts/chart-data-provider/)
29
+ *
30
+ * @example
31
+ * ```jsx
32
+ * <ChartDataProvider
33
+ * series={[{ label: "Label", type: "bar", data: [10, 20] }]}
34
+ * xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
35
+ * >
36
+ * <ChartsSurface>
37
+ * <BarPlot />
38
+ * <ChartsXAxis position="bottom" axisId="x-axis" />
39
+ * </ChartsSurface>
40
+ * {'Custom Legend Component'}
41
+ * </ChartDataProvider>
42
+ * ```
43
+ */
18
44
  function ChartDataProvider(props) {
19
45
  const {
20
46
  children,
@@ -27,27 +53,25 @@ function ChartDataProvider(props) {
27
53
  animationProviderProps,
28
54
  sizeProviderProps
29
55
  } = useChartDataProviderProps(props);
30
- return /*#__PURE__*/_jsx(SizeProvider, _extends({}, sizeProviderProps, {
31
- children: /*#__PURE__*/_jsx(DrawingAreaProvider, _extends({}, drawingAreaProviderProps, {
32
- children: /*#__PURE__*/_jsx(PluginProvider, _extends({}, pluginProviderProps, {
33
- children: /*#__PURE__*/_jsx(SeriesProvider, _extends({}, seriesProviderProps, {
34
- children: /*#__PURE__*/_jsx(CartesianProvider, _extends({}, cartesianProviderProps, {
35
- children: /*#__PURE__*/_jsx(ZAxisContextProvider, _extends({}, zAxisContextProps, {
36
- children: /*#__PURE__*/_jsx(InteractionProvider, {
56
+ return /*#__PURE__*/_jsx(ChartProvider, {
57
+ children: /*#__PURE__*/_jsx(SizeProvider, _extends({}, sizeProviderProps, {
58
+ children: /*#__PURE__*/_jsx(DrawingAreaProvider, _extends({}, drawingAreaProviderProps, {
59
+ children: /*#__PURE__*/_jsx(PluginProvider, _extends({}, pluginProviderProps, {
60
+ children: /*#__PURE__*/_jsx(SeriesProvider, _extends({}, seriesProviderProps, {
61
+ children: /*#__PURE__*/_jsx(CartesianProvider, _extends({}, cartesianProviderProps, {
62
+ children: /*#__PURE__*/_jsx(ZAxisContextProvider, _extends({}, zAxisContextProps, {
37
63
  children: /*#__PURE__*/_jsx(HighlightedProvider, _extends({}, highlightedProviderProps, {
38
64
  children: /*#__PURE__*/_jsx(AnimationProvider, _extends({}, animationProviderProps, {
39
- children: /*#__PURE__*/_jsx(SvgRefProvider, {
40
- children: children
41
- })
65
+ children: children
42
66
  }))
43
67
  }))
44
- })
68
+ }))
45
69
  }))
46
70
  }))
47
71
  }))
48
72
  }))
49
73
  }))
50
- }));
74
+ });
51
75
  }
52
76
  process.env.NODE_ENV !== "production" ? ChartDataProvider.propTypes = {
53
77
  // ----------------------------- Warning --------------------------------
@@ -144,7 +168,6 @@ process.env.NODE_ENV !== "production" ? ChartDataProvider.propTypes = {
144
168
  hideTooltip: PropTypes.bool,
145
169
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
146
170
  label: PropTypes.string,
147
- labelFontSize: PropTypes.number,
148
171
  labelStyle: PropTypes.object,
149
172
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
150
173
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
@@ -155,7 +178,6 @@ process.env.NODE_ENV !== "production" ? ChartDataProvider.propTypes = {
155
178
  slots: PropTypes.object,
156
179
  stroke: PropTypes.string,
157
180
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
158
- tickFontSize: PropTypes.number,
159
181
  tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
160
182
  tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
161
183
  tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
@@ -198,7 +220,6 @@ process.env.NODE_ENV !== "production" ? ChartDataProvider.propTypes = {
198
220
  hideTooltip: PropTypes.bool,
199
221
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
200
222
  label: PropTypes.string,
201
- labelFontSize: PropTypes.number,
202
223
  labelStyle: PropTypes.object,
203
224
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
204
225
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
@@ -209,7 +230,6 @@ process.env.NODE_ENV !== "production" ? ChartDataProvider.propTypes = {
209
230
  slots: PropTypes.object,
210
231
  stroke: PropTypes.string,
211
232
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
212
- tickFontSize: PropTypes.number,
213
233
  tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
214
234
  tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
215
235
  tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * @ignore - internal component.
4
+ */
5
+ export const ChartContext = /*#__PURE__*/React.createContext(null);
6
+ if (process.env.NODE_ENV !== 'production') {
7
+ ChartContext.displayName = 'ChartContext';
8
+ }
@@ -0,0 +1,19 @@
1
+ 'use client';
2
+
3
+ import * as React from 'react';
4
+ import { useCharts } from "../../internals/store/useCharts.js";
5
+ import { ChartContext } from "./ChartContext.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ function ChartProvider(props) {
8
+ const {
9
+ children
10
+ } = props;
11
+ const {
12
+ contextValue
13
+ } = useCharts([], {});
14
+ return /*#__PURE__*/_jsx(ChartContext.Provider, {
15
+ value: contextValue,
16
+ children: children
17
+ });
18
+ }
19
+ export { ChartProvider };
@@ -0,0 +1,3 @@
1
+ export * from "./ChartProvider.js";
2
+ export * from "./ChartProvider.types.js";
3
+ export * from "./useChartContext.js";
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+
3
+ import * as React from 'react';
4
+ import { ChartContext } from "./ChartContext.js";
5
+ export const useChartContext = () => {
6
+ const context = React.useContext(ChartContext);
7
+ if (context == null) {
8
+ throw new Error(['MUI X: Could not find the Chart context.', 'It looks like you rendered your component outside of a ChartDataProvider.', 'This can also happen if you are bundling multiple versions of the library.'].join('\n'));
9
+ }
10
+ return context;
11
+ };
@@ -8,7 +8,6 @@ export const DrawingAreaContext = /*#__PURE__*/React.createContext({
8
8
  right: 0,
9
9
  height: 300,
10
10
  width: 400,
11
- chartId: '',
12
11
  isPointInside: () => false
13
12
  });
14
13
  if (process.env.NODE_ENV !== 'production') {
@@ -3,7 +3,9 @@ export const SizeContext = /*#__PURE__*/React.createContext({
3
3
  isInitialized: false,
4
4
  data: {
5
5
  hasIntrinsicSize: false,
6
- containerRef: null,
6
+ svgRef: {
7
+ current: null
8
+ },
7
9
  height: 0,
8
10
  width: 0
9
11
  }
@@ -20,6 +20,10 @@ export const useChartContainerDimensions = (inWidth, inHeight) => {
20
20
  const computeSize = React.useCallback(() => {
21
21
  const mainEl = rootRef?.current;
22
22
  if (!mainEl) {
23
+ if (process.env.NODE_ENV !== 'production') {
24
+ // This is mostly for internal use.
25
+ throw new Error([`MUI X: ChartContainer does not have a valid reference to the <svg /> element.`, 'This may be caused by a ref forwarding issue.', 'Make sure that the ref from SizedProvider is forwarded correctly.'].join('\n'));
26
+ }
23
27
  return {};
24
28
  }
25
29
  const win = ownerWindow(mainEl);
@@ -94,7 +98,7 @@ export const useChartContainerDimensions = (inWidth, inHeight) => {
94
98
  const finalWidth = inWidth ?? width;
95
99
  const finalHeight = inHeight ?? height;
96
100
  return {
97
- containerRef: rootRef,
101
+ svgRef: rootRef,
98
102
  width: finalWidth,
99
103
  height: finalHeight,
100
104
  hasIntrinsicSize: finalWidth > 0 && finalHeight > 0,
@@ -7,7 +7,7 @@ import { isBandScale } from "../internals/isBandScale.js";
7
7
  import { getSVGPoint } from "../internals/getSVGPoint.js";
8
8
  import { useSvgRef } from "./useSvgRef.js";
9
9
  import { useDrawingArea } from "./useDrawingArea.js";
10
- import { useStore } from "../internals/useStore.js";
10
+ import { useStore } from "../internals/store/useStore.js";
11
11
  function getAsANumber(value) {
12
12
  return value instanceof Date ? value.getTime() : value;
13
13
  }
@@ -1,10 +1,9 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
- import { DrawingAreaContext } from "../context/DrawingAreaProvider/index.js";
3
+ import { useStore } from "../internals/store/useStore.js";
4
+ import { useSelector } from "../internals/store/useSelector.js";
5
+ import { selectorChartId } from "../internals/plugins/corePlugins/useChartId/useChartId.selectors.js";
5
6
  export function useChartId() {
6
- const {
7
- chartId
8
- } = React.useContext(DrawingAreaContext);
9
- return React.useMemo(() => chartId, [chartId]);
7
+ const store = useStore();
8
+ return useSelector(store, selectorChartId);
10
9
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import { useHighlighted } from "../context/index.js";
5
- import { useStore } from "../internals/useStore.js";
5
+ import { useStore } from "../internals/store/useStore.js";
6
6
  export const useInteractionItemProps = skip => {
7
7
  const store = useStore();
8
8
  const {
@@ -30,7 +30,9 @@ export const useInteractionItemProps = skip => {
30
30
  });
31
31
  };
32
32
  const onPointerLeave = event => {
33
- event.currentTarget.releasePointerCapture(event.pointerId);
33
+ if (event.currentTarget.hasPointerCapture(event.pointerId)) {
34
+ event.currentTarget.releasePointerCapture(event.pointerId);
35
+ }
34
36
  store.update(prev => {
35
37
  const prevItem = prev.interaction.item;
36
38
  if (prevItem === null || Object.keys(data).some(key => data[key] !== prevItem[key])) {
@@ -1,14 +1,10 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
- import { SvgRefContext } from "../context/SvgRefProvider/index.js";
3
+ import { useChartContext } from "../context/ChartProvider/index.js";
5
4
  export function useSvgRef() {
6
- const {
7
- isInitialized,
8
- data
9
- } = React.useContext(SvgRefContext);
10
- if (!isInitialized) {
5
+ const context = useChartContext();
6
+ if (!context) {
11
7
  throw new Error(['MUI X: Could not find the svg ref context.', 'It looks like you rendered your component outside of a ChartsContainer parent component.'].join('\n'));
12
8
  }
13
- return data.svgRef;
9
+ return context.svgRef;
14
10
  }
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts v8.0.0-alpha.1
2
+ * @mui/x-charts v8.0.0-alpha.3
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -1,14 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { useCartesianContext } from "../../../context/CartesianProvider/index.js";
3
- import { DrawingAreaContext } from "../../../context/DrawingAreaProvider/index.js";
4
- import { useDrawingArea } from "../../../hooks/index.js";
3
+ import { useChartId, useDrawingArea } from "../../../hooks/index.js";
5
4
  import ChartsPiecewiseGradient from "./ChartsPiecewiseGradient.js";
6
5
  import ChartsContinuousGradient from "./ChartsContinuousGradient.js";
7
6
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
7
  export function useChartGradient() {
9
- const {
10
- chartId
11
- } = React.useContext(DrawingAreaContext);
8
+ const chartId = useChartId();
12
9
  return React.useCallback((axisId, direction) => `${chartId}-gradient-${direction}-${axisId}`, [chartId]);
13
10
  }
14
11
  export function ChartsAxesGradients() {
@@ -1,6 +1,5 @@
1
1
  // Components
2
2
  export * from "./components/ChartsAxesGradients/index.js";
3
- export * from "../ChartContainer/ResizableContainer.js";
4
3
 
5
4
  // hooks
6
5
  export { useSeries } from "../hooks/useSeries.js";
@@ -26,7 +25,6 @@ export * from "./computeAxisValue.js";
26
25
 
27
26
  export * from "../context/CartesianProvider/index.js";
28
27
  export * from "../context/DrawingAreaProvider/index.js";
29
- export * from "../context/InteractionProvider.js";
30
28
  export * from "../context/SeriesProvider/index.js";
31
29
  export * from "../context/ZAxisContextProvider.js";
32
30
  export * from "../context/PluginProvider/index.js";
@@ -34,7 +32,7 @@ export * from "../context/AnimationProvider/index.js";
34
32
  export { getAxisExtremum } from "../context/CartesianProvider/getAxisExtremum.js";
35
33
  export * from "../context/ChartDataProvider/index.js";
36
34
  export * from "../context/SizeProvider/index.js";
37
- export * from "../context/SvgRefProvider/index.js";
35
+ export * from "../context/ChartProvider/index.js";
38
36
 
39
37
  // series configuration
40
38
  export * from "../models/seriesType/config.js";
@@ -0,0 +1,3 @@
1
+ // This file should be removed after creating all plugins in favor of a file per chart type.
2
+ import { useChartInteraction } from "./featurePlugins/useChartInteraction/index.js";
3
+ export const ALL_PLUGINS = [useChartInteraction];
@@ -0,0 +1,7 @@
1
+ import { useChartId } from "./useChartId/index.js";
2
+
3
+ /**
4
+ * Internal plugins that create the tools used by the other plugins.
5
+ * These plugins are used by the Charts components.
6
+ */
7
+ export const CHART_CORE_PLUGINS = [useChartId];
@@ -0,0 +1 @@
1
+ export { CHART_CORE_PLUGINS } from "./corePlugins.js";
@@ -0,0 +1 @@
1
+ export { useChartId } from "./useChartId.js";
@@ -0,0 +1,32 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import * as React from 'react';
3
+ import { createChartDefaultId } from "./useChartId.utils.js";
4
+ export const useChartId = ({
5
+ params,
6
+ store
7
+ }) => {
8
+ React.useEffect(() => {
9
+ store.update(prevState => {
10
+ if (params.id === prevState.id.providedChartId && prevState.id.chartId !== undefined) {
11
+ return prevState;
12
+ }
13
+ return _extends({}, prevState, {
14
+ id: _extends({}, prevState.id, {
15
+ chartId: params.id ?? createChartDefaultId()
16
+ })
17
+ });
18
+ });
19
+ }, [store, params.id]);
20
+ return {};
21
+ };
22
+ useChartId.params = {
23
+ id: true
24
+ };
25
+ useChartId.getInitialState = ({
26
+ id
27
+ }) => ({
28
+ id: {
29
+ chartId: createChartDefaultId(),
30
+ providedChartId: id
31
+ }
32
+ });
@@ -0,0 +1,9 @@
1
+ import { createSelector } from "../../utils/selectors.js";
2
+ const selectorChartIdState = state => state.id;
3
+
4
+ /**
5
+ * Get the id attribute of the chart.
6
+ * @param {ChartState<[UseChartIdSignature]>} state The state of the chart.
7
+ * @returns {string} The id attribute of the chart.
8
+ */
9
+ export const selectorChartId = createSelector(selectorChartIdState, idState => idState.chartId);
@@ -0,0 +1,5 @@
1
+ let globalChartDefaultId = 0;
2
+ export const createChartDefaultId = () => {
3
+ globalChartDefaultId += 1;
4
+ return `mui-chart-${globalChartDefaultId}`;
5
+ };
@@ -0,0 +1,2 @@
1
+ export { useChartInteraction } from "./useChartInteraction.js";
2
+ export * from "./useChartInteraction.selectors.js";
@@ -0,0 +1,73 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import useEventCallback from '@mui/utils/useEventCallback';
3
+ export const useChartInteraction = ({
4
+ store
5
+ }) => {
6
+ const cleanInteraction = useEventCallback(() => {
7
+ store.update(prev => _extends({}, prev, {
8
+ interaction: _extends({}, prev.interaction, {
9
+ axis: {
10
+ x: null,
11
+ y: null
12
+ },
13
+ item: null
14
+ })
15
+ }));
16
+ });
17
+ const setItemInteraction = useEventCallback(newItem => {
18
+ store.update(prev => _extends({}, prev, {
19
+ interaction: _extends({}, prev.interaction, {
20
+ item: newItem
21
+ })
22
+ }));
23
+ });
24
+ const setAxisInteraction = useEventCallback(({
25
+ x: newStateX,
26
+ y: newStateY
27
+ }) => {
28
+ store.update(prev => _extends({}, prev, {
29
+ interaction: _extends({}, prev.interaction, {
30
+ axis: _extends({}, prev.interaction.axis, prev.interaction.axis.x?.index !== newStateX?.index || prev.interaction.axis.x?.value !== newStateX?.value ? {
31
+ x: newStateX
32
+ } : {}, prev.interaction.axis.y?.index !== newStateY?.index || prev.interaction.axis.y?.value !== newStateY?.value ? {
33
+ y: newStateY
34
+ } : {})
35
+ })
36
+ }));
37
+ });
38
+ const enableVoronoid = useEventCallback(() => {
39
+ store.update(prev => _extends({}, prev, {
40
+ interaction: _extends({}, prev.interaction, {
41
+ isVoronoiEnabled: true
42
+ })
43
+ }));
44
+ });
45
+ const disableVoronoid = useEventCallback(() => {
46
+ store.update(prev => _extends({}, prev, {
47
+ interaction: _extends({}, prev.interaction, {
48
+ isVoronoiEnabled: false
49
+ })
50
+ }));
51
+ });
52
+ return {
53
+ params: {},
54
+ instance: {
55
+ cleanInteraction,
56
+ setItemInteraction,
57
+ setAxisInteraction,
58
+ enableVoronoid,
59
+ disableVoronoid
60
+ }
61
+ };
62
+ };
63
+ useChartInteraction.getInitialState = () => ({
64
+ interaction: {
65
+ item: null,
66
+ axis: {
67
+ x: null,
68
+ y: null
69
+ },
70
+ isVoronoiEnabled: false
71
+ }
72
+ });
73
+ useChartInteraction.params = {};
@@ -0,0 +1,10 @@
1
+ import { createSelector } from "../../utils/selectors.js";
2
+ const selectInteraction = state => state.interaction;
3
+ export const selectorChartsInteractionItem = createSelector(selectInteraction, interaction => interaction.item);
4
+ export const selectorChartsInteractionAxis = createSelector(selectInteraction, interaction => interaction.axis);
5
+ export const selectorChartsInteractionXAxis = createSelector(selectInteraction, interaction => interaction.axis.x);
6
+ export const selectorChartsInteractionYAxis = createSelector(selectInteraction, interaction => interaction.axis.y);
7
+ export const selectorChartsInteractionItemIsDefined = createSelector(selectorChartsInteractionItem, item => item !== null);
8
+ export const selectorChartsInteractionXAxisIsDefined = createSelector(selectorChartsInteractionXAxis, x => x !== null);
9
+ export const selectorChartsInteractionYAxisIsDefined = createSelector(selectorChartsInteractionYAxis, y => y !== null);
10
+ export const selectorChartsInteractionIsVoronoiEnabled = createSelector(selectInteraction, interaction => interaction.isVoronoiEnabled);
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,3 @@
1
- export {};
1
+ export * from "./helpers.js";
2
+ export * from "./plugin.js";
3
+ export * from "./chart.js";
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,3 @@
1
- // For now this is fixed. Will need to support generic if we add plugins
2
-
3
1
  export class ChartStore {
4
2
  constructor(value) {
5
3
  this.value = void 0;
@@ -0,0 +1,72 @@
1
+ import * as React from 'react';
2
+ import { ChartStore } from "../plugins/utils/ChartStore.js";
3
+ import { CHART_CORE_PLUGINS } from "../plugins/corePlugins/index.js";
4
+ export function useChartApiInitialization(inputApiRef) {
5
+ const fallbackPublicApiRef = React.useRef({});
6
+ if (inputApiRef) {
7
+ if (inputApiRef.current == null) {
8
+ // eslint-disable-next-line react-compiler/react-compiler
9
+ inputApiRef.current = {};
10
+ }
11
+ return inputApiRef.current;
12
+ }
13
+ return fallbackPublicApiRef.current;
14
+ }
15
+ let globalId = 0;
16
+ export function useCharts(inPlugins, props) {
17
+ const plugins = React.useMemo(() => [...CHART_CORE_PLUGINS, ...inPlugins], [inPlugins]);
18
+ const pluginParams = {}; // To generate when plugins use params.
19
+ const instanceRef = React.useRef({});
20
+ const instance = instanceRef.current;
21
+ const publicAPI = useChartApiInitialization(props.apiRef);
22
+ const innerSvgRef = React.useRef(null);
23
+ const storeRef = React.useRef(null);
24
+ if (storeRef.current == null) {
25
+ // eslint-disable-next-line react-compiler/react-compiler
26
+ globalId += 1;
27
+ const initialState = {
28
+ // TODO remove when the interaction moves to plugin
29
+ interaction: {
30
+ item: null,
31
+ axis: {
32
+ x: null,
33
+ y: null
34
+ }
35
+ },
36
+ cacheKey: {
37
+ id: globalId
38
+ }
39
+ };
40
+ plugins.forEach(plugin => {
41
+ if (plugin.getInitialState) {
42
+ Object.assign(initialState, plugin.getInitialState({}));
43
+ }
44
+ });
45
+ storeRef.current = new ChartStore(initialState);
46
+ }
47
+ const runPlugin = plugin => {
48
+ const pluginResponse = plugin({
49
+ instance,
50
+ params: pluginParams,
51
+ plugins: plugins,
52
+ store: storeRef.current,
53
+ svgRef: innerSvgRef
54
+ });
55
+ if (pluginResponse.publicAPI) {
56
+ Object.assign(publicAPI, pluginResponse.publicAPI);
57
+ }
58
+ if (pluginResponse.instance) {
59
+ Object.assign(instance, pluginResponse.instance);
60
+ }
61
+ };
62
+ plugins.forEach(runPlugin);
63
+ const contextValue = React.useMemo(() => ({
64
+ store: storeRef.current,
65
+ publicAPI,
66
+ instance,
67
+ svgRef: innerSvgRef
68
+ }), [instance, publicAPI]);
69
+ return {
70
+ contextValue
71
+ };
72
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,17 +1,17 @@
1
- import * as React from 'react';
2
- import { ChartsContext } from "../context/InteractionProvider.js";
1
+ import { useChartContext } from "../../context/ChartProvider/index.js";
2
+ // This hook should be removed because user and us should not interact with the store directly, but with public/private APIs
3
3
  export function useStore(skipError) {
4
- const charts = React.useContext(ChartsContext);
4
+ const context = useChartContext();
5
5
  if (skipError) {
6
6
  // TODO: Remove once store is used by all charts.
7
7
  // This line is only for `useAxisEvents` which is in the surface of the Gauge.
8
8
  // But the Gauge don't have store yet because it does not need the interaction provider.
9
9
  // Will be fixed when every thing move to the store since every component will have access to it.
10
10
  // @ts-ignore
11
- return charts?.store;
11
+ return context?.store;
12
12
  }
13
- if (!charts) {
13
+ if (!context) {
14
14
  throw new Error(['MUI X: Could not find the charts context.', 'It looks like you rendered your component outside of a ChartsContainer parent component.'].join('\n'));
15
15
  }
16
- return charts.store;
16
+ return context.store;
17
17
  }
@@ -250,7 +250,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
250
250
  hideTooltip: _propTypes.default.bool,
251
251
  id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
252
252
  label: _propTypes.default.string,
253
- labelFontSize: _propTypes.default.number,
254
253
  labelStyle: _propTypes.default.object,
255
254
  max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
256
255
  min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
@@ -261,7 +260,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
261
260
  slots: _propTypes.default.object,
262
261
  stroke: _propTypes.default.string,
263
262
  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]),
264
- tickFontSize: _propTypes.default.number,
265
263
  tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
266
264
  tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
267
265
  tickLabelPlacement: _propTypes.default.oneOf(['middle', 'tick']),
@@ -304,7 +302,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
304
302
  hideTooltip: _propTypes.default.bool,
305
303
  id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
306
304
  label: _propTypes.default.string,
307
- labelFontSize: _propTypes.default.number,
308
305
  labelStyle: _propTypes.default.object,
309
306
  max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
310
307
  min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
@@ -315,7 +312,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
315
312
  slots: _propTypes.default.object,
316
313
  stroke: _propTypes.default.string,
317
314
  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]),
318
- tickFontSize: _propTypes.default.number,
319
315
  tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
320
316
  tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
321
317
  tickLabelPlacement: _propTypes.default.oneOf(['middle', 'tick']),