Skip to main content
Public

Share visualization

Loading preview…

Custominzing 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

Custominzing Axes

1
Sstephanie0215
Last edited Sep 23, 2022
Created on Sep 23, 2022
Forked from Making a bar chart

This example visualizes the top 10 most populous countries using a horizontal bar chart, with country names on the y-axis and population values on the x-axis. The chart uses D3 v7’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to render the bars and axes, with custom tick formatting that converts large numbers into abbreviated units. Data is loaded from a CSV file via `d3.csv`, and population values are multiplied by 1000 before plotting. The SVG output includes axis labels, a title, and styled grid lines, all defined in a separate stylesheet.

AI-generated description

T

Comments

Sign in to join the discussion.

MIT Licensed