Commit 9e33f8b7 by Torkel Ödegaard Committed by GitHub

Merge pull request #15203 from jsferrei/optimize_legend

Legend toggle should only trigger a re-render, not a refresh
parents cab6a872 e2c958eb
...@@ -249,7 +249,7 @@ export class KeybindingSrv { ...@@ -249,7 +249,7 @@ export class KeybindingSrv {
if (panelInfo.panel.legend) { if (panelInfo.panel.legend) {
const panelRef = dashboard.getPanelById(dashboard.meta.focusPanelId); const panelRef = dashboard.getPanelById(dashboard.meta.focusPanelId);
panelRef.legend.show = !panelRef.legend.show; panelRef.legend.show = !panelRef.legend.show;
panelRef.refresh(); panelRef.render();
} }
} }
}); });
......
...@@ -281,7 +281,7 @@ class GraphCtrl extends MetricsPanelCtrl { ...@@ -281,7 +281,7 @@ class GraphCtrl extends MetricsPanelCtrl {
toggleLegend() { toggleLegend() {
this.panel.legend.show = !this.panel.legend.show; this.panel.legend.show = !this.panel.legend.show;
this.refresh(); this.render();
} }
legendValuesOptionChanged() { legendValuesOptionChanged() {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<h5 class="section-heading">Options</h5> <h5 class="section-heading">Options</h5>
<gf-form-switch class="gf-form" <gf-form-switch class="gf-form"
label="Show" label-class="width-7" label="Show" label-class="width-7"
checked="ctrl.panel.legend.show" on-change="ctrl.refresh()"> checked="ctrl.panel.legend.show" on-change="ctrl.render()">
</gf-form-switch> </gf-form-switch>
<gf-form-switch class="gf-form" <gf-form-switch class="gf-form"
label="As Table" label-class="width-7" label="As Table" label-class="width-7"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment