# Bento box

The bento box is a way for the user to group charts together with a more fine tuned way of managing the sizes of the components. To group the charts the function `s.plt.set_bentobox` must be used, and to stop grouping the elements the user has to call the function `s.plt.pop_out_of_bentobox`. When defining the bento box the cols size and rows size can be defined which will will set the size of the bentobox in the main grid.

**Some behavior considerations:**

* The bento box has it's own grid, and this grid has a different distribution to the main grid:
  * <mark style="color:green;">**24 columns**</mark> <mark style="color:green;"></mark><mark style="color:green;">- NO gap</mark>
  * <mark style="color:green;">**Row size 16 px height**</mark> <mark style="color:green;"></mark><mark style="color:green;">- NO gap</mark>
* If components do not define the `rows_size` parameter, they will have:
  * Indicators components will have, by default, eight rows.
  * Other components will have, by default, 14 rows.
* If components do not define the `cols_size` parameter, they will have:Indicators comps will have, by default, 12 cols.
  * Other components will have, by default, 24 cols.

Example:

```python
s.plt.set_bentobox(cols_size=8, rows_size=3)

indicator_data = {
    "description": "",
    "title": "State",
    "value": "Open",
}

s.plt.indicator(
    data=indicator_data, order=0,
    rows_size=8, cols_size=12,
)

s.plt.indicator(
    data=indicator_data, order=1,
    rows_size=8, cols_size=12,
)

s.plt.bar(
    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},
    ],
    x='date', order=2, rows_size=24, cols_size=24,
)

s.plt.pop_out_of_bentobox()
```

And create stuff such as:

![Two indicators and a bar chart grouped by a bentobox](/files/PlucZDy3MDiuomiCghLc)


---

# 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/create-your-own-charts/bento-box.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.
