Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 Course 1: Bar Chart

Public visualization

D3 Course 1: Bar Chart

0 stars1🌍 Public
支支良
Last edited Mar 29, 2020
Created on Mar 29, 2020

This example shows a bar chart comparing population totals for ten countries, drawn as an SVG with a linear scale for population and a band scale for country names. The render function builds axes, labels, and rectangular bars using D3 v5 APIs including `scaleLinear`, `scaleBand`, `axisBottom`, `axisLeft`, and `selectAll`/`enter`. It loads data from a local CSV file via `d3.csv`, multiplies each population value by 1000, and displays the result with formatted tick labels. The chart includes a title, axis labels, and a steel-blue fill for each bar.

AI-generated description

Data Visualization with D3 course; Bar Chart

Comments

Sign in to join the discussion.

MIT Licensed