Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Question 1.2

Public visualization

Viewing a saved revision (read-only)

d6de836c22694ecdb28143f51959b7da

Question 1.2

0 stars0🌍 Public
Hharsha13638@gmail.com
Last edited Oct 22, 2024
Created on Oct 22, 2024
Forked from Hello VizHub

This example shows a horizontal bar chart ranking the top 20 countries by their 2010 population, using a logarithmic-free linear scale from zero to the maximum value. The React code with D3 v5 utilities loads population data from a CSV file, maps it with `scaleBand` and `scaleLinear`, and renders the chart as an SVG with blue tick lines, green bars, and tooltips formatted in billions. The axes and marks are built from custom ES6 modules, with the x-axis labels formatted via `format('.2s')` and the y-axis listing country names.

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.