@mui/x-charts-pro 8.0.0-beta.3 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/BarChartPro/BarChartPro.js +796 -14
  2. package/BarChartPro/BarChartPro.plugins.d.ts +2 -1
  3. package/BarChartPro/BarChartPro.plugins.js +2 -1
  4. package/CHANGELOG.md +388 -96
  5. package/ChartContainerPro/ChartContainerPro.d.ts +1 -0
  6. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
  7. package/ChartDataProviderPro/ChartDataProviderPro.js +36 -22
  8. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +2 -2
  9. package/ChartDataProviderPro/useChartDataProviderProProps.js +2 -2
  10. package/FunnelChart/FunnelChart.js +78 -4
  11. package/FunnelChart/categoryAxis.types.d.ts +3 -2
  12. package/FunnelChart/funnelSectionClasses.d.ts +5 -0
  13. package/FunnelChart/funnelSectionClasses.js +1 -1
  14. package/FunnelChart/index.d.ts +1 -0
  15. package/FunnelChart/index.js +12 -0
  16. package/FunnelChart/useFunnelChartProps.js +3 -3
  17. package/Heatmap/Heatmap.js +5 -2
  18. package/Heatmap/HeatmapItem.js +1 -1
  19. package/Heatmap/heatmapClasses.d.ts +5 -0
  20. package/Heatmap/heatmapClasses.js +1 -1
  21. package/LineChartPro/LineChartPro.js +796 -14
  22. package/LineChartPro/LineChartPro.plugins.d.ts +2 -1
  23. package/LineChartPro/LineChartPro.plugins.js +2 -1
  24. package/ScatterChartPro/ScatterChartPro.js +796 -14
  25. package/ScatterChartPro/ScatterChartPro.plugins.d.ts +2 -1
  26. package/ScatterChartPro/ScatterChartPro.plugins.js +2 -1
  27. package/esm/BarChartPro/BarChartPro.js +796 -14
  28. package/esm/BarChartPro/BarChartPro.plugins.d.ts +2 -1
  29. package/esm/BarChartPro/BarChartPro.plugins.js +2 -1
  30. package/esm/ChartContainerPro/ChartContainerPro.d.ts +1 -0
  31. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
  32. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +37 -23
  33. package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +2 -2
  34. package/esm/ChartDataProviderPro/useChartDataProviderProProps.js +2 -2
  35. package/esm/FunnelChart/FunnelChart.js +78 -4
  36. package/esm/FunnelChart/categoryAxis.types.d.ts +3 -2
  37. package/esm/FunnelChart/funnelSectionClasses.d.ts +5 -0
  38. package/esm/FunnelChart/funnelSectionClasses.js +1 -1
  39. package/esm/FunnelChart/index.d.ts +1 -0
  40. package/esm/FunnelChart/index.js +1 -0
  41. package/esm/FunnelChart/useFunnelChartProps.js +3 -3
  42. package/esm/Heatmap/Heatmap.js +5 -2
  43. package/esm/Heatmap/HeatmapItem.js +1 -1
  44. package/esm/Heatmap/heatmapClasses.d.ts +5 -0
  45. package/esm/Heatmap/heatmapClasses.js +1 -1
  46. package/esm/LineChartPro/LineChartPro.js +796 -14
  47. package/esm/LineChartPro/LineChartPro.plugins.d.ts +2 -1
  48. package/esm/LineChartPro/LineChartPro.plugins.js +2 -1
  49. package/esm/ScatterChartPro/ScatterChartPro.js +796 -14
  50. package/esm/ScatterChartPro/ScatterChartPro.plugins.d.ts +2 -1
  51. package/esm/ScatterChartPro/ScatterChartPro.plugins.js +2 -1
  52. package/esm/index.d.ts +1 -0
  53. package/esm/index.js +2 -1
  54. package/esm/internals/plugins/allPlugins.d.ts +5 -4
  55. package/esm/internals/plugins/allPlugins.js +3 -2
  56. package/esm/internals/plugins/useChartProExport/index.d.ts +2 -0
  57. package/esm/internals/plugins/useChartProExport/index.js +2 -0
  58. package/esm/internals/plugins/useChartProExport/print.d.ts +4 -0
  59. package/esm/internals/plugins/useChartProExport/print.js +72 -0
  60. package/esm/internals/plugins/useChartProExport/useChartProExport.d.ts +3 -0
  61. package/esm/internals/plugins/useChartProExport/useChartProExport.js +45 -0
  62. package/esm/internals/plugins/useChartProExport/useChartProExport.types.d.ts +35 -0
  63. package/esm/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -1
  64. package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +73 -56
  65. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +7 -7
  66. package/esm/locales/index.d.ts +1 -0
  67. package/esm/locales/index.js +1 -0
  68. package/index.d.ts +1 -0
  69. package/index.js +12 -1
  70. package/internals/plugins/allPlugins.d.ts +5 -4
  71. package/internals/plugins/allPlugins.js +3 -2
  72. package/internals/plugins/useChartProExport/index.d.ts +2 -0
  73. package/internals/plugins/useChartProExport/index.js +27 -0
  74. package/internals/plugins/useChartProExport/print.d.ts +4 -0
  75. package/internals/plugins/useChartProExport/print.js +79 -0
  76. package/internals/plugins/useChartProExport/useChartProExport.d.ts +3 -0
  77. package/internals/plugins/useChartProExport/useChartProExport.js +53 -0
  78. package/internals/plugins/useChartProExport/useChartProExport.types.d.ts +35 -0
  79. package/internals/plugins/useChartProExport/useChartProExport.types.js +5 -0
  80. package/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -1
  81. package/internals/plugins/useChartProZoom/useChartProZoom.js +74 -56
  82. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +7 -7
  83. package/locales/index.d.ts +1 -0
  84. package/locales/index.js +16 -0
  85. package/package.json +6 -14
  86. package/esm/internals/utils/releaseInfo.d.ts +0 -1
  87. package/esm/internals/utils/releaseInfo.js +0 -13
  88. package/internals/utils/releaseInfo.d.ts +0 -1
  89. package/internals/utils/releaseInfo.js +0 -21
  90. package/modern/BarChartPro/BarChartPro.d.ts +0 -18
  91. package/modern/BarChartPro/BarChartPro.js +0 -406
  92. package/modern/BarChartPro/BarChartPro.plugins.d.ts +0 -4
  93. package/modern/BarChartPro/BarChartPro.plugins.js +0 -3
  94. package/modern/BarChartPro/index.d.ts +0 -1
  95. package/modern/BarChartPro/index.js +0 -1
  96. package/modern/ChartContainerPro/ChartContainerPro.d.ts +0 -35
  97. package/modern/ChartContainerPro/ChartContainerPro.js +0 -290
  98. package/modern/ChartContainerPro/index.d.ts +0 -2
  99. package/modern/ChartContainerPro/index.js +0 -2
  100. package/modern/ChartContainerPro/useChartContainerProProps.d.ts +0 -9
  101. package/modern/ChartContainerPro/useChartContainerProProps.js +0 -35
  102. package/modern/ChartDataProviderPro/ChartDataProviderPro.d.ts +0 -37
  103. package/modern/ChartDataProviderPro/ChartDataProviderPro.js +0 -106
  104. package/modern/ChartDataProviderPro/index.d.ts +0 -2
  105. package/modern/ChartDataProviderPro/index.js +0 -2
  106. package/modern/ChartDataProviderPro/useChartDataProviderProProps.d.ts +0 -8
  107. package/modern/ChartDataProviderPro/useChartDataProviderProProps.js +0 -15
  108. package/modern/FunnelChart/FunnelChart.d.ts +0 -37
  109. package/modern/FunnelChart/FunnelChart.js +0 -212
  110. package/modern/FunnelChart/FunnelPlot.d.ts +0 -16
  111. package/modern/FunnelChart/FunnelPlot.js +0 -184
  112. package/modern/FunnelChart/FunnelSection.d.ts +0 -15
  113. package/modern/FunnelChart/FunnelSection.js +0 -56
  114. package/modern/FunnelChart/categoryAxis.types.d.ts +0 -24
  115. package/modern/FunnelChart/funnel.types.d.ts +0 -124
  116. package/modern/FunnelChart/funnel.types.js +0 -1
  117. package/modern/FunnelChart/funnelPlotSlots.types.d.ts +0 -20
  118. package/modern/FunnelChart/funnelPlotSlots.types.js +0 -1
  119. package/modern/FunnelChart/funnelSectionClasses.d.ts +0 -13
  120. package/modern/FunnelChart/funnelSectionClasses.js +0 -20
  121. package/modern/FunnelChart/funnelSlots.types.d.ts +0 -19
  122. package/modern/FunnelChart/funnelSlots.types.js +0 -1
  123. package/modern/FunnelChart/funnelStepCurve.d.ts +0 -4
  124. package/modern/FunnelChart/funnelStepCurve.js +0 -67
  125. package/modern/FunnelChart/index.d.ts +0 -7
  126. package/modern/FunnelChart/index.js +0 -5
  127. package/modern/FunnelChart/labelUtils.d.ts +0 -42
  128. package/modern/FunnelChart/labelUtils.js +0 -166
  129. package/modern/FunnelChart/seriesConfig/extremums.d.ts +0 -3
  130. package/modern/FunnelChart/seriesConfig/extremums.js +0 -42
  131. package/modern/FunnelChart/seriesConfig/getColor.d.ts +0 -3
  132. package/modern/FunnelChart/seriesConfig/getColor.js +0 -4
  133. package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +0 -3
  134. package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +0 -11
  135. package/modern/FunnelChart/seriesConfig/index.d.ts +0 -2
  136. package/modern/FunnelChart/seriesConfig/index.js +0 -15
  137. package/modern/FunnelChart/seriesConfig/legend.d.ts +0 -3
  138. package/modern/FunnelChart/seriesConfig/legend.js +0 -25
  139. package/modern/FunnelChart/seriesConfig/seriesProcessor.d.ts +0 -3
  140. package/modern/FunnelChart/seriesConfig/seriesProcessor.js +0 -89
  141. package/modern/FunnelChart/seriesConfig/tooltip.d.ts +0 -3
  142. package/modern/FunnelChart/seriesConfig/tooltip.js +0 -29
  143. package/modern/FunnelChart/useFunnelChartProps.d.ts +0 -30
  144. package/modern/FunnelChart/useFunnelChartProps.js +0 -161
  145. package/modern/Heatmap/Heatmap.d.ts +0 -57
  146. package/modern/Heatmap/Heatmap.js +0 -389
  147. package/modern/Heatmap/Heatmap.plugins.d.ts +0 -3
  148. package/modern/Heatmap/Heatmap.plugins.js +0 -2
  149. package/modern/Heatmap/HeatmapItem.d.ts +0 -49
  150. package/modern/Heatmap/HeatmapItem.js +0 -106
  151. package/modern/Heatmap/HeatmapPlot.d.ts +0 -8
  152. package/modern/Heatmap/HeatmapPlot.js +0 -59
  153. package/modern/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +0 -16
  154. package/modern/Heatmap/HeatmapTooltip/HeatmapTooltip.js +0 -284
  155. package/modern/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.d.ts +0 -4
  156. package/modern/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.js +0 -22
  157. package/modern/Heatmap/HeatmapTooltip/index.d.ts +0 -1
  158. package/modern/Heatmap/HeatmapTooltip/index.js +0 -1
  159. package/modern/Heatmap/heatmapClasses.d.ts +0 -11
  160. package/modern/Heatmap/heatmapClasses.js +0 -14
  161. package/modern/Heatmap/index.d.ts +0 -4
  162. package/modern/Heatmap/index.js +0 -4
  163. package/modern/Heatmap/seriesConfig/extremums.d.ts +0 -2
  164. package/modern/Heatmap/seriesConfig/extremums.js +0 -8
  165. package/modern/Heatmap/seriesConfig/getColor.d.ts +0 -3
  166. package/modern/Heatmap/seriesConfig/getColor.js +0 -15
  167. package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +0 -3
  168. package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +0 -8
  169. package/modern/Heatmap/seriesConfig/index.d.ts +0 -2
  170. package/modern/Heatmap/seriesConfig/index.js +0 -14
  171. package/modern/Heatmap/seriesConfig/seriesProcessor.d.ts +0 -3
  172. package/modern/Heatmap/seriesConfig/seriesProcessor.js +0 -21
  173. package/modern/Heatmap/seriesConfig/tooltip.d.ts +0 -3
  174. package/modern/Heatmap/seriesConfig/tooltip.js +0 -25
  175. package/modern/LineChartPro/LineChartPro.d.ts +0 -17
  176. package/modern/LineChartPro/LineChartPro.js +0 -403
  177. package/modern/LineChartPro/LineChartPro.plugins.d.ts +0 -4
  178. package/modern/LineChartPro/LineChartPro.plugins.js +0 -3
  179. package/modern/LineChartPro/index.d.ts +0 -1
  180. package/modern/LineChartPro/index.js +0 -1
  181. package/modern/ScatterChartPro/ScatterChartPro.d.ts +0 -17
  182. package/modern/ScatterChartPro/ScatterChartPro.js +0 -397
  183. package/modern/ScatterChartPro/ScatterChartPro.plugins.d.ts +0 -4
  184. package/modern/ScatterChartPro/ScatterChartPro.plugins.js +0 -3
  185. package/modern/ScatterChartPro/index.d.ts +0 -1
  186. package/modern/ScatterChartPro/index.js +0 -1
  187. package/modern/hooks/index.d.ts +0 -2
  188. package/modern/hooks/index.js +0 -2
  189. package/modern/hooks/useFunnelSeries.d.ts +0 -33
  190. package/modern/hooks/useFunnelSeries.js +0 -42
  191. package/modern/hooks/useHeatmapSeries.d.ts +0 -33
  192. package/modern/hooks/useHeatmapSeries.js +0 -42
  193. package/modern/hooks/zoom/index.d.ts +0 -1
  194. package/modern/hooks/zoom/index.js +0 -1
  195. package/modern/hooks/zoom/useIsZoomInteracting.d.ts +0 -6
  196. package/modern/hooks/zoom/useIsZoomInteracting.js +0 -14
  197. package/modern/index.d.ts +0 -34
  198. package/modern/index.js +0 -45
  199. package/modern/internals/plugins/allPlugins.d.ts +0 -8
  200. package/modern/internals/plugins/allPlugins.js +0 -6
  201. package/modern/internals/plugins/useChartProZoom/index.d.ts +0 -3
  202. package/modern/internals/plugins/useChartProZoom/index.js +0 -3
  203. package/modern/internals/plugins/useChartProZoom/useChartProZoom.d.ts +0 -3
  204. package/modern/internals/plugins/useChartProZoom/useChartProZoom.js +0 -350
  205. package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +0 -203
  206. package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +0 -4
  207. package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +0 -53
  208. package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.js +0 -1
  209. package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +0 -45
  210. package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.js +0 -126
  211. package/modern/internals/utils/releaseInfo.d.ts +0 -1
  212. package/modern/internals/utils/releaseInfo.js +0 -13
  213. package/modern/models/index.d.ts +0 -2
  214. package/modern/models/index.js +0 -2
  215. package/modern/models/seriesType/heatmap.d.ts +0 -28
  216. package/modern/models/seriesType/heatmap.js +0 -1
  217. package/modern/models/seriesType/index.d.ts +0 -1
  218. package/modern/models/seriesType/index.js +0 -1
  219. package/modern/package.json +0 -1
  220. package/modern/themeAugmentation/components.d.ts +0 -23
  221. package/modern/themeAugmentation/index.d.ts +0 -4
  222. package/modern/themeAugmentation/index.js +0 -0
  223. package/modern/themeAugmentation/overrides.d.ts +0 -11
  224. package/modern/themeAugmentation/props.d.ts +0 -20
  225. package/modern/typeOverloads/index.d.ts +0 -1
  226. package/modern/typeOverloads/index.js +0 -1
  227. package/modern/typeOverloads/modules.d.ts +0 -33
  228. package/modern/typeOverloads/modules.js +0 -1
  229. package/tsconfig.build.tsbuildinfo +0 -1
  230. /package/{modern/FunnelChart/categoryAxis.types.js → esm/internals/plugins/useChartProExport/useChartProExport.types.js} +0 -0
