Open nixis opened 8 years ago
If you are fetching these data from the server as simple variable then simply put those variable value in label and value Ex-
{label: "labelVarName", value: valueVarName}
If you have JSON data from your server then convert that JSON data in JS associative array and in Donut Chart simply access associative array and assign key as label and value as value.
Hi,
I need your help! I use this data at a bar chart, now I want to use the same data for a donut chart
data: [{"meals":19,"drinks":17}]
I know there is a formatter function, but I do not understand this.
Is there no chance like at the bar chart to set the keys and labels?
xkey: 'date', ykeys: ['meals', 'drinks'], labels: ['Meals', 'Drinks'],
Hope anybody has a tip for me :)