Exclude countries dynamically amCharts

607 Views Asked by At

I want to exclude countries from map (amCharts v4 maps) dynamically. But when I push values into polygon series nothing changes. polygonSeries.exclude.push('RU');. I must redraw a map to see new excluded countries. How to exclude countries without reloading the map?. See example in this codepen. Thanks.

1

There are 1 best solutions below

0
Beso Kakulia On BEST ANSWER

The solution is, instead of excluding, using "hide" function polygonSeries.getPolygonById("RU").hide();.