# Marked Line

A Marked Line Chart integrates specific markings or segments along the data line to highlight particular events, ranges, or important points. The shaded or colored regions in this chart type offer a quick visual reference, enabling users to identify significant periods or anomalies in the data. It's especially useful for emphasizing specific events or changes over a continuous dataset.

## The Method To Use <a href="#the-method-to-use.1" id="the-method-to-use.1"></a>

The method is `s.plt.marked_line()`.

It must contain the following input variables:

```python
data: Union[str, DataFrame, List[Dict]],
order: int, 
x: str, 
marks: list,  
```

Accepts the following input variables as optional:

```python
y: Optional[Union[List[str], str]] = None,
color_mark: str = 'rgba(255, 173, 177, 0.4)',
x_axis_name: Optional[str] = None, 
y_axis_name: Optional[str] = None,
title: Optional[str] = None, 
rows_size: Optional[int] = None, 
cols_size: Optional[int] = None,
padding: Optional[List[int]] = None, 
show_values: Optional[List[str]] = None,
option_modifications: Optional[Dict] = None, 
variant: Optional[str] = None
```

## Examples <a href="#examples" id="examples"></a>

The following code:

```python
data = [
    {'date': dt.date(2021, 1, 1), 'x': 5, 'y': 5},
    {'date': dt.date(2021, 1, 2), 'x': 6, 'y': 5},
    {'date': dt.date(2021, 1, 3), 'x': 4, 'y': 5},
    {'date': dt.date(2021, 1, 4), 'x': 7, 'y': 5},
    {'date': dt.date(2021, 1, 5), 'x': 3, 'y': 5},
]
s.plt.marked_line(
    data=data, x='date',
    marks=[('first segment', 0, 1), ('second segment', 2, 3)],
    order=0, rows_size=2, cols_size=12, y=['x', 'y']
)
```

<figure><img src="/files/6KvSs296O6RCANuB3bHo" alt=""><figcaption></figcaption></figure>

## Variants

By setting the parameter `variant` to the following values the appearance of the chart can be changed:

{% tabs %}
{% tab title="Clean" %}

<figure><img src="/files/6gc9OAo79AOyjjRp6C4D" alt=""><figcaption><p>variant="clean"</p></figcaption></figure>
{% endtab %}

{% tab title="Minimal" %}

<figure><img src="/files/iIWaQMkxmuHU189yJAgh" alt=""><figcaption><p>variant="minimal"</p></figcaption></figure>
{% endtab %}
{% endtabs %}


---

# 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.shimoku.com/dev/elements/charts/line-charts/marked-line.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.
