WorldMap

Examples

A world map of continents.

Note: It is a good idea to include a Legend along with this visualization. You can use the same seriesproperty for both WorldMap and Legend.

Properties

colorIndex {category}-{index}
The color identifier to use when not specified in the series. For example: 'neutral-1'. See Color for possible values.
onSelectPlace {function ([x, y], [lat, lon])}
If provided, this function will be called with the coordinates of the place that is clicked. The first argument provides map coordinates. The second argument provides latitude and longitude coordinates.
series [{continent: , place: [x, y]|[lat, lon], label: , colorIndex: , flag: , onClick: , onHover: }, ...]
An array of objects describing the data. The available continents are: NorthAmerica, SouthAmerica, Europe, Africa, Asia, and Australia. A place is a two dimensional coordinate on the map. You can use onSelectPlace to interact with the map to select places. Or, you can specify a latitude and longitude. You must specify either a continent or a place in each series item. label is used for accessibility and should always be provided. flag is anything renderable which will be placed over a continent or adjacent to a place. onHover will be passed a single boolean argument indicating whether the user has started or stopped hovering over the item.
zoom true|false
Whether the map should automatically zoom in to just the continents specified or to the continents continaining the placed specified.