Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Color and Size Legends

Public visualization

Viewing a saved revision (read-only)

41412f304d2e4c1f85d436262c249245

Fork of Color and Size Legends

0 stars0🌍 Public
AAndy Chang
Last edited Oct 1, 2022
Created on Oct 1, 2022

This fork of the color and size legends example displays separate reusable legend components, each implemented as a D3.js module. The color legend maps a categorical ordinal scale to colored circles, while the size legend (present but commented out) maps a quantitative square-root scale to varying circle radii. Both use D3 v5’s selection API and `scaleOrdinal`/`scaleSqrt` with an SVG `g`-based tick layout, with text labels offset from the shapes.

AI-generated description