🌍 Public
Viewing a saved revision (read-only)
d91971493e4f4412aa6c5f7bd43e3eed
Fork of Fork of Fork of ICE-6: Rendering Marks and Channels with React & D3
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 descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.