简体   繁体   中英

performing zoom with mouse wheel programmatically for D3 parallel coordinates plot

I am using Parallel Coordinates in D3 in my application. I want to add a zoom function programmatically.

Zoom function working well now but I am still have a little problem which is: I want to zoom to the mouse position.

I have the X and Y of the mouse in an array but i do not know how to use them later to zoom in this position.

What I get till now is SVG zoomed but the screen is always in the left and top of the page.

How can I use the mouse position coordinates in zooming to get the area around the mouse cursor on the screen?

i could do what i want by using window.scrollTo(x,y), so that i can zoom and place the screen to mouse position. maybe i was not clear in my question but that what i want. Thanks,

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM