frequency9
Posts: 6
Joined: Thu Dec 02, 2021 11:30 pm

Charts not rendering in JS for loop

Hi,

I am creating highcharts in JS For Loop to show various metrics. However only the last chart is displayed properly and the rest of them are not.

The HTML Elements are created dynamically. I have recreated the issue with simple data: https://jsfiddle.net/uvt3bsfn/29/

Any help would be greatly appreciated.

Thanks
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Charts not rendering in JS for loop

Hi frequency9,

Welcome to our forum and thanks for contacting us with your question!

I would suggest something like that: https://jsfiddle.net/BlackLabel/gxu1zfmh/

Let me know what do you think about this solution.
Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”