Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Legend Interaction

Public visualization

Viewing a saved revision (read-only)

ff58cdc1a5a54577b83ead854f8f2a25

Legend Interaction

0 stars0🌍 Public
RRubens
Last edited Nov 15, 2018
Created on Sep 30, 2018

Two interactive color legends let users select a MIDI file and then one of its tracks from a local dataset. The legends use d3.scaleOrdinal and d3.schemeSpectral for the file palette, while tracks use a scale with a numeric range. Clicking a legend item highlights it at full opacity, dims unselected items to 0.2 opacity, and triggers callbacks to re-render both legends. The code imports colorLegend from a separate module and renders SVG text and circles into groups.

AI-generated description