@@ -1,4 +1,5 @@
1
1
  import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
2
+ import { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
2
3
  import { UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
3
- export type BarChartProPluginsSignatures = [UseChartZAxisSignature, UseChartCartesianAxisSignature<'bar'>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature];
4
+ export type BarChartProPluginsSignatures = [UseChartZAxisSignature, UseChartCartesianAxisSignature<'bar'>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature, UseChartProExportSignature];
4
5
  export declare const BAR_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<BarChartProPluginsSignatures>;
@@ -1,3 +1,4 @@
1
1
  import { useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight } from '@mui/x-charts/internals';
2
+ import { useChartProExport } from "../internals/plugins/useChartProExport/index.js";
2
3
  import { useChartProZoom } from "../internals/plugins/useChartProZoom/index.js";
3
- export const BAR_CHART_PRO_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartProZoom];
4
+ export const BAR_CHART_PRO_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartProZoom, useChartProExport];
@@ -7,6 +7,7 @@ export type ChartContainerProProps<TSeries extends ChartSeriesType = ChartSeries
7
7
  type ChartContainerProComponent = <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartContainerProProps<TSeries, TSignatures> & {
8
8
  ref?: React.ForwardedRef<SVGSVGElement>;
9
9
  }) => React.JSX.Element;
