[DOCS] Querying basics: what can be graphed

Put a scalar to query, it can be graphed.

So the doc says "an expression that returns an instant vector is the only type which can be graphed." is not correct?

And also, a query_range, which used for graph, always return a range vector <https://promlabs.com/blog/2020/06/18/the-anatomy-of-a-promql-query/#range-queries> , so it's confusing to read the above statement.

Signed-off-by: Viet Hung Nguyen <hvn@familug.org>
This commit is contained in:
Viet Hung Nguyen 2024-10-03 21:11:44 +09:00
parent 199d2fb492
commit f0a9f62ce8

View file

@ -35,8 +35,9 @@ evaluate to one of four types:
Depending on the use-case (e.g. when graphing vs. displaying the output of an Depending on the use-case (e.g. when graphing vs. displaying the output of an
expression), only some of these types are legal as the result of a expression), only some of these types are legal as the result of a
user-specified expression. For example, an expression that returns an instant user-specified expression.
vector is the only type which can be graphed. For [instant queries](api.md#instant-queries), any of the above data types are allowed as the root of the expression.
[Range queries](api.md/#range-queries) only support scalar-typed and instant-vector-typed expressions.
_Notes about the experimental native histograms:_ _Notes about the experimental native histograms:_