ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / UnclassedColorsRendererDefinition Class
Members Example

In This Topic
    UnclassedColorsRendererDefinition Class
    In This Topic
    Represents an unclassed colors renderer definition to show qualitative differences in feature values with an evenly distributed color scheme.
    Object Model
    UnclassedColorsRendererDefinition ClassCIMColorRamp ClassCIMSymbolReference ClassCIMSymbolReference Class
    Syntax
    public class UnclassedColorsRendererDefinition : RendererDefinition 
    Public Class UnclassedColorsRendererDefinition 
       Inherits RendererDefinition
    Remarks

    Unclassed colors symbology is similar to graduated colors in that it's used to make choropleth maps.

    Once you define an unclassed renderer, you can call a FeatureLayer's CreateRenderer and SetRenderer methods to create and assign a renderer to a feature layer.

    Example
    Create an Unclassed Renderer
    string colorBrewerSchemesName = "ArcGIS Colors";
    StyleProjectItem style = Project.Current.GetItems<StyleProjectItem>().First(s => s.Name == colorBrewerSchemesName);
    string colorRampName = "Heat Map 4 - Semitransparent";
    IList<ColorRampStyleItem> colorRampList = await QueuedTask.Run(() =>
    {
      return style.SearchColorRamps(colorRampName);
    });
    ColorRampStyleItem colorRamp = colorRampList[0];
    
    await QueuedTask.Run(() =>
    {
      CIMPointSymbol pointSym = SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.GreenRGB, 16.0, SimpleMarkerStyle.Diamond);
      CIMSymbolReference symbolPointTemplate = pointSym.MakeSymbolReference();
    
      //defining an unclassed renderer with custom upper and lower stops
      //all features with value >= 5,000,000 will be drawn with the upper color from the color ramp
      //all features with value <= 50,000 will be drawn with the lower color from the color ramp
      UnclassedColorsRendererDefinition unclassRndrDef = new UnclassedColorsRendererDefinition
                            ("Population", symbolPointTemplate, colorRamp.ColorRamp, "Highest", "Lowest", 5000000, 50000)
      {
    
        //drawing features with null values with a different symbol
        ShowNullValues = true,
        NullValueLabel = "Unknown"
      };
      CIMPointSymbol nullSym = SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.RedRGB, 16.0, SimpleMarkerStyle.Circle);
      unclassRndrDef.NullValueSymbol = nullSym.MakeSymbolReference();
      FeatureLayer flyr = MapView.Active.Map.Layers[0] as FeatureLayer;
      CIMClassBreaksRenderer cbRndr = flyr.CreateRenderer(unclassRndrDef) as CIMClassBreaksRenderer;
      flyr.SetRenderer(cbRndr);
    });
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Mapping.LayerDrawingDefinition
          ArcGIS.Desktop.Mapping.RendererDefinition
             ArcGIS.Desktop.Mapping.UnclassedColorsRendererDefinition

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also