🌍 Public
Viewing a saved revision (read-only)
b7a0999f3a094307a80c3b545cc2958c
Fork of Fork of Fork of ICE-6: Rendering Marks and Channels with React & D3
VVaishnavi6199
Last edited Mar 6, 2022
Created on Mar 6, 2022
This example shows a horizontal bar chart of the top 10 countries by population in 2019, with country names on the y-axis and population values on the x-axis. The React component uses React hooks to load CSV data via `d3.csv`, then renders SVG marks as `<rect>` elements for bars and `<text>` for axis labels. It leverages `d3.scaleBand` and `d3.scaleLinear` to map data to coordinates, with gridlines and ticks generated manually from the scales. The chart is built entirely with React components and D3 utilities, without a separate visualization library.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.