Skip to main content
100%

Axes with React & D3

✓ Published0🌍 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.

MIT Licensed

Similar vizzes