Skip to main content
100%

Making a bar Chart

✓ Published2🌍 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
MIT Licensed

Similar vizzes