color and size legends
✓ Published0🌍 Public
Two D3 legend components display color and size scales side-by-side in a single SVG. The color legend uses `scaleOrdinal` with named fruit categories and a `colorLegend` function, while the size legend uses `scaleSqrt` and a `sizeLegend` function. Both legends generate groups with circles and text labels, positioned via `spacing` and `textOffset`. The size scale filters out zero values and uses `ticks` to determine displayed values.
AI-generated descriptionMIT Licensed