bar-chart.com - The Definitive Guide to Bar Charts

bar-chart.com

The Definitive Guide
to Bar Charts

the basics

1. What is a bar chart?

A bar chart displays data by using rectangular bars of different lengths to represent different values.The bars can be displayed horizontally or vertically. A vertical bar chart is sometimes called a column chart, but often the term bar chart or bar graph is used for both orientations.The bar chart is plotted on two axes. In a vertical bar chart (column chart), the horizontal x-axis contains the category data while the y-axis contains the values. In a horizontal bar chart, the categories are plotted on the y-axis so that the bars extend horizontally according to the values on the x-axis.

bar chart variables

2. When to use a bar chart

Bar charts are a good way to compare values for data that can be divided into categories. They help you to identify differences between groups or sets of information.Bar charts require two variables for each data point.

CATEGORY VARIABLE

This provides the description to identify what each bar represents and can be text or numerical.

VALUE VARIABLE

This is the number associated with the data being compared and is used to determine the length of the bar.

EXAMPLES TO illustrate some common variable types

This example shows the results from a survey where a class of children were asked to choose their favorite color. The category variable is identifier (name) of the color chosen, the value variable is the count of children choosing that color.


Here, the category variable is a range, achieved by dividing the data into discrete, non-overlapping age categories. The value variable is the average commute time calculated for each age category.

In this example, the category variable is a time series, grouped by year. The value variable is the sum of the total profit for that year.



In this example, the category variable is formed by dividing the region data into discrete groups. The value variable shows the percentage of the total that is allocated to each group.

variations

3. Different types of bar chart

Bar charts can come in different shapes and styles depending on their purpose. Sometimes, the type of bar chart might be dictated by the data type or the message you want to convey. On other occasions, you might choose to use a certain bar chart type because it is more eye-catching or simply provides a better fit for your space or style preferences.

VERTICAL VS. HORIZONTAL BAR CHARTS

Although many people use the term ‘bar chart’ to describe both vertical and horizontal bar charts, others call refer to the vertical type as ‘column charts’.Column charts and horizontal bar charts are very similar, the only difference is their orientation. However, each type has its advantages depending on your data type and display space.

Column chart (vertical bar chart)

Column charts tend to be better for illustrating trends across a series. They are useful for showing how a value variable changes over time or across a sequence.


Horizontal bar chart

Horizontal bar charts are useful when the category labels are long or complex (they are easier to read and more space efficient when displayed horizontally).


MULTIPLE SERIES BAR CHARTS

Bar charts can also be used to display multiple properties for each data point. The category variable would remain the same as for a single series chart, but additional value variable series can be added.There are various ways to display this additional information, you will need to choose the most suitable for your data.

Grouped bar chart

Grouping the series together makes it easy for the reader to identify the individual trends and to read off the values for each bar. However, these charts can be confusing at first glance and can get cluttered if you have a lot of data points.


Stacked percentage bar chart

Stacked percentage charts are useful for comparing the proportional contribution of the individual values. This chart type should only be used for data where the value variables represent different parts of a whole. The absolute values (individual quantities) are no longer displayed although they can be included in a tooltip as in this example.


Stacked bar chart

A stacked bar chart can be useful to compare how the individual parts affect the whole picture but it is more difficult to interpret the individual trends. Care should be taken to ensure that grouping the values in this way makes sense for your data.


Dual axis bar chart

A dual axis bar chart includes a second y-axis allowing another value variable to be plotted on the same chart. This is useful for displaying and comparing variables with different units or scales. It can be difficult to interpret as the reader needs to know which axis to use for each data set, but this can be facilitated with good labeling.


OTHER BAR CHART VARIANTS

There are a wide range of other bar chart types that you might see in use. For example you can use a bar or column chart to display data ranges or negative values. Other bar chart variations include stylistic choices such as pictograms and radial bar charts.

Bar chart showing ranges

In this example, a column chart has been used to display humidity ranges. Instead of starting at zero, the column shows minimum as well as maximum values.

Bar chart with negative values

Bar and column charts can also display negative numbers. In this example, a different color is automatically applied to any negative value.

learn now

4. How to create a bar chart: options and tools

There are various options available if you want to create a bar chart. The method you choose will probably depend on what you want to use your bar chart for and how you want to display it. Typical uses include data exploration (charts to explore data and identify patterns) and data presentation (charts for publication or sharing with others).

CREATING A BAR CHART BY HAND

Although this method might seem outdated, there are still occasions where you might need to hand draw a bar chart. Most commonly, students might be required to draw bar charts by hand as this is a good way to promote learning and understanding.

