@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
package/BarChart/BarPlot.js
CHANGED
|
@@ -20,6 +20,8 @@ var _checkScaleErrors = require("./checkScaleErrors");
|
|
|
20
20
|
var _useSeries = require("../hooks/useSeries");
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
const _excluded = ["skipAnimation", "onItemClick", "borderRadius", "barLabel"];
|
|
23
|
+
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); }
|
|
24
|
+
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; }
|
|
23
25
|
/**
|
|
24
26
|
* Solution of the equations
|
|
25
27
|
* W = barWidth * N + offset * (N-1)
|
|
@@ -29,8 +31,6 @@ const _excluded = ["skipAnimation", "onItemClick", "borderRadius", "barLabel"];
|
|
|
29
31
|
* @param gapRatio The ratio of the gap between bars over the bar width.
|
|
30
32
|
* @returns The bar width and the offset between bars.
|
|
31
33
|
*/
|
|
32
|
-
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); }
|
|
33
|
-
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; }
|
|
34
34
|
function getBandSize({
|
|
35
35
|
bandWidth: W,
|
|
36
36
|
numberOfGroups: N,
|
package/BarChart/extremums.d.ts
CHANGED
package/BarChart/formatter.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const formatter:
|
|
1
|
+
import { SeriesFormatter } from '../context/PluginProvider/SeriesFormatter.types';
|
|
2
|
+
declare const formatter: SeriesFormatter<'bar'>;
|
|
3
3
|
export default formatter;
|
package/BarChart/getColor.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export default
|
|
1
|
+
import { ColorProcessor } from '../context/PluginProvider/ColorProcessor.types';
|
|
2
|
+
declare const getColor: ColorProcessor<'bar'>;
|
|
3
|
+
export default getColor;
|
package/BarChart/getColor.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
7
|
-
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
const getColor = (series, xAxis, yAxis) => {
|
|
8
8
|
const verticalLayout = series.layout === 'vertical';
|
|
9
9
|
const bandColorScale = verticalLayout ? xAxis?.colorScale : yAxis?.colorScale;
|
|
10
10
|
const valueColorScale = verticalLayout ? yAxis?.colorScale : xAxis?.colorScale;
|
|
@@ -30,4 +30,5 @@ function getColor(series, xAxis, yAxis) {
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
return () => series.color;
|
|
33
|
-
}
|
|
33
|
+
};
|
|
34
|
+
var _default = exports.default = getColor;
|
package/BarChart/legend.d.ts
CHANGED
package/BarChart/plugin.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const plugin:
|
|
1
|
+
import type { ChartsPlugin } from '../context/PluginProvider';
|
|
2
|
+
export declare const plugin: ChartsPlugin<'bar'>;
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,74 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 7.12.1
|
|
7
|
+
|
|
8
|
+
_Aug 8, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🎨 Charts get a new component to display color mapping in the legend
|
|
13
|
+
- 🚀 The `@mui/x-charts-pro` is released in alpha version 🧪. This new package introduces two main features:
|
|
14
|
+
- The Heatmap component
|
|
15
|
+
- The zoom interaction on the bar, line, and scatter charts
|
|
16
|
+
- 🌍 Improve Dutch (nl-NL) locale on the Date and Time Pickers
|
|
17
|
+
- 🐞 Bugfixes
|
|
18
|
+
|
|
19
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
20
|
+
|
|
21
|
+
### Data Grid
|
|
22
|
+
|
|
23
|
+
#### `@mui/x-data-grid@7.12.1`
|
|
24
|
+
|
|
25
|
+
- [DataGrid] Fix `checkboxSelectionVisibleOnly` behavior with server-side pagination (#14083) @MBilalShafi
|
|
26
|
+
- [DataGrid] Fix `columnHeadersContainerRef` being `undefined` before mount (#14051) @samwato
|
|
27
|
+
- [DataGrid] Support Yarn PnP (#14126) @cherniavskii
|
|
28
|
+
|
|
29
|
+
#### `@mui/x-data-grid-pro@7.12.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
30
|
+
|
|
31
|
+
Same changes as in `@mui/x-data-grid@7.12.1`.
|
|
32
|
+
|
|
33
|
+
#### `@mui/x-data-grid-premium@7.12.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
34
|
+
|
|
35
|
+
Same changes as in `@mui/x-data-grid-pro@7.12.1`.
|
|
36
|
+
|
|
37
|
+
### Date and Time Pickers
|
|
38
|
+
|
|
39
|
+
#### `@mui/x-date-pickers@7.12.1`
|
|
40
|
+
|
|
41
|
+
- [l10n] Improve Dutch (nlNL) locale (pickers) (#14036) @Robin1896
|
|
42
|
+
|
|
43
|
+
#### `@mui/x-date-pickers-pro@7.12.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
44
|
+
|
|
45
|
+
Same changes as in `@mui/x-date-pickers@7.12.1`.
|
|
46
|
+
|
|
47
|
+
### Charts
|
|
48
|
+
|
|
49
|
+
#### `@mui/x-charts@7.12.1`
|
|
50
|
+
|
|
51
|
+
- [charts] Fix charts vendor publish config (#14073) @JCQuintas
|
|
52
|
+
- [charts] Move `plugins` to `PluginProvider` (#14056) @JCQuintas
|
|
53
|
+
|
|
54
|
+
#### `@mui/x-date-charts-pro@7.0.0-alpha.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
55
|
+
|
|
56
|
+
Same changes as in `@mui/x-charts@7.12.1`, plus:
|
|
57
|
+
|
|
58
|
+
- [charts-pro] Release the pro package in alpha (#13859) @alexfauquette
|
|
59
|
+
|
|
60
|
+
### Tree View
|
|
61
|
+
|
|
62
|
+
#### `@mui/x-tree-view@7.12.1`
|
|
63
|
+
|
|
64
|
+
### Docs
|
|
65
|
+
|
|
66
|
+
- [docs] Add a warning to promote the usage of `updateRows` (#14027) @MBilalShafi
|
|
67
|
+
- [docs] Disable ad in `Rich Tree View-Ordering` page (#14123) @oliviertassinari
|
|
68
|
+
- [docs] Redesign Date and Time Pickers overview page (#13241) @noraleonte
|
|
69
|
+
|
|
70
|
+
- [CHANGELOG] Polish details @oliviertassinari
|
|
71
|
+
- [code-infra] Use concurrency 1 in CircleCI (#14110) @JCQuintas
|
|
72
|
+
- [infra] Re-added the removal of `Latest Version` section (#14132) @michelengelen
|
|
73
|
+
|
|
6
74
|
## 7.12.0
|
|
7
75
|
|
|
8
76
|
_Aug 1, 2024_
|
|
@@ -24,9 +92,9 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
24
92
|
|
|
25
93
|
- 🎁 Introduce [item reordering using drag and drop](https://mui.com/x/react-tree-view/rich-tree-view/ordering/) on the `RichTreeViewPro` component
|
|
26
94
|
|
|
27
|
-
<img width="
|
|
95
|
+
<img width="287" src="https://github.com/user-attachments/assets/78bd83c5-7ce4-4ed7-acf9-be70b2dbce54" alt="Item reordering using drag and drop" />
|
|
28
96
|
|
|
29
|
-
- 📦 Support
|
|
97
|
+
- 📦 Support CommonJS bundle out of the box on `@mui/x-charts` by adding vendored D3 dependencies.
|
|
30
98
|
|
|
31
99
|
- This modifies how the package imports D3.js. It will impact you if you use `d3` packages installed by `@mui/x-charts` and don't have them in your `package.json`. You shouldn't be affected otherwise.
|
|
32
100
|
- For more context, the initial issue is caused by D3 only exporting ESM.
|
|
@@ -4,11 +4,10 @@ import { SeriesProviderProps } from '../context/SeriesProvider';
|
|
|
4
4
|
import { ChartsSurfaceProps } from '../ChartsSurface';
|
|
5
5
|
import { CartesianContextProviderProps } from '../context/CartesianProvider';
|
|
6
6
|
import { HighlightedProviderProps, ZAxisContextProviderProps } from '../context';
|
|
7
|
-
import {
|
|
8
|
-
import { ChartSeriesType } from '../models/seriesType/config';
|
|
7
|
+
import { PluginProviderProps } from '../context/PluginProvider';
|
|
9
8
|
import { AxisConfig, ChartsXAxisProps, ChartsYAxisProps, ScaleName } from '../models/axis';
|
|
10
9
|
import { MakeOptional } from '../models/helpers';
|
|
11
|
-
export type ChartContainerProps = Omit<ChartsSurfaceProps & Omit<SeriesProviderProps, 'seriesFormatters'> & Omit<DrawingProviderProps, 'svgRef'> & Pick<CartesianContextProviderProps, 'dataset'> & ZAxisContextProviderProps & HighlightedProviderProps, 'children'> & {
|
|
10
|
+
export type ChartContainerProps = Omit<ChartsSurfaceProps & Omit<SeriesProviderProps, 'seriesFormatters'> & Omit<DrawingProviderProps, 'svgRef'> & Pick<CartesianContextProviderProps, 'dataset'> & ZAxisContextProviderProps & HighlightedProviderProps & PluginProviderProps, 'children'> & {
|
|
12
11
|
/**
|
|
13
12
|
* The configuration of the x-axes.
|
|
14
13
|
* If not provided, a default axis config is used.
|
|
@@ -22,13 +21,8 @@ export type ChartContainerProps = Omit<ChartsSurfaceProps & Omit<SeriesProviderP
|
|
|
22
21
|
*/
|
|
23
22
|
yAxis?: MakeOptional<AxisConfig<ScaleName, any, ChartsYAxisProps>, 'id'>[];
|
|
24
23
|
children?: React.ReactNode;
|
|
25
|
-
/**
|
|
26
|
-
* An array of plugins defining how to preprocess data.
|
|
27
|
-
* If not provided, the container supports line, bar, scatter and pie charts.
|
|
28
|
-
*/
|
|
29
|
-
plugins?: ChartsPluginType<ChartSeriesType>[];
|
|
30
24
|
};
|
|
31
|
-
declare const ChartContainer: React.ForwardRefExoticComponent<Omit<ChartsSurfaceProps & Omit<SeriesProviderProps, "seriesFormatters"> & Omit<DrawingProviderProps, "svgRef"> & Pick<CartesianContextProviderProps, "dataset"> & ZAxisContextProviderProps & HighlightedProviderProps, "children"> & {
|
|
25
|
+
declare const ChartContainer: React.ForwardRefExoticComponent<Omit<ChartsSurfaceProps & Omit<SeriesProviderProps, "seriesFormatters"> & Omit<DrawingProviderProps, "svgRef"> & Pick<CartesianContextProviderProps, "dataset"> & ZAxisContextProviderProps & HighlightedProviderProps & PluginProviderProps, "children"> & {
|
|
32
26
|
/**
|
|
33
27
|
* The configuration of the x-axes.
|
|
34
28
|
* If not provided, a default axis config is used.
|
|
@@ -42,10 +36,5 @@ declare const ChartContainer: React.ForwardRefExoticComponent<Omit<ChartsSurface
|
|
|
42
36
|
*/
|
|
43
37
|
yAxis?: MakeOptional<AxisConfig<ScaleName, any, ChartsYAxisProps>, "id">[];
|
|
44
38
|
children?: React.ReactNode;
|
|
45
|
-
/**
|
|
46
|
-
* An array of plugins defining how to preprocess data.
|
|
47
|
-
* If not provided, the container supports line, bar, scatter and pie charts.
|
|
48
|
-
*/
|
|
49
|
-
plugins?: ChartsPluginType<ChartSeriesType>[];
|
|
50
39
|
} & React.RefAttributes<unknown>>;
|
|
51
40
|
export { ChartContainer };
|
|
@@ -11,11 +11,11 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
var _DrawingProvider = require("../context/DrawingProvider");
|
|
12
12
|
var _SeriesProvider = require("../context/SeriesProvider");
|
|
13
13
|
var _InteractionProvider = require("../context/InteractionProvider");
|
|
14
|
-
var _ColorProvider = require("../context/ColorProvider");
|
|
15
14
|
var _ChartsSurface = require("../ChartsSurface");
|
|
16
15
|
var _CartesianProvider = require("../context/CartesianProvider");
|
|
17
16
|
var _ChartsAxesGradients = require("../internals/components/ChartsAxesGradients");
|
|
18
17
|
var _context = require("../context");
|
|
18
|
+
var _PluginProvider = require("../context/PluginProvider");
|
|
19
19
|
var _useChartContainerProps = require("./useChartContainerProps");
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
21
|
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); }
|
|
@@ -24,15 +24,15 @@ const ChartContainer = exports.ChartContainer = /*#__PURE__*/React.forwardRef(fu
|
|
|
24
24
|
const {
|
|
25
25
|
children,
|
|
26
26
|
drawingProviderProps,
|
|
27
|
-
colorProviderProps,
|
|
28
27
|
seriesProviderProps,
|
|
29
28
|
cartesianContextProps,
|
|
30
29
|
zAxisContextProps,
|
|
31
30
|
highlightedProviderProps,
|
|
32
|
-
chartsSurfaceProps
|
|
31
|
+
chartsSurfaceProps,
|
|
32
|
+
pluginProviderProps
|
|
33
33
|
} = (0, _useChartContainerProps.useChartContainerProps)(props, ref);
|
|
34
34
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DrawingProvider.DrawingProvider, (0, _extends2.default)({}, drawingProviderProps, {
|
|
35
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
35
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PluginProvider.PluginProvider, (0, _extends2.default)({}, pluginProviderProps, {
|
|
36
36
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SeriesProvider.SeriesProvider, (0, _extends2.default)({}, seriesProviderProps, {
|
|
37
37
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CartesianProvider.CartesianContextProvider, (0, _extends2.default)({}, cartesianContextProps, {
|
|
38
38
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.ZAxisContextProvider, (0, _extends2.default)({}, zAxisContextProps, {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { DrawingProviderProps } from '../context/DrawingProvider';
|
|
2
|
-
import type { ColorProviderProps } from '../context/ColorProvider';
|
|
3
3
|
import type { CartesianContextProviderProps } from '../context/CartesianProvider';
|
|
4
4
|
import type { SeriesProviderProps } from '../context/SeriesProvider';
|
|
5
5
|
import type { ZAxisContextProviderProps } from '../context/ZAxisContextProvider';
|
|
6
6
|
import type { ChartContainerProps } from './ChartContainer';
|
|
7
7
|
import { HighlightedProviderProps } from '../context';
|
|
8
8
|
import { ChartsSurfaceProps } from '../ChartsSurface';
|
|
9
|
+
import { PluginProviderProps } from '../context/PluginProvider';
|
|
9
10
|
export declare const useChartContainerProps: (props: ChartContainerProps, ref: React.ForwardedRef<unknown>) => {
|
|
10
|
-
children:
|
|
11
|
+
children: React.ReactNode;
|
|
11
12
|
drawingProviderProps: Omit<DrawingProviderProps, "children">;
|
|
12
|
-
colorProviderProps: Omit<ColorProviderProps, "children">;
|
|
13
13
|
seriesProviderProps: Omit<SeriesProviderProps, "children">;
|
|
14
14
|
cartesianContextProps: Omit<CartesianContextProviderProps, "children">;
|
|
15
15
|
zAxisContextProps: Omit<ZAxisContextProviderProps, "children">;
|
|
@@ -17,6 +17,7 @@ export declare const useChartContainerProps: (props: ChartContainerProps, ref: R
|
|
|
17
17
|
chartsSurfaceProps: ChartsSurfaceProps & {
|
|
18
18
|
ref: any;
|
|
19
19
|
};
|
|
20
|
+
pluginProviderProps: Omit<PluginProviderProps, "children">;
|
|
20
21
|
xAxis: {
|
|
21
22
|
reverse?: boolean | undefined;
|
|
22
23
|
fill?: string | undefined;
|
|
@@ -30,7 +31,6 @@ export declare const useChartContainerProps: (props: ChartContainerProps, ref: R
|
|
|
30
31
|
slotProps?: Partial<import("../internals").ChartsAxisSlotProps> | undefined;
|
|
31
32
|
dataKey?: string | undefined;
|
|
32
33
|
valueFormatter?: ((value: any, context: import("../internals").AxisValueFormatterContext) => string) | undefined;
|
|
33
|
-
colorMap?: import("../models/colorMapping").ContinuousColorConfig<number | Date> | import("../models/colorMapping").PiecewiseColorConfig<number | Date> | import("../models/colorMapping").OrdinalColorConfig<string | number | Date> | undefined;
|
|
34
34
|
tickMaxStep?: number | undefined;
|
|
35
35
|
tickMinStep?: number | undefined;
|
|
36
36
|
tickNumber?: number | undefined;
|
|
@@ -46,6 +46,7 @@ export declare const useChartContainerProps: (props: ChartContainerProps, ref: R
|
|
|
46
46
|
tickPlacement?: ("start" | "end" | "middle" | "extremities") | undefined;
|
|
47
47
|
tickLabelPlacement?: ("middle" | "tick") | undefined;
|
|
48
48
|
scaleType?: "linear" | "time" | "log" | "band" | "point" | "pow" | "sqrt" | "utc" | undefined;
|
|
49
|
+
colorMap?: import("../models/colorMapping").ContinuousColorConfig<number | Date> | import("../models/colorMapping").PiecewiseColorConfig<number | Date> | import("../models/colorMapping").OrdinalColorConfig<string | number | Date> | undefined;
|
|
49
50
|
hideTooltip?: boolean | undefined;
|
|
50
51
|
id: import("../internals").AxisId;
|
|
51
52
|
}[];
|
|
@@ -62,7 +63,6 @@ export declare const useChartContainerProps: (props: ChartContainerProps, ref: R
|
|
|
62
63
|
slotProps?: Partial<import("../internals").ChartsAxisSlotProps> | undefined;
|
|
63
64
|
dataKey?: string | undefined;
|
|
64
65
|
valueFormatter?: ((value: any, context: import("../internals").AxisValueFormatterContext) => string) | undefined;
|
|
65
|
-
colorMap?: import("../models/colorMapping").ContinuousColorConfig<number | Date> | import("../models/colorMapping").PiecewiseColorConfig<number | Date> | import("../models/colorMapping").OrdinalColorConfig<string | number | Date> | undefined;
|
|
66
66
|
tickMaxStep?: number | undefined;
|
|
67
67
|
tickMinStep?: number | undefined;
|
|
68
68
|
tickNumber?: number | undefined;
|
|
@@ -78,6 +78,7 @@ export declare const useChartContainerProps: (props: ChartContainerProps, ref: R
|
|
|
78
78
|
tickPlacement?: ("start" | "end" | "middle" | "extremities") | undefined;
|
|
79
79
|
tickLabelPlacement?: ("middle" | "tick") | undefined;
|
|
80
80
|
scaleType?: "linear" | "time" | "log" | "band" | "point" | "pow" | "sqrt" | "utc" | undefined;
|
|
81
|
+
colorMap?: import("../models/colorMapping").ContinuousColorConfig<number | Date> | import("../models/colorMapping").PiecewiseColorConfig<number | Date> | import("../models/colorMapping").OrdinalColorConfig<string | number | Date> | undefined;
|
|
81
82
|
hideTooltip?: boolean | undefined;
|
|
82
83
|
id: import("../internals").AxisId;
|
|
83
84
|
}[];
|
|
@@ -7,9 +7,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.useChartContainerProps = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
|
-
var
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
|
|
11
12
|
var _useDefaultizeAxis = require("./useDefaultizeAxis");
|
|
13
|
+
var _useReducedMotion = require("../hooks/useReducedMotion");
|
|
12
14
|
const _excluded = ["width", "height", "series", "margin", "xAxis", "yAxis", "zAxis", "colors", "dataset", "sx", "title", "desc", "disableAxisListener", "highlightedItem", "onHighlightChange", "plugins", "children"];
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
13
17
|
const useChartContainerProps = (props, ref) => {
|
|
14
18
|
const {
|
|
15
19
|
width,
|
|
@@ -31,14 +35,10 @@ const useChartContainerProps = (props, ref) => {
|
|
|
31
35
|
children
|
|
32
36
|
} = props,
|
|
33
37
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
yExtremumGetters,
|
|
39
|
-
seriesFormatters,
|
|
40
|
-
colorProcessors
|
|
41
|
-
} = (0, _useChartContainerHooks.useChartContainerHooks)(ref, plugins);
|
|
38
|
+
const svgRef = React.useRef(null);
|
|
39
|
+
const chartSurfaceRef = (0, _useForkRef.default)(ref, svgRef);
|
|
40
|
+
(0, _useReducedMotion.useReducedMotion)(); // a11y reduce motion (see: https://react-spring.dev/docs/utilities/use-reduced-motion)
|
|
41
|
+
|
|
42
42
|
const [defaultizedXAxis, defaultizedYAxis] = (0, _useDefaultizeAxis.useDefaultizeAxis)(xAxis, yAxis);
|
|
43
43
|
const drawingProviderProps = {
|
|
44
44
|
width,
|
|
@@ -46,21 +46,18 @@ const useChartContainerProps = (props, ref) => {
|
|
|
46
46
|
margin,
|
|
47
47
|
svgRef
|
|
48
48
|
};
|
|
49
|
-
const
|
|
50
|
-
|
|
49
|
+
const pluginProviderProps = {
|
|
50
|
+
plugins
|
|
51
51
|
};
|
|
52
52
|
const seriesProviderProps = {
|
|
53
53
|
series,
|
|
54
54
|
colors,
|
|
55
|
-
dataset
|
|
56
|
-
seriesFormatters
|
|
55
|
+
dataset
|
|
57
56
|
};
|
|
58
57
|
const cartesianContextProps = {
|
|
59
58
|
xAxis: defaultizedXAxis,
|
|
60
59
|
yAxis: defaultizedYAxis,
|
|
61
|
-
dataset
|
|
62
|
-
xExtremumGetters,
|
|
63
|
-
yExtremumGetters
|
|
60
|
+
dataset
|
|
64
61
|
};
|
|
65
62
|
const zAxisContextProps = {
|
|
66
63
|
zAxis,
|
|
@@ -82,12 +79,12 @@ const useChartContainerProps = (props, ref) => {
|
|
|
82
79
|
return {
|
|
83
80
|
children,
|
|
84
81
|
drawingProviderProps,
|
|
85
|
-
colorProviderProps,
|
|
86
82
|
seriesProviderProps,
|
|
87
83
|
cartesianContextProps,
|
|
88
84
|
zAxisContextProps,
|
|
89
85
|
highlightedProviderProps,
|
|
90
86
|
chartsSurfaceProps,
|
|
87
|
+
pluginProviderProps,
|
|
91
88
|
xAxis: defaultizedXAxis,
|
|
92
89
|
yAxis: defaultizedYAxis
|
|
93
90
|
};
|
|
@@ -14,7 +14,6 @@ export declare const useDefaultizeAxis: (inXAxis: MakeOptional<AxisConfig<ScaleN
|
|
|
14
14
|
slotProps?: Partial<import("../models/axis").ChartsAxisSlotProps> | undefined;
|
|
15
15
|
dataKey?: string | undefined;
|
|
16
16
|
valueFormatter?: ((value: any, context: import("../models/axis").AxisValueFormatterContext) => string) | undefined;
|
|
17
|
-
colorMap?: import("../models/colorMapping").ContinuousColorConfig<number | Date> | import("../models/colorMapping").PiecewiseColorConfig<number | Date> | import("../models/colorMapping").OrdinalColorConfig<string | number | Date> | undefined;
|
|
18
17
|
tickMaxStep?: number | undefined;
|
|
19
18
|
tickMinStep?: number | undefined;
|
|
20
19
|
tickNumber?: number | undefined;
|
|
@@ -30,6 +29,7 @@ export declare const useDefaultizeAxis: (inXAxis: MakeOptional<AxisConfig<ScaleN
|
|
|
30
29
|
tickPlacement?: ("start" | "end" | "middle" | "extremities") | undefined;
|
|
31
30
|
tickLabelPlacement?: ("middle" | "tick") | undefined;
|
|
32
31
|
scaleType?: "linear" | "time" | "log" | "band" | "point" | "pow" | "sqrt" | "utc" | undefined;
|
|
32
|
+
colorMap?: import("../models/colorMapping").ContinuousColorConfig<number | Date> | import("../models/colorMapping").PiecewiseColorConfig<number | Date> | import("../models/colorMapping").OrdinalColorConfig<string | number | Date> | undefined;
|
|
33
33
|
hideTooltip?: boolean | undefined;
|
|
34
34
|
id: import("../models/axis").AxisId;
|
|
35
35
|
}[][];
|
|
@@ -11,7 +11,7 @@ var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
|
|
|
11
11
|
var _CartesianProvider = require("../context/CartesianProvider");
|
|
12
12
|
var _DefaultChartsAxisTooltipContent = require("./DefaultChartsAxisTooltipContent");
|
|
13
13
|
var _ZAxisContextProvider = require("../context/ZAxisContextProvider");
|
|
14
|
-
var
|
|
14
|
+
var _useColorProcessor = require("../context/PluginProvider/useColorProcessor");
|
|
15
15
|
var _isCartesian = require("../internals/isCartesian");
|
|
16
16
|
var _useSeries = require("../hooks/useSeries");
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -42,7 +42,7 @@ function ChartsAxisTooltipContent(props) {
|
|
|
42
42
|
zAxis
|
|
43
43
|
} = React.useContext(_ZAxisContextProvider.ZAxisContext);
|
|
44
44
|
const series = (0, _useSeries.useSeries)();
|
|
45
|
-
const colorProcessors = (0,
|
|
45
|
+
const colorProcessors = (0, _useColorProcessor.useColorProcessor)();
|
|
46
46
|
const USED_AXIS_ID = isXaxis ? xAxisIds[0] : yAxisIds[0];
|
|
47
47
|
const relevantSeries = React.useMemo(() => {
|
|
48
48
|
const rep = [];
|
|
@@ -11,7 +11,7 @@ var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
|
|
|
11
11
|
var _DefaultChartsItemTooltipContent = require("./DefaultChartsItemTooltipContent");
|
|
12
12
|
var _CartesianProvider = require("../context/CartesianProvider");
|
|
13
13
|
var _ZAxisContextProvider = require("../context/ZAxisContextProvider");
|
|
14
|
-
var
|
|
14
|
+
var _useColorProcessor = require("../context/PluginProvider/useColorProcessor");
|
|
15
15
|
var _useSeries = require("../hooks/useSeries");
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
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); }
|
|
@@ -38,7 +38,7 @@ function ChartsItemTooltipContent(props) {
|
|
|
38
38
|
zAxis,
|
|
39
39
|
zAxisIds
|
|
40
40
|
} = React.useContext(_ZAxisContextProvider.ZAxisContext);
|
|
41
|
-
const colorProcessors = (0,
|
|
41
|
+
const colorProcessors = (0, _useColorProcessor.useColorProcessor)();
|
|
42
42
|
const xAxisId = series.xAxisId ?? series.xAxisKey ?? xAxisIds[0];
|
|
43
43
|
const yAxisId = series.yAxisId ?? series.yAxisKey ?? yAxisIds[0];
|
|
44
44
|
const zAxisId = series.zAxisId ?? series.zAxisKey ?? zAxisIds[0];
|
package/LineChart/extremums.d.ts
CHANGED
package/LineChart/formatter.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const formatter:
|
|
1
|
+
import { SeriesFormatter } from '../context/PluginProvider/SeriesFormatter.types';
|
|
2
|
+
declare const formatter: SeriesFormatter<'line'>;
|
|
3
3
|
export default formatter;
|
package/LineChart/getColor.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export default
|
|
1
|
+
import { ColorProcessor } from '../context/PluginProvider/ColorProcessor.types';
|
|
2
|
+
declare const getColor: ColorProcessor<'line'>;
|
|
3
|
+
export default getColor;
|
package/LineChart/getColor.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
7
|
-
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
const getColor = (series, xAxis, yAxis) => {
|
|
8
8
|
const yColorScale = yAxis?.colorScale;
|
|
9
9
|
const xColorScale = xAxis?.colorScale;
|
|
10
10
|
if (yColorScale) {
|
|
@@ -28,4 +28,5 @@ function getColor(series, xAxis, yAxis) {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
return () => series.color;
|
|
31
|
-
}
|
|
31
|
+
};
|
|
32
|
+
var _default = exports.default = getColor;
|
package/LineChart/legend.d.ts
CHANGED
package/LineChart/plugin.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const plugin:
|
|
1
|
+
import type { ChartsPlugin } from '../context/PluginProvider';
|
|
2
|
+
export declare const plugin: ChartsPlugin<'line'>;
|
package/PieChart/formatter.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const formatter:
|
|
1
|
+
import { SeriesFormatter } from '../context/PluginProvider/SeriesFormatter.types';
|
|
2
|
+
declare const formatter: SeriesFormatter<'pie'>;
|
|
3
3
|
export default formatter;
|
package/PieChart/getColor.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ColorProcessor } from '../context/PluginProvider/ColorProcessor.types';
|
|
2
|
+
declare const getColor: ColorProcessor<'pie'>;
|
|
3
|
+
export default getColor;
|
package/PieChart/getColor.js
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
7
|
-
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
const getColor = series => {
|
|
8
8
|
return dataIndex => {
|
|
9
9
|
return series.data[dataIndex].color;
|
|
10
10
|
};
|
|
11
|
-
}
|
|
11
|
+
};
|
|
12
|
+
var _default = exports.default = getColor;
|
package/PieChart/legend.d.ts
CHANGED
package/PieChart/plugin.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const plugin:
|
|
1
|
+
import type { ChartsPlugin } from '../context/PluginProvider';
|
|
2
|
+
export declare const plugin: ChartsPlugin<'pie'>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { ResponsiveChartContainerProps } from './ResponsiveChartContainer';
|
|
2
2
|
export declare const useResponsiveChartContainerProps: (props: ResponsiveChartContainerProps, ref: React.ForwardedRef<unknown>) => {
|
|
3
3
|
hasIntrinsicSize: number;
|
|
4
|
-
chartContainerProps: Omit<import("..").ChartsSurfaceProps & Omit<import("../internals").SeriesProviderProps, "seriesFormatters"> & Omit<import("../internals").DrawingProviderProps, "svgRef"> & Pick<import("../internals").CartesianContextProviderProps, "dataset"> & import("..").ZAxisContextProviderProps & import("..").HighlightedProviderProps, "children"> & {
|
|
4
|
+
chartContainerProps: Omit<import("..").ChartsSurfaceProps & Omit<import("../internals").SeriesProviderProps, "seriesFormatters"> & Omit<import("../internals").DrawingProviderProps, "svgRef"> & Pick<import("../internals").CartesianContextProviderProps, "dataset"> & import("..").ZAxisContextProviderProps & import("..").HighlightedProviderProps & import("../internals").PluginProviderProps, "children"> & {
|
|
5
5
|
xAxis?: import("../internals").MakeOptional<import("..").AxisConfig<import("..").ScaleName, any, import("..").ChartsXAxisProps>, "id">[];
|
|
6
6
|
yAxis?: import("../internals").MakeOptional<import("..").AxisConfig<import("..").ScaleName, any, import("..").ChartsYAxisProps>, "id">[];
|
|
7
7
|
children?: import("react").ReactNode;
|
|
8
|
-
plugins?: import("..").ChartsPluginType<import("../internals").ChartSeriesType>[];
|
|
9
8
|
} & {
|
|
10
9
|
ref: React.ForwardedRef<unknown>;
|
|
11
10
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const formatter:
|
|
1
|
+
import { SeriesFormatter } from '../context/PluginProvider/SeriesFormatter.types';
|
|
2
|
+
declare const formatter: SeriesFormatter<'scatter'>;
|
|
3
3
|
export default formatter;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default function getColor(series: DefaultizedScatterSeriesType, xAxis?: AxisDefaultized, yAxis?: AxisDefaultized, zAxis?: ZAxisDefaultized): (dataIndex: number) => string;
|
|
1
|
+
import { ColorProcessor } from '../context/PluginProvider/ColorProcessor.types';
|
|
2
|
+
declare const getColor: ColorProcessor<'scatter'>;
|
|
3
|
+
export default getColor;
|
package/ScatterChart/getColor.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
7
|
-
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
const getColor = (series, xAxis, yAxis, zAxis) => {
|
|
8
8
|
const zColorScale = zAxis?.colorScale;
|
|
9
9
|
const yColorScale = yAxis?.colorScale;
|
|
10
10
|
const xColorScale = xAxis?.colorScale;
|
|
@@ -45,4 +45,5 @@ function getColor(series, xAxis, yAxis, zAxis) {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
return () => series.color;
|
|
48
|
-
}
|
|
48
|
+
};
|
|
49
|
+
var _default = exports.default = getColor;
|
package/ScatterChart/legend.d.ts
CHANGED
package/ScatterChart/plugin.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const plugin:
|
|
1
|
+
import type { ChartsPlugin } from '../context/PluginProvider';
|
|
2
|
+
export declare const plugin: ChartsPlugin<'scatter'>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AxisConfig, ChartsXAxisProps, ChartsYAxisProps, ScaleName } from '../../models/axis';
|
|
3
3
|
import { DatasetType } from '../../models/seriesType/config';
|
|
4
|
-
import { ExtremumGettersConfig } from '../../models';
|
|
5
4
|
export type CartesianContextProviderProps = {
|
|
6
5
|
/**
|
|
7
6
|
* The configuration of the x-axes.
|
|
@@ -19,14 +18,6 @@ export type CartesianContextProviderProps = {
|
|
|
19
18
|
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
20
19
|
*/
|
|
21
20
|
dataset?: DatasetType;
|
|
22
|
-
/**
|
|
23
|
-
* An object with x-axis extremum getters per series type.
|
|
24
|
-
*/
|
|
25
|
-
xExtremumGetters: ExtremumGettersConfig;
|
|
26
|
-
/**
|
|
27
|
-
* An object with y-axis extremum getters per series type.
|
|
28
|
-
*/
|
|
29
|
-
yExtremumGetters: ExtremumGettersConfig;
|
|
30
21
|
children: React.ReactNode;
|
|
31
22
|
};
|
|
32
23
|
declare function CartesianContextProvider(props: CartesianContextProviderProps): React.JSX.Element;
|