Data link ${__value.time} not resolving in URL

I have a time series panel with a data link that uses the ${__value.time} variable.
The panel includes a few queries, but only one is formatted to be displayed as clickable dots.

The problem is that the first 30 dots or so (changes every time I check) are indeed pressable and generate a usable URL, but the rest don’t resolve the ${…} variable and keep it as is in the URL.
I tried other variables such as ${__value.numeric}, ${__value.raw} , ${__field.Name}, but they return NaN, ${__value.raw}, and Value respectively.

I don’t know what I’m missing since the Dots are displayed correctly in their appropriate times, so the data is there somewhere.
Any help appreciated

Welcome

Where are you getting this __variable from?

Check this doco out

Thank you :slight_smile:
My bad, I meant ${__value.time}, ${__value.numeric}, etc...

1 Like

So where is that coming from? Is this your own variable or a system variable (never seen it)

I didn’t create it, its one of the default options grafana shows:

I assumed it’s taking information from the point I clicked on.

1 Like

Small update: I added the dynamic image panel where I use the same field (Time) to show pictures thru URL and it works there perfectly.
This makes me think that the problem really is somewhere with the datalinks or the time series panel, or at least in the way it queries or passes the information (otherwise why wouldn’t it resolve?).
Is there a limit to the amount of points that the datalinks have access to? should I maybe change something in my time range?
***BTW this is on grafana v9.0.3
***Possible that this change in 9.1.0 will solve things, will update when I can

OK I discovered that the data links are not actually working at all, and that even if there is a time resolving in the URL it is not the right one… Somehow a single dot can have 2 links, depends on which side it is pressed. That’s why there is a problem with the later dots, since their information was already used (weird).
Can anyone explain to me how the data links take information from the graph / DB query? How come I click on a dot and not get its specific data?

Hi @harancoh,
On Grafana 9.3.6. OSS time in data link with ${__value.time} updates for every data point as intended.

Pictures of timestamp in data link

Note that time in link is different on those pictures:

Configuration

Define an override for time series with data link:

${__value.time}

Grafana data link configuration 2

Grafana data link configuration

Note: This is just example to test funcionallity.

Best regards,
ldrascic

1 Like

Seems like ${__value.time} doesn’t work for data links when using a bar chart, it becomes $%7B__value.time:date%7D. Works fine for time series graph.

I have the same problem in Grafana v10.4.0 (03f502a94d) in a timeseries panel.
The points in the right half side of the time series panel, do not have times, id est, the variable ${__value.time} does not resolve to any value. The points in the left hand side can have two different behaviors:

  • when there is just one point, the variable ${__value.time} resolves correctly to its value
  • but when there are more points, it resolves to the value of some points later. It seems that, if there are N points in the right hand side of the panel whose ${__value.time} does not resolve, the points on the left hand side, resolve to the time of the Nth point after it.

Well, the limit between the left “half” side and the right “half” side is not just in the middle, but a bit to the right from the middle.

A previous post (Data link ${__value.time} not resolving in URL - #8 by ldrascic), says that this is solved in grafana 9.3.6. OSS, but my version is more recent (v10.4.0 (03f502a94d)) and I still have the problem.

Has this issue been fixed in a more recent version of Grafana?