apache / apache/echarts

[Feature] Disable emphasis state but enable it on legend hovering

Open
#17,357 7 comments 16 reactions 0 assignees View on GitHub
en new-feature pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### What problem does this feature solve?

The option `series-line.emphasis.disabled` has been added to solve this issue I opened : https://github.com/apache/echarts/issues/14952
I am still using the zIndex trick (https://jsfiddle.net/45scamx3/) to disable emphasis state on series hover because I want to enable emphasis when the user is hovering the legends.
However, this workaround is throwing z-level warn and is causing other issue relative to series zIndex.
I also have to catch the event `highlight` to enable or disable emphasis state depending on the event has been triggered either by chart hovering or legend hovering.

I am looking for an option to disable emphasis state on chart hovering but enable it on legend hovering.

### What does the proposed API look like?

An option `series-line.emphasis.triggerOn` which could have the value `all`, `legend` or `series`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.