Example of Legend in Blazor Maps Component
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.
Source:
simple.wikipedia.org
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.