Chartjs-If condition not working for ChartJS

0👍

Replace if(label != 'undefined') for if(label). It should works

0👍

I think your problem is that undefined is a keyword so you don’t have to put it between quotes.
Try with if (label != null && label != undefined) { … }

Leave a comment