Using a line graph

Only use lines to connect data points together if the data points are connected to one another. This typically means change over time.

For example, the price of a pear in 1996 and 1997 are related, so you can draw a line between those two data points. The price of a pear and the price of a grape are not related, so you cannot draw a line between those two data points.

Examples

Using a line graph for the number of people who go to the hospital every day is fine, because each day is related to the day before and the day after.

If you're graphing the 2014 GDP of various countries, a line graph will not work. Pakistan's GDP is not related to Chile's GDP, so you use a bar graph to keep the data points separate.

One after the other is not always change over time

It can be tricky, though! Let's say you have a collection of mass shootings, and you'd like to graph graph of how many casualties occurred in each. The shootings happened one after each other, yes, but they aren't actually connected to each other, so you can't use a line to connect them (you'd use bars instead).

If you grouped them by year and counted casualties annually, though, you could use that new data to draw a line between 2000 and 2001 and 2002 - just not if you just have a series of individual data points.

Smoothing out jagged lines

If you're graphing something over time and the lines are jumping up and down a lot, you should try resampling the data into a larger timeframe. No one can read a jagged line, and if they can they don't enjoy doing it!

For example, let's say I'm graphing the money I spend on groceries every day. Since I don't grocery shop every day, the line is going to be very very erratic - usually $0, but sometimes it will jump up to $20 or even $150. If I graphed my grocery spending on a weekly or monthly basis, though, it would even the line out.

Even though the original daily graph had more raw information, the way it was presented made the graph less informative.