Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

23db047a7d344e4a8321947452afd7a2

Making a Bar Chart

0 stars0🌍 Public
JJSR2000
Last edited Aug 14, 2019
Created on Aug 14, 2019
Forked from SVG and CSS Shapes

This example demonstrates a basic bar chart of country populations using D3.js v5 with SVG rendering. The visualization maps each country from a CSV data file to a rectangular bar, though the bars are uniformly sized rather than scaled to population values. The code imports `select`, `csv`, and `scaleLinear` from D3, loads the data asynchronously, converts population strings to numbers, and appends rectangles to an SVG container. The `scaleLinear` function is instantiated but not fully configured, and the bars are fixed at 300 by 300 pixels each.

AI-generated description

An example showing the capabilities of VizHub.