Skip to main content
100%

Activity 6-Task1

✓ Published1🌍 Public
Ppslharika@gmail.com
Last edited Apr 4, 2024
Created on Apr 3, 2024

This example shows a horizontal bar chart ranking the populations of 30 countries for 2020, with each bar’s length encoding the population value and a text label for the country name. The visualization is built with React and D3 v5, using `scaleBand` for the categorical y-axis and `scaleLinear` for the numeric x-axis. Data is loaded asynchronously from a remote CSV via `useData` and `d3.csv`, with population values multiplied by 1000. Axes are rendered as SVG groups, and bars include a native `<title>` tooltip showing the formatted population value.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes