Skip to main content
Public

Share visualization

Loading preview…

ICE-6 Rendering Marks and Channels with React & D3

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

ICE-6 Rendering Marks and Channels with React & D3

1
SShishiraRudrabhatla
Last edited Jun 25, 2022
Created on Jun 25, 2022
Forked from Hello VizHub

This example shows a horizontal bar chart of 2019 telecom sale charges for the top 10 countries by population, rendered as purple SVG rectangles. It uses React hooks (`useState`, `useEffect`) to load and parse CSV data from a GitHub gist via `d3.csv`, then maps the values to a `d3.scaleBand` for the y-axis and `d3.scaleLinear` for the x-axis. The chart includes custom grid lines and tick labels generated from the scales, with the bars positioned through React’s JSX and D3’s scale functions.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.

Comments

Sign in to join the discussion.

MIT Licensed