menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ColorMapping - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ColorMapping

    Sets and gets for customizing the color mapping properties of the treemap component.

    Inheritance
    System.Object
    ColorMapping
    TreeMapLeafColorMapping
    TreeMapLevelColorMapping
    Namespace: Syncfusion.Blazor.TreeMap
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ColorMapping : OwningComponentBase

    Constructors

    ColorMapping()

    Declaration
    public ColorMapping()

    Properties

    Color

    Gets or sets the color array used for the color mapping in the TreeMap.

    Declaration
    public string[] Color { get; set; }
    Property Value
    Type Description
    System.String[]

    An array of strings representing the colors. These colors are used to fill the TreeMap nodes based on the specified range.

    Remarks

    Each color in the array corresponds to a specific range or value in the TreeMap data. Use this property to assign specific colors for visual differentiation.

    EndRange

    Gets or sets the ending value of the color mapping range.

    Declaration
    public Nullable<double> EndRange { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    A nullable double representing the end of the value range for color mapping.

    Remarks

    This property defines the upper bound of the value range that maps to the specified colors.

    Label

    Gets or sets the label text for the legend associated with the color mapping.

    Declaration
    public string Label { get; set; }
    Property Value
    Type Description
    System.String

    A string representing the label text for the legend.

    Remarks

    This label appears in the legend to describe what the color range represents in the context of the TreeMap data.

    MaxOpacity

    Gets or sets the maximum opacity used in the color mapping of the TreeMap component.

    Declaration
    public double MaxOpacity { get; set; }
    Property Value
    Type Description
    System.Double

    A double indicating the maximum opacity value, ranging from 0 (completely transparent) to 1 (completely opaque). The default value is -1, indicating no opacity is applied by default.

    Remarks

    Adjust the maximum opacity to enhance or reduce the visibility of colors in the TreeMap.

    MinOpacity

    Gets or sets the minimum opacity used in the color mapping of the TreeMap.

    Declaration
    public double MinOpacity { get; set; }
    Property Value
    Type Description
    System.Double

    A double indicating the minimum opacity value, ranging from 0 (completely transparent) to 1 (completely opaque). The default value is -1, indicating no opacity is applied by default.

    Remarks

    Use this property to specify transparency at the start of the color gradient.

    ShowLegend

    Gets or sets a value indicating whether the legend for color mapping is visible on the TreeMap component.

    Declaration
    public bool ShowLegend { get; set; }
    Property Value
    Type Description
    System.Boolean

    A boolean value that specifies legend visibility. The default value is true.

    Remarks

    Enabling the legend can provide contextual information regarding the color mapping on the TreeMap.

    StartRange

    Gets or sets the starting value of the color mapping range.

    Declaration
    public Nullable<double> StartRange { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    A nullable double representing the start of the value range for color mapping.

    Remarks

    This property defines the lower bound of the value range that maps to the specified colors.

    Methods

    Dispose(Boolean)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved