Chartjs-Can I add a callback function to the legend while keeping the original functionality?

0👍

The docs show how to do this. You can call the default handler in your custom function:

var defaultLegendClickHandler = Chart.defaults.global.legend.onClick;
defaultLegendClickHandler(e, legendItem);

Leave a comment