Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Sized Points on a Map

Public visualization

Sized Points on a Map

0 stars0🌍 Public
JJoel Schwartz
Last edited Jun 9, 2020
Created on Jun 9, 2020

Two legends demonstrate how to encode data with color and size scales on an SVG map. The color legend uses a `d3.scaleOrdinal` to map fruit categories to distinct colors, while the size legend applies a `d3.scaleSqrt` to represent numeric values through circle radii. Both legends are rendered with custom functions, `colorLegend` and `sizeLegend`, which append groups containing circles and text labels.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed