ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMClassBreaksRenderer Class
Members Example

In This Topic
    CIMClassBreaksRenderer Class
    In This Topic
    Represents a class break renderer.
    Object Model
    CIMClassBreaksRenderer ClassCIMSymbolReference ClassCIMClassBreaksRenderer ClassCIMColorRamp ClassCIMSymbolReference ClassCIMSymbolReference ClassCIMClassBreaksRenderer ClassCIMNumberFormat ClassCIMExpressionInfo Class
    Syntax
    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.Core.CIM.CIMObject
          ArcGIS.Core.CIM.CIMRenderer
             ArcGIS.Core.CIM.CIMClassBreaksRendererBase
                ArcGIS.Core.CIM.CIMClassBreaksRenderer

    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also