Skip to main content
100%

D3 Course 1: Bar Chart

✓ Published1🌍 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

MIT Licensed

Similar vizzes