Fork of Scatter Plot
This scatter plot visualizes the populations of the top 10 most populous countries, using a dataset from the 2017 United Nations World Population Prospects. The chart displays each country as a circle positioned along a linear population scale on the x-axis and a point scale for country names on the y-axis. The code uses D3 v5’s `scaleLinear`, `scalePoint`, and `axisBottom`/`axisLeft` to render the SVG, with custom tick formatting that abbreviates large numbers (e.g., replacing “G” with “B”). Axis labels and a title are added programmatically, while grid lines and tick styling come from D3’s axis API.
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.