when to use a dotted line

When visualizing and communicating with data, one design element we can play with is line style. Most tools default to and we most often use and see solid lines. But a dotted line is another possibility. What considerations should we think about with a dotted line? When should we use one? In this post, I’ll outline my thoughts and illustrate the scenarios in which I find myself using dotted lines through examples plus will share some commentary on how to do this in your tools.

considerations with dotted lines

Dotted lines are super attention grabbing. They also convey a sense of uncertainty that can be useful. The challenge is that dotted lines introduce some visual noise. From a clutter standpoint, we’ve taken what could have been visualized as a single visual element (a line) and chopped it into a ton of pieces (many little lines, dashes, or dots). Because of this, I recommend against using the dotted line as a way to attract attention (rather use less noisy means of contrast, such as position, size, or color for this). Preserve the use of dotted lines for when there is a target or goal we are trying to hit or remain a certain side of or when there is uncertainty to depict (a forecast or prediction). In these cases, the visual differentiation and sense of uncertainty that the dotted line helps depict makes up for the additional visual noise it introduces. Let’s look at an example of each of these use cases and some dotted lines in action.

dotted line for a goal or target

I was recently working with a graph similar to the following that depicted time to fill a given type of role at a company:

Dotted Lines 1.png
 

There are three lines in the graph above: (1) the Goal—which you likely looked at first both due to position and because it’s bold black, which stands out more than the other colored lines, (2) average days to fill roles for Internal candidates (orange), and (3) average days to fill roles with External hires over time (teal). The Internal and External lines represent data that we’ve collected and summarized, whereas the Goal is something we have set and in this case we’d like to stay below. To set the Goal apart—and here I'm interested in making it less attention grabbing but still want it there for reference—we could use a dotted line. Dotted lines come in different styles, both in terms of the thickness of the line and how large or small the individual pieces are. We also have some other design elements at our disposal when it comes to the formatting of the line and the text that goes with it. Here’s an example of how I iterated to land on a combination I liked:

Dotted Lines 2.png

I prefer the final view, where the dotted line is thin and grey, effectively pushing it to the background (in spite of the noise that this line style introduces). I should probably mention that there are other styles of dotted lines as well (for example, some that combine dashes and dots)—I recommend avoiding these because they look quite messy and instead choose a style where the segments (whether dashes or dots) are consistently spaced. Here is what my final iteration looks like in the full graph:

Dotted Lines 3.png
 

I like this. The GOAL is clearly stated and still the first thing I see, but due to the formatting it feels more like reference or context, while the thicker solid lines are the clear focus of the graph. Also—and perhaps it's just me, but—there's something about this view that makes it feel easier to compare each of the individual lines (Internal and External) to the GOAL than in the original view when all of the lines were of similar thickness.

dotted line to depict uncertainty

I often see graphs where some data is actual and some is forecast and there isn’t anything done to differentiate the two, like the following example.

 

