---
title: <span class="badge object-type-class"></span> RowPanel
---
# <span class="badge object-type-class"></span> RowPanel

Row panel

## Definition

```python
class RowPanel:
    """
    Row panel
    """

    # The panel type
    type_val: typing.Literal["row"]
    # Whether this row should be collapsed or not.
    collapsed: bool
    # Row title
    title: typing.Optional[str]
    # Name of default datasource for the row
    datasource: typing.Optional[dashboard.DataSourceRef]
    # Row grid position
    grid_pos: typing.Optional[dashboard.GridPos]
    # Unique identifier of the panel. Generated by Grafana when creating a new panel. It must be unique within a dashboard, but not globally.
    id_val: int
    # List of panels in the row
    panels: list[dashboard.Panel]
    # Name of template variable to repeat for.
    repeat: typing.Optional[str]
```
## Methods

### <span class="badge object-method"></span> to_json

Converts this object into a representation that can easily be encoded to JSON.

```python
def to_json() -> dict[str, object]
```

### <span class="badge object-method"></span> from_json

Builds this object from a JSON-decoded dict.

```python
@classmethod
def from_json(data: dict[str, typing.Any]) -> typing.Self
```

## See also

 * <span class="badge builder"></span> [Row](./builder-Row.md)
