javascript - Implementing zoom buttons using d3 -
i trying develop graph visualization webpage using d3, , need provide basic zoom , pan functionality on graph.
i saw d3.behaviour.js file see how zoom functionality works. fine far default behavior goes. there way zoom function can called manually, lets attaching zoom , zoom out buttons.
zoom behavior in d3 seems tied mouse events.
a workaround can manually firing 'mousewheel' (ie/webkit) , 'dommousescroll' (firefox) events when click button.
you can see example on how register , dispatch these events here: http://jsfiddle.net/6nnmv/
Comments
Post a Comment