[Chartjs]-How to get the data attribute of the canvas chart created using chartjs

1๐Ÿ‘

โœ…

If you want to get the attribute data-role, .getAttribute() is doing the job.

console.log(this.getAttribute("data-role"));

CodePen

Leave a comment