0👍
✅
while making the charts store objects in an array with 2 values, the chart object and the id of that chart. That way when you click the chart you pick the right object out of the array.
You can also instead of keeping track of the id’s with object only store the chart.js object in an array and make sure the index of the object is in the id then parse the index out and get that element from the array
Source:stackexchange.com