From 8262548005df71bbd83c75f6266796c60e5ec473 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Tue, 30 Mar 2021 10:27:04 +0100 Subject: [PATCH] Graph: Fix setting right y-axis when standard option unit is configured (#32426) (#32442) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 33e33e387260709171c264a580deb947fd3170d8) Co-authored-by: Torkel Ödegaard --- public/app/plugins/panel/graph/axes_editor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/panel/graph/axes_editor.ts b/public/app/plugins/panel/graph/axes_editor.ts index 25816f09270..c14cb94c3cc 100644 --- a/public/app/plugins/panel/graph/axes_editor.ts +++ b/public/app/plugins/panel/graph/axes_editor.ts @@ -51,9 +51,9 @@ export class AxesEditorCtrl { setUnitFormat(axis: { format: any }) { return (unit: string) => { axis.format = unit; - // if already set via field config we need to update that as well + // if already set via field config we clear that if (this.panel.fieldConfig.defaults.unit) { - this.panel.fieldConfig.defaults.unit = unit; + this.panel.fieldConfig.defaults.unit = undefined; this.panelCtrl.refresh(); } else { this.panelCtrl.render();