Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar Chart Basic

Public visualization

Bar Chart Basic

0 stars0🌍 Public
ZZeeshan
Last edited Jan 24, 2021
Created on Jan 24, 2021

A horizontal bar chart displays population figures for ten countries, using data from a local CSV file. The chart initializes D3 via a CDN and employs D3's `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` modules to map population values to bar lengths and country names to vertical positions. Bars render as SVG rectangles with a steelblue fill. Axis tick labels are formatted with `format('.3s')`, converting large numbers into readable values with "B" suffixes.

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