ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / HeatMapRendererDefinition Class / UpperLabel Property
Example

In This Topic
    UpperLabel Property (HeatMapRendererDefinition)
    In This Topic
    Gets or sets upper label that will show up on the TOC next the symbol.
    Syntax
    public string UpperLabel {get; set;}
    Public Property UpperLabel As String
    Example
    Create a Heatmap 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(() =>
    {
      //defining a heatmap renderer that uses values from Population field as the weights
      HeatMapRendererDefinition heatMapDef = new HeatMapRendererDefinition()
      {
        Radius = 20,
        WeightField = "Population",
        ColorRamp = colorRamp.ColorRamp,
        RendereringQuality = 8,
        UpperLabel = "High Density",
        LowerLabel = "Low Density"
      };
    
      FeatureLayer flyr = MapView.Active.Map.Layers[0] as FeatureLayer;
      CIMHeatMapRenderer heatMapRndr = flyr.CreateRenderer(heatMapDef) as CIMHeatMapRenderer;
      flyr.SetRenderer(heatMapRndr);
    });
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also