Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Lesson 4: Design Pattern

Public visualization

Lesson 4: Design Pattern

0 stars0🌍 Public
0007ebey
Last edited Apr 10, 2020
Created on Apr 10, 2020

This example demonstrates a reusable color legend design pattern using React and D3 v5. It displays a vertical color scale with circular swatches and labels, generated through a custom `legends` function that uses `scaleOrdinal` and `range` for positioning. The visualization also includes an animated fruit bowl component defined in `makeFruit.js`, though it is not fully integrated into the main view. The code references population data from the World Bank and renders SVG elements with smooth transitions.

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