Skip to content

Feature Request: Toggle curve visibility by clicking legend item #5257

Description

@Auspicore

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.

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions