legend

Input Stack:
String
TimeSeriesExpr
Output Stack:
StyleExpr
 

Set the legend text. Legends can contain variables based on the exact keys matched in the query clause and keys used in a group by. Variables start with a $ sign and can optionally be enclosed between parentheses. The parentheses are required for cases where the characters immediately following the name could be a part of the name. If a variable is not defined, then the name of the variable will be used as the substitution value.

The variable atlas.offset can be used to indicate the time shift used for the underlying data.

Examples:

BeforeAfter
name,sps,:eq,
(,name,),:by
name,sps,:eq,
(,name,),:by,
$name,:legend
BeforeAfter
name,sps,:eq,
(,nf.cluster,),:by
name,sps,:eq,
(,nf.cluster,),:by,
cluster+$nf.cluster,:legend