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

1
Jjlspangl
Last edited May 21, 2021
Created on May 21, 2021

This example shows the ten most populous countries in 2018 as a horizontal bar chart, with population values converted to billions and labeled on a custom x-axis. The chart uses D3 v5’s `d3.csv`, `scaleLinear`, `scaleBand`, `axisBottom`, and `axisLeft` to render SVG rectangles, while the axes are styled by removing domain lines and tick marks via `selectAll`. Population data comes from the United Nations’ World Population Prospects 2017 estimate, and the tick labels are formatted with `d3.format`.

AI-generated description

This bar chart shows population of the 10 most populous countries. The data comes from the year 2018 estimate in [United Nations: World Population Prospects 2017] (https://population.un.org/wpp/Download/Standard/Population/)

Comments

Sign in to join the discussion.

MIT Licensed