Look at this piece of Bar render code:
(Rickshaw.Graph.Renderer.Bar render method)
var nodes = graph.vis.selectAll("path")
.data(series.stack)
.enter().append("svg:rect")
.attr("x", function(d) { return graph.x(d.x) + barXOffset })
.attr("y", function(d) { return graph.y(d.y0 + d.y) })
.attr("width", seriesBarWidth)
.attr("height", function(d) { return graph.y.magnitude(d.y) });
The problem is rectangle height which is calculated incorrectly when our graph.y scale function is created with yMin<>0. More correctly will be using something like
.attr("height", function(d) { return graph.y.magnitude(d.y) - graph.y.magnitude(0)}) OR
attr("height", function(d) {return graph.y(d.y0) - graph.y(d.y0 + d.y) })
for height instead of
.attr("height", function(d) { return graph.y.magnitude(d.y) });
Look at this piece of Bar render code: (Rickshaw.Graph.Renderer.Bar render method)
var nodes = graph.vis.selectAll("path") .data(series.stack) .enter().append("svg:rect") .attr("x", function(d) { return graph.x(d.x) + barXOffset }) .attr("y", function(d) { return graph.y(d.y0 + d.y) }) .attr("width", seriesBarWidth) .attr("height", function(d) { return graph.y.magnitude(d.y) }); The problem is rectangle height which is calculated incorrectly when our graph.y scale function is created with yMin<>0. More correctly will be using something like .attr("height", function(d) { return graph.y.magnitude(d.y) - graph.y.magnitude(0)}) OR attr("height", function(d) {return graph.y(d.y0) - graph.y(d.y0 + d.y) }) for height instead of .attr("height", function(d) { return graph.y.magnitude(d.y) });