score:13

Accepted answer

for this you can make use of the ticks.usercallback in the scales.xaxes option so that you return a formatted date for each xaxis tick. if you are using the bundle version chartjs comes with momentjs which makes it really easy but if you are just passing timestamps in milliseconds you can do whatever you want to the label.

options: {
    scales: {
        xaxes: [{
            ticks: {
                usercallback: function(label, index, labels) {
                    return moment(label).format("dd/mm/yy");
                }
             }
        ]}
     }
 }

fiddle https://jsfiddle.net/leighking2/q5ak7p3h/

score:3

version 3.4 you can do it something like this:

 options: {
        scales: {
            x: {
                ticks: {
                    // include a dollar sign in the ticks
                    callback: function(value, index, values) {
                        return '$' + value;
                    }
                }
            }
        }
    }

Related Query

More Query from same tag