Skip to main content
Public

Share visualization

Loading preview…

Visualising the Data II - Bar Charts

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

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 & exportHTML, source ZIP

Visualising the Data II - Bar Charts

0 stars1Public
CChris Briggs
Last edited Nov 15, 2021
Created on Nov 15, 2021

This example visualizes the top 10 most populous countries from the UN Population 2019 dataset using horizontal bar charts. The bars are rendered as SVG rectangles within a React component, with their widths proportional to each country's 2020 population estimate. The code uses D3's `csv` loader to fetch the data, `scaleBand` for the categorical y-axis, and `scaleLinear` for the numeric x-axis. React manages the loading state, displaying "Loading..." until the data arrives, then renders the chart with D3 scales.

AI-generated description

A program that loads in some data using D3 utilities, arc and pie and uses React to render the data as a radial burst. Data source: MDN Named Colors

Comments

Sign in to join the discussion.

MIT Licensed