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 visualizes country populations using horizontal bars, with color encoding to highlight population ranges—from dark red for values above 2000 to light beige for the smallest. The chart is rendered as SVG using D3 v6, with scales from `d3.scaleLinear` and `d3.scaleBand`. Interactive tooltips appear on mouseover via a D3 text element, and data is loaded from a CSV file. Axes are generated using `d3.axisLeft` and `d3.axisBottom`.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed