The Colorizer is used to automatically choose colors for map shapes based on shape data. This feature can be applied to the following MapShape class descendants that utilize the MapShapeBase.Fill property:
Represents the Graph colorizer, which paints shapes that have a common border using different colors according to the Graph Coloring approach. For instance, the Graph colorizer can be used to create a political map.
Specify a set of colors in the ColorCollection object, which is accessed using the MapColorizer.Colors property. The colorizer automatically associates each color with the specified data range to colorize map shapes.
If you specify more ranges than colors, after reaching the last color in the collection, the colorizer will reuse colors starting from the beginning of the collection.
Note that when the map control obtains data from a Shapefile, the vector item attributes are generated automatically. Thus, you can select which attribute should be used in your application. If an application uses manually generated map items, specify that the attributes of these items use the choropleth colorizer.
The image below shows the choropleth colorizer with a color scale legend that colors map contours based on GDP data from the Shapefile.
To learn more about how to colorize map contours loaded from a Shapefile, see the following example.
Create a few ColorizerKeyItem objects representing keys which will be used to select a color, and add them to the colorizer with KeyColorColorizer.Keys. Note that a key collection may be generated automatically.