Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a bar Chart

Public visualization

Viewing a saved revision (read-only)

57ca31b989e347afa8be020f9a0c72eb

Making a bar Chart

0 stars2🌍 Public
Llamiyaa
Last edited Oct 6, 2019
Created on Oct 6, 2019

This example shows a simple bar chart of population data for the ten most populous countries, from China to Mexico, using D3.js version 5. The visualization renders rectangular bars via SVG, with each bar’s height and width set to a constant 300 pixels, regardless of the population value. The code loads data from a CSV file using `d3.csv`, converts the population strings to numbers, and appends the rectangles to the SVG container. The chart does not yet map data to scales or axes, displaying only the raw bars.

AI-generated description