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 - Custom Annotations

Annotations are containers for images, text blocks, and custom content. By using annotations, you can display additional information to your end users and improve the readability of data visualized within your app.

To create annotations, populate the VectorMap's annotations array. Each object in the array configures an individual annotation. To specify settings for all annotations, use the commonAnnotationSettings object. Individual settings take precedence over common settings.

To give you the ability to edit code on the fly, the demo uses SystemJS. For this reason, launching the demo takes some time. We strongly recommend that you do not use this approach in real projects.
Backend API

You can set each annotation type property to "text", "image", or "custom". In this demo, annotation type has been set to "custom".

Custom annotations require that you specify your own display template in SVG format. As you can see in the demo code, you can access annotation data within template markup.

For more information on annotation settings, refer to the annotations[] help topic.