Skip to main content
100%

Loading data using d3 and Mouse Follower

✓ Published1🌍 Public
Sshresthabhi
Last edited Oct 13, 2021
Created on Oct 13, 2021

This example demonstrates loading a remote CSV dataset with d3.csv in a React application, displaying the file size, row count, and column count in a large text element. A black SVG circle follows the mouse cursor across the viewport using React’s useState and useCallback hooks to track and update the pointer’s clientX and clientY coordinates. The code imports React and ReactDOM, creates an SVG with dimensions 960 by 500 pixels, and sets the circle’s center to the current mouse position. The CSV data comes from a GitHub gist containing named CSS colors.

AI-generated description

Loading Data using d3 A program that follows your mouse with a circle

MIT Licensed

Similar vizzes