Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering BAR data with React

Public visualization

Rendering BAR data with React

0 stars1🌍 Public
Ppsabela
Last edited Nov 27, 2020
Created on Nov 27, 2020

This example shows a horizontal bar chart built with React and D3 v6, displaying the first three rows of a CSV dataset. The chart maps each data point’s `Origin` category to the y-axis band scale and its `Cylinders` value to the x-axis linear scale, rendering `<rect>` SVG elements. Data is loaded asynchronously via `d3.csv` into React state using the `useEffect` and `useState` hooks, with the final SVG output managed by ReactDOM. The visualization relies on `scaleBand`, `scaleLinear`, and `max` from D3.

AI-generated description

A program that follow a mouse with a circle HTML page.

Comments

Sign in to join the discussion.

MIT Licensed