Viewing a saved revision (read-only)
b21ee8913f434031992abef388fe89c1
Making a Bar Chart
This bar chart shows the top 10 most populous countries, using 2018 estimates from the United Nations World Population Prospects. It demonstrates custom axis styling and tick formatting with `scaleLinear` for the population axis and `scaleBand` for country categories. The code uses D3 v5’s `csv` loader to read data from `data.csv`, and the SVG is rendered with `axisBottom` and `axisLeft` guides, with tick marks extended across the plot area. The chart also adds custom labels and a title via SVG text elements.
AI-generated descriptionThis bar chart shows population of the top 10 most populous countries. The data comes from the year 2018 estimate in United Nations: World Population Prospects 2017. It also demonstrates customization of D3 axes.