# Bar and Horizontal Bar Chart

## Introduction

The **Bar Chart** displays data of one or more series as bars:

![Bar Chart](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48074828967/original/ZEpzrN-NggAcDo46TvGp_FlzQDX81eYJbw.png?1607361114)

By changing the chart typ to **Horizontal Bar Chart** the chart changes to the specified type. No other changes, besides optionally changing the *Number Formatter Y-Axis* settings to the *Number Formatter X-Axis* settings and vice versa:

![Horizontal Bar Chart](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48076411383/original/r4rCyl7ppSbdk-F924-OqVsqp-UyHn0p5g.png?1608023752)

## Expected Data and Graph Designer

The Bar Chart expects data in a two (or more) column format such as:

| Date       | Revenue | Cost |
| ---------- | ------- | ---- |
| 23 January | 38      | 24   |
| 24 January | 39      | 24   |
| 25 January | 40      | 24   |
| 26 January | 40      | 24   |

In the Graph Designer you can then select the column you want to use for your x-axis (for the Horizontal Bar Chart the selected x-axis will be the y-axis):

![Graph Designer X-Axis](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48074829415/original/qu47HrdnVzEKhKYOqgdCyLuKw6Wl8umWwg.png?1607361230)

Hence, the x-axis column does not need to be the first column. However, for consistency purposes it is recommended to always use your first column for the x-axis.

For each column, besides the one used by the x-axis one bar will be displayed.


---

# 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.locoia.com/data-and-dashboards/dashboards-and-insights/charts/bar-and-horizontal-bar-chart.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.
