ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / UnclassedColorsRendererDefinition Class / UnclassedColorsRendererDefinition Constructor / UnclassedColorsRendererDefinition Constructor(String,CIMSymbolReference,CIMColorRamp,String,String,Double,Double)
Name of the field used in the renderer.
A template for symbol used in the renderer.
A color ramp to apply to those classes.
A string used in the legend to denote the maximum value in the color scheme.
A string used in the legend to denote the minimum value in the color scheme.
The upper color stop for the histogram used in the renderer.
The lower color stop for the histogram used in the renderer.
Example

In This Topic
    UnclassedColorsRendererDefinition Constructor(String,CIMSymbolReference,CIMColorRamp,String,String,Double,Double)
    In This Topic
    Create a UnclassedColorsRendererDefinition.
    Syntax

    Parameters

    field
    Name of the field used in the renderer.
    symbolTemplate
    A template for symbol used in the renderer.
    colorRamp
    A color ramp to apply to those classes.
    upperLabel
    A string used in the legend to denote the maximum value in the color scheme.
    lowerLabel
    A string used in the legend to denote the minimum value in the color scheme.
    upperColorStop
    The upper color stop for the histogram used in the renderer.
    lowerColorStop
    The lower color stop for the histogram used in the renderer.
    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);
    });
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also