Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a bar chart

Public visualization

Viewing a saved revision (read-only)

761ef5a9e60c4f33beb4edd8e2fc59a4

Making a bar chart

0 stars0🌍 Public
Mmengqing
Last edited Sep 9, 2019
Created on Sep 9, 2019
Forked from Making a bar chart

This example demonstrates a basic bar chart of country populations, with each country represented by a fixed-size rectangle positioned sequentially from the top-left of the SVG canvas. The code loads population data from a CSV file using `d3.csv`, converts the population values to numbers by multiplying them by 1000, and renders the rectangles with `d3.select` and `selection.append`. While the bars are currently all the same width and height, the example illustrates the core pattern of binding data to SVG elements in D3 v5.

AI-generated description

An example showing the capabilities of VizHub.