@mui/x-charts 7.0.0-beta.3 → 7.0.0-beta.4
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 +0 -2
- package/CHANGELOG.md +226 -15
- package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
- package/ChartsTooltip/utils.js +1 -1
- package/ChartsVoronoiHandler/ChartsVoronoiHandler.d.ts +0 -1
- package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +1 -2
- package/ChartsXAxis/ChartsXAxis.js +1 -1
- package/ChartsYAxis/ChartsYAxis.js +1 -1
- package/Gauge/Gauge.js +0 -2
- package/Gauge/GaugeContainer.d.ts +0 -2
- package/Gauge/GaugeContainer.js +0 -2
- package/Gauge/GaugeProvider.js +3 -0
- package/Gauge/GaugeValueText.js +1 -1
- package/LineChart/LineChart.js +0 -2
- package/PieChart/PieChart.js +0 -2
- package/ResponsiveChartContainer/ResponsiveChartContainer.d.ts +0 -2
- package/ResponsiveChartContainer/ResponsiveChartContainer.js +0 -2
- package/ScatterChart/ScatterChart.js +0 -3
- package/SparkLineChart/SparkLineChart.js +0 -2
- package/context/CartesianContextProvider.d.ts +0 -8
- package/context/CartesianContextProvider.js +4 -89
- package/context/DrawingProvider.d.ts +2 -11
- package/context/DrawingProvider.js +10 -35
- package/context/HighlightProvider.js +3 -0
- package/context/InteractionProvider.js +3 -0
- package/context/SeriesContextProvider.js +3 -0
- package/context/index.d.ts +0 -2
- package/context/index.js +1 -15
- package/esm/BarChart/BarChart.js +0 -2
- package/esm/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +2 -2
- package/esm/ChartsTooltip/utils.js +2 -2
- package/esm/ChartsVoronoiHandler/ChartsVoronoiHandler.js +2 -3
- package/esm/ChartsXAxis/ChartsXAxis.js +1 -1
- package/esm/ChartsYAxis/ChartsYAxis.js +1 -1
- package/esm/Gauge/Gauge.js +0 -2
- package/esm/Gauge/GaugeContainer.js +0 -2
- package/esm/Gauge/GaugeProvider.js +3 -0
- package/esm/Gauge/GaugeValueText.js +1 -1
- package/esm/LineChart/LineChart.js +0 -2
- package/esm/PieChart/PieChart.js +0 -2
- package/esm/ResponsiveChartContainer/ResponsiveChartContainer.js +0 -2
- package/esm/ScatterChart/ScatterChart.js +0 -3
- package/esm/SparkLineChart/SparkLineChart.js +0 -2
- package/esm/context/CartesianContextProvider.js +3 -88
- package/esm/context/DrawingProvider.js +10 -36
- package/esm/context/HighlightProvider.js +3 -0
- package/esm/context/InteractionProvider.js +3 -0
- package/esm/context/SeriesContextProvider.js +3 -0
- package/esm/context/index.js +1 -2
- package/esm/hooks/useAxisEvents.js +2 -2
- package/hooks/useAxisEvents.js +1 -1
- package/hooks/useTicks.d.ts +1 -1
- package/index.js +1 -1
- package/modern/BarChart/BarChart.js +0 -2
- package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +2 -2
- package/modern/ChartsTooltip/utils.js +2 -2
- package/modern/ChartsVoronoiHandler/ChartsVoronoiHandler.js +2 -3
- package/modern/ChartsXAxis/ChartsXAxis.js +1 -1
- package/modern/ChartsYAxis/ChartsYAxis.js +1 -1
- package/modern/Gauge/Gauge.js +0 -2
- package/modern/Gauge/GaugeContainer.js +0 -2
- package/modern/Gauge/GaugeProvider.js +3 -0
- package/modern/Gauge/GaugeValueText.js +1 -1
- package/modern/LineChart/LineChart.js +0 -2
- package/modern/PieChart/PieChart.js +0 -2
- package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +0 -2
- package/modern/ScatterChart/ScatterChart.js +0 -3
- package/modern/SparkLineChart/SparkLineChart.js +0 -2
- package/modern/context/CartesianContextProvider.js +3 -88
- package/modern/context/DrawingProvider.js +10 -36
- package/modern/context/HighlightProvider.js +3 -0
- package/modern/context/InteractionProvider.js +3 -0
- package/modern/context/SeriesContextProvider.js +3 -0
- package/modern/context/index.js +1 -2
- package/modern/hooks/useAxisEvents.js +2 -2
- package/modern/index.js +1 -1
- package/package.json +1 -1
- package/legacy/BarChart/BarChart.js +0 -440
- package/legacy/BarChart/BarElement.js +0 -119
- package/legacy/BarChart/BarPlot.js +0 -232
- package/legacy/BarChart/extremums.js +0 -45
- package/legacy/BarChart/formatter.js +0 -78
- package/legacy/BarChart/index.js +0 -3
- package/legacy/BarChart/legend.js +0 -15
- package/legacy/ChartContainer/ChartContainer.js +0 -189
- package/legacy/ChartContainer/index.js +0 -1
- package/legacy/ChartsAxis/ChartsAxis.js +0 -215
- package/legacy/ChartsAxis/axisClasses.js +0 -5
- package/legacy/ChartsAxis/index.js +0 -2
- package/legacy/ChartsAxisHighlight/ChartsAxisHighlight.js +0 -105
- package/legacy/ChartsAxisHighlight/index.js +0 -1
- package/legacy/ChartsClipPath/ChartsClipPath.js +0 -48
- package/legacy/ChartsClipPath/index.js +0 -1
- package/legacy/ChartsGrid/ChartsGrid.js +0 -119
- package/legacy/ChartsGrid/chartsGridClasses.js +0 -6
- package/legacy/ChartsGrid/index.js +0 -2
- package/legacy/ChartsLegend/ChartsLegend.js +0 -100
- package/legacy/ChartsLegend/DefaultChartsLegend.js +0 -302
- package/legacy/ChartsLegend/chartsLegendClasses.js +0 -5
- package/legacy/ChartsLegend/index.js +0 -4
- package/legacy/ChartsLegend/utils.js +0 -15
- package/legacy/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +0 -75
- package/legacy/ChartsOnAxisClickHandler/index.js +0 -1
- package/legacy/ChartsReferenceLine/ChartsReferenceLine.js +0 -72
- package/legacy/ChartsReferenceLine/ChartsXReferenceLine.js +0 -105
- package/legacy/ChartsReferenceLine/ChartsYReferenceLine.js +0 -105
- package/legacy/ChartsReferenceLine/chartsReferenceLineClasses.js +0 -6
- package/legacy/ChartsReferenceLine/common.js +0 -19
- package/legacy/ChartsReferenceLine/index.js +0 -2
- package/legacy/ChartsSurface.js +0 -78
- package/legacy/ChartsText/ChartsText.js +0 -95
- package/legacy/ChartsText/index.js +0 -1
- package/legacy/ChartsTooltip/ChartsAxisTooltipContent.js +0 -96
- package/legacy/ChartsTooltip/ChartsItemTooltipContent.js +0 -53
- package/legacy/ChartsTooltip/ChartsTooltip.js +0 -148
- package/legacy/ChartsTooltip/ChartsTooltipTable.js +0 -80
- package/legacy/ChartsTooltip/DefaultChartsAxisTooltipContent.js +0 -118
- package/legacy/ChartsTooltip/DefaultChartsItemTooltipContent.js +0 -78
- package/legacy/ChartsTooltip/chartsTooltipClasses.js +0 -5
- package/legacy/ChartsTooltip/index.js +0 -6
- package/legacy/ChartsTooltip/utils.js +0 -103
- package/legacy/ChartsVoronoiHandler/ChartsVoronoiHandler.js +0 -206
- package/legacy/ChartsVoronoiHandler/index.js +0 -1
- package/legacy/ChartsXAxis/ChartsXAxis.js +0 -339
- package/legacy/ChartsXAxis/index.js +0 -1
- package/legacy/ChartsYAxis/ChartsYAxis.js +0 -267
- package/legacy/ChartsYAxis/index.js +0 -1
- package/legacy/Gauge/Gauge.js +0 -146
- package/legacy/Gauge/GaugeContainer.js +0 -215
- package/legacy/Gauge/GaugeProvider.js +0 -87
- package/legacy/Gauge/GaugeReferenceArc.js +0 -37
- package/legacy/Gauge/GaugeValueArc.js +0 -44
- package/legacy/Gauge/GaugeValueText.js +0 -66
- package/legacy/Gauge/gaugeClasses.js +0 -7
- package/legacy/Gauge/index.js +0 -7
- package/legacy/Gauge/utils.js +0 -84
- package/legacy/LineChart/AnimatedArea.js +0 -102
- package/legacy/LineChart/AnimatedLine.js +0 -104
- package/legacy/LineChart/AreaElement.js +0 -112
- package/legacy/LineChart/AreaPlot.js +0 -149
- package/legacy/LineChart/LineChart.js +0 -452
- package/legacy/LineChart/LineElement.js +0 -112
- package/legacy/LineChart/LineHighlightElement.js +0 -79
- package/legacy/LineChart/LineHighlightPlot.js +0 -97
- package/legacy/LineChart/LinePlot.js +0 -144
- package/legacy/LineChart/MarkElement.js +0 -153
- package/legacy/LineChart/MarkPlot.js +0 -178
- package/legacy/LineChart/extremums.js +0 -54
- package/legacy/LineChart/formatter.js +0 -82
- package/legacy/LineChart/index.js +0 -11
- package/legacy/LineChart/legend.js +0 -15
- package/legacy/PieChart/PieArc.js +0 -103
- package/legacy/PieChart/PieArcLabel.js +0 -112
- package/legacy/PieChart/PieArcLabelPlot.js +0 -193
- package/legacy/PieChart/PieArcPlot.js +0 -180
- package/legacy/PieChart/PieChart.js +0 -404
- package/legacy/PieChart/PiePlot.js +0 -137
- package/legacy/PieChart/dataTransform/transition.js +0 -149
- package/legacy/PieChart/dataTransform/useTransformData.js +0 -63
- package/legacy/PieChart/formatter.js +0 -55
- package/legacy/PieChart/index.js +0 -6
- package/legacy/PieChart/legend.js +0 -16
- package/legacy/ResponsiveChartContainer/ResponsiveChartContainer.js +0 -185
- package/legacy/ResponsiveChartContainer/index.js +0 -1
- package/legacy/ResponsiveChartContainer/useChartContainerDimensions.js +0 -73
- package/legacy/ScatterChart/Scatter.js +0 -110
- package/legacy/ScatterChart/ScatterChart.js +0 -395
- package/legacy/ScatterChart/ScatterPlot.js +0 -80
- package/legacy/ScatterChart/extremums.js +0 -39
- package/legacy/ScatterChart/formatter.js +0 -12
- package/legacy/ScatterChart/index.js +0 -3
- package/legacy/ScatterChart/legend.js +0 -15
- package/legacy/SparkLineChart/SparkLineChart.js +0 -266
- package/legacy/SparkLineChart/index.js +0 -1
- package/legacy/colorPalettes/colorPalettes.js +0 -15
- package/legacy/colorPalettes/index.js +0 -1
- package/legacy/constants.js +0 -8
- package/legacy/context/CartesianContextProvider.js +0 -327
- package/legacy/context/DrawingProvider.js +0 -74
- package/legacy/context/HighlightProvider.js +0 -56
- package/legacy/context/InteractionProvider.js +0 -81
- package/legacy/context/SeriesContextProvider.js +0 -74
- package/legacy/context/index.js +0 -2
- package/legacy/hooks/index.js +0 -2
- package/legacy/hooks/useAxisEvents.js +0 -120
- package/legacy/hooks/useChartDimensions.js +0 -18
- package/legacy/hooks/useDrawingArea.js +0 -21
- package/legacy/hooks/useInteractionItemProps.js +0 -71
- package/legacy/hooks/useMounted.js +0 -21
- package/legacy/hooks/useReducedMotion.js +0 -27
- package/legacy/hooks/useScale.js +0 -33
- package/legacy/hooks/useTicks.js +0 -65
- package/legacy/index.js +0 -33
- package/legacy/internals/components/AxisSharedComponents.js +0 -25
- package/legacy/internals/defaultizeColor.js +0 -17
- package/legacy/internals/defaultizeValueFormatter.js +0 -12
- package/legacy/internals/domUtils.js +0 -121
- package/legacy/internals/geometry.js +0 -37
- package/legacy/internals/getCurve.js +0 -39
- package/legacy/internals/getScale.js +0 -17
- package/legacy/internals/getWordsByLines.js +0 -15
- package/legacy/internals/isBandScale.js +0 -3
- package/legacy/internals/stackSeries.js +0 -92
- package/legacy/internals/useAnimatedPath.js +0 -32
- package/legacy/internals/utils.js +0 -52
- package/legacy/models/axis.js +0 -6
- package/legacy/models/helpers.js +0 -1
- package/legacy/models/index.js +0 -4
- package/legacy/models/layout.js +0 -1
- package/legacy/models/seriesType/bar.js +0 -1
- package/legacy/models/seriesType/common.js +0 -1
- package/legacy/models/seriesType/config.js +0 -1
- package/legacy/models/seriesType/index.js +0 -5
- package/legacy/models/seriesType/line.js +0 -1
- package/legacy/models/seriesType/pie.js +0 -1
- package/legacy/models/seriesType/scatter.js +0 -1
- package/legacy/models/stacking.js +0 -1
- package/legacy/themeAugmentation/index.js +0 -3
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
3
|
import useId from '@mui/utils/useId';
|
|
5
4
|
import useChartDimensions from '../hooks/useChartDimensions';
|
|
6
5
|
|
|
@@ -17,16 +16,16 @@ export const DrawingContext = /*#__PURE__*/React.createContext({
|
|
|
17
16
|
width: 400,
|
|
18
17
|
chartId: ''
|
|
19
18
|
});
|
|
20
|
-
|
|
19
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
20
|
+
DrawingContext.displayName = 'DrawingContext';
|
|
21
|
+
}
|
|
22
|
+
export const SvgContext = /*#__PURE__*/React.createContext({
|
|
21
23
|
current: null
|
|
22
24
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
* - [DrawingProvider API](https://mui.com/x/api/charts/drawing-provider/)
|
|
28
|
-
*/
|
|
29
|
-
function DrawingProvider(props) {
|
|
25
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
26
|
+
SvgContext.displayName = 'SvgContext';
|
|
27
|
+
}
|
|
28
|
+
export function DrawingProvider(props) {
|
|
30
29
|
const {
|
|
31
30
|
width,
|
|
32
31
|
height,
|
|
@@ -39,36 +38,11 @@ function DrawingProvider(props) {
|
|
|
39
38
|
const value = React.useMemo(() => _extends({
|
|
40
39
|
chartId: chartId != null ? chartId : ''
|
|
41
40
|
}, drawingArea), [chartId, drawingArea]);
|
|
42
|
-
return /*#__PURE__*/_jsx(
|
|
41
|
+
return /*#__PURE__*/_jsx(SvgContext.Provider, {
|
|
43
42
|
value: svgRef,
|
|
44
43
|
children: /*#__PURE__*/_jsx(DrawingContext.Provider, {
|
|
45
44
|
value: value,
|
|
46
45
|
children: children
|
|
47
46
|
})
|
|
48
47
|
});
|
|
49
|
-
}
|
|
50
|
-
process.env.NODE_ENV !== "production" ? DrawingProvider.propTypes = {
|
|
51
|
-
// ----------------------------- Warning --------------------------------
|
|
52
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
53
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
54
|
-
// ----------------------------------------------------------------------
|
|
55
|
-
children: PropTypes.node,
|
|
56
|
-
height: PropTypes.number.isRequired,
|
|
57
|
-
/**
|
|
58
|
-
* The margin between the SVG and the drawing area.
|
|
59
|
-
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
60
|
-
* Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
61
|
-
* @default object Depends on the charts type.
|
|
62
|
-
*/
|
|
63
|
-
margin: PropTypes.shape({
|
|
64
|
-
bottom: PropTypes.number,
|
|
65
|
-
left: PropTypes.number,
|
|
66
|
-
right: PropTypes.number,
|
|
67
|
-
top: PropTypes.number
|
|
68
|
-
}),
|
|
69
|
-
svgRef: PropTypes.shape({
|
|
70
|
-
current: PropTypes.object
|
|
71
|
-
}).isRequired,
|
|
72
|
-
width: PropTypes.number.isRequired
|
|
73
|
-
} : void 0;
|
|
74
|
-
export { DrawingProvider };
|
|
48
|
+
}
|
|
@@ -10,6 +10,9 @@ export const HighlighContext = /*#__PURE__*/React.createContext({
|
|
|
10
10
|
scope: defaultScope,
|
|
11
11
|
dispatch: () => null
|
|
12
12
|
});
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
HighlighContext.displayName = 'HighlighContext';
|
|
15
|
+
}
|
|
13
16
|
const dataReducer = (prevState, action) => {
|
|
14
17
|
switch (action.type) {
|
|
15
18
|
case 'enterItem':
|
|
@@ -10,6 +10,9 @@ export const InteractionContext = /*#__PURE__*/React.createContext({
|
|
|
10
10
|
useVoronoiInteraction: false,
|
|
11
11
|
dispatch: () => null
|
|
12
12
|
});
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
InteractionContext.displayName = 'InteractionContext';
|
|
15
|
+
}
|
|
13
16
|
const dataReducer = (prevState, action) => {
|
|
14
17
|
switch (action.type) {
|
|
15
18
|
case 'enterItem':
|
|
@@ -9,6 +9,9 @@ import { defaultizeColor } from '../internals/defaultizeColor';
|
|
|
9
9
|
import { blueberryTwilightPalette } from '../colorPalettes';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
export const SeriesContext = /*#__PURE__*/React.createContext({});
|
|
12
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
13
|
+
SeriesContext.displayName = 'SeriesContext';
|
|
14
|
+
}
|
|
12
15
|
const seriesTypeFormatter = {
|
|
13
16
|
bar: barSeriesFormatter,
|
|
14
17
|
scatter: scatterSeriesFormatter,
|
package/esm/context/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { DrawingProvider } from './DrawingProvider';
|
|
1
|
+
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { InteractionContext } from '../context/InteractionProvider';
|
|
3
3
|
import { CartesianContext } from '../context/CartesianContextProvider';
|
|
4
|
-
import {
|
|
4
|
+
import { SvgContext, DrawingContext } from '../context/DrawingProvider';
|
|
5
5
|
import { isBandScale } from '../internals/isBandScale';
|
|
6
6
|
import { getSVGPoint } from '../internals/utils';
|
|
7
7
|
function getAsANumber(value) {
|
|
8
8
|
return value instanceof Date ? value.getTime() : value;
|
|
9
9
|
}
|
|
10
10
|
export const useAxisEvents = disableAxisListener => {
|
|
11
|
-
const svgRef = React.useContext(
|
|
11
|
+
const svgRef = React.useContext(SvgContext);
|
|
12
12
|
const {
|
|
13
13
|
width,
|
|
14
14
|
height,
|
package/hooks/useAxisEvents.js
CHANGED
|
@@ -16,7 +16,7 @@ function getAsANumber(value) {
|
|
|
16
16
|
return value instanceof Date ? value.getTime() : value;
|
|
17
17
|
}
|
|
18
18
|
const useAxisEvents = disableAxisListener => {
|
|
19
|
-
const svgRef = React.useContext(_DrawingProvider.
|
|
19
|
+
const svgRef = React.useContext(_DrawingProvider.SvgContext);
|
|
20
20
|
const {
|
|
21
21
|
width,
|
|
22
22
|
height,
|
package/hooks/useTicks.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -186,7 +186,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
186
186
|
}),
|
|
187
187
|
/**
|
|
188
188
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
189
|
-
* @default undefined
|
|
190
189
|
*/
|
|
191
190
|
height: PropTypes.number,
|
|
192
191
|
/**
|
|
@@ -355,7 +354,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
355
354
|
}),
|
|
356
355
|
/**
|
|
357
356
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
358
|
-
* @default undefined
|
|
359
357
|
*/
|
|
360
358
|
width: PropTypes.number,
|
|
361
359
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import {
|
|
3
|
+
import { SvgContext } from '../context/DrawingProvider';
|
|
4
4
|
import { InteractionContext } from '../context/InteractionProvider';
|
|
5
5
|
import { CartesianContext } from '../context/CartesianContextProvider';
|
|
6
6
|
import { SeriesContext } from '../context/SeriesContextProvider';
|
|
@@ -9,7 +9,7 @@ function ChartsOnAxisClickHandler(props) {
|
|
|
9
9
|
const {
|
|
10
10
|
onAxisClick
|
|
11
11
|
} = props;
|
|
12
|
-
const svgRef = React.useContext(
|
|
12
|
+
const svgRef = React.useContext(SvgContext);
|
|
13
13
|
const series = React.useContext(SeriesContext);
|
|
14
14
|
const {
|
|
15
15
|
axis
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SvgContext } from '../context/DrawingProvider';
|
|
3
3
|
export function generateVirtualElement(mousePosition) {
|
|
4
4
|
if (mousePosition === null) {
|
|
5
5
|
return {
|
|
@@ -44,7 +44,7 @@ export function generateVirtualElement(mousePosition) {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
export function useMouseTracker() {
|
|
47
|
-
const svgRef = React.useContext(
|
|
47
|
+
const svgRef = React.useContext(SvgContext);
|
|
48
48
|
|
|
49
49
|
// Use a ref to avoid rerendering on every mousemove event.
|
|
50
50
|
const [mousePosition, setMousePosition] = React.useState(null);
|
|
@@ -4,7 +4,7 @@ import { Delaunay } from 'd3-delaunay';
|
|
|
4
4
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
5
5
|
import { InteractionContext } from '../context/InteractionProvider';
|
|
6
6
|
import { CartesianContext } from '../context/CartesianContextProvider';
|
|
7
|
-
import {
|
|
7
|
+
import { SvgContext, DrawingContext } from '../context/DrawingProvider';
|
|
8
8
|
import { SeriesContext } from '../context/SeriesContextProvider';
|
|
9
9
|
import { getValueToPositionMapper } from '../hooks/useScale';
|
|
10
10
|
import { getSVGPoint } from '../internals/utils';
|
|
@@ -14,7 +14,7 @@ function ChartsVoronoiHandler(props) {
|
|
|
14
14
|
voronoiMaxRadius,
|
|
15
15
|
onItemClick
|
|
16
16
|
} = props;
|
|
17
|
-
const svgRef = React.useContext(
|
|
17
|
+
const svgRef = React.useContext(SvgContext);
|
|
18
18
|
const {
|
|
19
19
|
width,
|
|
20
20
|
height,
|
|
@@ -207,7 +207,6 @@ process.env.NODE_ENV !== "production" ? ChartsVoronoiHandler.propTypes = {
|
|
|
207
207
|
/**
|
|
208
208
|
* Defines the maximal distance between a scatter point and the pointer that triggers the interaction.
|
|
209
209
|
* If `undefined`, the radius is assumed to be infinite.
|
|
210
|
-
* @default undefined
|
|
211
210
|
*/
|
|
212
211
|
voronoiMaxRadius: PropTypes.number
|
|
213
212
|
} : void 0;
|
|
@@ -330,7 +330,7 @@ process.env.NODE_ENV !== "production" ? ChartsXAxis.propTypes = {
|
|
|
330
330
|
*/
|
|
331
331
|
tickMaxStep: PropTypes.number,
|
|
332
332
|
/**
|
|
333
|
-
*
|
|
333
|
+
* Minimal step between two ticks.
|
|
334
334
|
* When using time data, the value is assumed to be in ms.
|
|
335
335
|
* Not supported by categorical axis (band, points).
|
|
336
336
|
*/
|
|
@@ -260,7 +260,7 @@ process.env.NODE_ENV !== "production" ? ChartsYAxis.propTypes = {
|
|
|
260
260
|
*/
|
|
261
261
|
tickMaxStep: PropTypes.number,
|
|
262
262
|
/**
|
|
263
|
-
*
|
|
263
|
+
* Minimal step between two ticks.
|
|
264
264
|
* When using time data, the value is assumed to be in ms.
|
|
265
265
|
* Not supported by categorical axis (band, points).
|
|
266
266
|
*/
|
package/modern/Gauge/Gauge.js
CHANGED
|
@@ -82,7 +82,6 @@ process.env.NODE_ENV !== "production" ? Gauge.propTypes = {
|
|
|
82
82
|
endAngle: PropTypes.number,
|
|
83
83
|
/**
|
|
84
84
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
85
|
-
* @default undefined
|
|
86
85
|
*/
|
|
87
86
|
height: PropTypes.number,
|
|
88
87
|
/**
|
|
@@ -142,7 +141,6 @@ process.env.NODE_ENV !== "production" ? Gauge.propTypes = {
|
|
|
142
141
|
}),
|
|
143
142
|
/**
|
|
144
143
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
145
|
-
* @default undefined
|
|
146
144
|
*/
|
|
147
145
|
width: PropTypes.number
|
|
148
146
|
} : void 0;
|
|
@@ -142,7 +142,6 @@ process.env.NODE_ENV !== "production" ? GaugeContainer.propTypes = {
|
|
|
142
142
|
endAngle: PropTypes.number,
|
|
143
143
|
/**
|
|
144
144
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
145
|
-
* @default undefined
|
|
146
145
|
*/
|
|
147
146
|
height: PropTypes.number,
|
|
148
147
|
/**
|
|
@@ -201,7 +200,6 @@ process.env.NODE_ENV !== "production" ? GaugeContainer.propTypes = {
|
|
|
201
200
|
}),
|
|
202
201
|
/**
|
|
203
202
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
204
|
-
* @default undefined
|
|
205
203
|
*/
|
|
206
204
|
width: PropTypes.number
|
|
207
205
|
} : void 0;
|
|
@@ -18,6 +18,9 @@ export const GaugeContext = /*#__PURE__*/React.createContext({
|
|
|
18
18
|
maxRadius: 0,
|
|
19
19
|
valueAngle: null
|
|
20
20
|
});
|
|
21
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
22
|
+
GaugeContext.displayName = 'GaugeContext';
|
|
23
|
+
}
|
|
21
24
|
export function GaugeProvider(props) {
|
|
22
25
|
const {
|
|
23
26
|
value = null,
|
|
@@ -9,7 +9,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
9
9
|
function defaultFormatter({
|
|
10
10
|
value
|
|
11
11
|
}) {
|
|
12
|
-
return value === null ?
|
|
12
|
+
return value === null ? null : value.toLocaleString();
|
|
13
13
|
}
|
|
14
14
|
function GaugeValueText(props) {
|
|
15
15
|
const {
|
|
@@ -197,7 +197,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
197
197
|
}),
|
|
198
198
|
/**
|
|
199
199
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
200
|
-
* @default undefined
|
|
201
200
|
*/
|
|
202
201
|
height: PropTypes.number,
|
|
203
202
|
/**
|
|
@@ -368,7 +367,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
368
367
|
}),
|
|
369
368
|
/**
|
|
370
369
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
371
|
-
* @default undefined
|
|
372
370
|
*/
|
|
373
371
|
width: PropTypes.number,
|
|
374
372
|
/**
|
|
@@ -157,7 +157,6 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
157
157
|
disableAxisListener: PropTypes.bool,
|
|
158
158
|
/**
|
|
159
159
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
160
|
-
* @default undefined
|
|
161
160
|
*/
|
|
162
161
|
height: PropTypes.number,
|
|
163
162
|
/**
|
|
@@ -315,7 +314,6 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
315
314
|
}),
|
|
316
315
|
/**
|
|
317
316
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
318
|
-
* @default undefined
|
|
319
317
|
*/
|
|
320
318
|
width: PropTypes.number,
|
|
321
319
|
/**
|
|
@@ -72,7 +72,6 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainer.propTypes = {
|
|
|
72
72
|
disableAxisListener: PropTypes.bool,
|
|
73
73
|
/**
|
|
74
74
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
75
|
-
* @default undefined
|
|
76
75
|
*/
|
|
77
76
|
height: PropTypes.number,
|
|
78
77
|
/**
|
|
@@ -103,7 +102,6 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainer.propTypes = {
|
|
|
103
102
|
}),
|
|
104
103
|
/**
|
|
105
104
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
106
|
-
* @default undefined
|
|
107
105
|
*/
|
|
108
106
|
width: PropTypes.number,
|
|
109
107
|
/**
|
|
@@ -159,7 +159,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
159
159
|
}),
|
|
160
160
|
/**
|
|
161
161
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
162
|
-
* @default undefined
|
|
163
162
|
*/
|
|
164
163
|
height: PropTypes.number,
|
|
165
164
|
/**
|
|
@@ -313,12 +312,10 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
313
312
|
/**
|
|
314
313
|
* Defines the maximal distance between a scatter point and the pointer that triggers the interaction.
|
|
315
314
|
* If `undefined`, the radius is assumed to be infinite.
|
|
316
|
-
* @default undefined
|
|
317
315
|
*/
|
|
318
316
|
voronoiMaxRadius: PropTypes.number,
|
|
319
317
|
/**
|
|
320
318
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
321
|
-
* @default undefined
|
|
322
319
|
*/
|
|
323
320
|
width: PropTypes.number,
|
|
324
321
|
/**
|
|
@@ -146,7 +146,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
146
146
|
disableAxisListener: PropTypes.bool,
|
|
147
147
|
/**
|
|
148
148
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
149
|
-
* @default undefined
|
|
150
149
|
*/
|
|
151
150
|
height: PropTypes.number,
|
|
152
151
|
/**
|
|
@@ -218,7 +217,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
218
217
|
}),
|
|
219
218
|
/**
|
|
220
219
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
221
|
-
* @default undefined
|
|
222
220
|
*/
|
|
223
221
|
width: PropTypes.number,
|
|
224
222
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { scaleBand, scalePoint } from 'd3-scale';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
4
|
import { getExtremumX as getBarExtremumX, getExtremumY as getBarExtremumY } from '../BarChart/extremums';
|
|
6
5
|
import { getExtremumX as getScatterExtremumX, getExtremumY as getScatterExtremumY } from '../ScatterChart/extremums';
|
|
7
6
|
import { getExtremumX as getLineExtremumX, getExtremumY as getLineExtremumY } from '../LineChart/extremums';
|
|
@@ -32,12 +31,9 @@ export const CartesianContext = /*#__PURE__*/React.createContext({
|
|
|
32
31
|
xAxisIds: [],
|
|
33
32
|
yAxisIds: []
|
|
34
33
|
});
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
*
|
|
39
|
-
* - [CartesianContextProvider API](https://mui.com/x/api/charts/cartesian-context-provider/)
|
|
40
|
-
*/
|
|
34
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
35
|
+
CartesianContext.displayName = 'CartesianContext';
|
|
36
|
+
}
|
|
41
37
|
function CartesianContextProvider(props) {
|
|
42
38
|
const {
|
|
43
39
|
xAxis: inXAxis,
|
|
@@ -210,85 +206,4 @@ function CartesianContextProvider(props) {
|
|
|
210
206
|
children: children
|
|
211
207
|
});
|
|
212
208
|
}
|
|
213
|
-
process.env.NODE_ENV !== "production" ? CartesianContextProvider.propTypes = {
|
|
214
|
-
// ----------------------------- Warning --------------------------------
|
|
215
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
216
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
217
|
-
// ----------------------------------------------------------------------
|
|
218
|
-
children: PropTypes.node,
|
|
219
|
-
/**
|
|
220
|
-
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
221
|
-
*/
|
|
222
|
-
dataset: PropTypes.arrayOf(PropTypes.object),
|
|
223
|
-
/**
|
|
224
|
-
* The configuration of the x-axes.
|
|
225
|
-
* If not provided, a default axis config is used with id set to `DEFAULT_X_AXIS_KEY`.
|
|
226
|
-
*/
|
|
227
|
-
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
228
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
229
|
-
classes: PropTypes.object,
|
|
230
|
-
data: PropTypes.array,
|
|
231
|
-
dataKey: PropTypes.string,
|
|
232
|
-
disableLine: PropTypes.bool,
|
|
233
|
-
disableTicks: PropTypes.bool,
|
|
234
|
-
fill: PropTypes.string,
|
|
235
|
-
hideTooltip: PropTypes.bool,
|
|
236
|
-
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
237
|
-
label: PropTypes.string,
|
|
238
|
-
labelFontSize: PropTypes.number,
|
|
239
|
-
labelStyle: PropTypes.object,
|
|
240
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
241
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
242
|
-
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
243
|
-
reverse: PropTypes.bool,
|
|
244
|
-
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
245
|
-
slotProps: PropTypes.object,
|
|
246
|
-
slots: PropTypes.object,
|
|
247
|
-
stroke: PropTypes.string,
|
|
248
|
-
tickFontSize: PropTypes.number,
|
|
249
|
-
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
250
|
-
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
251
|
-
tickLabelStyle: PropTypes.object,
|
|
252
|
-
tickMaxStep: PropTypes.number,
|
|
253
|
-
tickMinStep: PropTypes.number,
|
|
254
|
-
tickNumber: PropTypes.number,
|
|
255
|
-
tickSize: PropTypes.number,
|
|
256
|
-
valueFormatter: PropTypes.func
|
|
257
|
-
})),
|
|
258
|
-
/**
|
|
259
|
-
* The configuration of the y-axes.
|
|
260
|
-
* If not provided, a default axis config is used with id set to `DEFAULT_Y_AXIS_KEY`.
|
|
261
|
-
*/
|
|
262
|
-
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
263
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
264
|
-
classes: PropTypes.object,
|
|
265
|
-
data: PropTypes.array,
|
|
266
|
-
dataKey: PropTypes.string,
|
|
267
|
-
disableLine: PropTypes.bool,
|
|
268
|
-
disableTicks: PropTypes.bool,
|
|
269
|
-
fill: PropTypes.string,
|
|
270
|
-
hideTooltip: PropTypes.bool,
|
|
271
|
-
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
272
|
-
label: PropTypes.string,
|
|
273
|
-
labelFontSize: PropTypes.number,
|
|
274
|
-
labelStyle: PropTypes.object,
|
|
275
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
276
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
277
|
-
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
278
|
-
reverse: PropTypes.bool,
|
|
279
|
-
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
280
|
-
slotProps: PropTypes.object,
|
|
281
|
-
slots: PropTypes.object,
|
|
282
|
-
stroke: PropTypes.string,
|
|
283
|
-
tickFontSize: PropTypes.number,
|
|
284
|
-
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
285
|
-
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
286
|
-
tickLabelStyle: PropTypes.object,
|
|
287
|
-
tickMaxStep: PropTypes.number,
|
|
288
|
-
tickMinStep: PropTypes.number,
|
|
289
|
-
tickNumber: PropTypes.number,
|
|
290
|
-
tickSize: PropTypes.number,
|
|
291
|
-
valueFormatter: PropTypes.func
|
|
292
|
-
}))
|
|
293
|
-
} : void 0;
|
|
294
209
|
export { CartesianContextProvider };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
3
|
import useId from '@mui/utils/useId';
|
|
5
4
|
import useChartDimensions from '../hooks/useChartDimensions';
|
|
6
5
|
|
|
@@ -17,16 +16,16 @@ export const DrawingContext = /*#__PURE__*/React.createContext({
|
|
|
17
16
|
width: 400,
|
|
18
17
|
chartId: ''
|
|
19
18
|
});
|
|
20
|
-
|
|
19
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
20
|
+
DrawingContext.displayName = 'DrawingContext';
|
|
21
|
+
}
|
|
22
|
+
export const SvgContext = /*#__PURE__*/React.createContext({
|
|
21
23
|
current: null
|
|
22
24
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
* - [DrawingProvider API](https://mui.com/x/api/charts/drawing-provider/)
|
|
28
|
-
*/
|
|
29
|
-
function DrawingProvider(props) {
|
|
25
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
26
|
+
SvgContext.displayName = 'SvgContext';
|
|
27
|
+
}
|
|
28
|
+
export function DrawingProvider(props) {
|
|
30
29
|
const {
|
|
31
30
|
width,
|
|
32
31
|
height,
|
|
@@ -39,36 +38,11 @@ function DrawingProvider(props) {
|
|
|
39
38
|
const value = React.useMemo(() => _extends({
|
|
40
39
|
chartId: chartId ?? ''
|
|
41
40
|
}, drawingArea), [chartId, drawingArea]);
|
|
42
|
-
return /*#__PURE__*/_jsx(
|
|
41
|
+
return /*#__PURE__*/_jsx(SvgContext.Provider, {
|
|
43
42
|
value: svgRef,
|
|
44
43
|
children: /*#__PURE__*/_jsx(DrawingContext.Provider, {
|
|
45
44
|
value: value,
|
|
46
45
|
children: children
|
|
47
46
|
})
|
|
48
47
|
});
|
|
49
|
-
}
|
|
50
|
-
process.env.NODE_ENV !== "production" ? DrawingProvider.propTypes = {
|
|
51
|
-
// ----------------------------- Warning --------------------------------
|
|
52
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
53
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
54
|
-
// ----------------------------------------------------------------------
|
|
55
|
-
children: PropTypes.node,
|
|
56
|
-
height: PropTypes.number.isRequired,
|
|
57
|
-
/**
|
|
58
|
-
* The margin between the SVG and the drawing area.
|
|
59
|
-
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
60
|
-
* Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
61
|
-
* @default object Depends on the charts type.
|
|
62
|
-
*/
|
|
63
|
-
margin: PropTypes.shape({
|
|
64
|
-
bottom: PropTypes.number,
|
|
65
|
-
left: PropTypes.number,
|
|
66
|
-
right: PropTypes.number,
|
|
67
|
-
top: PropTypes.number
|
|
68
|
-
}),
|
|
69
|
-
svgRef: PropTypes.shape({
|
|
70
|
-
current: PropTypes.object
|
|
71
|
-
}).isRequired,
|
|
72
|
-
width: PropTypes.number.isRequired
|
|
73
|
-
} : void 0;
|
|
74
|
-
export { DrawingProvider };
|
|
48
|
+
}
|
|
@@ -10,6 +10,9 @@ export const HighlighContext = /*#__PURE__*/React.createContext({
|
|
|
10
10
|
scope: defaultScope,
|
|
11
11
|
dispatch: () => null
|
|
12
12
|
});
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
HighlighContext.displayName = 'HighlighContext';
|
|
15
|
+
}
|
|
13
16
|
const dataReducer = (prevState, action) => {
|
|
14
17
|
switch (action.type) {
|
|
15
18
|
case 'enterItem':
|
|
@@ -10,6 +10,9 @@ export const InteractionContext = /*#__PURE__*/React.createContext({
|
|
|
10
10
|
useVoronoiInteraction: false,
|
|
11
11
|
dispatch: () => null
|
|
12
12
|
});
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
InteractionContext.displayName = 'InteractionContext';
|
|
15
|
+
}
|
|
13
16
|
const dataReducer = (prevState, action) => {
|
|
14
17
|
switch (action.type) {
|
|
15
18
|
case 'enterItem':
|
|
@@ -9,6 +9,9 @@ import { defaultizeColor } from '../internals/defaultizeColor';
|
|
|
9
9
|
import { blueberryTwilightPalette } from '../colorPalettes';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
export const SeriesContext = /*#__PURE__*/React.createContext({});
|
|
12
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
13
|
+
SeriesContext.displayName = 'SeriesContext';
|
|
14
|
+
}
|
|
12
15
|
const seriesTypeFormatter = {
|
|
13
16
|
bar: barSeriesFormatter,
|
|
14
17
|
scatter: scatterSeriesFormatter,
|
package/modern/context/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { DrawingProvider } from './DrawingProvider';
|
|
1
|
+
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { InteractionContext } from '../context/InteractionProvider';
|
|
3
3
|
import { CartesianContext } from '../context/CartesianContextProvider';
|
|
4
|
-
import {
|
|
4
|
+
import { SvgContext, DrawingContext } from '../context/DrawingProvider';
|
|
5
5
|
import { isBandScale } from '../internals/isBandScale';
|
|
6
6
|
import { getSVGPoint } from '../internals/utils';
|
|
7
7
|
function getAsANumber(value) {
|
|
8
8
|
return value instanceof Date ? value.getTime() : value;
|
|
9
9
|
}
|
|
10
10
|
export const useAxisEvents = disableAxisListener => {
|
|
11
|
-
const svgRef = React.useContext(
|
|
11
|
+
const svgRef = React.useContext(SvgContext);
|
|
12
12
|
const {
|
|
13
13
|
width,
|
|
14
14
|
height,
|
package/modern/index.js
CHANGED