Skip to main content
Public

Share visualization

Loading preview…

Bar Chart - React & D3 (Part 24) - Stylised

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 - React & D3 (Part 24) - Stylised

4
TTom-S82
Last edited Sep 16, 2020
Created on Sep 16, 2020

This interactive bar chart displays the top countries by estimated UN population for a selected year, with the number of countries adjustable via dropdowns. The bars are color-coded by continent and stylized with gradient fills and drop shadows. The visualization uses React for state management and component rendering, while D3 v5 handles data loading (via `csv`), scaling (`scaleBand`, `scaleLinear`), and axis generation. Population values are loaded from a CSV file and formatted using D3’s `format` function.

AI-generated description

A program that creates a bar chart based on estimated UN Population levels.


Extras:

  • Dynamic Selection
    • Select any year between 1950 and 2020
    • Select a variable number of countries to return
  • The continents of the countries are drawn in different colors to show how the global population is roughly distributed
  • Bars formatted to look 3D and border effects (as per the previous fork)

Potential Improvements for later:

  • Formatted tooltip on multiple lines
  • Animation when the dropdowns are selected rather than only happening on initial loading

Tutorials:

Other Documentation:

Comments

Sign in to join the discussion.

MIT Licensed