A Bar Chart presents categorical data with horizontal rectangular bars representing values or proportions. They are useful for visualizing discrete categories of data.
Technical details
Description
This menu item is an R-based visualization. Though not in the name, it can also show significance results.
Data/Inputs
Can be created from a table or variables.
Chart
Refer to Visualization Options for general chart formatting options. Additionally:
Appearance
Gap between bars Specify the amount of space between bars as proportion of the available space. Values can range from 0 (no gaps) to 0.99 (bars are shown as lines).
Data Labels
Minimum threshold to show data labels Data labels will be hidden in Stacked charts for values which are smaller than this proportion of the total range.
Output
Basic Bar Chart
The simplest form of a bar chart is one that visualizes a single variable. The example below shows the proportion of males and females in a study.
Input table:
Bar chart:
Using a Crosstab or Grid table for Input
You have more options on how to display the data in a bar chart. The examples below use the following table:
Clustered Bar Chart
The Clustered Bar Chart compares the values of different categories of two or more groups, displaying grouped bars alongside each other. The example below shows the soft drink preferences of both males and females.
Stacked Bar Chart
The Stacked Bar Chart is similar to the clustered bar chart, except the bars are stacked on top of each other rather than grouped side-by-side. The example below presents the same information as the clustered bar chart above, but it stacks and color-codes the values for males and females.
100% Stacked Bar chart
A 100% Stacked Bar Chart rescales the values of each stacked bar so that they all add up to 100%, presenting the values as a proportion of the whole. The example below presents the stacked bar chart from above as a part-of-whole comparison.
Note that in the example below, the table the visualization is based on has the cell calculations set to Row %, rather than the default Column %. This lets us look at the proportions within each row, rather than each column. This option can be found in the Data/Inputs > STATISTICS > Cells dropdown.
Method
- In Displayr: How to Create a Bar Chart
- In Q: How to Create a Bar Chart in Q