Skip to content
Advertisement

Json file data to Chart.JS

I’m trying to add multiple datasets from a json file to a linechart in chart.JS. Here’s my JS code:

JavaScript

Here’s my HTML:

JavaScript

All other neccessary HTML code is added to make the file valid. There is something wrong with this code i just can’t figure out, I’m able to use the charts to input manual data but when it comes to importing Json data I’m stuck. I’ve read through far too many other Q&As here but nothing is working. Thanks in advance

Advertisement

Answer

You can tell by the error message that jsonfileshort is not defined.

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement