🌍 Public
Viewing a saved revision (read-only)
d1854024d98244c9b3cb3bdd7338b0e8
Making a Bar Chart
This example shows a bar chart of population data for the top 10 most populous countries, with horizontal bars and labeled axes. The visualization uses D3 v5 to load and scale the dataset, employing `scaleLinear` for the x-axis and `scaleBand` for the y-axis. The code imports specific D3 modules via ES6 syntax, uses `axisLeft` and `axisBottom` for ticks, and formats numbers with `format('.3s')`. It also removes default axis domains and tick lines for a cleaner presentation.
AI-generated description