From b64e03dbd0c20bb5ec7f2ca69cf378649c639421 Mon Sep 17 00:00:00 2001 From: Simon Brunel Date: Sat, 14 May 2016 19:35:35 +0200 Subject: [PATCH] Bump chartjs-color to version 2.0.0 (#2549) Fix color animation because the color lib changed the `mix` implementation to match SASS behavior, so the weight specifies the amount of the first color that should be included in the returned color. --- package.json | 2 +- src/core/core.element.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 16d928efc..930223e15 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "main": "Chart.js" }, "dependencies": { - "chartjs-color": "^1.0.2", + "chartjs-color": "^2.0.0", "moment": "^2.10.6" } } \ No newline at end of file diff --git a/src/core/core.element.js b/src/core/core.element.js index f41164715..e4b09d969 100644 --- a/src/core/core.element.js +++ b/src/core/core.element.js @@ -60,7 +60,7 @@ module.exports = function(Chart) { // Color transitions if possible else if (typeof value === 'string') { try { - var color = helpers.color(this._start[key]).mix(helpers.color(this._model[key]), ease); + var color = helpers.color(this._model[key]).mix(helpers.color(this._start[key]), ease); this._view[key] = color.rgbString(); } catch (err) { this._view[key] = value;