🌍 Public
Viewing a saved revision (read-only)
c3f283e54e1b4ce684335a55297da3bf
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