Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing Axes

Public visualization

Viewing a saved revision (read-only)

3957943c327d4c1fb92e9151ea6ce0ef

Customizing Axes

0 stars1🌍 Public
Xxychen0612.cs09@nycu.edu.tw
Last edited Sep 20, 2023
Created on Sep 19, 2023

This example visualizes the top 10 most populous countries using a horizontal bar chart, with population values displayed along the x-axis and country names on the y-axis. The chart customizes axes by removing domain lines, applying tick marks that span the full chart height, and formatting population labels using D3’s `format('.3s')` to replace 'G' with 'B' for billions. It reads data from a CSV file and renders SVG elements using D3 v7, employing `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to build the visualization.

AI-generated description