Color and Size Legends
✓ Published0🌍 Public
A D3.js visualization demonstrates two separate legends for encoding data. The color legend maps categorical fruit names to distinct colors through an ordinal scale, displaying circles with text labels. The size legend uses a square-root scale to relate numeric values to circle radii, showing five evenly spaced ticks. Both legends are rendered as SVG groups, with circles and text positioned using translate transformations, and the size legend filters out zero values.
AI-generated descriptionMIT Licensed