Graph: Fix setting right y-axis when standard option unit is configured (#32426)

This commit is contained in:
Torkel Ödegaard 2021-03-29 17:54:20 +02:00 committed by GitHub
parent 20f6ba5ba4
commit 33e33e3872
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();