Implement clickable legend entries to show/hide corresponding plot lines, as shown in the attached waveform chart (20 phase-shifted sine curves). Clicking each legend label should instantly toggle the visibility of its matching line on the canvas.
Use Case
Multi-line waveform plots with dozens of curves (like the 20 phase-offset sine waves in the screenshot).
Users need to quickly isolate or hide individual traces without extra UI checkboxes.
Current behavior: Legend labels are static, no click interaction.
Desired Behavior
Click any legend line label → toggle the target plot's IsVisible property.
Visual feedback: Fade the legend text/color when the curve is hidden for intuitive state indication.
Support large line counts (20+ series, as in the demo image) without performance lag.
Preserve render performance: The example chart renders at 27 FPS in 36.836ms, toggle logic must not degrade frame rate.
Additional Context
Screenshot attached: A multi-phase sine wave plot with 20 distinct lines (Line #1 ~ Line #20). Users want to click the right-side legend names to hide/show each curve dynamically.

Implement clickable legend entries to show/hide corresponding plot lines, as shown in the attached waveform chart (20 phase-shifted sine curves). Clicking each legend label should instantly toggle the visibility of its matching line on the canvas.
Use Case
Multi-line waveform plots with dozens of curves (like the 20 phase-offset sine waves in the screenshot).
Users need to quickly isolate or hide individual traces without extra UI checkboxes.
Current behavior: Legend labels are static, no click interaction.
Desired Behavior
Click any legend line label → toggle the target plot's IsVisible property.
Visual feedback: Fade the legend text/color when the curve is hidden for intuitive state indication.
Support large line counts (20+ series, as in the demo image) without performance lag.
Preserve render performance: The example chart renders at 27 FPS in 36.836ms, toggle logic must not degrade frame rate.
Additional Context
Screenshot attached: A multi-phase sine wave plot with 20 distinct lines (Line #1 ~ Line #20). Users want to click the right-side legend names to hide/show each curve dynamically.