what is a bar chart?
Adding onto the back-to-basics SWD challenge this month, we bring you a new back-to-basics blog series called what is…?, where we’ll break down some common topics and questions posed to us. We’ve covered much of the content in previous posts, so this series will allow us to bring together many disparate resources, creating a single source for your learning. We believe it’s important to take an occasional pulse on foundational knowledge, regardless of where you are in your learning journey. The success of many visualizations is dependent on a solid understanding of basic concepts. So whether you’re learning this for the first time, reading to reinforce core principles, or looking for resources to share with others—like our new comprehensive chart guide—please join us as we revisit and embrace the basics.
The first in our what is…? series will focus on a common graph—and one we love—the bar chart. In this article, we’ll explore what it is, how to interpret it, common variations, and tools to build bar charts, plus bonus tips, tricks, and real-world examples. Let’s jump in and start laying the groundwork for creating compelling visualizations in the form of bars!
What is a bar chart?
A bar chart is a common chart type for graphing categorical data or data sorted into groups. It consists of multiple rectangles aligned to a common baseline. The length of each is proportional to the value it represents—in other words, in a bar chart, the data is encoded by length. Our eyes are very good at comparing lengths when objects are aligned, making this graph easy to interpret—just one reason bar charts are common.
Our eyes start at the base and scan towards the end of each bar. We measure the lengths relative to both the baseline and the other bars, so it's a straightforward process to identify the smallest or the largest bar. We can also see the negative space between varying heights of bars to compare the incremental difference between them.
Not only are these graphs easy to read, but they are also widely recognized. Chances are, you've already encountered a standard horizontal or vertical bar chart. But bars come in many shapes and sizes. I'll list below a few of the most common variations, with links to examples.
What are common types of bar charts?
VERTICAL BAR CHARTS
Standard vertical bars (also known as column charts) are one of the most common varieties, and pretty much all tools have built-in functionality to create them. Just because they are common doesn’t mean they are boring. Read more on how basic vertical bars can be used to communicate multiple stories.
HORIZONTAL BAR CHARTS
Horizontal bars are similar to the vertical version flipped on its side. This is a great option for long category names because space on the left-hand side enables horizontally positioned text (an alternative to diagonal text on the x-axis of a vertical bar chart). Horizontal bars are comfortable to read since the structure mimics how we process information (in western cultures), where we read from left to right, starting at the top. Check out this article for a simple horizontal bar makeover.
CLUSTERED BARS
Both vertical and horizontal variations can display more than one series. Be aware that adding many data series to a bar chart can make it challenging to focus and identify key takeaways. It's also important to note that there is a natural grouping, so be mindful of the order of series within each cluster. Read more to see how clustered bars can be used to compare multiple series.
STACKED BARS
Stacked bars come in both vertical and horizontal forms. They allow you to compare the totals by scanning the ends, but also show the subcomponent pieces within each category. The challenge with stacked bars is that it's hard to compare the subcomponents across categories that aren't aligned to the same baseline. Here is a post with more examples of when stacked bars work.
100% STACKED BARS
An alternative to standard stacked bars is a 100% stacked bar chart (horizontal variation shown at left), where the relative percentages are displayed rather than the absolute values. The benefit of this version is it gives you two consistent baselines for comparison: one on the left and another on the right. Read more to see why this can be a great way to visualize survey data.
WATERFALL CHART
The waterfall chart is a more advanced variation of a bar chart that isn’t as widely used. This chart can sometimes be useful to visualize change, where the first bar represents a starting value, and the last bar shows the ending quantity. The smaller bars in between illustrate the incremental change to go from start to finish. Learn how to create a waterfall chart in Excel.
What tools make bar charts?
Most visualization and analytical tools have built-in functionality to easily create standard bar charts. Below are a few common ones and source links to get you started.
For more tool-specific bar chart examples, check out Exercise 2.2 from Let’s Practice! The solution features the same vertical bar chart created in a number of different tools: Excel, Datawrapper, Flourish, Google Data Studio, PowerBI, R, Python, and Tableau.
What are tips for designing bar charts?
Here are a few formatting steps to consider when designing bar charts.
Adjust the gap between bars. There is no specific rule here, but generally speaking, the gap should be thinner than the width of the bars. In Excel, I’ll typically choose a gap width percentage between 30%-40%. The goal is to strike a healthy balance: you don’t want to have too much white-space so that the data isn’t prominent, but you also don’t want the bars so close together that they appear as a single shape rather than distinct elements. Use good judgment here! (An exception to this would be if you are creating a histogram, which is a similar but different chart type for showing a dataset’s underlying distribution. Learn more about the differences between histograms and bar charts.)
Intentionally order bars. Be thoughtful about the order of the bars and how the reader will interpret them. If there is an inherent ordering in your data—for example ordinal categories, like age ranges or a Likert scale—consider making use of this natural order. If this isn’t the case, consider arranging the bars based on the data, for example from largest to smallest, or smallest to largest, depending on what you are trying to convey.
Consider a legend. I often find myself monkeying around with bar chart labels more so than other chart types—especially when I’m not using an axis to label categories. Bar charts don’t typically have a ton of whitespace, so to prevent clutter, I prefer to label the category name within a bar. This is sometimes hard to do with vertical or stacked bars, where horizontal space is limited. For this reason, it’s not uncommon that I add a legend to a bar chart if I can’t fit the label inside the bar or directly to the side in a visually appealing way. When I use a legend, I like to position it beneath the title, so that the reader encounters how to read the chart before coming across the data. In the below visual, you can see how I’d typically label series in a horizontal vs. vertical bar chart.
Move direct data labels inside bars. Bars can feel very heavy and take up a lot of ink. If labeling the values of each bar directly, consider moving data labels inside the ends of the bars to prevent clutter. This minor change in position can trick our eyes into thinking there is less while preserving the same amount of detail.
Use a zero-baseline. This is an important rule to follow. Because data is encoded by length, the entire bar range needs to be present; otherwise, our relative measurement will be inaccurate. If you need to alter the baseline to communicate smaller differences, chances are there's an alternative chart type that is better suited for your needs. Still not convinced? Read more to see an example and a little math on why this is key.
Where can I see more bar chart examples?
100% stacked bar makeover: show the full picture
Another 100% stacked bar makeover: declutter! (and question default settings)
Horizontal bar makeover: US prison population revisualized
Small improvements to a bar chart: power-pairing of color and words
Alternatives to bars: novel verse the boring old bar chart
Another bar chart variation: bullet graphs
For hundreds of additional bar chart examples, check out our SWD challenges featuring bars: basic bars, bars and lines, waterfall charts. This month you can practice creating bar charts as part of the SWD challenge in the community, or browse submissions for inspiration when you create your next bar chart!
If you’d like assistance explaining bar charts to kids, Daphne the data-drawing dragon can help!
You can continue your journey through our full what is…? chart series, by browsing other common visuals like lines and pies, or explore our comprehensive chart guide page for additional chart types.