// Function to format an individual tick mark
tickFormatFunction: function tickFormatFunction(tick, index, ticks) {
var formattedTick = tick.format(this.displayFormat);
+ var tickOpts = this.options.ticks;
+ var callback = helpers.getValueOrDefault(tickOpts.callback, tickOpts.userCallback);
- if (this.options.ticks.userCallback) {
- return this.options.ticks.userCallback(formattedTick, index, ticks);
+ if (callback) {
+ return callback(formattedTick, index, ticks);
} else {
return formattedTick;
}