Given that we are standing in 2018, some of the data in the graph above clearly hasn’t happened yet and so must be forecast. But how much? Was this graph recently made using actual data through 2017 and forecasting thereafter? Perhaps, but we’d have to make that assumption, because nothing in the graph tells us. Or maybe there was a footnote hiding down at the bottom of the original that articulated this (there wasn't, but in case there were); I shouldn't have to read the fine print in order to know how to read the graph. Don’t make your audience question, make assumptions, or hunt for detail like this—make it clear.

One option is to use words to differentiate between actual and forecast. In the following, I added supercategories along the bottom to indicate which dates are associated with actual data and which are forecast (check out the recent post illustrating the step-by-step on how to achieve in Excel if that’s of interest). Since we're on the topic of dotted lines, I could also add a dotted line to further visually differentiate actual vs. forecast data:

Dotted Lines 5.png
 

Even better, though, if I preserve my use of the dotted line to depict the uncertainty directly for the portion of the line that represents forecast data. If I do this, I don’t need to add the additional line at all. Here’s what it could look like:

Dotted Lines 6.png

In this case, both the line style and the words on the x-axis make it quickly clear which data points represent actual data and which are forecast. I'm a big advocate of thick, bold, solid lines and data markers for actual data and thin, dotted lines (and sometimes non-filled in data markers, though I felt that looked too messy here) for forecasts and predicted data because of the way it helps us intuitively understand what we are looking at when executed well.

In the above, I’m assuming the forecast data points are important enough to label directly (in other words, that the specific numeric values are important; if that weren’t the case, you might approach this differently, perhaps only labeling the 2017 and 2022 points, or not labeling any of them and rather letting the y-axis for general magnitude be good enough). I can imagining different people making different choices here depending on both what you want the audience to focus on as well as personal aesthetic preferences. The meta-point: be thoughtful when it comes to design details in general, and your use of dotted lines in particular.

the tactical: how do I do this in my tool?

Changing the formatting of a single line from solid to dotted—like in the first example above—is possible and pretty straightforward in most tools. This is typically achieved through a menu or code to change the line style. If you aren’t sure how to do this, some smart Google searching with the name of your tool and something like “change line in graph to dotted” should point you towards a solution.

Changing just part of a line from solid to dotted is slightly more complicated, but there are a couple of solutions for that. There is the brute-force method of physically formatting each individual data point (for example if you are working in Excel, you would click once to highlight the series, then click again to highlight an individual data point, and then can format that data point or associated line individually as you would like it). As you can imagine, this can be time-consuming. Another way is to make what will appear to be a single line actually two different data series, allowing you to format them separately. In the Sales example above, I’d have a column of dates that goes from 2010 to 2022 to set my x-axis. Then my first series for the ACTUAL data would have values from 2010 to 2017. I’d have a second series for my FORECAST line that has values from 2017 to 2022 (note the overlap with 2017 having values for both ACTUAL and FORECAST to avoid a gap in the line). I imagine you could use a similar approach in other tools.

You can download the Excel file with the above examples (including both the brute force and more elegant solutions described above for the second example).

These are the two use cases in which I find myself using dotted lines and promoting their use. Are there other cases where you’d recommend using a dotted line? Or additional considerations we should have in mind when choosing line style? Leave a comment with your thoughts!

#SWDchallenge: the waterfall chart

Last month, we tried something a little less common: visualizing data in a square area graph (nearly 80 people shared their visuals!). One point of feedback raised was whether these really can be effective, or if the type of data you would depict in this way would mostly be better off in a basic bar. I think the challenge did highlight that in many cases, straightforward bars are likely superior, however I do believe there are good use cases for the square area graph as well (which I outlined in the original challenge post).

There is a bigger point to be made here, though: in these challenges, please do think about what sort of data will lend itself well to the type of visual we're practicing, and whether that visual will help serve the message you are trying to get across (if not, you may want to find some different data). This is general advice that I find myself often giving when it comes to selecting an appropriate graph: consider what you want to enable your audience to do with the data and choose a graph that will facilitate this. In these challenges, we work backwards, since I'm prescribing the type of visual I'd like you to use. So in this case, you have to consider what the visual allows you to show and then find some data where it makes sense to show it that way.

This month, let's turn back to bars, but with a twist: the waterfall chart. Waterfalls are less common, but pretty practical in the right use case. Specifically, waterfalls are great when you have a beginning quantity, additions and/or deductions, and an ending quantity. I think of them like a math problem visualized: the first bar represents the starting quantity, the middle sections are meant to be additive or deductive from the original bar, and—when taken together—they yield the value shown in the final bar. Because the middle segments aren't aligned to a common baseline, if specific comparisons of the values are important I recommend labeling those with the values directly. Many people put lines between the segments as a way to tie them visually: I don't think these are necessary, but rather personal preference if you think it makes the visual easier to read (I do show connecting lines in the example below, though if I were to remake it now, I'd be apt to remove them). 

Also, when it comes to color in waterfalls, I commonly see green for the increases and red for decreases. If you're a regular reader, you perhaps know that I'm not a fan of this color scheme for a couple of reasons. First, I believe color can be used more strategically than this (used sparingly, it's one of your best tools for drawing your audience's attention to where you want them to look). In the case of the waterfall chart, you already have the spatial separation, direction of the bar, as well as hopefully clear labeling of increases and decreases, so I don't think the redundant encoding of color is necessary. Finally—and perhaps most importantly—there are accessibility issues from a colorblindness standpoint with a red/green palette.

I see waterfalls most frequently used in finance to show variance to budget, but there are definitely other uses as well. For example, in people analytics, we'd sometimes use them to show what contributed to headcount change of a team over a given period of time. Here is a blog post where you can read more about the following example, including some tips on how to make a graph like this in Excel (I typically use a brute-force method of stacking multiple series, also check out the comments on that post for some related resources). I'm sure there are add ins or perhaps other tools that make it even easier—if you're aware of resources that others can benefit from related to waterfall charts, please leave a note in the comments.

Waterfall.png

The challenge I pose to you this month: find some data of interest that lends itself well to this view and create a waterfall chart (alternative: if you have another view for showing the type of data you'd put in a waterfall that you think is more effective, I welcome your contribution through a specific example). Share it so we can all see and learn! DEADLINE: Tuesday, 5/8 by midnight PST. You must EMAIL YOUR ENTRY to SWDchallenge@storytellingwithdata.com for inclusion in the follow-up post. Given the volume of entries we’re receiving, we are not able to scrape Twitter, LinkedIn, etc. for submissions. The way to ensure inclusion is to send them to us. Full submission instructions follow (please do follow them, it makes our manual process at least a little easier!).

SUBMISSION INSTRUCTIONS:

  • Make it. Identify your data and create your visual with the tool of your choice. If you need help finding data, check out this list of publicly available data sources. You're also welcome to use a real work example if you'd like, just please don't share anything confidential.
  • Share it. Email your entry to SWDchallenge@storytellingwithdata.com by the deadline. Attach your image as a .PNG. Put any commentary you’d like included in my follow up post in the body of the email (e.g. what tool you used, any notes on your methods or thought process you’d like to share); if there’s a social media profile or blog/site you’d like mentioned, please embed the links directly in your commentary (e.g. Blog | Twitter). If you’re going to write more than a paragraph or so, I encourage you to post it externally and provide a link or summary for inclusion. Feel free to also share on social media at any point using #SWDchallenge.
  • The fine print. I reserve the right to post and potentially reuse examples shared.

I look forward to seeing what you come up with! Stay tuned for the recap post in the second half of May.

/
CLICK HERE TO JOIN OUR MAILING LIST

SEARCH STORYTELLING WITH DATA: © 2010-2018 Cole Nussbaumer Knaflic. All rights reserved. STORYTELLING WITH DATA and the STORYTELLING WITH DATA logo are trademarks of Cole Nussbaumer Knaflic.

accessibility considerations for visuals

A question we hear frequently in our workshops is how to address color blindness when selecting colors for data visualization. Readers of storytelling with data and this blog will know that we frequently use blue to signal positive and orange for negative, which allows for accessibility for colorblind audience members who may have trouble distinguishing between red and green. It’s more common than you may realize!

This image demonstrates how color-sight deficiency renders itself. The image on the top left shows how these tomatoes appear to a person with normal vision. The rest of the images show how they appear to someone with the many different types of color blindness. 

 
different-types-color-blindness-photos-76.jpg
 

Recently, I was guest lecturing for a university audience and received a similar question, but one more broad: how can you incorporate accessibility when designing for those who are not just colorblind, but visually impaired? I set out to do some research on this topic and found out that again, it’s more common that I realized. According to the World Health Organization (WHO), 253 million people globally live with some visual impairment, which range from cataracts and glaucoma to complete blindness.

The purpose of today’s post is to share with you what we’ve found when it comes to designing communications for the visually impaired.

Importance of contrast

Using contrast of color can be a visual cue to our audience, helping them understand where to look in our visuals. If there is one thing that is really important in our visual, we should consider how creating contrast can be a signal to make that one thing very different from the rest. This becomes even more important with an audience member who may struggle to distinguish color or picking up subtleties font and background (i.e. white font on a light grey background).

 
font.PNG
 

CheckMyColours is a great tool for checking if foreground/background colors provide sufficient contrast in your visual.

Choose a heavier, bigger font

Avoid fancy fonts for the sake of being unique or pretty. Unless your organization has specific branding or stylistic guidelines, we recommend at a minimum 12 point font size for all elements of a visual: axis titles, data labels, axis labels and 20 point size for chart title. This could be increased for a visually impaired audience.

 
contrast.PNG
 

Provide narration if possible

For a visually impaired person, the option to listen to the content can overcome many visual design issues. Consider if you might have the opportunity to present to your audience live, utilizing the storytelling techniques (plot, narrative arc, tension). To hear what that sounds like, have a listen to the latest episode of the SWD podcast ("Say It Out Loud"). If presenting live is not an option, many slideware presentations (including PowerPoint) have the ability to record yourself narrating a presentation and save as a video, which can be a nice option.

Many web designers design for screen readers, which are software programs that allow a visually impaired person to read the content to them. For more reading on screen readers, check out this article.

Use a colorblind simulator

There are many sites and simulators that allow you to see what your visual looks like to a colorblind audience, such as Vischeck and Color Oracle. Google Accessibility has a Chrome extension which is a customizable color filter applied to websites to improve color perception for people who are partially color-blind. 

I used a color-blind simulator to render how “Our Corporate Dashboard” might look like to someone with one type of color deficiency (Red-Blind/Protanopia). 

 
dashboard.PNG
 

Are you aware of other tools or accessibility considerations when communicating with data? Leave a note in the comments section!


Elizabeth Ricks is a Data Visualization Designer on the Storytelling with Data team. She has a passion for helping her audience understand the ’so-what?’ as concisely as possible. Connect with Elizabeth on LinkedIn or Twitter.

/
CLICK HERE TO JOIN OUR MAILING LIST

SEARCH STORYTELLING WITH DATA: © 2010-2018 Cole Nussbaumer Knaflic. All rights reserved. STORYTELLING WITH DATA and the STORYTELLING WITH DATA logo are trademarks of Cole Nussbaumer Knaflic.

Let's celebrate #InternationalChartDay: April 26

 
International Chart Day official.jpg
 

This Thursday, April 26th is the inaugural International Chart Day, a day for the data visualization community to engage the public and educate others on how to become better consumers of data, visualization and news. We are thrilled about the focus on good data visualization and in support of this effort, we're announcing a special one-day edition of the #SWDChallenge.

How to participate

Find a visual from the media that you think is done well. On Thursday, April 26, share it on social media and include your brief thoughts on why it's effective. Include the hashtags #InternationalChartDay, #SWDChallenge, and a link to the original source. In the spirit of the day, keep the commentary positive and focus on best practices executed well and what we can learn from the visual. 

The challenge starts on Thursday April 26 at 12:01AM in your time zone and runs through 11:59PM. We'd love to see participation from our international readers, so expect to see some posts as early as Wednesday the 25th from our readers in Brisbane, Australia to Friday the 27th for our readers in Hawaii.  

That's all you need to know for the challenge. More on International Chart Day follows. We look forward to seeing the effective examples you highlight in celebration of #InternationalChartDay!  We'll be retweeting entries as they come in (no need to email us anything this time).

What is #InternationalChartDay?

Organized by the Office of U.S. Rep Mark Takano, in partnership with Tumblr and the Society for News Design, International Chart Day will be marked by Congressman Takano introducing a resolution declaring April 26 as “International Chart Day,” and deliver a speech on the House floor about the importance and history of charts. Members of Congress on both sides of the aisle will be encouraged to participate. The official website gives context into why: 

"Charts and other variations of information graphics have been around for hundreds of years, and are an important tool for making complex information easier to understand. However, not all charts are created equal: they can sometimes be too complicated or convey false and/or misleading information if not executed correctly."

 
 

Free public events on Capital Hill

If you're in the Washington D.C. area on Thursday, April 26, check out the website for a series of free public events, including presentations from thought leader Alberto Cairo and many representatives of news organizations, including The New York Times and The Washington Post. 

Even if you're not in Washington, we hope you'll join us helping educate the public on good data visualization. We look forward to seeing what you share. Happy 1st #InternationalChartDay!

/
CLICK HERE TO JOIN OUR MAILING LIST

SEARCH STORYTELLING WITH DATA: © 2010-2018 Cole Nussbaumer Knaflic. All rights reserved. STORYTELLING WITH DATA and the STORYTELLING WITH DATA logo are trademarks of Cole Nussbaumer Knaflic.