Skip to main content
100%

Costumising axes

✓ Published3🌍 Public
Bbencestubnya
Last edited May 29, 2020
Created on May 22, 2020
Forked from Hello VizHub

This example displays the top 10 most populous countries as a horizontal bar chart, with the x-axis showing population and the y-axis listing country names. The code uses d3.scaleLinear, d3.scaleBand, d3.axisBottom, and d3.axisLeft to construct the scales and axes, while applying a custom tick format that converts large numbers to abbreviated forms like "B". The chart removes default axis domains and tick lines, adds grid lines via tickSize, and renders an SVG with styled text labels. Data is loaded from a CSV file using d3.csv.

AI-generated description
MIT Licensed

Similar vizzes