diff --git a/src/app/components/timeSeries.js b/src/app/components/timeSeries.js index 95a4d3ded34..c64b5931e7f 100644 --- a/src/app/components/timeSeries.js +++ b/src/app/components/timeSeries.js @@ -9,7 +9,6 @@ function (_, kbn) { this.datapoints = opts.datapoints; this.info = opts.info; this.label = opts.info.alias; - this.zindex = 0; } function matchSeriesOverride(aliasOrRegex, seriesAlias) { @@ -31,6 +30,7 @@ function (_, kbn) { this.points = {}; this.bars = {}; this.info.yaxis = 1; + this.zindex = 0; delete this.stack; for (var i = 0; i < overrides.length; i++) { diff --git a/src/app/directives/grafanaGraph.js b/src/app/directives/grafanaGraph.js index 6148c6d2bc4..38ef36bc912 100755 --- a/src/app/directives/grafanaGraph.js +++ b/src/app/directives/grafanaGraph.js @@ -168,19 +168,19 @@ function (angular, $, kbn, moment, _) { addAnnotations(options); configureAxisOptions(data, options); - data = _.sortBy(data, function(series) { return series.zindex; }); + var sortedSeries = _.sortBy(data, function(series) { return series.zindex; }); // if legend is to the right delay plot draw a few milliseconds // so the legend width calculation can be done if (shouldDelayDraw(panel)) { legendSideLastValue = panel.legend.rightSide; setTimeout(function() { - plot = $.plot(elem, data, options); + plot = $.plot(elem, sortedSeries, options); addAxisLabels(); }, 50); } else { - plot = $.plot(elem, data, options); + plot = $.plot(elem, sortedSeries, options); addAxisLabels(); } } diff --git a/src/app/panels/graph/styleEditor.html b/src/app/panels/graph/styleEditor.html index 5a50f4995d0..ec4f59b50b4 100644 --- a/src/app/panels/graph/styleEditor.html +++ b/src/app/panels/graph/styleEditor.html @@ -66,16 +66,14 @@