@mui/x-charts 8.13.1 → 8.14.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.
- package/BarChart/BarChart.js +44 -36
- package/CHANGELOG.md +109 -1
- package/ChartContainer/ChartContainer.js +68 -56
- package/ChartsTooltip/ChartsTooltipContainer.js +2 -0
- package/ChartsXAxis/useAxisTicksProps.d.ts +197 -355
- package/ChartsYAxis/useAxisTicksProps.d.ts +197 -355
- package/LineChart/LineChart.js +44 -36
- package/PieChart/PieArc.d.ts +18 -4
- package/PieChart/PieArc.js +11 -5
- package/PieChart/PieArcPlot.js +3 -1
- package/ScatterChart/ScatterChart.js +44 -36
- package/SparkLineChart/SparkLineChart.js +44 -36
- package/esm/BarChart/BarChart.js +44 -36
- package/esm/ChartContainer/ChartContainer.js +68 -56
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +2 -0
- package/esm/ChartsXAxis/useAxisTicksProps.d.ts +197 -355
- package/esm/ChartsYAxis/useAxisTicksProps.d.ts +197 -355
- package/esm/LineChart/LineChart.js +44 -36
- package/esm/PieChart/PieArc.d.ts +18 -4
- package/esm/PieChart/PieArc.js +11 -5
- package/esm/PieChart/PieArcPlot.js +3 -1
- package/esm/ScatterChart/ScatterChart.js +44 -36
- package/esm/SparkLineChart/SparkLineChart.js +44 -36
- package/esm/hooks/animation/useAnimate.js +5 -3
- package/esm/hooks/useScale.d.ts +5 -1
- package/esm/index.js +1 -1
- package/esm/internals/animation/useAnimateInternal.d.ts +1 -1
- package/esm/internals/animation/useAnimateInternal.js +1 -1
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +8 -8
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +4 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +9 -11
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -28
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +4 -5
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +3 -24
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +20 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +77 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +4 -65
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +7 -104
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +31 -39
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +166 -6
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +158 -47
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +10 -3
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +3 -2
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.types.d.ts +6 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +5 -1
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +9 -1
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +10 -1
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +2 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +2 -2
- package/esm/internals/scaleGuards.d.ts +12 -6
- package/esm/internals/symlogScale.js +5 -0
- package/esm/locales/enUS.js +4 -4
- package/esm/locales/ptBR.js +97 -99
- package/esm/models/axis.d.ts +39 -17
- package/esm/models/axis.js +3 -0
- package/hooks/animation/useAnimate.js +4 -3
- package/hooks/useScale.d.ts +5 -1
- package/index.js +1 -1
- package/internals/animation/useAnimateInternal.d.ts +1 -1
- package/internals/animation/useAnimateInternal.js +1 -1
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +7 -7
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +4 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +9 -11
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -28
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +4 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +3 -25
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +20 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +84 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +4 -65
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +8 -108
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +29 -37
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +166 -6
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +158 -47
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +10 -3
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +3 -2
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.types.d.ts +6 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +5 -1
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +9 -1
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +11 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +2 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +1 -1
- package/internals/scaleGuards.d.ts +12 -6
- package/internals/symlogScale.js +5 -0
- package/locales/enUS.js +4 -4
- package/locales/ptBR.js +97 -99
- package/models/axis.d.ts +39 -17
- package/models/axis.js +4 -0
- package/package.json +6 -6
|
@@ -34,4 +34,12 @@ export declare const selectorChartsKeyboardYAxisIndex: import("reselect").Select
|
|
|
34
34
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
35
35
|
} & {
|
|
36
36
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
37
|
-
} & Partial<import("../useChartCartesianAxis/index.js").UseChartCartesianAxisState> & Partial<{}>, AxisItemIdentifier | undefined, any[]>;
|
|
37
|
+
} & Partial<import("../useChartCartesianAxis/index.js").UseChartCartesianAxisState> & Partial<{}>, AxisItemIdentifier | undefined, any[]>;
|
|
38
|
+
export declare const selectorChartsKeyboardItem: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartKeyboardNavigation.types.js").UseChartKeyboardNavigationState> & {
|
|
39
|
+
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
40
|
+
} & {
|
|
41
|
+
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
42
|
+
}, {
|
|
43
|
+
seriesId: SeriesId;
|
|
44
|
+
dataIndex: number | undefined;
|
|
45
|
+
} | null, any[]>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.selectorChartsKeyboardYAxisIndex = exports.selectorChartsKeyboardXAxisIndex = exports.selectorChartsIsKeyboardNavigationEnabled = exports.selectorChartsHasFocusedItem = exports.selectorChartsFocusedSeriesType = exports.selectorChartsFocusedSeriesId = exports.selectorChartsFocusedDataIndex = void 0;
|
|
6
|
+
exports.selectorChartsKeyboardYAxisIndex = exports.selectorChartsKeyboardXAxisIndex = exports.selectorChartsKeyboardItem = exports.selectorChartsIsKeyboardNavigationEnabled = exports.selectorChartsHasFocusedItem = exports.selectorChartsFocusedSeriesType = exports.selectorChartsFocusedSeriesId = exports.selectorChartsFocusedDataIndex = void 0;
|
|
7
7
|
var _selectors = require("../../utils/selectors");
|
|
8
8
|
var _useChartSeries = require("../../corePlugins/useChartSeries");
|
|
9
9
|
var _useChartCartesianAxisRendering = require("../useChartCartesianAxis/useChartCartesianAxisRendering.selectors");
|
|
@@ -36,4 +36,13 @@ const createSelectAxisHighlight = direction => (type, seriesId, dataIndex, axis,
|
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
const selectorChartsKeyboardXAxisIndex = exports.selectorChartsKeyboardXAxisIndex = (0, _selectors.createSelector)([selectorChartsFocusedSeriesType, selectorChartsFocusedSeriesId, selectorChartsFocusedDataIndex, _useChartCartesianAxisRendering.selectorChartXAxis, _useChartSeries.selectorChartSeriesProcessed], createSelectAxisHighlight('x'));
|
|
39
|
-
const selectorChartsKeyboardYAxisIndex = exports.selectorChartsKeyboardYAxisIndex = (0, _selectors.createSelector)([selectorChartsFocusedSeriesType, selectorChartsFocusedSeriesId, selectorChartsFocusedDataIndex, _useChartCartesianAxisRendering.selectorChartYAxis, _useChartSeries.selectorChartSeriesProcessed], createSelectAxisHighlight('y'));
|
|
39
|
+
const selectorChartsKeyboardYAxisIndex = exports.selectorChartsKeyboardYAxisIndex = (0, _selectors.createSelector)([selectorChartsFocusedSeriesType, selectorChartsFocusedSeriesId, selectorChartsFocusedDataIndex, _useChartCartesianAxisRendering.selectorChartYAxis, _useChartSeries.selectorChartSeriesProcessed], createSelectAxisHighlight('y'));
|
|
40
|
+
const selectorChartsKeyboardItem = exports.selectorChartsKeyboardItem = (0, _selectors.createSelector)([selectorChartsFocusedSeriesType, selectorChartsFocusedSeriesId, selectorChartsFocusedDataIndex], function selectorChartsKeyboardItem(seriesType, seriesId, dataIndex) {
|
|
41
|
+
if (seriesId === undefined) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
seriesId,
|
|
46
|
+
dataIndex: seriesType === 'line' ? undefined : dataIndex
|
|
47
|
+
};
|
|
48
|
+
});
|
|
@@ -2,6 +2,7 @@ import { ChartPluginSignature } from "../../models/index.js";
|
|
|
2
2
|
import { ChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
3
3
|
import { SeriesId } from "../../../../models/seriesType/common.js";
|
|
4
4
|
import { UseChartInteractionSignature } from "../useChartInteraction/index.js";
|
|
5
|
+
import { UseChartHighlightSignature } from "../useChartHighlight/index.js";
|
|
5
6
|
export interface UseChartKeyboardNavigationInstance {}
|
|
6
7
|
type SeriesItemIdentifier = {
|
|
7
8
|
/**
|
|
@@ -31,6 +32,6 @@ export type UseChartKeyboardNavigationSignature = ChartPluginSignature<{
|
|
|
31
32
|
defaultizedParams: UseChartKeyboardNavigationParameters;
|
|
32
33
|
instance: UseChartKeyboardNavigationInstance;
|
|
33
34
|
state: UseChartKeyboardNavigationState;
|
|
34
|
-
optionalDependencies: [UseChartInteractionSignature];
|
|
35
|
+
optionalDependencies: [UseChartInteractionSignature, UseChartHighlightSignature];
|
|
35
36
|
}>;
|
|
36
37
|
export {};
|
|
@@ -91,7 +91,7 @@ function computeAxisValue({
|
|
|
91
91
|
completeAxis[axis.id].valueFormatter = axis.valueFormatter ?? dateFormatter;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
if (
|
|
94
|
+
if (!(0, _axis.isContinuousScaleConfig)(axis)) {
|
|
95
95
|
// Could be merged with the two previous "if conditions" but then TS does not get that `axis.scaleType` can't be `band` or `point`.
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import type { ScaleBand } from '@mui/x-charts-vendor/d3-scale';
|
|
2
2
|
import { D3OrdinalScale, D3Scale } from "../models/axis.js";
|
|
3
|
-
export declare function isOrdinalScale<
|
|
3
|
+
export declare function isOrdinalScale<Domain extends {
|
|
4
4
|
toString(): string;
|
|
5
|
-
}
|
|
6
|
-
export declare function isBandScale<T extends {
|
|
5
|
+
} = {
|
|
7
6
|
toString(): string;
|
|
8
|
-
}>(scale: D3Scale<
|
|
9
|
-
export declare function
|
|
7
|
+
}, Range = number, Output = number>(scale: D3Scale<Domain, Range, Output>): scale is D3OrdinalScale<Domain>;
|
|
8
|
+
export declare function isBandScale<Domain extends {
|
|
10
9
|
toString(): string;
|
|
11
|
-
}
|
|
10
|
+
} = {
|
|
11
|
+
toString(): string;
|
|
12
|
+
}, Range = number, Output = number>(scale: D3Scale<Domain, Range, Output>): scale is ScaleBand<Domain>;
|
|
13
|
+
export declare function isPointScale<Domain extends {
|
|
14
|
+
toString(): string;
|
|
15
|
+
} = {
|
|
16
|
+
toString(): string;
|
|
17
|
+
}, Range = number, Output = number>(scale: D3Scale<Domain, Range, Output>): scale is D3OrdinalScale<Domain>;
|
package/internals/symlogScale.js
CHANGED
|
@@ -81,6 +81,11 @@ function scaleSymlog(_domain, _range) {
|
|
|
81
81
|
return tickFormat(tick);
|
|
82
82
|
};
|
|
83
83
|
};
|
|
84
|
+
|
|
85
|
+
/* Adaptation of https://github.com/d3/d3-scale/blob/d6904a4bde09e16005e0ad8ca3e25b10ce54fa0d/src/symlog.js#L30 */
|
|
86
|
+
scale.copy = () => {
|
|
87
|
+
return scaleSymlog(scale.domain(), scale.range()).constant(scale.constant());
|
|
88
|
+
};
|
|
84
89
|
return scale;
|
|
85
90
|
}
|
|
86
91
|
function generateScales(scale) {
|
package/locales/enUS.js
CHANGED
|
@@ -9,17 +9,17 @@ var _getChartsLocalization = require("./utils/getChartsLocalization");
|
|
|
9
9
|
// This object is not Partial<ChartsLocaleText> because it is the default values
|
|
10
10
|
|
|
11
11
|
const enUSLocaleText = exports.enUSLocaleText = {
|
|
12
|
-
|
|
12
|
+
// Overlay
|
|
13
13
|
loading: 'Loading data…',
|
|
14
14
|
noData: 'No data to display',
|
|
15
|
-
|
|
15
|
+
// Toolbar
|
|
16
16
|
zoomIn: 'Zoom in',
|
|
17
17
|
zoomOut: 'Zoom out',
|
|
18
18
|
toolbarExport: 'Export',
|
|
19
|
-
|
|
19
|
+
// Toolbar Export Menu
|
|
20
20
|
toolbarExportPrint: 'Print',
|
|
21
21
|
toolbarExportImage: mimeType => `Export as ${_imageMimeTypes.imageMimeTypes[mimeType] ?? mimeType}`,
|
|
22
|
-
|
|
22
|
+
// Charts renderer configuration
|
|
23
23
|
chartTypeBar: 'Bar',
|
|
24
24
|
chartTypeColumn: 'Column',
|
|
25
25
|
chartTypeLine: 'Line',
|
package/locales/ptBR.js
CHANGED
|
@@ -16,106 +16,104 @@ const ptBRLocaleText = exports.ptBRLocaleText = {
|
|
|
16
16
|
toolbarExport: 'Exportar',
|
|
17
17
|
// Toolbar Export Menu
|
|
18
18
|
toolbarExportPrint: 'Imprimir',
|
|
19
|
-
toolbarExportImage: mimeType => `Exportar como ${_imageMimeTypes.imageMimeTypes[mimeType] ?? mimeType}
|
|
20
|
-
|
|
19
|
+
toolbarExportImage: mimeType => `Exportar como ${_imageMimeTypes.imageMimeTypes[mimeType] ?? mimeType}`,
|
|
21
20
|
// Charts renderer configuration
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
21
|
+
chartTypeBar: 'Barra',
|
|
22
|
+
chartTypeColumn: 'Coluna',
|
|
23
|
+
chartTypeLine: 'Linha',
|
|
24
|
+
chartTypeArea: 'Área',
|
|
25
|
+
chartTypePie: 'Pizza',
|
|
26
|
+
chartPaletteLabel: 'Paleta de cores',
|
|
27
|
+
chartPaletteNameRainbowSurge: 'Onda de Arco-íris',
|
|
28
|
+
chartPaletteNameBlueberryTwilight: 'Crepúsculo de Blueberry',
|
|
29
|
+
chartPaletteNameMangoFusion: 'Fusão de Manga',
|
|
30
|
+
chartPaletteNameCheerfulFiesta: 'Festa Alegre',
|
|
31
|
+
chartPaletteNameStrawberrySky: 'Céu de Morango',
|
|
32
|
+
chartPaletteNameBlue: 'Azul',
|
|
33
|
+
chartPaletteNameGreen: 'Verde',
|
|
34
|
+
chartPaletteNamePurple: 'Roxo',
|
|
35
|
+
chartPaletteNameRed: 'Vermelho',
|
|
36
|
+
chartPaletteNameOrange: 'Laranja',
|
|
37
|
+
chartPaletteNameYellow: 'Amarelo',
|
|
38
|
+
chartPaletteNameCyan: 'Ciano',
|
|
39
|
+
chartPaletteNamePink: 'Rosa',
|
|
40
|
+
chartConfigurationSectionChart: 'Gráfico',
|
|
41
|
+
chartConfigurationSectionColumns: 'Colunas',
|
|
42
|
+
chartConfigurationSectionBars: 'Barras',
|
|
43
|
+
chartConfigurationSectionAxes: 'Eixos',
|
|
44
|
+
chartConfigurationGrid: 'Grade',
|
|
45
|
+
chartConfigurationBorderRadius: 'Arredondamento da borda',
|
|
46
|
+
chartConfigurationCategoryGapRatio: 'Proporção de espaço entre categorias',
|
|
47
|
+
chartConfigurationBarGapRatio: 'Proporção de espaço entre séries',
|
|
48
|
+
chartConfigurationStacked: 'Empilhado',
|
|
49
|
+
chartConfigurationShowToolbar: 'Mostrar barra de ferramentas',
|
|
50
|
+
chartConfigurationSkipAnimation: 'Ignorar animação',
|
|
51
|
+
chartConfigurationInnerRadius: 'Raio interno',
|
|
52
|
+
chartConfigurationOuterRadius: 'Raio externo',
|
|
53
|
+
chartConfigurationColors: 'Cores',
|
|
54
|
+
chartConfigurationHideLegend: 'Ocultar legenda',
|
|
55
|
+
chartConfigurationShowMark: 'Mostrar marcação',
|
|
56
|
+
chartConfigurationHeight: 'Altura',
|
|
57
|
+
chartConfigurationWidth: 'Largura',
|
|
58
|
+
chartConfigurationSeriesGap: 'Espaçamento entre séries',
|
|
59
|
+
chartConfigurationTickPlacement: 'Posição da marcação',
|
|
60
|
+
chartConfigurationTickLabelPlacement: 'Posição do título da marcação',
|
|
61
|
+
chartConfigurationCategoriesAxisLabel: 'Título do eixo de categorias',
|
|
62
|
+
chartConfigurationSeriesAxisLabel: 'Título do eixo de séries',
|
|
63
|
+
chartConfigurationXAxisPosition: 'Posição do eixo X',
|
|
64
|
+
chartConfigurationYAxisPosition: 'Posição do eixo Y',
|
|
65
|
+
chartConfigurationSeriesAxisReverse: 'Inverter eixo de séries',
|
|
66
|
+
chartConfigurationTooltipPlacement: 'Posição',
|
|
67
|
+
chartConfigurationTooltipTrigger: 'Gatilho',
|
|
68
|
+
chartConfigurationLegendPosition: 'Posição',
|
|
69
|
+
chartConfigurationLegendDirection: 'Direção',
|
|
70
|
+
chartConfigurationBarLabels: 'Títulos das barras',
|
|
71
|
+
chartConfigurationColumnLabels: 'Títulos das colunas',
|
|
72
|
+
chartConfigurationInterpolation: 'Interpolação',
|
|
73
|
+
chartConfigurationSectionTooltip: 'Tooltip',
|
|
74
|
+
chartConfigurationSectionLegend: 'Legenda',
|
|
75
|
+
chartConfigurationSectionLines: 'Linhas',
|
|
76
|
+
chartConfigurationSectionAreas: 'Áreas',
|
|
77
|
+
chartConfigurationSectionArcs: 'Arcos',
|
|
78
|
+
chartConfigurationPaddingAngle: 'Ângulo de preenchimento',
|
|
79
|
+
chartConfigurationCornerRadius: 'Raio do canto',
|
|
80
|
+
chartConfigurationArcLabels: 'Títulos dos arcos',
|
|
81
|
+
chartConfigurationStartAngle: 'Ângulo inicial',
|
|
82
|
+
chartConfigurationEndAngle: 'Ângulo final',
|
|
83
|
+
chartConfigurationPieTooltipTrigger: 'Gatilho',
|
|
84
|
+
chartConfigurationPieLegendPosition: 'Posição',
|
|
85
|
+
chartConfigurationPieLegendDirection: 'Direção',
|
|
88
86
|
// Common option labels
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
87
|
+
chartConfigurationOptionNone: 'Nenhum',
|
|
88
|
+
chartConfigurationOptionValue: 'Valor',
|
|
89
|
+
chartConfigurationOptionAuto: 'Automático',
|
|
90
|
+
chartConfigurationOptionTop: 'Topo',
|
|
91
|
+
chartConfigurationOptionTopLeft: 'Topo Esquerdo',
|
|
92
|
+
chartConfigurationOptionTopRight: 'Topo Direito',
|
|
93
|
+
chartConfigurationOptionBottom: 'Inferior',
|
|
94
|
+
chartConfigurationOptionBottomLeft: 'Inferior Esquerdo',
|
|
95
|
+
chartConfigurationOptionBottomRight: 'Inferior Direito',
|
|
96
|
+
chartConfigurationOptionLeft: 'Esquerda',
|
|
97
|
+
chartConfigurationOptionRight: 'Direita',
|
|
98
|
+
chartConfigurationOptionAxis: 'Eixo',
|
|
99
|
+
chartConfigurationOptionItem: 'Item',
|
|
100
|
+
chartConfigurationOptionHorizontal: 'Horizontal',
|
|
101
|
+
chartConfigurationOptionVertical: 'Vertical',
|
|
102
|
+
chartConfigurationOptionBoth: 'Ambos',
|
|
103
|
+
chartConfigurationOptionStart: 'Início',
|
|
104
|
+
chartConfigurationOptionMiddle: 'Meio',
|
|
105
|
+
chartConfigurationOptionEnd: 'Fim',
|
|
106
|
+
chartConfigurationOptionExtremities: 'Extremidades',
|
|
107
|
+
chartConfigurationOptionTick: 'Marcação',
|
|
108
|
+
chartConfigurationOptionMonotoneX: 'Monótono X',
|
|
109
|
+
chartConfigurationOptionMonotoneY: 'Monótono Y',
|
|
110
|
+
chartConfigurationOptionCatmullRom: 'Catmull-Rom',
|
|
111
|
+
chartConfigurationOptionLinear: 'Linear',
|
|
112
|
+
chartConfigurationOptionNatural: 'Natural',
|
|
113
|
+
chartConfigurationOptionStep: 'Passo',
|
|
114
|
+
chartConfigurationOptionStepBefore: 'Passo Anterior',
|
|
115
|
+
chartConfigurationOptionStepAfter: 'Passo Posterior',
|
|
116
|
+
chartConfigurationOptionBumpX: 'Colisão X',
|
|
117
|
+
chartConfigurationOptionBumpY: 'Colisão Y'
|
|
120
118
|
};
|
|
121
119
|
const ptBR = exports.ptBR = (0, _getChartsLocalization.getChartsLocalization)(ptBRLocaleText);
|
package/models/axis.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ScaleBand, ScaleLinear, ScaleLogarithmic, ScaleOrdinal, ScalePoint, ScalePower, ScaleSequential, ScaleThreshold, ScaleTime, ScaleSymLog } from '@mui/x-charts-vendor/d3-scale';
|
|
1
|
+
import type { ScaleBand, ScaleLinear, ScaleLogarithmic, ScaleOrdinal, ScalePoint, ScalePower, ScaleSequential, ScaleThreshold, ScaleTime, ScaleSymLog, NumberValue } from '@mui/x-charts-vendor/d3-scale';
|
|
2
2
|
import { SxProps } from '@mui/system/styleFunctionSx';
|
|
3
3
|
import { type MakeOptional, MakeRequired } from '@mui/x-internals/types';
|
|
4
4
|
import type { DefaultizedZoomOptions } from "../internals/plugins/featurePlugins/useChartCartesianAxis/index.js";
|
|
@@ -9,11 +9,15 @@ import { ContinuousColorConfig, OrdinalColorConfig, PiecewiseColorConfig } from
|
|
|
9
9
|
export type AxisId = string | number;
|
|
10
10
|
export type D3Scale<Domain extends {
|
|
11
11
|
toString(): string;
|
|
12
|
-
} =
|
|
12
|
+
} = {
|
|
13
|
+
toString(): string;
|
|
14
|
+
}, Range = number, Output = number> = ScaleBand<Domain> | ScaleSymLog<Range, Output> | ScaleLogarithmic<Range, Output> | ScalePoint<Domain> | ScalePower<Range, Output> | ScaleTime<Range, Output> | ScaleLinear<Range, Output>;
|
|
13
15
|
export type D3ContinuousScale<Range = number, Output = number> = ScaleSymLog<Range, Output> | ScaleLogarithmic<Range, Output> | ScalePower<Range, Output> | ScaleTime<Range, Output> | ScaleLinear<Range, Output>;
|
|
14
16
|
export type D3OrdinalScale<Domain extends {
|
|
15
17
|
toString(): string;
|
|
16
|
-
} =
|
|
18
|
+
} = {
|
|
19
|
+
toString(): string;
|
|
20
|
+
}> = ScaleBand<Domain> | ScalePoint<Domain>;
|
|
17
21
|
export interface ChartsAxisSlots {
|
|
18
22
|
/**
|
|
19
23
|
* Custom component for the axis main line.
|
|
@@ -220,7 +224,9 @@ export type AxisGroups = {
|
|
|
220
224
|
export interface AxisScaleConfig {
|
|
221
225
|
band: {
|
|
222
226
|
scaleType: 'band';
|
|
223
|
-
scale: ScaleBand<
|
|
227
|
+
scale: ScaleBand<{
|
|
228
|
+
toString(): string;
|
|
229
|
+
}>;
|
|
224
230
|
/**
|
|
225
231
|
* The ratio between the space allocated for padding between two categories and the category width.
|
|
226
232
|
* 0 means no gap, and 1 no data.
|
|
@@ -237,7 +243,9 @@ export interface AxisScaleConfig {
|
|
|
237
243
|
} & AxisGroups & Pick<TickParams, 'tickPlacement' | 'tickLabelPlacement'>;
|
|
238
244
|
point: {
|
|
239
245
|
scaleType: 'point';
|
|
240
|
-
scale: ScalePoint<
|
|
246
|
+
scale: ScalePoint<{
|
|
247
|
+
toString(): string;
|
|
248
|
+
}>;
|
|
241
249
|
colorMap?: OrdinalColorConfig | ContinuousColorConfig | PiecewiseColorConfig;
|
|
242
250
|
} & AxisGroups;
|
|
243
251
|
log: {
|
|
@@ -363,26 +371,39 @@ export type AxisValueFormatterContext<S extends ScaleName = ScaleName> = {
|
|
|
363
371
|
*/
|
|
364
372
|
tickNumber?: number;
|
|
365
373
|
};
|
|
366
|
-
|
|
367
|
-
* Config that is shared between cartesian and polar axes.
|
|
368
|
-
*/
|
|
369
|
-
type CommonAxisConfig<S extends ScaleName = ScaleName, V = any> = {
|
|
374
|
+
type MinMaxConfig<S extends ScaleName = ScaleName> = S extends ContinuousScaleName ? S extends 'utc' | 'time' ? {
|
|
370
375
|
/**
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
* The ID must be unique across all axes in this chart.
|
|
376
|
+
* The minimal value of the domain.
|
|
377
|
+
* If not provided, it gets computed to display the entire chart data.
|
|
374
378
|
*/
|
|
375
|
-
|
|
379
|
+
min?: NumberValue;
|
|
380
|
+
/**
|
|
381
|
+
* The maximal value of the domain.
|
|
382
|
+
* If not provided, it gets computed to display the entire chart data.
|
|
383
|
+
*/
|
|
384
|
+
max?: NumberValue;
|
|
385
|
+
} : {
|
|
376
386
|
/**
|
|
377
387
|
* The minimal value of the domain.
|
|
378
388
|
* If not provided, it gets computed to display the entire chart data.
|
|
379
389
|
*/
|
|
380
|
-
min?: number
|
|
390
|
+
min?: number;
|
|
381
391
|
/**
|
|
382
392
|
* The maximal value of the domain.
|
|
383
393
|
* If not provided, it gets computed to display the entire chart data.
|
|
384
394
|
*/
|
|
385
|
-
max?: number
|
|
395
|
+
max?: number;
|
|
396
|
+
} : {};
|
|
397
|
+
/**
|
|
398
|
+
* Config that is shared between cartesian and polar axes.
|
|
399
|
+
*/
|
|
400
|
+
type CommonAxisConfig<S extends ScaleName = ScaleName, V = any> = {
|
|
401
|
+
/**
|
|
402
|
+
* ID used to identify the axis.
|
|
403
|
+
*
|
|
404
|
+
* The ID must be unique across all axes in this chart.
|
|
405
|
+
*/
|
|
406
|
+
id: AxisId;
|
|
386
407
|
/**
|
|
387
408
|
* The data used by `'band'` and `'point'` scales.
|
|
388
409
|
*/
|
|
@@ -429,7 +450,7 @@ export type PolarAxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps
|
|
|
429
450
|
* @default 0
|
|
430
451
|
*/
|
|
431
452
|
offset?: number;
|
|
432
|
-
} & CommonAxisConfig<S, V> & Omit<Partial<AxisProps>, 'axisId'> & Partial<Omit<AxisScaleConfig[S], 'scale'>> & AxisConfigExtension;
|
|
453
|
+
} & CommonAxisConfig<S, V> & MinMaxConfig<S> & Omit<Partial<AxisProps>, 'axisId'> & Partial<Omit<AxisScaleConfig[S], 'scale'>> & AxisConfigExtension;
|
|
433
454
|
/**
|
|
434
455
|
* Use this type for advanced typing. For basic usage, use `XAxis`, `YAxis`, `RotationAxis` or `RadiusAxis`.
|
|
435
456
|
*/
|
|
@@ -441,7 +462,7 @@ export type AxisConfig<S extends ScaleName = ScaleName, V = any, AxisProps exten
|
|
|
441
462
|
* @default 0
|
|
442
463
|
*/
|
|
443
464
|
offset?: number;
|
|
444
|
-
} & CommonAxisConfig<S, V> & Omit<Partial<AxisProps>, 'axisId'> & Partial<Omit<AxisScaleConfig[S], 'scale'>> & AxisSideConfig<AxisProps> & TickParams & AxisConfigExtension;
|
|
465
|
+
} & CommonAxisConfig<S, V> & MinMaxConfig<S> & Omit<Partial<AxisProps>, 'axisId'> & Partial<Omit<AxisScaleConfig[S], 'scale'>> & AxisSideConfig<AxisProps> & TickParams & AxisConfigExtension;
|
|
445
466
|
export interface AxisConfigExtension {}
|
|
446
467
|
export type PolarAxisDefaultized<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsAxisProps = ChartsRotationAxisProps | ChartsRadiusAxisProps> = Omit<PolarAxisConfig<S, V, AxisProps>, 'scaleType'> & AxisScaleConfig[S] & AxisScaleComputedConfig[S] & {
|
|
447
468
|
/**
|
|
@@ -467,6 +488,7 @@ export declare function isBandScaleConfig(scaleConfig: AxisConfig<ScaleName>): s
|
|
|
467
488
|
export declare function isPointScaleConfig(scaleConfig: AxisConfig<ScaleName>): scaleConfig is AxisConfig<'point'> & {
|
|
468
489
|
scaleType: 'point';
|
|
469
490
|
};
|
|
491
|
+
export declare function isContinuousScaleConfig(scaleConfig: AxisConfig<ScaleName>): scaleConfig is AxisConfig<ContinuousScaleName>;
|
|
470
492
|
export declare function isSymlogScaleConfig(scaleConfig: AxisConfig<ScaleName>): scaleConfig is AxisConfig<'symlog'> & {
|
|
471
493
|
scaleType: 'symlog';
|
|
472
494
|
};
|
package/models/axis.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isBandScaleConfig = isBandScaleConfig;
|
|
7
|
+
exports.isContinuousScaleConfig = isContinuousScaleConfig;
|
|
7
8
|
exports.isPointScaleConfig = isPointScaleConfig;
|
|
8
9
|
exports.isSymlogScaleConfig = isSymlogScaleConfig;
|
|
9
10
|
/**
|
|
@@ -25,6 +26,9 @@ function isBandScaleConfig(scaleConfig) {
|
|
|
25
26
|
function isPointScaleConfig(scaleConfig) {
|
|
26
27
|
return scaleConfig.scaleType === 'point';
|
|
27
28
|
}
|
|
29
|
+
function isContinuousScaleConfig(scaleConfig) {
|
|
30
|
+
return scaleConfig.scaleType !== 'point' && scaleConfig.scaleType !== 'band';
|
|
31
|
+
}
|
|
28
32
|
function isSymlogScaleConfig(scaleConfig) {
|
|
29
33
|
return scaleConfig.scaleType === 'symlog';
|
|
30
34
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-charts",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.14.0",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The community edition of MUI X Charts components.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@babel/runtime": "^7.28.4",
|
|
31
|
-
"@mui/utils": "^7.3.
|
|
31
|
+
"@mui/utils": "^7.3.3",
|
|
32
32
|
"bezier-easing": "^2.1.0",
|
|
33
33
|
"clsx": "^2.1.1",
|
|
34
34
|
"prop-types": "^15.8.1",
|
|
35
35
|
"reselect": "^5.1.1",
|
|
36
|
-
"use-sync-external-store": "^1.
|
|
37
|
-
"@mui/x-
|
|
38
|
-
"@mui/x-
|
|
39
|
-
"@mui/x-
|
|
36
|
+
"use-sync-external-store": "^1.6.0",
|
|
37
|
+
"@mui/x-charts-vendor": "8.14.0",
|
|
38
|
+
"@mui/x-internal-gestures": "0.3.3",
|
|
39
|
+
"@mui/x-internals": "8.14.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@emotion/react": "^11.9.0",
|