Creating a bar chart

Use bar charts to display categorical data and corresponding quantities.

Tomas Larsson avatar
Written by Tomas Larsson
Updated over a week ago

Keywords: bar chart

Bar charts are useful for displaying categorical data and corresponding quantities.

Step-by-step guide

1. Add a Bar Chart workbench

To create a bar chart, click "Add workbench" and click the Bar Chart symbol. A Bar Chart workbench is now added to the workspace.

2. Specify the data to be displayed as bars

Drag the field with the data you want to display as bars, or the specific values that you want to display, to the "Display as bars" drop zone.

The data is now aggregated, using "count" as the default function. Thus, the height of bars represents the number of instances of each value across the input field.

The first 20 values are displayed, sorted numerically in descending order by default. You can switch between "numeric" and "alphabetic", and between "ascending" and "descending" sorting in the workbench header.

3. Specify aggregation function

You can change the function by dragging the desired field to the "Apply function" drop zone (on the Bar Chart element) and select the function in the drop-down menu.


โ€‹

4. Specify grouping field

To group bars, drag the field containing the groups to the "Display as groups" drop zone (on the Bar Chart element).

Example: Sum of likes by tweet type and author

In this example, we have a dataset with tweets that contains fields for the author name, text, content type, and a number of likes for each tweet.

We drag the field with author names to the "Display as bars" drop zone, which displays the top 20 authors by a number of tweets.

To let the height of the bars correspond to the sum of likes for each author, we drag the "like_count" field to the "Apply function" drop zone and select "Sum" as the function.

To group by tweet type, we drag the "content_type" field to the "Display as groups" drop zone.

We can now see the number of likes of posts of each type, by each author.

Did this answer your question?