🌍 Public
Tutorial 1 Question 1
This example shows a horizontal bar chart comparing the year 2000 populations of ten countries, with country names on the y-axis and population values on the x-axis. It demonstrates a React-based D3 visualization using modular components for axes and marks, rendered as SVG. The code uses `d3.scaleBand` and `d3.scaleLinear` to map data, `d3.format` to abbreviate tick labels (converting gigabytes to billions), and loads data from a CSV file fetched via `d3.csv`. The chart includes custom styled axes and a labeled x-axis indicating the population metric.
AI-generated descriptionA demonstration of how to start using D3 version 6.
MIT Licensed
Comments
Sign in to join the discussion.