Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Color & Size Legends

Public visualization

Viewing a saved revision (read-only)

daf7745f47a549709e0433f8647f3600

Color & Size Legends

0 stars0🌍 Public
JJordan Arnold
Last edited Mar 9, 2021
Created on Mar 9, 2021

This example demonstrates how color and size legends are constructed and rendered in an SVG visualization. The code uses D3 v5 selection methods like `d3.select` and scale functions such as `scaleOrdinal` to map data values to visual encodings. A blank SVG container with fixed dimensions is populated programmatically through the bundled JavaScript, while CSS hides page margins and overflow. The visualization relies on D3’s modular imports to manage the legend components, though the concrete data or legend items themselves are not visible in the provided source files.

AI-generated description