fixed issue with sparse datasets and line curve

Having 3 values in a row that were equal surrounded by empty values
would produce a “moustache” like curve due to the curve thinking it was
coming up from 0 and back down to 0. Have now added in extra checking
when drawing a line graph to check for sparse data before and after a
data point to produce a more natural looking  line in these situations