# Top Bottom Area Charts

Top Bottom Area Charts present two distinct area charts within the same visual space, each operating on its own y-axis. This design facilitates the comparison of datasets with differing scales. The chart effectively juxtaposes two datasets, allowing for clear discernment of patterns or correlations between them, even when they operate on different magnitudes or units.

## 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:

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

Accepts the following input variables as optional:

```python
top_names: Optional[List[str]] = None, 
bottom_names: Optional[List[str]] = None,
rows_size: int = 4, 
cols_size: Optional[int] = None,
padding: Optional[str] = None, 
title: Optional[str] = None,
x_axis_name: Optional[str] = None, 
top_axis_name: Optional[str] = None,
bottom_axis_name: Optional[str] = None, 
option_modifications: Optional[Dict] = None
```

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

This is the .csv that will be used for the example:The Method To Use

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

It must contain the following input variables:

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

Accepts the following input variables as optional:

```python
top_names: Optional[List[str]] = None, 
bottom_names: Optional[List[str]] = None,
rows_size: int = 4, 
cols_size: Optional[int] = None,
padding: Optional[str] = None, 
title: Optional[str] = None,
x_axis_name: Optional[str] = None, 
top_axis_name: Optional[str] = None,
bottom_axis_name: Optional[str] = None, 
option_modifications: Optional[Dict] = None
```

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

This is the .csv that will be used for the example:

{% file src="/files/pcmCwmQ5pxf3sxvVK9NF" %}

The following code:

```python
s.plt.top_bottom_area(
    data=pd.read_csv('Rainfall and flow.csv'), 
    order=0, x='Date',
    top_names=['flow'], bottom_names=['rainfall'],
    title='rainfall and flow', x_axis_name='Date',
    top_axis_name='flow(m³/s)', bottom_axis_name='rainfall(mm)'
)
```

<figure><img src="/files/VlxSfQvBhjy9qyfLNI9M" 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/I4Gekm0loDsnp9OhFT1w" alt=""><figcaption><p>variant="clean"</p></figcaption></figure>
{% endtab %}

{% tab title="Minimal" %}

<figure><img src="/files/6VHikOOmHHOmT6TCrsYo" 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/area-charts/top-bottom-area-charts.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.
