Example of Legend in Blazor Maps Component

Maps / Legend / Legend

This sample depicts grouping of countries based on population density and represents the same via the legend. The type and position of the legend can also be modified.

Properties
Legend Type
Legend Position
Show population density when the legend item is toggled

In this example, you can see how to configure and render legend in the map using MapsLegendSettings. A legend item represents the value of a shape. A legend can contain any number of legend items. Using the MapsShapeColorMappings property, you can bind the desired color to the shapes if its values fall within the specified range. Toggling the legend item also allows you to show or hide color mapping related to population density.

More information about legend can be found in this documentation section.

Transform your Blazor web apps today with Syncfusion® Blazor components
100+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE