Got this loop... but can only get the new point to animate if I invoke the series.animate() method on the ENTIRE series, which I've worked around by removing all points except for the new one that's being drawn. Any ideas on how to get each added point to animate on the flow chart individually?
Code: Select all
for (let i = 0; i < data.length; i++) {
let rec = data[i];
this['map' + type].series[1].addPoint({
id: rec.departCity,
lat: rec.departLat,
lon: rec.departLng,
color: '#494F5E'
},type == 1);
this['map' + type].series[1].addPoint({
id: rec.arriveCity,
lat: rec.arriveLat,
lon: rec.arriveLng,
color: '#494F5E'
},type == 1);
this['map' + type].series[2].addPoint(
{
from: rec.departCity,
to: rec.arriveCity,
weight: 30,
growTowards: true,
markerEnd: {
width: 14,
height: 14
},
},true,type == 2 && i > 0, true);
if (type == 2) {
this['map' + type].series[2].animate();
}
await delay(700);
}