chart js hide legend
var myChart = new Chart(ctx, {
type: 'line',
data: data,
options: {
legend: {
display: false //This will do the task
}
}
});
chart js hide legend
var myChart = new Chart(ctx, {
type: 'line',
data: data,
options: {
legend: {
display: false //This will do the task
}
}
});
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);
};
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us