Skip to main content
100%

Fork of QUESTION 1 (2)

✓ Published0🌍 Public
Jjaideeptripurani12@gmail.com
Last edited Apr 15, 2024
Created on Apr 15, 2024
Forked from QUESTION 1 (2)

This bar chart displays the 2010 population for 20 countries, using horizontal bars to compare values on a linear scale, with the y-axis listing each country’s name. Built with React and D3 version 5, the visualization uses `d3.scaleBand` for the categorical y-axis and `d3.scaleLinear` for the numeric x-axis. The code defines custom `AxisBottom`, `AxisLeft`, and `Marks` components that render SVG rectangles and tick lines, with a `d3.format` function converting large numbers into a readable "B" suffix for billions. The data is loaded asynchronously via `d3.csv` from a GitHub-hosted CSV file, and the SVG output is styled with inline CSS classes for ticks and marks.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes