Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

TASK.8_QUESTION_1.1_sahith

Public visualization

Viewing a saved revision (read-only)

1ceeae8476214b03b367019df6e20197

TASK.8_QUESTION_1.1_sahith

0 stars0🌍 Public
Mmanisahiths54321@gmail.com
Last edited Apr 10, 2024
Created on Apr 10, 2024
Forked from Act_6_Q_1.1

This example shows a horizontal bar chart comparing the populations of the top ten countries for the year 2000, with each bar labeled by country name and the x-axis formatted in billions using the `format` API from D3. The visualization uses React to render SVG elements, with `scaleBand` and `scaleLinear` from D3 v5 mapping the categorical country names and population values to pixel coordinates. Data is loaded asynchronously from a remote CSV file via `csv` in `useData.js`, and the bars are drawn as `<rect>` elements with native tooltips. The axis and mark components are modularized into separate files, with the bottom axis using custom tick formatting.

AI-generated description

A demonstration of how to start using D3 version 6.