Deciding query step for a given range of timeseries data in a line chart

Hi all, I’m new to the community.

I want to know how Grafana decides on a query step given a time range. E.g. I choose ‘Last 7 days’ on the time filter and not specify a query step, yet - as I saw next to the Query Options - Grafana has a preconfigured or dynamically adjusted query step based on my specified filter. It shows me MD = 400 Interval = 30m from the get-go and the Interval shrinks to 2 seconds as I keep zooming in. I assumed the first 30m and 2 seconds to be the query step in those instances.

In the docs, it says that

The part about deciding the Interval based on how wide the graph is confused me. If we are deciding the Interval based on graph width, then does that mean my graph width dictates how many data points I want to show? I’m confused about Interval’s relationship with query step. Do they affect each other?

I read about query step and resolution in these two links.

Please correct me if I have any misunderstandings.

1 Like