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

0
Uubl2
Last edited Mar 10, 2022
Created on Mar 1, 2022
Forked from HTML Starter

This example shows a bar chart of the top 10 countries by GDP per capita, using green rounded rectangles to encode values. Data is loaded from a CSV via d3.csv and sorted by slicing the first ten rows. The visualization uses React hooks (useState, useEffect) to manage state, while D3 scales (scaleBand, scaleLinear) and SVG elements are rendered declaratively. Axis ticks and grid lines are generated manually using xScale.ticks() and DOM elements, without axis helper components.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed