Skip to content

[Feature] Tooltip triggered by area hover #21280

@hughess

Description

@hughess

What problem does this feature solve?

I need to have a specific series tooltip appear when user hovers over an area in an area chart. Currently it seems you can only use the triggerLineEvent, which requires you to hover over the specific point in the line.

To workaround this requires rebuilding some of the detection logic based on mouse position, which will be fragile and complex.

This seems like a basic expected feature for an end user of a chart.

I need the same for bars, but it is easier to build the custom logic for bars so I am not blocked on that, though having the ability to combine both trigger axis and item in a multi-series bar chart would be great (hover over axis show all series; hover over segment show just that segment's values).

I am already going to have to build custom logic for line charts to detect the closest line to the cursor, but I can't use that for areas because closest line would give you the wrong output for an area

What does the proposed API look like?

I am not sure what the API should look like, but I would consider this behaviour to be the desired default behaviour for stacked charts, so maybe it is a new "trigger" option in addition to "axis" and "item" ("hybrid"?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enThis issue is in Englishnew-featurependingWe are not sure about whether this is a bug/new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions