🌍 Public
activity_8task1
This example shows a horizontal bar chart comparing the populations of ten countries for the year 2000, with country names on the y-axis and population totals on the x-axis. Built with React and D3 v5, it loads CSV data via `d3.csv`, scales values using `scaleBand` and `scaleLinear`, and renders bars as SVG rectangles. Axis components use `d3.format` to abbreviate tick labels, converting values like "1.2G" into "1.2B". The data comes from a GitHub-hosted CSV file, and tooltips appear via SVG `<title>` elements.
AI-generated descriptionA demonstration of how to start using D3 version 6.
MIT Licensed
Comments
Sign in to join the discussion.