diff --git a/CHANGELOG.md b/CHANGELOG.md index caec17d0116..d832a6e076d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # 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 diff --git a/src/app/panels/graph/axisEditor.html b/src/app/panels/graph/axisEditor.html index 7c1b3d73b04..393453b2218 100644 --- a/src/app/panels/graph/axisEditor.html +++ b/src/app/panels/graph/axisEditor.html @@ -44,6 +44,7 @@ +
diff --git a/src/app/panels/graph/legend.js b/src/app/panels/graph/legend.js index f1367df8617..311bacab788 100644 --- a/src/app/panels/graph/legend.js +++ b/src/app/panels/graph/legend.js @@ -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 = '