10
+ export type ChartProApi = NonNullable<NonNullable<ChartContainerProProps['apiRef']>['current']>;
10
11
  /**
11
12
  * It sets up the data providers as well as the `<svg>` for the chart.
12
13
  *
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { ChartSeriesType, ChartAnyPluginSignature, ChartProviderProps } from '@mui/x-charts/internals';
3
3
  import { ChartDataProviderProps } from '@mui/x-charts/ChartDataProvider';
4
4
  import { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
5
- export type ChartDataProviderProProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartDataProviderProps<TSeries, TSignatures> & Omit<ChartProviderProps<TSeries, TSignatures>['pluginParams'], 'children'>;
5
+ export type ChartDataProviderProProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartDataProviderProps<TSeries, TSignatures> & ChartProviderProps<TSeries, TSignatures>['pluginParams'];
6
6
  /**
7
7
  * Orchestrates the data providers for the chart components and hooks.
8
8
  *
@@ -4,12 +4,13 @@ import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { Watermark } from '@mui/x-license/Watermark';
7
- import { ChartProvider, AnimationProvider } from '@mui/x-charts/internals';
7
+ import { ChartProvider } from '@mui/x-charts/internals';
8
+ import { ChartsLocalizationProvider } from '@mui/x-charts/ChartsLocalizationProvider';
8
9
  import { useLicenseVerifier } from '@mui/x-license/useLicenseVerifier';
10
+ import { DEFAULT_PLUGINS } from "../internals/plugins/allPlugins.js";
9
11
  import { useChartDataProviderProProps } from "./useChartDataProviderProProps.js";
10
- import { getReleaseInfo } from "../internals/utils/releaseInfo.js";
11
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
- const releaseInfo = getReleaseInfo();
13
+ const releaseInfo = "MTc0NTQ0NTYwMDAwMA==";
13
14
  const packageIdentifier = 'x-charts-pro';
14
15
  /**
15
16
  * Orchestrates the data providers for the chart components and hooks.
@@ -41,17 +42,20 @@ const packageIdentifier = 'x-charts-pro';
41
42
  function ChartDataProviderPro(props) {
42
43
  const {
43
44
  children,
44
- animationProviderProps,
45
+ localeText,
45
46
  chartProviderProps
46
- } = useChartDataProviderProProps(props);
47
+ } = useChartDataProviderProProps(_extends({}, props, {
48
+ plugins: props.plugins ?? DEFAULT_PLUGINS
49
+ }));
47
50
  useLicenseVerifier(packageIdentifier, releaseInfo);
48
- return /*#__PURE__*/_jsx(ChartProvider, _extends({}, chartProviderProps, {
49
- children: /*#__PURE__*/_jsxs(AnimationProvider, _extends({}, animationProviderProps, {
50
- children: [children, /*#__PURE__*/_jsx(Watermark, {
51
- packageName: packageIdentifier,
52
- releaseInfo: releaseInfo
53
- })]
54
- }))
51
+ return /*#__PURE__*/_jsxs(ChartProvider, _extends({}, chartProviderProps, {
52
+ children: [/*#__PURE__*/_jsx(ChartsLocalizationProvider, {
53
+ localeText: localeText,
54
+ children: children
55
+ }), /*#__PURE__*/_jsx(Watermark, {
56
+ packageName: packageIdentifier,
57
+ releaseInfo: releaseInfo
58
+ })]
55
59
  }));
56
60
  }
57
61
  process.env.NODE_ENV !== "production" ? ChartDataProviderPro.propTypes = {
@@ -59,48 +63,58 @@ process.env.NODE_ENV !== "production" ? ChartDataProviderPro.propTypes = {
59
63
  // | These PropTypes are generated from the TypeScript type definitions |
60
64
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
61
65
  // ----------------------------------------------------------------------
62
- apiRef: PropTypes.any,
63
- children: PropTypes.node,
66
+ apiRef: PropTypes.shape({
67
+ current: PropTypes.any
68
+ }),
64
69
  /**
65
70
  * Color palette used to colorize multiple series.
66
71
  * @default rainbowSurgePalette
67
72
  */
68
- colors: PropTypes.any,
73
+ colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
69
74
  /**
70
75
  * An array of objects that can be used to populate series and axes data using their `dataKey` property.
71
76
  */
72
- dataset: PropTypes.any,
77
+ dataset: PropTypes.arrayOf(PropTypes.object),
73
78
  /**
74
79
  * The height of the chart in px. If not defined, it takes the height of the parent element.
75
80
  */
76
- height: PropTypes.any,
81
+ height: PropTypes.number,
77
82
  /**
78
83
  * This prop is used to help implement the accessibility logic.
79
84
  * If you don't provide this prop. It falls back to a randomly generated id.
80
85
  */
81
- id: PropTypes.any,
86
+ id: PropTypes.string,
87
+ /**
88
+ * Localized text for chart components.
89
+ */
90
+ localeText: PropTypes.object,
82
91
  /**
83
92
  * The margin between the SVG and the drawing area.
84
93
  * It's used for leaving some space for extra information such as the x- and y-axis or legend.
85
94
  *
86
95
  * Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
87
96
  */
88
- margin: PropTypes.any,
97
+ margin: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
98
+ bottom: PropTypes.number,
99
+ left: PropTypes.number,
100
+ right: PropTypes.number,
101
+ top: PropTypes.number
102
+ })]),
89
103
  /**
90
104
  * The array of series to display.
91
105
  * Each type of series has its own specificity.
92
106
  * Please refer to the appropriate docs page to learn more about it.
93
107
  */
