Chart.js V2 Hide Dataset Labels


Answer :

Just set the label and tooltip options like so

... options: {     legend: {         display: false     },     tooltips: {         callbacks: {            label: function(tooltipItem) {                   return tooltipItem.yLabel;            }         }     } } 

Fiddle - http://jsfiddle.net/g19220r6/


add:

Chart.defaults.global.legend.display = false; 

in the starting of your script code;


It's just as simple as adding this: legend: { display: false, }

// Or if you want you could use this other option which should also work:

Chart.defaults.global.legend.display = false;


Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?