Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of barGraph

Public visualization

Fork of barGraph

0 stars0🌍 Public
IIndira120
Last edited Oct 3, 2022
Created on Sep 26, 2022
Forked from barGraph

This example shows a bar chart of country populations, which can be sorted in ascending or descending order via buttons. The chart uses D3's `scaleBand` and `scaleLinear` for axes, and displays tooltips with population and country names on hover. Data is loaded from a CSV file using `csv`, and the SVG rendering uses D3's `select`, `axisBottom`, and `axisLeft`. The code is written as an ES6 module, importing functions like `max` and `scaleBand` directly from D3.

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.

Comments

Sign in to join the discussion.

MIT Licensed