Skip to main content
100%

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

✓ Published71🌍 Public
Aaashrithd4
Last edited Mar 7, 2022
Created on Mar 6, 2022
Forked from HTML Starter

This example renders a horizontal bar chart using React and D3 v5, displaying COVID-19 case counts for the top 20 countries. It loads CSV data via `d3.csv` and uses `scaleBand` for the categorical y-axis (country names) and `scaleLinear` for the quantitative x-axis (case numbers). React state manages the asynchronous data loading, while SVG `<rect>` marks are generated with JSX, and tick marks for both axes are manually built from `xScale.ticks()` and `yScale.domain()`. The chart is styled with green rectangles and red axis lines.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes