Color and Size Legends
✓ Published0🌍 Public
This example demonstrates two types of chart legends: a color legend for ordinal categories (apple, lemon, lime, orange) and a size legend for a continuous square-root scale. Interactive selection works through clicking any object to highlight its identity. The visualization uses D3 v5 with `scaleOrdinal`, `scaleSqrt`, and the `tick` pattern for legend construction, rendering SVG circles and text. Both legends are composed using the data-join pattern with `.enter()` and `.merge()` to update groups.
AI-generated descriptionClick Any Object to select it's identity
MIT Licensed