I want to make an infinite loop to be able to update my chart with data posted below. I have three setTimeout()
's but how do I place them in a loop? Maybe some different solution is better?
setTimeout(function() {
addData(myChart, [45, 50, 30, 34, 61, 53, 42], 0, );
}, 2000);
setTimeout(function() {
addData(myChart, [50, 40, 20, 15, 89, 63, 5], 0, );
}, 7000);
setTimeout(function() {
addData(myChart, [45, 50, 30, 34, 61, 53, 42], 0, );
}, 10000);