ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ProportionalRendererDefinition Class / ProportionalRendererDefinition Constructor / ProportionalRendererDefinition Constructor(String,CIMSymbolReference,Double,Nullable<Double>,Boolean)
Name of the field used in the renderer.
A template for symbol used in the renderer.
(Optional) The minimum symbol size used in the renderer to draw features with lowest value. (default value = 4)
(Optional) The maximum symbol size used in the renderer to draw features with highest values. When a null value is passed in, a maximum symbol size gets automatically picked based on the layer's shape type. (default value = null)
(Optional) When false, maximumSymbolSize gets ignored and the size of the symbol is drawn proportional to the value. Otherwise, the largest symbol size is equal to maximumSymbolSize. (default value = true)
Example

In This Topic
    ProportionalRendererDefinition Constructor(String,CIMSymbolReference,Double,Nullable<Double>,Boolean)
    In This Topic
    Creates a ProportionalRendererDefinition.
    Syntax

    Parameters

    field
    Name of the field used in the renderer.
    symbolTemplate
    A template for symbol used in the renderer.
    minimumSymbolSize
    (Optional) The minimum symbol size used in the renderer to draw features with lowest value. (default value = 4)
    maximumSymbolSize
    (Optional) The maximum symbol size used in the renderer to draw features with highest values. When a null value is passed in, a maximum symbol size gets automatically picked based on the layer's shape type. (default value = null)
    isMaximumSymbolSizeCapped
    (Optional) When false, maximumSymbolSize gets ignored and the size of the symbol is drawn proportional to the value. Otherwise, the largest symbol size is equal to maximumSymbolSize. (default value = true)
    Example
    Create a Proportion Renderer with max and min symbol size capped
    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, 1.0, SimpleMarkerStyle.Circle);
      CIMSymbolReference symbolPointTemplate = pointSym.MakeSymbolReference();
    
      //minimum symbol size is capped to 4 point while the maximum symbol size is set to 50 point
      ProportionalRendererDefinition prDef = new ProportionalRendererDefinition("POPULATION", symbolPointTemplate, 4, 50, true)
      {
    
        //setting upper and lower size stops to stop symbols growing or shrinking beyond those thresholds
        UpperSizeStop = 5000000,  //features with values >= 5,000,000 will be drawn with maximum symbol size
        LowerSizeStop = 50000    //features with values <= 50,000 will be drawn with minimum symbol size
      };
      FeatureLayer flyr = MapView.Active.Map.Layers[0] as FeatureLayer;
      CIMProportionalRenderer propRndr = flyr.CreateRenderer(prDef) as CIMProportionalRenderer;
      flyr.SetRenderer(propRndr);
    
    });
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also