94
- series: PropTypes.any,
108
+ series: PropTypes.arrayOf(PropTypes.object),
95
109
  /**
96
110
  * If `true`, animations are skipped.
97
111
  * If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
98
112
  */
99
- skipAnimation: PropTypes.any,
100
- theme: PropTypes.any,
113
+ skipAnimation: PropTypes.bool,
114
+ theme: PropTypes.oneOf(['dark', 'light']),
101
115
  /**
102
116
  * The width of the chart in px. If not defined, it takes the width of the parent element.
103
117
  */
104
- width: PropTypes.any
118
+ width: PropTypes.number
105
119
  } : void 0;
106
120
  export { ChartDataProviderPro };
@@ -3,6 +3,6 @@ import type { ChartDataProviderProProps } from './ChartDataProviderPro';
3
3
  import type { AllPluginSignatures } from '../internals/plugins/allPlugins';
4
4
  export declare const useChartDataProviderProProps: <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartDataProviderProProps<TSeries, TSignatures>) => {
5
5
  children: import("react").ReactNode;
6
- animationProviderProps: Omit<import("@mui/x-charts/internals").AnimationProviderProps, "children">;
7
- chartProviderProps: Omit<import("@mui/x-charts/internals").ChartProviderProps<TSeries, TSignatures>, "children">;
6
+ localeText: Partial<import("@mui/x-charts/locales").ChartsLocaleText> | undefined;
7
+ chartProviderProps: import("@mui/x-charts/internals").ChartProviderProps<TSeries, TSignatures>;
8
8
  };
