Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

task1_supriya

Public visualization

Viewing a saved revision (read-only)

e2058f3417b94d9a8b34453dfeae851c

task1_supriya

0 stars0🌍 Public
SSupriya Ravilla
Last edited Apr 8, 2024
Created on Apr 8, 2024
Forked from Hello VizHub

This example shows a horizontal bar chart comparing the populations of 30 countries in 2020, with each bar labeled by country name. The visualization uses D3.js v5 scales (`scaleBand` for the y-axis and `scaleLinear` for the x-axis) to map data, and React to render SVG elements. Population values are fetched from a CSV file and formatted using D3's `format` function, with tooltips displaying the numeric value when hovering over a bar. The chart includes styled axes and a labeled x-axis, all rendered within an SVG container.

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.