Commit 846cf934 by Torkel Ödegaard

Graph: New legend option hideEmtpy to hide series with only null values from legend, Closes #1028

parent 162eb4ca
# 1.9.1 (unreleased)
**Enhancements**
- [Issue #1028](https://github.com/grafana/grafana/issues/1028). Graph: New legend option ``hideEmtpy`` to hide series with only null values
**Fixes**
- [Issue #1199](https://github.com/grafana/grafana/issues/1199). Graph: fix for series tooltip when one series is hidden/disabled
- [Issue #1207](https://github.com/grafana/grafana/issues/1207). Graphite: movingAverage / movingMedian parameter type impovement, now handles int and interval parameter
......
......@@ -44,6 +44,7 @@
<editor-opt-bool text="Values" model="panel.legend.values" change="render()"></editor-opt-bool>
<editor-opt-bool text="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="Hide empty" model="panel.legend.hideEmpty" tip="Hides series with only null values" change="render()"></editor-opt-bool>
</div>
<div class="section" ng-if="panel.legend.values">
......
......@@ -125,6 +125,12 @@ function (angular, app, _, kbn, $) {
for (i = 0; i < seriesList.length; i++) {
var series = seriesList[i];
// ignore empty series
if (panel.legend.hideEmpty && series.allIsNull) {
continue;
}
var html = '<div class="graph-legend-series';
if (series.yaxis === 2) { html += ' pull-right'; }
if (scope.hiddenSeries[series.alias]) { html += ' graph-legend-series-hidden'; }
......
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