apache / apache/echarts

Multiple tooltips with different trigger type

Open
#11,115 20 comments 0 reactions 0 assignees View on GitHub
difficulty: hard en new-feature priority: normal topic: tooltip
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### What problem does this feature solve?
For my line chart I need to show two types of tooltips. One on hover on exact point(like with trigger item) and another on hovering any other place (like trigger axis).
Below issue was raised for same but closed without proper response
https://github.com/apache/incubator-echarts/issues/4905

### What does the proposed API look like?
```js
tooltip: [{
trigger: 'axis',
formatter: axisTooltipFormatter
},{
trigger: 'item',
formatter: itemTooltipFormatter
}]
```
Or
```js
{
tooltip: {
trigger: 'axis',
formatter: axisTooltipFormatter
},
series[{
...
tooltip: {
formatter: itemTooltipFormatter // item trigger
}
]
```

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.