Skip to content Skip to sidebar Skip to footer

If Condition Not Working For ChartJS

I am trying to chartjs dashboard page.I am got some issues in bottom label color problem.I get the solution but if condtion not working to me.Please any one help me. My Code..... g

Solution 1:

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


Solution 2:

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) { ... }


Post a Comment for "If Condition Not Working For ChartJS"