mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Graph: Fix setting right y-axis when standard option unit is configured (#32426)
This commit is contained in:
parent
20f6ba5ba4
commit
33e33e3872
@ -51,9 +51,9 @@ export class AxesEditorCtrl {
|
|||||||
setUnitFormat(axis: { format: any }) {
|
setUnitFormat(axis: { format: any }) {
|
||||||
return (unit: string) => {
|
return (unit: string) => {
|
||||||
axis.format = unit;
|
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) {
|
if (this.panel.fieldConfig.defaults.unit) {
|
||||||
this.panel.fieldConfig.defaults.unit = unit;
|
this.panel.fieldConfig.defaults.unit = undefined;
|
||||||
this.panelCtrl.refresh();
|
this.panelCtrl.refresh();
|
||||||
} else {
|
} else {
|
||||||
this.panelCtrl.render();
|
this.panelCtrl.render();
|
||||||
|
Loading…
Reference in New Issue
Block a user