Skip to main content
100%

Activity_6_Task_1_Q1.2

✓ Published0🌍 Public
AAP19110020041-Pavan Kumar
Last edited Oct 25, 2024
Created on Oct 25, 2024
Forked from Hello VizHub

This chart presents a horizontal bar chart comparing the populations of 20 countries in 2010, using D3 v5 within a React framework. The bars are rendered as SVG rectangles, with the country names on the y-axis and a linear population scale on the x-axis; hovering reveals a tooltip with the formatted value. The code builds axes using `scaleBand` and `scaleLinear`, formats tick labels with `format('.2s')`, and loads data via `d3.csv` from a GitHub-hosted CSV file. Styling is applied through CSS classes for marks and gridline ticks.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes