Chartjs-Parsing JSON Data to Chartjs in React

0👍

It seems the issue is in the type of the x-axis, cause if you provide

  datasets: [{
        data: [{Date : '11',Close: 56},{Date : '22',Close: 656},{Date : '23',Close: 6}],
        showLine: true,
        fill: false,
        borderWidth: 1,
        parsing: {
            xAxisKey: 'Date',
            yAxisKey: 'Close'
        },
        backgroundColor: 'rgba(255, 99, 132, 1)'
    }]

it draws just fine

enter image description here

So you should better find how to show time on the x-axis

I know I am late, but I have to answer this)

Leave a comment