Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 138192

Updating chart.js with array index 0 doesn't work

$
0
0

I have an array of chart data objects. I update the chart data by passing the index of the array and pulling data out of the object. This works perfectly for all indexes except 0.

When initializing the chart, I load the 0 index and the chart works perfectly as well, so I know it's not a data structure issue with that particular index. I don't get any errors when calling the update function on the chart with the 0 index.

Here's a codepen showing it not working with index 0.

Why is it not updating the chart for the 0 index?


Viewing all articles
Browse latest Browse all 138192

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>