Hello,
I`ve got 2 questions.
First, how i can put ‘timefilter’ variable in panel/dashboard title. I want to do something like "Data in last $__timeFilter days. "
Second, i want to present one graph with one line in percentage, but if i hover on data point i want to see this value (%) and second non-relative value.
So, I’ve tried using __interval and [[__interval]] in my panel titles, and I
get literally that text: "__interval" or “[[__interval]]” - the variable name
doesn’t get de-referenced to its value.
What am I doing wrong? I want to get the text of the time range selected
using the standard dashboard drop-down list (top right) to be displayed as
part of the panel title.
If I create my own variable and have a drop-down selector for it at the top
left of the dashboard, then I can get exactly what I want - something such as
[[Timescale]] gets de-referenced to “7 days” in the panel title.
But defining my own time range variable when there’s already a standard built-
in system facility for this seems somewhat unnecessary.
I think you can’t use al kind of variables on a dashboard surface.
My solution is to define a new dashboard variable.
Here is an example how to display the “$__interval” in the panel header.
Its an old post, I am trying to do exactly your solution here only with $__timeFilter, interval works perfectly like you show but I cannot get time filter to work, do you have any suggestions for this?
hi @donatod
$__interval is different from $__timeFilter (timefilter being the variable that this post is looking to show in the title, and i assume you too are looking to show, ie if you graph is the past 7d , via the time picker, i assume you want “7d” to show in your panels title
so when you see 1s for $__interval , that is correct (as the interval in your graph/panel is 1sec, look under “Query Options” drop down, when in the edit panel page.
that said, i dont know the answer to: what is the variable to use in Panel Title so that it shows the current, live updated, time-picker’s “TimeFrame” (ie the 7d or 7day in my example above).
I know i have had this working in my some of my prior panel’s titles, but i cant seem to get it working again (or im using the wrong variable , also). according to the docs, it should be variable:
$__timeFilter
but that does not resolve to anythnig for me on grafana v9.02 (with a graphite DS and using the Time-series panel type).
sorry i have no answer for you (hopefully someone else does)
(LOVE GRAFANA)
Hi,
I would like to open this issue again, as in Grafana 9.3.6 it is still not working.
According documentation, there is written you can use it in queries, which is great, but… why is it such a problem, to implement it to show also in panel titles?