Chartjs-How to add new Line but not in the first x axes

0👍

You need to set default values for mouth witch don’t want use example – 0 :

data: {
    datasets: [{
        label: 'First dataset',
        data: [0, 20, 40, 50, 0, 20, 40, 50, 0, 20, 40, 50]
    },
    {
        label: 'Second dataset',
        data: [0, 0, 0, 0, 0, 20, 40, 50, 0, 20, 40, 50]
    }],
    labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
},

i founded exemple here we can use data value – null and it make empty space for this range

Not drawing null values using chart.js

Leave a comment