ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ProportionalRendererDefinition Class / UpperSizeStop Property
Example

In This Topic
    UpperSizeStop Property
    In This Topic
    Gets or sets upper size stop on the histogram.
    Syntax
    public Nullable<double> UpperSizeStop {get; set;}
    Public Property UpperSizeStop As Nullable(Of Double)
    Remarks
    Histogram stops can be edited to stretch or contract the size range. Any data outside of the two stops will be treated as outliers and drawn with either the minimum or maximum size
    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
      await QueuedTask.Run(() =>
      {
      //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);
      });
    }
    Proportional symbols renderer.
    /// <summary>
    /// Renders a feature layer using proportional symbols to draw quantities.
    /// ![Proportional Symbols renderer](https://ArcGIS.github.io/arcgis-pro-sdk/images/Renderers/proportional-renderer.png)
    /// </summary>
    {
      //Check feature layer name
      //Code works with the USDemographics feature layer available with the ArcGIS Pro SDK Sample data
      var featureLayer = activeMap.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault(f => f.Name == "USDemographics");
      if (featureLayer == null)
      {
        MessageBox.Show("This renderer works with the USDemographics feature layer available with the ArcGIS Pro SDK Sample data", "Data missing");
      }
      //Gets the first numeric field of the feature layer
      var firstNumericFieldOfFeatureLayer = "NumericFieldInLayer";
      //Gets the min and max value of the field
      var sizes = await GetFieldMinMaxAsync(featureLayer, firstNumericFieldOfFeatureLayer);
      ProportionalRendererDefinition prDef = new ProportionalRendererDefinition()
      {
        Field = firstNumericFieldOfFeatureLayer,
        MinimumSymbolSize = 4,
        MaximumSymbolSize = 50,
        LowerSizeStop = Convert.ToDouble(sizes.Item1),
        UpperSizeStop = Convert.ToDouble(sizes.Item2)
      };
      await QueuedTask.Run(() =>
      {
        CIMProportionalRenderer propRndr = (CIMProportionalRenderer)featureLayer.CreateRenderer(prDef);
        featureLayer.SetRenderer(propRndr);
      });
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also