Hi, how can I create a relative time-region in a time-series chart?
I’ve tried the obvious syntax of now-24h
but that doesn’t seem to be supported.
Thanks
Hi, how can I create a relative time-region in a time-series chart?
I’ve tried the obvious syntax of now-24h
but that doesn’t seem to be supported.
Thanks
Hi @plsalvado relative time ranges can be set at the dashboard level or the panel level via queries - if you’re doing it at the panel level it will override the dashboard time setting:
General time range info: https://grafana.com/docs/grafana/latest/dashboards/time-range-controls/#time-units-and-relative-ranges
Panel query time options: https://grafana.com/docs/grafana/latest/panels/queries/#query-options
Thanks for the quick response. @samcoren do you have an example? I believe my problem is slightly different. I want to highlight the last 24hr of a chart - and always the last 24hr - by using the time region feature within a panel. If you could point me to an example it’d be great.
Any ideas from anyone?
I wish I had a good answer, but it really doesn’t look like this is possible currently. I was looking for something similar and have not found any information to the contrary.
The UI also seems to indicate the same thing - that all time regions are specified in UTC time explicitly as shown below:
You can also see in the images that the time regions have placeholder text of “hh:mm” which seems to indicate again that you have to use an absolute time instead of a relative time.
Seems like this one will require an enhancement unfortunately.