Skip to main content
100%

Making a Bar Chart!

✓ Published0🌍 Public
IIgnacio Esquivel
Last edited May 30, 2020
Created on May 30, 2020

This example demonstrates the basic process of creating a bar chart with D3. It shows population values for several countries as horizontal bars, using an SVG canvas. The code loads data from a CSV file and scales the bar widths with `d3.scaleLinear`, while `d3.scaleBand` is intended for the y-axis positioning. It relies on D3 v5’s `select`, `csv`, and `max` functions to bind data to SVG `<rect>` elements.

AI-generated description
MIT Licensed

Similar vizzes