-
What Grafana version and what operating system are you using?
Grafana 9.2.0, Docker version (Ubuntu 20.04). -
What are you trying to achieve?
That the data of a panel show the corresponding detailed information of a row selected in other panel of the same dashboard, without modify the select timeline for the dashboard. -
How are you trying to achieve it?
Using a variable, offense_id, and &var-offense_id=${__data.fields.ID}&from=${__from} on the URL of a datalink between two panels on the same dashboard to update the query of one panel with the row selected in the other panel. -
What happened?
The detailed information showed correctly in the second panel, but with the original timeline of the dashboard (which in this case, is last 30 days) restored to the main URL, and not “last 90 days”, which was the timeline I selected before doing a click on the first panel field. With that behavior happening, if the original dashboard timeline is smaller than 30 days, the 1st panel list of events disappear, because they are 45 days old. -
What did you expect to happen?
That the second panel updated the information to show the detailed information corresponding to the selected field of the first panel (which was happened), but that the dashboard “hold” the “last 90 days” timeline. -
Can you copy/paste the configuration(s) that you are having problems with?
In this first screenshot, you can see that I selected “Last 90 days” as timeline in the dashboard (the original dashboard timeline is last 30 days), and if you review the URL at the bottom in the browser (when I pass the mouse pointer over “9” ID in the 1st panel), you can see that the “&from=” from that URL is an epoch that is correct for last 90 days.
In this second screenshot, you can see that after I click on “9” ID, the detailed information for “9” ID showed in the 2nd panel, but the timeline “reverted” to “Last 30 days” (at first, for a couple of seconds after the mouse click, you can see in the browser URL the correct epoch value for “last 90 days”, but a few seconds later, you can see &from=now-30d).
If instead of a left click, I right click with the mouse over “9” ID, and open it in a new browser tab, the behavior is the expected one, the timeline is correct (I cannot attach a screenshot because I only allowed to add two screenshots to the post). -
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
No -
Did you follow any online instructions? If so, what is the URL?
No
What is more confusing for me, is that for example, in this post of Github, $__from and $__to aren't following the panel's relative time · Issue #38954 · grafana/grafana · GitHub, they are saying that the expected behavior of the variables $__from and $__to is to use the original dashboard timeline, which really not sounds correct to me.
Any advise about which is the expected behavior here? I need a way to use the selected timeline at runtime in a variable, to “update” the panels as needed.
Thanks in advance for your help.