From: Fabian Strachanski Date: Thu, 13 Aug 2015 08:50:56 +0000 (+0200) Subject: Fix for #1373 X-Git-Tag: 2.0.0-alpha4~47^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1374%2Fhead;p=thirdparty%2FChart.js.git Fix for #1373 --- diff --git a/src/scales/scale.linear.js b/src/scales/scale.linear.js index c9827e02e..642ea0c49 100644 --- a/src/scales/scale.linear.js +++ b/src/scales/scale.linear.js @@ -157,7 +157,7 @@ }, // Get the correct value. If the value type is object get the x or y based on whether we are horizontal or not getRightValue: function(rawValue) { - return typeof rawValue === "object" ? (this.isHorizontal() ? rawValue.x : rawValue.y) : rawValue; + return typeof (rawValue === "object" && rawValue !== null) ? (this.isHorizontal() ? rawValue.x : rawValue.y) : rawValue; }, getPixelForValue: function(value) { // This must be called after fit has been run so that