Skip to main content
Public

Share visualization

Loading preview…

....................

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

....................

0
KKeerthiAnnem
Last edited Jul 16, 2023
Created on Jul 16, 2023
Forked from Hello VizHub

This horizontal bar chart visualizes the top 10 countries by beauty product spending from a 2018 United Nations population estimate, highlighting the cosmetic industry's revenue. The D3 v5 code uses `scaleLinear` and `scaleBand` to map spending values and country names, with `axisLeft` and `axisBottom` for customized axes. The bars are rendered as SVG rectangles, colored steelblue via CSS, and a `format('.3s')` tick label transforms numbers into readable units. Data is loaded from a CSV file, and the chart title and axis label are added as SVG text elements.

AI-generated description

This bar chart shows population of the top 10 most populous countries. The data comes from the year 2018 estimate in United Nations: World Population Prospects 2017. It also demonstrates customization of D3 axes.

See also the first bar chart visualization that this one builds on: Making a Bar Chart.

Comments

Sign in to join the discussion.

MIT Licensed