Skip to main content
100%

Sized Points on a Map

✓ Published0🌍 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
MIT Licensed

Similar vizzes