diff --git a/docs/axes/labelling.md b/docs/axes/labelling.md index 8f39235640f..96c5eae3784 100644 --- a/docs/axes/labelling.md +++ b/docs/axes/labelling.md @@ -42,3 +42,5 @@ var chart = new Chart(ctx, { } }); ``` + +The third parameter passed to the callback function is an array of labels, but in the time scale, it is an array of `{label: string, major: boolean}` objects. diff --git a/src/scales/scale.time.js b/src/scales/scale.time.js index d5fa4fe789e..1a646322449 100644 --- a/src/scales/scale.time.js +++ b/src/scales/scale.time.js @@ -668,8 +668,10 @@ module.exports = Scale.extend({ var label = adapter.format(time, format ? format : major ? majorFormat : minorFormat); var nestedTickOpts = major ? majorTickOpts : tickOpts.minor; var formatter = helpers.options.resolve([ - nestedTickOpts.callback, nestedTickOpts.userCallback, - tickOpts.callback, tickOpts.userCallback + nestedTickOpts.callback, + nestedTickOpts.userCallback, + tickOpts.callback, + tickOpts.userCallback ]); return formatter ? formatter(label, index, ticks) : label;