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 the PaletteColorMapping in the SfTreeMap?

Platform: WinRT |
Control: SfTreeMap

The TreeMap leaf nodes can be colored by populating the multiple color brushes inside the Colors collection of the PaletteColorMapping.

XAML

<syncfusion:SfTreeMap.LeafColorMapping>
      <syncfusion:PaletteColorMapping>
                    <syncfusion:PaletteColorMapping.Colors>
                        <SolidColorBrush Color="Red"/>
                        <SolidColorBrush Color="Blue"/>
                        <SolidColorBrush Color="Green"/>
                        <SolidColorBrush Color="Yellow"/>
                        <SolidColorBrush Color="Orange"/>
                        <SolidColorBrush Color="Orchid"/>
                        <SolidColorBrush Color="Brown"/>
                        <SolidColorBrush Color="BlueViolet"/>
                        <SolidColorBrush Color="OrangeRed"/>
                        <SolidColorBrush Color="Magenta"/>
                        <SolidColorBrush Color="Olive"/>
                        <SolidColorBrush Color="Crimson"/>
                        <SolidColorBrush Color="DeepSkyBlue"/>
                    </syncfusion:PaletteColorMapping.Colors>
                </syncfusion:PaletteColorMapping>
</syncfusion:SfTreeMap.LeafColorMapping>

Refer to the following online documentation link for more details on PaletteColorMapping:

https://help.syncfusion.com/winrt/installation-and-deployment

Sample Location for PaletteColorMapping: PaletteColorMapping.zip

XAML

<syncfusion:SfTreeMap>
                    . . .
            <syncfusion:SfTreeMap.LeafColorMapping>
      <syncfusion:PaletteColorMapping>
                    <syncfusion:PaletteColorMapping.Colors>
                        <SolidColorBrush Color="Red"/>
                        <SolidColorBrush Color="Blue"/>
                        <SolidColorBrush Color="Green"/>
                        <SolidColorBrush Color="Yellow"/>
                        <SolidColorBrush Color="Orange"/>
                        <SolidColorBrush Color="Orchid"/>
                        <SolidColorBrush Color="Brown"/>
                        <SolidColorBrush Color="BlueViolet"/>
                        <SolidColorBrush Color="OrangeRed"/>
                        <SolidColorBrush Color="Magenta"/>
                        <SolidColorBrush Color="Olive"/>
                        <SolidColorBrush Color="Crimson"/>
                        <SolidColorBrush Color="DeepSkyBlue"/>
                    </syncfusion:PaletteColorMapping.Colors>
                </syncfusion:PaletteColorMapping>
</syncfusion:SfTreeMap.LeafColorMapping>
                    . . .   
</syncfusion:SfTreeMap>

The following screenshot displays the PaletteColorMapping.

palettecolormapping in treemap

Figure 1: PaletteColorMapping

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