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
close icon

Hide Tree Map Legend on Certain Drilldowns

Hi team,

Would it be possible to hide the legend only when drilling down certain levels? I have tried the below code and the browser freezes and becomes unresponsive for several seconds when the legends get hidden.

drillStart={(args)=> {

args.treemap.legendSettings.visible = false;

}}


The datasource used is quite large with around 5000 records.


3 Replies 1 reply marked as answer

IR Indumathi Ravi Syncfusion Team October 19, 2022 04:20 PM UTC

Dear Customer,


Thank you for contacting Syncfusion support.


As given in the provided code snippet, you can hide the legend in "drillStart" event of the TreeMap component. We are unable to reproduce the performance slowness with 5000 data. Please find the sample, in which we tried to reproduce the reported performance slowness, below.


https://stackblitz.com/edit/react-gw6pmc-8fvtek


We suspect that the performance slowness is due to the data source that you have used in your application. Please modify the above sample or share the data source to reproduce the performance slowness. It will be helpful for us to analyze and assist you further.


Regards,

Indumathi R.


Marked as answer

BD Brainweber Dev October 27, 2022 12:24 PM UTC

Using a hierarchical datasource solved the issue



IR Indumathi Ravi Syncfusion Team October 28, 2022 12:46 PM UTC

Dear Customer,


Thank you for the update.


Please get back to us if you need any further assistance.


Regards,

Indumathi R.


Loader.
Live Chat Icon For mobile
Up arrow icon