@@ -3,13 +3,13 @@
3
3
  import { useChartDataProviderProps } from '@mui/x-charts/internals';
4
4
  export const useChartDataProviderProProps = props => {
5
5
  const {
6
- animationProviderProps,
7
6
  chartProviderProps,
7
+ localeText,
8
8
  children
9
9
  } = useChartDataProviderProps(props);
10
10
  return {
11
11
  children,
12
- animationProviderProps,
12
+ localeText,
13
13
  chartProviderProps
14
14
  };
15
15
  };
@@ -63,6 +63,7 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
63
63
  // ----------------------------------------------------------------------
64
64
  apiRef: PropTypes.shape({
65
65
  current: PropTypes.shape({
66
+ exportAsPrint: PropTypes.func.isRequired,
66
67
  setZoomData: PropTypes.func.isRequired
67
68
  })
68
69
  }),
@@ -81,18 +82,87 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
81
82
  *
82
83
  * @default { position: 'none' }
83
84
  */
84
- categoryAxis: PropTypes.shape({
85
+ categoryAxis: PropTypes.oneOfType([PropTypes.shape({
85
86
  categories: PropTypes.arrayOf(PropTypes.string),
86
87
  disableLine: PropTypes.bool,
87
88
  disableTicks: PropTypes.bool,
88
89
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
89
90
  position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
90
- scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
91
+ scaleType: PropTypes.oneOf(['band']),
91
92
  size: PropTypes.number,
92
93
  tickLabelStyle: PropTypes.object,
93
94
  tickSize: PropTypes.number
94
- }),
95
- children: PropTypes.node,
95
+ }), PropTypes.shape({
96
+ categories: PropTypes.arrayOf(PropTypes.string),
97
+ disableLine: PropTypes.bool,
98
+ disableTicks: PropTypes.bool,
99
+ id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
100
+ position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
101
+ scaleType: PropTypes.oneOf(['point']),
102
+ size: PropTypes.number,
103
+ tickLabelStyle: PropTypes.object,
104
+ tickSize: PropTypes.number
105
+ }), PropTypes.shape({
106
+ categories: PropTypes.arrayOf(PropTypes.string),
107
+ disableLine: PropTypes.bool,
108
+ disableTicks: PropTypes.bool,
109
+ id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
110
+ position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
111
+ scaleType: PropTypes.oneOf(['log']),
112
+ size: PropTypes.number,
113
+ tickLabelStyle: PropTypes.object,
114
+ tickSize: PropTypes.number
115
+ }), PropTypes.shape({
116
+ categories: PropTypes.arrayOf(PropTypes.string),
117
+ disableLine: PropTypes.bool,
118
+ disableTicks: PropTypes.bool,
119
+ id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
120
+ position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
121
+ scaleType: PropTypes.oneOf(['pow']),
122
+ size: PropTypes.number,
123
+ tickLabelStyle: PropTypes.object,
124
+ tickSize: PropTypes.number
125
+ }), PropTypes.shape({
126
+ categories: PropTypes.arrayOf(PropTypes.string),
127
+ disableLine: PropTypes.bool,
128
+ disableTicks: PropTypes.bool,
129
+ id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
130
+ position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
131
+ scaleType: PropTypes.oneOf(['sqrt']),
132
+ size: PropTypes.number,
133
+ tickLabelStyle: PropTypes.object,
134
+ tickSize: PropTypes.number
135
+ }), PropTypes.shape({
136
+ categories: PropTypes.arrayOf(PropTypes.string),
137
+ disableLine: PropTypes.bool,
138
+ disableTicks: PropTypes.bool,
139
+ id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
140
+ position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
141
+ scaleType: PropTypes.oneOf(['time']),
142
+ size: PropTypes.number,
143
+ tickLabelStyle: PropTypes.object,
144
+ tickSize: PropTypes.number
145
+ }), PropTypes.shape({
146
+ categories: PropTypes.arrayOf(PropTypes.string),
147
+ disableLine: PropTypes.bool,
148
+ disableTicks: PropTypes.bool,
149
+ id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
150
+ position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
151
+ scaleType: PropTypes.oneOf(['utc']),
152
+ size: PropTypes.number,
153
+ tickLabelStyle: PropTypes.object,
154
+ tickSize: PropTypes.number
155
+ }), PropTypes.shape({
156
+ categories: PropTypes.arrayOf(PropTypes.string),
157
+ disableLine: PropTypes.bool,
158
+ disableTicks: PropTypes.bool,
159
+ id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
160
+ position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
161
+ scaleType: PropTypes.oneOf(['linear']),
162
+ size: PropTypes.number,
163
+ tickLabelStyle: PropTypes.object,
164
+ tickSize: PropTypes.number
165
+ })]),
96
166
  className: PropTypes.string,
