Behaviors

In the last section, we made an explanatory graphic that used interaction to guide the user through the data. Often, however, the goal is just to make a dataset interactive and give the user some way of manipulating it, in other words, an exploratory graphic.

D3's behaviors save a boatload of time setting up the more complex interactions in a chart. Additionally, they're designed to handle differences in input devices, so you only have to implement a behavior once to have it work with both a mouse and touch device. The two currently supported behaviors are drag and zoom, which will get you pretty far.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset