Skip to main content
100%

Customizaing Axes

✓ Published1🌍 Public
Nnkohdatavis
Last edited Jul 22, 2020
Created on Jul 22, 2020
Forked from Making a Bar Chart

This example displays a horizontal bar chart of the top 10 most populous countries, using a D3 v5 SVG rendering. The chart shows population values on a linear x-axis with custom tick formatting that abbreviates large numbers (e.g., converting billions to 'B'), while the categorical y-axis lists country names. The code uses D3's `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to construct the scales and axes. It removes default domain lines and tick lines, and adds custom axis labels and a title. Data is loaded from a CSV file and multiplied by 1,000.

AI-generated description
MIT Licensed

Similar vizzes