Skip to main content
100%

activity 6_Task 1

✓ Published1🌍 Public
Sssuryateja804@gmail.com
Last edited Oct 21, 2024
Created on Oct 21, 2024

This example shows a horizontal bar chart of the top 30 countries by population in 2020, sourced from a CSV file via `d3.csv`. The chart uses D3 v5's `scaleBand` for the y-axis (countries) and `scaleLinear` for the x-axis (population), rendered as SVG rectangles in React. Bars are colored light green, with a blue axis line and tick marks, and a formatted axis label "POPULATION-2020". Hovering over a bar reveals a tooltip via the `<title>` element, showing the population value formatted with `d3.format` to replace "G" with "B" for billions.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes