Skip to main content
100%

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

✓ Published0🌍 Public
SSheshidharreddy
Last edited Mar 8, 2022
Created on Mar 8, 2022

This example shows a bar chart of COVID-19 case counts for the top 20 countries, using the d3.csv loader to fetch data and React hooks (useState, useEffect) to manage asynchronous loading. It renders an SVG with green rectangles scaled by d3.scaleLinear for the x-axis and d3.scaleBand for the y-axis. The code also manually generates axis ticks and labels using d3.ticks and inline SVG elements, avoiding higher-level axis components. The visualization updates its dimensions through computed innerHeight and innerWidth margins.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes