Articles in this section
Category / Section

How to render RangeBrushColorMapping in SfTreeMap?

1 min read

The TreeMap leaf nodes can be colored using the Color property based on its Range, From and To, and the Brush, specified using RangeBrush collection of RangeBrushColorMapping.

XAML

<syncfusion:SfTreeMap.LeafColorMapping>
      <syncfusion:RangeBrushColorMapping>
                        <syncfusion:RangeBrushColorMapping.Brushes>
                              <syncfusion:RangeBrush Color="#77D8D8" From="0" To="1"                                                LegendLabel="1 % Growth"/>         
                             . . .                     
                        </syncfusion:RangeBrushColorMapping.Brushes>
       </syncfusion:RangeBrushColorMapping> 
</syncfusion:SfTreeMap.LeafColorMapping>

Refer the following online documentation link for more details about RangeBrushColorMapping.

https://help.syncfusion.com/winrt/treemap/colormapping#rangebrushcolormapping

Sample Location for RangeBrushColorMapping:

RangeBrushColorMapping.zip

XAML

<syncfusion:SfTreeMap>
                    . . .
            <syncfusion:SfTreeMap.LeafColorMapping>
                     <syncfusion:RangeBrushColorMapping>
                        <syncfusion:RangeBrushColorMapping.Brushes>
                            <syncfusion:RangeBrush Color="#77D8D8" From="0" To="1" LegendLabel="1 % Growth"/>
                            <syncfusion:RangeBrush Color="#AED960" From="0" To="2" LegendLabel="2 % Growth"/>
                            <syncfusion:RangeBrush Color="#FFAF51" From="0" To="3" LegendLabel="3 % Growth"/>
                            <syncfusion:RangeBrush Color="#F3D240" From="0" To="4" LegendLabel="4 % Growth"/>
                        </syncfusion:RangeBrushColorMapping.Brushes>
                    </syncfusion:RangeBrushColorMapping>
            </syncfusion:SfTreeMap.LeafColorMapping>
                    . . .
</syncfusion:SfTreeMap>

Screenshot:

RangeBrushColorMapping in SfTreeMap

Figure 1: RangeBrushColorMapping

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied