ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ProportionalRendererDefinition Class / ProportionalRendererDefinition Constructor / ProportionalRendererDefinition Constructor(String,esriUnits,SymbolShapes,ValueRepresentations)
Name of the field used in the renderer.
The units used in the renderer.
(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,SymbolShapes,ValueRepresentations)
    In This Topic
    Creates a ProportionalRendererDefinition.
    Syntax
    Public Function New( _
       ByVal field As String, _
       ByVal units As esriUnits, _
       Optional ByVal proportionalSymbolType As SymbolShapes, _
       Optional ByVal valueRepresentations As ValueRepresentations _
    )

    Parameters

    field
    Name of the field used in the renderer.
    units
    The units used in the renderer.
    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 Proportion Renderer with max and min symbol size capped
    {
        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
        //Creating a point symbol to be used as a template symbol for the proportional renderer
        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
        //Creating a proportional renderer definition that uses the "Population" field
        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
        };
        // Create a proportional renderer using the definition
        CIMProportionalRenderer propRndr = featureLayer.CreateRenderer(prDef) as CIMProportionalRenderer;
        // Set the renderer to the feature layer
        featureLayer.SetRenderer(propRndr);
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also