Skip to main content
Public

Share visualization

Loading preview…

Lesson 4: Design Pattern

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

Lesson 4: Design Pattern

2
0007ebey
Last edited Aug 7, 2020
Created on Feb 26, 2020

This example demonstrates a data visualization design pattern using React and D3 v5, showing animated transitions of fruit shapes within a bowl. It displays how SVG elements update when data changes, with apples transforming into lemons and fruits being removed. The code uses `scaleOrdinal` and `scaleLinear` for sizing and positioning, while `selection.join()` and `transition` methods animate the changes. Population data from the World Bank is referenced, though the visualization focuses on the state management and rendering pattern for dynamic datasets.

AI-generated description

A bare minimum HTML page.

See also React Starter.

This data was taken from The world bank data website

Comments

Sign in to join the discussion.

MIT Licensed