Diagram / Maps / Fill Rules
In This Topic
Fill Rules
In This Topic

Fill rules are used to colorize a map based on the values of a shape field. When creating a fill rule you must specify the shapefile it is used on, the fill rule data column name and the colors to use (all of them or only the first, the last and their count). There are two types of fill rules:

Adding fill rule
Copy Code
NMapFillRuleRange fillRule = new NMapFillRuleRange(countries, "POP_CNTRY", Color.White, Color.Black, 12);
fillRule.DataGrouping = new NDataGroupingOptimal();
shapefile.FillRule = fillRule;

The following images illustrate the different data grouping algorithms applied to a world map, which contains information about the population of each country:

See Also