@mui/x-charts 7.12.0 → 7.12.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/BarPlot.js +2 -2
- package/BarChart/extremums.d.ts +1 -1
- package/BarChart/formatter.d.ts +2 -2
- package/BarChart/getColor.d.ts +3 -3
- package/BarChart/getColor.js +4 -3
- package/BarChart/legend.d.ts +1 -1
- package/BarChart/plugin.d.ts +2 -2
- package/CHANGELOG.md +70 -2
- package/ChartContainer/ChartContainer.d.ts +3 -14
- package/ChartContainer/ChartContainer.js +4 -4
- package/ChartContainer/useChartContainerProps.d.ts +6 -5
- package/ChartContainer/useChartContainerProps.js +14 -17
- package/ChartContainer/useDefaultizeAxis.d.ts +1 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.js +2 -2
- package/ChartsTooltip/ChartsItemTooltipContent.js +2 -2
- package/LineChart/extremums.d.ts +1 -1
- package/LineChart/formatter.d.ts +2 -2
- package/LineChart/getColor.d.ts +3 -3
- package/LineChart/getColor.js +4 -3
- package/LineChart/legend.d.ts +1 -1
- package/LineChart/plugin.d.ts +2 -2
- package/PieChart/formatter.d.ts +2 -2
- package/PieChart/getColor.d.ts +3 -2
- package/PieChart/getColor.js +4 -3
- package/PieChart/legend.d.ts +1 -1
- package/PieChart/plugin.d.ts +2 -2
- package/ResponsiveChartContainer/useResponsiveChartContainerProps.d.ts +1 -2
- package/ScatterChart/extremums.d.ts +1 -1
- package/ScatterChart/formatter.d.ts +2 -2
- package/ScatterChart/getColor.d.ts +3 -4
- package/ScatterChart/getColor.js +4 -3
- package/ScatterChart/legend.d.ts +1 -1
- package/ScatterChart/plugin.d.ts +2 -2
- package/context/CartesianProvider/CartesianProvider.d.ts +0 -9
- package/context/CartesianProvider/CartesianProvider.js +4 -2
- package/context/CartesianProvider/computeValue.d.ts +2 -1
- package/context/CartesianProvider/defaultizeAxis.d.ts +1 -1
- package/context/CartesianProvider/getAxisExtremum.d.ts +2 -2
- package/context/PluginProvider/ColorProcessor.types.d.ts +8 -0
- package/context/PluginProvider/ExtremumGetter.types.d.ts +14 -0
- package/context/PluginProvider/ExtremumGetter.types.js +5 -0
- package/context/PluginProvider/Plugin.types.d.ts +25 -0
- package/context/PluginProvider/Plugin.types.js +5 -0
- package/context/PluginProvider/PluginContext.d.ts +4 -0
- package/{hooks/useColor.js → context/PluginProvider/PluginContext.js} +11 -7
- package/context/PluginProvider/PluginProvider.d.ts +4 -0
- package/context/{ColorProvider.js → PluginProvider/PluginProvider.js} +12 -11
- package/context/PluginProvider/SeriesFormatter.types.d.ts +21 -0
- package/context/PluginProvider/SeriesFormatter.types.js +5 -0
- package/context/PluginProvider/index.d.ts +10 -0
- package/context/PluginProvider/index.js +115 -0
- package/context/PluginProvider/mergePlugins.d.ts +36 -0
- package/context/PluginProvider/mergePlugins.js +37 -0
- package/context/PluginProvider/useColorProcessor.d.ts +4 -0
- package/context/PluginProvider/useColorProcessor.js +23 -0
- package/context/PluginProvider/useSeriesFormatter.d.ts +4 -0
- package/context/PluginProvider/useSeriesFormatter.js +23 -0
- package/context/PluginProvider/useXExtremumGetter.d.ts +4 -0
- package/context/PluginProvider/useXExtremumGetter.js +23 -0
- package/context/PluginProvider/useYExtremumGetter.d.ts +4 -0
- package/context/PluginProvider/useYExtremumGetter.js +23 -0
- package/context/SeriesProvider/Series.types.d.ts +4 -10
- package/context/SeriesProvider/SeriesProvider.js +2 -1
- package/context/SeriesProvider/index.d.ts +1 -1
- package/context/SeriesProvider/processSeries.d.ts +2 -1
- package/esm/BarChart/BarPlot.js +1 -2
- package/esm/BarChart/getColor.js +3 -2
- package/esm/ChartContainer/ChartContainer.js +4 -4
- package/esm/ChartContainer/useChartContainerProps.js +12 -17
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +1 -1
- package/esm/ChartsTooltip/ChartsItemTooltipContent.js +1 -1
- package/esm/LineChart/getColor.js +3 -2
- package/esm/PieChart/getColor.js +3 -2
- package/esm/ScatterChart/getColor.js +3 -2
- package/esm/context/CartesianProvider/CartesianProvider.js +4 -2
- package/esm/context/PluginProvider/Plugin.types.js +1 -0
- package/esm/context/PluginProvider/PluginContext.js +13 -0
- package/esm/context/PluginProvider/PluginProvider.js +19 -0
- package/esm/context/PluginProvider/SeriesFormatter.types.js +1 -0
- package/esm/context/PluginProvider/index.js +10 -0
- package/esm/context/PluginProvider/mergePlugins.js +30 -0
- package/esm/context/PluginProvider/useColorProcessor.js +15 -0
- package/esm/context/PluginProvider/useSeriesFormatter.js +15 -0
- package/esm/context/PluginProvider/useXExtremumGetter.js +15 -0
- package/esm/context/PluginProvider/useYExtremumGetter.js +15 -0
- package/esm/context/SeriesProvider/SeriesProvider.js +2 -1
- package/esm/internals/index.js +1 -1
- package/esm/models/index.js +0 -1
- package/index.js +1 -1
- package/internals/colorScale.d.ts +1 -1
- package/internals/index.d.ts +1 -1
- package/internals/index.js +12 -12
- package/models/index.d.ts +0 -1
- package/models/index.js +0 -11
- package/models/seriesType/config.d.ts +0 -26
- package/modern/BarChart/BarPlot.js +1 -2
- package/modern/BarChart/getColor.js +3 -2
- package/modern/ChartContainer/ChartContainer.js +4 -4
- package/modern/ChartContainer/useChartContainerProps.js +12 -17
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +1 -1
- package/modern/ChartsTooltip/ChartsItemTooltipContent.js +1 -1
- package/modern/LineChart/getColor.js +3 -2
- package/modern/PieChart/getColor.js +3 -2
- package/modern/ScatterChart/getColor.js +3 -2
- package/modern/context/CartesianProvider/CartesianProvider.js +4 -2
- package/modern/context/PluginProvider/ColorProcessor.types.js +1 -0
- package/modern/context/PluginProvider/ExtremumGetter.types.js +1 -0
- package/modern/context/PluginProvider/Plugin.types.js +1 -0
- package/modern/context/PluginProvider/PluginContext.js +13 -0
- package/modern/context/PluginProvider/PluginProvider.js +19 -0
- package/modern/context/PluginProvider/SeriesFormatter.types.js +1 -0
- package/modern/context/PluginProvider/index.js +10 -0
- package/modern/context/PluginProvider/mergePlugins.js +30 -0
- package/modern/context/PluginProvider/useColorProcessor.js +15 -0
- package/modern/context/PluginProvider/useSeriesFormatter.js +15 -0
- package/modern/context/PluginProvider/useXExtremumGetter.js +15 -0
- package/modern/context/PluginProvider/useYExtremumGetter.js +15 -0
- package/modern/context/SeriesProvider/SeriesProvider.js +2 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -1
- package/modern/models/index.js +0 -1
- package/package.json +2 -2
- package/ChartContainer/defaultPlugins.d.ts +0 -2
- package/ChartContainer/defaultPlugins.js +0 -11
- package/ChartContainer/useChartContainerHooks.d.ts +0 -11
- package/ChartContainer/useChartContainerHooks.js +0 -34
- package/ChartContainer/usePluginsMerge.d.ts +0 -9
- package/ChartContainer/usePluginsMerge.js +0 -39
- package/context/ColorProvider.d.ts +0 -12
- package/esm/ChartContainer/defaultPlugins.js +0 -5
- package/esm/ChartContainer/useChartContainerHooks.js +0 -24
- package/esm/ChartContainer/usePluginsMerge.js +0 -31
- package/esm/context/ColorProvider.js +0 -16
- package/esm/hooks/useColor.js +0 -9
- package/hooks/useColor.d.ts +0 -4
- package/models/plugin.d.ts +0 -19
- package/modern/ChartContainer/defaultPlugins.js +0 -5
- package/modern/ChartContainer/useChartContainerHooks.js +0 -24
- package/modern/ChartContainer/usePluginsMerge.js +0 -31
- package/modern/context/ColorProvider.js +0 -16
- package/modern/hooks/useColor.js +0 -9
- /package/{models/plugin.js → context/PluginProvider/ColorProcessor.types.js} +0 -0
- /package/esm/{models/plugin.js → context/PluginProvider/ColorProcessor.types.js} +0 -0
- /package/{modern/models/plugin.js → esm/context/PluginProvider/ExtremumGetter.types.js} +0 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["width", "height", "series", "margin", "xAxis", "yAxis", "zAxis", "colors", "dataset", "sx", "title", "desc", "disableAxisListener", "highlightedItem", "onHighlightChange", "plugins", "children"];
|
|
4
|
-
import
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import useForkRef from '@mui/utils/useForkRef';
|
|
5
6
|
import { useDefaultizeAxis } from './useDefaultizeAxis';
|
|
7
|
+
import { useReducedMotion } from '../hooks/useReducedMotion';
|
|
6
8
|
export const useChartContainerProps = (props, ref) => {
|
|
7
9
|
const {
|
|
8
10
|
width,
|
|
@@ -24,14 +26,10 @@ export const useChartContainerProps = (props, ref) => {
|
|
|
24
26
|
children
|
|
25
27
|
} = props,
|
|
26
28
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
yExtremumGetters,
|
|
32
|
-
seriesFormatters,
|
|
33
|
-
colorProcessors
|
|
34
|
-
} = useChartContainerHooks(ref, plugins);
|
|
29
|
+
const svgRef = React.useRef(null);
|
|
30
|
+
const chartSurfaceRef = useForkRef(ref, svgRef);
|
|
31
|
+
useReducedMotion(); // a11y reduce motion (see: https://react-spring.dev/docs/utilities/use-reduced-motion)
|
|
32
|
+
|
|
35
33
|
const [defaultizedXAxis, defaultizedYAxis] = useDefaultizeAxis(xAxis, yAxis);
|
|
36
34
|
const drawingProviderProps = {
|
|
37
35
|
width,
|
|
@@ -39,21 +37,18 @@ export const useChartContainerProps = (props, ref) => {
|
|
|
39
37
|
margin,
|
|
40
38
|
svgRef
|
|
41
39
|
};
|
|
42
|
-
const
|
|
43
|
-
|
|
40
|
+
const pluginProviderProps = {
|
|
41
|
+
plugins
|
|
44
42
|
};
|
|
45
43
|
const seriesProviderProps = {
|
|
46
44
|
series,
|
|
47
45
|
colors,
|
|
48
|
-
dataset
|
|
49
|
-
seriesFormatters
|
|
46
|
+
dataset
|
|
50
47
|
};
|
|
51
48
|
const cartesianContextProps = {
|
|
52
49
|
xAxis: defaultizedXAxis,
|
|
53
50
|
yAxis: defaultizedYAxis,
|
|
54
|
-
dataset
|
|
55
|
-
xExtremumGetters,
|
|
56
|
-
yExtremumGetters
|
|
51
|
+
dataset
|
|
57
52
|
};
|
|
58
53
|
const zAxisContextProps = {
|
|
59
54
|
zAxis,
|
|
@@ -75,12 +70,12 @@ export const useChartContainerProps = (props, ref) => {
|
|
|
75
70
|
return {
|
|
76
71
|
children,
|
|
77
72
|
drawingProviderProps,
|
|
78
|
-
colorProviderProps,
|
|
79
73
|
seriesProviderProps,
|
|
80
74
|
cartesianContextProps,
|
|
81
75
|
zAxisContextProps,
|
|
82
76
|
highlightedProviderProps,
|
|
83
77
|
chartsSurfaceProps,
|
|
78
|
+
pluginProviderProps,
|
|
84
79
|
xAxis: defaultizedXAxis,
|
|
85
80
|
yAxis: defaultizedYAxis
|
|
86
81
|
};
|
|
@@ -4,7 +4,7 @@ import useSlotProps from '@mui/utils/useSlotProps';
|
|
|
4
4
|
import { useCartesianContext } from '../context/CartesianProvider';
|
|
5
5
|
import { DefaultChartsAxisTooltipContent } from './DefaultChartsAxisTooltipContent';
|
|
6
6
|
import { ZAxisContext } from '../context/ZAxisContextProvider';
|
|
7
|
-
import { useColorProcessor } from '../
|
|
7
|
+
import { useColorProcessor } from '../context/PluginProvider/useColorProcessor';
|
|
8
8
|
import { isCartesianSeriesType } from '../internals/isCartesian';
|
|
9
9
|
import { useSeries } from '../hooks/useSeries';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -4,7 +4,7 @@ import useSlotProps from '@mui/utils/useSlotProps';
|
|
|
4
4
|
import { DefaultChartsItemTooltipContent } from './DefaultChartsItemTooltipContent';
|
|
5
5
|
import { useCartesianContext } from '../context/CartesianProvider';
|
|
6
6
|
import { ZAxisContext } from '../context/ZAxisContextProvider';
|
|
7
|
-
import { useColorProcessor } from '../
|
|
7
|
+
import { useColorProcessor } from '../context/PluginProvider/useColorProcessor';
|
|
8
8
|
import { useSeries } from '../hooks/useSeries';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const getColor = (series, xAxis, yAxis) => {
|
|
2
2
|
const yColorScale = yAxis?.colorScale;
|
|
3
3
|
const xColorScale = xAxis?.colorScale;
|
|
4
4
|
if (yColorScale) {
|
|
@@ -22,4 +22,5 @@ export default function getColor(series, xAxis, yAxis) {
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
return () => series.color;
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
|
+
export default getColor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const getColor = (series, xAxis, yAxis, zAxis) => {
|
|
2
2
|
const zColorScale = zAxis?.colorScale;
|
|
3
3
|
const yColorScale = yAxis?.colorScale;
|
|
4
4
|
const xColorScale = xAxis?.colorScale;
|
|
@@ -39,4 +39,5 @@ export default function getColor(series, xAxis, yAxis, zAxis) {
|
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
return () => series.color;
|
|
42
|
-
}
|
|
42
|
+
};
|
|
43
|
+
export default getColor;
|
|
@@ -3,18 +3,20 @@ import { useDrawingArea } from '../../hooks/useDrawingArea';
|
|
|
3
3
|
import { useSeries } from '../../hooks/useSeries';
|
|
4
4
|
import { CartesianContext } from './CartesianContext';
|
|
5
5
|
import { computeValue } from './computeValue';
|
|
6
|
+
import { useXExtremumGetter } from '../PluginProvider/useXExtremumGetter';
|
|
7
|
+
import { useYExtremumGetter } from '../PluginProvider';
|
|
6
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
9
|
function CartesianContextProvider(props) {
|
|
8
10
|
const {
|
|
9
11
|
xAxis,
|
|
10
12
|
yAxis,
|
|
11
13
|
dataset,
|
|
12
|
-
xExtremumGetters,
|
|
13
|
-
yExtremumGetters,
|
|
14
14
|
children
|
|
15
15
|
} = props;
|
|
16
16
|
const formattedSeries = useSeries();
|
|
17
17
|
const drawingArea = useDrawingArea();
|
|
18
|
+
const xExtremumGetters = useXExtremumGetter();
|
|
19
|
+
const yExtremumGetters = useYExtremumGetter();
|
|
18
20
|
const xValues = React.useMemo(() => computeValue({
|
|
19
21
|
drawingArea,
|
|
20
22
|
formattedSeries,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export const PluginContext = /*#__PURE__*/React.createContext({
|
|
3
|
+
isInitialized: false,
|
|
4
|
+
data: {
|
|
5
|
+
colorProcessors: {},
|
|
6
|
+
seriesFormatters: {},
|
|
7
|
+
xExtremumGetters: {},
|
|
8
|
+
yExtremumGetters: {}
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
12
|
+
PluginContext.displayName = 'PluginContext';
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PluginContext } from './PluginContext';
|
|
3
|
+
import { mergePlugins } from './mergePlugins';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
function PluginProvider(props) {
|
|
6
|
+
const {
|
|
7
|
+
children,
|
|
8
|
+
plugins
|
|
9
|
+
} = props;
|
|
10
|
+
const formattedSeries = React.useMemo(() => ({
|
|
11
|
+
isInitialized: true,
|
|
12
|
+
data: mergePlugins(plugins)
|
|
13
|
+
}), [plugins]);
|
|
14
|
+
return /*#__PURE__*/_jsx(PluginContext.Provider, {
|
|
15
|
+
value: formattedSeries,
|
|
16
|
+
children: children
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
export { PluginProvider };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './PluginProvider';
|
|
2
|
+
export * from './Plugin.types';
|
|
3
|
+
export * from './PluginContext';
|
|
4
|
+
export * from './ColorProcessor.types';
|
|
5
|
+
export * from './SeriesFormatter.types';
|
|
6
|
+
export * from './ExtremumGetter.types';
|
|
7
|
+
export * from './useColorProcessor';
|
|
8
|
+
export * from './useSeriesFormatter';
|
|
9
|
+
export * from './useXExtremumGetter';
|
|
10
|
+
export * from './useYExtremumGetter';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { plugin as barPlugin } from '../../BarChart/plugin';
|
|
2
|
+
import { plugin as scatterPlugin } from '../../ScatterChart/plugin';
|
|
3
|
+
import { plugin as linePlugin } from '../../LineChart/plugin';
|
|
4
|
+
import { plugin as piePlugin } from '../../PieChart/plugin';
|
|
5
|
+
export const defaultPlugins = [barPlugin, scatterPlugin, linePlugin, piePlugin];
|
|
6
|
+
export function mergePlugins(plugins) {
|
|
7
|
+
const defaultizedPlugins = plugins ?? defaultPlugins;
|
|
8
|
+
const seriesFormatters = {};
|
|
9
|
+
const colorProcessors = {};
|
|
10
|
+
const xExtremumGetters = {};
|
|
11
|
+
const yExtremumGetters = {};
|
|
12
|
+
for (let i = 0; i < defaultizedPlugins.length; i += 1) {
|
|
13
|
+
const plugin = defaultizedPlugins[i];
|
|
14
|
+
const seriesType = plugin.seriesType;
|
|
15
|
+
seriesFormatters[seriesType] = plugin.seriesFormatter;
|
|
16
|
+
colorProcessors[seriesType] = plugin.colorProcessor;
|
|
17
|
+
if (plugin.xExtremumGetter) {
|
|
18
|
+
xExtremumGetters[seriesType] = plugin.xExtremumGetter;
|
|
19
|
+
}
|
|
20
|
+
if (plugin.yExtremumGetter) {
|
|
21
|
+
yExtremumGetters[seriesType] = plugin.yExtremumGetter;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
seriesFormatters,
|
|
26
|
+
colorProcessors,
|
|
27
|
+
xExtremumGetters,
|
|
28
|
+
yExtremumGetters
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PluginContext } from './PluginContext';
|
|
3
|
+
export function useColorProcessor(seriesType) {
|
|
4
|
+
const {
|
|
5
|
+
isInitialized,
|
|
6
|
+
data
|
|
7
|
+
} = React.useContext(PluginContext);
|
|
8
|
+
if (!isInitialized) {
|
|
9
|
+
throw new Error(['MUI X: Could not find the plugin context.', 'It looks like you rendered your component outside of a ChartsContainer parent component.'].join('\n'));
|
|
10
|
+
}
|
|
11
|
+
if (!seriesType) {
|
|
12
|
+
return data.colorProcessors;
|
|
13
|
+
}
|
|
14
|
+
return data.colorProcessors[seriesType];
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PluginContext } from './PluginContext';
|
|
3
|
+
export function useSeriesFormatter(seriesType) {
|
|
4
|
+
const {
|
|
5
|
+
isInitialized,
|
|
6
|
+
data
|
|
7
|
+
} = React.useContext(PluginContext);
|
|
8
|
+
if (!isInitialized) {
|
|
9
|
+
throw new Error(['MUI X: Could not find the plugin context.', 'It looks like you rendered your component outside of a ChartsContainer parent component.'].join('\n'));
|
|
10
|
+
}
|
|
11
|
+
if (!seriesType) {
|
|
12
|
+
return data.seriesFormatters;
|
|
13
|
+
}
|
|
14
|
+
return data.seriesFormatters[seriesType];
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PluginContext } from './PluginContext';
|
|
3
|
+
export function useXExtremumGetter(seriesType) {
|
|
4
|
+
const {
|
|
5
|
+
isInitialized,
|
|
6
|
+
data
|
|
7
|
+
} = React.useContext(PluginContext);
|
|
8
|
+
if (!isInitialized) {
|
|
9
|
+
throw new Error(['MUI X: Could not find the plugin context.', 'It looks like you rendered your component outside of a ChartsContainer parent component.'].join('\n'));
|
|
10
|
+
}
|
|
11
|
+
if (!seriesType) {
|
|
12
|
+
return data.xExtremumGetters;
|
|
13
|
+
}
|
|
14
|
+
return data.xExtremumGetters[seriesType];
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PluginContext } from './PluginContext';
|
|
3
|
+
export function useYExtremumGetter(seriesType) {
|
|
4
|
+
const {
|
|
5
|
+
isInitialized,
|
|
6
|
+
data
|
|
7
|
+
} = React.useContext(PluginContext);
|
|
8
|
+
if (!isInitialized) {
|
|
9
|
+
throw new Error(['MUI X: Could not find the plugin context.', 'It looks like you rendered your component outside of a ChartsContainer parent component.'].join('\n'));
|
|
10
|
+
}
|
|
11
|
+
if (!seriesType) {
|
|
12
|
+
return data.yExtremumGetters;
|
|
13
|
+
}
|
|
14
|
+
return data.yExtremumGetters[seriesType];
|
|
15
|
+
}
|
|
@@ -3,15 +3,16 @@ import { useTheme } from '@mui/material/styles';
|
|
|
3
3
|
import { blueberryTwilightPalette } from '../../colorPalettes';
|
|
4
4
|
import { SeriesContext } from './SeriesContext';
|
|
5
5
|
import { preprocessSeries } from './processSeries';
|
|
6
|
+
import { useSeriesFormatter } from '../PluginProvider';
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
function SeriesProvider(props) {
|
|
8
9
|
const {
|
|
9
10
|
series,
|
|
10
11
|
dataset,
|
|
11
12
|
colors = blueberryTwilightPalette,
|
|
12
|
-
seriesFormatters,
|
|
13
13
|
children
|
|
14
14
|
} = props;
|
|
15
|
+
const seriesFormatters = useSeriesFormatter();
|
|
15
16
|
const theme = useTheme();
|
|
16
17
|
const formattedSeries = React.useMemo(() => ({
|
|
17
18
|
isInitialized: true,
|
package/modern/index.js
CHANGED
|
@@ -25,10 +25,10 @@ export * from './isDefined';
|
|
|
25
25
|
|
|
26
26
|
export * from '../context/CartesianProvider';
|
|
27
27
|
export * from '../context/DrawingProvider';
|
|
28
|
-
export * from '../context/ColorProvider';
|
|
29
28
|
export * from '../context/InteractionProvider';
|
|
30
29
|
export * from '../context/SeriesProvider';
|
|
31
30
|
export * from '../context/ZAxisContextProvider';
|
|
31
|
+
export * from '../context/PluginProvider';
|
|
32
32
|
// series configuration
|
|
33
33
|
export * from '../models/seriesType/config';
|
|
34
34
|
export * from '../models/seriesType/common';
|
package/modern/models/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-charts",
|
|
3
|
-
"version": "7.12.
|
|
3
|
+
"version": "7.12.1",
|
|
4
4
|
"description": "The community edition of the Charts components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@react-spring/web": "^9.7.4",
|
|
37
37
|
"clsx": "^2.1.1",
|
|
38
38
|
"prop-types": "^15.8.1",
|
|
39
|
-
"@mui/x-charts-vendor": "7.12.
|
|
39
|
+
"@mui/x-charts-vendor": "7.12.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@emotion/react": "^11.9.0",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.defaultPlugins = void 0;
|
|
7
|
-
var _plugin = require("../BarChart/plugin");
|
|
8
|
-
var _plugin2 = require("../ScatterChart/plugin");
|
|
9
|
-
var _plugin3 = require("../LineChart/plugin");
|
|
10
|
-
var _plugin4 = require("../PieChart/plugin");
|
|
11
|
-
const defaultPlugins = exports.defaultPlugins = [_plugin.plugin, _plugin2.plugin, _plugin3.plugin, _plugin4.plugin];
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ChartsPluginType } from '../models';
|
|
3
|
-
import { ChartSeriesType } from '../models/seriesType/config';
|
|
4
|
-
export declare const useChartContainerHooks: (ref: React.ForwardedRef<unknown> | null, plugins?: ChartsPluginType<ChartSeriesType>[]) => {
|
|
5
|
-
svgRef: React.RefObject<SVGSVGElement>;
|
|
6
|
-
chartSurfaceRef: ((instance: unknown) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | null;
|
|
7
|
-
xExtremumGetters: import("../models").ExtremumGettersConfig<keyof import("../models/seriesType/config").ChartsSeriesConfig>;
|
|
8
|
-
yExtremumGetters: import("../models").ExtremumGettersConfig<keyof import("../models/seriesType/config").ChartsSeriesConfig>;
|
|
9
|
-
seriesFormatters: import("../internals").SeriesFormatterConfig<keyof import("../models/seriesType/config").ChartsSeriesConfig>;
|
|
10
|
-
colorProcessors: import("../models").ColorProcessorsConfig<keyof import("../models/seriesType/config").ChartsSeriesConfig>;
|
|
11
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.useChartContainerHooks = void 0;
|
|
8
|
-
var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
|
|
9
|
-
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _usePluginsMerge = require("./usePluginsMerge");
|
|
11
|
-
var _useReducedMotion = require("../hooks/useReducedMotion");
|
|
12
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
-
const useChartContainerHooks = (ref, plugins) => {
|
|
15
|
-
const svgRef = React.useRef(null);
|
|
16
|
-
const chartSurfaceRef = (0, _useForkRef.default)(ref, svgRef);
|
|
17
|
-
const {
|
|
18
|
-
xExtremumGetters,
|
|
19
|
-
yExtremumGetters,
|
|
20
|
-
seriesFormatters,
|
|
21
|
-
colorProcessors
|
|
22
|
-
} = (0, _usePluginsMerge.usePluginsMerge)(plugins);
|
|
23
|
-
(0, _useReducedMotion.useReducedMotion)(); // a11y reduce motion (see: https://react-spring.dev/docs/utilities/use-reduced-motion)
|
|
24
|
-
|
|
25
|
-
return {
|
|
26
|
-
svgRef,
|
|
27
|
-
chartSurfaceRef,
|
|
28
|
-
xExtremumGetters,
|
|
29
|
-
yExtremumGetters,
|
|
30
|
-
seriesFormatters,
|
|
31
|
-
colorProcessors
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
exports.useChartContainerHooks = useChartContainerHooks;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ChartsPluginType, ColorProcessorsConfig, ExtremumGettersConfig } from '../models';
|
|
2
|
-
import { ChartSeriesType } from '../models/seriesType/config';
|
|
3
|
-
import { SeriesFormatterConfig } from '../context/SeriesProvider';
|
|
4
|
-
export declare function usePluginsMerge<T extends ChartSeriesType>(plugins?: ChartsPluginType<T>[]): {
|
|
5
|
-
seriesFormatters: SeriesFormatterConfig<keyof import("../models/seriesType/config").ChartsSeriesConfig>;
|
|
6
|
-
colorProcessors: ColorProcessorsConfig<keyof import("../models/seriesType/config").ChartsSeriesConfig>;
|
|
7
|
-
xExtremumGetters: ExtremumGettersConfig<keyof import("../models/seriesType/config").ChartsSeriesConfig>;
|
|
8
|
-
yExtremumGetters: ExtremumGettersConfig<keyof import("../models/seriesType/config").ChartsSeriesConfig>;
|
|
9
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.usePluginsMerge = usePluginsMerge;
|
|
7
|
-
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _defaultPlugins = require("./defaultPlugins");
|
|
9
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
|
-
function usePluginsMerge(plugins) {
|
|
12
|
-
const defaultizedPlugins = plugins ?? _defaultPlugins.defaultPlugins;
|
|
13
|
-
return React.useMemo(() => {
|
|
14
|
-
const seriesFormatters = {};
|
|
15
|
-
const colorProcessors = {};
|
|
16
|
-
const xExtremumGetters = {};
|
|
17
|
-
const yExtremumGetters = {};
|
|
18
|
-
for (let i = 0; i < defaultizedPlugins.length; i += 1) {
|
|
19
|
-
const plugin = defaultizedPlugins[i];
|
|
20
|
-
|
|
21
|
-
// To remove those any we will need to solve this union discrimination issue:
|
|
22
|
-
// https://www.typescriptlang.org/play/?#code/FDAuE8AcFMAIDkCuBbARtATgYQPYDsAzASwHNYBeWAb2FlgGsi8ATALlgHI8V0MOBuWrBwwMAQ1A4M7ABQAPdtzSYAlBQB8sJb0EBfEBBiwAyqAxMSuQqQrUhjFuw4BnMxYFCRmCVNkLYruZ4JGrkmoEWeiAAxviuWqhWxCTsSMrY+Mm2VAxMbLAARNqYBQA0wqI+0rByGrAATLAAVDWw+rF48YFJpOymQZaZNpQ5DvkFEcFlFd6S1bVhsAAG9S0AJFRyukttMXGgsB3JzrYA2niJQyTl3VcAugZQcADylXPOALJikJAW2ULFDAAflSPEwPRIpw4XnEcw4d1KQkmJBBJjcwQhUJhVXhiN0gmAHXi2LmXx+FnYr1mUk+31+wWy+JABCksBkABtoAcjjYcARDldnGoaCA6AB6MWwADqUnoJxw9FgRH5AHc4L9ooroGJogALQ5iZxwPJEABuRGYiDE7PASJVRFAerZPJIADoxsKhHRooa4FwwXxWF66DNYVIyfTIS73Xk7rZoySpIIQyHUBhtfRkyGfUbOMiOEGU3RExgIxZTtGxnHKAm3kng8xoAQxIh2aBC0W0xms-pvftqLkWOUS2141chBLYABJDimuB4HBKxtiWBiVA4RAHXU4FWwSSwTkHAAqxlgiBYmFcYhYAusbrGq5vtepGFX6YPTHo0GYnjrpbp5ZVrYJZ6EAA
|
|
23
|
-
seriesFormatters[plugin.seriesType] = plugin.seriesFormatter;
|
|
24
|
-
colorProcessors[plugin.seriesType] = plugin.colorProcessor;
|
|
25
|
-
if (plugin.xExtremumGetter) {
|
|
26
|
-
xExtremumGetters[plugin.seriesType] = plugin.xExtremumGetter;
|
|
27
|
-
}
|
|
28
|
-
if (plugin.yExtremumGetter) {
|
|
29
|
-
yExtremumGetters[plugin.seriesType] = plugin.yExtremumGetter;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
seriesFormatters,
|
|
34
|
-
colorProcessors,
|
|
35
|
-
xExtremumGetters,
|
|
36
|
-
yExtremumGetters
|
|
37
|
-
};
|
|
38
|
-
}, [defaultizedPlugins]);
|
|
39
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ColorProcessorsConfig } from '../models';
|
|
3
|
-
import { ChartSeriesType } from '../models/seriesType/config';
|
|
4
|
-
export interface ColorProviderProps {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
/**
|
|
7
|
-
* A mapping defining for each series type how to get item colors.
|
|
8
|
-
*/
|
|
9
|
-
colorProcessors: ColorProcessorsConfig<ChartSeriesType>;
|
|
10
|
-
}
|
|
11
|
-
export declare const ColorContext: React.Context<ColorProcessorsConfig<keyof import("../models/seriesType/config").ChartsSeriesConfig>>;
|
|
12
|
-
export declare function ColorProvider(props: ColorProviderProps): React.JSX.Element;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { plugin as barPlugin } from '../BarChart/plugin';
|
|
2
|
-
import { plugin as scatterPlugin } from '../ScatterChart/plugin';
|
|
3
|
-
import { plugin as linePlugin } from '../LineChart/plugin';
|
|
4
|
-
import { plugin as piePlugin } from '../PieChart/plugin';
|
|
5
|
-
export const defaultPlugins = [barPlugin, scatterPlugin, linePlugin, piePlugin];
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import useForkRef from '@mui/utils/useForkRef';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { usePluginsMerge } from './usePluginsMerge';
|
|
4
|
-
import { useReducedMotion } from '../hooks/useReducedMotion';
|
|
5
|
-
export const useChartContainerHooks = (ref, plugins) => {
|
|
6
|
-
const svgRef = React.useRef(null);
|
|
7
|
-
const chartSurfaceRef = useForkRef(ref, svgRef);
|
|
8
|
-
const {
|
|
9
|
-
xExtremumGetters,
|
|
10
|
-
yExtremumGetters,
|
|
11
|
-
seriesFormatters,
|
|
12
|
-
colorProcessors
|
|
13
|
-
} = usePluginsMerge(plugins);
|
|
14
|
-
useReducedMotion(); // a11y reduce motion (see: https://react-spring.dev/docs/utilities/use-reduced-motion)
|
|
15
|
-
|
|
16
|
-
return {
|
|
17
|
-
svgRef,
|
|
18
|
-
chartSurfaceRef,
|
|
19
|
-
xExtremumGetters,
|
|
20
|
-
yExtremumGetters,
|
|
21
|
-
seriesFormatters,
|
|
22
|
-
colorProcessors
|
|
23
|
-
};
|
|
24
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { defaultPlugins } from './defaultPlugins';
|
|
3
|
-
export function usePluginsMerge(plugins) {
|
|
4
|
-
const defaultizedPlugins = plugins ?? defaultPlugins;
|
|
5
|
-
return React.useMemo(() => {
|
|
6
|
-
const seriesFormatters = {};
|
|
7
|
-
const colorProcessors = {};
|
|
8
|
-
const xExtremumGetters = {};
|
|
9
|
-
const yExtremumGetters = {};
|
|
10
|
-
for (let i = 0; i < defaultizedPlugins.length; i += 1) {
|
|
11
|
-
const plugin = defaultizedPlugins[i];
|
|
12
|
-
|
|
13
|
-
// To remove those any we will need to solve this union discrimination issue:
|
|
14
|
-
// https://www.typescriptlang.org/play/?#code/FDAuE8AcFMAIDkCuBbARtATgYQPYDsAzASwHNYBeWAb2FlgGsi8ATALlgHI8V0MOBuWrBwwMAQ1A4M7ABQAPdtzSYAlBQB8sJb0EBfEBBiwAyqAxMSuQqQrUhjFuw4BnMxYFCRmCVNkLYruZ4JGrkmoEWeiAAxviuWqhWxCTsSMrY+Mm2VAxMbLAARNqYBQA0wqI+0rByGrAATLAAVDWw+rF48YFJpOymQZaZNpQ5DvkFEcFlFd6S1bVhsAAG9S0AJFRyukttMXGgsB3JzrYA2niJQyTl3VcAugZQcADylXPOALJikJAW2ULFDAAflSPEwPRIpw4XnEcw4d1KQkmJBBJjcwQhUJhVXhiN0gmAHXi2LmXx+FnYr1mUk+31+wWy+JABCksBkABtoAcjjYcARDldnGoaCA6AB6MWwADqUnoJxw9FgRH5AHc4L9ooroGJogALQ5iZxwPJEABuRGYiDE7PASJVRFAerZPJIADoxsKhHRooa4FwwXxWF66DNYVIyfTIS73Xk7rZoySpIIQyHUBhtfRkyGfUbOMiOEGU3RExgIxZTtGxnHKAm3kng8xoAQxIh2aBC0W0xms-pvftqLkWOUS2141chBLYABJDimuB4HBKxtiWBiVA4RAHXU4FWwSSwTkHAAqxlgiBYmFcYhYAusbrGq5vtepGFX6YPTHo0GYnjrpbp5ZVrYJZ6EAA
|
|
15
|
-
seriesFormatters[plugin.seriesType] = plugin.seriesFormatter;
|
|
16
|
-
colorProcessors[plugin.seriesType] = plugin.colorProcessor;
|
|
17
|
-
if (plugin.xExtremumGetter) {
|
|
18
|
-
xExtremumGetters[plugin.seriesType] = plugin.xExtremumGetter;
|
|
19
|
-
}
|
|
20
|
-
if (plugin.yExtremumGetter) {
|
|
21
|
-
yExtremumGetters[plugin.seriesType] = plugin.yExtremumGetter;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return {
|
|
25
|
-
seriesFormatters,
|
|
26
|
-
colorProcessors,
|
|
27
|
-
xExtremumGetters,
|
|
28
|
-
yExtremumGetters
|
|
29
|
-
};
|
|
30
|
-
}, [defaultizedPlugins]);
|
|
31
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
export const ColorContext = /*#__PURE__*/React.createContext({});
|
|
4
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
5
|
-
ColorContext.displayName = 'ColorContext';
|
|
6
|
-
}
|
|
7
|
-
export function ColorProvider(props) {
|
|
8
|
-
const {
|
|
9
|
-
colorProcessors,
|
|
10
|
-
children
|
|
11
|
-
} = props;
|
|
12
|
-
return /*#__PURE__*/_jsx(ColorContext.Provider, {
|
|
13
|
-
value: colorProcessors,
|
|
14
|
-
children: children
|
|
15
|
-
});
|
|
16
|
-
}
|
package/esm/hooks/useColor.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ColorContext } from '../context/ColorProvider';
|
|
3
|
-
export function useColorProcessor(seriesType) {
|
|
4
|
-
const colorProcessors = React.useContext(ColorContext);
|
|
5
|
-
if (!seriesType) {
|
|
6
|
-
return colorProcessors;
|
|
7
|
-
}
|
|
8
|
-
return colorProcessors[seriesType];
|
|
9
|
-
}
|
package/hooks/useColor.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ChartSeriesType } from '../models/seriesType/config';
|
|
2
|
-
import { ColorProcessorsConfig } from '../models/plugin';
|
|
3
|
-
export declare function useColorProcessor<T extends ChartSeriesType>(seriesType: T): ColorProcessorsConfig<ChartSeriesType>;
|
|
4
|
-
export declare function useColorProcessor(): ColorProcessorsConfig<ChartSeriesType>;
|
package/models/plugin.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { CartesianChartSeriesType, ChartSeriesType, ExtremumGetter, Formatter } from './seriesType/config';
|
|
2
|
-
import { AxisDefaultized } from './axis';
|
|
3
|
-
import { DefaultizedSeriesType } from './seriesType';
|
|
4
|
-
import { ZAxisDefaultized } from './z-axis';
|
|
5
|
-
type ColorProcessor<T extends ChartSeriesType> = (series: DefaultizedSeriesType<T>, xAxis?: AxisDefaultized, yAxis?: AxisDefaultized, zAxis?: ZAxisDefaultized) => (dataIndex: number) => string;
|
|
6
|
-
export type ColorProcessorsConfig<T extends ChartSeriesType> = {
|
|
7
|
-
[Key in T]?: ColorProcessor<Key>;
|
|
8
|
-
};
|
|
9
|
-
export type ChartsPluginType<T> = T extends ChartSeriesType ? {
|
|
10
|
-
seriesType: T;
|
|
11
|
-
seriesFormatter: Formatter<T>;
|
|
12
|
-
colorProcessor: ColorProcessor<T>;
|
|
13
|
-
xExtremumGetter?: ExtremumGetter<T>;
|
|
14
|
-
yExtremumGetter?: ExtremumGetter<T>;
|
|
15
|
-
} : never;
|
|
16
|
-
export type ExtremumGettersConfig<T extends ChartSeriesType = CartesianChartSeriesType> = {
|
|
17
|
-
[K in T]?: ExtremumGetter<K>;
|
|
18
|
-
};
|
|
19
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { plugin as barPlugin } from '../BarChart/plugin';
|
|
2
|
-
import { plugin as scatterPlugin } from '../ScatterChart/plugin';
|
|
3
|
-
import { plugin as linePlugin } from '../LineChart/plugin';
|
|
4
|
-
import { plugin as piePlugin } from '../PieChart/plugin';
|
|
5
|
-
export const defaultPlugins = [barPlugin, scatterPlugin, linePlugin, piePlugin];
|