From 6c38c502a9142e4f51171cdb4e6678e9babf99e4 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Tue, 4 Oct 2022 08:31:25 +0200 Subject: [PATCH] Take standard options min/max into account (#55972) (#56222) (cherry picked from commit 6913623461eb32c4e301f84c4755d747d1910039) Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com> --- public/app/plugins/panel/xychart/scatter.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/panel/xychart/scatter.ts b/public/app/plugins/panel/xychart/scatter.ts index 93ce5bbc6b6..e354d1abc3e 100644 --- a/public/app/plugins/panel/xychart/scatter.ts +++ b/public/app/plugins/panel/xychart/scatter.ts @@ -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) {