97
167
  /**
98
168
  * Color palette used to colorize multiple series.
@@ -142,6 +212,10 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
142
212
  * @default false
143
213
  */
144
214
  loading: PropTypes.bool,
215
+ /**
216
+ * Localized text for chart components.
217
+ */
218
+ localeText: PropTypes.object,
145
219
  /**
146
220
  * The margin between the SVG and the drawing area.
147
221
  * It's used for leaving some space for extra information such as the x- and y-axis or legend.
@@ -1,6 +1,6 @@
1
1
  import { AxisConfig, ScaleName } from '@mui/x-charts/models';
2
2
  import { MakeOptional } from '@mui/x-internals/types';
3
- export type CategoryAxis = {
3
+ export type CategoryAxis<S extends ScaleName = ScaleName> = S extends ScaleName ? {
4
4
  /**
5
5
  * The categories to be displayed on the axis.
6
6
  * The order of the categories is the order in which they are displayed.
@@ -21,4 +21,5 @@ export type CategoryAxis = {
21
21
  * - If the axis is vertical, the size is the width of the axis.
22
22
  */
23
23
  size?: number;
24
- } & MakeOptional<Pick<AxisConfig<ScaleName, any>, 'disableLine' | 'disableTicks' | 'scaleType' | 'tickLabelStyle' | 'tickSize' | 'id'>, 'id'>;
24
+ scaleType?: S;
25
+ } & MakeOptional<Pick<AxisConfig<S, any>, 'disableLine' | 'disableTicks' | 'tickLabelStyle' | 'tickSize' | 'id'>, 'id'> : never;
@@ -8,6 +8,11 @@ export interface FunnelSectionClasses {
8
8
  faded: string;
9
9
  /** Styles applied to the label element. */
10
10
  label: string;
11
+ /**
12
+ * Styles applied to the root element for a specified series.
13
+ * Needs to be suffixed with the series ID: `.${funnelSectionClasses.series}-${seriesId}`.
14
+ */
15
+ series: string;
11
16
  }
