Understanding Bar Charts and Variations
Understanding Bar Charts and Variations
Feb 19
Written By Alex Velez
In this article, we’ll explore the bar chart: 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!
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?
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.
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.
Excel
Datawrapper
Flourish
Tableau
PowerBI
PowerPoint
Data studio
Infogram
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.
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.
This article is part of our 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 allows 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.
Line graphs (or line charts) are best when you want to show how the value
of something changes over time, or compare how several things change
over time relative to each other. Whenever you hear that key phrase “over
time,” that’s your clue to consider using a line graph for your data.
Line graphs are common and effective charts because they are simple, easy
to understand, and efficient. Line charts are great for:
On the other hand, they are not necessarily your best choice for:
In this post, we’ll talk about how a line graph works, and how to build one
that provides meaningful information and context to your audience.
Then, we’ll answer some commonly asked questions about line graphs:
In future articles, we’ll go into more detail about some special variants of line
graphs, like the slopegraph and the area graph.
How does a line graph work?
Think of the lines on a line graph as little histories.
While some line graphs do not use continuous data on the x-axis (particularly
slopegraphs and parallel coordinates diagrams, which are specialized
variants of line graphs), what we absolutely can’t use on our x-axis is data
that doesn’t have any meaningful relationship among the categories shown.
Let’s say we have a list of the first six months of 2020: January,
February, March, April, May, June. It would feel wrong to list them in any
other order, because they are continuous and have an intrinsic order. January
2020 leads to February 2020, which leads to March 2020, and so on.
Let’s also say we have a list of types of produce: apples, pears, limes,
lemons, dates, grapes. Unlike our list of months, one kind of produce doesn’t
necessarily lead to the next. We could order them alphabetically, by size, by
color, or randomly, and it wouldn’t feel unusual, because they have no
intrinsic order, and are not continuous—they are categorical.
DO: Show a line of sales by month.
This graph above shows five years’ worth of data for annual diabetes rates of
patients at our local medical center, Anytown Medical, as well as the rates
for 12 other centers in our region. Since what we are likely to care about the
most is our own center (particularly because our rates are low), we are using
color, weight, and labeling to bring focus to Anytown and to the regional
average, while also including the values for all other centers.
Line graphs, therefore, are not required to have a zero baseline; but in
most cases, it is still advisable. It is less confusing to an audience if the y-
axis starts at zero, since that is the normal expectation when seeing a chart
for the first time. There should be compelling reasons to subvert those
expectations.
Here are some specific cases for which a zero baseline might not be
optimal:
If our y-axis went all the way down to zero, these meaningful fluctuations
would be impossible to perceive.
From there, you can modify your axis range, and the position of the line or
lines plotted on the graph, to suit your specific needs. The relative slopes of
your lines won’t change, so do your best to select an axis range that lets you
have round numbers for your axis labels, a reasonable amount of white
space in the chart to include data labels and annotations, and is wide enough
(if necessary) to show reference lines, like goals or projected values, that
might be bigger or smaller than your smallest or largest measured value.
In every case, it’s important to be reasonable and thoughtful in how you
present the data, in order for your audience to understand your message
clearly.
Now that we’ve talked about all these different elements of line graphs, the
next step is to make some of your own, using whatever tool or tools you
prefer. The storytelling with data community would be a great place to start!
Try any or all of these quick exercises:
color + words
alternatives to pies
declutter
You could also look back on some of our prior #SWDchallenges, like this one
about annotated line graphs, to see what some of your fellow communication
enthusiasts have created.
Or, continue your journey through our full what is…? chart series, by
browsing other common visuals like bars and pies, or explore our
comprehensive chart guide page for additional chart types.
what is a pie chart?
May 14
Written By Elizabeth Ricks
This article is part of our 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
allows 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.
Pie charts are one of the most common types of data visualizations.
They are also one of the most widely condemned and misused. The
good news is they do have a proper use case and it’s easy to use them
appropriately.
Here’s a brief overview of how we consume a pie. Each pie slice has
three visual components: its central angle, area, and arc length. Recent
research by Robert Kosara and Drew Skau demonstrated that we read
pie charts by area—or possibly in combination with arc length—which
debunked some previously held beliefs that pies are read by angle. You
can read more about their research in an illustrated tour of the pie
chart study results.
Pie charts are probably better than any other visual for expressing a
part-to-whole relationship. When you hear “percent of…” or “part of…”
that’s one indication a pie chart could meet your needs.
Our sales example supports the first use case. Suppose we want to
focus on how much revenue a given product—or set of products—
contributes to the total. Given our natural construct of how we read a
clock, it’s fairly easy to tell that Product A makes up roughly a quarter
of total revenue and that Products A, B, and C combined are roughly
two-thirds of total revenue. For these general part-to-whole
relationships, a pie chart could effectively convey that information.
The two pie charts below are examples of the second use case. With
each of these, I can easily make one broad conclusion—one slice of the
pie is relatively larger or smaller than the others.
For applications with different datasets, check out Lisa Charlotte Rost’s
examples in what to consider when creating pie charts.
Generally speaking, pies should not be used for evaluating the relative
sizes of categories, comparing data across pies, and visualizing
percentages that do not sum to 100%. Let’s look at an example of
each.
Let’s say the primary comparison you want to highlight is how Tier B
varies across the two breakdowns. Tier B is in different places across
the pies—as a direct result of the variation between the two datasets.
Because of this spatial separation, different positioning within the pie,
and the irregular shapes of the segments, it’s hard to accurately judge
the difference in magnitude.
When using pie charts, here are a few quick design tips to make them
more effective.
Sort your data meaningfully. Check out the two pies below. On the
left, the data is sorted alphabetically (beginning with apples at zero
degrees). The right pie is sorted in descending order starting with the
largest category (pineapple). This takes into account our natural
construct of reading around a circle.
Eliminate the legend and label the data directly. Check out the
difference in the following graphs. Labeling directly, as shown on the
right, reduces the task of going back and forth between the legend and
the data. Whenever possible, aim to label your slices directly with the
value so long as there’s sufficient space to make the labels legible.
Now that we’ve taken a tour through the ins and outs of pie charts, be sure
to continue your journey through the rest of our “what is...?” chart series,
by browsing other common visuals like bars and lines, or explore our
comprehensive chart guide page for additional chart types.
what is a scatterplot?
May 27
Written By Alex Velez
This article is part of our 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
allows 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.
You might consider showing the relationship between male and female
rating scores using a scatterplot, like the one below.
Here are a couple of things worth noting about the above chart.
It’s exploratory in nature. A scatterplot was likely used to
uncover this finding. Many statistical software packages output
scatterplots to test the correlation between two variables.
Although the graph used in the discovery phase is not always
ideal for communicating final insights, it works in this case. I can
see both sets of rankings simultaneously and also emphasize the
hole in the market. I’ve categorized and labeled the points to
make this graph legible, but an alternative chart—one that is
more familiar—could work as well (check out this post to see
three alternatives for comparing metrics). It all depends on your
audience and specific scenario.
Be mindful of the variable placement on the axes. In this
example, it doesn’t matter which variable is along the horizontal
or vertical axis, but that won’t always be the case. Sometimes
you’ll have both an independent and a dependent variable. An
independent variable is exactly what its name implies: it’s not
affected by the other variable. A dependent variable is likely the
thing you are trying to measure, meaning it is affected by your
independent variable. It’s common practice to place the
independent metric along the horizontal or x-axis and the
dependent variable along the y-axis. It’s not wrong to invert
these, but it might be unexpected causing an initial bit of
confusion.
Scatterplots show dots, not lines. Scatterplots are very
similar to line charts in that they both display two numerical
values; however, scatterplots tend to focus on individual data
points (depicted with a dot) rather than aggregating multiple
points into one distinct line.
The bulk of this post is dedicated to how you can use scatterplots for
explanatory purposes despite them being a more technical graph type.
As mentioned before, if you do use a scatterplot, be aware that you
may need to break it down for your audience, and if it's their first time
looking at one of these charts, you may need to explain how to read it.
I'll step you through the process I take when examining scatterplots as
well as link to additional resources.
1. Check the axes. One of the first things I do when reading any
graph is to scan each axis. It's especially important when reading
scatterplots as they contain multiple variables, so it's necessary
to determine which variable is along which axis. I should also
mention that not all scatterplots will display similar variables;
some might compare different metrics with varying units of
measure and scale. Understanding this early on will make it
easier to interpret the relationship once you start looking at the
data.
2. Visualize sections. In the above example, I created sections by
grouping the points into quadrants. This is helpful not only for
communicating the finding in the lip care scenario but also for
uncovering it. The next time you look at a scatterplot, ask
yourself what lines you can draw or what natural breaks and
groupings exist that will help you make sense of the comparison.
3. Identify the shape. I often take a step back from the graph, so I
can attempt to summarize the individual points into a unified
shape. Are they all moving in a single linear direction? Or maybe
it's more of an exponential curve? Do the points increase as my
eyes move along the axis? Having a description in mind helps me
uncover and explain the relationship. For instance, in this cost per
mile example, we can see that the data points form a u-shape.
This means that the cost is relatively high for both shorter and
longer uses, but as we drive an average amount, the cost is more
manageable. Keep in mind that there may not be a discernible
shape, which is a perfectly valid finding (and suggests a weak or
non-existent relationship between the variables).
I'd be remiss to not share any warnings at this point. I can still hear my
stat professors drilling this mantra into my head, "correlation does not
imply causation." Just because you uncover a relationship doesn't
mean you've identified the underlying cause. For instance, in the lip
care example, we found that brands preferred amongst men are less
preferred amongst women. Does this mean that if a male likes a brand,
a female won't? Absolutely not, or there wouldn't be an opportunity to
create a bridge product. We can use findings to inform and make
educated decisions, but to generalize the insight would be a misuse of
data. This applies to other chart types as well, however I find that
scatterplots are more susceptible to misreadings. I think it's because
they focus on the relationship, making it easy to both speculate and
extrapolate. (For more data pitfalls check out our review of Ben Jones’
latest book, Avoiding Data Pitfalls.)
Bubble charts: Let’s imagine the lip care example includes another
dimension (such as packaging type, price, the active ingredient, etc.).
We can encode this third variable by altering the size, color, or even
the shape of the data points. This is a bubble chart. Bubble charts are
useful for showing multi-dimensional relationships, but this comes at a
cost since they are tough to read. Once we change the size of the
circles, we start encoding information by area. Our eyes are not very
good at measuring area, so specific comparisons are harder to make. I
should also mention that many graphing applications don’t offer
canned bubble chart templates. This means someone has to calculate
the correct area of each circle, which can introduce human error. Also,
as we play with color and shapes, we ask our audiences to do a lot of
mental work to process the information. People can typically only hold
about four pieces of visual information in their short term memory at
any given time, so be mindful of the cognitive effort placed on the
reader! That said, there are fantastic examples of explanatory bubble
charts, like Hans Roslin’s famous BBC video. What makes Hans'
explanation so effective is his willingness and enthusiasm to step his
audience through his animated bubble chart. If you are considering a
bubble chart—or any multi-dimensional graph for that matter—
consider your audience and how much effort you want to spend
explaining how to read your graph.
Now that we’ve taken a tour through the ins and outs of scatterplots,
make sure to continue your journey through the rest of the “what
is...?” chart series, by browsing other common visuals like bars and
pies, or explore our comprehensive chart guide page for additional
chart types.
Gantt charts are particularly useful during the project planning phase,
as the detailed visual schedules help managers identify when or where
there might be bottlenecks or a need for additional resources. Project
managers and teams often refer to Gantt diagrams throughout the
project lifecycle to monitor and control progress and assess risks.
Gantt-style charts can be used for more than just project scheduling.
The combination Gantt and line chart below was used to show how the
evolution of an eLearning system affected employee satisfaction over
time. The Gantt elements denoted the timing of certain events (when a
survey was deployed when a tagging initiative began, and when
courses were split), while the line chart revealed the concurrent
positive impact these events had on employee sentiment.
SOURCE: [Link]
velez/gallery/5101035f-d3df-431e-bcdb-ddda87f83c6b/images
Although commonly shown horizontally, a Gantt chart can also be
flipped vertically. In the example below, SWD Community member
Chris Smith used a vertical Gantt-style visual resume to show their
professional experience over time. Since, in the Western world, time is
most naturally read moving from left to right, take care when switching
the orientation, as it can feel uncomfortable or require a bit of mental
gymnastics to understand.
SOURCE: [Link]
2021/inspired-by-coles-book-acknowledgement-section
While project teams often use Gantt charts, not everyone understands
how to interpret them accurately or quickly. Consider your audience's
background and potential learning curve when selecting this
visualization. Choosing a different display altogether may avoid
confusion for audiences who do not know this graph or how to interpret
the information it depicts.
Final thoughts