Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

b6eba00c0bd94a369596956baeae41c0

Making a Bar Chart

0 stars0🌍 Public
Yyigong99
Last edited Jan 20, 2021
Created on Jan 20, 2021

This example demonstrates the initial step of building a bar chart with D3, showing a raw dataset of country populations read from a CSV file. The visualization currently renders only an empty SVG canvas, as the code loads the data and converts the population strings to numeric values by multiplying them by 1000, logging the transformed data to the console. It uses D3’s `select`, `csv`, and `attr` methods to access the SVG element and parse the external data file. The chart itself is not yet drawn.

AI-generated description