Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Task 1

Public visualization

Task 1

0 stars0🌍 Public
Yyashwanthkirla95@gmail.com
Last edited Apr 10, 2024
Created on Apr 10, 2024
Forked from Hello VizHub

This chart displays the population of 30 countries in 2020, sorted along the y-axis with a horizontal bar for each country whose length corresponds to its population. Built with React and D3 v5, the visualization uses `scaleBand` for the categorical country axis and `scaleLinear` for the continuous population axis, rendering SVG rectangles for the bars. The data is fetched via D3’s `csv` function, and tick labels on the x-axis are formatted using `d3.format`. Blue axis lines and green bars are styled through CSS, with tooltips showing each value on hover.

AI-generated description

A demonstration of how to start using D3 version 6.

Comments

Sign in to join the discussion.

MIT Licensed