Skip to main content
Public

Share visualization

Loading preview…

Zoom in/out and drag

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Zoom in/out and drag

0
TTaylor
Last edited Oct 13, 2020
Created on Sep 28, 2020
Forked from Mouse Follower

This example demonstrates pan and zoom interaction on the map of the Skeld ship from Among Us. Users can drag the image to move it and use the scroll wheel to zoom in and out. The visualization uses React with D3 v4’s zoom behavior, applied to an SVG group containing an image element. The image is loaded from the Among Us Wiki and displayed at a fixed 500 by 400 pixel size.

AI-generated description

This is a zoom in/out and drag function. One can easily drag the picture, zoom in and out.

Picture from Among Us Wiki.

Comments

Sign in to join the discussion.

MIT Licensed