From 14a2d95e0d8eea5ab3e68d741fc6a2ea7db64bfc Mon Sep 17 00:00:00 2001 From: andig Date: Sun, 13 Aug 2017 11:44:06 +0200 Subject: [PATCH] Ticks callback is now called with `this` as scope (#4632) --- 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 6f2634c609a..7c418575ec2 100644 --- a/src/core/core.scale.js +++ b/src/core/core.scale.js @@ -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]);