You will need:

  • Paper: for best results you should use graph paper, but you can also use regular paper if you have a ruler

  • Ruler

  • Pencil (and colors if you wish to shade your bar chart)

Before you start, make sure you study your data carefully so that you can plan out your correct bar chart dimensions. Identify your largest data value and use it to work out a suitable scale and length for your value axis. Next, check how many categories you have and divide your category axis into sufficient equal proportions. Once you’ve confirmed your axes are suitable, you can draw your bars and add all necessary labels.

Advantages:

  • You can create a hand-drawn bar chart anywhere, all you need is a pencil, paper and ruler.

  • The process of drawing the chart allows you to get familiar with the data.

  • If you are in the middle of an experiment or investigation, a quick chart sketch might help you to understand your data and steer your experiment. This can be useful if you are in the field or the laboratory and don’t have computer access.

Disadvantages:

  • If you make a mistake in setting up the axes, you may have to start the drawing again.

  • It can be difficult to add data or adjust your chart later, you might need to make a new one.

  • Hand-drawn charts are not usually professional enough for publication.

CREATING A BAR CHART USING A SPREADSHEET

A common way to create a bar chart is to use a spreadsheet like Microsoft Excel or Google Sheets. These programs allow you to organize, store and explore your data through many different visualization tools.

You will need:

  • Computer, laptop or tablet (or you may even be able to use a smart phone in some cases for simpler charts)

  • Spreadsheet software such as MS Excel or Google Sheets

To get started, you need to import your data into your spreadsheet software. There are many ways to do this: you can type it in, copy and paste it from another source, or import various types of file. Once you have the data, you should ensure it is formatted appropriately for a bar chart. Typically, you will need a category column containing the labels for your individual categories and a value column containing the numerical data you wish to plot. Next, you can select the data and use the tools to insert a bar chart. Finally, you can adjust the settings and formats until you achieve the results you are looking for.

Advantages:

  • With a spreadsheet, it is easy to add or amend data once you have set up the bar chart. The program can automatically adjust the bar chart size and scale to accommodate any changes.

  • You can create professional looking bar charts suitable for sharing or publication. These charts can be useful for static publications such as printed reports and pdf documents.

  • Spreadsheets allow you to test many different chart types which help you to examine your data and find patterns.

  • Once you have set up your bar chart, you can easily replicate the style and format to product other charts.

Disadvantages:

  • The end result is a static bar chart that can only be published as an image. Unless you share the full spreadsheet file, your readers will not be able to interact with the chart.

  • If you need to amend a published image, you will need to update the chart and republish it.

CREATING A BAR CHART USING ONLINE VISUALIZATION TOOLS

If you are creating a chart for online publication, you might be wondering how you can create an interactive chart such as those used in this article. There are now numerous websites that can help you create online charts, and some even offer basic features for free.

You will need:

  • An internet-accessible device (e.g. computer, tablet, or smart phone)

Before you start, ensure you have your data in a suitable format for creating a bar chart. You should check the requirements of the website tool you are using, but typically you will be able to import your data via a spreadsheet or copy and paste. Your data should be arranged in two columns, one containing your category variable and the other containing your values. Once you’ve imported the data, follow the instructions provided to create your chart. Depending on the tool you are using you may have multiple options to format your chart and add various interactive features.

Advantages:

  • You can create an interactive bar chart that you can share or publish on your own website or blog.

  • Interactive charts are more engaging and encourage your readers to explore your data. Some tools allow you to include features like annotations, tooltips, animations and more. These can really help you to tell a story with your data.

  • With some website tools you can create responsive charts that will resize and scale automatically to fit the screen and device of the reader.

  • Some website tools include accessibility features that you can use to help ensure your chart is accessible to all users.

  • Some website tools even allow you to link your chart to a live data source, meaning it will automatically update every time your data source changes.

Disadvantages:

  • The range of features and ease of use varies across different tools. You may need to do some research to find the best tool for your needs.

  • The cost of online data visualization tools varies, although some offer free tiers that may be suitable for your needs.

getting it right

5. Designing a bar chart: best practice hints and tips

When designing a bar chart, first consider the purpose of your chart. Once you have identified the key message you want to convey, consider how you can get this across clearly. For example, you might use the title and annotations to draw attention to a trend or pattern. Alternatively, you might use color or labels to highlight a key data point, or you can adjust the order of the categories to draw attention to a specific feature.

LABEL YOUR AXES

Axes labels are important for ensuring your readers can interpret your bar chart. The user should be able to easily identify the category that each bar corresponds to and the value associated with it. Where appropriate, units should be included.

  • DON'T

It is impossible to interpret this bar chart without adequate axes labels. From the title we might guess that Option 4 gained the most responses but we don’t know what Option 4 is or whether the values refer to numbers of people or percentage or something else entirely.

  • DO

