Skip to main content
Public

Share visualization

Loading preview…

Refarctored Bar Chart

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

Refarctored Bar Chart

1
AAnthony Zornig
Last edited Oct 3, 2021
Created on Oct 3, 2021

This example visualizes the population of the top 10 countries in 2020 using a horizontal bar chart. The bars are scaled proportionally to population values, with country names displayed on the vertical axis and population numbers on the horizontal scale. Built with React and D3 v5, the code loads CSV data via `d3.csv`, uses `scaleBand` and `scaleLinear` for axes, and renders SVG rectangles for each bar. The React component structure separates axes and marks into distinct modules, with data fetched asynchronously using a custom `useData` hook.

AI-generated description

A program that loads in some [data about css named Colors] https://gist.github.com/curran/b236990081a24761f7000567094914e0 using D3 utilities, and uses React statr to render the Data.

Comments

Sign in to join the discussion.

MIT Licensed