-
Book Overview & Buying
-
Table Of Contents
HTML5 Graphing and Data Visualization Cookbook
By :
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).

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.
This is our first sample where we make our canvas area interactive. In the next...
Change the font size
Change margin width
Change background colour