Skip to main content
100%

Fork of D3 Starter

✓ Published0🌍 Public
RRED98310
Last edited Feb 25, 2021
Created on Feb 25, 2021
Forked from D3 Starter

This example displays a bar chart of video game genres from a CSV dataset, plotting each genre’s global sales using a D3 scaleBand for the x-axis and a scaleLinear for the y-axis. The React component loads data via d3.csv, maps sales values to numbers, and renders SVG rectangles with heights proportional to sales. The code uses D3 v6’s scaleBand, scaleLinear, max, and csv functions alongside React hooks like useState and useEffect to manage data fetching and state. The chart is static, with no axes or labels, and uses a dataset hosted as a GitHub gist.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes