Skip to main content
100%

Customising Axes

✓ Published1🌍 Public
WWhitney Hung
Last edited May 26, 2020
Created on May 26, 2020
Forked from Making a bar chart

This example demonstrates how to customize axes in a bar chart showing the top 17 most populous countries. The chart uses D3 v5 to load CSV data and render SVG rectangles, with a linear scale for population on the x-axis and a band scale for country names on the y-axis. The code customizes the axes by removing default domain and tick lines, formatting tick labels from millions to billions using `d3.format`, and adding custom axis titles with specific font sizes and colors via CSS classes. The x-axis ticks extend across the plot area for enhanced readability.

AI-generated description
MIT Licensed

Similar vizzes