Skip to main content
Public

Share visualization

Loading preview…

React & D3 Starter

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

React & D3 Starter

0
PPriyaEnuganti
Last edited Jun 26, 2022
Created on Jun 26, 2022
Forked from React & D3 Starter

This example displays the classic Iris dataset as a scatter plot, mapping sepal length to the x-axis and petal length to the y-axis, with points colored by species (red, blue, or green). It serves as a starter template for integrating D3.js with React by decoupling the visualization logic into separate modules. The React component manages the SVG container and data loading via hooks, while the D3 code handles scales, axes, and circle rendering using d3.csv, d3.scaleLinear, and d3.axisBottom/axisLeft. The visualization fills the browser window and includes axis labels.

AI-generated description

This viz is a starter that demonstrates patterns used in real world projects in which complexity is anticipated to scale.

  • Decoupled React & D3 integration
  • Opening moves for scalable complexity
  • Industry standard ES modules and JSX
  • Copy-paste into existing projects

Any questions? Ask on Twitter!

Also viewable in:

Comments

Sign in to join the discussion.

MIT Licensed