aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sonar-server/src/main/webapp/javascripts/widgets/stack-area.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/javascripts/widgets/stack-area.js b/sonar-server/src/main/webapp/javascripts/widgets/stack-area.js
index ac72d01ebf3..081a05ac6a3 100644
--- a/sonar-server/src/main/webapp/javascripts/widgets/stack-area.js
+++ b/sonar-server/src/main/webapp/javascripts/widgets/stack-area.js
@@ -55,7 +55,8 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
};
window.SonarWidgets.StackArea.prototype.render = function () {
- var widget = this;
+ var widget = this,
+ cl = widget.colors().length;
this.svg = this.container.append('svg')
.attr('class', 'sonar-d3');
@@ -100,7 +101,7 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.domain([0, d3.max(this.stackDataTop, function(d) { return d.y0 + d.y; })])
.nice();
- this.color = function(i) { return widget.colors()[i][0]; };
+ this.color = function(i) { return widget.colors()[i % cl][0]; };
// Configure the axis