Skip to main content
100%

Make a bar chart

✓ Published2🌍 Public
PPulkit Rohilla
Last edited Sep 28, 2019
Created on Sep 26, 2019

This example displays a horizontal bar chart comparing the populations of five countries, using data from a local CSV file. It reads the data with `d3.csv`, scales the population values by 1000, and renders SVG rectangles with `d3.scaleLinear` for the x-axis and `d3.scaleBand` for the y-axis. Axes are generated using `d3.axisLeft` and `d3.axisBottom`. The chart is styled with CSS, and the bars are colored steelblue.

AI-generated description

An example showing the capabilities of VizHub.

MIT Licensed

Similar vizzes