@mui/x-charts-pro 9.0.1 → 9.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/BarChartPro/BarChartPro.js +20 -1
  2. package/BarChartPro/BarChartPro.mjs +20 -1
  3. package/CHANGELOG.md +257 -0
  4. package/ChartsDataProviderPro/ChartsDataProviderPro.js +2 -2
  5. package/ChartsDataProviderPro/ChartsDataProviderPro.mjs +2 -2
  6. package/ChartsRadialDataProvider/index.d.mts +1 -0
  7. package/ChartsRadialDataProvider/index.d.ts +1 -0
  8. package/ChartsRadialDataProvider/index.js +16 -0
  9. package/ChartsRadialDataProvider/index.mjs +2 -0
  10. package/ChartsRadialGrid/index.d.mts +1 -0
  11. package/ChartsRadialGrid/index.d.ts +1 -0
  12. package/ChartsRadialGrid/index.js +16 -0
  13. package/ChartsRadialGrid/index.mjs +2 -0
  14. package/ChartsRadiusAxis/index.d.mts +1 -0
  15. package/ChartsRadiusAxis/index.d.ts +1 -0
  16. package/ChartsRadiusAxis/index.js +16 -0
  17. package/ChartsRadiusAxis/index.mjs +2 -0
  18. package/ChartsRotationAxis/index.d.mts +1 -0
  19. package/ChartsRotationAxis/index.d.ts +1 -0
  20. package/ChartsRotationAxis/index.js +16 -0
  21. package/ChartsRotationAxis/index.mjs +2 -0
  22. package/ChartsToolbarPro/ChartsToolbarImageExportTrigger.js +1 -0
  23. package/ChartsToolbarPro/ChartsToolbarImageExportTrigger.mjs +1 -0
  24. package/ChartsToolbarPro/ChartsToolbarPrintExportTrigger.js +1 -0
  25. package/ChartsToolbarPro/ChartsToolbarPrintExportTrigger.mjs +1 -0
  26. package/ChartsToolbarPro/ChartsToolbarPro.d.mts +30 -0
  27. package/ChartsToolbarPro/ChartsToolbarPro.d.ts +30 -0
  28. package/ChartsToolbarPro/ChartsToolbarPro.js +66 -17
  29. package/ChartsToolbarPro/ChartsToolbarPro.mjs +66 -17
  30. package/ChartsToolbarPro/ChartsToolbarRangeButtonTrigger.d.mts +41 -0
  31. package/ChartsToolbarPro/ChartsToolbarRangeButtonTrigger.d.ts +41 -0
  32. package/ChartsToolbarPro/ChartsToolbarRangeButtonTrigger.js +156 -0
  33. package/ChartsToolbarPro/ChartsToolbarRangeButtonTrigger.mjs +150 -0
  34. package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +1 -1
  35. package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.mjs +1 -1
  36. package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +1 -1
  37. package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.mjs +1 -1
  38. package/ChartsToolbarPro/index.d.mts +1 -0
  39. package/ChartsToolbarPro/index.d.ts +1 -0
  40. package/ChartsToolbarPro/index.js +11 -0
  41. package/ChartsToolbarPro/index.mjs +1 -0
  42. package/ChartsToolbarPro/rangeButtonValueToZoom.d.mts +66 -0
  43. package/ChartsToolbarPro/rangeButtonValueToZoom.d.ts +66 -0
  44. package/ChartsToolbarPro/rangeButtonValueToZoom.js +217 -0
  45. package/ChartsToolbarPro/rangeButtonValueToZoom.mjs +212 -0
  46. package/Heatmap/Heatmap.js +4 -1
  47. package/Heatmap/Heatmap.mjs +4 -1
  48. package/LineChartPro/LineChartPro.js +20 -1
  49. package/LineChartPro/LineChartPro.mjs +20 -1
  50. package/ScatterChartPro/ScatterChartPro.js +20 -1
  51. package/ScatterChartPro/ScatterChartPro.mjs +20 -1
  52. package/index.d.mts +4 -0
  53. package/index.d.ts +4 -0
  54. package/index.js +45 -1
  55. package/index.mjs +5 -1
  56. package/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.js +3 -3
  57. package/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.mjs +3 -3
  58. package/internals/plugins/useChartProZoom/useChartProZoom.js +13 -4
  59. package/internals/plugins/useChartProZoom/useChartProZoom.mjs +13 -4
  60. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.mts +3 -0
  61. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +3 -0
  62. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +4 -3
  63. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.mjs +3 -2
  64. package/internals/plugins/useChartProZoom/useChartProZoom.types.d.mts +10 -0
  65. package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +10 -0
  66. package/models/seriesType/heatmap.d.mts +9 -1
  67. package/models/seriesType/heatmap.d.ts +9 -1
  68. package/package.json +62 -6
@@ -41,6 +41,11 @@ export interface UseChartProZoomState {
41
41
  * Configuration for zoom interactions.
42
42
  */
43
43
  zoomInteractionConfig: DefaultizedZoomInteractionConfig;
44
+ /**
45
+ * The key of the currently active range button, or `null` if no range button is active.
46
+ * Cleared when the user manually zooms or pans the chart.
47
+ */
48
+ activeRangeButtonKey: string | null;
44
49
  };
45
50
  }
46
51
  export interface UseChartProZoomPublicApi {
@@ -73,6 +78,11 @@ export interface UseChartProZoomInstance extends UseChartProZoomPublicApi {
73
78
  * Zoom out the chart.
74
79
  */
75
80
  zoomOut: () => void;
81
+ /**
82
+ * Set the active range button key. Pass `null` to clear.
83
+ * @param {string | null} key The key of the active range button.
84
+ */
85
+ setActiveRangeButtonKey: (key: string | null) => void;
76
86
  }
77
87
  export type UseChartProZoomSignature = ChartPluginSignature<{
78
88
  params: UseChartProZoomParameters;
@@ -41,6 +41,11 @@ export interface UseChartProZoomState {
41
41
  * Configuration for zoom interactions.
42
42
  */
43
43
  zoomInteractionConfig: DefaultizedZoomInteractionConfig;
44
+ /**
45
+ * The key of the currently active range button, or `null` if no range button is active.
46
+ * Cleared when the user manually zooms or pans the chart.
47
+ */
48
+ activeRangeButtonKey: string | null;
44
49
  };
45
50
  }
46
51
  export interface UseChartProZoomPublicApi {
@@ -73,6 +78,11 @@ export interface UseChartProZoomInstance extends UseChartProZoomPublicApi {
73
78
  * Zoom out the chart.
74
79
  */
75
80
  zoomOut: () => void;
81
+ /**
82
+ * Set the active range button key. Pass `null` to clear.
83
+ * @param {string | null} key The key of the active range button.
84
+ */
85
+ setActiveRangeButtonKey: (key: string | null) => void;
76
86
  }
77
87
  export type UseChartProZoomSignature = ChartPluginSignature<{
78
88
  params: UseChartProZoomParameters;
@@ -1,5 +1,5 @@
1
1
  import { type DefaultizedProps } from '@mui/x-internals/types';
2
- import { type CommonDefaultizedProps, type CommonSeriesType, type CartesianSeriesType } from '@mui/x-charts/internals';
2
+ import { type CommonDefaultizedProps, type CommonSeriesType, type CartesianSeriesType, type DatasetElementType } from '@mui/x-charts/internals';
3
3
  export type HeatmapValueType = readonly [number, number, number];
4
4
  export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType, 'heatmap'>, 'color' | 'colorGetter' | 'valueFormatter'>, CartesianSeriesType {
5
5
  type: 'heatmap';
@@ -12,6 +12,14 @@ export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueTyp
12
12
  * The key used to retrieve data from the dataset.
13
13
  */
14
14
  dataKey?: string;
15
+ /**
16
+ * A function to extract and transform the value from the `dataset` item.
17
+ * It receives the full dataset item and should return a heatmap value.
18
+ * Can be used as an alternative to `dataKey`.
19
+ * @param {DatasetElementType<unknown>} item The full dataset item.
20
+ * @returns {HeatmapValueType} The transformed value.
21
+ */
22
+ valueGetter?: (item: DatasetElementType<unknown>) => HeatmapValueType;
15
23
  /**
16
24
  * The label to display on the tooltip or the legend. It can be a string or a function.
17
25
  */
@@ -1,5 +1,5 @@
1
1
  import { type DefaultizedProps } from '@mui/x-internals/types';
2
- import { type CommonDefaultizedProps, type CommonSeriesType, type CartesianSeriesType } from '@mui/x-charts/internals';
2
+ import { type CommonDefaultizedProps, type CommonSeriesType, type CartesianSeriesType, type DatasetElementType } from '@mui/x-charts/internals';
3
3
  export type HeatmapValueType = readonly [number, number, number];
4
4
  export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType, 'heatmap'>, 'color' | 'colorGetter' | 'valueFormatter'>, CartesianSeriesType {
5
5
  type: 'heatmap';
@@ -12,6 +12,14 @@ export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueTyp
12
12
  * The key used to retrieve data from the dataset.
13
13
  */
14
14
  dataKey?: string;
15
+ /**
16
+ * A function to extract and transform the value from the `dataset` item.
17
+ * It receives the full dataset item and should return a heatmap value.
18
+ * Can be used as an alternative to `dataKey`.
19
+ * @param {DatasetElementType<unknown>} item The full dataset item.
20
+ * @returns {HeatmapValueType} The transformed value.
21
+ */
22
+ valueGetter?: (item: DatasetElementType<unknown>) => HeatmapValueType;
15
23
  /**
16
24
  * The label to display on the tooltip or the legend. It can be a string or a function.
17
25
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-charts-pro",
3
- "version": "9.0.1",
3
+ "version": "9.0.3",
4
4
  "author": "MUI Team",
5
5
  "description": "The Pro plan edition of the MUI X Charts components.",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -27,15 +27,15 @@
27
27
  "directory": "packages/x-charts-pro"
28
28
  },
29
29
  "dependencies": {
30
- "@babel/runtime": "^7.28.6",
30
+ "@babel/runtime": "^7.29.2",
31
31
  "@mui/utils": "9.0.0",
32
32
  "clsx": "^2.1.1",
33
33
  "prop-types": "^15.8.1",
34
- "@mui/x-charts": "^9.0.1",
35
- "@mui/x-internal-gestures": "^9.0.0",
36
- "@mui/x-license": "^9.0.0",
34
+ "@mui/x-charts": "^9.0.3",
35
+ "@mui/x-charts-vendor": "^9.0.0",
37
36
  "@mui/x-internals": "^9.0.0",
38
- "@mui/x-charts-vendor": "^9.0.0"
37
+ "@mui/x-license": "^9.0.2",
38
+ "@mui/x-internal-gestures": "^9.0.2"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@emotion/react": "^11.9.0",
@@ -314,6 +314,48 @@
314
314
  "default": "./ChartsOverlay/index.mjs"
315
315
  }
316
316
  },
317
+ "./ChartsRadialDataProvider": {
318
+ "import": {
319
+ "types": "./ChartsRadialDataProvider/index.d.mts",
320
+ "default": "./ChartsRadialDataProvider/index.mjs"
321
+ },
322
+ "require": {
323
+ "types": "./ChartsRadialDataProvider/index.d.ts",
324
+ "default": "./ChartsRadialDataProvider/index.js"
325
+ },
326
+ "default": {
327
+ "types": "./ChartsRadialDataProvider/index.d.mts",
328
+ "default": "./ChartsRadialDataProvider/index.mjs"
329
+ }
330
+ },
331
+ "./ChartsRadialGrid": {
332
+ "import": {
333
+ "types": "./ChartsRadialGrid/index.d.mts",
334
+ "default": "./ChartsRadialGrid/index.mjs"
335
+ },
336
+ "require": {
337
+ "types": "./ChartsRadialGrid/index.d.ts",
338
+ "default": "./ChartsRadialGrid/index.js"
339
+ },
340
+ "default": {
341
+ "types": "./ChartsRadialGrid/index.d.mts",
342
+ "default": "./ChartsRadialGrid/index.mjs"
343
+ }
344
+ },
345
+ "./ChartsRadiusAxis": {
346
+ "import": {
347
+ "types": "./ChartsRadiusAxis/index.d.mts",
348
+ "default": "./ChartsRadiusAxis/index.mjs"
349
+ },
350
+ "require": {
351
+ "types": "./ChartsRadiusAxis/index.d.ts",
352
+ "default": "./ChartsRadiusAxis/index.js"
353
+ },
354
+ "default": {
355
+ "types": "./ChartsRadiusAxis/index.d.mts",
356
+ "default": "./ChartsRadiusAxis/index.mjs"
357
+ }
358
+ },
317
359
  "./ChartsReferenceLine": {
318
360
  "import": {
319
361
  "types": "./ChartsReferenceLine/index.d.mts",
@@ -328,6 +370,20 @@
328
370
  "default": "./ChartsReferenceLine/index.mjs"
329
371
  }
330
372
  },
373
+ "./ChartsRotationAxis": {
374
+ "import": {
375
+ "types": "./ChartsRotationAxis/index.d.mts",
376
+ "default": "./ChartsRotationAxis/index.mjs"
377
+ },
378
+ "require": {
379
+ "types": "./ChartsRotationAxis/index.d.ts",
380
+ "default": "./ChartsRotationAxis/index.js"
381
+ },
382
+ "default": {
383
+ "types": "./ChartsRotationAxis/index.d.mts",
384
+ "default": "./ChartsRotationAxis/index.mjs"
385
+ }
386
+ },
331
387
  "./ChartsSurface": {
332
388
  "import": {
333
389
  "types": "./ChartsSurface/index.d.mts",