Making a Bar Chart
✓ Published0🌍 Public
This example displays the populations of the ten most populous countries, drawn as horizontal bars scaled linearly along the x-axis and categorically along the y-axis. The chart is rendered as an SVG using the d3 library, with scales created by `scaleLinear` and `scaleBand`, and axes drawn using `axisLeft` and `axisBottom`. Data is loaded from a CSV file via d3's `csv` function, with population values multiplied by 1,000 for display.
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.
MIT Licensed