🌍 Public
Viewing a saved revision (read-only)
713baa5fd8c14c94838754eac524ae9c
Customizing Axes
This example shows a horizontal bar chart of the top ten most populous countries, with population values in billions and country names as categorical labels. The visualization customizes both axes by removing default domain lines, styling tick marks and labels via CSS, and formatting tick values with D3’s `format(".3s")` to convert gigabytes into billions. Using `d3.csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`, it renders SVG rectangles with a steelblue fill, a title, and an x-axis label, all positioned within computed margins.
AI-generated descriptionNOTES:
- For color scheme, visit https://sunlightfoundation.com/2014/03/12/datavizguide/ or https://github.com/amycesal/dataviz-style-guide/blob/master/Sunlight-StyleGuide-DataViz.pdf to github