Skip to main content
Public

Share visualization

Loading preview…

Bar Chart with Highlighting

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

Bar Chart with Highlighting

0
Nnouralkhoury
Last edited Dec 1, 2020
Created on Dec 1, 2020

This bar chart displays 2018 population data for the ten most populous countries, with each bar color-coded by population size threshold. The visualization uses D3 v6 with SVG rendering, employing `scaleLinear` and `scaleBand` for axes. Bars change opacity on mouseover and show a tooltip with country and population values via D3 event handlers. Data loads from a CSV file using `d3.csv`, and population values are multiplied by 1000 to convert from thousands.

AI-generated description

This is my code after following a video tutorial by Curran Kelleher.

Comments

Sign in to join the discussion.

MIT Licensed