question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Display the nearest data of different series in one tooltip.

See original GitHub issue

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) =>
}

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:6
  • Comments:21 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
Oviliacommented, Nov 12, 2021

@Raphyyy Thanks for reporting. We are going to work on axisPointer.snap in the near future.

5reactions
Raphyyycommented, Nov 12, 2021

Nice thanks! I think the actual implementation of axisPointer.snap if true 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 to axisPointer.snap at the end.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found