Need help with Zooming into a chart

Hello,
I am using an active X control and I need to call their ZoomRight(int value)
function whn the user moves in a particular direction.
ie when the user left clicks on the mouse and moves left the chart has to keep zooming until the mouse moves.
Now my problem is how do I calculate the value??
I also need to pan in the direction the user moves the mouse.
I have not written any code and I know I need to call the Zoomfunction
in the ONMOUSEMOVE event.
but other than that I am a little lost here.
Can any of you experts guide me??
THanks
[582 byte] By [spshastr] at [2007-11-19 7:29:05]