Chartjs-How do I prevent Chartjs tooltip callback returning multiple instances of the same value?

1๐Ÿ‘

โœ…

I have answered my own question. For anyone with a similar issue you can configure your tooltip with this option so that it will only use one dataset:

tooltips: {
filter: function (tooltipItem) {
    return tooltipItem.datasetIndex === 0;
}
}

Leave a comment