Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6_Task 1

Public visualization

Activity 6_Task 1

0 stars0🌍 Public
MMannava Priyanka Chowdary
Last edited Oct 21, 2024
Created on Oct 21, 2024
Forked from Activity 6_Task 1

This horizontal bar chart visualizes the 2020 populations of 30 countries. Built with React and rendered as SVG, it uses D3’s `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis. The `Marks` component draws rectangles whose widths correspond to population values, with tooltips formatted via D3’s `format` function. Axis tick labels are formatted with the `.2s` specifier to show values in billions, and data is loaded from a remote CSV using D3’s `csv` function within a custom `useData` hook.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.

Comments

Sign in to join the discussion.

MIT Licensed