From ecdcd1061245559f62ad1e347c9f1f943619216c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 3 Nov 2014 10:21:12 +0100 Subject: [PATCH] Graph: Series hide/show toggle changed to be default exclusive, so clicking on a series name will show only that series. (SHIFT or meta)+click will toggle hide/show. Closes #1007 --- CHANGELOG.md | 4 +++- src/app/panels/graph/module.js | 14 +++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b29e659c472..e316f74ba8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,9 @@ - [Issue #938](https://github.com/grafana/grafana/issues/938). Panel: Plugin panels now reside outside of app/panels directory - [Issue #952](https://github.com/grafana/grafana/issues/952). Help: Shortcut "?" to open help modal with list of all shortcuts - [Issue #991](https://github.com/grafana/grafana/issues/991). ScriptedDashboard: datasource services are now available in scripted dashboards, you can query datasource for metric keys, generate dashboards, and even save them in a scripted dashboard (see scripted_gen_and_save.js for example) -- [Issue #716](https://github.com/grafana/grafana/issues/716). MetricsEditors: Ability to reorder metric queries + +**Changes** +- [Issue #1007](https://github.com/grafana/grafana/issues/1007). Graph: Series hide/show toggle changed to be default exclusive, so clicking on a series name will show only that series. (SHIFT or meta)+click will toggle hide/show. **OpenTSDB** - [Issue #930](https://github.com/grafana/grafana/issues/930). OpenTSDB: Adding counter max and counter reset value to open tsdb query editor, thx @rsimiciuc diff --git a/src/app/panels/graph/module.js b/src/app/panels/graph/module.js index 87098a2d4d7..c24b61dffce 100644 --- a/src/app/panels/graph/module.js +++ b/src/app/panels/graph/module.js @@ -276,14 +276,14 @@ function (angular, app, $, _, kbn, moment, TimeSeries) { }; $scope.toggleSeries = function(serie, event) { - if ($scope.hiddenSeries[serie.alias]) { - delete $scope.hiddenSeries[serie.alias]; - } - else { - $scope.hiddenSeries[serie.alias] = true; - } - if (event.ctrlKey || event.metaKey || event.shiftKey) { + if ($scope.hiddenSeries[serie.alias]) { + delete $scope.hiddenSeries[serie.alias]; + } + else { + $scope.hiddenSeries[serie.alias] = true; + } + } else { $scope.toggleSeriesExclusiveMode(serie); }