Making a Bar Chart
✓ Published0🌍 Public
This example shows a horizontal bar chart of the top 10 most populous countries using 2018 population estimates from the United Nations World Population Prospects. The SVG renderer uses `d3.scaleLinear` for the x-axis, `d3.scaleBand` for the y-axis, and `d3.axisBottom` and `d3.axisLeft` for ticks, with custom tick formatting that converts G to B for billions. The chart also removes default axis domains, adds a title and axis label, and applies a steelblue fill to all bars.
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.
MIT Licensed