In the code below, 'chartList' is an array of chart variables set with specific data. When selection is made from dropdown for one of the pie chart, all other such pie charts are getting refreshed/ re-rendered.
chartsList.forEach(chart => {
var div = document.createElement("div")
div.id = "container" + chartCounter
div.style.width = "510px"
div.style.height = "240px"
div.style.display = "inline-block"
document.getElementById("Pie").appendChild(div)
Highcharts.chart("container" + chartCounter, chart);
chartCounter++
})
Also is this correct way of creating multiple pie charts on the fly? If not, suggest me some alternate way.