From: Simon Brunel Date: Sat, 14 May 2016 17:35:35 +0000 (+0200) Subject: Bump chartjs-color to version 2.0.0 (#2549) X-Git-Tag: v2.1.4~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b64e03dbd0c20bb5ec7f2ca69cf378649c639421;p=thirdparty%2FChart.js.git 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. --- 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;