Chart.js and long labels

For Chart.js 2.0+ you can use an array as label:

Quoting the DOCs:

“Usage: If a label is an array as opposed to a string i.e. [[“June”,”2015″], “July”] then each element is treated as a seperate line.”

var data = {
   labels: [["My", "long", "long", "long", "label"], "another label",...],
   ...
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)