Understand Zoom Arrow Settings

I am trying to explain the settings for the Zoom back and forward arrows. I’ve looked in the documentation and can’t find anything that specifically tells what these settings are.

It looks like the arrows give random results. For example, I select a time interval of 1 month (From: now/M To:
now/M). Today is May 15, 2018. I see the clock icon and ‘This month’. The Time Series graph shows the dates 5/1 to 5/31. This is what I expect.

When I click the forward arrow around Zoom, This Month disappears and I see May 16, 2018 aa:59:59 to Jun 16, 2018 11:59:59. Again that is a one month value.

If I click the forward arrow around Zoom again, the time interval changes to May 31, 2018 23:59:59 to Jul 1, 2018 23:59:59.

I know I must be missing something. I would have expected the time to move forward one month when I clicked the forward arrow a second time.

How do the back and forward arrows around Zoom work?

Where do their values come from?

Like I said, I’ve read the docs and they go into time intervals, but now how these arrows work.

I would appreciate any help I can get about this.

Thanks from a tech writer.

You can see exact implementation in the open source code . As you can see the maximum to value is limited to the current time. You can’t move to the future, so I’m not sure if we are talking about the same zoom arrows:

Also will be fine if you can specify your Grafana version. Older versions may have different implementation.

Hi Jan,

My version is Grafana 4.5.2 and I can click on the right arrow around Zoom Out (>) and see future dates. (See attached graphic).

Also, see the options in Time ranges. The dates at the top right of the screen don’t relate to the options in Time ranges.

This is very confusing and very difficult to try and explain in a technical document.

I could include your source code, but not everyone in my audience is a programmer so that would just add more confusion and complexity.

Also, the arrows around ‘Zoom Out’ are not explained well in the Grafana docs either.

I just need to know how they are supposed to work.

Please give me some example dates and time range settings to show how this functionality is supposed to work.

Thanks for your help,

Ollie

timespan = selected time from FROM to TO = TO - FROM, let’s start with ~1month:

move forward = new to will be current TO + timespan/2, new from will be current FROM + timespan/2 => move ~15 days forward, because selected timespan is ~1 month:

move forward = new to will be current TO + timespan/2, new from will be current FROM + timespan/2 => move ~15 days forward, because selected timespan is ~1 month:


etc.

If you select 1 hour timespan, then zoom arrows will move your time + or - 30 minutes.
If you select 2 hours timespan, then zoom arrows will move your time + or - 1 hour.
etc…
It’s always + or - half of used timespan.

Don’t expect calendar months here (Jan, Feb, Mar, …). Implementation will be very complicated, because they have different number of days + you need to consider leap year and summer times as well.

Okay, now I get it. It isn’t intuitive. Thanks for explaining it.

**Could you please add this to the docs? **

This section about Time Controls doesn’t even talk about zoom: http://docs.grafana.org/reference/timerange/#panel-time-overrides-timeshift and when I did a search in the docs on ‘zoom’, nothing like this came up. Your examples and your explanation would really help.

Thanks again,

Ollie

I can’t. I’m only a community member.

Okay. I thought you were part of Support.

Where did you find this information?

Maybe I missed it in the docs.

Open source code of Grafana.