12
17
  export declare const useUtilityClasses: (props: FunnelSectionProps) => Record<"label" | "highlighted" | "faded" | "root", string>;
13
18
  export declare const funnelSectionClasses: FunnelSectionClasses;
@@ -17,4 +17,4 @@ export const useUtilityClasses = props => {
17
17
  };
18
18
  return composeClasses(slots, getFunnelSectionUtilityClass, classes);
19
19
  };
20
- export const funnelSectionClasses = generateUtilityClasses('MuiFunnelSection', ['root', 'highlighted', 'faded', 'label']);
20
+ export const funnelSectionClasses = generateUtilityClasses('MuiFunnelSection', ['root', 'highlighted', 'faded', 'label', 'series']);
@@ -2,6 +2,7 @@ export { FunnelChart as Unstable_FunnelChart } from "./FunnelChart.js";
2
2
  export type { FunnelChartProps } from './FunnelChart';
3
3
  export * from "./FunnelPlot.js";
4
4
  export * from "./funnel.types.js";
5
+ export * from "./categoryAxis.types.js";
5
6
  export * from "./funnelSlots.types.js";
6
7
  export { funnelSectionClasses } from "./funnelSectionClasses.js";
7
8
  export type { FunnelSectionClasses } from './funnelSectionClasses';
