Display the nearest data of different series in one tooltip.
See original GitHub issueWhat 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) =>
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:21 (4 by maintainers)
Top Results From Across the Web
How can I show all series in tooltip when series does not have ...
So I found a workaround to have the tooltip display all series even if they don't have a value at the exact x...
Read more >Showing nearest value in a tooltip at all times - Highcharts
Data points are added with different timestamps in each series, and i'm trying to figure out a way to show the "nearest" value...
Read more >Interactions - Chart.js
When configuring the interaction with the graph via interaction , hover or tooltips , a number of different modes are available.
Read more >Line Chart, Multiple Series, with tooltip / Guy Pursey
Having multiline tooltips means a better capability for displaying data, thereby allowing viewers to read and interact with the chart directly – that...
Read more >Tooltip multiline chart - CanvasJS.com
Hi there i have a problem when 2 data of 2 different series have same value because tooltip only show 1 of them....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Raphyyy Thanks for reporting. We are going to work on
axisPointer.snap
in the near future.Nice thanks! I think the actual implementation of
axisPointer.snap
iftrue
is to magnet the axisPointer to the nearest point, no matter the series. The approach here is a bit different. The purpose is not to magnet axisPointer to the nearest point, it’s to read all series’ nearest point to get them in the tooltip, so I don’t know if it is related toaxisPointer.snap
at the end.