Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

tut1

Public visualization

tut1

0 stars0🌍 Public
Rreddyswethuvahana@gmail.com
Last edited Apr 10, 2024
Created on Apr 10, 2024
Forked from Activity 7

This example displays a horizontal bar chart of the top 30 countries by 2020 population, using a React component that fetches its data from a CSV file via the `d3.csv` function. The chart is rendered as an SVG, with bars drawn using `d3.scaleBand` and `d3.scaleLinear` to map country names and population values to coordinates. Each bar includes a tooltip that formats the population value using the `d3.format` function (abbreviating to billions). Axis ticks and labels are generated by custom React components, with styles applied via CSS classes.

AI-generated description

A demonstration of how to start using D3 version 6.

Comments

Sign in to join the discussion.

MIT Licensed