@mui/x-charts 8.5.0 → 8.5.1

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 (90) hide show
  1. package/BarChart/BarChart.js +2 -3
  2. package/BarChart/BarLabel/BarLabel.d.ts +1 -1
  3. package/BarChart/seriesConfig/seriesProcessor.js +1 -1
  4. package/CHANGELOG.md +112 -0
  5. package/ChartsAxisHighlight/ChartsAxisHighlightPath.d.ts +1 -1
  6. package/ChartsGrid/styledComponents.d.ts +2 -2
  7. package/ChartsReferenceLine/common.d.ts +1 -1
  8. package/ChartsTooltip/ChartsTooltip.js +1 -1
  9. package/ChartsTooltip/ChartsTooltipContainer.js +21 -16
  10. package/ChartsTooltip/ChartsTooltipTable.d.ts +4 -4
  11. package/ChartsTooltip/utils.d.ts +6 -0
  12. package/ChartsTooltip/utils.js +19 -1
  13. package/LineChart/LineChart.js +2 -3
  14. package/PieChart/PieChart.js +4 -11
  15. package/RadarChart/RadarChart.js +2 -3
  16. package/ScatterChart/ScatterChart.js +2 -3
  17. package/Toolbar/Toolbar.d.ts +9 -8
  18. package/Toolbar/Toolbar.js +23 -8
  19. package/Toolbar/Toolbar.types.d.ts +1 -1
  20. package/Toolbar/ToolbarButton.js +18 -4
  21. package/esm/BarChart/BarChart.js +2 -3
  22. package/esm/BarChart/BarLabel/BarLabel.d.ts +1 -1
  23. package/esm/BarChart/seriesConfig/seriesProcessor.js +1 -1
  24. package/esm/ChartsAxisHighlight/ChartsAxisHighlightPath.d.ts +1 -1
  25. package/esm/ChartsGrid/styledComponents.d.ts +2 -2
  26. package/esm/ChartsReferenceLine/common.d.ts +1 -1
  27. package/esm/ChartsTooltip/ChartsTooltip.js +1 -1
  28. package/esm/ChartsTooltip/ChartsTooltipContainer.js +22 -17
  29. package/esm/ChartsTooltip/ChartsTooltipTable.d.ts +4 -4
  30. package/esm/ChartsTooltip/utils.d.ts +6 -0
  31. package/esm/ChartsTooltip/utils.js +16 -1
  32. package/esm/LineChart/LineChart.js +2 -3
  33. package/esm/PieChart/PieChart.js +4 -11
  34. package/esm/RadarChart/RadarChart.js +2 -3
  35. package/esm/ScatterChart/ScatterChart.js +2 -3
  36. package/esm/Toolbar/Toolbar.d.ts +9 -8
  37. package/esm/Toolbar/Toolbar.js +22 -7
  38. package/esm/Toolbar/Toolbar.types.d.ts +1 -1
  39. package/esm/Toolbar/ToolbarButton.js +19 -4
  40. package/esm/index.js +1 -1
  41. package/esm/internals/components/AxisSharedComponents.d.ts +1 -1
  42. package/esm/internals/components/ChartsWrapper/ChartsWrapper.d.ts +5 -0
  43. package/esm/internals/components/ChartsWrapper/ChartsWrapper.js +22 -3
  44. package/esm/internals/constants.d.ts +8 -1
  45. package/esm/internals/constants.js +9 -1
  46. package/esm/internals/index.d.ts +2 -0
  47. package/esm/internals/index.js +2 -0
  48. package/esm/internals/invertScale.d.ts +2 -0
  49. package/esm/internals/invertScale.js +8 -0
  50. package/esm/internals/material/index.js +2 -0
  51. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +2917 -0
  52. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +1 -0
  53. package/esm/locales/index.d.ts +3 -1
  54. package/esm/locales/index.js +2 -0
  55. package/esm/locales/ptBR.d.ts +16 -0
  56. package/esm/locales/ptBR.js +9 -0
  57. package/esm/locales/ptPT.d.ts +16 -0
  58. package/esm/locales/ptPT.js +9 -0
  59. package/esm/models/axis.d.ts +2 -1
  60. package/esm/models/seriesType/bar.d.ts +2 -2
  61. package/esm/models/slots/chartsBaseSlotProps.d.ts +6 -0
  62. package/esm/models/slots/chartsBaseSlots.d.ts +2 -1
  63. package/index.js +1 -1
  64. package/internals/components/AxisSharedComponents.d.ts +1 -1
  65. package/internals/components/ChartsWrapper/ChartsWrapper.d.ts +5 -0
  66. package/internals/components/ChartsWrapper/ChartsWrapper.js +22 -3
  67. package/internals/constants.d.ts +8 -1
  68. package/internals/constants.js +10 -2
  69. package/internals/index.d.ts +2 -0
  70. package/internals/index.js +24 -0
  71. package/internals/invertScale.d.ts +2 -0
  72. package/internals/invertScale.js +14 -0
  73. package/internals/material/index.js +2 -0
  74. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +2917 -0
  75. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +2 -1
  76. package/locales/index.d.ts +3 -1
  77. package/locales/index.js +22 -0
  78. package/locales/ptBR.d.ts +16 -0
  79. package/locales/ptBR.js +15 -0
  80. package/locales/ptPT.d.ts +16 -0
  81. package/locales/ptPT.js +15 -0
  82. package/models/axis.d.ts +2 -1
  83. package/models/seriesType/bar.d.ts +2 -2
  84. package/models/slots/chartsBaseSlotProps.d.ts +6 -0
  85. package/models/slots/chartsBaseSlots.d.ts +2 -1
  86. package/package.json +5 -5
  87. package/Toolbar/internals/ChartsToolbar.d.ts +0 -6
  88. package/Toolbar/internals/ChartsToolbar.js +0 -14
  89. package/esm/Toolbar/internals/ChartsToolbar.d.ts +0 -6
  90. package/esm/Toolbar/internals/ChartsToolbar.js +0 -8
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.selectorChartZoomOptionsLookup = exports.selectorChartZoomMap = exports.selectorChartZoomIsInteracting = exports.selectorChartYAxis = exports.selectorChartXAxis = exports.selectorChartRawAxis = exports.selectorChartAxisZoomOptionsLookup = exports.createZoomMap = void 0;
7
+ exports.selectorChartZoomOptionsLookup = exports.selectorChartZoomMap = exports.selectorChartZoomIsInteracting = exports.selectorChartYAxis = exports.selectorChartXAxis = exports.selectorChartRawAxis = exports.selectorChartAxisZoomOptionsLookup = exports.selectorChartAxis = exports.createZoomMap = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _useChartDimensions = require("../../corePlugins/useChartDimensions");
10
10
  var _useChartSeries = require("../../corePlugins/useChartSeries");
