Customizing Axes
✓ Published2🌍 Public
This example shows a horizontal bar chart of the populations of the ten most populous countries, using a CSV data source. D3 v5’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` position the bars and axes, while the bottom axis’s tick labels are formatted with `format(".2s")` and a custom replacement of ‘G’ with ‘B’. The chart removes default axis domain lines and y-axis tick marks to create a cleaner look, and appends custom text elements for the axis label and title.
AI-generated descriptionMIT Licensed