fix error that causes graph to be blank if there is no data in view