Customizing Axes
✓ Published0🌍 Public
This example shows a horizontal bar chart of the top 10 countries by population as of 2022, using data from Worldometer. The chart uses D3 v7 with SVG rendering, employing `scaleLinear` for the x-axis, `scaleBand` for the y-axis, and custom tick formatting via `format('.3s')` to display numbers in billions. Both `axisBottom` and `axisLeft` are customized by removing domain lines and tick marks for a cleaner visual, with all bars rendered as styled SVG rectangles.
AI-generated descriptionTop 10 Countries in the World by Population (as of 2022). Data taken from Worldometer: Population by Country (2022).
MIT Licensed