I am trying to create a pie chart with C3. I have an array of objects as you can see below:
myData= [ { a: 1 }, { b: 14 }, {c: 21 }, { d: 16 }]
a,b,c,d are the labels and the numbers should be the values of my chart.
var chart = c3.generate({
data: {
columns: [
myData
],
type: 'donut'
},
donut: {
title: "I am a chart"
}
});
This approach does not work, cause C3 doesn't accept the data type...