Hi im running into an issue trying to get a chart to render with points pulled from a JSON API. Perhaps someone can show me where Im going wrong.
my API is returning the following example JSON
{
“Data”:[18,18,18,0,29,29,29,30,29,35,35,23,24,7],
“Time”:[0,5,10,15,20,25,30,35,40,45,50,55,60,65]
}
I created a new type called chart_data with two fields, a list of data and a list of time
Next I made a “when page is loaded” workflow to Create a new Thing of chart_data and set the fields with set lists.
Now when I come to create the chart, I set the data source to be search for chart_datas, the label expression I can set to current point’s date just fine, it goes blue, but when I come to set the value expression to current point’s value, it stays red and says “a value expression should be a number but right now its a list of numbers”
the label expression entry seems happy being provided with a list, how come the value expression cant take a list as argument for current point’s thing?
How do I get the chart points from the API into the chart.js plugin? is my json format wrong?