3 Tips for Making Your Line Charts KISSable
Probably you have heard the Keep It Simple Sweetie (KISS) principle stated hundreds of times – mainly because it is true. Keep your message simple and straightforward by removing any unnecessary visual clutter. Your job is to direct the viewer’s attention to what is important about the message. Nothing could be more true with a line chart.
Line charts allow you to see trends over time. They have a much more direct purpose than any other chart type. Variations of line charts include area charts and Pareto charts. This post provides some guidelines and then show you how to use SAS Visual Analytics to work your way around the issues.
First – Let’s Review the Simple Guidelines
Line charts use the X-axis for time series, such as year, month, hour, or even minute and use the Y-axis for the value to plot. There are some guidelines for producing this data visualization (datavis) type:
- Keep the intervals in order
In the following example, there is a value for each date.
- Notice that the line connects each data point
It is easier to understand the trend when the points are connected. The eye glides down the line.
- Indicate missing values.
If you did not have data for the summer of 2013 then you would want to ensure the viewer understood the data was missing. Otherwise, your chart might take a huge leap forward and the viewer would draw the wrong conclusion.
In the following example, you can see the arrival rate for consumer complaints. There is a line for each product. This datavis is showing that consumer complaints about Mortgages has decreased while Credit Reporting complaints doubled in January 2014 and kept going. The line chart makes following the trends easy and the message is clear.
Remember that KISS Principle?
Time to apply the KISS principle! According to Miller’s Law, most people can keep about 5-7 items in their working memory at once. When a chart becomes too busy or has too many lines, it is more difficult for the viewer to absorb the information. In the following chart, only 11 lines are showing but you will spend a lot more time studying it as compared to the chart above. One takeaway is that some products receive few or almost no complaints. [Takeaways are important for a datavis!]
However, if your message is “there’s only a few products with issues” then use this chart to emphasize that point. If your point is to show the growth difference in the main areas, use the chart in the previous figure.
A line chart (depending on your software) can limit what dates you can show at the bottom. I think my chart above makes the X-axis values look crowded and even if I tilted the values to the side it still calls attention to itself.
Improving Our Datavis with SAS Visual Analytics
When I review the SAS Visual Analytics functionality – I see where the tool solves several issues and even enhances my datavis. First you can add a sliding window so you can see more of the date values along the X-axis. Instead of fancy programming you just click an option in the Properties pane and there it is. The user can slide the bottom bar along to see the trends over a longer period. Like how KISSy that it?
Tip 1: Adding Filters
Earlier I was advising you to limit the categories because it doesn’t help and often only confuses the user. You can use SAS Visual Analytics to select the values you want plotted. Instead of having 10 charts plotting various products, the user can decide the values they want to compare. All you do is add the filter object and set the interactivity, which takes about 2 minutes. In the following example, the user selected 3 variables and can even use the sliding window to see the changing trends over time.
One Warning about this Technique …
The interactive chart adjusts the Y-Axis to accommodate the values. What I noticed is the user didn’t always pay attention to the Y-axis and could take away different ideas. You can see that credit cards and bank accounts keep the y-axis around 400-1500 but adding Mortgage to the mix pops the y-axis to 5,000!
It’s easy to adjust your Y-Axis in the Properties window – just set a fixed valued. In this case, since some of your data does start near the 0 point – I think it makes sense to start it at Y. Here’s a heated debate about the “0 for y-axis fundamentalist”. I like the 0 starting point but I see times where it doesn’t make sense. [I’m not much on absolutes as you can read about in my pie charts.]
Tip 2: Stop Trying to be Cool by Adding Chart Junk … please
If you read any of the Edward Tufte books, you quickly learn that he is a minimalist. He repeats often that the data should do the talking, show only the data, don’t go overboard, yadda yadda yadda. He provides multiple examples of what he calls chart junk – such as the following example. When you add the data labels to the lines it quickly changes the flavor of the chart. Notice how hard it is to see the trend when you are focused on reading the values. You make the viewer think the value has more importance than it does.
Remember this is a trend chart – it’s not about individual values it’s about how it changed over time. Use a bar chart or a table if the individual number is important.
Use this Technique Instead …
Plus – as noted in the previous figure, SAS Visual Analytics allows users to hover over the data points to see the exact value. This can be an even greater feature when you add additional data points to the pop-up window. On the Roles pane, add the values that you think enhance the individual point and the user will see it. Look how dull your data labels look now.
Tip 3: Is this also Chart Junk?
I think a lot of chart junk comes from trying to be cool. In the above example, it does seem like it’s helpful to have the values but it really just mixes up the message. You have to be careful when you are doing area charts as well. SAS Visual Analytics allows you to overlay the lines so instead of showing the parts to the whole (all complaints broken out by product) you can see how each line contributed over time – as you see in the following figure.
The problem presents itself when I got cool and added the transparency. It makes the datavis prettier but it confuses my message. The red and blue mixed together to make purple. When the red area took off on its own – it suddenly looked like there was a new category – eeek!
Stack It Sweetie!
It’s probably more kissy to just stack the values in this instance. The user can clearly see there are separate categories and maybe even surmise that almost no one complains about Money Transfers.
Never miss a BI Notes post!
Click here for free subscription. Once you subscribe you'll be asked to confirm your subscription through your email account. You email address is kept private and you can unsubscribe anytime.
Latest posts by Tricia Aanderud (see all)
- Use Network Analysis to Understand Your Customers with SAS Visual Analytics 8.2 - 2018-01-21
- My 7 Favorite Features in SAS Visual Analytics 8.2 on Viya - 2018-01-14
- Creating a Web Analytics Report in SAS Visual Analytics 8.1 - 2017-06-19
- Designing Dashboards: Sending Your Style Vibe - 2017-01-21
- SAS Visual Analytics: Design Versus Reality - 2016-10-05