[Chartjs]-Chart.js Cannot read property 'apply' of undefined

1πŸ‘

βœ…

I had the same problem a while ago. You have to check if the length of the object you’re giving to the chart is more than 0 then render it.

{ data.length > 0 && <Line options={options} data={data}/> }

Leave a comment