Inscrit le: 22 Juin 2018
|Posté le: Ven 29 Juin - 10:22 (2018) Sujet du message: Treemap Events
I've looked through all the treemap-related questions in the forum, but couldn't really find an answer to this.What I ideally want to do is change the the second level of the treemap based on a radio button. For example, say the first level of the treemap shows states. If I click on a state, it drills down to the second level of the treemap. This second level can either show cities or school districts. Which it shows is based on radio buttons that the user can select. If cities, then the second level should show cities; if school districts, then the second level should show school districts. Every time the user selects a different radio button, I have to re-create the treemap with the new data. Is there a way to dynamically change only the second level data without having to re-create the treemap?Re-creating the treemap has the downside that it kicks the user back up to the top level. I haven't been able to find a solution to the above problem. As a workaround, I'd have to manually maintain this state: if at the second level and the user selects a different radio button, I have to re-create the treemap with the different second level data, then programmatically click the top level node that was selected earlier in order to get the user back to the appropriate place. How would I go about doing this? I would need to listen to the events as the user drilled down and drilled up through the treemap and keep track of the id's. Since the treemap doesn't use the drilldown module, what events should I be listening for? How do I find the id of the node on drill down?
I didn't find the right solution from the Internet.
Animated Explainer Video Production Studio