> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alkera.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Outputs and charts

> Tables, Alkera charts, plots from your favorite library, images, Markdown, and interactive widgets.

A cell's output is whatever its last expression returns, plus anything it displays along the way.

## What renders

| Output | Examples |
| - | - |
| **Tables** | Polars and pandas dataframes, SQL results. Page, filter, sort, and copy as CSV. |
| **Alkera charts** | `alkera.chart(...)` |
| **Other charts** | Matplotlib, seaborn, Plotly, Altair, and Vega-Lite |
| **Images** | PNG, JPEG, GIF, WebP, SVG |
| **Text** | Markdown, HTML, JSON, plain text |
| **Widgets** | `alkera.ui` widgets, ipywidgets, anywidget |
| **Errors** | A traceback, with notes on what went wrong |

Everything renders without loading anything from the internet.

## Alkera charts

`alkera.chart` is a declarative chart library. Pass it a dataframe, pick a mark, and map columns to channels.

```python theme={null}
alkera.chart(weekly).line(x="week", y="revenue", color="region").title("Weekly revenue")
```

Marks include `line`, `bar`, `area`, `point`, `histogram`, `heatmap`, `pie`, and `boxplot`. Add `.tooltip()` and `.zoom()` for interaction. `alkera.chart` also accepts Altair charts and Vega-Lite specs.

Prefer another library? Matplotlib, seaborn, Plotly, and Altair figures render natively. Return the figure as the cell's last expression.

## Layout and display

The `alkera` module has helpers for richer outputs:

* `alkera.md(...)` and `alkera.html(...)` render Markdown and HTML.
* `alkera.image(...)` shows an image.
* `alkera.hstack(...)` and `alkera.vstack(...)` arrange outputs side by side or stacked.
* `alkera.callout(...)` highlights a note or warning.
* `alkera.status.progress_bar(...)` and `alkera.status.spinner(...)` show progress while a cell runs.

## Widgets

Widgets are inputs that drive [reactivity](/notebooks/reactivity). Assign a widget to a variable in one cell, read its `.value` in another, and that cell re-runs whenever the widget changes.

```python theme={null}
region = alkera.ui.dropdown(["EMEA", "AMER", "APAC"], value="AMER", label="Region")
region
```

```python theme={null}
alkera.chart(weekly.filter(pl.col("region") == region.value)).line(x="week", y="revenue")
```

Available widgets: `slider`, `number`, `text`, `text_area`, `checkbox`, `switch`, `dropdown`, `radio`, `multiselect`, `date`, `button`, and `run_button`.

ipywidgets and anywidget work too. Wrap one in `alkera.widget(...)` to make it reactive.

<Note>
  Use `alkera.ui` rather than `mo.ui`. marimo's widgets are not available in Alkera notebooks.
</Note>

## Work with an output

A cell's **⋯** menu has **Clear output**, **Collapse output**, **Open output in a new tab**, **Download image**, and **Copy cell link**.

Outputs are saved with the notebook, so they show when you reopen it or preview it in Files. A saved output from an earlier session is marked **Not run in this kernel** until you run the cell again.

## Related

<Columns cols={2}>
  <Card title="Reactivity" icon="arrows-rotate" href="/notebooks/reactivity">
    How widgets and changes flow through the notebook.
  </Card>

  <Card title="Dashboards" icon="gauge" href="/notebooks/dashboards">
    Coming soon: share outputs as an interactive dashboard.
  </Card>
</Columns>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.