DevExtreme v24.2 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

React Vector Map - Colors Customization

This demo shows how to color different map elements. The map represented here indicates the top ten largest countries in the world by means of colors. These colors are assigned to the map areas using the customize callback function of the layers object. Moreover, when one of the areas is selected or hovered over, its color changes to those specified by the selectedColor and hoveredColor properties.

This demo may be temporarily unavailable due to an issue with the UNPKG service we use for resource loading. You can vote on it in the

UNPKG repository

We're working on a fix — sorry for the inconvenience.

Backend API

Tooltips for the map areas representing the largest countries are customized as well. Using the tooltip | customizeTooltip callback function, they are colored identical to the areas themselves and display the total area of the country.