Selecting countries on a map

This demo shows how you can use JavaScript Maps' clickMapObject event to create a map with togglable countries.

The event handler dynamically sets showAsSelected property, without reloading the whole of the chart.

This demo also defines a sample function to gather currently selected countries, by cycling through the list and checking their showAsSelected attributes.