@mui/x-charts 7.0.0-beta.2 → 7.0.0-beta.4

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 (265) hide show
  1. package/BarChart/BarChart.d.ts +21 -5
  2. package/BarChart/BarChart.js +27 -7
  3. package/CHANGELOG.md +298 -23
  4. package/ChartsGrid/ChartsGrid.d.ts +30 -0
  5. package/ChartsGrid/ChartsGrid.js +128 -0
  6. package/ChartsGrid/chartsGridClasses.d.ts +13 -0
  7. package/ChartsGrid/chartsGridClasses.js +14 -0
  8. package/ChartsGrid/index.d.ts +2 -0
  9. package/ChartsGrid/index.js +27 -0
  10. package/ChartsGrid/package.json +6 -0
  11. package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
  12. package/ChartsSurface.js +6 -4
  13. package/ChartsTooltip/utils.js +1 -1
  14. package/ChartsVoronoiHandler/ChartsVoronoiHandler.d.ts +0 -1
  15. package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +1 -2
  16. package/ChartsXAxis/ChartsXAxis.js +3 -3
  17. package/ChartsYAxis/ChartsYAxis.js +3 -3
  18. package/Gauge/Gauge.d.ts +13 -0
  19. package/Gauge/Gauge.js +154 -0
  20. package/Gauge/GaugeContainer.d.ts +17 -0
  21. package/Gauge/GaugeContainer.js +214 -0
  22. package/Gauge/GaugeProvider.d.ts +117 -0
  23. package/Gauge/GaugeProvider.js +99 -0
  24. package/Gauge/GaugeReferenceArc.d.ts +2 -0
  25. package/Gauge/GaugeReferenceArc.js +44 -0
  26. package/Gauge/GaugeValueArc.d.ts +2 -0
  27. package/Gauge/GaugeValueArc.js +51 -0
  28. package/Gauge/GaugeValueText.d.ts +15 -0
  29. package/Gauge/GaugeValueText.js +77 -0
  30. package/Gauge/gaugeClasses.d.ts +14 -0
  31. package/Gauge/gaugeClasses.js +15 -0
  32. package/Gauge/index.d.ts +7 -0
  33. package/Gauge/index.js +87 -0
  34. package/Gauge/package.json +6 -0
  35. package/Gauge/utils.d.ts +19 -0
  36. package/Gauge/utils.js +75 -0
  37. package/LineChart/LineChart.d.ts +24 -5
  38. package/LineChart/LineChart.js +31 -7
  39. package/PieChart/PieArc.d.ts +4 -4
  40. package/PieChart/PieArc.js +9 -9
  41. package/PieChart/PieArcLabelPlot.js +13 -13
  42. package/PieChart/PieChart.d.ts +22 -0
  43. package/PieChart/PieChart.js +22 -2
  44. package/ResponsiveChartContainer/ResponsiveChartContainer.d.ts +0 -2
  45. package/ResponsiveChartContainer/ResponsiveChartContainer.js +2 -68
  46. package/ResponsiveChartContainer/useChartContainerDimensions.d.ts +2 -0
  47. package/ResponsiveChartContainer/useChartContainerDimensions.js +76 -0
  48. package/ScatterChart/ScatterChart.d.ts +18 -0
  49. package/ScatterChart/ScatterChart.js +25 -3
  50. package/SparkLineChart/SparkLineChart.js +0 -2
  51. package/context/CartesianContextProvider.d.ts +0 -8
  52. package/context/CartesianContextProvider.js +4 -89
  53. package/context/DrawingProvider.d.ts +2 -11
  54. package/context/DrawingProvider.js +10 -35
  55. package/context/HighlightProvider.js +3 -0
  56. package/context/InteractionProvider.js +3 -0
  57. package/context/SeriesContextProvider.js +3 -0
  58. package/context/index.d.ts +0 -2
  59. package/context/index.js +1 -15
  60. package/esm/BarChart/BarChart.js +27 -7
  61. package/esm/ChartsGrid/ChartsGrid.js +121 -0
  62. package/esm/ChartsGrid/chartsGridClasses.js +6 -0
  63. package/esm/ChartsGrid/index.js +2 -0
  64. package/esm/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +2 -2
  65. package/esm/ChartsSurface.js +6 -4
  66. package/esm/ChartsTooltip/utils.js +2 -2
  67. package/esm/ChartsVoronoiHandler/ChartsVoronoiHandler.js +2 -3
  68. package/esm/ChartsXAxis/ChartsXAxis.js +2 -2
  69. package/esm/ChartsYAxis/ChartsYAxis.js +2 -2
  70. package/esm/Gauge/Gauge.js +147 -0
  71. package/esm/Gauge/GaugeContainer.js +209 -0
  72. package/esm/Gauge/GaugeProvider.js +88 -0
  73. package/esm/Gauge/GaugeReferenceArc.js +35 -0
  74. package/esm/Gauge/GaugeValueArc.js +42 -0
  75. package/esm/Gauge/GaugeValueText.js +69 -0
  76. package/esm/Gauge/gaugeClasses.js +7 -0
  77. package/esm/Gauge/index.js +7 -0
  78. package/esm/Gauge/utils.js +68 -0
  79. package/esm/LineChart/LineChart.js +31 -7
  80. package/esm/PieChart/PieArc.js +9 -9
  81. package/esm/PieChart/PieArcLabelPlot.js +13 -13
  82. package/esm/PieChart/PieChart.js +22 -2
  83. package/esm/ResponsiveChartContainer/ResponsiveChartContainer.js +2 -68
  84. package/esm/ResponsiveChartContainer/useChartContainerDimensions.js +66 -0
  85. package/esm/ScatterChart/ScatterChart.js +25 -3
  86. package/esm/SparkLineChart/SparkLineChart.js +0 -2
  87. package/esm/context/CartesianContextProvider.js +3 -88
  88. package/esm/context/DrawingProvider.js +10 -36
  89. package/esm/context/HighlightProvider.js +3 -0
  90. package/esm/context/InteractionProvider.js +3 -0
  91. package/esm/context/SeriesContextProvider.js +3 -0
  92. package/esm/context/index.js +1 -2
  93. package/esm/hooks/useAxisEvents.js +2 -2
  94. package/esm/hooks/useTicks.js +2 -3
  95. package/esm/index.js +2 -0
  96. package/hooks/useAxisEvents.js +1 -1
  97. package/hooks/useTicks.d.ts +2 -3
  98. package/hooks/useTicks.js +2 -3
  99. package/index.d.ts +2 -0
  100. package/index.js +23 -1
  101. package/modern/BarChart/BarChart.js +27 -7
  102. package/modern/ChartsGrid/ChartsGrid.js +121 -0
  103. package/modern/ChartsGrid/chartsGridClasses.js +6 -0
  104. package/modern/ChartsGrid/index.js +2 -0
  105. package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +2 -2
  106. package/modern/ChartsSurface.js +6 -4
  107. package/modern/ChartsTooltip/utils.js +2 -2
  108. package/modern/ChartsVoronoiHandler/ChartsVoronoiHandler.js +2 -3
  109. package/modern/ChartsXAxis/ChartsXAxis.js +2 -2
  110. package/modern/ChartsYAxis/ChartsYAxis.js +2 -2
  111. package/modern/Gauge/Gauge.js +147 -0
  112. package/modern/Gauge/GaugeContainer.js +206 -0
  113. package/modern/Gauge/GaugeProvider.js +88 -0
  114. package/modern/Gauge/GaugeReferenceArc.js +35 -0
  115. package/modern/Gauge/GaugeValueArc.js +42 -0
  116. package/modern/Gauge/GaugeValueText.js +69 -0
  117. package/modern/Gauge/gaugeClasses.js +7 -0
  118. package/modern/Gauge/index.js +7 -0
  119. package/modern/Gauge/utils.js +68 -0
  120. package/modern/LineChart/LineChart.js +31 -7
  121. package/modern/PieChart/PieArc.js +9 -9
  122. package/modern/PieChart/PieArcLabelPlot.js +13 -13
  123. package/modern/PieChart/PieChart.js +22 -2
  124. package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +2 -68
  125. package/modern/ResponsiveChartContainer/useChartContainerDimensions.js +66 -0
  126. package/modern/ScatterChart/ScatterChart.js +25 -3
  127. package/modern/SparkLineChart/SparkLineChart.js +0 -2
  128. package/modern/context/CartesianContextProvider.js +3 -88
  129. package/modern/context/DrawingProvider.js +10 -36
  130. package/modern/context/HighlightProvider.js +3 -0
  131. package/modern/context/InteractionProvider.js +3 -0
  132. package/modern/context/SeriesContextProvider.js +3 -0
  133. package/modern/context/index.js +1 -2
  134. package/modern/hooks/useAxisEvents.js +2 -2
  135. package/modern/hooks/useTicks.js +2 -3
  136. package/modern/index.js +3 -1
  137. package/package.json +4 -4
  138. package/legacy/BarChart/BarChart.js +0 -418
  139. package/legacy/BarChart/BarElement.js +0 -119
  140. package/legacy/BarChart/BarPlot.js +0 -232
  141. package/legacy/BarChart/extremums.js +0 -45
  142. package/legacy/BarChart/formatter.js +0 -78
  143. package/legacy/BarChart/index.js +0 -3
  144. package/legacy/BarChart/legend.js +0 -15
  145. package/legacy/ChartContainer/ChartContainer.js +0 -189
  146. package/legacy/ChartContainer/index.js +0 -1
  147. package/legacy/ChartsAxis/ChartsAxis.js +0 -215
  148. package/legacy/ChartsAxis/axisClasses.js +0 -5
  149. package/legacy/ChartsAxis/index.js +0 -2
  150. package/legacy/ChartsAxisHighlight/ChartsAxisHighlight.js +0 -105
  151. package/legacy/ChartsAxisHighlight/index.js +0 -1
  152. package/legacy/ChartsClipPath/ChartsClipPath.js +0 -48
  153. package/legacy/ChartsClipPath/index.js +0 -1
  154. package/legacy/ChartsLegend/ChartsLegend.js +0 -100
  155. package/legacy/ChartsLegend/DefaultChartsLegend.js +0 -302
  156. package/legacy/ChartsLegend/chartsLegendClasses.js +0 -5
  157. package/legacy/ChartsLegend/index.js +0 -4
  158. package/legacy/ChartsLegend/utils.js +0 -15
  159. package/legacy/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +0 -75
  160. package/legacy/ChartsOnAxisClickHandler/index.js +0 -1
  161. package/legacy/ChartsReferenceLine/ChartsReferenceLine.js +0 -72
  162. package/legacy/ChartsReferenceLine/ChartsXReferenceLine.js +0 -105
  163. package/legacy/ChartsReferenceLine/ChartsYReferenceLine.js +0 -105
  164. package/legacy/ChartsReferenceLine/chartsReferenceLineClasses.js +0 -6
  165. package/legacy/ChartsReferenceLine/common.js +0 -19
  166. package/legacy/ChartsReferenceLine/index.js +0 -2
  167. package/legacy/ChartsSurface.js +0 -76
  168. package/legacy/ChartsText/ChartsText.js +0 -95
  169. package/legacy/ChartsText/index.js +0 -1
  170. package/legacy/ChartsTooltip/ChartsAxisTooltipContent.js +0 -96
  171. package/legacy/ChartsTooltip/ChartsItemTooltipContent.js +0 -53
  172. package/legacy/ChartsTooltip/ChartsTooltip.js +0 -148
  173. package/legacy/ChartsTooltip/ChartsTooltipTable.js +0 -80
  174. package/legacy/ChartsTooltip/DefaultChartsAxisTooltipContent.js +0 -118
  175. package/legacy/ChartsTooltip/DefaultChartsItemTooltipContent.js +0 -78
  176. package/legacy/ChartsTooltip/chartsTooltipClasses.js +0 -5
  177. package/legacy/ChartsTooltip/index.js +0 -6
  178. package/legacy/ChartsTooltip/utils.js +0 -103
  179. package/legacy/ChartsVoronoiHandler/ChartsVoronoiHandler.js +0 -206
  180. package/legacy/ChartsVoronoiHandler/index.js +0 -1
  181. package/legacy/ChartsXAxis/ChartsXAxis.js +0 -339
  182. package/legacy/ChartsXAxis/index.js +0 -1
  183. package/legacy/ChartsYAxis/ChartsYAxis.js +0 -267
  184. package/legacy/ChartsYAxis/index.js +0 -1
  185. package/legacy/LineChart/AnimatedArea.js +0 -102
  186. package/legacy/LineChart/AnimatedLine.js +0 -104
  187. package/legacy/LineChart/AreaElement.js +0 -112
  188. package/legacy/LineChart/AreaPlot.js +0 -149
  189. package/legacy/LineChart/LineChart.js +0 -426
  190. package/legacy/LineChart/LineElement.js +0 -112
  191. package/legacy/LineChart/LineHighlightElement.js +0 -79
  192. package/legacy/LineChart/LineHighlightPlot.js +0 -97
  193. package/legacy/LineChart/LinePlot.js +0 -144
  194. package/legacy/LineChart/MarkElement.js +0 -153
  195. package/legacy/LineChart/MarkPlot.js +0 -178
  196. package/legacy/LineChart/extremums.js +0 -54
  197. package/legacy/LineChart/formatter.js +0 -82
  198. package/legacy/LineChart/index.js +0 -11
  199. package/legacy/LineChart/legend.js +0 -15
  200. package/legacy/PieChart/PieArc.js +0 -103
  201. package/legacy/PieChart/PieArcLabel.js +0 -112
  202. package/legacy/PieChart/PieArcLabelPlot.js +0 -193
  203. package/legacy/PieChart/PieArcPlot.js +0 -180
  204. package/legacy/PieChart/PieChart.js +0 -382
  205. package/legacy/PieChart/PiePlot.js +0 -137
  206. package/legacy/PieChart/dataTransform/transition.js +0 -149
  207. package/legacy/PieChart/dataTransform/useTransformData.js +0 -63
  208. package/legacy/PieChart/formatter.js +0 -55
  209. package/legacy/PieChart/index.js +0 -6
  210. package/legacy/PieChart/legend.js +0 -16
  211. package/legacy/ResponsiveChartContainer/ResponsiveChartContainer.js +0 -255
  212. package/legacy/ResponsiveChartContainer/index.js +0 -1
  213. package/legacy/ScatterChart/Scatter.js +0 -110
  214. package/legacy/ScatterChart/ScatterChart.js +0 -370
  215. package/legacy/ScatterChart/ScatterPlot.js +0 -80
  216. package/legacy/ScatterChart/extremums.js +0 -39
  217. package/legacy/ScatterChart/formatter.js +0 -12
  218. package/legacy/ScatterChart/index.js +0 -3
  219. package/legacy/ScatterChart/legend.js +0 -15
  220. package/legacy/SparkLineChart/SparkLineChart.js +0 -266
  221. package/legacy/SparkLineChart/index.js +0 -1
  222. package/legacy/colorPalettes/colorPalettes.js +0 -15
  223. package/legacy/colorPalettes/index.js +0 -1
  224. package/legacy/constants.js +0 -8
  225. package/legacy/context/CartesianContextProvider.js +0 -327
  226. package/legacy/context/DrawingProvider.js +0 -74
  227. package/legacy/context/HighlightProvider.js +0 -56
  228. package/legacy/context/InteractionProvider.js +0 -81
  229. package/legacy/context/SeriesContextProvider.js +0 -74
  230. package/legacy/context/index.js +0 -2
  231. package/legacy/hooks/index.js +0 -2
  232. package/legacy/hooks/useAxisEvents.js +0 -120
  233. package/legacy/hooks/useChartDimensions.js +0 -18
  234. package/legacy/hooks/useDrawingArea.js +0 -21
  235. package/legacy/hooks/useInteractionItemProps.js +0 -71
  236. package/legacy/hooks/useMounted.js +0 -21
  237. package/legacy/hooks/useReducedMotion.js +0 -27
  238. package/legacy/hooks/useScale.js +0 -33
  239. package/legacy/hooks/useTicks.js +0 -66
  240. package/legacy/index.js +0 -31
  241. package/legacy/internals/components/AxisSharedComponents.js +0 -25
  242. package/legacy/internals/defaultizeColor.js +0 -17
  243. package/legacy/internals/defaultizeValueFormatter.js +0 -12
  244. package/legacy/internals/domUtils.js +0 -121
  245. package/legacy/internals/geometry.js +0 -37
  246. package/legacy/internals/getCurve.js +0 -39
  247. package/legacy/internals/getScale.js +0 -17
  248. package/legacy/internals/getWordsByLines.js +0 -15
  249. package/legacy/internals/isBandScale.js +0 -3
  250. package/legacy/internals/stackSeries.js +0 -92
  251. package/legacy/internals/useAnimatedPath.js +0 -32
  252. package/legacy/internals/utils.js +0 -52
  253. package/legacy/models/axis.js +0 -6
  254. package/legacy/models/helpers.js +0 -1
  255. package/legacy/models/index.js +0 -4
  256. package/legacy/models/layout.js +0 -1
  257. package/legacy/models/seriesType/bar.js +0 -1
  258. package/legacy/models/seriesType/common.js +0 -1
  259. package/legacy/models/seriesType/config.js +0 -1
  260. package/legacy/models/seriesType/index.js +0 -5
  261. package/legacy/models/seriesType/line.js +0 -1
  262. package/legacy/models/seriesType/pie.js +0 -1
  263. package/legacy/models/seriesType/scatter.js +0 -1
  264. package/legacy/models/stacking.js +0 -1
  265. package/legacy/themeAugmentation/index.js +0 -3
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["slots", "slotProps", "innerRadius", "outerRadius", "arcLabelRadius", "cornerRadius", "paddingAngle", "id", "highlightScope", "highlighted", "faded", "data", "arcLabel", "arcLabelMinAngle", "skipAnimation"],
3
+ const _excluded = ["arcLabel", "arcLabelMinAngle", "arcLabelRadius", "cornerRadius", "data", "faded", "highlighted", "highlightScope", "id", "innerRadius", "outerRadius", "paddingAngle", "skipAnimation", "slotProps", "slots"],
4
4
  _excluded2 = ["startAngle", "endAngle", "paddingAngle", "innerRadius", "outerRadius", "arcLabelRadius", "cornerRadius"];
