Posts: 1
Joined: Sat Jul 29, 2023 2:17 pm

series.addPoint() not animating on flowmap

Can't seem to get incremental animation on a flowmap to work...

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);
Posts: 1075
Joined: Fri Dec 16, 2022 11:45 am

Re: series.addPoint() not animating on flowmap


Welcome to our forum & thanks for the question!

Could you please try to reproduce this issue in an online code editor like JSFiddle? You could start here: ... -world-cup

Then I'll gladly take a look and try to help you with this.

Best regards!
Highcharts Developer

Return to “Highcharts Maps”