Enhancing Line Graphs in Tableau

Updated: Feb 4, 2019


This month I participated in Cole Knaflic's Storytelling with Data Challenge. I am currently teaching myself how to use Tableau, so I thought this challenge to create a visualization using a tool I am unfamiliar with would be a great opportunity to practice what I am learning.


I chose to use some topical data from a series of opinion polls on the current partial government shutdown. Huffington Post's Ariel Edwards-Levy has done a series of articles on these opinion polls as they have come out over the last three weeks. You can find those articles here, here, and here. I like these articles because each one uses different data visualizations to represent the polling data.


For the #SWDChallenege, I decided to recreate a graph from Edward-Levy's latest Huffington Post article on these polls and make some improvements based on data visualization best practices.


Here is the BEFORE chart from the Huffington Post article:



I then attempted to recreate a similar chart in Tableau, which proved to be harder than I expected.


A few skills I am still developing in Tableau:

  • Formatting Data I am still working on improving my understanding of the best ways to format data from a big table in Tableau. To simplify my process, I reformatted the data I was going to use in Excel, which I am much more comfortable using, and then imported it into Tableau. This took a few tries and some googling to get the formatting correct to create my chart.

  • Working with Color For this chart, I had to do some trial and error to figure out what pill to drag over the color marks card to get each line to be a different color instead of a color gradient or all lines the same color. After some unhelpful googling, I figured it out purely by accident. But this is a great accident, because I now understand this better for future charts.

  • Direct Labeling This is one step I didn't figure out during this challenge. While I think direct labeling is really important, particularly in line charts, I still haven't figured out how to direct label in Tableau. I ended up doing it manually on the dashboard in Tableau. However, I know this strategy won't work for all data sets if I want to be able to filter my data on future dashboards.


Here is my AFTER graph created in Tableau:





I chose to recreate this chart in Tableau because I saw some areas for improvement in the graph that I wanted to include in my remake in Tableau:


1. Color. The colors in the original chart are not going to be helpful to a person who is color blind. A person who is color blind has a hard time separating red from green, which would make it hard to differentiate some of the colors of the lines on the chart. I chose to use this color palette instead:



2. Direct labeling. I thought the legend in the original graph made it harder for the viewer to read. By directly labeling the lines on the chart, the viewer can quickly see how Americans are feeling about the partial government shutdown over time.


For more information on how to make your data visualizations more accessible, here is a great blog post by Amy Cesal on the SWD blog.


Overall, this was a great exercise to practice what I am learning in Tableau. Plus when I get to make another chart in Tableau, I will have a much better understanding of how to format my data and apply color to my chart. I look forward to figuring how to using direct labeling in my charts in Tableau.



© Sara DeLong