ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / HeatMapRendererDefinition Class / ColorRamp Property
Example

In This Topic
    ColorRamp Property (HeatMapRendererDefinition)
    In This Topic
    Gets or sets the color ramp be used to for the heat map.
    Syntax
    Public Property ColorRamp As CIMColorRamp
    public CIMColorRamp ColorRamp {get; set;}
    Example
    Create a Heatmap Renderer
    {
        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
        //and the color ramp from it.
        //Note: Run within a QueuedTask
        //defining a heatmap renderer that uses values from Population field as the weights
        HeatMapRendererDefinition heatMapDef = new HeatMapRendererDefinition()
        {
            Radius = 20,
            WeightField = "Population",
            ColorRamp = colorRamp,
            RendereringQuality = 8,
            UpperLabel = "High Density",
            LowerLabel = "Low Density"
        };
        CIMHeatMapRenderer heatMapRndr = featureLayer.CreateRenderer(heatMapDef) as CIMHeatMapRenderer;
        featureLayer.SetRenderer(heatMapRndr);
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also