@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.
- package/BarChart/BarChart.js +2 -3
- package/BarChart/BarLabel/BarLabel.d.ts +1 -1
- package/BarChart/seriesConfig/seriesProcessor.js +1 -1
- package/CHANGELOG.md +112 -0
- package/ChartsAxisHighlight/ChartsAxisHighlightPath.d.ts +1 -1
- package/ChartsGrid/styledComponents.d.ts +2 -2
- package/ChartsReferenceLine/common.d.ts +1 -1
- package/ChartsTooltip/ChartsTooltip.js +1 -1
- package/ChartsTooltip/ChartsTooltipContainer.js +21 -16
- package/ChartsTooltip/ChartsTooltipTable.d.ts +4 -4
- package/ChartsTooltip/utils.d.ts +6 -0
- package/ChartsTooltip/utils.js +19 -1
- package/LineChart/LineChart.js +2 -3
- package/PieChart/PieChart.js +4 -11
- package/RadarChart/RadarChart.js +2 -3
- package/ScatterChart/ScatterChart.js +2 -3
- package/Toolbar/Toolbar.d.ts +9 -8
- package/Toolbar/Toolbar.js +23 -8
- package/Toolbar/Toolbar.types.d.ts +1 -1
- package/Toolbar/ToolbarButton.js +18 -4
- package/esm/BarChart/BarChart.js +2 -3
- package/esm/BarChart/BarLabel/BarLabel.d.ts +1 -1
- package/esm/BarChart/seriesConfig/seriesProcessor.js +1 -1
- package/esm/ChartsAxisHighlight/ChartsAxisHighlightPath.d.ts +1 -1
- package/esm/ChartsGrid/styledComponents.d.ts +2 -2
- package/esm/ChartsReferenceLine/common.d.ts +1 -1
- package/esm/ChartsTooltip/ChartsTooltip.js +1 -1
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +22 -17
- package/esm/ChartsTooltip/ChartsTooltipTable.d.ts +4 -4
- package/esm/ChartsTooltip/utils.d.ts +6 -0
- package/esm/ChartsTooltip/utils.js +16 -1
- package/esm/LineChart/LineChart.js +2 -3
- package/esm/PieChart/PieChart.js +4 -11
- package/esm/RadarChart/RadarChart.js +2 -3
- package/esm/ScatterChart/ScatterChart.js +2 -3
- package/esm/Toolbar/Toolbar.d.ts +9 -8
- package/esm/Toolbar/Toolbar.js +22 -7
- package/esm/Toolbar/Toolbar.types.d.ts +1 -1
- package/esm/Toolbar/ToolbarButton.js +19 -4
- package/esm/index.js +1 -1
- package/esm/internals/components/AxisSharedComponents.d.ts +1 -1
- package/esm/internals/components/ChartsWrapper/ChartsWrapper.d.ts +5 -0
- package/esm/internals/components/ChartsWrapper/ChartsWrapper.js +22 -3
- package/esm/internals/constants.d.ts +8 -1
- package/esm/internals/constants.js +9 -1
- package/esm/internals/index.d.ts +2 -0
- package/esm/internals/index.js +2 -0
- package/esm/internals/invertScale.d.ts +2 -0
- package/esm/internals/invertScale.js +8 -0
- package/esm/internals/material/index.js +2 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +2917 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +1 -0
- package/esm/locales/index.d.ts +3 -1
- package/esm/locales/index.js +2 -0
- package/esm/locales/ptBR.d.ts +16 -0
- package/esm/locales/ptBR.js +9 -0
- package/esm/locales/ptPT.d.ts +16 -0
- package/esm/locales/ptPT.js +9 -0
- package/esm/models/axis.d.ts +2 -1
- package/esm/models/seriesType/bar.d.ts +2 -2
- package/esm/models/slots/chartsBaseSlotProps.d.ts +6 -0
- package/esm/models/slots/chartsBaseSlots.d.ts +2 -1
- package/index.js +1 -1
- package/internals/components/AxisSharedComponents.d.ts +1 -1
- package/internals/components/ChartsWrapper/ChartsWrapper.d.ts +5 -0
- package/internals/components/ChartsWrapper/ChartsWrapper.js +22 -3
- package/internals/constants.d.ts +8 -1
- package/internals/constants.js +10 -2
- package/internals/index.d.ts +2 -0
- package/internals/index.js +24 -0
- package/internals/invertScale.d.ts +2 -0
- package/internals/invertScale.js +14 -0
- package/internals/material/index.js +2 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +2917 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +2 -1
- package/locales/index.d.ts +3 -1
- package/locales/index.js +22 -0
- package/locales/ptBR.d.ts +16 -0
- package/locales/ptBR.js +15 -0
- package/locales/ptPT.d.ts +16 -0
- package/locales/ptPT.js +15 -0
- package/models/axis.d.ts +2 -1
- package/models/seriesType/bar.d.ts +2 -2
- package/models/slots/chartsBaseSlotProps.d.ts +6 -0
- package/models/slots/chartsBaseSlots.d.ts +2 -1
- package/package.json +5 -5
- package/Toolbar/internals/ChartsToolbar.d.ts +0 -6
- package/Toolbar/internals/ChartsToolbar.js +0 -14
- package/esm/Toolbar/internals/ChartsToolbar.d.ts +0 -6
- 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) {
|
package/locales/index.d.ts
CHANGED
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
|
+
};
|
package/locales/ptBR.js
ADDED
|
@@ -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
|
+
};
|
package/locales/ptPT.js
ADDED
|
@@ -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:
|
|
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.
|
|
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.
|
|
33
|
-
"@mui/utils": "^7.
|
|
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.
|
|
40
|
-
"@mui/x-internals": "8.5.
|
|
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,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
|
-
}
|