fix bug with negative y values in line graph