Skip to main content
Public

Share visualization

Loading preview…

adding axis labels and making tick grid lines

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

adding axis labels and making tick grid lines

2
DDi Zhen
Last edited Jun 20, 2019
Created on Jun 20, 2019

This example displays a horizontal bar chart of the top 10 most populous countries, using data from a local CSV file. It shows population values for each nation, with clear axis labels and grid lines enhancing readability. The visualization uses d3.csv to load data, d3.scaleLinear and d3.scaleBand for scales, and d3.axisLeft and d3.axisBottom to generate axes. Custom tick formatting converts large numbers to abbreviated units, while grid lines are created by setting a negative tick size on the x-axis. SVG rectangles render the bars.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed