Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Axes with React & D3

Public visualization

Viewing a saved revision (read-only)

26d71285357e4685b4103cb07363e3e2

Axes with React & D3

0 stars0🌍 Public
GGayan Priyadarshana
Last edited Jul 31, 2023
Created on Jul 31, 2023

This example shows a horizontal bar chart of product closing values, with axes generated using React components and D3 scales. It loads CSV data via `d3.csv`, converts the Closing field to numbers, and slices the dataset to ten rows. The chart uses `scaleBand` for the y-axis, `scaleLinear` for the x-axis, and manually renders tick marks and labels with SVG elements, while React’s `useState` and `useEffect` manage the asynchronous data fetching and state updates.

AI-generated description

A program that loads in some data using D3 utilities, and uses React satete to keep track of the data.

Trying to create a line graph using the real data set.