ls
Input Stack:style: String | expr: TimeSeriesExpr |
|
⇨ |
Output Stack: |
Set the line style for visualizing time series data. This operator allows you to choose between
different visualization styles that control how the data is rendered on the graph. It provides
a single interface for setting any of the four main line styles.
Parameters
- expr: The time series expression to apply the line style to
- style: The line style to use (one of:
line
, area
, stack
, vspan
)
Supported Styles
line
(Default)
- Behavior: Draws a normal line connecting data points
- Use case: Standard time series visualization
- Equivalent: Using :line operator
area
- Behavior: Fills the space between the line and zero on the Y-axis
- Use case: Emphasizing magnitude and volume
- Equivalent: Using :area operator
stack
- Behavior: Stacks filled areas on top of previous stacked lines on the same axis
- Use case: Showing cumulative contributions
- Equivalent: Using :stack operator
vspan
- Behavior: Non-zero datapoints are drawn as vertical spans covering the full graph height
- Use case: Event visualization and condition marking
- Equivalent: Using :vspan operator
Examples
Basic line style (default):
Area fill visualization:
Stacked area visualization:
Vertical span for events:
VSpan |
 |
name,sps,:eq,
:sum,
(,name,),:by,
200e3,:gt,
vspan,:ls
|
Alternative Approach
While :ls
provides a unified interface, you can also use the specific style operators directly:
# These pairs are equivalent:
name,cpu,:eq,:sum,area,:ls
name,cpu,:eq,:sum,:area
name,cpu,:eq,:sum,stack,:ls
name,cpu,:eq,:sum,:stack
- :line - Standard line style (default)
- :area - Area fill style
- :stack - Stacked area style
- :vspan - Vertical span style
- :alpha - Control line transparency
- :lw - Control line width
See Also