Issue #73 Error: Invalid value for <rect> attribute y="NaN", height="NaN"

This commit is contained in:
kawanet 2013-02-19 18:02:08 +09:00
parent 5079b67649
commit 2effb06d9e

View File

@ -266,10 +266,10 @@ nv.models.multiBar = function() {
y(0) : y(0) :
y(0) - y(getY(d,i)) < 1 ? y(0) - y(getY(d,i)) < 1 ?
y(0) - 1 : y(0) - 1 :
y(getY(d,i)) y(getY(d,i)) || 0;
}) })
.attr('height', function(d,i) { .attr('height', function(d,i) {
return Math.max(Math.abs(y(getY(d,i)) - y(0)),1); return Math.max(Math.abs(y(getY(d,i)) - y(0)),1) || 0;
}); });
}) })