Configuration property axisYStartsAtZero (default true) is ignored in setupGeometries, such that when it is false, the axis gets adjusted but the chart does not, so the two can easily have different scales (effectively resulting in an incorrect chart). Affects even a simple line chart.
Something like this seems to help, but I haven't fully tested it:
diff --git a/src/geometries.js b/src/geometries.js
index 7add3e7..ddb28bb 100644
--- a/src/geometries.js
+++ b/src/geometries.js
@@ -77,7 +77,7 @@ fy._computeGeometryData = function(config, cache) {
var stackedMaxValue = d3.max(stackedMaxValues);
var scaleYCopy = cache.scaleY.copy(); //TODO ?
- scaleYCopy.domain([0, stackedMaxValue]);
+ scaleYCopy.domain([config.axisYStartsAtZero ? 0 : scaleYCopy.domain()[0], stackedMaxValue]);
// bar width
var barW = cache.scaleX(cache.data[0].values[1].x);
Configuration property axisYStartsAtZero (default true) is ignored in setupGeometries, such that when it is false, the axis gets adjusted but the chart does not, so the two can easily have different scales (effectively resulting in an incorrect chart). Affects even a simple line chart.
Something like this seems to help, but I haven't fully tested it: