Skip to content
Advertisement

How to load an array of external data in QuickChart?

I am looking to use QuickChart in my PHP project. I skimmed the documentation completely. But, everything in it has the data being statically loaded as an array. I am trying to load external data, that is generated from somewhere else, into the chart. To understand QuickChart, I tried to load data dynamically in the examples provided in the documentation.

JavaScript

But, there is an error as follows.

JavaScript

Following is the example which I modified.

JavaScript

I searched for a while on Internet, but it looks like QuickChart isn’t as popular, so there aren’t many sources to read. What is the solution in this case?

Advertisement

Answer

That looks like a JSON String representaion of an array so for example

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