ArcGIS Pro 3.7 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 ClassCIMClassBreaksRendererAuthoringInfo ClassCIMSymbolReference ClassCIMClassBreaksRenderer ClassCIMColorRamp ClassCIMSymbolReference ClassCIMLegendPatch ClassCIMSymbolReference ClassCIMLegendPatch ClassCIMClassBreaksRenderer ClassCIMNumberFormat ClassCIMExpressionInfo Class
    Syntax
    Example
    Create an unclassed Renderer
    {
        string colorBrewerSchemesName = "ArcGIS Colors";
        //Get the style project item that contains the color ramps
        //Refer to the Initialize region for an example of how to get a style item
        //Note: Run within a QueuedTask
        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, "Highest", "Lowest", 5000000, 50000)
        {
    
            //drawing features with null values with a different symbol
            ShowNullValues = true,
            NullValueLabel = "Unknown"
        };
        // Create a point symbol for null values
        CIMPointSymbol nullSym = SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.RedRGB, 16.0, SimpleMarkerStyle.Circle);
        unclassRndrDef.NullValueSymbol = nullSym.MakeSymbolReference();
        //Create the unclassed renderer using the definition
        CIMClassBreaksRenderer cbRndr = featureLayer.CreateRenderer(unclassRndrDef) as CIMClassBreaksRenderer;
        //Set the renderer to the feature layer
        featureLayer.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 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also