Skip to main content
100%

Customising axes

✓ Published0🌍 Public
MMarko Puza
Last edited Jul 16, 2019
Created on Jul 16, 2019

This example visualizes the ten most populous countries as horizontal bars, with country names on the y-axis and population on the x-axis, using a bar chart rendered as SVG. The code uses d3’s `csv` loader, `scaleLinear`, `scaleBand`, `axisLeft`, `axisBottom`, and `format` to build the chart, with custom tick formatting that converts values from millions to billions (e.g., 'G' to 'B'). A title and axis label are added, and the chart is styled via CSS with steelblue bars and custom tick and label fonts.

AI-generated description

Tutorial.

MIT Licensed

Similar vizzes