0👍
You should save your data in a variable, loop through your data to get the right array entry and apply all your data you need to the chart and update it.
I can only give you this general solution without code as I don’t want to analyze your code again after I already stated in an answer to another question of you that I don’t think you have a good data structure.
- [Chartjs]-Hide empty bars in Grouped Stacked Bar Chart – chart.js
- [Chartjs]-Chartjs tooltip is cut off when out of canvas
Source:stackexchange.com