Skip to Main Content

University Library, University of Illinois at Urbana-Champaign

Visualize Your Data

A guide to visualizing your data using four common types of charts.

About this page

This page discusses how to make a successful line chart, including:

Types of data for line charts

Line charts are most commonly used to show changes in quantitative variables over time. A simple line chart will include only one line. A more complex line chart may have several lines, which are all different categories that have quantitative values over the same period of time.

Making an excellent line chart

Strive for clarity: As with the other charts discussed in this guide, a descriptive title and appropriate other labels will be crucial. Since your data will be conveyed with a line, try to make this line more obvious than any other lines in your chart. Think about how you can make the axes and gridlines disappear completely or at least fade into the background compared to the line that represents your data.

Consider the interpolation: One advanced consideration is whether to use the traditional method of connecting data points by the shortest line between them, or use a different method of interpolation to generate the line. For instance, if you recorded the temperature over the course of the day, it is reasonable to use the traditional line because the temperature existed even when you didn't measure it. The common way of connecting the dots shows a likely path of the temperature between the two data points you did measure. On the other hand, if your chart shows how the world record for the high jump in track and field changed over time, it makes more sense to use a stepped interpolation. This means that the connection between each point is flat until it jumps up to meet the next point. Between any two world records, there wasn't any other possible data, and the stepped interpolation makes that clear.

Below is an example of a line chart with stepped interpolation, from a blog post at Chartable. When demonstrating the change in flight distance records over time, it makes sense to use this drawing method, because the record didn't gradually change; each time there was a new record, there was a sudden increase to that new distance.

A line chart showing the world record for longest flight between 1800 and 2000. The line uses a stepped interpolation, with the lowest value at 0 and highest at greater than 40,000 kilometers.

Above chart created by Lisa Charlotte Rost for the Chartable blog post "Climbing higher, one step at the time."

Things to avoid

Information overload: It is not recommended to put too many different lines in a line chart, as this obscures any important insights. There is no hard and fast rule, but four lines is probably a good number to stay within. If you have more than four categories of data over time, you may want to look at other ways to display this.

Skipping time: Don't use random time intervals on your chart. If you have any gaps in your data or missing values, make sure your line chart is clear about this by showing a corresponding gap in the line itself. The x-axis should always be divided into equal segments of time, regardless of the completeness of your data. If your data has a lot of missing values, a line chart simply may not be the best option.

Below is a line chart that demonstrates other things to avoid.

A line chart with two lines titled "Outlier analysis" but not telling the viewer much more in regards to the topic.

It isn't made clear from the title what exactly is being represented, so this causes confusion about everything else. The vertical orientation of the y-axis label makes it tricky to read. Changing the title to include what the y-axis entails (along with some additional necessary detail) could be a good work-around for this. Additionally, the x-axis labels are vertical, and don't have any years specified. It might have been better to simply label the beginning point of each year. We might also ask if the lower line is red because red is meaningful in this case, or if it's red simply because that was a default setting in the software. It would probably have been better to pick a different color.

Accessibility considerations

Color: One important consideration for accessibility is the use of color. There are several different types of color-blindness, which can affect how well your audience reads your chart. The most common is red-green color-blindness, which means that red and green look very similar. As much as you may want to use green to mean something positive and red to mean something negative, you should pick a different pair of colors instead. The websites ColorBrewer, Contrast-A, and Viz Palette are great tools for identifying colors that work well together and also work for color-blind audiences. You can also check your finished product against a color blindness simulator. You may also want to test how your chart looks in black and white, either by printing it out or using your chart creation tool to transform the colors to grayscale.

Text: It's also important to ensure that any text on your chart is easy to read, which is affected by both the size of the text and the choice of font. Try to avoid "pretty" fonts; it's best to use something sans serif like Ariel or Calibri. When designing your chart, try to keep all text horizontal (nobody wants to have to tilt their head to read). Make sure your chart title and any labels are descriptive and clear.

Embedding an image: If you are embedding the chart as an image in a document or online, you should also include an "alt" tag that describes what the chart shows. If you are able to share the data behind the chart, it is also recommended to provide a descriptive link to the data near the chart image.