Customizing Axes
This visualization demonstrates customized D3.js axes within a bar chart showing the top 10 most populous countries using 2018 data from the United Nations World Population Prospects. The chart displays population values on the y-axis and country names on the x-axis, with custom font sizes, fill colors, and stroke colors applied to axis ticks and labels. The code uses d3.scaleBand and d3.scaleLinear to construct the scales, along with d3.axisBottom and d3.axisLeft to generate the axes. The rendering is done in SVG, and the styles are defined in a separate CSS file.
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.
See also the first bar chart visualization that this one builds on: Making a Bar Chart.








Comments
Sign in to join the discussion.