@@ -96,6 +96,7 @@ const selectorChartYAxis = exports.selectorChartYAxis = (0, _selectors.createSel
96
96
  zoomOptions,
97
97
  getFilters
98
98
  }));
99
+ const selectorChartAxis = exports.selectorChartAxis = (0, _selectors.createSelector)([selectorChartXAxis, selectorChartYAxis, (_, axisId) => axisId], (xAxes, yAxes, axisId) => xAxes?.axis[axisId] ?? yAxes?.axis[axisId]);
99
100
  const selectorChartRawAxis = exports.selectorChartRawAxis = (0, _selectors.createSelector)([_useChartCartesianAxisLayout.selectorChartRawXAxis, _useChartCartesianAxisLayout.selectorChartRawYAxis, (state, axisId) => axisId], (xAxes, yAxes, axisId) => {
100
101
  const axis = xAxes?.find(a => a.id === axisId) ?? yAxes?.find(a => a.id === axisId) ?? null;
101
102
  if (!axis) {
@@ -1,3 +1,5 @@
1
1
  export type { ChartsLocaleText } from "./utils/chartsLocaleTextApi.js";
2
2
  export * from "./enUS.js";
3
- export * from "./frFR.js";
3
+ export * from "./frFR.js";
4
+ export * from "./ptBR.js";
5
+ export * from "./ptPT.js";
package/locales/index.js CHANGED
@@ -24,4 +24,26 @@ Object.keys(_frFR).forEach(function (key) {
24
24
  return _frFR[key];
25
25
  }
26
26
  });
27
+ });
28
+ var _ptBR = require("./ptBR");
29
+ Object.keys(_ptBR).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _ptBR[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _ptBR[key];
36
+ }
37
+ });
38
+ });
39
+ var _ptPT = require("./ptPT");
40
+ Object.keys(_ptPT).forEach(function (key) {
41
+ if (key === "default" || key === "__esModule") return;
42
+ if (key in exports && exports[key] === _ptPT[key]) return;
43
+ Object.defineProperty(exports, key, {
44
+ enumerable: true,
45
+ get: function () {
46
+ return _ptPT[key];
47
+ }
48
+ });
27
49
  });
