@mui/x-charts 8.13.0 → 8.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/BarChart/BarChart.js +44 -36
  2. package/CHANGELOG.md +171 -1
  3. package/ChartContainer/ChartContainer.js +68 -56
  4. package/ChartsTooltip/ChartsTooltipContainer.js +2 -0
  5. package/ChartsXAxis/useAxisTicksProps.d.ts +197 -355
  6. package/ChartsYAxis/useAxisTicksProps.d.ts +197 -355
  7. package/LineChart/LineChart.js +44 -36
  8. package/PieChart/PieArc.d.ts +18 -4
  9. package/PieChart/PieArc.js +11 -5
  10. package/PieChart/PieArcPlot.js +3 -1
  11. package/ScatterChart/ScatterChart.js +44 -36
  12. package/SparkLineChart/SparkLineChart.js +44 -36
  13. package/esm/BarChart/BarChart.js +44 -36
  14. package/esm/ChartContainer/ChartContainer.js +68 -56
  15. package/esm/ChartsTooltip/ChartsTooltipContainer.js +2 -0
  16. package/esm/ChartsXAxis/useAxisTicksProps.d.ts +197 -355
  17. package/esm/ChartsYAxis/useAxisTicksProps.d.ts +197 -355
  18. package/esm/LineChart/LineChart.js +44 -36
  19. package/esm/PieChart/PieArc.d.ts +18 -4
  20. package/esm/PieChart/PieArc.js +11 -5
  21. package/esm/PieChart/PieArcPlot.js +3 -1
  22. package/esm/ScatterChart/ScatterChart.js +44 -36
  23. package/esm/SparkLineChart/SparkLineChart.js +44 -36
  24. package/esm/hooks/animation/useAnimate.js +5 -3
  25. package/esm/hooks/useScale.d.ts +5 -1
  26. package/esm/index.js +1 -1
  27. package/esm/internals/animation/useAnimateInternal.d.ts +1 -1
  28. package/esm/internals/animation/useAnimateInternal.js +1 -1
  29. package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +8 -8
  30. package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +4 -2
  31. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +9 -11
  32. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -28
  33. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +4 -5
  34. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +3 -24
  35. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +20 -0
  36. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +77 -0
  37. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +4 -65
  38. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +7 -104
  39. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -3
  40. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +31 -39
  41. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +166 -6
  42. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +158 -47
  43. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +10 -3
  44. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +4 -4
  45. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +3 -2
  46. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.types.d.ts +6 -0
  47. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +5 -1
  48. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +9 -1
  49. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +10 -1
  50. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +2 -1
  51. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +2 -2
  52. package/esm/internals/scaleGuards.d.ts +12 -6
  53. package/esm/internals/symlogScale.js +5 -0
  54. package/esm/locales/enUS.js +4 -4
  55. package/esm/locales/ptBR.js +97 -99
  56. package/esm/models/axis.d.ts +39 -17
  57. package/esm/models/axis.js +3 -0
  58. package/hooks/animation/useAnimate.js +4 -3
  59. package/hooks/useScale.d.ts +5 -1
  60. package/index.js +1 -1
  61. package/internals/animation/useAnimateInternal.d.ts +1 -1
  62. package/internals/animation/useAnimateInternal.js +1 -1
  63. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +7 -7
  64. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +4 -2
  65. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +9 -11
  66. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -28
  67. package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +4 -5
  68. package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +3 -25
  69. package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +20 -0
  70. package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +84 -0
  71. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +4 -65
  72. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +8 -108
  73. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -3
  74. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +29 -37
  75. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +166 -6
  76. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +158 -47
  77. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +10 -3
  78. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +4 -4
  79. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +3 -2
  80. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.types.d.ts +6 -0
  81. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +5 -1
  82. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +9 -1
  83. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +11 -2
  84. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +2 -1
  85. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +1 -1
  86. package/internals/scaleGuards.d.ts +12 -6
  87. package/internals/symlogScale.js +5 -0
  88. package/locales/enUS.js +4 -4
  89. package/locales/ptBR.js +97 -99
  90. package/models/axis.d.ts +39 -17
  91. package/models/axis.js +4 -0
  92. package/package.json +6 -6
