Take standard options min/max into account (#55972)

This commit is contained in:
Victor Marin
2022-10-04 08:58:35 +03:00
committed by GitHub
parent 82d8015469
commit 6913623461
+4 -2
View File
@@ -588,7 +588,8 @@ const prepConfig = (
isTime: false,
orientation: ScaleOrientation.Horizontal,
direction: ScaleDirection.Right,
range: (u, min, max) => [min, max],
min: xField.config.min,
max: xField.config.max,
});
// why does this fall back to '' instead of null or undef?
@@ -621,7 +622,8 @@ const prepConfig = (
scaleKey,
orientation: ScaleOrientation.Vertical,
direction: ScaleDirection.Up,
range: (u, min, max) => [min, max],
max: field.config.max,
min: field.config.min,
});
if (field.config.custom?.axisPlacement !== AxisPlacement.Hidden) {