15

I am using Influxdb as my source with grafana. On my time series for each data point I have several values and tags.

  • How can I show related data points on hover of particular data point in a line chart?
  • Alternatively can I call some API passing some value to populate this tooltip that comes up on hover.

Show additional details on hover

DMin
  • 10,049
  • 10
  • 45
  • 65
  • Have you found a solution for this? I think you want to show more details (columns value) for each selected point, correct? – matfur92 Oct 16 '19 at 13:17
  • I couldn't find any way to add details to the tooltip. If you have inputs on how to do this, Happy to learn. – DMin Oct 17 '19 at 03:12
  • 2
    I'm searching for a solution. I'll update you if I'll found something – matfur92 Oct 17 '19 at 04:57
  • There seems to be an open feature request for something that would provide this: https://github.com/grafana/grafana/issues/16420 – Malvineous Sep 01 '21 at 10:36

1 Answers1

1

As of this writing it cannot be done, however there is a workaround that will work for a few (but not many) cases.

If you can structure your query so that it arrives in a table with three columns - time, metric and value then Grafana will use the value in the metric column as the series name and show it in the tooltip. If you can squash your value into that field, it can work.

For example:

SELECT
    xxx AS "time",
    CONCAT(name, ':', extra_content) AS metric,
    yyy AS value
FROM ...

To make this work you will need to hide the legend otherwise it will show many series and look cluttered, which means this solution won't work for many cases.

Here is a screenshot showing how I was able to squash an extra date into the metric name. The position on the graph is the date of the data point, and the second date in the metric name shown in the tooltip is the date that the data was obtained from the source.

Example tooltip

Malvineous
  • 25,144
  • 16
  • 116
  • 151