Skip to main content
Public

Share visualization

Loading preview…

first_assignment

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

first_assignment

0
NNavak94
Last edited Jan 17, 2023
Created on Jan 17, 2023

This example shows a black outlined circle that tracks the mouse across the screen, growing larger when the user moves the cursor faster. It uses `d3.select` and `selection.on('mousemove')` to capture pointer coordinates and movement deltas, then calculates a radius based on the movement speed, capping it at 100 pixels. The visualization renders in an SVG that dynamically resizes to the window dimensions via `window.innerWidth` and `window.innerHeight`. The state updates through a custom `setState` function that triggers a re-render through the `viz` function.

AI-generated description

A mouse finder which the circle will enlarge when the user moves the mouse faster.

Comments

Sign in to join the discussion.

MIT Licensed