I have my JSON data from URL using angular js and assigned to $scope.values
. Now I want to feed this value to chart using the c3 chart.
I have a dummy chart using below code.
jsonData.forEach(function(e) {
sites.push(e.name);
})
var chart = c3.generate({
bindto: '#chart1',
data: {
json: [ data ],
How can I pass the json values to the chart?
The
data.json
is expecting following format:You can either pass multiple columns to
data.json
or you can add each colmn kinda manually.