Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar Chart with Highlighting

Public visualization

Bar Chart with Highlighting

1 star8🌍 Public
Ccbackes000
Last edited Nov 6, 2020
Created on Nov 3, 2020

This bar chart displays the populations of ten countries using horizontal bars, with color encoding highlighting ranges: red for those above one billion, orange for over 200 million, yellow for over 150 million, and green otherwise. The visualization is rendered as an SVG using d3.scaleLinear, d3.scaleBand, d3.axisLeft, and d3.axisBottom, with data loaded from a CSV via d3.csv. Hover interactions reveal a tooltip text element that displays country and population values, while adjusting bar opacity.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed