Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a bar chart

Public visualization

Viewing a saved revision (read-only)

022d6712cfc54d66977a259eb066d912

Making a bar chart

0 stars0🌍 Public
EEllen Cubbin
Last edited Feb 10, 2020
Created on Feb 10, 2020

A D3.js bar chart displays population figures for the world’s most populous countries, loading values from a CSV file and preparing them for rendering inside an SVG canvas. The code uses the `select` API to target the SVG element and the `csv` function to asynchronously fetch and parse the data, converting the population strings to numbers. The SVG viewport is set to 960 by 500 pixels, though the example currently logs the parsed data to the console without yet drawing bars or axes.

AI-generated description

An example including some commonly used features of SVG.