Fork of D3 Starter
✓ Published0🌍 Public
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 descriptionA demonstration of how to start using D3 version 6.
MIT Licensed