🌍 Public
Viewing a saved revision (read-only)
f92fa1c48a474a938f0cf5634d0d86a0
Fork of ICE-6: t2
SSnapika
Last edited Mar 6, 2022
Created on Mar 6, 2022
This example displays a bar chart of the top 20 countries by population for a given date, sourced from a CSV file. Using React with hooks, it loads and slices the data, then renders an SVG with d3.scaleBand and d3.scaleLinear to map countries to horizontal bars. Custom tick marks and gridlines are drawn manually using d3.ticks, with axis labels positioned along the y-axis and x-axis. The visualization updates reactively as data loads, showing a clear ranking of population counts.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.