2👍
✅
You can generate a custom legend (HTML string) like this:
var chart = new Chart(ctx, {
type: 'line',
data: data,
options: {
legendCallback: function(chart) {
// Return the HTML string here.
}
}
});
Reference:
http://www.chartjs.org/docs/latest/configuration/legend.html
Source:stackexchange.com