Fix line chart time calculation bug