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

0
ZZhengyan Yu
Last edited Apr 8, 2020
Created on Apr 8, 2020
Forked from Making a bar chart

This example displays a horizontal bar chart of the ten most populous countries, with population values scaled linearly and countries ordered by rank on a band scale. The visualization customizes both axes by removing their default domain lines and ticking, while formatting population ticks to abbreviate billions as “B” via d3.format. It also applies a tick size that extends grid lines across the chart. The code uses d3.scaleLinear, d3.scaleBand, d3.axisBottom, d3.axisLeft, and d3.csv to load the population data, rendering SVG rectangles with steelblue fill.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed