]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Ticks callback is now called with `this` as scope (#4632)
authorandig <cpuidle@gmx.de>
Sun, 13 Aug 2017 09:44:06 +0000 (11:44 +0200)
committerSimon Brunel <simonbrunel@users.noreply.github.com>
Sun, 13 Aug 2017 09:44:06 +0000 (11:44 +0200)
src/core/core.scale.js

index 6f2634c609aa6575ef52a37ef1652d1104b9f53b..7c418575ec2b49fc5f19ea68ad514091774545be 100644 (file)
@@ -298,7 +298,7 @@ module.exports = function(Chart) {
                        var me = this;
                        // Convert ticks to strings
                        var tickOpts = me.options.ticks;
-                       me.ticks = me.ticks.map(tickOpts.userCallback || tickOpts.callback);
+                       me.ticks = me.ticks.map(tickOpts.userCallback || tickOpts.callback, this);
                },
                afterTickToLabelConversion: function() {
                        helpers.callback(this.options.afterTickToLabelConversion, [this]);