🌍 Public
Viewing a saved revision (read-only)
7094b283c6db4bf8820e919cf67565a9
Color Legend
A color legend maps fruit names to colors via an ordinal scale. Circles display red, yellow, light green, and orange for apple, lemon, lime, and orange respectively. The legend is built with `d3.scaleOrdinal` and rendered with SVG, using D3's selection API in functional style. The SVG element is selected and sized from the HTML attributes, and the legend is positioned in a vertical layout with animated enter/exit transitions.
AI-generated description