@@ -1,5 +1,6 @@
1
1
  export { FunnelChart as Unstable_FunnelChart } from "./FunnelChart.js";
2
2
  export * from "./FunnelPlot.js";
3
3
  export * from "./funnel.types.js";
4
+ export * from "./categoryAxis.types.js";
4
5
  export * from "./funnelSlots.types.js";
5
6
  export { funnelSectionClasses } from "./funnelSectionClasses.js";
@@ -29,7 +29,6 @@ function getCategoryAxisConfig(categoryAxis, series, isHorizontal, direction) {
29
29
  // If the scaleType is not defined or is 'band', our job is simple.
30
30
  if (!categoryAxis?.scaleType || categoryAxis.scaleType === 'band') {
31
31
  return _extends({
32
- scaleType: 'band',
33
32
  categoryGapRatio: 0,
34
33
  // Use the categories as the domain if they are defined.
35
34
  data: categoryAxis?.categories ? categoryAxis.categories :
@@ -38,7 +37,9 @@ function getCategoryAxisConfig(categoryAxis, series, isHorizontal, direction) {
38
37
  length: maxSeriesLength
39
38
  }, (_, index) => index),
40
39
  tickLabelPlacement: 'middle'
41
- }, categoryValues);
40
+ }, categoryValues, {
41
+ scaleType: 'band'
42
+ });
42
43
  }
43
44
 
44
45
  // If the scaleType is other than 'band', we have to do some magic.
@@ -47,7 +48,6 @@ function getCategoryAxisConfig(categoryAxis, series, isHorizontal, direction) {
47
48
  // We add the total value of the series as the last tick value
48
49
  maxSeriesValue.reduce((a, value) => a + value, 0)];
49
50
  return _extends({
50
- scaleType: categoryAxis.scaleType,
51
51
  domainLimit: 'strict',
52
52
  tickLabelPlacement: 'middle',
53
53
  tickInterval: tickValues,
@@ -128,7 +128,6 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
128
128
  apiRef: PropTypes.shape({
129
129
  current: PropTypes.object
130
130
  }),
131
- children: PropTypes.node,
132
131
  className: PropTypes.string,
133
132
  /**
134
133
  * Color palette used to colorize multiple series.
@@ -168,6 +167,10 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
168
167
  * @default false
169
168
  */
170
169
  loading: PropTypes.bool,
170
+ /**
171
+ * Localized text for chart components.
172
+ */
173
+ localeText: PropTypes.object,
171
174
  /**
172
175
  * The margin between the SVG and the drawing area.
173
176
  * It's used for leaving some space for extra information such as the x- and y-axis or legend.
@@ -199,7 +202,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
199
202
  */
200
203
  series: PropTypes.arrayOf(PropTypes.object).isRequired,
201
204
  /**
202
- * The configuration helpers used to compute attributes according to the serries type.
205
+ * The configuration helpers used to compute attributes according to the series type.
203
206
  * @ignore Unstable props for internal usage.
204
207
  */
205
208
  seriesConfig: PropTypes.object,
@@ -13,7 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  const HeatmapCell = styled('rect', {
14
14
  name: 'MuiHeatmap',
15
15
  slot: 'Cell',
16
- overridesResolver: (_, styles) => styles.arc
16
+ overridesResolver: (_, styles) => styles.arc // FIXME: Inconsistent naming with slot
17
17
  })(({
18
18
  ownerState
19
19
  }) => ({
@@ -5,6 +5,11 @@ export interface HeatmapClasses {
5
5
  highlighted: string;
6
6
  /** Styles applied to the cell element if faded. */
7
7
  faded: string;
8
+ /**
9
+ * Styles applied to the root element for a specified series.
10
+ * Needs to be suffixed with the series ID: `.${heatmapClasses.series}-${seriesId}`.
11
+ */
12
+ series: string;
8
13
  }
9
14
  export type HeatmapClassKey = keyof HeatmapClasses;
10
15
  export declare function getHeatmapUtilityClass(slot: string): string;
@@ -8,7 +8,7 @@ export function getHeatmapUtilityClass(slot) {
8
8
  }
9
9
  return generateUtilityClass('MuiHeatmap', slot);
10
10
  }
11
- export const heatmapClasses = _extends({}, generateUtilityClasses('MuiHeatmap', ['cell']), {
11
+ export const heatmapClasses = _extends({}, generateUtilityClasses('MuiHeatmap', ['cell', 'series']), {
12
12
  highlighted: 'Charts-highlighted',
13
13
  faded: 'Charts-faded'
14
14
  });