Accepted answer

i had the exact same issue when displaying a bar chart with time as the x axes.

inside your xaxes you need to add an additional configuration option:

xaxes: [{
    offset: true

description from the chartjs documentation:

if true, extra space is added to the both edges and the axis is scaled to fit into the chart area. this is set to true in the bar chart by default.

chartjs documentation cartesian

Related Query

More Query from same tag