Skip to main content
100%

Customizing Axes

✓ Published1🌍 Public
Bbukbukbukka
Last edited Nov 30, 2019
Created on Nov 30, 2019
Forked from First Bar Chart

This example demonstrates how to customize both axes in a bar chart showing population data for ten countries. The horizontal axis uses a linear scale with formatted tick labels that abbreviate numbers (e.g., converting “G” to “B” for billions), while the vertical axis displays country names using a band scale. The code removes default axis lines and gridlines, then adds custom labels and a title. It relies on d3.csv for data loading, d3.scaleLinear, d3.scaleBand, d3.axisBottom, d3.axisLeft, and d3.format for tick formatting, rendering with SVG.

AI-generated description
MIT Licensed

Similar vizzes