From 966d7376171a6b398ae78812c89740af994c7417 Mon Sep 17 00:00:00 2001 From: AllenJB Date: Wed, 18 May 2016 17:38:20 +0100 Subject: [PATCH] Fix handling of moments by scale.getRightValue When using {x: moment, y: value} datapoints --- src/core/core.scale.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/core.scale.js b/src/core/core.scale.js index e53265ed5..9861288cd 100644 --- a/src/core/core.scale.js +++ b/src/core/core.scale.js @@ -396,7 +396,7 @@ module.exports = function(Chart) { } // If it is in fact an object, dive in one more level if (typeof(rawValue) === "object") { - if (rawValue instanceof Date) { + if ((rawValue instanceof Date) || (rawValue.isValid)) { return rawValue; } else { return getRightValue(this.isHorizontal() ? rawValue.x : rawValue.y);