Skip to main content
100%

Making a bar chart

✓ Published0🌍 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.

MIT Licensed

Similar vizzes