score:0

Accepted answer

see chartjs linechart with only one point - how to center

you can add dummy labels to center your single point:

{
    type: 'line',
    data: {
        labels: ['', 'jan', ''],
        datasets: [
            { bordercolor: 'green', data: [null, 5, null], label: 'set1' },
            { bordercolor: 'red', data: [null, 7, null], label: 'set2' },
            { bordercolor: 'blue', data: [null, 3, null], label: 'set3' }
        ]
    }
}

or you can use the scatter chart type to manually specify the x coordinate of your points.


Related Query

More Query from same tag