> ## Documentation Index
> Fetch the complete documentation index at: https://lightdash-06-24-docs-simplify-date-zoom-usage-description.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Bar chart

> Use bar charts to compare things between different groups or track how a number changes over time.

<Frame>
  <img src="https://mintcdn.com/lightdash-06-24-docs-simplify-date-zoom-usage-description/sEKjy2UyAItBAfnq/images/references/chart-types/bar-chart.png?fit=max&auto=format&n=sEKjy2UyAItBAfnq&q=85&s=d9ffa036c3c400639266e977f95053a1" alt="" width="2054" height="1242" data-path="images/references/chart-types/bar-chart.png" />
</Frame>

Bar charts are helpful to:

* compare things between different groups (e.g. the number of orders you have by product type)
* track how a number changes over time if you have a *smaller number of x-axis values* (e.g. number of new users per month over a year).

Check out more details about bar chart configurations [here](/guides/configure-charts).

## Stacked bar chart

<Frame>
  <img src="https://mintcdn.com/lightdash-06-24-docs-simplify-date-zoom-usage-description/sEKjy2UyAItBAfnq/images/references/chart-types/stacked-bar-chart.png?fit=max&auto=format&n=sEKjy2UyAItBAfnq&q=85&s=e096ca48197e4535d099714f0629799c" alt="" width="2492" height="1114" data-path="images/references/chart-types/stacked-bar-chart.png" />
</Frame>

You can also stack bar charts to compare proportions across different groups.

Stacked bar charts work best when:

* ***the focus of the chart is to compare the totals and one part of the totals.*** It's hard to compare bars if they don't start at the same baseline. So, if you're trying to build a chart to compare multiple parts of your total with each other, consider keeping your bar chart unstacked!
* ***you're trying to show the parts of multiple totals***. If you only want to show parts of one total, consider an unstacked bar chart instead. If you only want to communicate one part of one total, consider if you should be using a big value chart instead.

## 100% Stacked bar chart

<Frame>
  <img src="https://mintcdn.com/lightdash-06-24-docs-simplify-date-zoom-usage-description/sEKjy2UyAItBAfnq/images/references/chart-types/hundred-stacked-bar-chart.png?fit=max&auto=format&n=sEKjy2UyAItBAfnq&q=85&s=d2220bdda3c9a01290346f4e027fe77e" alt="" width="2488" height="1098" data-path="images/references/chart-types/hundred-stacked-bar-chart.png" />
</Frame>

You can easily create 100% stacked bar charts easily by just selecting the `100%` stacking option on the chart configuration. After enabling this option, we will automatically transform the data and the axes to display a 100% stacked bar chart.

<img src="https://mintcdn.com/lightdash-06-24-docs-simplify-date-zoom-usage-description/sEKjy2UyAItBAfnq/images/references/chart-types/hundred-stacked-bar-chart-config.png?fit=max&auto=format&n=sEKjy2UyAItBAfnq&q=85&s=b46b07844594b714c929c9cf94683fb1" alt="download.png" width="2462" height="1200" data-path="images/references/chart-types/hundred-stacked-bar-chart-config.png" />

<Expandable title="how to also create 100% bar chart using table calculations">
  You can also create a 100% stacked bar chart by setting up a [table calculation for percent of group total](/guides/table-calculations/table-calculation-sql-templates/percent-of-group-pivot-total). Use your x-axis dimension as the `column_i_want_to_group_by`, then in your chart configuration choose your x-axis, group dimension, and the new table calculation as your y-axis.
</Expandable>

100% Stacked Bar Charts are useful when you need to visualize how the composition of a metric changes over time, or how the composition changes across different groups.
