# Bar graph

> Visualize a dataclip as a bar graph, with legends and time-based axes.

The Bar graph control visualizes a dataclip on a dashboard, with support for legends, data zooming, and a time-based axis.

| Mapping | Description |
| --- | --- |
| XItems | The content shown on the X axis. |
| YItems | The content shown on the Y axis: the displayed columns. |
| YMin / YMax | The upper and lower bound of the displayed data, for a dynamic view of ranged data. |

Usability of these mappings depends heavily on the fields you link to them.

## Default chart

By default, the chart shows table header values on the Y axis as columns, and the unique row values on the X axis. Multiple data points for one X-axis label are grouped into columns. Since the default X-axis labels just show each row's occurrence, they're often not very display-friendly: use an extended mapping to fix that.

## Time charts

Linking the graph using a start and end date range automatically switches it to time-chart behavior, showing time-based values on the X axis. To make actual time gaps visible as gaps, enable **Properties → Axes → Use time axis**: the displayed time labels can still be formatted when this is enabled.

## Swapped charts

In some cases you need the reverse of the default layout: the dataset's rows determine the Y-axis columns, and the individual data points come from the table headers instead.

## Events

| Event | Description |
| --- | --- |
| On update | Triggered when the graph updates its data, from an initial load or a changed linked value. |