@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.
Files changed (134) hide show
  1. package/BarChart/BarChart.js +44 -36
  2. package/BarChart/useBarPlotData.js +20 -33
  3. package/CHANGELOG.md +204 -1
  4. package/ChartContainer/ChartContainer.js +68 -56
  5. package/ChartsTooltip/ChartsTooltipContainer.js +2 -0
  6. package/ChartsXAxis/useAxisTicksProps.d.ts +197 -355
  7. package/ChartsYAxis/useAxisTicksProps.d.ts +197 -355
  8. package/Gauge/Gauge.js +2 -9
  9. package/Gauge/GaugeReferenceArc.d.ts +4 -1
  10. package/Gauge/GaugeReferenceArc.js +12 -3
  11. package/Gauge/GaugeValueArc.d.ts +4 -1
  12. package/Gauge/GaugeValueArc.js +16 -8
  13. package/Gauge/GaugeValueText.js +3 -1
  14. package/LineChart/LineChart.js +44 -36
  15. package/PieChart/PieArc.d.ts +18 -4
  16. package/PieChart/PieArc.js +11 -5
  17. package/PieChart/PieArcPlot.js +3 -1
  18. package/ScatterChart/ScatterChart.js +44 -36
  19. package/ScatterChart/seriesConfig/seriesProcessor.js +1 -1
  20. package/SparkLineChart/SparkLineChart.js +44 -36
  21. package/esm/BarChart/BarChart.js +44 -36
  22. package/esm/BarChart/useBarPlotData.js +20 -33
  23. package/esm/ChartContainer/ChartContainer.js +68 -56
  24. package/esm/ChartsTooltip/ChartsTooltipContainer.js +2 -0
  25. package/esm/ChartsXAxis/useAxisTicksProps.d.ts +197 -355
  26. package/esm/ChartsYAxis/useAxisTicksProps.d.ts +197 -355
  27. package/esm/Gauge/Gauge.js +2 -9
  28. package/esm/Gauge/GaugeReferenceArc.d.ts +4 -1
  29. package/esm/Gauge/GaugeReferenceArc.js +11 -2
  30. package/esm/Gauge/GaugeValueArc.d.ts +4 -1
  31. package/esm/Gauge/GaugeValueArc.js +16 -8
  32. package/esm/Gauge/GaugeValueText.js +3 -1
  33. package/esm/LineChart/LineChart.js +44 -36
  34. package/esm/PieChart/PieArc.d.ts +18 -4
  35. package/esm/PieChart/PieArc.js +11 -5
  36. package/esm/PieChart/PieArcPlot.js +3 -1
  37. package/esm/ScatterChart/ScatterChart.js +44 -36
  38. package/esm/ScatterChart/seriesConfig/seriesProcessor.js +1 -1
  39. package/esm/SparkLineChart/SparkLineChart.js +44 -36
  40. package/esm/hooks/animation/useAnimate.js +5 -3
  41. package/esm/hooks/useScale.d.ts +5 -1
  42. package/esm/index.js +1 -1
  43. package/esm/internals/Flatbush.bench.d.ts +1 -0
  44. package/esm/internals/Flatbush.bench.js +42 -0
  45. package/esm/internals/Flatbush.d.ts +63 -0
  46. package/esm/internals/Flatbush.js +468 -0
  47. package/esm/internals/animation/useAnimateInternal.d.ts +1 -1
  48. package/esm/internals/animation/useAnimateInternal.js +1 -1
  49. package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +8 -8
  50. package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +4 -2
  51. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +9 -11
  52. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -28
  53. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +4 -5
  54. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +3 -24
  55. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +20 -0
  56. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +77 -0
  57. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +4 -65
  58. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +7 -104
  59. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +6 -2
  60. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +3 -6
  61. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -3
  62. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +31 -39
  63. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +185 -6
  64. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +199 -47
  65. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +4 -1
  66. package/esm/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +5 -0
  67. package/esm/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +33 -0
  68. package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +40 -81
  69. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +10 -3
  70. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +4 -4
  71. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +3 -2
  72. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.types.d.ts +6 -0
  73. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +5 -1
  74. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +9 -1
  75. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +10 -1
  76. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +2 -1
  77. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +2 -2
  78. package/esm/internals/scaleGuards.d.ts +12 -6
  79. package/esm/internals/symlogScale.js +5 -0
  80. package/esm/locales/enUS.js +4 -4
  81. package/esm/locales/ptBR.js +97 -99
  82. package/esm/models/axis.d.ts +39 -17
  83. package/esm/models/axis.js +3 -0
  84. package/esm/models/seriesType/scatter.d.ts +2 -0
  85. package/esm/themeAugmentation/components.d.ts +3 -0
  86. package/esm/themeAugmentation/overrides.d.ts +2 -0
  87. package/hooks/animation/useAnimate.js +4 -3
  88. package/hooks/useScale.d.ts +5 -1
  89. package/index.js +1 -1
  90. package/internals/Flatbush.bench.d.ts +1 -0
  91. package/internals/Flatbush.bench.js +44 -0
  92. package/internals/Flatbush.d.ts +63 -0
  93. package/internals/Flatbush.js +477 -0
  94. package/internals/animation/useAnimateInternal.d.ts +1 -1
  95. package/internals/animation/useAnimateInternal.js +1 -1
  96. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +7 -7
  97. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +4 -2
  98. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +9 -11
  99. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -28
  100. package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +4 -5
  101. package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +3 -25
  102. package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +20 -0
  103. package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +84 -0
  104. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +4 -65
  105. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +8 -108
  106. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +6 -2
  107. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +3 -6
  108. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -3
  109. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +29 -37
  110. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +185 -6
  111. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +200 -47
  112. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +4 -1
  113. package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +5 -0
  114. package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +39 -0
  115. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +39 -80
  116. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +10 -3
  117. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +4 -4
  118. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +3 -2
  119. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.types.d.ts +6 -0
  120. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +5 -1
  121. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +9 -1
  122. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +11 -2
  123. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +2 -1
  124. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +1 -1
  125. package/internals/scaleGuards.d.ts +12 -6
  126. package/internals/symlogScale.js +5 -0
  127. package/locales/enUS.js +4 -4
  128. package/locales/ptBR.js +97 -99
  129. package/models/axis.d.ts +39 -17
  130. package/models/axis.js +4 -0
  131. package/models/seriesType/scatter.d.ts +2 -0
  132. package/package.json +7 -6
  133. package/themeAugmentation/components.d.ts +3 -0
  134. 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 voronoiRef = React.useRef({});
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
- if (!delauneyRef.current) {
110
- return 'no-point-found';
111
- }
112
- const closestPointIndex = delauneyRef.current.find(svgPoint.x, svgPoint.y, lastFind.current);
113
- if (closestPointIndex === undefined) {
114
- return 'no-point-found';
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
- lastFind.current = closestPointIndex;
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: closestSeries.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 = {
@@ -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, Partial<HighlightScope> | null, any[]>;
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, (item: HighlightItemData | null) => boolean, any[]>;
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, (item: HighlightItemData | null) => boolean, any[]>;
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]>;
@@ -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.interaction && {
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.scaleType === 'band' || axis.scaleType === 'point') {
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<T extends {
3
+ export declare function isOrdinalScale<Domain extends {
4
4
  toString(): string;
5
- }>(scale: D3Scale<T>): scale is D3OrdinalScale<T>;
6
- export declare function isBandScale<T extends {
5
+ } = {
7
6
  toString(): string;
8
- }>(scale: D3Scale<T>): scale is ScaleBand<T>;
9
- export declare function isPointScale<T extends {
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
- }>(scale: D3Scale<T>): scale is D3OrdinalScale<T>;
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) {
@@ -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
- /* Overlay */
7
+ // Overlay
8
8
  loading: 'Loading data…',
9
9
  noData: 'No data to display',
10
- /* Toolbar */
10
+ // Toolbar
11
11
  zoomIn: 'Zoom in',
12
12
  zoomOut: 'Zoom out',
13
13
  toolbarExport: 'Export',
14
- /* Toolbar Export Menu */
14
+ // Toolbar Export Menu
15
15
  toolbarExportPrint: 'Print',
16
16
  toolbarExportImage: mimeType => `Export as ${imageMimeTypes[mimeType] ?? mimeType}`,
17
- /* Charts renderer configuration */
17
+ // Charts renderer configuration
18
18
  chartTypeBar: 'Bar',
19
19
  chartTypeColumn: 'Column',
20
20
  chartTypeLine: 'Line',
@@ -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
- // chartTypeBar: 'Bar',
17
- // chartTypeColumn: 'Column',
18
- // chartTypeLine: 'Line',
19
- // chartTypeArea: 'Area',
20
- // chartTypePie: 'Pie',
21
- // chartPaletteLabel: 'Color palette',
22
- // chartPaletteNameRainbowSurge: 'Rainbow Surge',
23
- // chartPaletteNameBlueberryTwilight: 'Blueberry Twilight',
24
- // chartPaletteNameMangoFusion: 'Mango Fusion',
25
- // chartPaletteNameCheerfulFiesta: 'Cheerful Fiesta',
26
- // chartPaletteNameStrawberrySky: 'Strawberry Sky',
27
- // chartPaletteNameBlue: 'Blue',
28
- // chartPaletteNameGreen: 'Green',
29
- // chartPaletteNamePurple: 'Purple',
30
- // chartPaletteNameRed: 'Red',
31
- // chartPaletteNameOrange: 'Orange',
32
- // chartPaletteNameYellow: 'Yellow',
33
- // chartPaletteNameCyan: 'Cyan',
34
- // chartPaletteNamePink: 'Pink',
35
- // chartConfigurationSectionChart: 'Chart',
36
- // chartConfigurationSectionColumns: 'Columns',
37
- // chartConfigurationSectionBars: 'Bars',
38
- // chartConfigurationSectionAxes: 'Axes',
39
- // chartConfigurationGrid: 'Grid',
40
- // chartConfigurationBorderRadius: 'Border radius',
41
- // chartConfigurationCategoryGapRatio: 'Category gap ratio',
42
- // chartConfigurationBarGapRatio: 'Series gap ratio',
43
- // chartConfigurationStacked: 'Stacked',
44
- // chartConfigurationShowToolbar: 'Show toolbar',
45
- // chartConfigurationSkipAnimation: 'Skip animation',
46
- // chartConfigurationInnerRadius: 'Inner radius',
47
- // chartConfigurationOuterRadius: 'Outer radius',
48
- // chartConfigurationColors: 'Colors',
49
- // chartConfigurationHideLegend: 'Hide legend',
50
- // chartConfigurationShowMark: 'Show mark',
51
- // chartConfigurationHeight: 'Height',
52
- // chartConfigurationWidth: 'Width',
53
- // chartConfigurationSeriesGap: 'Series gap',
54
- // chartConfigurationTickPlacement: 'Tick placement',
55
- // chartConfigurationTickLabelPlacement: 'Tick label placement',
56
- // chartConfigurationCategoriesAxisLabel: 'Categories axis label',
57
- // chartConfigurationSeriesAxisLabel: 'Series axis label',
58
- // chartConfigurationXAxisPosition: 'X-axis position',
59
- // chartConfigurationYAxisPosition: 'Y-axis position',
60
- // chartConfigurationSeriesAxisReverse: 'Reverse series axis',
61
- // chartConfigurationTooltipPlacement: 'Placement',
62
- // chartConfigurationTooltipTrigger: 'Trigger',
63
- // chartConfigurationLegendPosition: 'Position',
64
- // chartConfigurationLegendDirection: 'Direction',
65
- // chartConfigurationBarLabels: 'Bar labels',
66
- // chartConfigurationColumnLabels: 'Column labels',
67
- // chartConfigurationInterpolation: 'Interpolation',
68
- // chartConfigurationSectionTooltip: 'Tooltip',
69
- // chartConfigurationSectionLegend: 'Legend',
70
- // chartConfigurationSectionLines: 'Lines',
71
- // chartConfigurationSectionAreas: 'Areas',
72
- // chartConfigurationSectionArcs: 'Arcs',
73
- // chartConfigurationPaddingAngle: 'Padding angle',
74
- // chartConfigurationCornerRadius: 'Corner radius',
75
- // chartConfigurationArcLabels: 'Arc labels',
76
- // chartConfigurationStartAngle: 'Start angle',
77
- // chartConfigurationEndAngle: 'End angle',
78
- // chartConfigurationPieTooltipTrigger: 'Trigger',
79
- // chartConfigurationPieLegendPosition: 'Position',
80
- // chartConfigurationPieLegendDirection: 'Direction',
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
- // chartConfigurationOptionNone: 'None',
84
- // chartConfigurationOptionValue: 'Value',
85
- // chartConfigurationOptionAuto: 'Auto',
86
- // chartConfigurationOptionTop: 'Top',
87
- // chartConfigurationOptionTopLeft: 'Top Left',
88
- // chartConfigurationOptionTopRight: 'Top Right',
89
- // chartConfigurationOptionBottom: 'Bottom',
90
- // chartConfigurationOptionBottomLeft: 'Bottom Left',
91
- // chartConfigurationOptionBottomRight: 'Bottom Right',
92
- // chartConfigurationOptionLeft: 'Left',
93
- // chartConfigurationOptionRight: 'Right',
94
- // chartConfigurationOptionAxis: 'Axis',
95
- // chartConfigurationOptionItem: 'Item',
96
- // chartConfigurationOptionHorizontal: 'Horizontal',
97
- // chartConfigurationOptionVertical: 'Vertical',
98
- // chartConfigurationOptionBoth: 'Both',
99
- // chartConfigurationOptionStart: 'Start',
100
- // chartConfigurationOptionMiddle: 'Middle',
101
- // chartConfigurationOptionEnd: 'End',
102
- // chartConfigurationOptionExtremities: 'Extremities',
103
- // chartConfigurationOptionTick: 'Tick',
104
- // chartConfigurationOptionMonotoneX: 'Monotone X',
105
- // chartConfigurationOptionMonotoneY: 'Monotone Y',
106
- // chartConfigurationOptionCatmullRom: 'Catmull-Rom',
107
- // chartConfigurationOptionLinear: 'Linear',
108
- // chartConfigurationOptionNatural: 'Natural',
109
- // chartConfigurationOptionStep: 'Step',
110
- // chartConfigurationOptionStepBefore: 'Step Before',
111
- // chartConfigurationOptionStepAfter: 'Step After',
112
- // chartConfigurationOptionBumpX: 'Bump X',
113
- // chartConfigurationOptionBumpY: 'Bump Y',
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);