Chart Js Legend Color Code Example


Example 1: chartjs line color

backgroundColor: '', borderColor: ''

Example 2: legend on click use default chartjs

// How to implement a custom behaviour when clicking on a legend element var original = Chart.defaults.global.legend.onClick; Chart.defaults.global.legend.onClick = function(e, legendItem) {   /* do custom stuff here */   original.call(this, e, legendItem); };

Comments

Popular posts from this blog

Chemistry - Bond Angles In NH3 And NCl3

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Change The Font Size Of Visual Studio Solution Explorer