I am hoping to construct an undetermined amount of pie charts and be able to display them alongside each other on a page. The number of pie charts generated will depend upon the number of elements in a JSON object. I have included an example of how my data will look below:
[
{
"id" : "123",
"data" : [20, 40, 10, 20, 10]
},
{
"id" : "456",
"data" : [10, 20, 20, 30, 20]
},
{
"id" : "789",
"data" : [25, 35, 5, 10, 25]
}
]
I would like to have one pie chart for each element where there is an ‘id’ and ‘data’ attribute where ‘data’ will be used as the dataPoints in the pie charts for the ‘id’ which is included in the element. How can I achieve this?