Skip to main content
Public

Share visualization

Loading preview…

Refactored 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

Refactored Bar Chart

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

This bar chart displays population estimates for the top 10 countries from a UN Population 2019 CSV dataset. The chart uses React components to render SVG rect elements positioned by d3.scaleBand and d3.scaleLinear scales, with axes generated as React components. The code loads data via d3.csv, applies margin conventions for layout, and renders the horizontal bars with a left-oriented categorical axis. The visualization refactors a typical D3 bar chart into reusable React components for axes and marks, demonstrating a modular approach to D3 integration in React.

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