apache / apache/echarts

trigger tooltip for closest series item on hover even if not exactly focused on it

Open
#15,080 9 comments 2 reactions 0 assignees View on GitHub
en new-feature
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### What problem does this feature solve?
this makes it very easy for user to move pointer over the closest point to read that tooltip
(this is when the tooltip is trigger on 'item' rather than 'axis' )
so there should be an option to show tooltip of closest point .. (especially in line series or scatter) where the symbol is small size and not easy for end user to focus on a single point
see the demo of https://www.highcharts.com/demo/spline-irregular-time to get an idea of how smooth /convenient the tooltip on hover should be
i believe the logic is already there in place when computing for focused series .. it just needs to be extended to included tooltip showing

### What does the proposed API look like?
tooltip:{
trigger : 'item',
showNearby : true
}

![image](https://user-images.githubusercontent.com/4696146/120648852-b889a180-c499-11eb-8f4f-648c1f36f8e8.png)

![image](https://user-images.githubusercontent.com/4696146/120648945-d3f4ac80-c499-11eb-9cf7-76e259ebf529.png)

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.