Skip to main content
100%

Practice 1

✓ Published0🌍 Public
Cchickenwing-yung
Last edited Feb 6, 2021
Created on Feb 4, 2021
Forked from Hello VizHub

This example presents a horizontal bar chart of population data for five countries, loaded from a local CSV file. The visualization encodes population values as bar widths using D3’s `scaleLinear`, while country names are positioned along the y-axis with `scaleBand` and padding. Both axes are generated with `axisLeft` and `axisBottom`. The chart is rendered as SVG elements appended to a fixed-size `<svg>`, with rectangles styled via an external CSS file. The code demonstrates importing D3 modules such as `select`, `csv`, and `max` within a bundled ES6 setup.

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