@@ -1,66 +1,5 @@
1
- import { AxisConfig, AxisId, D3ContinuousScale, D3OrdinalScale, DefaultedAxis } from "../../../../models/axis.js";
2
- import { ChartSeriesType } from "../../../../models/seriesType/config.js";
3
- import { ProcessedSeries } from "../../corePlugins/useChartSeries/index.js";
4
- import { ChartSeriesConfig } from "../../models/index.js";
5
- import { ZoomData } from "./zoom.types.js";
1
+ import { NumberValue } from '@mui/x-charts-vendor/d3-scale';
2
+ import { AxisConfig, ChartsAxisProps, D3Scale, DefaultedAxis, ScaleName } from "../../../../models/axis.js";
6
3
  import { ChartDrawingArea } from "../../../../hooks/useDrawingArea.js";
7
- type GetAxesScalesParams<T extends ChartSeriesType = ChartSeriesType> = {
8
- drawingArea: ChartDrawingArea;
9
- formattedSeries: ProcessedSeries<T>;
10
- seriesConfig: ChartSeriesConfig<T>;
11
- zoomMap?: Map<AxisId, ZoomData>;
12
- /**
13
- * @deprecated To remove in v9. This is an experimental feature to avoid breaking change.
14
- */
15
- preferStrictDomainInLineCharts?: boolean;
16
- defaultTickNumber: number;
17
- };
18
- export declare function getXAxesScales<T extends ChartSeriesType>({
19
- drawingArea,
20
- formattedSeries,
21
- axis: axes,
22
- seriesConfig,
23
- zoomMap,
24
- preferStrictDomainInLineCharts,
25
- defaultTickNumber
26
- }: GetAxesScalesParams<T> & {
27
- axis?: DefaultedAxis[];
28
- }): Record<AxisId, ScaleDefinition>;
29
- export declare function getYAxesScales<T extends ChartSeriesType>({
30
- drawingArea,
31
- formattedSeries,
32
- axis: axes,
33
- seriesConfig,
34
- zoomMap,
35
- preferStrictDomainInLineCharts,
36
- defaultTickNumber
37
- }: GetAxesScalesParams<T> & {
38
- axis?: DefaultedAxis[];
39
- }): Record<AxisId, ScaleDefinition>;
40
- export type ScaleDefinition = {
41
- scale: D3ContinuousScale;
42
- tickNumber: number;
43
- } | {
44
- scale: D3OrdinalScale;
45
- tickNumber?: never;
46
- };
47
- type DomainLimit = 'nice' | 'strict' | ((min: number, max: number) => {
48
- min: number;
49
- max: number;
50
- });
51
- export declare function getDomainLimit(axis: Pick<DefaultedAxis, 'id' | 'domainLimit'>, axisDirection: 'x' | 'y', axisIndex: number, formattedSeries: ProcessedSeries, preferStrictDomainInLineCharts: boolean | undefined): "nice" | "strict" | ((min: number, max: number) => {
52
- min: number;
53
- max: number;
54
- });
55
- export declare function applyDomainLimit(scale: D3ContinuousScale, axis: {
56
- min?: number | Date;
57
- max?: number | Date;
58
- }, domainLimit: DomainLimit, rawTickNumber: number): void;
59
- /**
60
- * Get the actual axis extrema considering the user defined min and max values.
61
- * @param axisExtrema User defined axis extrema.
62
- * @param minData Minimum value from the data.
63
- * @param maxData Maximum value from the data.
64
- */
65
- export declare function getActualAxisExtrema(axisExtrema: Pick<AxisConfig, 'min' | 'max'>, minData: number, maxData: number): [number | Date, number | Date];
66
- export {};
4
+ export declare function getRange(drawingArea: ChartDrawingArea, axisDirection: 'x' | 'y', axis: AxisConfig<ScaleName, any, ChartsAxisProps>): [number, number];
5
+ export declare function getNormalizedAxisScale(axis: Readonly<DefaultedAxis<ScaleName, any, Readonly<ChartsAxisProps>>>, domain: ReadonlyArray<NumberValue | string>): D3Scale;
@@ -1,121 +1,24 @@
1
1
  import { scaleBand, scalePoint } from '@mui/x-charts-vendor/d3-scale';
2
2
  import { isBandScaleConfig, isPointScaleConfig, isSymlogScaleConfig } from "../../../../models/axis.js";
3
- import { zoomScaleRange } from "./zoom.js";
4
- import { getAxisDomainLimit } from "./getAxisDomainLimit.js";
5
- import { getTickNumber } from "../../../ticks.js";
6
3
  import { getScale } from "../../../getScale.js";
7
- import { getAxisExtrema } from "./getAxisExtrema.js";
8
4
  const DEFAULT_CATEGORY_GAP_RATIO = 0.2;