By adding some category titles we can instantly see now that most respondents were satisfied. The x-axis title also tells us that the values given are a percentage.


Make sure values can be read

Don’t be tempted to add unnecessary effects like shadows or three dimensional bars that can make it difficult to read the chart. Instead, consider using simple grid lines to help the reader compare and interpret the data.

  • DON'T

The 3-dimensional effects on this chart make it more difficult to interpret the data as it is not clear exactly how the top of the bars corresponds to the axis scale.

  • DO

Here the same data is presented on a traditional 2-dimensional chart. The gridlines make it easy to read precise values for each category.


Avoid misleading presentation

In most cases you should avoid using a non-zero baseline for your bar chart. It might be tempting to adjust the scale make the trends more visible, but the resulting chart might distort the reader’s interpretation (differences in data appear more amplified than they actually are). If you are struggling to display trends or patterns within a bar chart format, you might want to consider a different chart type instead (e.g. a line chart or scatter graph).

  • DON'T

In this bar chart, the y-axis starts at 5000 km. This has the visual effect of exaggerating the difference between the values, making it appear that the Yenisei river is considerably shorter than the others.

  • DO

When we plot the same data with the y-axis starting at zero, we see that the actual difference in lengths is much less significant.


Consider the order of categories in your bar chart

If your bar chart is showing changes over time then your category (time) axis should be ordered chronologically. However, for other types of bar chart, the order of the categories might be more flexible. Sometimes your category data might have a natural order or grouping that you want to preserve, particularly if this makes it easier for users to find a particular data point. But in some cases, it might be appropriate to arrange the bars in value order (from highest to lowest or vice versa). This option is useful when you are wanting to illustrate the ranking of the different categories and makes it easy for the reader to identify the highest and lowest values.

  • DON'T

In this example, categories are ordered alphabetically. However, this makes it quite difficult to compare sizes, especially between non-adjacent categories.

  • DO

Since the purpose of this chart is to show the sizes of the five largest deserts, it makes sense to place the categories in size order. This makes visual comparison a lot easier.


Use color carefully

Considered use of color and style can enhance your bar chart, highlighting a key message and making it aesthetically pleasing. Be careful not to overwhelm your chart with too many different colors or styles. This can make it confusing and difficult to interpret. Appropriate use of color can include using a highlight shade to draw out an important data point, or using different shades to show how categories are grouped together.

  • DON'T

The variety of shades used in this bar chart might make it more eye-catching but it distracts from the key message the chart is aiming to convey.

  • DO

In this example, a highlight color has been used to draw attention to the key message (the sales performance of a particular region compared to others).


Make your bar chart accessible

Remember that your readers may have different needs and abilities. It is good practice to ensure your bar chart is accessible to all, including those with visual impairment (e.g. color vision deficiency or screen reader users). Therefore, if you do rely heavily on color consider adding an alternative means of interpreting the chart (e.g. hatching or data labels). Remember also that different users will be using different devices so it is a good idea to ensure your chart is responsive to different screen sizes and compatible with different browsers/operating systems.

  • DON'T

This diagram shows how the colors red and green can appear to someone with protanopia (red color blindness). This particular color vision impairment affects about 1% of males.

  • DO

In this example, the shades of red and green have been adjusted to make them appear more distinct to those with protanopia. Labels can also be used as an alternative method of interpreting the graph.

alternatives

6. Recognising when not to use a bar chart

Depending on your data, a bar chart might not always be the most suitable choice. Signs that a bar chart is not right for your data include:

  • The chart appears too cluttered (you have too many categories which obscures the ability to read the values individual)

  • There is insufficient variation in the data values meaning that with a zero axis, it is difficult to see the differences in the bar lengths.

  • You have a number of different series and the chart looks too busy when you attempt to plot them all as bars or columns.

In these cases, a line chart or scatter graph might be a more appropriate choice. These chart types typically can accommodate more data points without compromising on readability.

  • DON'T

With so many different series, this bar chart becomes quite cluttered and difficult to interpret.

  • DO

By switching to a line chart, the data trends can be displayed more clearly allowing the different series to be compared.

WRAPPING IT ALL UP

7. Summary

Bar charts are a great way of displaying many types of numerical data. They are widely understood and provide a simple way of comparing different values.There are several different types of bar chart and this gives you the opportunity to get creative and produce an eye-catching data visualisation. However, if you are producing a bar chart for publication, you should be careful to design your chart with your key message in mind, ensuring your reader can easily understand and interpret your data.There are many tools available to help you create beautiful and informative charts and you are welcome to the ideas on this page as a starting point for your own creations.