Commit 6861dc13 by Torkel Ödegaard

Graph: fix for legend show/hide toggle, broken by recent legend rewrite

parent e530e4d4
...@@ -70,6 +70,7 @@ function (_, kbn) { ...@@ -70,6 +70,7 @@ function (_, kbn) {
this.stats.min = Number.MAX_VALUE; this.stats.min = Number.MAX_VALUE;
this.stats.avg = null; this.stats.avg = null;
this.stats.current = null; this.stats.current = null;
this.allIsNull = true;
var ignoreNulls = fillStyle === 'connected'; var ignoreNulls = fillStyle === 'connected';
var nullAsZero = fillStyle === 'null as zero'; var nullAsZero = fillStyle === 'null as zero';
...@@ -89,6 +90,7 @@ function (_, kbn) { ...@@ -89,6 +90,7 @@ function (_, kbn) {
if (_.isNumber(currentValue)) { if (_.isNumber(currentValue)) {
this.stats.total += currentValue; this.stats.total += currentValue;
this.allIsNull = false;
} }
if (currentValue > this.stats.max) { if (currentValue > this.stats.max) {
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<div class="editor-row"> <div class="editor-row">
<div class="section"> <div class="section">
<h5>Legend styles</h5> <h5>Legend styles</h5>
<editor-opt-bool text="Show legend" model="panel.legend.show" change="render()"></editor-opt-bool> <editor-opt-bool text="Show legend" model="panel.legend.show" change="get_data();"></editor-opt-bool>
<editor-opt-bool text="Include values" model="panel.legend.values" change="render()"></editor-opt-bool> <editor-opt-bool text="Include values" model="panel.legend.values" change="render()"></editor-opt-bool>
<editor-opt-bool text="Align as table" model="panel.legend.alignAsTable" change="render()"></editor-opt-bool> <editor-opt-bool text="Align as table" model="panel.legend.alignAsTable" change="render()"></editor-opt-bool>
<editor-opt-bool text="Right side" model="panel.legend.rightSide" change="render()"></editor-opt-bool> <editor-opt-bool text="Right side" model="panel.legend.rightSide" change="render()"></editor-opt-bool>
......
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