Display the nearest data of different series in one 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?
Is there a way to show the nearest data of different series in one tooltip?
Several series with a common x-axis are displayed on the chart.
Although the time between values may differ, I would like to display a general hint if the time difference is no more than a few seconds.
There can be about 8 series on the chart, a series of 30k - 100k points long, it is large dataset to dynamic search nearest data on tooltip formatter, also dynamic search is very slow. Store nearest data for each point is bad way also it's slow too.
Chart options:
The x-axis is time, the y-axis is value.
```
Series 1: [{x: 1 ms}, {x: 3 ms}, {x: 5 ms}]
Series 2: [{x: 0 ms}, {x: 2 ms}, {x: 6 ms}]
```
### What does the proposed API look like?
May be
```
tooltip: {
nearest: true,
formatter: (params: Object|Array, nearest: Object|Array) =>
}
```
Contributor guide
Assessment
This issue has not been assessed yet.