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

Whitespace and newline

Hi,
I am using the treemap, and facing 2 minor issues - screenshot attached.

1. There are is a lot white space at the top of the treemap. I am using desatuaration color mapping, so don't need a legend. How can I remove the entire white space at the top?

2. Inside the leaf, the display name is a long one, I want to insert a new line in it, so that the word "Growth" appears on the next line. Is this possible?
 

Tx

Attachment: Screenshot_1579539442_54f129a2.zip

4 Replies

RS Ramya Soundar Rajan Syncfusion Team January 21, 2020 04:49 PM UTC

Hi Dev, 
 
We are checking the possibilities to achieve your requirement and we will update the status on 22nd January 2020. 
 
Regards, 
Ramya. 



RS Ramya Soundar Rajan Syncfusion Team January 22, 2020 04:25 PM UTC

Hi Dev, 
 
Query 1: There is lot white space at the top of the treemap. 
 
We have tried to replicate the reported issue at our end, but we are afraid that we are not able to reproduce the issue at our end.  Default value of the TreeMap level header is white. So, it appears in white color. We suggest you set color for Header by using the HeaderStyle. 
 
                    <tree:TreeMapFlatLevel.HeaderStyle> 
                        <tree:Style Color= "Black"/> 
                    </tree:TreeMapFlatLevel.HeaderStyle> 
 
 
Query 2: Inside the leaf, the display name is a long one, I want to insert a new line in it, so that the word "Growth" appears on the next line. Is this possible? 
 
Data label cannot be splitted into two lines, you can use OverFlowMode property to hide, trim and wrap the label. Hence You can achieve your requirement by using the ItemTemplate property of TreeMap items and customize the label inside the TreeMap item. But the desaturation color was not applied to the leaf item due to the custom template applied to the TreeMap items. If you need different color in treemap item, you add property for each item in ViewModel. We have prepared the sample based on your requirement.  Please find the sample link below. 
 
 
Output Screenshot: 
 
 
 
Regards, 
Ramya. 



RS Ramya Soundar Rajan Syncfusion Team January 22, 2020 04:31 PM UTC

Hi Dev, 
 
Please find the output screenshot from below link. 
 
 
Regards, 
Ramya. 



GM Gangabharathy Murugasen Syncfusion Team January 23, 2020 09:42 AM UTC

Tx this can be closed 


Loader.
Live Chat Icon For mobile
Up arrow icon