TreeMap not handling 100 pct Height

TreeMap seems to honour numerical Height settings e.g. Height="600", but if you give it Height="100%", it ignores & reverts to default fixed 450.

Using Blazor 26.1.41.

Please advise.



3 Replies

IR Indumathi Ravi Syncfusion Team July 19, 2024 10:59 AM UTC

Hi Phil,


When a percentage value is set to the "Height" property of the TreeMap component, it renders based on the size of its parent HTML element. We suspect that the div element containing the TreeMap component in your application does not have the proper height specified, causing it to render with the default value of "450px".


However, when we set the "Height" and "Width" properties of the TreeMap to "100%" and specify its parent div element as "600px", the component renders properly with the size provided by the parent div element. You can find the sample that demonstrates the same below.

https://blazorplayground.syncfusion.com/LZhfNcMuLoLzUdKP


If you are still facing the reported issue. Please modify the above sample to replicate the reported issue or share the code snippet. It will be helpful for us to analyze and assist you better.



PH Phil Holmes July 22, 2024 04:58 AM UTC

Thanks. The real issue here proved to be the sequence of the rendering. I thought I had already tried what you described in your reply, but then I found this documentation:

https://blazor.syncfusion.com/documentation/treemap/how-to/place-treemap-inside-other-components#treemap-component-inside-tab

which solved the issue. Sorry, I don't think I mentioned that my SfTreeMap was inside an SfTab, in which case you have to hold off rendering the TreeMap until after the StTab has been created.




CA Chrispine Agunja Imbo Syncfusion Team July 23, 2024 06:18 AM UTC

Hi Phil,

We are glad to know that the issue has been resolved. Please let us know if you need further assistance.

Regards,

Chris


Loader.
Up arrow icon