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

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -