TreeMap shows like flat structure

4 posts, 0 answers
  1. arno
    arno avatar
    14 posts
    Member since:
    Jun 2014

    Posted 15 Jul 2015 Link to this post

    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

     

  2. Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 17 Jul 2015 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. arno
    arno avatar
    14 posts
    Member since:
    Jun 2014

    Posted 20 Jul 2015 in reply to Daniel Link to this post

    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

     

  5. Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 22 Jul 2015 Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready