Creating Custom Time Range Buttons in Grafana Dashboards

Recommendations:

  • Use Grafana’s built-in time picker macros to dynamically adjust time ranges in your queries.
  • Consider using URL parameters to set specific time ranges directly from buttons or links.
  • Implement panel links or data links to create custom time range options.
  • Use the Text panel plugin to create a custom HTML navigation bar for a more user-friendly button layout.

Summary and Recap of this Thread
Bert (@brjhaverkamp) wanted to recreate a dashboard feature, specifically buttons to select time ranges like day, week, month, and year. @tpham179 suggested using Grafana’s time picker macros and customizing environmental variables, while @jangaraj recommended using links or data links to mimic the time picker functionality. You can opt for panel links with different URL parameters for each time range, and @tpham179 further suggested using the Text panel plugin to create a custom HTML navigation bar for a more intuitive button layout

Related References