Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Allowing different colors for data points in the same data set. #198

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+2 −1
Split
View
@@ -2325,7 +2325,8 @@ Rickshaw.Graph.Renderer.Bar = Rickshaw.Class.create( Rickshaw.Graph.Renderer, {
.attr("height", function(d) { return graph.y.magnitude(Math.abs(d.y)) })
.attr("transform", transform);
- Array.prototype.forEach.call(nodes[0], function(n) {
+ Array.prototype.forEach.call(nodes[0], function(n, i) {
+ series.color = series.data[i].color || series.color;
n.setAttribute('fill', series.color);
} );