@@ -0,0 +1,16 @@
1
+ import { ChartsLocaleText } from "./utils/chartsLocaleTextApi.js";
2
+ export declare const ptBRLocaleText: Partial<ChartsLocaleText>;
3
+ export declare const ptBR: {
4
+ components: {
5
+ MuiChartsLocalizationProvider: {
6
+ defaultProps: {
7
+ localeText: {
8
+ loading?: string | undefined;
9
+ noData?: string | undefined;
10
+ zoomIn?: string | undefined;
11
+ zoomOut?: string | undefined;
12
+ };
13
+ };
14
+ };
15
+ };
16
+ };
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ptBRLocaleText = exports.ptBR = void 0;
7
+ var _getChartsLocalization = require("./utils/getChartsLocalization");
8
+ const ptBRLocaleText = exports.ptBRLocaleText = {
9
+ // Overlay
10
+ loading: 'Carregando dados…',
11
+ noData: 'Sem dados para exibir',
12
+ zoomIn: 'Aumentar zoom',
13
+ zoomOut: 'Diminuir zoom'
14
+ };
15
+ const ptBR = exports.ptBR = (0, _getChartsLocalization.getChartsLocalization)(ptBRLocaleText);
@@ -0,0 +1,16 @@
1
+ import { ChartsLocaleText } from "./utils/chartsLocaleTextApi.js";
2
+ export declare const ptPTLocaleText: Partial<ChartsLocaleText>;
3
+ export declare const ptPT: {
4
+ components: {
5
+ MuiChartsLocalizationProvider: {
6
+ defaultProps: {
7
+ localeText: {
8
+ loading?: string | undefined;
9
+ noData?: string | undefined;
10
+ zoomIn?: string | undefined;
11
+ zoomOut?: string | undefined;
12
+ };
13
+ };
14
+ };
15
+ };
16
+ };
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ptPTLocaleText = exports.ptPT = void 0;
7
+ var _getChartsLocalization = require("./utils/getChartsLocalization");
8
+ const ptPTLocaleText = exports.ptPTLocaleText = {
9
+ // Overlay
10
+ loading: 'Carregando dados…',
11
+ noData: 'Sem dados para mostrar',
12
+ zoomIn: 'Aumentar zoom',
13
+ zoomOut: 'Diminuir zoom'
14
+ };
15
+ const ptPT = exports.ptPT = (0, _getChartsLocalization.getChartsLocalization)(ptPTLocaleText);
package/models/axis.d.ts CHANGED
@@ -270,8 +270,9 @@ export type AxisValueFormatterContext<S extends ScaleName = ScaleName> = {
270
270
  * - `'tick'` The value is displayed on the axis ticks.
271
271
  * - `'tooltip'` The value is displayed in the tooltip when hovering the chart.
272
272
  * - `'legend'` The value is displayed in the legend when using color legend.
273
+ * - `'zoom-slider-tooltip'` The value is displayed in the zoom slider tooltip.
273
274
  */
274
- location: 'legend';
275
+ location: 'legend' | 'zoom-slider-tooltip';
275
276
  } | {
276
277
  /**
277
278
  * Location indicates where the value will be displayed.
@@ -1,6 +1,6 @@
1
1
  import { DefaultizedProps } from '@mui/x-internals/types';
2
2
  import type { StackOffsetType } from "../stacking.js";
3
- import { CartesianSeriesType, CommonSeriesType, CommonDefaultizedProps, StackableSeriesType } from "./common.js";
3
+ import { CartesianSeriesType, CommonSeriesType, CommonDefaultizedProps, StackableSeriesType, SeriesId } from "./common.js";
4
4
  export interface BarSeriesType extends CommonSeriesType<number | null>, CartesianSeriesType, StackableSeriesType {
5
5
  type: 'bar';
6
6
  /**
@@ -32,7 +32,7 @@ export interface BarSeriesType extends CommonSeriesType<number | null>, Cartesia
32
32
  */
33
33
  export type BarItemIdentifier = {
34
34
  type: 'bar';
35
- seriesId: DefaultizedBarSeriesType['id'];
35
+ seriesId: SeriesId;
36
36
  dataIndex: number;
37
37
  };
38
38
  export interface DefaultizedBarSeriesType extends DefaultizedProps<BarSeriesType, CommonDefaultizedProps | 'color' | 'layout'> {}
@@ -8,7 +8,13 @@ export type ChartBaseCommonProps<T = HTMLElement> = React.DOMAttributes<T> & {
8
8
  export type ChartBaseIconProps = ChartBaseCommonProps<SVGSVGElement> & {
9
9
  titleAccess?: string;
10
10
  };
11
+ export type ChartBaseButtonProps = ChartBaseCommonProps & {
12
+ ref?: React.Ref<HTMLButtonElement>;
13
+ disabled?: boolean;
14
+ tabIndex?: number;
15
+ };
11
16
  export type ChartBaseIconButtonProps = ChartBaseCommonProps & {
12
17
  ref?: React.Ref<HTMLButtonElement>;
13
18
  disabled?: boolean;
19
+ tabIndex?: number;
14
20
  };
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
- import { ChartBaseIconButtonProps } from "./chartsBaseSlotProps.js";
2
+ import { ChartBaseButtonProps, ChartBaseIconButtonProps } from "./chartsBaseSlotProps.js";
3
3
  export interface ChartsBaseSlots {
4
+ baseButton: React.ComponentType<ChartBaseButtonProps>;
4
5
  baseIconButton: React.ComponentType<ChartBaseIconButtonProps>;
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-charts",
3
- "version": "8.5.0",
3
+ "version": "8.5.1",
4
4
  "author": "MUI Team",
5
5
  "description": "The community edition of MUI X Charts components.",
6
6
  "main": "./index.js",
@@ -29,15 +29,15 @@
29
29
  "directory": "packages/x-charts"
30
30
  },
31
31
  "dependencies": {
32
- "@babel/runtime": "^7.27.1",
33
- "@mui/utils": "^7.0.2",
32
+ "@babel/runtime": "^7.27.4",
33
+ "@mui/utils": "^7.1.1",
34
34
  "bezier-easing": "^2.1.0",
35
35
  "clsx": "^2.1.1",
36
36
  "prop-types": "^15.8.1",
37
37
  "reselect": "^5.1.1",
38
38
  "use-sync-external-store": "^1.5.0",
39
- "@mui/x-charts-vendor": "8.4.0",
40
- "@mui/x-internals": "8.5.0"
39
+ "@mui/x-charts-vendor": "8.5.1",
40
+ "@mui/x-internals": "8.5.1"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@emotion/react": "^11.9.0",
@@ -1,6 +0,0 @@
1
- /**
2
- * The chart toolbar component.
3
- *
4
- * In the community package, this component is empty and does not render anything.
5
- */
6
- export declare function ChartsToolbar(): null;
@@ -1,14 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ChartsToolbar = ChartsToolbar;
7
- /**
8
- * The chart toolbar component.
9
- *
10
- * In the community package, this component is empty and does not render anything.
11
- */
12
- function ChartsToolbar() {
13
- return null;
14
- }
@@ -1,6 +0,0 @@
1
- /**
2
- * The chart toolbar component.
3
- *
4
- * In the community package, this component is empty and does not render anything.
5
- */
6
- export declare function ChartsToolbar(): null;
@@ -1,8 +0,0 @@
1
- /**
2
- * The chart toolbar component.
3
- *
4
- * In the community package, this component is empty and does not render anything.
5
- */
6
- export function ChartsToolbar() {
7
- return null;
8
- }