Skip to main content
100%

Making a Bar Chart

✓ Published2🌍 Public
OOhayouKaminari
Last edited Jan 11, 2020
Created on Jan 9, 2020
Forked from Let'smakeaface

The chart displays population figures for ten countries as horizontal bars, sorted from most to least populous. It initializes SVG dimensions, then maps population values to a linear x-scale and country names to a band y-scale. Using d3.csv, it loads data from data.csv, converts population numbers by multiplying by 1000, and renders rectangles with attributes derived from those scales. Axes are added via d3.axisLeft and d3.axisBottom, with bars styled steelblue through CSS.

AI-generated description

Skriv nån text… kommer ifrån Hejkonbejkon

MIT Licensed

Similar vizzes