-1
Talk guys, I have a question here in my project. I have a graph that is like this:
And I want to popular it with the data of a webservice in PHP, which will return a JSON and on each button that it clicks, I make a new request. Knowing that the method of storing his data is like this:
data: [
[1, 34],
[2, 25],
[3, 19],
[4, 34],
[5, 32],
[6, 44]
]
};
Now my question is: How do I allocate the data in this way in the graph’s 'date'? Assuming my JSON comes like this:
[
{
"content":[
{
"data": "2015-05-05",
"volume": "280"
},
{
"data": "2015-05-06",
"volume": "20"
}
]
}
]
I’ve had difficulties using ajax request data in graphics and ended up leaving pig with PHP in the middle anyway, but this time there is no way haha. If anyone knows how to help, I’d appreciate it. Hugs.
This answers your question? Populating Chart.js with AJAX request data
– Renato Junior