Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

activity 6_Task 1

Public visualization

Viewing a saved revision (read-only)

d35ce0bf9ee247709b7f92a155a8a5cc

activity 6_Task 1

0 stars1🌍 Public
MMallikarjun Narra
Last edited Apr 15, 2024
Created on Apr 15, 2024
Forked from Hello VizHub

This example shows a horizontal bar chart comparing the populations of ten countries in the year 2000. The bars are rendered as SVG rectangles, with the x-axis using a linear scale for population values and the y-axis using a band scale for country names. The visualization is built with React and D3 v5, using `scaleBand` and `scaleLinear` to position the marks, and custom `AxisBottom` and `AxisLeft` components to draw the axes and tick labels. Data is loaded from a remote CSV file using D3’s `csv` function, and the population values are formatted using D3’s `format` with a `.2s` abbreviation that converts gigabytes to billions.

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.