FWIW, I feel like this is also possible from the time range override in the panel query options in the UI (Queries | Grafana Labs). Though maybe that doesn’t provide the level of flexibility desired here…
I have this exact same issue, I want to track the light level for my plants over the past 3 hours but the temperature and humidity over the past 7 days.
No matter what I try, I can not get these JSON properties to work. Every time I paste them into JSON Model and press Save, Grafana just overwrites “timeFrom” to null and removes “hideTimeOverride” completely.
@longoon12000 did you take a look at the link in my post? I’m not sure why people are resorting to manual JSON edits for this. The option to override the time range for a particular panel is (still…years later) right there under “Query options”, next to the datasource selector in the panel edit screen. Just select whatever custom time range you need for that individual panel (e.g. “7d”) and you should be sorted.
@svetb I have looked into these options and it seems that “Relative Time” is indeed what I need. I had trouble finding this field because it didn’t have this (i) popover that explained what it does and also does not have “range” in its name.
To be honest I didn’t even understand what Relative Time could possibly mean so it was prone to be ignored as an option by me. It was only in the documentation where this was explained and I understood it.
@longoon12000 I think your point about how (non-)intuitive it is to find (or understand) that option is certainly spot on! I do feel like it was called something more obvious previously, and it also potentially had an info pop-up that’s no longer there. Probably a valuable enhancement request to get this sorted. Based on the above thread, you’re clearly not the only one who’s had trouble finding it in the UI…
So how can the JSON be modified exactly for changing the time range. Is it possible to use variables as input parameters in the JSON or defined dates for “timefrom” (like “2021-03-11 12:09:41.340” → correct format?)?
Hello there. I’m struggling with this issue, but I cannot make it work.
The parameter timeFrom seems to fix the panel to the last 24 hours (or 24 hours so far). What I need is to show in one panel the last month, and in another today.
My time range filter is from now/M to now/d.
If I delete the timeFrom parameter, the panel shows the rest of the day, but the from time is one month ago (taken from the general time range), but when in the “today” panel I set the timeFrom 1d, it shows the last 24 hours until this moment, not the whole day from 00:00:00
I will have a dashboard table with columns : address, price , procent
i want to be able to filter the table by changing the time period From → TO , my API will return the array of data based on that period . Is there a way to make the table url dynamic based on the time period i choose ?
I also posted a question on the subject yesterday.
I wanted to use Relative Time to display data from a specific day in the past. This should be done alongside other panels that use a different time range.
But it doesn’t work.
Big mistake on my part. I was trying to change the X-Axis (i.e. time range.) I kept changing it in the (Panel)–>Edit–>(Time Range) and choosing “Last 30 Days.” I would save it, close the edit page, and hit the link I had for the dashboard, to check, and it kept reverting to the 6-hour setting I wanted to get rid of.
I eventually realized that the 6h time range was embedded in the URL of the pane.
Don’t be like me. . Make sure your testing/operations URL doesn’t force the (unwanted) time period before checking your dashboard.