9
- function getRange(drawingArea, axisDirection, axis) {
5
+ export function getRange(drawingArea, axisDirection, axis) {
10
6
  const range = axisDirection === 'x' ? [drawingArea.left, drawingArea.left + drawingArea.width] : [drawingArea.top + drawingArea.height, drawingArea.top];
11
7
  return axis.reverse ? [range[1], range[0]] : range;
12
8
  }
13
- export function getXAxesScales({
14
- drawingArea,
15
- formattedSeries,
16
- axis: axes = [],
17
- seriesConfig,
18
- zoomMap,
19
- preferStrictDomainInLineCharts,
20
- defaultTickNumber
21
- }) {
22
- const scales = {};
23
- axes.forEach((eachAxis, axisIndex) => {
24
- const axis = eachAxis;
25
- const zoom = zoomMap?.get(axis.id);
26
- scales[axis.id] = getAxisScale(axis, 'x', zoom, drawingArea, seriesConfig, axisIndex, formattedSeries, preferStrictDomainInLineCharts, defaultTickNumber);
27
- });
28
- return scales;
29
- }
30
- export function getYAxesScales({
31
- drawingArea,
32
- formattedSeries,
33
- axis: axes = [],
34
- seriesConfig,
35
- zoomMap,
36
- preferStrictDomainInLineCharts,
37
- defaultTickNumber
38
- }) {
39
- const scales = {};
40
- axes.forEach((eachAxis, axisIndex) => {
41
- const axis = eachAxis;
42
- const zoom = zoomMap?.get(axis.id);
43
- scales[axis.id] = getAxisScale(axis, 'y', zoom, drawingArea, seriesConfig, axisIndex, formattedSeries, preferStrictDomainInLineCharts, defaultTickNumber);
44
- });
45
- return scales;
46
- }
47
- function getAxisScale(axis, axisDirection, zoom, drawingArea, seriesConfig, axisIndex, formattedSeries,
48
- /**
49
- * @deprecated To remove in v9. This is an experimental feature to avoid breaking change.
50
- */
51
- preferStrictDomainInLineCharts, defaultTickNumber) {
52
- const zoomRange = zoom ? [zoom.start, zoom.end] : [0, 100];
53
- const range = getRange(drawingArea, axisDirection, axis);
9
+ export function getNormalizedAxisScale(axis, domain) {
10
+ const range = [0, 1];
54
11
  if (isBandScaleConfig(axis)) {
55
12
  const categoryGapRatio = axis.categoryGapRatio ?? DEFAULT_CATEGORY_GAP_RATIO;
56
- // Reverse range because ordinal scales are presented from top to bottom on y-axis
57
- const scaleRange = axisDirection === 'y' ? [range[1], range[0]] : range;
58
- const zoomedRange = zoomScaleRange(scaleRange, zoomRange);
59
- return {
60
- scale: scaleBand(axis.data, zoomedRange).paddingInner(categoryGapRatio).paddingOuter(categoryGapRatio / 2)
61
- };
13
+ return scaleBand(domain, range).paddingInner(categoryGapRatio).paddingOuter(categoryGapRatio / 2);
62
14
  }
63
15
  if (isPointScaleConfig(axis)) {
64
- const scaleRange = axisDirection === 'y' ? [...range].reverse() : range;
65
- const zoomedRange = zoomScaleRange(scaleRange, zoomRange);
66
- return {
67
- scale: scalePoint(axis.data, zoomedRange)
68
- };
16
+ return scalePoint(domain, range);
69
17
  }
70
18
  const scaleType = axis.scaleType ?? 'linear';
71
- const domainLimit = getDomainLimit(axis, axisDirection, axisIndex, formattedSeries, preferStrictDomainInLineCharts);
72
- const [minData, maxData] = getAxisExtrema(axis, axisDirection, seriesConfig, axisIndex, formattedSeries);
73
- const axisExtrema = getActualAxisExtrema(axis, minData, maxData);
74
- if (typeof domainLimit === 'function') {
75
- const {
76
- min,
77
- max
78
- } = domainLimit(minData, maxData);
79
- axisExtrema[0] = min;
80
- axisExtrema[1] = max;
81
- }
82
- const rawTickNumber = getTickNumber(axis, axisExtrema, defaultTickNumber);
83
- const zoomedRange = zoomScaleRange(range, zoomRange);
84
- const scale = getScale(scaleType, axisExtrema, zoomedRange);
19
+ const scale = getScale(scaleType, domain, range);
85
20
  if (isSymlogScaleConfig(axis) && axis.constant != null) {
86
21
  scale.constant(axis.constant);
87
22
  }
88
- applyDomainLimit(scale, axis, domainLimit, rawTickNumber);
89
- return {
90
- scale,
91
- tickNumber: rawTickNumber
92
- };
93
- }
94
- export function getDomainLimit(axis, axisDirection, axisIndex, formattedSeries, preferStrictDomainInLineCharts) {
95
- return preferStrictDomainInLineCharts ? getAxisDomainLimit(axis, axisDirection, axisIndex, formattedSeries) : axis.domainLimit ?? 'nice';
96
- }
97
- export function applyDomainLimit(scale, axis, domainLimit, rawTickNumber) {
98
- if (domainLimit === 'nice') {
99
- scale.nice(rawTickNumber);
100
- }
101
- const [minDomain, maxDomain] = scale.domain();
102
- scale.domain([axis.min ?? minDomain, axis.max ?? maxDomain]);
103
- }
104
-
105
- /**
106
- * Get the actual axis extrema considering the user defined min and max values.
107
- * @param axisExtrema User defined axis extrema.
108
- * @param minData Minimum value from the data.
109
- * @param maxData Maximum value from the data.
110
- */
111
- export function getActualAxisExtrema(axisExtrema, minData, maxData) {
112
- let min = minData;
113
- let max = maxData;
114
- if (axisExtrema.max != null && axisExtrema.max.valueOf() < minData) {
115
- min = axisExtrema.max;
116
- }
117
- if (axisExtrema.min != null && axisExtrema.min.valueOf() > minData) {
118
- max = axisExtrema.min;
119
- }
120
- return [axisExtrema.min ?? min, axisExtrema.max ?? max];
23
+ return scale;
121
24
  }
@@ -1,5 +1,5 @@
1
- import { AxisId } from "../../../../models/axis.js";
2
- export declare const selectorChartPreviewXScales: import("reselect").Selector<any, Record<AxisId, import("./getAxisScale.js").ScaleDefinition>, [axisId: AxisId]>;
1
+ import { AxisId, D3Scale } from "../../../../models/axis.js";
2
+ export declare const selectorChartPreviewXScales: import("reselect").Selector<any, Record<AxisId, D3Scale>, [axisId: AxisId]>;
3
3
  export declare const selectorChartPreviewComputedXAxis: import("reselect").Selector<any, import("./useChartCartesianAxis.types.js").ComputedAxisConfig<import("../../../index.js").ChartsXAxisProps>, [axisId: AxisId]>;
4
- export declare const selectorChartPreviewYScales: import("reselect").Selector<any, Record<AxisId, import("./getAxisScale.js").ScaleDefinition>, [axisId: AxisId]>;
4
+ export declare const selectorChartPreviewYScales: import("reselect").Selector<any, Record<AxisId, D3Scale>, [axisId: AxisId]>;
5
5
  export declare const selectorChartPreviewComputedYAxis: import("reselect").Selector<any, import("./useChartCartesianAxis.types.js").ComputedAxisConfig<import("../../../index.js").ChartsYAxisProps>, [axisId: AxisId]>;
@@ -2,11 +2,12 @@ import { createSelector } from "../../utils/selectors.js";
2
2
  import { selectorChartRawXAxis, selectorChartRawYAxis } from "./useChartCartesianAxisLayout.selectors.js";
3
3
  import { selectorChartSeriesConfig, selectorChartSeriesProcessed } from "../../corePlugins/useChartSeries/index.js";
4
4
  import { computeAxisValue } from "./computeAxisValue.js";
5
- import { selectorChartZoomAxisFilters, selectorChartZoomOptionsLookup, selectorDefaultXAxisTickNumber, selectorDefaultYAxisTickNumber } from "./useChartCartesianAxisRendering.selectors.js";
5
+ import { selectorChartNormalizedXScales, selectorChartNormalizedYScales, selectorChartXDomains, selectorChartYDomains, selectorChartZoomOptionsLookup } from "./useChartCartesianAxisRendering.selectors.js";
6
6
  import { selectorChartDrawingArea } from "../../corePlugins/useChartDimensions/index.js";
7
7
  import { ZOOM_SLIDER_PREVIEW_SIZE } from "../../../constants.js";
8
- import { selectorPreferStrictDomainInLineCharts } from "../../corePlugins/useChartExperimentalFeature/index.js";
9
- import { getXAxesScales, getYAxesScales } from "./getAxisScale.js";
8
+ import { getRange } from "./getAxisScale.js";
9
+ import { zoomScaleRange } from "./zoom.js";
10
+ import { isOrdinalScale } from "../../../scaleGuards.js";
10
11
  function createPreviewDrawingArea(axisDirection, mainChartDrawingArea) {
11
12
  return axisDirection === 'x' ? {
12
13
  left: 0,
@@ -24,26 +25,22 @@ function createPreviewDrawingArea(axisDirection, mainChartDrawingArea) {
24
25
  bottom: mainChartDrawingArea.height
25
26
  };
26
27
  }
27
- export const selectorChartPreviewXScales = createSelector([selectorChartRawXAxis, selectorChartDrawingArea, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomOptionsLookup, selectorPreferStrictDomainInLineCharts, selectorDefaultXAxisTickNumber, (_, axisId) => axisId], function selectorChartPreviewXScales(xAxes, chartDrawingArea, formattedSeries, seriesConfig, zoomOptions, preferStrictDomainInLineCharts, defaultTickNumber, axisId) {
28
+ export const selectorChartPreviewXScales = createSelector([selectorChartRawXAxis, selectorChartDrawingArea, selectorChartZoomOptionsLookup, selectorChartNormalizedXScales, (_, axisId) => axisId], function selectorChartPreviewXScales(xAxes, chartDrawingArea, zoomOptions, normalizedXScales, axisId) {
28
29
  const hasAxis = xAxes?.some(axis => axis.id === axisId);
29
30
  const drawingArea = createPreviewDrawingArea(hasAxis ? 'x' : 'y', chartDrawingArea);
30
31
  const options = zoomOptions[axisId];
31
- const zoomMap = new Map([[axisId, {
32
- axisId,
33
- start: options.minStart,
34
- end: options.maxEnd
35
- }]]);
36
- return getXAxesScales({
37
- drawingArea,
38
- formattedSeries,
39
- axis: xAxes,
40
- seriesConfig,
41
- zoomMap,
42
- preferStrictDomainInLineCharts,
43
- defaultTickNumber
32
+ const scales = {};
33
+ xAxes?.forEach(eachAxis => {
34
+ const axis = eachAxis;
35
+ const scale = normalizedXScales[axis.id].copy();
36
+ const range = getRange(drawingArea, 'x', axis);
37
+ const zoomedRange = zoomScaleRange(range, [options.minStart, options.maxEnd]);
38
+ scale.range(zoomedRange);
39
+ scales[axis.id] = scale;
44
40
  });
41
+ return scales;
45
42
  });
46
- export const selectorChartPreviewComputedXAxis = createSelector([selectorChartRawXAxis, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomOptionsLookup, selectorChartZoomAxisFilters, selectorChartDrawingArea, selectorPreferStrictDomainInLineCharts, selectorChartPreviewXScales, (_, axisId) => axisId], (xAxes, formattedSeries, seriesConfig, zoomOptions, getFilters, chartDrawingArea, preferStrictDomainInLineCharts, scales, axisId) => {
43
+ export const selectorChartPreviewComputedXAxis = createSelector([selectorChartRawXAxis, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomOptionsLookup, selectorChartDrawingArea, selectorChartPreviewXScales, selectorChartXDomains, (_, axisId) => axisId], (xAxes, formattedSeries, seriesConfig, zoomOptions, chartDrawingArea, scales, domains, axisId) => {
47
44
  const hasAxis = xAxes?.some(axis => axis.id === axisId);
48
45
  const drawingArea = createPreviewDrawingArea(hasAxis ? 'x' : 'y', chartDrawingArea);
49
46
  const options = zoomOptions[axisId];
@@ -60,9 +57,7 @@ export const selectorChartPreviewComputedXAxis = createSelector([selectorChartRa
60
57
  seriesConfig,
61
58
  axisDirection: 'x',
62
59
  zoomMap,
63
- zoomOptions,
64
- getFilters,
65
- preferStrictDomainInLineCharts
60
+ domains
66
61
  });
67
62
  if (computedAxes.axis[axisId]) {
68
63
  return {
@@ -71,26 +66,25 @@ export const selectorChartPreviewComputedXAxis = createSelector([selectorChartRa
71
66
  }
72
67
  return computedAxes.axis;
73
68
  });
74
- export const selectorChartPreviewYScales = createSelector([selectorChartRawYAxis, selectorChartDrawingArea, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomOptionsLookup, selectorPreferStrictDomainInLineCharts, selectorDefaultYAxisTickNumber, (_, axisId) => axisId], function selectorChartPreviewYScales(yAxes, chartDrawingArea, formattedSeries, seriesConfig, zoomOptions, preferStrictDomainInLineCharts, defaultTickNumber, axisId) {
69
+ export const selectorChartPreviewYScales = createSelector([selectorChartRawYAxis, selectorChartDrawingArea, selectorChartZoomOptionsLookup, selectorChartNormalizedYScales, (_, axisId) => axisId], function selectorChartPreviewYScales(yAxes, chartDrawingArea, zoomOptions, normalizedYScales, axisId) {
75
70
  const hasAxis = yAxes?.some(axis => axis.id === axisId);
76
71
  const drawingArea = createPreviewDrawingArea(hasAxis ? 'y' : 'x', chartDrawingArea);
77
72
  const options = zoomOptions[axisId];
78
- const zoomMap = new Map([[axisId, {
79
- axisId,
80
- start: options.minStart,
81
- end: options.maxEnd
82
- }]]);
83
- return getYAxesScales({
84
- drawingArea,
85
- formattedSeries,
86
- axis: yAxes,
87
- seriesConfig,
88
- zoomMap,
89
- preferStrictDomainInLineCharts,
90
- defaultTickNumber
73
+ const scales = {};
74
+ yAxes?.forEach(eachAxis => {
75
+ const axis = eachAxis;
76
+ const scale = normalizedYScales[axis.id].copy();
77
+ let range = getRange(drawingArea, 'y', axis);
78
+ if (isOrdinalScale(scale)) {
79
+ range = range.reverse();
80
+ }
81
+ const zoomedRange = zoomScaleRange(range, [options.minStart, options.maxEnd]);
82
+ scale.range(zoomedRange);
83
+ scales[axis.id] = scale;
91
84
  });
85
+ return scales;
92
86
  });
93
- export const selectorChartPreviewComputedYAxis = createSelector([selectorChartRawYAxis, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomOptionsLookup, selectorChartZoomAxisFilters, selectorChartDrawingArea, selectorPreferStrictDomainInLineCharts, selectorChartPreviewYScales, (_, axisId) => axisId], (yAxes, formattedSeries, seriesConfig, zoomOptions, getFilters, chartDrawingArea, preferStrictDomainInLineCharts, scales, axisId) => {
87
+ export const selectorChartPreviewComputedYAxis = createSelector([selectorChartRawYAxis, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomOptionsLookup, selectorChartDrawingArea, selectorChartPreviewYScales, selectorChartYDomains, (_, axisId) => axisId], (yAxes, formattedSeries, seriesConfig, zoomOptions, chartDrawingArea, scales, domains, axisId) => {
94
88
  const hasAxis = yAxes?.some(axis => axis.id === axisId);
95
89
  const drawingArea = createPreviewDrawingArea(hasAxis ? 'y' : 'x', chartDrawingArea);
96
90
  const options = zoomOptions[axisId];
@@ -107,9 +101,7 @@ export const selectorChartPreviewComputedYAxis = createSelector([selectorChartRa
107
101
  seriesConfig,
108
102
  axisDirection: 'y',
109
103
  zoomMap,
110
- zoomOptions,
111
- getFilters,
112
- preferStrictDomainInLineCharts
104
+ domains
113
105
  });
114
106
  if (computedAxes.axis[axisId]) {
115
107
  return {
@@ -1,5 +1,6 @@
1
+ import { NumberValue } from '@mui/x-charts-vendor/d3-scale';
1
2
  import { ZoomData } from "./zoom.types.js";
2
- import { AxisId } from "../../../../models/axis.js";
3
+ import { AxisId, D3Scale } from "../../../../models/axis.js";
3
4
  export declare const createZoomMap: (zoom: readonly ZoomData[]) => Map<AxisId, ZoomData>;
4
5
  /**
5
6
  * Following selectors are not exported because they exist in the MIT chart only to ba able to reuse the Zoom state from the pro.
@@ -33,21 +34,55 @@ export declare const selectorDefaultYAxisTickNumber: import("reselect").Selector
33
34
  } & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
34
35
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
35
36
  }, number, []>;
36
- export declare const selectorChartXScales: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
37
+ type DomainDefinition = {
38
+ domain: ReadonlyArray<string | NumberValue>;
39
+ tickNumber?: number;
40
+ };
41
+ export declare const selectorChartXDomains: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
37
42
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
38
43
  } & Partial<{}> & {
39
44
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
40
- }, Record<AxisId, import("./getAxisScale.js").ScaleDefinition>, []>;
41
- export declare const selectorChartYScales: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
45
+ }, Record<AxisId, DomainDefinition>, []>;
46
+ export declare const selectorChartYDomains: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
42
47
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
43
48
  } & Partial<{}> & {
44
49
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
45
- }, Record<AxisId, import("./getAxisScale.js").ScaleDefinition>, []>;
50
+ }, Record<AxisId, DomainDefinition>, []>;
46
51
  export declare const selectorChartZoomAxisFilters: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
47
52
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
48
53
  } & {
49
54
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
50
55
  } & Partial<{}>, import("./zoom.types.js").GetZoomAxisFilters | undefined, []>;
56
+ export declare const selectorChartFilteredXDomains: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
57
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
58
+ } & Partial<{}> & {
59
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
60
+ }, Record<AxisId, readonly (string | NumberValue)[]>, []>;
61
+ export declare const selectorChartFilteredYDomains: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
62
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
63
+ } & Partial<{}> & {
64
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
65
+ }, Record<AxisId, readonly (string | NumberValue)[]>, []>;
66
+ export declare const selectorChartNormalizedXScales: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
67
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
68
+ } & Partial<{}> & {
69
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
70
+ }, Record<AxisId, D3Scale>, []>;
71
+ export declare const selectorChartNormalizedYScales: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
72
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
73
+ } & Partial<{}> & {
74
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
75
+ }, Record<AxisId, D3Scale>, []>;
76
+ export declare const selectorChartXScales: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
77
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
78
+ } & Partial<{}> & {
79
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
80
+ }, Record<AxisId, D3Scale>, []>;
81
+ export declare const selectorChartYScales: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
82
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
83
+ } & Partial<{}> & {
84
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
85
+ }, Record<AxisId, D3Scale>, []>;
51
86
  /**
52
87
  * The only interesting selectors that merge axis data and zoom if provided.
53
88
  */
@@ -62,4 +97,129 @@ export declare const selectorChartYAxis: import("reselect").Selector<import("../
62
97
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
63
98
  }, import("./computeAxisValue.js").ComputeResult<import("../../../index.js").ChartsYAxisProps>, []>;
64
99
  export declare const selectorChartAxis: import("reselect").Selector<any, import("../../../index.js").ComputedAxis<keyof import("../../../index.js").AxisScaleConfig, any, import("../../../index.js").ChartsXAxisProps>, [axisId: AxisId]>;
65
- export declare const selectorChartRawAxis: import("reselect").Selector<any, import("../../../index.js").DefaultedXAxis | import("../../../index.js").DefaultedYAxis | undefined, [axisId: AxisId]>;
100
+ export declare const selectorChartRawAxis: import("reselect").Selector<any, ({
101
+ offset?: number;
102
+ } & {
103
+ id: AxisId;
104
+ data?: readonly any[] | undefined;
105
+ dataKey?: string;
106
+ valueFormatter?: (<TScaleName extends keyof import("../../../index.js").AxisScaleConfig>(value: any, context: import("../../../index.js").AxisValueFormatterContext<TScaleName>) => string) | undefined;
107
+ hideTooltip?: boolean;
108
+ reverse?: boolean;
109
+ domainLimit?: "nice" | "strict" | ((min: number, max: number) => {
110
+ min: number;
111
+ max: number;
112
+ });
113
+ ignoreTooltip?: boolean;
114
+ } & Omit<Partial<import("../../../index.js").ChartsXAxisProps>, "axisId"> & Partial<Omit<{
115
+ scaleType: "time";
116
+ scale: import("@mui/x-charts-vendor/d3-scale").ScaleTime<number, number>;
117
+ colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
118
+ } | {
119
+ scaleType: "linear";
120
+ scale: import("@mui/x-charts-vendor/d3-scale").ScaleLinear<number, number>;
121
+ colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
122
+ } | {
123
+ scaleType: "log";
124
+ scale: import("@mui/x-charts-vendor/d3-scale").ScaleLogarithmic<number, number>;
125
+ colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
126
+ } | {
127
+ scaleType: "symlog";
128
+ scale: import("@mui/x-charts-vendor/d3-scale").ScaleSymLog<number, number>;
129
+ colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
130
+ constant?: number;
131
+ } | {
132
+ scaleType: "pow";
133
+ scale: import("@mui/x-charts-vendor/d3-scale").ScalePower<number, number>;
134
+ colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
135
+ } | {
136
+ scaleType: "sqrt";
137
+ scale: import("@mui/x-charts-vendor/d3-scale").ScalePower<number, number>;
138
+ colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
139
+ } | {
140
+ scaleType: "utc";
141
+ scale: import("@mui/x-charts-vendor/d3-scale").ScaleTime<number, number>;
142
+ colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
143
+ } | ({
144
+ scaleType: "band";
145
+ scale: import("@mui/x-charts-vendor/d3-scale").ScaleBand<{
146
+ toString(): string;
147
+ }>;
148
+ categoryGapRatio: number;
149
+ barGapRatio: number;
150
+ colorMap?: import("../../../../models/colorMapping.js").OrdinalColorConfig | import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
151
+ } & import("../../../index.js").AxisGroups & Pick<import("../../../../hooks/useTicks.js").TickParams, "tickPlacement" | "tickLabelPlacement">) | ({
152
+ scaleType: "point";
153
+ scale: import("@mui/x-charts-vendor/d3-scale").ScalePoint<{
154
+ toString(): string;
155
+ }>;
156
+ colorMap?: import("../../../../models/colorMapping.js").OrdinalColorConfig | import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
157
+ } & import("../../../index.js").AxisGroups), "scale">> & {
158
+ position?: "top" | "bottom" | "none";
159
+ height?: number;
160
+ } & import("../../../../hooks/useTicks.js").TickParams & import("../../../index.js").AxisConfigExtension & {
161
+ zoom: import("./useChartCartesianAxis.types.js").DefaultizedZoomOptions | undefined;
162
+ }) | ({
163
+ offset?: number;
164
+ } & {
165
+ id: AxisId;
166
+ data?: readonly any[] | undefined;
167
+ dataKey?: string;
168
+ valueFormatter?: (<TScaleName extends keyof import("../../../index.js").AxisScaleConfig>(value: any, context: import("../../../index.js").AxisValueFormatterContext<TScaleName>) => string) | undefined;
169
+ hideTooltip?: boolean;
170
+ reverse?: boolean;
171
+ domainLimit?: "nice" | "strict" | ((min: number, max: number) => {
172
+ min: number;
173
+ max: number;
174
+ });
175
+ ignoreTooltip?: boolean;
176
+ } & Omit<Partial<import("../../../index.js").ChartsYAxisProps>, "axisId"> & Partial<Omit<{
177
+ scaleType: "time";
178
+ scale: import("@mui/x-charts-vendor/d3-scale").ScaleTime<number, number>;
179
+ colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
180
+ } | {
181
+ scaleType: "linear";
182
+ scale: import("@mui/x-charts-vendor/d3-scale").ScaleLinear<number, number>;
183
+ colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
184
+ } | {
185
+ scaleType: "log";
186
+ scale: import("@mui/x-charts-vendor/d3-scale").ScaleLogarithmic<number, number>;
187
+ colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
188
+ } | {
189
+ scaleType: "symlog";
190
+ scale: import("@mui/x-charts-vendor/d3-scale").ScaleSymLog<number, number>;
191
+ colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
192
+ constant?: number;
193
+ } | {
194
+ scaleType: "pow";
195
+ scale: import("@mui/x-charts-vendor/d3-scale").ScalePower<number, number>;
196
+ colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
197
+ } | {
198
+ scaleType: "sqrt";
199
+ scale: import("@mui/x-charts-vendor/d3-scale").ScalePower<number, number>;
200
+ colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
201
+ } | {
202
+ scaleType: "utc";
203
+ scale: import("@mui/x-charts-vendor/d3-scale").ScaleTime<number, number>;
204
+ colorMap?: import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
205
+ } | ({
206
+ scaleType: "band";
207
+ scale: import("@mui/x-charts-vendor/d3-scale").ScaleBand<{
208
+ toString(): string;
209
+ }>;
210
+ categoryGapRatio: number;
211
+ barGapRatio: number;
212
+ colorMap?: import("../../../../models/colorMapping.js").OrdinalColorConfig | import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
213
+ } & import("../../../index.js").AxisGroups & Pick<import("../../../../hooks/useTicks.js").TickParams, "tickPlacement" | "tickLabelPlacement">) | ({
214
+ scaleType: "point";
215
+ scale: import("@mui/x-charts-vendor/d3-scale").ScalePoint<{
216
+ toString(): string;
217
+ }>;
218
+ colorMap?: import("../../../../models/colorMapping.js").OrdinalColorConfig | import("../../../../models/colorMapping.js").ContinuousColorConfig | import("../../../../models/colorMapping.js").PiecewiseColorConfig;
219
+ } & import("../../../index.js").AxisGroups), "scale">> & {
220
+ position?: "left" | "right" | "none";
221
+ width?: number;
222
+ } & import("../../../../hooks/useTicks.js").TickParams & import("../../../index.js").AxisConfigExtension & {
223
+ zoom: import("./useChartCartesianAxis.types.js").DefaultizedZoomOptions | undefined;
224
+ }) | undefined, [axisId: AxisId]>;
225
+ export {};