Color and size Legends
✓ Published0🌍 Public
Two reusable legend components display color and size scales side by side. The color legend maps fruit names to hues using `d3.scaleOrdinal`, while the size legend uses `d3.scaleSqrt` with five ticks to show proportional radii. Both legends are implemented as ES6 modules that append SVG groups, circles, and text via data joins. The example demonstrates local module imports alongside D3 loaded from UNPKG, with styling applied through external CSS classes.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed