When one has more than nine data series in some chart-types (e.g. donut, pie or funnel) the 10th and higher series are coloured black. The expected behaviour would be a "warp-around" of the colours.
We achieved this "wrap-around" by the following code changes.
But maybe the correct fix would be to use jqplot.ColorGenerator and its next(), previous() and get() methods as in other chart-types?
Here our code-changes:
--- resources/jquery/jqplot/jqplot.funnelRenderer.js.orig 2016-06-27 15:01:43.183005581 +0200
+++ resources/jquery/jqplot/jqplot.funnelRenderer.js 2016-06-27 15:03:22.941592005 +0200
@@ -454,7 +454,7 @@
}
for (var i=0; i<gd.length; i++) {
var v = this._vertices[i];
- this.renderer.drawSection.call (this, ctx, v, this.seriesColors[i]);
+ this.renderer.drawSection.call (this, ctx, v, this.seriesColors[i % this.seriesColors.length]);
if (this.showDataLabels && gd[i][1]*100 >= this.dataLabelThreshold) {
var fstr, label;
When one has more than nine data series in some chart-types (e.g. donut, pie or funnel) the 10th and higher series are coloured black. The expected behaviour would be a "warp-around" of the colours.
We achieved this "wrap-around" by the following code changes. But maybe the correct fix would be to use
jqplot.ColorGenerator
and itsnext()
,previous()
andget()
methods as in other chart-types?Here our code-changes: