From 2effb06d9ee6e109fd411500eda3c19f8a731069 Mon Sep 17 00:00:00 2001 From: kawanet Date: Tue, 19 Feb 2013 18:02:08 +0900 Subject: [PATCH] Issue #73 Error: Invalid value for attribute y="NaN", height="NaN" --- src/models/multiBar.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/models/multiBar.js b/src/models/multiBar.js index 12c05b4..a3823a6 100644 --- a/src/models/multiBar.js +++ b/src/models/multiBar.js @@ -266,10 +266,10 @@ nv.models.multiBar = function() { y(0) : y(0) - y(getY(d,i)) < 1 ? y(0) - 1 : - y(getY(d,i)) - }) - .attr('height', function(d,i) { - return Math.max(Math.abs(y(getY(d,i)) - y(0)),1); + y(getY(d,i)) || 0; + }) + .attr('height', function(d,i) { + return Math.max(Math.abs(y(getY(d,i)) - y(0)),1) || 0; }); })