This is a migrated thread and some comments may be shown as answers.

TreeMap shows like flat structure

3 Answers 43 Views
TreeMap
This is a migrated thread and some comments may be shown as answers.
arno
Top achievements
Rank 1
arno asked on 15 Jul 2015, 10:23 AM

Hi,

My treemap seems to bind to the data but shows like a flat line as if the individual boxes don't get a width attributed to them.

The treemap as a whole does have ample space through but it fills it up with pure white nothingness (as you can see in the screenshot).
If I try the same thing (same data) with the same version of kendo on the demo page (http://dojo.telerik.com/ohOKA/2) it works just fine but somehow it doesn't show correctly on my own website.

 Anyone have an idea what might cause this?

 btw I'm using angularJS implementation of the treemap.

 thanks,

Arno

 

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 17 Jul 2015, 08:48 AM
Hello Arno,

Could you try calling the treemap resize method? A possible reason for the problem is that the treemap element is hidden or has zero width during its initialization.

Regards,
Daniel
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
arno
Top achievements
Rank 1
answered on 20 Jul 2015, 08:00 AM

Hi Daniel, you are right, it seems it does have 0 width at initialization and setting it manually on the element will fix it (haven't tested the resize event yet).

This comes pretty unexpected though since other Kendo UI elements simply take 100% space of the parent element. ​Could it be 2 widths are involved here? I did have a rectangle with the correct size but inside was the undersized treemap.

Arno

 

0
Daniel
Telerik team
answered on 22 Jul 2015, 07:23 AM
Hello again,

The outer element will take 100% width but the tiles use fixed width since they represent the values based on the whole area. If you do not want to use fixed width for the element then you should call the resize method after the element size is changed so that the treemap can redraw the tiles based on the current size.

Regards,
Daniel
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TreeMap
Asked by
arno
Top achievements
Rank 1
Answers by
Daniel
Telerik team
arno
Top achievements
Rank 1
Share this question
or