> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/tutorials/components/timeline/create-a-horizontal-activity-timeline.md). Agents can also search and read this documentation through its [MCP server](https://docs.avonnicomponents.com/~gitbook/mcp).

# Create a horizontal activity timeline

Turn the Timeline sideways to see a customer's activities across a period at a glance, and choose how many days the visible window covers.

Before a quarterly review with Harbor Point Logistics, an account manager wants to see when things happened, not read a list: a busy week of calls, a quiet stretch, then a run of follow-ups. The horizontal **Avonni Timeline** lays the same activities on a date axis, shows a window of days at a time, and lets the user slide that window across the whole history.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FlgVpOFKUOPZHxP6C4cBa%2Ftimeline-create-a-horizontal-activity-timeline-result.png?alt=media" alt="Horizontal timeline with the account&#x27;s tasks on a date axis and a scroll bar showing the full period below" width="1000"><figcaption><p>The horizontal layout shows a window of days and the whole period underneath</p></figcaption></figure>

## Before you start

* A Screen Flow with the **Avonni Timeline** component already showing the account's Tasks. [Display Tasks](https://docs.avonnicomponents.com/flow/tutorials/components/timeline/display-tasks.md) builds it: this page only changes its layout.

## Steps

{% stepper %}
{% step %}

### Switch the Orientation to Horizontal

* Select the **Avonni Timeline** on the screen and click **Open Component Builder**.
* In the **Properties** tab, set **Orientation** to **Horizontal**.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FadmOTo0QoO3HMRJxxsJA%2Ftimeline-create-a-horizontal-activity-timeline-panel.png?alt=media" alt="Properties tab with Orientation Horizontal and Date Intervals set to 30" width="320"><figcaption><p>Date Intervals appears once Orientation is Horizontal</p></figcaption></figure>

Some settings only exist in the vertical layout and disappear: **Sorted Direction**, **Group By**, **Hide Vertical Bar**, **Highlight On Click**, **Item Icon Size** and the **Pagination** section.
{% endstep %}

{% step %}

### Set how many days are visible

* In **Date Intervals**, enter the number of days the timeline shows at once. It defaults to `15`.

Pick it from the pace of the activity. For an account with several touches a week, `15` keeps items apart. For a slower account, `30` or `60` shows a month or two in one view.
{% endstep %}

{% step %}

### Check the date each item sits on

* In **Data Mappings**, **Start Date** places each item on the axis. Keep it on the field you used in Display Tasks (for example `ActivityDate`).
* Items without a **Start Date** value have no place on the axis and do not show.
  {% endstep %}

{% step %}

### Save and test

* Click **Done**, save the flow and run it.
* When the screen opens, the window can sit on a stretch with no items, after the last one. Click a mark on the bar to bring the items into view: the window then covers the number of days set in **Date Intervals**. The bar under the timeline shows every item as a small mark across the whole period, with the visible window highlighted.
* Drag the highlighted window along the bar to move through time, or click anywhere on the bar to jump there. Hover over the window and drag one of its edges to widen or narrow it. A horizontal scroll on a trackpad moves it too.
* Hover over an item: a popover shows its title, its date and its description.
  {% endstep %}
  {% endstepper %}

{% hint style="info" %}
The date in the popover follows the **Item Date Format** setting. [Format dates on a Timeline](https://docs.avonnicomponents.com/flow/tutorials/components/timeline/customizing-date-format-in-the-timeline-component-using-luxon.md) shows the options.
{% endhint %}

## Troubleshooting

<details>

<summary>The timeline is empty, but the vertical layout showed items</summary>

The visible window covers a period with no activity. Drag the window along the bar to a stretch with marks, or raise **Date Intervals**.

</details>

<details>

<summary>Every item shows a grey default icon</summary>

On package versions before 6.33.0, the horizontal layout ignores the **Icon Name** set by the **SObject Collection to Activity Timeline Items** action, while the vertical layout shows it. Upgrade Avonni Flow Components. If you cannot upgrade yet, copy the icon into each item's avatar in the flow:

1. Create three Apex-defined variables: `ItemVar` (class `avcmpbuilder__ActivityTimelineItem`), `AvatarVar` (class `avcmpbuilder__ActivityTimelineItemAvatar`) and `FixedItems` (class `avcmpbuilder__ActivityTimelineItem`, **Allow multiple values (collection)** checked).
2. After the action, add a Loop over the action's output collection.
3. Inside the loop, add one Assignment, in this order: `ItemVar` equals the current item; `AvatarVar` > `fallbackIconName` equals the current item's `iconName`; `ItemVar` > `avatar` equals `AvatarVar`; `FixedItems` add `ItemVar`.
4. In the Timeline's **Variable** data source, select `FixedItems` instead of the action's output.

Each item keeps its own icon, including when the items come from several objects.

</details>

## Related tutorials

* [Display Tasks](https://docs.avonnicomponents.com/flow/tutorials/components/timeline/display-tasks.md): the data setup this page starts from.
* [Assigning multiple source collections to the Timeline](https://docs.avonnicomponents.com/flow/tutorials/components/timeline/assigning-multiple-source-collection-to-the-timeline.md): mix Tasks, Events and Cases on one axis.
* [Group a Timeline by month](https://docs.avonnicomponents.com/flow/tutorials/components/timeline/group-a-timeline-by-month.md): the vertical alternative, for reading the history section by section.
* [Timeline](https://docs.avonnicomponents.com/flow/flow-components/timeline.md): every setting of the component.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avonnicomponents.com/flow/tutorials/components/timeline/create-a-horizontal-activity-timeline.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
