Skip to main content
100%

Customizing Axes

✓ Published0🌍 Public
AAshutosh Singh
Last edited Jan 25, 2021
Created on Jan 25, 2021
Forked from Making a bar chart

A horizontal bar chart displays the population of the top 10 countries, with bars rendered as SVG rectangles. The y-axis uses a band scale for country names, while the x-axis uses a linear scale, customized with tick marks that extend across the chart and formatted labels abbreviating large numbers (e.g., "1.41B"). The code employs d3.csv to load data, d3.scaleBand, d3.scaleLinear, d3.axisLeft, and d3.axisBottom, and applies a custom tick format function.

AI-generated description
MIT Licensed

Similar vizzes