From 43cced54a042592f899301a9ead68637819f8620 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Tue, 3 Aug 2021 14:21:57 +0100 Subject: [PATCH] Docs: fix wrong formula (#37432) (#37486) (cherry picked from commit 75c8bd26fc0e5e96e0d60c44eadb8fd714f3c137) Co-authored-by: Park Beomsu --- docs/sources/variables/variable-types/global-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/variables/variable-types/global-variables.md b/docs/sources/variables/variable-types/global-variables.md index 6f9bdfc1e1c..042a7cf14fd 100644 --- a/docs/sources/variables/variable-types/global-variables.md +++ b/docs/sources/variables/variable-types/global-variables.md @@ -39,7 +39,7 @@ You can use the `$__interval` variable as a parameter to group by time (for Infl Grafana automatically calculates an interval that can be used to group by time in queries. When there are more data points than can be shown on a graph then queries can be made more efficient by grouping by a larger interval. It is more efficient to group by 1 day than by 10s when looking at 3 months of data and the graph will look the same and the query will be faster. The `$__interval` is calculated using the time range and the width of the graph (the number of pixels). -Approximate Calculation: `(from - to) / resolution` +Approximate Calculation: `(to - from) / resolution` For example, when the time range is 1 hour and the graph is full screen, then the interval might be calculated to `2m` - points are grouped in 2 minute intervals. If the time range is 6 months and the graph is full screen, then the interval might be `1d` (1 day) - points are grouped by day.