Skip to main content
100%

ICE-6: Rendering Marks and Channels with React & D3

✓ Published1🌍 Public
99176371431
Last edited Mar 9, 2023
Created on Mar 9, 2023
Forked from React Starter

This example displays a horizontal bar chart of the top 20 countries by total deaths, based on a Spotify top 100 songs dataset. It uses React with hooks (`useState`, `useEffect`) to load CSV data via `d3.csv`, and renders SVG marks with `d3.scaleBand` for the y-axis and `d3.scaleLinear` for the x-axis. The chart includes gridlines, axis ticks, and red rectangles as bars, with all marks and channels manually positioned inside a transformed SVG group.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes