Metabase offers a large number of visualization settings. For this article, we’ll be discussing the bar chart option.
With bar charts you can compare groups of data with just a glance. One axis specifies the groups, while the other will quantify their count. The goal is to show big differences between the groups, such as which price points customers buy more of and which media platforms lead new customers to you.
Through editing our bar chart’s settings, we will transform the bar chart from Figure 1 into Figure 2.
Create a bar chart
Follow along with our bar chart walkthrough using Metabase’s Sample Dataset. Select “Ask a question” in the nav bar and create a Simple question using the Sample Dataset and its Product table.
Select the green “Summarize” button in the upper right corner. Scroll down the Summarize sidebar and select the “Category” column of the Product table.
This bar chart shows that while all categories of the Products table are purchased, doohickies are purchased a lot less than the other categories.
Bar chart settings
Click on the “Settings” button at the bottom left of the graph to alter the graph and achieve your desired aesthetic.
There are many settings you can use to customize your graph:
Though the settings sidebar opens to the data page, we have already selected the columns we want to show, so let’s continue to the next option. If your dataset had more columns, you could choose to add or remove different columns here.
In the settings sidebar select the “Display” button.
The stacking feature is used to make complex bar graphs. Figure 7 uses stacking to display multiple categories inside of a small grouping.
Our example is a simple bar chart, so we don’t need the stacking feature.
You can add a goal line that specifies where you want numbers to be and Metabase can notify you when the graph raises or drops to that goal. In Figure 8 we add a goal line at 5000 and name it “Sales Goal.”
Toggling on show values places the count value above each column. The specific count value shows us precisely how close we are to achieving our goal in each category.
Clicking the color swatch at the bottom of the sidebar will open a color palette. Selecting a color swatch from the palette will change the color of the chart visualization and selecting one of the three display options will change the visualization. In Figure 8, we chose green.
Select “Axes” in the settings sidebar.
Here you can specify how you want your table organized.
Y-axis gives three options:
The linear option is selected automatically and for our example provides the most accurate representation of our data, so we’ll keep it.
With the show line and marks options you can change the the way the categories and quantities are represented on each axis. The options for the y-axis are hide and show, while the x-axis has several more:
- Rotate 45˚
- Rotate 90˚
In Figure 9, we make three changes:
- Tilt our x-axis category names on a 45˚ angle (for aesthetics).
- Hide the y-axis numbers (the value is already specified on top of each bar).
- Toggle off the auto y-axis range (to zoom in on the category count differences).
Select the “Labels” button in the settings sidebar.
Use the toggles if you don’t want certain axis labels or use the text boxes to enter the desired label for each axis.
“Number of Sales” is more descriptive than “Count,” so we change the label for the y-axis.
Learn more about your visualization options and discover drill-throughs with these articles: