# Summary Line

This design seamlessly integrates a line chart with a numerical indicator, all housed within a [Bento box](/dev/elements/create-your-own-charts/bento-box.md). The line chart provides a visual depiction of data trends over a specified period, enabling users to trace fluctuations or patterns. Adjacently placed below, the numerical indicator gives a metric or value, normally used for aggregates of the data shown in the line chart. The combination of these elements ensures that users get both an overarching view and specific insights, making this chart format particularly suited for dashboards or concise reports.

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

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

It must contain the following input variables:&#x20;

```python
x: str
order: int
title: str
data: Union[str, pd.DataFrame, List[Dict]] 
```

Accepts the following input variables as optional:

```python
y: Optional[Union[str, List[str]]] = None
description: str = ''
value: Union[str, float, int] = ''
rows_size: int = 2
cols_size: int = 2
```

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

The following code:

```python
summary_data = [
    {'date': '28 days', 'x': 5},
    {'date': '21 days', 'x': 6},
    {'date': '14 days', 'x': 4},
    {'date': '7 days', 'x': 7},
    {'date': 'today', 'x': 3},
]
s.plt.line_with_summary(
    data=summary_data, order=4, x='date', y='x',
    title='Total', description='Today', value=7.94
)
```

<figure><img src="/files/3ncm1UT2Ss2iM6C47S6A" alt=""><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.shimoku.com/dev/elements/charts/line-charts/summary-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.
