]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Bump chartjs-color to version 2.0.0 (#2549)
authorSimon Brunel <simonbrunel@users.noreply.github.com>
Sat, 14 May 2016 17:35:35 +0000 (19:35 +0200)
committerEvert Timberg <evert.timberg+github@gmail.com>
Sat, 14 May 2016 17:35:35 +0000 (13:35 -0400)
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
src/core/core.element.js

index 16d928efc6113a5776b0299b1fcc589f7870a646..930223e1513fcdab2b35ba82b6bf2572f9ba91d1 100644 (file)
@@ -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
index f411647157a9caa9d39a86cb5992021032f5b773..e4b09d9695da7f6c6e0ef554f18901c285d54492 100644 (file)
@@ -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;