Skip to main content
100%

Activity 6 - Bar Chart

✓ Published0🌍 Public
Nnikhithaaitha22@gmail.com
Last edited Oct 21, 2024
Created on Oct 20, 2024

This example shows a horizontal bar chart of the top 10 countries by population in the year 2000. It uses React to render SVG primitives and D3's `scaleBand` and `scaleLinear` for positioning. The bars are colored green, and hovering reveals a tooltip formatted with D3's `format`. Data is loaded asynchronously from a remote CSV file via D3's `csv` function, and the chart includes custom axes with formatted tick labels.

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.
MIT Licensed

Similar vizzes