@mui/x-charts 9.0.0 → 9.0.2
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 +27 -9
- package/BarChart/BarChart.mjs +27 -9
- package/BarChart/BarElement.js +1 -5
- package/BarChart/BarElement.mjs +1 -5
- package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.mts +1 -0
- package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +1 -0
- package/BarChart/seriesConfig/bar/seriesProcessor.js +37 -13
- package/BarChart/seriesConfig/bar/seriesProcessor.mjs +37 -13
- package/CHANGELOG.md +215 -6891
- package/ChartsContainer/ChartsContainer.js +59 -30
- package/ChartsContainer/ChartsContainer.mjs +59 -30
- package/ChartsDataProvider/useChartsDataProviderProps.js +1 -6
- package/ChartsDataProvider/useChartsDataProviderProps.mjs +1 -6
- package/ChartsGrid/styledComponents.js +2 -2
- package/ChartsGrid/styledComponents.mjs +2 -2
- package/ChartsRadialDataProvider/ChartsRadialDataProvider.d.mts +38 -0
- package/ChartsRadialDataProvider/ChartsRadialDataProvider.d.ts +38 -0
- package/ChartsRadialDataProvider/ChartsRadialDataProvider.js +115 -0
- package/ChartsRadialDataProvider/ChartsRadialDataProvider.mjs +109 -0
- package/ChartsRadialDataProvider/ChartsRadialDataProvider.plugins.d.mts +9 -0
- package/ChartsRadialDataProvider/ChartsRadialDataProvider.plugins.d.ts +9 -0
- package/ChartsRadialDataProvider/ChartsRadialDataProvider.plugins.js +13 -0
- package/ChartsRadialDataProvider/ChartsRadialDataProvider.plugins.mjs +7 -0
- package/ChartsRadialDataProvider/index.d.mts +2 -0
- package/ChartsRadialDataProvider/index.d.ts +2 -0
- package/ChartsRadialDataProvider/index.js +27 -0
- package/ChartsRadialDataProvider/index.mjs +2 -0
- package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.d.mts +13 -0
- package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.d.ts +13 -0
- package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.js +46 -0
- package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.mjs +39 -0
- package/ChartsRadialGrid/ChartsRadialGrid.d.mts +33 -0
- package/ChartsRadialGrid/ChartsRadialGrid.d.ts +33 -0
- package/ChartsRadialGrid/ChartsRadialGrid.js +99 -0
- package/ChartsRadialGrid/ChartsRadialGrid.mjs +94 -0
- package/ChartsRadialGrid/ChartsRadiusGrid.d.mts +13 -0
- package/ChartsRadialGrid/ChartsRadiusGrid.d.ts +13 -0
- package/ChartsRadialGrid/ChartsRadiusGrid.js +73 -0
- package/ChartsRadialGrid/ChartsRadiusGrid.mjs +66 -0
- package/ChartsRadialGrid/ChartsRotationGrid.d.mts +13 -0
- package/ChartsRadialGrid/ChartsRotationGrid.d.ts +13 -0
- package/ChartsRadialGrid/ChartsRotationGrid.js +65 -0
- package/ChartsRadialGrid/ChartsRotationGrid.mjs +58 -0
- package/ChartsRadialGrid/chartsRadialGridClasses.d.mts +13 -0
- package/ChartsRadialGrid/chartsRadialGridClasses.d.ts +13 -0
- package/ChartsRadialGrid/chartsRadialGridClasses.js +14 -0
- package/ChartsRadialGrid/chartsRadialGridClasses.mjs +6 -0
- package/ChartsRadialGrid/index.d.mts +3 -0
- package/ChartsRadialGrid/index.d.ts +3 -0
- package/ChartsRadialGrid/index.js +19 -0
- package/ChartsRadialGrid/index.mjs +2 -0
- package/ChartsRadialGrid/styledComponents.d.mts +4 -0
- package/ChartsRadialGrid/styledComponents.d.ts +4 -0
- package/ChartsRadialGrid/styledComponents.js +50 -0
- package/ChartsRadialGrid/styledComponents.mjs +44 -0
- package/ChartsXAxis/useAxisTicksProps.d.mts +407 -326
- package/ChartsXAxis/useAxisTicksProps.d.ts +407 -326
- package/ChartsYAxis/useAxisTicksProps.d.mts +407 -326
- package/ChartsYAxis/useAxisTicksProps.d.ts +407 -326
- package/LineChart/LineChart.d.mts +1 -2
- package/LineChart/LineChart.d.ts +1 -2
- package/LineChart/LineChart.js +27 -9
- package/LineChart/LineChart.mjs +27 -9
- package/LineChart/seriesConfig/seriesProcessor.js +37 -13
- package/LineChart/seriesConfig/seriesProcessor.mjs +37 -13
- package/RadarChart/RadarAxis/useRadarAxis.d.mts +1 -1
- package/RadarChart/RadarAxis/useRadarAxis.d.ts +1 -1
- package/RadarChart/RadarAxis/useRadarAxis.js +2 -2
- package/RadarChart/RadarAxis/useRadarAxis.mjs +2 -2
- package/ScatterChart/Scatter.d.mts +11 -0
- package/ScatterChart/Scatter.d.ts +11 -0
- package/ScatterChart/Scatter.js +11 -0
- package/ScatterChart/Scatter.mjs +14 -0
- package/ScatterChart/ScatterChart.js +29 -10
- package/ScatterChart/ScatterChart.mjs +29 -10
- package/ScatterChart/seriesConfig/seriesProcessor.js +9 -4
- package/ScatterChart/seriesConfig/seriesProcessor.mjs +9 -4
- package/SparkLineChart/SparkLineChart.js +27 -9
- package/SparkLineChart/SparkLineChart.mjs +27 -9
- package/hooks/useTicks.d.mts +1 -1
- package/hooks/useTicks.d.ts +1 -1
- package/hooks/useTicks.js +21 -3
- package/hooks/useTicks.mjs +21 -3
- package/index.d.mts +2 -0
- package/index.d.ts +2 -0
- package/index.js +25 -1
- package/index.mjs +3 -1
- package/internals/material/index.js +6 -1
- package/internals/material/index.mjs +6 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +8 -12
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.mjs +8 -12
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +1 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +1 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +7 -4
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.mjs +8 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.js +3 -3
- package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.mjs +3 -3
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +3 -3
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.mjs +3 -3
- package/models/axis.d.mts +11 -2
- package/models/axis.d.ts +11 -2
- package/models/seriesType/bar.d.mts +9 -0
- package/models/seriesType/bar.d.ts +9 -0
- package/models/seriesType/line.d.mts +9 -0
- package/models/seriesType/line.d.ts +9 -0
- package/models/seriesType/scatter.d.mts +9 -0
- package/models/seriesType/scatter.d.ts +9 -0
- package/models/slots/chartsBaseSlotProps.d.mts +17 -0
- package/models/slots/chartsBaseSlotProps.d.ts +17 -0
- package/models/slots/chartsBaseSlots.d.mts +7 -1
- package/models/slots/chartsBaseSlots.d.ts +7 -1
- package/models/z-axis.d.mts +9 -0
- package/models/z-axis.d.ts +9 -0
- package/package.json +31 -3
- package/themeAugmentation/components.d.mts +4 -0
- package/themeAugmentation/components.d.ts +4 -0
- package/themeAugmentation/overrides.d.mts +2 -0
- package/themeAugmentation/overrides.d.ts +2 -0
- package/themeAugmentation/props.d.mts +2 -0
- package/themeAugmentation/props.d.ts +2 -0
- package/utils/epsilon.d.mts +1 -0
- package/utils/epsilon.d.ts +1 -0
- package/utils/epsilon.js +7 -0
- package/utils/epsilon.mjs +1 -0
package/models/axis.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ import type * as React from 'react';
|
|
|
2
2
|
import type { ScaleBand, ScaleLinear, ScaleLogarithmic, ScaleOrdinal, ScalePoint, ScalePower, ScaleSequential, ScaleThreshold, ScaleTime, ScaleSymLog, NumberValue } from '@mui/x-charts-vendor/d3-scale';
|
|
3
3
|
import { type SxProps } from '@mui/system/styleFunctionSx';
|
|
4
4
|
import { type HasProperty, type MakeOptional, type MakeRequired } from '@mui/x-internals/types';
|
|
5
|
+
import { type DatasetElementType } from "./seriesType/config.mjs";
|
|
5
6
|
import type { DefaultizedZoomOptions } from "../internals/plugins/featurePlugins/useChartCartesianAxis/index.mjs";
|
|
6
7
|
import { type ChartsAxisClasses } from "../ChartsAxis/axisClasses.mjs";
|
|
7
8
|
import type { TickParams } from "../hooks/useTicks.mjs";
|
|
@@ -446,6 +447,14 @@ type CommonAxisConfig<S extends ScaleName = ScaleName, V = any> = {
|
|
|
446
447
|
* The key used to retrieve `data` from the `dataset` prop.
|
|
447
448
|
*/
|
|
448
449
|
dataKey?: string;
|
|
450
|
+
/**
|
|
451
|
+
* A function to extract and transform the value from the `dataset` item.
|
|
452
|
+
* It receives the full dataset item and should return the axis value.
|
|
453
|
+
* Can be used as an alternative to `dataKey`.
|
|
454
|
+
* @param {DatasetElementType<unknown>} item The full dataset item.
|
|
455
|
+
* @returns {V} The transformed value.
|
|
456
|
+
*/
|
|
457
|
+
valueGetter?: (item: DatasetElementType<unknown>) => V;
|
|
449
458
|
/**
|
|
450
459
|
* Formats the axis value.
|
|
451
460
|
* @param {V} value The value to format.
|
|
@@ -564,8 +573,8 @@ export interface AxisItemIdentifier {
|
|
|
564
573
|
}
|
|
565
574
|
export type XAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<AxisConfig<S, V, ChartsXAxisProps>, 'id'> : never;
|
|
566
575
|
export type YAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<AxisConfig<S, V, ChartsYAxisProps>, 'id'> : never;
|
|
567
|
-
export type RotationAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? AxisConfig<S, V, ChartsRotationAxisProps> : never;
|
|
568
|
-
export type RadiusAxis<S extends 'linear' = 'linear', V = any> = S extends 'linear' ? AxisConfig<S, V, ChartsRadiusAxisProps> : never;
|
|
576
|
+
export type RotationAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<AxisConfig<S, V, ChartsRotationAxisProps>, 'id'> : never;
|
|
577
|
+
export type RadiusAxis<S extends 'linear' = 'linear', V = any> = S extends 'linear' ? MakeOptional<AxisConfig<S, V, ChartsRadiusAxisProps>, 'id'> : never;
|
|
569
578
|
/**
|
|
570
579
|
* The axis configuration with missing values filled with default values.
|
|
571
580
|
*/
|
package/models/axis.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type * as React from 'react';
|
|
|
2
2
|
import type { ScaleBand, ScaleLinear, ScaleLogarithmic, ScaleOrdinal, ScalePoint, ScalePower, ScaleSequential, ScaleThreshold, ScaleTime, ScaleSymLog, NumberValue } from '@mui/x-charts-vendor/d3-scale';
|
|
3
3
|
import { type SxProps } from '@mui/system/styleFunctionSx';
|
|
4
4
|
import { type HasProperty, type MakeOptional, type MakeRequired } from '@mui/x-internals/types';
|
|
5
|
+
import { type DatasetElementType } from "./seriesType/config.js";
|
|
5
6
|
import type { DefaultizedZoomOptions } from "../internals/plugins/featurePlugins/useChartCartesianAxis/index.js";
|
|
6
7
|
import { type ChartsAxisClasses } from "../ChartsAxis/axisClasses.js";
|
|
7
8
|
import type { TickParams } from "../hooks/useTicks.js";
|
|
@@ -446,6 +447,14 @@ type CommonAxisConfig<S extends ScaleName = ScaleName, V = any> = {
|
|
|
446
447
|
* The key used to retrieve `data` from the `dataset` prop.
|
|
447
448
|
*/
|
|
448
449
|
dataKey?: string;
|
|
450
|
+
/**
|
|
451
|
+
* A function to extract and transform the value from the `dataset` item.
|
|
452
|
+
* It receives the full dataset item and should return the axis value.
|
|
453
|
+
* Can be used as an alternative to `dataKey`.
|
|
454
|
+
* @param {DatasetElementType<unknown>} item The full dataset item.
|
|
455
|
+
* @returns {V} The transformed value.
|
|
456
|
+
*/
|
|
457
|
+
valueGetter?: (item: DatasetElementType<unknown>) => V;
|
|
449
458
|
/**
|
|
450
459
|
* Formats the axis value.
|
|
451
460
|
* @param {V} value The value to format.
|
|
@@ -564,8 +573,8 @@ export interface AxisItemIdentifier {
|
|
|
564
573
|
}
|
|
565
574
|
export type XAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<AxisConfig<S, V, ChartsXAxisProps>, 'id'> : never;
|
|
566
575
|
export type YAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<AxisConfig<S, V, ChartsYAxisProps>, 'id'> : never;
|
|
567
|
-
export type RotationAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? AxisConfig<S, V, ChartsRotationAxisProps> : never;
|
|
568
|
-
export type RadiusAxis<S extends 'linear' = 'linear', V = any> = S extends 'linear' ? AxisConfig<S, V, ChartsRadiusAxisProps> : never;
|
|
576
|
+
export type RotationAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<AxisConfig<S, V, ChartsRotationAxisProps>, 'id'> : never;
|
|
577
|
+
export type RadiusAxis<S extends 'linear' = 'linear', V = any> = S extends 'linear' ? MakeOptional<AxisConfig<S, V, ChartsRadiusAxisProps>, 'id'> : never;
|
|
569
578
|
/**
|
|
570
579
|
* The axis configuration with missing values filled with default values.
|
|
571
580
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type DefaultizedProps } from '@mui/x-internals/types';
|
|
2
2
|
import type { StackOffsetType } from "../stacking.mjs";
|
|
3
3
|
import { type CartesianSeriesType, type CommonSeriesType, type CommonDefaultizedProps, type StackableSeriesType, type SeriesId } from "./common.mjs";
|
|
4
|
+
import { type DatasetElementType } from "./config.mjs";
|
|
4
5
|
import { type BarItem, type BarLabelContext } from "../../BarChart/index.mjs";
|
|
5
6
|
export type BarValueType = number;
|
|
6
7
|
export interface BarSeriesType extends CommonSeriesType<BarValueType | null, 'bar'>, CartesianSeriesType, StackableSeriesType {
|
|
@@ -13,6 +14,14 @@ export interface BarSeriesType extends CommonSeriesType<BarValueType | null, 'ba
|
|
|
13
14
|
* The key used to retrieve data from the dataset.
|
|
14
15
|
*/
|
|
15
16
|
dataKey?: string;
|
|
17
|
+
/**
|
|
18
|
+
* A function to extract and transform the value from the `dataset` item.
|
|
19
|
+
* It receives the full dataset item and should return the series value.
|
|
20
|
+
* Can be used as an alternative to `dataKey`.
|
|
21
|
+
* @param {DatasetElementType<unknown>} item The full dataset item.
|
|
22
|
+
* @returns {BarValueType | null} The transformed value.
|
|
23
|
+
*/
|
|
24
|
+
valueGetter?: (item: DatasetElementType<unknown>) => BarValueType | null;
|
|
16
25
|
/**
|
|
17
26
|
* The label to display on the tooltip or the legend. It can be a string or a function.
|
|
18
27
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type DefaultizedProps } from '@mui/x-internals/types';
|
|
2
2
|
import type { StackOffsetType } from "../stacking.js";
|
|
3
3
|
import { type CartesianSeriesType, type CommonSeriesType, type CommonDefaultizedProps, type StackableSeriesType, type SeriesId } from "./common.js";
|
|
4
|
+
import { type DatasetElementType } from "./config.js";
|
|
4
5
|
import { type BarItem, type BarLabelContext } from "../../BarChart/index.js";
|
|
5
6
|
export type BarValueType = number;
|
|
6
7
|
export interface BarSeriesType extends CommonSeriesType<BarValueType | null, 'bar'>, CartesianSeriesType, StackableSeriesType {
|
|
@@ -13,6 +14,14 @@ export interface BarSeriesType extends CommonSeriesType<BarValueType | null, 'ba
|
|
|
13
14
|
* The key used to retrieve data from the dataset.
|
|
14
15
|
*/
|
|
15
16
|
dataKey?: string;
|
|
17
|
+
/**
|
|
18
|
+
* A function to extract and transform the value from the `dataset` item.
|
|
19
|
+
* It receives the full dataset item and should return the series value.
|
|
20
|
+
* Can be used as an alternative to `dataKey`.
|
|
21
|
+
* @param {DatasetElementType<unknown>} item The full dataset item.
|
|
22
|
+
* @returns {BarValueType | null} The transformed value.
|
|
23
|
+
*/
|
|
24
|
+
valueGetter?: (item: DatasetElementType<unknown>) => BarValueType | null;
|
|
16
25
|
/**
|
|
17
26
|
* The label to display on the tooltip or the legend. It can be a string or a function.
|
|
18
27
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type DefaultizedProps } from '@mui/x-internals/types';
|
|
2
2
|
import type { StackOffsetType } from "../stacking.mjs";
|
|
3
3
|
import { type CartesianSeriesType, type CommonDefaultizedProps, type CommonSeriesType, type SeriesId, type StackableSeriesType } from "./common.mjs";
|
|
4
|
+
import { type DatasetElementType } from "./config.mjs";
|
|
4
5
|
import { type CurveType } from "../curve.mjs";
|
|
5
6
|
export interface ShowMarkParams<AxisValue = number | Date> {
|
|
6
7
|
/**
|
|
@@ -35,6 +36,14 @@ export interface LineSeriesType extends CommonSeriesType<number | null, 'line'>,
|
|
|
35
36
|
* The key used to retrieve data from the dataset.
|
|
36
37
|
*/
|
|
37
38
|
dataKey?: string;
|
|
39
|
+
/**
|
|
40
|
+
* A function to extract and transform the value from the `dataset` item.
|
|
41
|
+
* It receives the full dataset item and should return the series value.
|
|
42
|
+
* Can be used as an alternative to `dataKey`.
|
|
43
|
+
* @param {DatasetElementType<unknown>} item The full dataset item.
|
|
44
|
+
* @returns {number | null} The transformed value.
|
|
45
|
+
*/
|
|
46
|
+
valueGetter?: (item: DatasetElementType<unknown>) => number | null;
|
|
38
47
|
/**
|
|
39
48
|
* If `true`, the series is rendered as an area instead of a line.
|
|
40
49
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type DefaultizedProps } from '@mui/x-internals/types';
|
|
2
2
|
import type { StackOffsetType } from "../stacking.js";
|
|
3
3
|
import { type CartesianSeriesType, type CommonDefaultizedProps, type CommonSeriesType, type SeriesId, type StackableSeriesType } from "./common.js";
|
|
4
|
+
import { type DatasetElementType } from "./config.js";
|
|
4
5
|
import { type CurveType } from "../curve.js";
|
|
5
6
|
export interface ShowMarkParams<AxisValue = number | Date> {
|
|
6
7
|
/**
|
|
@@ -35,6 +36,14 @@ export interface LineSeriesType extends CommonSeriesType<number | null, 'line'>,
|
|
|
35
36
|
* The key used to retrieve data from the dataset.
|
|
36
37
|
*/
|
|
37
38
|
dataKey?: string;
|
|
39
|
+
/**
|
|
40
|
+
* A function to extract and transform the value from the `dataset` item.
|
|
41
|
+
* It receives the full dataset item and should return the series value.
|
|
42
|
+
* Can be used as an alternative to `dataKey`.
|
|
43
|
+
* @param {DatasetElementType<unknown>} item The full dataset item.
|
|
44
|
+
* @returns {number | null} The transformed value.
|
|
45
|
+
*/
|
|
46
|
+
valueGetter?: (item: DatasetElementType<unknown>) => number | null;
|
|
38
47
|
/**
|
|
39
48
|
* If `true`, the series is rendered as an area instead of a line.
|
|
40
49
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type DefaultizedProps, type MakeRequired } from '@mui/x-internals/types';
|
|
2
2
|
import { type CartesianSeriesType, type CommonDefaultizedProps, type CommonSeriesType, type SeriesId } from "./common.mjs";
|
|
3
|
+
import { type DatasetElementType } from "./config.mjs";
|
|
3
4
|
export type ScatterValueType = {
|
|
4
5
|
x: number;
|
|
5
6
|
y: number;
|
|
@@ -24,6 +25,14 @@ export interface ScatterSeriesType extends CommonSeriesType<ScatterValueType | n
|
|
|
24
25
|
* The id of the z-axis used to render the series.
|
|
25
26
|
*/
|
|
26
27
|
zAxisId?: string;
|
|
28
|
+
/**
|
|
29
|
+
* A function to extract and transform the value from the `dataset` item.
|
|
30
|
+
* It receives the full dataset item and should return a scatter value.
|
|
31
|
+
* Can be used as an alternative to `datasetKeys`.
|
|
32
|
+
* @param {DatasetElementType<unknown>} item The full dataset item.
|
|
33
|
+
* @returns {ScatterValueType} The transformed value.
|
|
34
|
+
*/
|
|
35
|
+
valueGetter?: (item: DatasetElementType<unknown>) => ScatterValueType;
|
|
27
36
|
/**
|
|
28
37
|
* The keys used to retrieve data from the dataset.
|
|
29
38
|
*
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type DefaultizedProps, type MakeRequired } from '@mui/x-internals/types';
|
|
2
2
|
import { type CartesianSeriesType, type CommonDefaultizedProps, type CommonSeriesType, type SeriesId } from "./common.js";
|
|
3
|
+
import { type DatasetElementType } from "./config.js";
|
|
3
4
|
export type ScatterValueType = {
|
|
4
5
|
x: number;
|
|
5
6
|
y: number;
|
|
@@ -24,6 +25,14 @@ export interface ScatterSeriesType extends CommonSeriesType<ScatterValueType | n
|
|
|
24
25
|
* The id of the z-axis used to render the series.
|
|
25
26
|
*/
|
|
26
27
|
zAxisId?: string;
|
|
28
|
+
/**
|
|
29
|
+
* A function to extract and transform the value from the `dataset` item.
|
|
30
|
+
* It receives the full dataset item and should return a scatter value.
|
|
31
|
+
* Can be used as an alternative to `datasetKeys`.
|
|
32
|
+
* @param {DatasetElementType<unknown>} item The full dataset item.
|
|
33
|
+
* @returns {ScatterValueType} The transformed value.
|
|
34
|
+
*/
|
|
35
|
+
valueGetter?: (item: DatasetElementType<unknown>) => ScatterValueType;
|
|
27
36
|
/**
|
|
28
37
|
* The keys used to retrieve data from the dataset.
|
|
29
38
|
*
|
|
@@ -14,6 +14,7 @@ export type ChartBaseButtonProps = ChartBaseCommonProps & {
|
|
|
14
14
|
id?: string;
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
tabIndex?: number;
|
|
17
|
+
size?: 'small' | 'medium' | 'large';
|
|
17
18
|
};
|
|
18
19
|
export type ChartBaseIconButtonProps = ChartBaseCommonProps & {
|
|
19
20
|
ref?: React.Ref<HTMLButtonElement>;
|
|
@@ -21,4 +22,20 @@ export type ChartBaseIconButtonProps = ChartBaseCommonProps & {
|
|
|
21
22
|
disabled?: boolean;
|
|
22
23
|
tabIndex?: number;
|
|
23
24
|
size?: 'small' | 'medium' | 'large';
|
|
25
|
+
};
|
|
26
|
+
export type ChartBaseToggleButtonProps = ChartBaseCommonProps & {
|
|
27
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
28
|
+
id?: string;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
tabIndex?: number;
|
|
31
|
+
size?: 'small' | 'medium' | 'large';
|
|
32
|
+
selected?: boolean;
|
|
33
|
+
value: unknown;
|
|
34
|
+
};
|
|
35
|
+
export type ChartBaseToggleButtonGroupProps = ChartBaseCommonProps<HTMLDivElement> & {
|
|
36
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
37
|
+
value?: unknown;
|
|
38
|
+
exclusive?: boolean;
|
|
39
|
+
size?: 'small' | 'medium' | 'large';
|
|
40
|
+
onChange?: (event: React.MouseEvent<HTMLElement>, value: unknown) => void;
|
|
24
41
|
};
|
|
@@ -14,6 +14,7 @@ export type ChartBaseButtonProps = ChartBaseCommonProps & {
|
|
|
14
14
|
id?: string;
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
tabIndex?: number;
|
|
17
|
+
size?: 'small' | 'medium' | 'large';
|
|
17
18
|
};
|
|
18
19
|
export type ChartBaseIconButtonProps = ChartBaseCommonProps & {
|
|
19
20
|
ref?: React.Ref<HTMLButtonElement>;
|
|
@@ -21,4 +22,20 @@ export type ChartBaseIconButtonProps = ChartBaseCommonProps & {
|
|
|
21
22
|
disabled?: boolean;
|
|
22
23
|
tabIndex?: number;
|
|
23
24
|
size?: 'small' | 'medium' | 'large';
|
|
25
|
+
};
|
|
26
|
+
export type ChartBaseToggleButtonProps = ChartBaseCommonProps & {
|
|
27
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
28
|
+
id?: string;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
tabIndex?: number;
|
|
31
|
+
size?: 'small' | 'medium' | 'large';
|
|
32
|
+
selected?: boolean;
|
|
33
|
+
value: unknown;
|
|
34
|
+
};
|
|
35
|
+
export type ChartBaseToggleButtonGroupProps = ChartBaseCommonProps<HTMLDivElement> & {
|
|
36
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
37
|
+
value?: unknown;
|
|
38
|
+
exclusive?: boolean;
|
|
39
|
+
size?: 'small' | 'medium' | 'large';
|
|
40
|
+
onChange?: (event: React.MouseEvent<HTMLElement>, value: unknown) => void;
|
|
24
41
|
};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
import { type ChartBaseButtonProps, type ChartBaseIconButtonProps } from "./chartsBaseSlotProps.mjs";
|
|
2
|
+
import { type ChartBaseButtonProps, type ChartBaseIconButtonProps, type ChartBaseToggleButtonProps, type ChartBaseToggleButtonGroupProps } from "./chartsBaseSlotProps.mjs";
|
|
3
3
|
export interface ChartsBaseSlots {
|
|
4
4
|
baseButton: React.ComponentType<ChartBaseButtonProps>;
|
|
5
5
|
baseIconButton: React.ComponentType<ChartBaseIconButtonProps>;
|
|
6
|
+
/**
|
|
7
|
+
* Note: MUI's `ToggleButton` has an incompatible `href` prop, so it must be cast:
|
|
8
|
+
* `ToggleButton as unknown as React.ComponentType<ChartBaseToggleButtonProps>`.
|
|
9
|
+
*/
|
|
10
|
+
baseToggleButton: React.ComponentType<ChartBaseToggleButtonProps>;
|
|
11
|
+
baseToggleButtonGroup: React.ComponentType<ChartBaseToggleButtonGroupProps>;
|
|
6
12
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
import { type ChartBaseButtonProps, type ChartBaseIconButtonProps } from "./chartsBaseSlotProps.js";
|
|
2
|
+
import { type ChartBaseButtonProps, type ChartBaseIconButtonProps, type ChartBaseToggleButtonProps, type ChartBaseToggleButtonGroupProps } from "./chartsBaseSlotProps.js";
|
|
3
3
|
export interface ChartsBaseSlots {
|
|
4
4
|
baseButton: React.ComponentType<ChartBaseButtonProps>;
|
|
5
5
|
baseIconButton: React.ComponentType<ChartBaseIconButtonProps>;
|
|
6
|
+
/**
|
|
7
|
+
* Note: MUI's `ToggleButton` has an incompatible `href` prop, so it must be cast:
|
|
8
|
+
* `ToggleButton as unknown as React.ComponentType<ChartBaseToggleButtonProps>`.
|
|
9
|
+
*/
|
|
10
|
+
baseToggleButton: React.ComponentType<ChartBaseToggleButtonProps>;
|
|
11
|
+
baseToggleButtonGroup: React.ComponentType<ChartBaseToggleButtonGroupProps>;
|
|
6
12
|
}
|
package/models/z-axis.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ScaleOrdinal, ScaleSequential, ScaleThreshold } from '@mui/x-charts-vendor/d3-scale';
|
|
2
2
|
import { type ContinuousColorConfig, type OrdinalColorConfig, type PiecewiseColorConfig } from "./colorMapping.mjs";
|
|
3
|
+
import { type DatasetElementType } from "./seriesType/config.mjs";
|
|
3
4
|
export interface ZAxisConfig<V = any> {
|
|
4
5
|
id: string;
|
|
5
6
|
data?: readonly V[];
|
|
@@ -7,6 +8,14 @@ export interface ZAxisConfig<V = any> {
|
|
|
7
8
|
* The key used to retrieve `data` from the `dataset` prop.
|
|
8
9
|
*/
|
|
9
10
|
dataKey?: string;
|
|
11
|
+
/**
|
|
12
|
+
* A function to extract and transform the value from the `dataset` item.
|
|
13
|
+
* It receives the full dataset item and should return the axis value.
|
|
14
|
+
* Can be used as an alternative to `dataKey`.
|
|
15
|
+
* @param {DatasetElementType<unknown>} item The full dataset item.
|
|
16
|
+
* @returns {V} The transformed value.
|
|
17
|
+
*/
|
|
18
|
+
valueGetter?: (item: DatasetElementType<unknown>) => V;
|
|
10
19
|
/**
|
|
11
20
|
* The minimal value of the scale.
|
|
12
21
|
*/
|
package/models/z-axis.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ScaleOrdinal, ScaleSequential, ScaleThreshold } from '@mui/x-charts-vendor/d3-scale';
|
|
2
2
|
import { type ContinuousColorConfig, type OrdinalColorConfig, type PiecewiseColorConfig } from "./colorMapping.js";
|
|
3
|
+
import { type DatasetElementType } from "./seriesType/config.js";
|
|
3
4
|
export interface ZAxisConfig<V = any> {
|
|
4
5
|
id: string;
|
|
5
6
|
data?: readonly V[];
|
|
@@ -7,6 +8,14 @@ export interface ZAxisConfig<V = any> {
|
|
|
7
8
|
* The key used to retrieve `data` from the `dataset` prop.
|
|
8
9
|
*/
|
|
9
10
|
dataKey?: string;
|
|
11
|
+
/**
|
|
12
|
+
* A function to extract and transform the value from the `dataset` item.
|
|
13
|
+
* It receives the full dataset item and should return the axis value.
|
|
14
|
+
* Can be used as an alternative to `dataKey`.
|
|
15
|
+
* @param {DatasetElementType<unknown>} item The full dataset item.
|
|
16
|
+
* @returns {V} The transformed value.
|
|
17
|
+
*/
|
|
18
|
+
valueGetter?: (item: DatasetElementType<unknown>) => V;
|
|
10
19
|
/**
|
|
11
20
|
* The minimal value of the scale.
|
|
12
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-charts",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.2",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The community edition of MUI X Charts components.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"reselect": "^5.1.1",
|
|
36
36
|
"use-sync-external-store": "^1.6.0",
|
|
37
37
|
"@mui/x-charts-vendor": "^9.0.0",
|
|
38
|
-
"@mui/x-
|
|
39
|
-
"@mui/x-
|
|
38
|
+
"@mui/x-internals": "^9.0.0",
|
|
39
|
+
"@mui/x-internal-gestures": "^9.0.2"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@emotion/react": "^11.9.0",
|
|
@@ -256,6 +256,34 @@
|
|
|
256
256
|
"default": "./ChartsOverlay/index.mjs"
|
|
257
257
|
}
|
|
258
258
|
},
|
|
259
|
+
"./ChartsRadialDataProvider": {
|
|
260
|
+
"import": {
|
|
261
|
+
"types": "./ChartsRadialDataProvider/index.d.mts",
|
|
262
|
+
"default": "./ChartsRadialDataProvider/index.mjs"
|
|
263
|
+
},
|
|
264
|
+
"require": {
|
|
265
|
+
"types": "./ChartsRadialDataProvider/index.d.ts",
|
|
266
|
+
"default": "./ChartsRadialDataProvider/index.js"
|
|
267
|
+
},
|
|
268
|
+
"default": {
|
|
269
|
+
"types": "./ChartsRadialDataProvider/index.d.mts",
|
|
270
|
+
"default": "./ChartsRadialDataProvider/index.mjs"
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"./ChartsRadialGrid": {
|
|
274
|
+
"import": {
|
|
275
|
+
"types": "./ChartsRadialGrid/index.d.mts",
|
|
276
|
+
"default": "./ChartsRadialGrid/index.mjs"
|
|
277
|
+
},
|
|
278
|
+
"require": {
|
|
279
|
+
"types": "./ChartsRadialGrid/index.d.ts",
|
|
280
|
+
"default": "./ChartsRadialGrid/index.js"
|
|
281
|
+
},
|
|
282
|
+
"default": {
|
|
283
|
+
"types": "./ChartsRadialGrid/index.d.mts",
|
|
284
|
+
"default": "./ChartsRadialGrid/index.mjs"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
259
287
|
"./ChartsReferenceLine": {
|
|
260
288
|
"import": {
|
|
261
289
|
"types": "./ChartsReferenceLine/index.d.mts",
|
|
@@ -18,6 +18,10 @@ export interface ChartsComponents<Theme = unknown> {
|
|
|
18
18
|
defaultProps?: ComponentsProps['MuiChartsGrid'];
|
|
19
19
|
styleOverrides?: ComponentsOverrides<Theme>['MuiChartsGrid'];
|
|
20
20
|
};
|
|
21
|
+
MuiRadialChartsGrid?: {
|
|
22
|
+
defaultProps?: ComponentsProps['MuiRadialChartsGrid'];
|
|
23
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiRadialChartsGrid'];
|
|
24
|
+
};
|
|
21
25
|
MuiChartsLegend?: {
|
|
22
26
|
defaultProps?: ComponentsProps['MuiChartsLegend'];
|
|
23
27
|
styleOverrides?: ComponentsOverrides<Theme>['MuiChartsLegend'];
|
|
@@ -18,6 +18,10 @@ export interface ChartsComponents<Theme = unknown> {
|
|
|
18
18
|
defaultProps?: ComponentsProps['MuiChartsGrid'];
|
|
19
19
|
styleOverrides?: ComponentsOverrides<Theme>['MuiChartsGrid'];
|
|
20
20
|
};
|
|
21
|
+
MuiRadialChartsGrid?: {
|
|
22
|
+
defaultProps?: ComponentsProps['MuiRadialChartsGrid'];
|
|
23
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiRadialChartsGrid'];
|
|
24
|
+
};
|
|
21
25
|
MuiChartsLegend?: {
|
|
22
26
|
defaultProps?: ComponentsProps['MuiChartsLegend'];
|
|
23
27
|
styleOverrides?: ComponentsOverrides<Theme>['MuiChartsLegend'];
|
|
@@ -4,6 +4,7 @@ import { type ScatterClassKey } from "../ScatterChart/scatterClasses.mjs";
|
|
|
4
4
|
import { type ChartsAxisHighlightClassKey } from "../ChartsAxisHighlight/index.mjs";
|
|
5
5
|
import { type ChartsGridClassKey } from "../ChartsGrid/index.mjs";
|
|
6
6
|
import { type ChartsTooltipClassKey } from "../ChartsTooltip/index.mjs";
|
|
7
|
+
import { type ChartsRadialGridClassKey } from "../ChartsRadialGrid/index.mjs";
|
|
7
8
|
export interface ChartsComponentNameToClassKey {
|
|
8
9
|
MuiChartsAxis: 'root';
|
|
9
10
|
MuiChartsXAxis: 'root';
|
|
@@ -11,6 +12,7 @@ export interface ChartsComponentNameToClassKey {
|
|
|
11
12
|
MuiChartsAxisHighlight: ChartsAxisHighlightClassKey;
|
|
12
13
|
MuiChartsLegend: 'root';
|
|
13
14
|
MuiChartsGrid: ChartsGridClassKey;
|
|
15
|
+
MuiRadialChartsGrid: ChartsRadialGridClassKey;
|
|
14
16
|
MuiChartsTooltip: ChartsTooltipClassKey;
|
|
15
17
|
MuiChartsSurface: 'root';
|
|
16
18
|
MuiBarPlot: 'root';
|
|
@@ -4,6 +4,7 @@ import { type ScatterClassKey } from "../ScatterChart/scatterClasses.js";
|
|
|
4
4
|
import { type ChartsAxisHighlightClassKey } from "../ChartsAxisHighlight/index.js";
|
|
5
5
|
import { type ChartsGridClassKey } from "../ChartsGrid/index.js";
|
|
6
6
|
import { type ChartsTooltipClassKey } from "../ChartsTooltip/index.js";
|
|
7
|
+
import { type ChartsRadialGridClassKey } from "../ChartsRadialGrid/index.js";
|
|
7
8
|
export interface ChartsComponentNameToClassKey {
|
|
8
9
|
MuiChartsAxis: 'root';
|
|
9
10
|
MuiChartsXAxis: 'root';
|
|
@@ -11,6 +12,7 @@ export interface ChartsComponentNameToClassKey {
|
|
|
11
12
|
MuiChartsAxisHighlight: ChartsAxisHighlightClassKey;
|
|
12
13
|
MuiChartsLegend: 'root';
|
|
13
14
|
MuiChartsGrid: ChartsGridClassKey;
|
|
15
|
+
MuiRadialChartsGrid: ChartsRadialGridClassKey;
|
|
14
16
|
MuiChartsTooltip: ChartsTooltipClassKey;
|
|
15
17
|
MuiChartsSurface: 'root';
|
|
16
18
|
MuiBarPlot: 'root';
|
|
@@ -12,10 +12,12 @@ import { type ChartsLocalizationProviderProps } from "../ChartsLocalizationProvi
|
|
|
12
12
|
import { type ChartsDataProviderProps } from "../ChartsDataProvider/index.mjs";
|
|
13
13
|
import { type ChartsLayerContainerProps } from "../ChartsLayerContainer/index.mjs";
|
|
14
14
|
import { type ChartsSvgLayerProps } from "../ChartsSvgLayer/index.mjs";
|
|
15
|
+
import { type ChartsRadialGridProps } from "../ChartsRadialGrid/index.mjs";
|
|
15
16
|
export interface ChartsComponentsPropsList {
|
|
16
17
|
MuiChartsXAxis: ChartsXAxisProps;
|
|
17
18
|
MuiChartsYAxis: ChartsYAxisProps;
|
|
18
19
|
MuiChartsGrid: ChartsGridProps;
|
|
20
|
+
MuiRadialChartsGrid: ChartsRadialGridProps;
|
|
19
21
|
MuiChartsLegend: ChartsLegendProps;
|
|
20
22
|
MuiChartsLocalizationProvider: ChartsLocalizationProviderProps;
|
|
21
23
|
MuiChartsTooltip: ChartsTooltipProps;
|
|
@@ -12,10 +12,12 @@ import { type ChartsLocalizationProviderProps } from "../ChartsLocalizationProvi
|
|
|
12
12
|
import { type ChartsDataProviderProps } from "../ChartsDataProvider/index.js";
|
|
13
13
|
import { type ChartsLayerContainerProps } from "../ChartsLayerContainer/index.js";
|
|
14
14
|
import { type ChartsSvgLayerProps } from "../ChartsSvgLayer/index.js";
|
|
15
|
+
import { type ChartsRadialGridProps } from "../ChartsRadialGrid/index.js";
|
|
15
16
|
export interface ChartsComponentsPropsList {
|
|
16
17
|
MuiChartsXAxis: ChartsXAxisProps;
|
|
17
18
|
MuiChartsYAxis: ChartsYAxisProps;
|
|
18
19
|
MuiChartsGrid: ChartsGridProps;
|
|
20
|
+
MuiRadialChartsGrid: ChartsRadialGridProps;
|
|
19
21
|
MuiChartsLegend: ChartsLegendProps;
|
|
20
22
|
MuiChartsLocalizationProvider: ChartsLocalizationProviderProps;
|
|
21
23
|
MuiChartsTooltip: ChartsTooltipProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EPSILON = 0.001;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EPSILON = 0.001;
|
package/utils/epsilon.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const EPSILON = 0.001;
|