ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ProportionalRendererDefinition Class / ProportionalRendererDefinition Constructor / ProportionalRendererDefinition Constructor(String,esriUnits,CIMSymbolReference,SymbolShapes,ValueRepresentations)
Name of the field used in the renderer.
The units used in the renderer.
The fill to be used in symbol type set by using proportionalSymbolType.
(Optional) The symbol type for a proportional renderer. Only symbol type of circle or square is allowed. (default value = Circle)
(Optional) The value representation used in a proportional renderer. (default value = Radius)
Example

In This Topic
    ProportionalRendererDefinition Constructor(String,esriUnits,CIMSymbolReference,SymbolShapes,ValueRepresentations)
    In This Topic
    Creates a ProportionalRendererDefinition.
    Syntax

    Parameters

    field
    Name of the field used in the renderer.
    units
    The units used in the renderer.
    symbolFill
    The fill to be used in symbol type set by using proportionalSymbolType.
    proportionalSymbolType
    (Optional) The symbol type for a proportional renderer. Only symbol type of circle or square is allowed. (default value = Circle)
    valueRepresentations
    (Optional) The value representation used in a proportional renderer. (default value = Radius)
    Remarks

    Use this constructor only when the map is in a Projected Coordinate System.

    When the map is in a projected coordinated system and Units is set, use this constructor to symbolize features where the value of the feature gets used as the radius or the area of the symbol (depending on valueRepresentations).

    Example
    Create a True Proportion 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, 1.0, SimpleMarkerStyle.Circle);
      CIMSymbolReference symbolPointTemplate = pointSym.MakeSymbolReference();
    
      //Defining proportional renderer where size of symbol will be same as its value in field used in the renderer.
      ProportionalRendererDefinition prDef = new ProportionalRendererDefinition("POPULATION", esriUnits.esriMeters, symbolPointTemplate, SymbolShapes.Square, ValueRepresentations.Radius);
    
      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