ICE-6: Rendering Marks and Channels with React & D3
✓ Published1🌍 Public
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 descriptionReact Starter code.
MIT Licensed