Skip to content

[Feature] More control over when line events trigger #21000

Closed

Description

@sjcobb

What problem does this feature solve?

Currently, triggerLineEvent is very useful but there are cases where you only want to trigger the event when hovering on the actual line not the area under the curve. This comes up in cases where there are overlapping series with areaStyle set (ex: you want to hover only on the line and have the event trigger for the series you're closest to, disregarding whether it is plotted on top). A workaround for overlapping series is to use zlevel but ideally, we'd have more control over the event.

Example where hovering under the line triggers the mouse event:

ex_area_hover.mov

Example where bold series in tooltip does not stay in sync with the correct line being hovered over (using triggerLineEvent: true):

test_tooltip_bold_series_ex_02.mov

What does the proposed API look like?

Add a new triggerEvent: 'line' option to line series. When it is true, only hovering on the actual line will trigger the mouse event.

Activity

  1. added
    en
    pending
    on May 27, 2025
  2. removed
    pending
    on Nov 14, 2025
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

    ennew-feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions