Commit ebb373ee by Torkel Ödegaard

fix(graph): fixed issue with toggling series on and off would loose stacking, fixes #4557

parent 9f75bda8
......@@ -11,6 +11,7 @@
* **Graph Panel**: Fixed issue where newly added graph panels shared same axes config, fixes [#4582](https://github.com/grafana/grafana/issues/4582)
* **Graph Panel**: Fixed issue with axis labels overlapping Y-axis, fixes [#4626](https://github.com/grafana/grafana/issues/4626)
* **InfluxDB**: Fixed issue with templating query containing template variable, fixes [#4602](https://github.com/grafana/grafana/issues/4602)
* **Graph Panel**: Fixed issue with hiding series and stacking, fixes [#4557](https://github.com/grafana/grafana/issues/4557)
# 3.0.0-beta2 (2016-04-04)
......
......@@ -116,6 +116,7 @@ class GraphCtrl extends MetricsPanelCtrl {
this.colors = $scope.$root.colors;
this.events.on('render', this.onRender.bind(this));
this.events.on('data-received', this.onDataReceived.bind(this));
this.events.on('data-error', this.onDataError.bind(this));
this.events.on('data-snapshot-load', this.onDataSnapshotLoad.bind(this));
......@@ -215,20 +216,15 @@ class GraphCtrl extends MetricsPanelCtrl {
this.panel.tooltip.msResolution = this.panel.tooltip.msResolution || series.isMsResolutionNeeded();
}
series.applySeriesOverrides(this.panel.seriesOverrides);
return series;
}
seriesOverrideChanged() {
if (!this.seriesList) {
return;
}
onRender() {
if (!this.seriesList) { return; }
for (let series of this.seriesList) {
series.applySeriesOverrides(this.panel.seriesOverrides);
}
this.render();
}
changeSeriesColor(series, color) {
......@@ -247,7 +243,6 @@ class GraphCtrl extends MetricsPanelCtrl {
} else {
this.toggleSeriesExclusiveMode(serie);
}
this.render();
}
......
......@@ -43,7 +43,7 @@ define([
}
$scope.updateCurrentOverrides();
$scope.ctrl.seriesOverrideChanged();
$scope.ctrl.render();
};
$scope.colorSelected = function(color) {
......@@ -62,7 +62,7 @@ define([
colorSelected: $scope.colorSelected,
},
onClose: function() {
$scope.ctrl.seriesOverrideChanged();
$scope.ctrl.render();
}
});
};
......
......@@ -22,7 +22,6 @@ define([
ctx.scope.ctrl = {
refresh: sinon.spy(),
render: sinon.spy(),
seriesOverrideChanged: sinon.spy(),
seriesList: []
};
ctx.scope.render = function() {};
......
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