Class TreeMapRangeBrushSettings
Provides settings for defining range based brushes in the SfTreeMap.
Namespace: Syncfusion.Maui.TreeMap
Assembly: Syncfusion.Maui.TreeMap.dll
Syntax
public class TreeMapRangeBrushSettings : TreeMapBrushSettings
Constructors
TreeMapRangeBrushSettings()
Declaration
public TreeMapRangeBrushSettings()
Fields
RangeBrushesProperty
Identifies the RangeBrushes dependency property.
Declaration
public static readonly BindableProperty RangeBrushesProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for RangeBrushes dependency property. |
Properties
RangeBrushes
Gets or sets the collection of range based brushes for the SfTreeMap.
Declaration
public List<TreeMapRangeBrush> RangeBrushes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<TreeMapRangeBrush> | The default value of RangeBrushes is an empty list. |
Remarks
The RangeBrushes property allows you to specify a list of TreeMapRangeBrush instances, where each instance defines a specific range and its associated background brush.
Examples
The below examples shows, how to set RangeBrushes property of TreeMapRangeBrushSettings in the SfTreeMap.
<treemap:SfTreeMap x:Name="treeMap"
RangeColorValuePath="EmployeesCount"
PrimaryValuePath="EmployeesCount"
DataSource="{Binding EmployeeDetails}">
<treemap:SfTreeMap.BindingContext>
<local:EmployeeViewModel />
</treemap:SfTreeMap.BindingContext>
<treemap:SfTreeMap.LeafItemBrushSettings>
<treemap:TreeMapRangeBrushSettings>
<treemap:TreeMapRangeBrushSettings.RangeBrushes>
<treemap:TreeMapRangeBrush LegendLabel="1 % growth" From="1" To="50" Brush="#77D8D8" />
<treemap:TreeMapRangeBrush LegendLabel="2 % Growth" From="51" To="100" Brush="#AED960" />
</treemap:TreeMapRangeBrushSettings.RangeBrushes>
</treemap:TreeMapRangeBrushSettings>
</treemap:SfTreeMap.LeafItemBrushSettings>
<treemap:SfTreeMap.LeafItemSettings>
<treemap:TreeMapLeafItemSettings LabelPath="JobDescription">
</ treemap:TreeMapLeafItemSettings>
</treemap:SfTreeMap.LeafItemSettings>
</treemap:SfTreeMap>