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

# Bar Charts

> Here's how to enable drilldowns for bar charts

### Enable Drilldowns

The first step to setting up the drilldown is to enable it in the bar chart
itself. In the config you can enable category selection in the drilldown menu.
Select the option to turn on the drilldown.

<img src="https://mintcdn.com/explo/LLLEZyAg4kfqfGcK/images/creating-dashboards/bar-charts-1.png?fit=max&auto=format&n=LLLEZyAg4kfqfGcK&q=85&s=0240297878df63aa7abdedf19be7ae3c" alt="" width="702" height="652" data-path="images/creating-dashboards/bar-charts-1.png" />

### Variables

When drilldown is turned on for that bar chart, a variable will be created for
that chart. The underlying value will be assigned to a variable with the format
`chart_id.category` as shown below.

You can then use the new variable as you would any other variable generated from
a filter or dropdown in the SQL editor or in the filter config for individual
charts.

For more information on how to use variables, you can reference the docs
[here](/creating-dashboards/variables/using-variables).

<img src="https://mintcdn.com/explo/LLLEZyAg4kfqfGcK/images/creating-dashboards/bar-charts-2.png?fit=max&auto=format&n=LLLEZyAg4kfqfGcK&q=85&s=50fafdf08d17a5d4f0f0a0c35fcd8645" alt="" width="698" height="182" data-path="images/creating-dashboards/bar-charts-2.png" />

If the bar chart is grouped then two variables will be set once a value is
selected like below.

<img src="https://mintcdn.com/explo/LLLEZyAg4kfqfGcK/images/creating-dashboards/bar-charts-3.png?fit=max&auto=format&n=LLLEZyAg4kfqfGcK&q=85&s=04fe8cb58e234048eea4c8586ffbfb5c" alt="" width="666" height="162" data-path="images/creating-dashboards/bar-charts-3.png" />
