moved chart drawing into function
updated drawLineGraph params