Chartjs-ChartJS tooltip values aren't matching the data after updating multiple charts

1👍

Somehow it turns out that the issue is about options. You have to define different options for each chart. I fiddled with the codepen example. Here is what I come up with:

let chartOptions1 ..... ;

let chartOptions2  .....;

let chartOptions3  .....;
....
const chart1 = new Chart(chart1Ctx, chartOptions1);
const chart2 = new Chart(chart2Ctx, chartOptions2);
const chart3 = new Chart(chart3Ctx, chartOptions3);

After defining and using different options for each chart, I was able to see appropriate tooltips for each charts. Try it and let me know the result.

Leave a comment