Capture expanding/reducing actions in treemaps

Hi,

I have a treemap with clickable zones. When a zone is clicked, the treemap expands it to full size. When clicked again, the zone area decrease and the full treemap is visible. I want to capture the event to be able to show more information to the user when a zone is expanded.

With the new event plotly_treemapclick, is there a sure and easy way to know if the treemap is actually ‘expanding’ a category or ‘reducing’ it to come back to initial view?

Or is there another event I could listen to ?

Thanks !

I am stuck with something similar. I am building a treemap, with plotly express, in a plotly dash app. I want the leaves of treemap to display some more information when expanded after clicking. I tried using clickData property to capture the event but the map expand/reducing works in a different way. Any help with how to achieve this? Thanks in advance.