5
5
  import * as React from 'react';
6
6
  import PropTypes from 'prop-types';
@@ -25,23 +25,23 @@ function getItemLabel(arcLabel, arcLabelMinAngle, item) {
25
25
  }
26
26
  function PieArcLabelPlot(props) {
27
27
  const {
28
- slots,
29
- slotProps,
30
- innerRadius,
31
- outerRadius,
28
+ arcLabel,
29
+ arcLabelMinAngle = 0,
32
30
  arcLabelRadius,
33
31
  cornerRadius = 0,
34
- paddingAngle = 0,
35
- id,
36
- highlightScope,
37
- highlighted,
32
+ data,
38
33
  faded = {
39
34
  additionalRadius: -5
40
35
  },
41
- data,
42
- arcLabel,
43
- arcLabelMinAngle = 0,
44
- skipAnimation
36
+ highlighted,
37
+ highlightScope,
38
+ id,
39
+ innerRadius,
40
+ outerRadius,
41
+ paddingAngle = 0,
42
+ skipAnimation,
43
+ slotProps,
44
+ slots
45
45
  } = props,
46
46
  other = _objectWithoutPropertiesLoose(props, _excluded);
47
47
  const transformedData = useTransformData({
@@ -101,6 +101,11 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
101
101
  // | These PropTypes are generated from the TypeScript type definitions |
102
102
  // | To update them edit the TypeScript types and run "yarn proptypes" |
103
103
  // ----------------------------------------------------------------------
104
+ /**
105
+ * The configuration of axes highlight.
106
+ * @see See {@link https://mui.com/x/react-charts/tooltip/#highlights highlight docs} for more details.
107
+ * @default { x: 'none', y: 'none' }
108
+ */
104
109
  axisHighlight: PropTypes.shape({
105
110
  x: PropTypes.oneOf(['band', 'line', 'none']),
106
111
  y: PropTypes.oneOf(['band', 'line', 'none'])
@@ -152,7 +157,6 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
152
157
  disableAxisListener: PropTypes.bool,
153
158
  /**
154
159
  * The height of the chart in px. If not defined, it takes the height of the parent element.
155
- * @default undefined
156
160
  */
157
161
  height: PropTypes.number,
158
162
  /**
@@ -183,6 +187,8 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
183
187
  tickSize: PropTypes.number
184
188
  }), PropTypes.string]),
185
189
  /**
190
+ * The props of the legend.
191
+ * @default { direction: 'column', position: { vertical: 'middle', horizontal: 'right' } }
186
192
  * @deprecated Consider using `slotProps.legend` instead.
187
193
  */
188
194
  legend: PropTypes.shape({
@@ -208,6 +214,9 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
208
214
  right: PropTypes.number,
209
215
  top: PropTypes.number
210
216
  }),
217
+ /**
218
+ * Callback fired when a pie arc is clicked.
219
+ */
211
220
  onItemClick: PropTypes.func,
212
221
  /**
213
222
  * Indicate which axis to display the right of the charts.
@@ -236,6 +245,9 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
236
245
  tickNumber: PropTypes.number,
237
246
  tickSize: PropTypes.number
238
247
  }), PropTypes.string]),
248
+ /**
249
+ * The series to display in the pie chart.
250
+ */
239
251
  series: PropTypes.arrayOf(PropTypes.object).isRequired,
240
252
  /**
241
253
  * If `true`, animations are skipped.
@@ -247,9 +259,18 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
247
259
  * @default {}
248
260
  */
249
261
  slotProps: PropTypes.object,
262
+ /**
263
+ * Overridable component slots.
264
+ * @default {}
265
+ */
250
266
  slots: PropTypes.object,
251
267
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
252
268
  title: PropTypes.string,
269
+ /**
270
+ * The configuration of the tooltip.
271
+ * @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
272
+ * @default { trigger: 'item' }
273
+ */
253
274
  tooltip: PropTypes.shape({
254
275
  axisContent: PropTypes.elementType,
255
276
  classes: PropTypes.object,
@@ -293,7 +314,6 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
293
314
  }),
294
315
  /**
295
316
  * The width of the chart in px. If not defined, it takes the width of the parent element.
296
- * @default undefined
297
317
  */
298
318
  width: PropTypes.number,
299
319
  /**
@@ -3,74 +3,10 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  const _excluded = ["width", "height"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
- import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
7
- import ownerWindow from '@mui/utils/ownerWindow';
8
6
  import { styled } from '@mui/material/styles';
9
7
  import { ChartContainer } from '../ChartContainer';
8
+ import { useChartContainerDimensions } from './useChartContainerDimensions';
10
9
  import { jsx as _jsx } from "react/jsx-runtime";
11
- const useChartDimensions = (inWidth, inHeight) => {
12
- const rootRef = React.useRef(null);
13
- const displayError = React.useRef(false);
14
- const [width, setWidth] = React.useState(0);
15
- const [height, setHeight] = React.useState(0);
16
-
17
- // Adaptation of the `computeSizeAndPublishResizeEvent` from the grid.
18
- const computeSize = React.useCallback(() => {
19
- const mainEl = rootRef?.current;
20
- if (!mainEl) {
21
- return;
22
- }
23
- const win = ownerWindow(mainEl);
24
- const computedStyle = win.getComputedStyle(mainEl);
25
- const newHeight = Math.floor(parseFloat(computedStyle.height)) || 0;
26
- const newWidth = Math.floor(parseFloat(computedStyle.width)) || 0;
27
- setWidth(newWidth);
28
- setHeight(newHeight);
29
- }, []);
30
- React.useEffect(() => {
31
- // Ensure the error detection occurs after the first rendering.
32
- displayError.current = true;
33
- }, []);
34
- useEnhancedEffect(() => {
35
- if (inWidth !== undefined && inHeight !== undefined) {
36
- return () => {};
37
- }
38
- computeSize();
39
- const elementToObserve = rootRef.current;
40
- if (typeof ResizeObserver === 'undefined') {
41
- return () => {};
42
- }
43
- let animationFrame;
44
- const observer = new ResizeObserver(() => {
45
- // See https://github.com/mui/mui-x/issues/8733
46
- animationFrame = requestAnimationFrame(() => {
47
- computeSize();
48
- });
49
- });
50
- if (elementToObserve) {
51
- observer.observe(elementToObserve);
52
- }
53
- return () => {
54
- if (animationFrame) {
55
- window.cancelAnimationFrame(animationFrame);
56
- }
57
- if (elementToObserve) {
58
- observer.unobserve(elementToObserve);
59
- }
60
- };
61
- }, [computeSize, inHeight, inWidth]);
62
- if (process.env.NODE_ENV !== 'production') {
63
- if (displayError.current && inWidth === undefined && width === 0) {
64
- console.error(`MUI X Charts: ChartContainer does not have \`width\` prop, and its container has no \`width\` defined.`);
65
- displayError.current = false;
66
- }
67
- if (displayError.current && inHeight === undefined && height === 0) {
68
- console.error(`MUI X Charts: ChartContainer does not have \`height\` prop, and its container has no \`height\` defined.`);
69
- displayError.current = false;
70
- }
71
- }
72
- return [rootRef, inWidth ?? width, inHeight ?? height];
73
- };
74
10
  const ResizableContainer = styled('div', {
75
11
  name: 'MuiResponsiveChart',
76
12
  slot: 'Container'
@@ -97,7 +33,7 @@ const ResponsiveChartContainer = /*#__PURE__*/React.forwardRef(function Responsi
97
33
  height: inHeight
98
34
  } = props,
99
35
  other = _objectWithoutPropertiesLoose(props, _excluded);
100
- const [containerRef, width, height] = useChartDimensions(inWidth, inHeight);
36
+ const [containerRef, width, height] = useChartContainerDimensions(inWidth, inHeight);
101
37
  return /*#__PURE__*/_jsx(ResizableContainer, {
102
38
  ref: containerRef,
103
39
  ownerState: {
@@ -136,7 +72,6 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainer.propTypes = {
136
72
  disableAxisListener: PropTypes.bool,
137
73
  /**
138
74
  * The height of the chart in px. If not defined, it takes the height of the parent element.
139
- * @default undefined
140
75
  */
141
76
  height: PropTypes.number,
142
77
  /**
@@ -167,7 +102,6 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainer.propTypes = {
167
102
  }),
168
103
  /**
169
104
  * The width of the chart in px. If not defined, it takes the width of the parent element.
170
- * @default undefined
171
105
  */
172
106
  width: PropTypes.number,
173
107
  /**
@@ -0,0 +1,66 @@
1
+ import * as React from 'react';
2
+ import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
3
+ import ownerWindow from '@mui/utils/ownerWindow';
4
+ export const useChartContainerDimensions = (inWidth, inHeight) => {
5
+ const rootRef = React.useRef(null);
6
+ const displayError = React.useRef(false);
7
+ const [width, setWidth] = React.useState(0);
8
+ const [height, setHeight] = React.useState(0);
9
+
10
+ // Adaptation of the `computeSizeAndPublishResizeEvent` from the grid.
11
+ const computeSize = React.useCallback(() => {
12
+ const mainEl = rootRef?.current;
13
+ if (!mainEl) {
14
+ return;
15
+ }
16
+ const win = ownerWindow(mainEl);
17
+ const computedStyle = win.getComputedStyle(mainEl);
18
+ const newHeight = Math.floor(parseFloat(computedStyle.height)) || 0;
19
+ const newWidth = Math.floor(parseFloat(computedStyle.width)) || 0;
20
+ setWidth(newWidth);
21
+ setHeight(newHeight);
22
+ }, []);
23
+ React.useEffect(() => {
24
+ // Ensure the error detection occurs after the first rendering.
25
+ displayError.current = true;
26
+ }, []);
27
+ useEnhancedEffect(() => {
28
+ if (inWidth !== undefined && inHeight !== undefined) {
29
+ return () => {};
30
+ }
31
+ computeSize();
32
+ const elementToObserve = rootRef.current;
33
+ if (typeof ResizeObserver === 'undefined') {
34
+ return () => {};
35
+ }
36
+ let animationFrame;
37
+ const observer = new ResizeObserver(() => {
38
+ // See https://github.com/mui/mui-x/issues/8733
39
+ animationFrame = requestAnimationFrame(() => {
40
+ computeSize();
41
+ });
42
+ });
43
+ if (elementToObserve) {
44
+ observer.observe(elementToObserve);
45
+ }
46
+ return () => {
47
+ if (animationFrame) {
48
+ window.cancelAnimationFrame(animationFrame);
49
+ }
50
+ if (elementToObserve) {
51
+ observer.unobserve(elementToObserve);
52
+ }
53
+ };
54
+ }, [computeSize, inHeight, inWidth]);
55
+ if (process.env.NODE_ENV !== 'production') {
56
+ if (displayError.current && inWidth === undefined && width === 0) {
57
+ console.error(`MUI X Charts: ChartContainer does not have \`width\` prop, and its container has no \`width\` defined.`);
58
+ displayError.current = false;
59
+ }
60
+ if (displayError.current && inHeight === undefined && height === 0) {
61
+ console.error(`MUI X Charts: ChartContainer does not have \`height\` prop, and its container has no \`height\` defined.`);
62
+ displayError.current = false;
63
+ }
64
+ }
65
+ return [rootRef, inWidth ?? width, inHeight ?? height];
66
+ };
@@ -8,6 +8,7 @@ import { ChartsTooltip } from '../ChartsTooltip';
8
8
  import { ChartsLegend } from '../ChartsLegend';
9
9
  import { ChartsAxisHighlight } from '../ChartsAxisHighlight';
10
10
  import { ChartsVoronoiHandler } from '../ChartsVoronoiHandler/ChartsVoronoiHandler';
11
+ import { ChartsGrid } from '../ChartsGrid';
11
12
  import { jsx as _jsx } from "react/jsx-runtime";
12
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
13
14
  /**
@@ -35,6 +36,7 @@ const ScatterChart = /*#__PURE__*/React.forwardRef(function ScatterChart(props,
35
36
  margin,
36
37
  colors,
37
38
  sx,
39
+ grid,
38
40
  topAxis,
39
41
  leftAxis,
40
42
  rightAxis,
@@ -66,6 +68,9 @@ const ScatterChart = /*#__PURE__*/React.forwardRef(function ScatterChart(props,
66
68
  bottomAxis: bottomAxis,
67
69
  slots: slots,
68
70
  slotProps: slotProps
71
+ }), grid && /*#__PURE__*/_jsx(ChartsGrid, {
72
+ vertical: grid.vertical,
73
+ horizontal: grid.horizontal
69
74
  }), /*#__PURE__*/_jsx(ScatterPlot, {
70
75
  slots: slots,
71
76
  slotProps: slotProps,
@@ -86,6 +91,11 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
86
91
  // | These PropTypes are generated from the TypeScript type definitions |
87
92
  // | To update them edit the TypeScript types and run "yarn proptypes" |
88
93
  // ----------------------------------------------------------------------
94
+ /**
95
+ * The configuration of axes highlight.
96
+ * @see See {@link https://mui.com/x/react-charts/tooltip/#highlights highlight docs} for more details.
97
+ * @default { x: 'none', y: 'none' }
98
+ */
89
99
  axisHighlight: PropTypes.shape({
90
100
  x: PropTypes.oneOf(['band', 'line', 'none']),
91
101
  y: PropTypes.oneOf(['band', 'line', 'none'])
@@ -140,9 +150,15 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
140
150
  * @default false
141
151
  */
142
152
  disableVoronoi: PropTypes.bool,
153
+ /**
154
+ * Option to display a cartesian grid in the background.
155
+ */
156
+ grid: PropTypes.shape({
157
+ horizontal: PropTypes.bool,
158
+ vertical: PropTypes.bool
159
+ }),
143
160
  /**
144
161
  * The height of the chart in px. If not defined, it takes the height of the parent element.
145
- * @default undefined
146
162
  */
147
163
  height: PropTypes.number,
148
164
  /**
@@ -231,6 +247,9 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
231
247
  tickNumber: PropTypes.number,
232
248
  tickSize: PropTypes.number
233
249
  }), PropTypes.string]),
250
+ /**
251
+ * The series to display in the scatter chart.
252
+ */
234
253
  series: PropTypes.arrayOf(PropTypes.object).isRequired,
235
254
  /**
236
255
  * The props used for each component slot.
@@ -244,6 +263,11 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
244
263
  slots: PropTypes.object,
245
264
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
246
265
  title: PropTypes.string,
266
+ /**
267
+ * The configuration of the tooltip.
268
+ * @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
269
+ * @default { trigger: 'item' }
270
+ */
247
271
  tooltip: PropTypes.shape({
248
272
  axisContent: PropTypes.elementType,
249
273
  classes: PropTypes.object,
@@ -288,12 +312,10 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
288
312
  /**
289
313
  * Defines the maximal distance between a scatter point and the pointer that triggers the interaction.
290
314
  * If `undefined`, the radius is assumed to be infinite.
291
- * @default undefined
292
315
  */
293
316
  voronoiMaxRadius: PropTypes.number,
294
317
  /**
295
318
  * The width of the chart in px. If not defined, it takes the width of the parent element.
296
- * @default undefined
297
319
  */
298
320
  width: PropTypes.number,
299
321
  /**
@@ -146,7 +146,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
146
146
  disableAxisListener: PropTypes.bool,
147
147
  /**
148
148
  * The height of the chart in px. If not defined, it takes the height of the parent element.
149
- * @default undefined
150
149
  */
151
150
  height: PropTypes.number,
152
151
  /**
@@ -218,7 +217,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
218
217
  }),
219
218
  /**
220
219
  * The width of the chart in px. If not defined, it takes the width of the parent element.
221
- * @default undefined
222
220
  */
223
221
  width: PropTypes.number,
224
222
  /**
@@ -1,7 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import { scaleBand, scalePoint } from 'd3-scale';
4
- import PropTypes from 'prop-types';
5
4
  import { getExtremumX as getBarExtremumX, getExtremumY as getBarExtremumY } from '../BarChart/extremums';
6
5
  import { getExtremumX as getScatterExtremumX, getExtremumY as getScatterExtremumY } from '../ScatterChart/extremums';
7
6
  import { getExtremumX as getLineExtremumX, getExtremumY as getLineExtremumY } from '../LineChart/extremums';
@@ -32,12 +31,9 @@ export const CartesianContext = /*#__PURE__*/React.createContext({
32
31
  xAxisIds: [],
33
32
  yAxisIds: []
34
33
  });
35
-
36
- /**
37
- * API:
38
- *
39
- * - [CartesianContextProvider API](https://mui.com/x/api/charts/cartesian-context-provider/)
40
- */
34
+ if (process.env.NODE_ENV !== 'production') {
35
+ CartesianContext.displayName = 'CartesianContext';
36
+ }
41
37
  function CartesianContextProvider(props) {
42
38
  const {
43
39
  xAxis: inXAxis,
@@ -210,85 +206,4 @@ function CartesianContextProvider(props) {
210
206
  children: children
211
207
  });
212
208
  }
213
- process.env.NODE_ENV !== "production" ? CartesianContextProvider.propTypes = {
214
- // ----------------------------- Warning --------------------------------
215
- // | These PropTypes are generated from the TypeScript type definitions |
216
- // | To update them edit the TypeScript types and run "yarn proptypes" |
217
- // ----------------------------------------------------------------------
218
- children: PropTypes.node,
219
- /**
220
- * An array of objects that can be used to populate series and axes data using their `dataKey` property.
221
- */
222
- dataset: PropTypes.arrayOf(PropTypes.object),
223
- /**
224
- * The configuration of the x-axes.
225
- * If not provided, a default axis config is used with id set to `DEFAULT_X_AXIS_KEY`.
226
- */
227
- xAxis: PropTypes.arrayOf(PropTypes.shape({
228
- axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
229
- classes: PropTypes.object,
230
- data: PropTypes.array,
231
- dataKey: PropTypes.string,
232
- disableLine: PropTypes.bool,
233
- disableTicks: PropTypes.bool,
234
- fill: PropTypes.string,
235
- hideTooltip: PropTypes.bool,
236
- id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
237
- label: PropTypes.string,
238
- labelFontSize: PropTypes.number,
239
- labelStyle: PropTypes.object,
240
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
241
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
242
- position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
243
- reverse: PropTypes.bool,
244
- scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
245
- slotProps: PropTypes.object,
246
- slots: PropTypes.object,
247
- stroke: PropTypes.string,
248
- tickFontSize: PropTypes.number,
249
- tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
250
- tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
251
- tickLabelStyle: PropTypes.object,
252
- tickMaxStep: PropTypes.number,
253
- tickMinStep: PropTypes.number,
254
- tickNumber: PropTypes.number,
255
- tickSize: PropTypes.number,
256
- valueFormatter: PropTypes.func
257
- })),
258
- /**
259
- * The configuration of the y-axes.
260
- * If not provided, a default axis config is used with id set to `DEFAULT_Y_AXIS_KEY`.
261
- */
262
- yAxis: PropTypes.arrayOf(PropTypes.shape({
263
- axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
264
- classes: PropTypes.object,
265
- data: PropTypes.array,
266
- dataKey: PropTypes.string,
267
- disableLine: PropTypes.bool,
268
- disableTicks: PropTypes.bool,
269
- fill: PropTypes.string,
270
- hideTooltip: PropTypes.bool,
271
- id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
272
- label: PropTypes.string,
273
- labelFontSize: PropTypes.number,
274
- labelStyle: PropTypes.object,
275
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
276
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
277
- position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
278
- reverse: PropTypes.bool,
279
- scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
280
- slotProps: PropTypes.object,
281
- slots: PropTypes.object,
282
- stroke: PropTypes.string,
283
- tickFontSize: PropTypes.number,
284
- tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
285
- tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
286
- tickLabelStyle: PropTypes.object,
287
- tickMaxStep: PropTypes.number,
288
- tickMinStep: PropTypes.number,
289
- tickNumber: PropTypes.number,
290
- tickSize: PropTypes.number,
291
- valueFormatter: PropTypes.func
292
- }))
293
- } : void 0;
294
209
  export { CartesianContextProvider };
@@ -1,6 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
- import PropTypes from 'prop-types';
4
3
  import useId from '@mui/utils/useId';
5
4
  import useChartDimensions from '../hooks/useChartDimensions';
6
5
 
@@ -17,16 +16,16 @@ export const DrawingContext = /*#__PURE__*/React.createContext({
17
16
  width: 400,
18
17
  chartId: ''
19
18
  });
20
- export const SVGContext = /*#__PURE__*/React.createContext({
19
+ if (process.env.NODE_ENV !== 'production') {
20
+ DrawingContext.displayName = 'DrawingContext';
21
+ }
22
+ export const SvgContext = /*#__PURE__*/React.createContext({
21
23
  current: null
22
24
  });
23
-
24
- /**
25
- * API:
26
- *
27
- * - [DrawingProvider API](https://mui.com/x/api/charts/drawing-provider/)
28
- */
29
- function DrawingProvider(props) {
25
+ if (process.env.NODE_ENV !== 'production') {
26
+ SvgContext.displayName = 'SvgContext';
27
+ }
28
+ export function DrawingProvider(props) {
30
29
  const {
31
30
  width,
32
31
  height,
@@ -39,36 +38,11 @@ function DrawingProvider(props) {
39
38
  const value = React.useMemo(() => _extends({
40
39
  chartId: chartId ?? ''
41
40
  }, drawingArea), [chartId, drawingArea]);
42
- return /*#__PURE__*/_jsx(SVGContext.Provider, {
41
+ return /*#__PURE__*/_jsx(SvgContext.Provider, {
43
42
  value: svgRef,
44
43
  children: /*#__PURE__*/_jsx(DrawingContext.Provider, {
45
44
  value: value,
46
45
  children: children
47
46
  })
48
47
  });
49
- }
50
- process.env.NODE_ENV !== "production" ? DrawingProvider.propTypes = {
51
- // ----------------------------- Warning --------------------------------
52
- // | These PropTypes are generated from the TypeScript type definitions |
53
- // | To update them edit the TypeScript types and run "yarn proptypes" |
54
- // ----------------------------------------------------------------------
55
- children: PropTypes.node,
56
- height: PropTypes.number.isRequired,
57
- /**
58
- * The margin between the SVG and the drawing area.
59
- * It's used for leaving some space for extra information such as the x- and y-axis or legend.
60
- * Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
61
- * @default object Depends on the charts type.
62
- */
63
- margin: PropTypes.shape({
64
- bottom: PropTypes.number,
65
- left: PropTypes.number,
66
- right: PropTypes.number,
67
- top: PropTypes.number
68
- }),
69
- svgRef: PropTypes.shape({
70
- current: PropTypes.object
71
- }).isRequired,
72
- width: PropTypes.number.isRequired
73
- } : void 0;
74
- export { DrawingProvider };
48
+ }
@@ -10,6 +10,9 @@ export const HighlighContext = /*#__PURE__*/React.createContext({
10
10
  scope: defaultScope,
11
11
  dispatch: () => null
12
12
  });
13
+ if (process.env.NODE_ENV !== 'production') {
14
+ HighlighContext.displayName = 'HighlighContext';
15
+ }
13
16
  const dataReducer = (prevState, action) => {
14
17
  switch (action.type) {
15
18
  case 'enterItem':
@@ -10,6 +10,9 @@ export const InteractionContext = /*#__PURE__*/React.createContext({
10
10
  useVoronoiInteraction: false,
11
11
  dispatch: () => null
12
12
  });
13
+ if (process.env.NODE_ENV !== 'production') {
14
+ InteractionContext.displayName = 'InteractionContext';
15
+ }
13
16
  const dataReducer = (prevState, action) => {
14
17
  switch (action.type) {
15
18
  case 'enterItem':
@@ -9,6 +9,9 @@ import { defaultizeColor } from '../internals/defaultizeColor';
9
9
  import { blueberryTwilightPalette } from '../colorPalettes';
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
11
  export const SeriesContext = /*#__PURE__*/React.createContext({});
12
+ if (process.env.NODE_ENV !== 'production') {
13
+ SeriesContext.displayName = 'SeriesContext';
14
+ }
12
15
  const seriesTypeFormatter = {
13
16
  bar: barSeriesFormatter,
14
17
  scatter: scatterSeriesFormatter,
@@ -1,2 +1 @@
1
- export { CartesianContextProvider } from './CartesianContextProvider';
2
- export { DrawingProvider } from './DrawingProvider';
1
+ export {};
@@ -1,14 +1,14 @@
1
1
  import * as React from 'react';
2
2
  import { InteractionContext } from '../context/InteractionProvider';
3
3
  import { CartesianContext } from '../context/CartesianContextProvider';
4
- import { SVGContext, DrawingContext } from '../context/DrawingProvider';
4
+ import { SvgContext, DrawingContext } from '../context/DrawingProvider';
5
5
  import { isBandScale } from '../internals/isBandScale';
6
6
  import { getSVGPoint } from '../internals/utils';
7
7
  function getAsANumber(value) {
8
8
  return value instanceof Date ? value.getTime() : value;
9
9
  }
10
10
  export const useAxisEvents = disableAxisListener => {
11
- const svgRef = React.useContext(SVGContext);
11
+ const svgRef = React.useContext(SvgContext);
12
12
  const {
13
13
  width,
14
14
  height,
@@ -13,7 +13,7 @@ export function getTickNumber(params) {
13
13
  const defaultizedTickNumber = tickNumber ?? Math.floor(Math.abs(range[1] - range[0]) / 50);
14
14
  return Math.min(maxTicks, Math.max(minTicks, defaultizedTickNumber));
15
15
  }
16
- function useTicks(options) {
16
+ export function useTicks(options) {
17
17
  const {
18
18
  scale,
19
19
  tickNumber,
@@ -55,5 +55,4 @@ function useTicks(options) {
55
55
  labelOffset: 0
56
56
  }));
57
57
  }, [tickNumber, scale, valueFormatter, tickInterval]);
58
- }
59
- export default useTicks;
58
+ }
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts v7.0.0-beta.2
2
+ * @mui/x-charts v7.0.0-beta.4
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -15,6 +15,7 @@ export * from './ChartsReferenceLine';
15
15
  export * from './ChartsAxis';
16
16
  export * from './ChartsXAxis';
17
17
  export * from './ChartsYAxis';
18
+ export * from './ChartsGrid';
18
19
  export * from './ChartsText';
19
20
  export * from './ChartsTooltip';
20
21
  export * from './ChartsLegend';
@@ -26,6 +27,7 @@ export * from './LineChart';
26
27
  export * from './PieChart';
27
28
  export * from './ScatterChart';
28
29
  export * from './SparkLineChart';
30
+ export * from './Gauge';
29
31
  export * from './ChartContainer';
30
32
  export * from './ChartsSurface';
31
33
  export * from './ResponsiveChartContainer';