Skip to main content
100%

React + D3 Hooks template

✓ Published3🌍 Public
LLaurens
Last edited Nov 23, 2020
Created on Sep 17, 2020
Forked from Hello VizHub

A scatter plot visualizes student eye colors, encoding each color's red, green, and blue components along the x and y axes while using circle area for blue intensity. The React component uses the `useEffect` and `useRef` hooks to integrate D3 v5, loading eye-color and gender data from a GitHub gist. D3 scales map RGB values to pixel coordinates, and animated transitions with `d3.easeBounce` adjust circle positions and radii over 1.5 seconds.

AI-generated description

React + D3

Purpose

To provide an understandable React + D3 template. This version uses the new React hooks.

Trying to adapt using this

Questions

  • How can a wrapped element get the id of the wrapper element?
  • How does it work when we want to update the graph
MIT Licensed

Similar vizzes