Skip to main content
100%

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

✓ Published0🌍 Public
MM
Last edited Mar 13, 2024
Created on Mar 13, 2024

This example shows a horizontal bar chart of COVID-19 death cases (or populations) for twenty countries, using green rectangles scaled by numeric values against categorical country labels on the vertical axis. The React component loads CSV data via `d3.csv`, slices the first 20 rows, and renders SVG marks with React’s `useState` and `useEffect` hooks. D3’s `scaleBand` and `scaleLinear` map positions and widths, while manual tick generation draws gridlines and axis labels, avoiding `d3.axis` components.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes