diff --git a/CHANGELOG.md b/CHANGELOG.md index 5988579123a..4f89aa88b9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - [Issue #1888](https://github.com/grafana/grafana/issues/1144). Templating: Repeat panel or row for each selected template variable value - [Issue #1888](https://github.com/grafana/grafana/issues/1944). Dashboard: Custom Navigation links & dynamic links to related dashboards - [Issue #590](https://github.com/grafana/grafana/issues/590). Graph: Define series color using regex rule +- [Issue #2162](https://github.com/grafana/grafana/issues/2162). Graph: New series style override, negative-y transform and stack groups - [Issue #2096](https://github.com/grafana/grafana/issues/2096). Dashboard list panel: Now supports search by multiple tags **User or Organization admin** diff --git a/public/app/components/timeSeries.js b/public/app/components/timeSeries.js index 679777bfb92..3c41378947e 100644 --- a/public/app/components/timeSeries.js +++ b/public/app/components/timeSeries.js @@ -54,6 +54,7 @@ function (_, kbn) { if (override.zindex !== void 0) { this.zindex = override.zindex; } if (override.fillBelowTo !== void 0) { this.fillBelowTo = override.fillBelowTo; } if (override.color !== void 0) { this.color = override.color; } + if (override.transform !== void 0) { this.transform = override.transform; } if (override.yaxis !== void 0) { this.yaxis = override.yaxis; diff --git a/public/app/panels/graph/seriesOverridesCtrl.js b/public/app/panels/graph/seriesOverridesCtrl.js index 81cb41a8572..8cbf7dff03a 100644 --- a/public/app/panels/graph/seriesOverridesCtrl.js +++ b/public/app/panels/graph/seriesOverridesCtrl.js @@ -99,10 +99,11 @@ define([ $scope.addOverrideOption('Staircase line', 'steppedLine', [true, false]); $scope.addOverrideOption('Points', 'points', [true, false]); $scope.addOverrideOption('Points Radius', 'pointradius', [1,2,3,4,5]); - $scope.addOverrideOption('Stack', 'stack', [true, false, 2, 3, 4, 5]); + $scope.addOverrideOption('Stack', 'stack', [true, false, 'A', 'B', 'C', 'D']); $scope.addOverrideOption('Color', 'color', ['change']); $scope.addOverrideOption('Y-axis', 'yaxis', [1, 2]); $scope.addOverrideOption('Z-index', 'zindex', [-1,-2,-3,0,1,2,3]); + $scope.addOverrideOption('Transform', 'transform', ['negative-Y']); $scope.updateCurrentOverrides(); }); diff --git a/public/vendor/jquery/jquery.flot.js b/public/vendor/jquery/jquery.flot.js index f49ce088dfb..380030a77c9 100644 --- a/public/vendor/jquery/jquery.flot.js +++ b/public/vendor/jquery/jquery.flot.js @@ -1226,6 +1226,19 @@ Licensed under the MIT license. // give the hooks a chance to run for (i = 0; i < series.length; ++i) { s = series[i]; + points = s.datapoints.points; + ps = s.datapoints.pointsize; + + // grafana + if (s.transform === 'negative-Y') { + for (j = 0; j < points.length; j += ps) { + if (points[j] == null) + continue; + + val = points[j + 1]; + points[j + 1] = -val; + } + } executeHooks(hooks.processDatapoints, [ s, s.datapoints]); }