[Chartjs]-Display Date Label in axes – chart js/ng2 charts

5πŸ‘

It looks like you want to show months instead of days for the axis labels. You can achieve this by changing the unit property:

options: {
    scales: {
        xAxes: [{
            type: 'time',
            time: {
                unit: 'month'
            }
        }]
    }
}

Leave a comment