Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

activity6_task1

Public visualization

Viewing a saved revision (read-only)

603b348e6d1a4989934df993c0a82ad1

activity6_task1

0 stars0🌍 Public
Bbhavyamoturi2509@gmail.com
Last edited Apr 3, 2024
Created on Apr 3, 2024
Forked from Hello VizHub

This example shows a horizontal bar chart comparing the populations of 30 countries for the year 2020, using an SVG rendered through React. The visualization loads data from a CSV file using D3’s `csv` function and displays the bars with D3’s `scaleBand` for the y-axis and `scaleLinear` for the x-axis. Axes are built with custom React components `AxisBottom` and `AxisLeft`, and each bar is a `<rect>` element with a `<title>` tooltip that formats values using `d3.format(".2s")`.

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.