We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to render RangeBrushColorMapping in SfTreeMap?

Platform: WinRT |
Control: SfTreeMap

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

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile