Skip to main content
Public

Share visualization

Loading preview…

Customizing Axes

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Customizing Axes

2
SSophia Murage
Last edited Apr 2, 2020
Created on Mar 30, 2020

This visualization displays the populations of nine countries as horizontal bars, from China at the top to Russia at the bottom. The chart uses d3.scaleLinear for the x-axis, d3.scaleBand for the y-axis, and d3.axisBottom with a custom tick format that abbreviates numbers. The code loads CSV data using d3.csv, renders SVG rectangles, and customizes axis labels, tick lines, and removes default axis domains for a cleaner look.

AI-generated description

A program that loads and parses some CSV data: CSS Named Colors.

Comments

Sign in to join the discussion.

MIT Licensed