4

Is it possible to somehow reset/override/define the time range based on choosing a variable in a dashboard?

I have a dashboard to show all kinds of data for events. The events are numbered and this is a variable in the dashboard so I can show the data for a particular event. However, events will have happened for let's say 2 hours on a specific date. So I find myself constantly resetting the date range and zooming in again on the charts when I change events. Is there a way to set this time when setting the variable?

4
  • Absolute or relative time range? Commented Feb 6, 2019 at 22:23
  • absolute. The events are numbered (the event number is what I use as variable in the dashboard). An event occured on a particular date on a given time. datapoints for the event are all timestamped, so the datetime information is available in the dataset Commented Feb 7, 2019 at 8:28
  • You will need to write own plugin for that or at least JS function, which will update time range. Commented Feb 7, 2019 at 8:59
  • @JanGaraj would you still need to write a plugin/js function if this time range was fixed / pre-defined? I.e., if you wanted to fix the absolute time range per dashboard (based on some data received from the query). Commented May 15, 2019 at 9:15

1 Answer 1

2

My new plugin may be of use to you. I had a similar issue which I decided to make this solution for.

Screenshot

The buttons will set the timepicker's time range based on data from a datasource.

Enjoy!

https://github.com/WilliamVenner/grafana-timepicker-buttons

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.