Adding user interaction into tree mapping
Until now, we have limited our user interaction with our samples. In one of our last samples, we added a controlled way to add and remove chart elements; in this one, we will enable the user to dig deeper into the chart and see more details by creating a truly endless experience (if we only had an endless amount of data to dig into).
In the following image, on the left-hand side, you can see the initial state and what happens after one click of the user (the chart redraws itself to showcase the area that was clicked on).
Consider the case when the user clicks on the chart (for example, the next picture is generated by clicking on the left-hand side rectangle—the tree map will update and zoom into that area).
Getting ready
To get this sample right, you will need to start from our last recipe, Tree maping and recursiveness, and adjust it to work for this sample.
How to do it...
This is our first sample where we make our canvas area interactive. In the next...