# State background

You can color the background of a time series plot based on the state or value of another signal.

<figure><img src="/files/Oyz6tLZjWcKuN6batHSR" alt="Conditional background in time series plots"><figcaption></figcaption></figure>

To configure background coloring:

1. Open the **plot settings** of your time series plot.
2. Drag or select a signal and add it to the **State background** section.
3. Define which states or values should correspond to which background colors.
4. The rules are applied **from top to bottom**—the background is colored according to the **first matching rule**.

<figure><img src="/files/m5yqUiTkWWfGUwFKHnfP" alt="State background settings"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.marpledata.com/docs/marple-insight/user-manuals/visualisation/plot-types/time-series/state-background.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
