📅  最后修改于: 2022-03-11 15:02:03.105000             🧑  作者: Mango
// 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);
};