Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

task 8

Public visualization

Viewing a saved revision (read-only)

2e1b3670b3e544aaa4d3ae356613aa30

task 8

0 stars0🌍 Public
Bbhavithamanyam@gmail.com
Last edited Apr 14, 2024
Created on Apr 14, 2024

This visualization displays the population of ten countries in 2010 as a horizontal bar chart, with country names on the y-axis and population values on the x-axis. Population data is loaded from a remote CSV file using d3.csv, with the population field parsed and scaled by a factor of 1000. The chart is rendered as an SVG using React components, with d3.scaleBand for the categorical y-axis and d3.scaleLinear for the numeric x-axis. Axis components use d3 tick formatting with a custom function that converts values like "1.5G" to "1.5B". The bars include a native SVG title element for tooltips showing the formatted population value.

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.