Skip to main content
100%

Making a bar chart

✓ Published1🌍 Public
SShanthi Acharya
Last edited Jun 9, 2019
Created on Jun 9, 2019
Forked from Making a bar chart

This example shows a horizontal bar chart of GDP for ten countries, with the bars sorted by value and labeled. The chart uses a linear scale for the GDP axis and a band scale for the countries, rendering as SVG within a 960x500 canvas. Built with D3 v5, it relies on `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`, and formats GDP ticks via D3's `format`. Data is loaded from a CSV file with `d3.csv`.

AI-generated description
MIT Licensed

Similar vizzes