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

# ANNOTATE

> Overlay domain events on a timeseries chart

`ANNOTATE` overlays domain events onto a timeseries chart, so a trend line carries the context of what happened when. Use `all` for every event type, or list the types you want.

```sql theme={null}
FROM sales
  SHOW total_revenue
  TIMESERIES day
  DURING last_month
  VISUALIZE total_revenue TYPE line
  ANNOTATE all
```

## Event types

| Type           | Marks                                        |
| -------------- | -------------------------------------------- |
| `anomaly`      | Unusual spikes or dips detected in the trend |
| `price_change` | Points where a price changed                 |
| `restock`      | Points where stock was replenished           |
| `stockout`     | Points where an item went out of stock       |

List the types you care about, separated by commas, to keep the chart uncluttered.

```sql theme={null}
FROM sales
  SHOW total_revenue
  TIMESERIES day
  DURING last_month
  VISUALIZE total_revenue TYPE line
  ANNOTATE restock, stockout
```

Annotations only appear on a chart driven by a [TIMESERIES](/stockfulql/syntax/timeseries), so add both a `TIMESERIES` and a [VISUALIZE](/stockfulql/syntax/visualize) line for them to show.
