Skip to main content
100%

Making a Bar Chart

✓ Published0🌍 Public
JJSR2000
Last edited Aug 14, 2019
Created on Aug 14, 2019
Forked from SVG and CSS Shapes

This example demonstrates a basic bar chart of country populations using D3.js v5 with SVG rendering. The visualization maps each country from a CSV data file to a rectangular bar, though the bars are uniformly sized rather than scaled to population values. The code imports `select`, `csv`, and `scaleLinear` from D3, loads the data asynchronously, converts population strings to numbers, and appends rectangles to an SVG container. The `scaleLinear` function is instantiated but not fully configured, and the bars are fixed at 300 by 300 pixels each.

AI-generated description

An example showing the capabilities of VizHub.

MIT Licensed

Similar vizzes