palette
Input Stack:
|
⇨ | Output Stack:
|
Set the color palette to use for automatically assigning colors to multiple time series. This operator allows scoping a palette to a specific expression group rather than applying it to all lines on the same axis. This is particularly useful when combining multiple grouped expressions that should use different color themes.
Parameters¶
- expr: The time series expression to apply the palette to
- paletteName: Name of the color palette (see available palettes below)
Common Use Case¶
A typical scenario is creating graphs that show successful requests in green shades and errors in red shades. This visual distinction makes it easy to identify whether changes are due to increased errors or increased successful traffic:
Spike in Errors:
Spike in Success:
Examples¶
Applying a red palette to a single time series:
Before | After |
name,sps,:eq, :sum | name,sps,:eq, :sum, reds,:palette |
Applying a palette to grouped time series:
Before | After |
name,sps,:eq, :sum, (,nf.cluster,),:by | name,sps,:eq, :sum, (,nf.cluster,),:by, reds,:palette |
Related Operations¶
- :color - Set specific colors for individual series
- :by - Group data that benefits from palette application
- :stack - Stack areas with different palette colors
- :alpha - Adjust transparency of palette colors
See Also¶
- Color Palettes - Complete list of available palettes