@mui/x-charts 8.13.1 → 8.14.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 +44 -36
- package/BarChart/useBarPlotData.js +20 -33
- package/CHANGELOG.md +204 -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/Gauge/Gauge.js +2 -9
- package/Gauge/GaugeReferenceArc.d.ts +4 -1
- package/Gauge/GaugeReferenceArc.js +12 -3
- package/Gauge/GaugeValueArc.d.ts +4 -1
- package/Gauge/GaugeValueArc.js +16 -8
- package/Gauge/GaugeValueText.js +3 -1
- 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/ScatterChart/seriesConfig/seriesProcessor.js +1 -1
- package/SparkLineChart/SparkLineChart.js +44 -36
- package/esm/BarChart/BarChart.js +44 -36
- package/esm/BarChart/useBarPlotData.js +20 -33
- 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/Gauge/Gauge.js +2 -9
- package/esm/Gauge/GaugeReferenceArc.d.ts +4 -1
- package/esm/Gauge/GaugeReferenceArc.js +11 -2
- package/esm/Gauge/GaugeValueArc.d.ts +4 -1
- package/esm/Gauge/GaugeValueArc.js +16 -8
- package/esm/Gauge/GaugeValueText.js +3 -1
- 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/ScatterChart/seriesConfig/seriesProcessor.js +1 -1
- 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/Flatbush.bench.d.ts +1 -0
- package/esm/internals/Flatbush.bench.js +42 -0
- package/esm/internals/Flatbush.d.ts +63 -0
- package/esm/internals/Flatbush.js +468 -0
- 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/getAxisValue.d.ts +6 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +3 -6
- 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 +185 -6
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +199 -47
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +4 -1
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +5 -0
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +33 -0
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +40 -81
- 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/esm/models/seriesType/scatter.d.ts +2 -0
- package/esm/themeAugmentation/components.d.ts +3 -0
- package/esm/themeAugmentation/overrides.d.ts +2 -0
- package/hooks/animation/useAnimate.js +4 -3
- package/hooks/useScale.d.ts +5 -1
- package/index.js +1 -1
- package/internals/Flatbush.bench.d.ts +1 -0
- package/internals/Flatbush.bench.js +44 -0
- package/internals/Flatbush.d.ts +63 -0
- package/internals/Flatbush.js +477 -0
- 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/getAxisValue.d.ts +6 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +3 -6
- 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 +185 -6
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +200 -47
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +4 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +5 -0
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +39 -0
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +39 -80
- 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/models/seriesType/scatter.d.ts +2 -0
- package/package.json +7 -6
- package/themeAugmentation/components.d.ts +3 -0
- package/themeAugmentation/overrides.d.ts +2 -0
|
@@ -4,13 +4,12 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
6
6
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
7
|
-
import { Delaunay } from '@mui/x-charts-vendor/d3-delaunay';
|
|
8
|
-
import { getValueToPositionMapper } from "../../../../hooks/useScale.js";
|
|
9
7
|
import { getSVGPoint } from "../../../getSVGPoint.js";
|
|
10
8
|
import { useSelector } from "../../../store/useSelector.js";
|
|
11
|
-
import { selectorChartXAxis, selectorChartYAxis, selectorChartZoomIsInteracting } from "../useChartCartesianAxis/index.js";
|
|
9
|
+
import { selectorChartAxisZoomData, selectorChartSeriesEmptyFlatbushMap, selectorChartSeriesFlatbushMap, selectorChartXAxis, selectorChartYAxis, selectorChartZoomIsInteracting } from "../useChartCartesianAxis/index.js";
|
|
12
10
|
import { selectorChartSeriesProcessed } from "../../corePlugins/useChartSeries/useChartSeries.selectors.js";
|
|
13
11
|
import { selectorChartDrawingArea } from "../../corePlugins/useChartDimensions/index.js";
|
|
12
|
+
import { findClosestPoints } from "./findClosestPoints.js";
|
|
14
13
|
export const useChartClosestPoint = ({
|
|
15
14
|
svgRef,
|
|
16
15
|
params,
|
|
@@ -36,9 +35,7 @@ export const useChartClosestPoint = ({
|
|
|
36
35
|
series,
|
|
37
36
|
seriesOrder
|
|
38
37
|
} = useSelector(store, selectorChartSeriesProcessed)?.scatter ?? {};
|
|
39
|
-
const
|
|
40
|
-
const delauneyRef = React.useRef(undefined);
|
|
41
|
-
const lastFind = React.useRef(undefined);
|
|
38
|
+
const flatbushMap = useSelector(store, zoomIsInteracting ? selectorChartSeriesEmptyFlatbushMap : selectorChartSeriesFlatbushMap);
|
|
42
39
|
const defaultXAxisId = xAxisIds[0];
|
|
43
40
|
const defaultYAxisId = yAxisIds[0];
|
|
44
41
|
useEnhancedEffect(() => {
|
|
@@ -48,52 +45,6 @@ export const useChartClosestPoint = ({
|
|
|
48
45
|
}
|
|
49
46
|
}));
|
|
50
47
|
}, [store, disableVoronoi]);
|
|
51
|
-
useEnhancedEffect(() => {
|
|
52
|
-
// This effect generate and store the Delaunay object that's used to map coordinate to closest point.
|
|
53
|
-
|
|
54
|
-
if (zoomIsInteracting || seriesOrder === undefined || series === undefined || disableVoronoi) {
|
|
55
|
-
// If there is no scatter chart series
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
voronoiRef.current = {};
|
|
59
|
-
let points = [];
|
|
60
|
-
seriesOrder.forEach(seriesId => {
|
|
61
|
-
const {
|
|
62
|
-
data,
|
|
63
|
-
xAxisId,
|
|
64
|
-
yAxisId
|
|
65
|
-
} = series[seriesId];
|
|
66
|
-
const xScale = xAxis[xAxisId ?? defaultXAxisId].scale;
|
|
67
|
-
const yScale = yAxis[yAxisId ?? defaultYAxisId].scale;
|
|
68
|
-
const getXPosition = getValueToPositionMapper(xScale);
|
|
69
|
-
const getYPosition = getValueToPositionMapper(yScale);
|
|
70
|
-
const seriesPoints = [];
|
|
71
|
-
const seriesIndexes = [];
|
|
72
|
-
for (let dataIndex = 0; dataIndex < data.length; dataIndex += 1) {
|
|
73
|
-
const {
|
|
74
|
-
x,
|
|
75
|
-
y
|
|
76
|
-
} = data[dataIndex];
|
|
77
|
-
const pointX = getXPosition(x);
|
|
78
|
-
const pointY = getYPosition(y);
|
|
79
|
-
if (instance.isPointInside(pointX, pointY)) {
|
|
80
|
-
seriesPoints.push(pointX);
|
|
81
|
-
seriesPoints.push(pointY);
|
|
82
|
-
seriesIndexes.push(dataIndex);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
voronoiRef.current[seriesId] = {
|
|
86
|
-
seriesId,
|
|
87
|
-
seriesIndexes,
|
|
88
|
-
startIndex: points.length,
|
|
89
|
-
endIndex: points.length + seriesPoints.length,
|
|
90
|
-
markerSize: series[seriesId].markerSize
|
|
91
|
-
};
|
|
92
|
-
points = points.concat(seriesPoints);
|
|
93
|
-
});
|
|
94
|
-
delauneyRef.current = new Delaunay(points);
|
|
95
|
-
lastFind.current = undefined;
|
|
96
|
-
}, [zoomIsInteracting, defaultXAxisId, defaultYAxisId, series, seriesOrder, xAxis, yAxis, drawingArea, instance, disableVoronoi]);
|
|
97
48
|
React.useEffect(() => {
|
|
98
49
|
if (svgRef.current === null || disableVoronoi) {
|
|
99
50
|
return undefined;
|
|
@@ -103,40 +54,48 @@ export const useChartClosestPoint = ({
|
|
|
103
54
|
// Get mouse coordinate in global SVG space
|
|
104
55
|
const svgPoint = getSVGPoint(element, event);
|
|
105
56
|
if (!instance.isPointInside(svgPoint.x, svgPoint.y)) {
|
|
106
|
-
lastFind.current = undefined;
|
|
107
57
|
return 'outside-chart';
|
|
108
58
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
59
|
+
let closestPoint = undefined;
|
|
60
|
+
for (const seriesId of seriesOrder ?? []) {
|
|
61
|
+
const aSeries = (series ?? {})[seriesId];
|
|
62
|
+
const flatbush = flatbushMap.get(seriesId);
|
|
63
|
+
if (!flatbush) {
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
const xAxisId = aSeries.xAxisId ?? defaultXAxisId;
|
|
67
|
+
const yAxisId = aSeries.yAxisId ?? defaultYAxisId;
|
|
68
|
+
const xAxisZoom = selectorChartAxisZoomData(store.getSnapshot(), xAxisId);
|
|
69
|
+
const yAxisZoom = selectorChartAxisZoomData(store.getSnapshot(), yAxisId);
|
|
70
|
+
const maxRadius = voronoiMaxRadius === 'item' ? aSeries.markerSize : voronoiMaxRadius;
|
|
71
|
+
const xZoomStart = (xAxisZoom?.start ?? 0) / 100;
|
|
72
|
+
const xZoomEnd = (xAxisZoom?.end ?? 100) / 100;
|
|
73
|
+
const yZoomStart = (yAxisZoom?.start ?? 0) / 100;
|
|
74
|
+
const yZoomEnd = (yAxisZoom?.end ?? 100) / 100;
|
|
75
|
+
const xScale = xAxis[xAxisId].scale;
|
|
76
|
+
const yScale = yAxis[yAxisId].scale;
|
|
77
|
+
const closestPointIndex = findClosestPoints(flatbush, drawingArea, aSeries.data, xScale, yScale, xZoomStart, xZoomEnd, yZoomStart, yZoomEnd, svgPoint.x, svgPoint.y, maxRadius)[0];
|
|
78
|
+
if (closestPointIndex === undefined) {
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
const point = aSeries.data[closestPointIndex];
|
|
82
|
+
const scaledX = xScale(point.x);
|
|
83
|
+
const scaledY = yScale(point.y);
|
|
84
|
+
const distSq = (scaledX - svgPoint.x) ** 2 + (scaledY - svgPoint.y) ** 2;
|
|
85
|
+
if (closestPoint === undefined || distSq < closestPoint.distanceSq) {
|
|
86
|
+
closestPoint = {
|
|
87
|
+
dataIndex: closestPointIndex,
|
|
88
|
+
seriesId,
|
|
89
|
+
distanceSq: distSq
|
|
90
|
+
};
|
|
91
|
+
}
|
|
115
92
|
}
|
|
116
|
-
|
|
117
|
-
const closestSeries = Object.values(voronoiRef.current).find(value => {
|
|
118
|
-
return 2 * closestPointIndex >= value.startIndex && 2 * closestPointIndex < value.endIndex;
|
|
119
|
-
});
|
|
120
|
-
if (closestSeries === undefined) {
|
|
93
|
+
if (closestPoint === undefined) {
|
|
121
94
|
return 'no-point-found';
|
|
122
95
|
}
|
|
123
|
-
|
|
124
|
-
// The point index in the series with id=closestSeries.seriesId.
|
|
125
|
-
const seriesPointIndex = (2 * closestPointIndex - voronoiRef.current[closestSeries.seriesId].startIndex) / 2;
|
|
126
|
-
const dataIndex = voronoiRef.current[closestSeries.seriesId].seriesIndexes[seriesPointIndex];
|
|
127
|
-
const maxRadius = voronoiMaxRadius === 'item' ? closestSeries.markerSize : voronoiMaxRadius;
|
|
128
|
-
if (maxRadius !== undefined) {
|
|
129
|
-
const pointX = delauneyRef.current.points[2 * closestPointIndex];
|
|
130
|
-
const pointY = delauneyRef.current.points[2 * closestPointIndex + 1];
|
|
131
|
-
const dist2 = (pointX - svgPoint.x) ** 2 + (pointY - svgPoint.y) ** 2;
|
|
132
|
-
if (dist2 > maxRadius ** 2) {
|
|
133
|
-
// The closest point is too far to be considered.
|
|
134
|
-
return 'outside-voronoi-max-radius';
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
96
|
return {
|
|
138
|
-
seriesId:
|
|
139
|
-
dataIndex
|
|
97
|
+
seriesId: closestPoint.seriesId,
|
|
98
|
+
dataIndex: closestPoint.dataIndex
|
|
140
99
|
};
|
|
141
100
|
}
|
|
142
101
|
|
|
@@ -211,7 +170,7 @@ export const useChartClosestPoint = ({
|
|
|
211
170
|
pressHandler.cleanup();
|
|
212
171
|
pressEndHandler.cleanup();
|
|
213
172
|
};
|
|
214
|
-
}, [svgRef, yAxis, xAxis, voronoiMaxRadius, onItemClick, disableVoronoi, drawingArea, instance]);
|
|
173
|
+
}, [svgRef, yAxis, xAxis, voronoiMaxRadius, onItemClick, disableVoronoi, drawingArea, instance, seriesOrder, series, flatbushMap, defaultXAxisId, defaultYAxisId, store]);
|
|
215
174
|
|
|
216
175
|
// Instance implementation
|
|
217
176
|
const enableVoronoiCallback = useEventCallback(() => {
|
|
@@ -23,9 +23,14 @@ export const useChartHighlight = ({
|
|
|
23
23
|
}, [store, params.highlightedItem]);
|
|
24
24
|
const clearHighlight = useEventCallback(() => {
|
|
25
25
|
params.onHighlightChange?.(null);
|
|
26
|
+
const prevItem = store.getSnapshot().highlight.item;
|
|
27
|
+
if (prevItem === null) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
26
30
|
store.update(prev => _extends({}, prev, {
|
|
27
31
|
highlight: {
|
|
28
|
-
item: null
|
|
32
|
+
item: null,
|
|
33
|
+
lastUpdate: 'pointer'
|
|
29
34
|
}
|
|
30
35
|
}));
|
|
31
36
|
});
|
|
@@ -37,7 +42,8 @@ export const useChartHighlight = ({
|
|
|
37
42
|
params.onHighlightChange?.(newItem);
|
|
38
43
|
store.update(prev => _extends({}, prev, {
|
|
39
44
|
highlight: {
|
|
40
|
-
item: newItem
|
|
45
|
+
item: newItem,
|
|
46
|
+
lastUpdate: 'pointer'
|
|
41
47
|
}
|
|
42
48
|
}));
|
|
43
49
|
});
|
|
@@ -55,7 +61,8 @@ useChartHighlight.getDefaultizedParams = ({
|
|
|
55
61
|
});
|
|
56
62
|
useChartHighlight.getInitialState = params => ({
|
|
57
63
|
highlight: {
|
|
58
|
-
item: params.highlightedItem
|
|
64
|
+
item: params.highlightedItem,
|
|
65
|
+
lastUpdate: 'pointer'
|
|
59
66
|
}
|
|
60
67
|
});
|
|
61
68
|
useChartHighlight.params = {
|
package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts
CHANGED
|
@@ -8,24 +8,24 @@ export declare const selectorChartsHighlightScopePerSeriesId: import("reselect")
|
|
|
8
8
|
}, Map<SeriesId, Partial<HighlightScope> | undefined>, any[]>;
|
|
9
9
|
export declare const selectorChartsHighlightedItem: 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 & import("./useChartHighlight.types.js").UseChartHighlightState & Partial<{}> & {
|
|
10
10
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
11
|
-
} & {
|
|
11
|
+
} & Partial<import("../useChartKeyboardNavigation/useChartKeyboardNavigation.types.js").UseChartKeyboardNavigationState> & {
|
|
12
12
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
13
13
|
}, HighlightItemData | null, any[]>;
|
|
14
14
|
export declare const selectorChartsHighlightScope: 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<{}> & {
|
|
15
15
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
16
16
|
} & {
|
|
17
17
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
18
|
-
} & import("./useChartHighlight.types.js").UseChartHighlightState
|
|
18
|
+
} & import("./useChartHighlight.types.js").UseChartHighlightState & Partial<import("../useChartKeyboardNavigation/useChartKeyboardNavigation.types.js").UseChartKeyboardNavigationState>, Partial<HighlightScope> | null, any[]>;
|
|
19
19
|
export declare const selectorChartsIsHighlightedCallback: 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<{}> & {
|
|
20
20
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
21
21
|
} & {
|
|
22
22
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
23
|
-
} & import("./useChartHighlight.types.js").UseChartHighlightState
|
|
23
|
+
} & import("./useChartHighlight.types.js").UseChartHighlightState & Partial<import("../useChartKeyboardNavigation/useChartKeyboardNavigation.types.js").UseChartKeyboardNavigationState>, (item: HighlightItemData | null) => boolean, any[]>;
|
|
24
24
|
export declare const selectorChartsIsFadedCallback: 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<{}> & {
|
|
25
25
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
26
26
|
} & {
|
|
27
27
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
28
|
-
} & import("./useChartHighlight.types.js").UseChartHighlightState
|
|
28
|
+
} & import("./useChartHighlight.types.js").UseChartHighlightState & Partial<import("../useChartKeyboardNavigation/useChartKeyboardNavigation.types.js").UseChartKeyboardNavigationState>, (item: HighlightItemData | null) => boolean, any[]>;
|
|
29
29
|
export declare const selectorChartsIsHighlighted: import("reselect").Selector<any, boolean, [item: HighlightItemData | null]>;
|
|
30
30
|
export declare const selectorChartIsSeriesHighlighted: import("reselect").Selector<any, boolean, [seriesId: SeriesId]>;
|
|
31
31
|
export declare const selectorChartIsSeriesFaded: import("reselect").Selector<any, boolean, [seriesId: SeriesId]>;
|
package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js
CHANGED
|
@@ -2,6 +2,7 @@ import { createSelector } from "../../utils/selectors.js";
|
|
|
2
2
|
import { createIsHighlighted } from "./createIsHighlighted.js";
|
|
3
3
|
import { createIsFaded } from "./createIsFaded.js";
|
|
4
4
|
import { getSeriesHighlightedItem, getSeriesUnfadedItem, isSeriesFaded, isSeriesHighlighted } from "./highlightStates.js";
|
|
5
|
+
import { selectorChartsKeyboardItem } from "../useChartKeyboardNavigation/index.js";
|
|
5
6
|
const selectHighlight = state => state.highlight;
|
|
6
7
|
const selectSeries = state => state.series;
|
|
7
8
|
export const selectorChartsHighlightScopePerSeriesId = createSelector([selectSeries], series => {
|
|
@@ -15,8 +16,8 @@ export const selectorChartsHighlightScopePerSeriesId = createSelector([selectSer
|
|
|
15
16
|
});
|
|
16
17
|
return map;
|
|
17
18
|
});
|
|
18
|
-
export const selectorChartsHighlightedItem = createSelector([selectHighlight], function selectorChartsHighlightedItem(highlight) {
|
|
19
|
-
return highlight.item;
|
|
19
|
+
export const selectorChartsHighlightedItem = createSelector([selectHighlight, selectorChartsKeyboardItem], function selectorChartsHighlightedItem(highlight, keyboardItem) {
|
|
20
|
+
return highlight.lastUpdate === 'pointer' ? highlight.item : keyboardItem;
|
|
20
21
|
});
|
|
21
22
|
export const selectorChartsHighlightScope = createSelector([selectorChartsHighlightScopePerSeriesId, selectorChartsHighlightedItem], function selectorChartsHighlightScope(seriesIdToHighlightScope, highlightedItem) {
|
|
22
23
|
if (!highlightedItem) {
|
|
@@ -28,6 +28,7 @@ export type HighlightItemData = {
|
|
|
28
28
|
*/
|
|
29
29
|
dataIndex?: number;
|
|
30
30
|
};
|
|
31
|
+
export type HighlightUpdateSource = 'pointer' | 'keyboard';
|
|
31
32
|
export interface UseChartHighlightInstance {
|
|
32
33
|
/**
|
|
33
34
|
* Remove all highlight.
|
|
@@ -59,6 +60,11 @@ export interface UseChartHighlightState {
|
|
|
59
60
|
* The item currently highlighted.
|
|
60
61
|
*/
|
|
61
62
|
item: HighlightItemData | null;
|
|
63
|
+
/**
|
|
64
|
+
* The last interaction highlight update.
|
|
65
|
+
* Used to decide if highlight should be based on pointer position or keyboard navigation.
|
|
66
|
+
*/
|
|
67
|
+
lastUpdate: HighlightUpdateSource;
|
|
62
68
|
};
|
|
63
69
|
}
|
|
64
70
|
export type UseChartHighlightSignature = ChartPluginSignature<{
|
|
@@ -132,7 +132,11 @@ export const useChartKeyboardNavigation = ({
|
|
|
132
132
|
}
|
|
133
133
|
if (newFocusedItem !== prevState.keyboardNavigation.item) {
|
|
134
134
|
event.preventDefault();
|
|
135
|
-
return _extends({}, prevState, prevState.
|
|
135
|
+
return _extends({}, prevState, prevState.highlight && {
|
|
136
|
+
highlight: _extends({}, prevState.highlight, {
|
|
137
|
+
lastUpdate: 'keyboard'
|
|
138
|
+
})
|
|
139
|
+
}, prevState.interaction && {
|
|
136
140
|
interaction: _extends({}, prevState.interaction, {
|
|
137
141
|
lastUpdate: 'keyboard'
|
|
138
142
|
})
|
|
@@ -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[]>;
|
|
@@ -30,4 +30,13 @@ const createSelectAxisHighlight = direction => (type, seriesId, dataIndex, axis,
|
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
export const selectorChartsKeyboardXAxisIndex = createSelector([selectorChartsFocusedSeriesType, selectorChartsFocusedSeriesId, selectorChartsFocusedDataIndex, selectorChartXAxis, selectorChartSeriesProcessed], createSelectAxisHighlight('x'));
|
|
33
|
-
export const selectorChartsKeyboardYAxisIndex = createSelector([selectorChartsFocusedSeriesType, selectorChartsFocusedSeriesId, selectorChartsFocusedDataIndex, selectorChartYAxis, selectorChartSeriesProcessed], createSelectAxisHighlight('y'));
|
|
33
|
+
export const selectorChartsKeyboardYAxisIndex = createSelector([selectorChartsFocusedSeriesType, selectorChartsFocusedSeriesId, selectorChartsFocusedDataIndex, selectorChartYAxis, selectorChartSeriesProcessed], createSelectAxisHighlight('y'));
|
|
34
|
+
export const selectorChartsKeyboardItem = createSelector([selectorChartsFocusedSeriesType, selectorChartsFocusedSeriesId, selectorChartsFocusedDataIndex], function selectorChartsKeyboardItem(seriesType, seriesId, dataIndex) {
|
|
35
|
+
if (seriesId === undefined) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
seriesId,
|
|
40
|
+
dataIndex: seriesType === 'line' ? undefined : dataIndex
|
|
41
|
+
};
|
|
42
|
+
});
|
|
@@ -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 {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { scaleBand, scalePoint } from '@mui/x-charts-vendor/d3-scale';
|
|
3
|
-
import { isBandScaleConfig, isPointScaleConfig } from "../../../../models/axis.js";
|
|
3
|
+
import { isBandScaleConfig, isPointScaleConfig, isContinuousScaleConfig } from "../../../../models/axis.js";
|
|
4
4
|
import { getColorScale, getOrdinalColorScale } from "../../../colorScale.js";
|
|
5
5
|
import { getDefaultTickNumber, getTickNumber, scaleTickNumberByRange } from "../../../ticks.js";
|
|
6
6
|
import { getScale } from "../../../getScale.js";
|
|
@@ -84,7 +84,7 @@ export function computeAxisValue({
|
|
|
84
84
|
completeAxis[axis.id].valueFormatter = axis.valueFormatter ?? dateFormatter;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
if (axis
|
|
87
|
+
if (!isContinuousScaleConfig(axis)) {
|
|
88
88
|
// Could be merged with the two previous "if conditions" but then TS does not get that `axis.scaleType` can't be `band` or `point`.
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
@@ -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>;
|
|
@@ -75,6 +75,11 @@ export function scaleSymlog(_domain, _range) {
|
|
|
75
75
|
return tickFormat(tick);
|
|
76
76
|
};
|
|
77
77
|
};
|
|
78
|
+
|
|
79
|
+
/* Adaptation of https://github.com/d3/d3-scale/blob/d6904a4bde09e16005e0ad8ca3e25b10ce54fa0d/src/symlog.js#L30 */
|
|
80
|
+
scale.copy = () => {
|
|
81
|
+
return scaleSymlog(scale.domain(), scale.range()).constant(scale.constant());
|
|
82
|
+
};
|
|
78
83
|
return scale;
|
|
79
84
|
}
|
|
80
85
|
function generateScales(scale) {
|
package/esm/locales/enUS.js
CHANGED
|
@@ -4,17 +4,17 @@ import { getChartsLocalization } from "./utils/getChartsLocalization.js";
|
|
|
4
4
|
// This object is not Partial<ChartsLocaleText> because it is the default values
|
|
5
5
|
|
|
6
6
|
export const enUSLocaleText = {
|
|
7
|
-
|
|
7
|
+
// Overlay
|
|
8
8
|
loading: 'Loading data…',
|
|
9
9
|
noData: 'No data to display',
|
|
10
|
-
|
|
10
|
+
// Toolbar
|
|
11
11
|
zoomIn: 'Zoom in',
|
|
12
12
|
zoomOut: 'Zoom out',
|
|
13
13
|
toolbarExport: 'Export',
|
|
14
|
-
|
|
14
|
+
// Toolbar Export Menu
|
|
15
15
|
toolbarExportPrint: 'Print',
|
|
16
16
|
toolbarExportImage: mimeType => `Export as ${imageMimeTypes[mimeType] ?? mimeType}`,
|
|
17
|
-
|
|
17
|
+
// Charts renderer configuration
|
|
18
18
|
chartTypeBar: 'Bar',
|
|
19
19
|
chartTypeColumn: 'Column',
|
|
20
20
|
chartTypeLine: 'Line',
|
package/esm/locales/ptBR.js
CHANGED
|
@@ -10,106 +10,104 @@ export const ptBRLocaleText = {
|
|
|
10
10
|
toolbarExport: 'Exportar',
|
|
11
11
|
// Toolbar Export Menu
|
|
12
12
|
toolbarExportPrint: 'Imprimir',
|
|
13
|
-
toolbarExportImage: mimeType => `Exportar como ${imageMimeTypes[mimeType] ?? mimeType}
|
|
14
|
-
|
|
13
|
+
toolbarExportImage: mimeType => `Exportar como ${imageMimeTypes[mimeType] ?? mimeType}`,
|
|
15
14
|
// Charts renderer configuration
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
15
|
+
chartTypeBar: 'Barra',
|
|
16
|
+
chartTypeColumn: 'Coluna',
|
|
17
|
+
chartTypeLine: 'Linha',
|
|
18
|
+
chartTypeArea: 'Área',
|
|
19
|
+
chartTypePie: 'Pizza',
|
|
20
|
+
chartPaletteLabel: 'Paleta de cores',
|
|
21
|
+
chartPaletteNameRainbowSurge: 'Onda de Arco-íris',
|
|
22
|
+
chartPaletteNameBlueberryTwilight: 'Crepúsculo de Blueberry',
|
|
23
|
+
chartPaletteNameMangoFusion: 'Fusão de Manga',
|
|
24
|
+
chartPaletteNameCheerfulFiesta: 'Festa Alegre',
|
|
25
|
+
chartPaletteNameStrawberrySky: 'Céu de Morango',
|
|
26
|
+
chartPaletteNameBlue: 'Azul',
|
|
27
|
+
chartPaletteNameGreen: 'Verde',
|
|
28
|
+
chartPaletteNamePurple: 'Roxo',
|
|
29
|
+
chartPaletteNameRed: 'Vermelho',
|
|
30
|
+
chartPaletteNameOrange: 'Laranja',
|
|
31
|
+
chartPaletteNameYellow: 'Amarelo',
|
|
32
|
+
chartPaletteNameCyan: 'Ciano',
|
|
33
|
+
chartPaletteNamePink: 'Rosa',
|
|
34
|
+
chartConfigurationSectionChart: 'Gráfico',
|
|
35
|
+
chartConfigurationSectionColumns: 'Colunas',
|
|
36
|
+
chartConfigurationSectionBars: 'Barras',
|
|
37
|
+
chartConfigurationSectionAxes: 'Eixos',
|
|
38
|
+
chartConfigurationGrid: 'Grade',
|
|
39
|
+
chartConfigurationBorderRadius: 'Arredondamento da borda',
|
|
40
|
+
chartConfigurationCategoryGapRatio: 'Proporção de espaço entre categorias',
|
|
41
|
+
chartConfigurationBarGapRatio: 'Proporção de espaço entre séries',
|
|
42
|
+
chartConfigurationStacked: 'Empilhado',
|
|
43
|
+
chartConfigurationShowToolbar: 'Mostrar barra de ferramentas',
|
|
44
|
+
chartConfigurationSkipAnimation: 'Ignorar animação',
|
|
45
|
+
chartConfigurationInnerRadius: 'Raio interno',
|
|
46
|
+
chartConfigurationOuterRadius: 'Raio externo',
|
|
47
|
+
chartConfigurationColors: 'Cores',
|
|
48
|
+
chartConfigurationHideLegend: 'Ocultar legenda',
|
|
49
|
+
chartConfigurationShowMark: 'Mostrar marcação',
|
|
50
|
+
chartConfigurationHeight: 'Altura',
|
|
51
|
+
chartConfigurationWidth: 'Largura',
|
|
52
|
+
chartConfigurationSeriesGap: 'Espaçamento entre séries',
|
|
53
|
+
chartConfigurationTickPlacement: 'Posição da marcação',
|
|
54
|
+
chartConfigurationTickLabelPlacement: 'Posição do título da marcação',
|
|
55
|
+
chartConfigurationCategoriesAxisLabel: 'Título do eixo de categorias',
|
|
56
|
+
chartConfigurationSeriesAxisLabel: 'Título do eixo de séries',
|
|
57
|
+
chartConfigurationXAxisPosition: 'Posição do eixo X',
|
|
58
|
+
chartConfigurationYAxisPosition: 'Posição do eixo Y',
|
|
59
|
+
chartConfigurationSeriesAxisReverse: 'Inverter eixo de séries',
|
|
60
|
+
chartConfigurationTooltipPlacement: 'Posição',
|
|
61
|
+
chartConfigurationTooltipTrigger: 'Gatilho',
|
|
62
|
+
chartConfigurationLegendPosition: 'Posição',
|
|
63
|
+
chartConfigurationLegendDirection: 'Direção',
|
|
64
|
+
chartConfigurationBarLabels: 'Títulos das barras',
|
|
65
|
+
chartConfigurationColumnLabels: 'Títulos das colunas',
|
|
66
|
+
chartConfigurationInterpolation: 'Interpolação',
|
|
67
|
+
chartConfigurationSectionTooltip: 'Tooltip',
|
|
68
|
+
chartConfigurationSectionLegend: 'Legenda',
|
|
69
|
+
chartConfigurationSectionLines: 'Linhas',
|
|
70
|
+
chartConfigurationSectionAreas: 'Áreas',
|
|
71
|
+
chartConfigurationSectionArcs: 'Arcos',
|
|
72
|
+
chartConfigurationPaddingAngle: 'Ângulo de preenchimento',
|
|
73
|
+
chartConfigurationCornerRadius: 'Raio do canto',
|
|
74
|
+
chartConfigurationArcLabels: 'Títulos dos arcos',
|
|
75
|
+
chartConfigurationStartAngle: 'Ângulo inicial',
|
|
76
|
+
chartConfigurationEndAngle: 'Ângulo final',
|
|
77
|
+
chartConfigurationPieTooltipTrigger: 'Gatilho',
|
|
78
|
+
chartConfigurationPieLegendPosition: 'Posição',
|
|
79
|
+
chartConfigurationPieLegendDirection: 'Direção',
|
|
82
80
|
// Common option labels
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
|
|
81
|
+
chartConfigurationOptionNone: 'Nenhum',
|
|
82
|
+
chartConfigurationOptionValue: 'Valor',
|
|
83
|
+
chartConfigurationOptionAuto: 'Automático',
|
|
84
|
+
chartConfigurationOptionTop: 'Topo',
|
|
85
|
+
chartConfigurationOptionTopLeft: 'Topo Esquerdo',
|
|
86
|
+
chartConfigurationOptionTopRight: 'Topo Direito',
|
|
87
|
+
chartConfigurationOptionBottom: 'Inferior',
|
|
88
|
+
chartConfigurationOptionBottomLeft: 'Inferior Esquerdo',
|
|
89
|
+
chartConfigurationOptionBottomRight: 'Inferior Direito',
|
|
90
|
+
chartConfigurationOptionLeft: 'Esquerda',
|
|
91
|
+
chartConfigurationOptionRight: 'Direita',
|
|
92
|
+
chartConfigurationOptionAxis: 'Eixo',
|
|
93
|
+
chartConfigurationOptionItem: 'Item',
|
|
94
|
+
chartConfigurationOptionHorizontal: 'Horizontal',
|
|
95
|
+
chartConfigurationOptionVertical: 'Vertical',
|
|
96
|
+
chartConfigurationOptionBoth: 'Ambos',
|
|
97
|
+
chartConfigurationOptionStart: 'Início',
|
|
98
|
+
chartConfigurationOptionMiddle: 'Meio',
|
|
99
|
+
chartConfigurationOptionEnd: 'Fim',
|
|
100
|
+
chartConfigurationOptionExtremities: 'Extremidades',
|
|
101
|
+
chartConfigurationOptionTick: 'Marcação',
|
|
102
|
+
chartConfigurationOptionMonotoneX: 'Monótono X',
|
|
103
|
+
chartConfigurationOptionMonotoneY: 'Monótono Y',
|
|
104
|
+
chartConfigurationOptionCatmullRom: 'Catmull-Rom',
|
|
105
|
+
chartConfigurationOptionLinear: 'Linear',
|
|
106
|
+
chartConfigurationOptionNatural: 'Natural',
|
|
107
|
+
chartConfigurationOptionStep: 'Passo',
|
|
108
|
+
chartConfigurationOptionStepBefore: 'Passo Anterior',
|
|
109
|
+
chartConfigurationOptionStepAfter: 'Passo Posterior',
|
|
110
|
+
chartConfigurationOptionBumpX: 'Colisão X',
|
|
111
|
+
chartConfigurationOptionBumpY: 'Colisão Y'
|
|
114
112
|
};
|
|
115
113
|
export const ptBR = getChartsLocalization(ptBRLocaleText);
|