Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a bar chart

Public visualization

Viewing a saved revision (read-only)

0fdfe83022564073b4938e6a9e361a0d

Making a bar chart

0 stars0🌍 Public
Ddonkrasniqi
Last edited May 9, 2022
Created on May 9, 2022
Forked from D3 Starter

This example demonstrates how to build a basic bar chart from CSV data using D3 version 7. The chart displays country populations, with bars proportional to population values using a linear scale for the x-axis and a band scale for the y-axis. Code uses `d3.csv` to load `data.csv`, `d3.scaleLinear` for the x-axis, `d3.scaleBand` for the y-axis, and appends rectangles to an SVG. It highlights the fundamental pattern of data binding with `selectAll`, `data`, and `enter` before defining margins and scales.

AI-generated description

A demonstration of how to start using D3 version 6.