only do graph if there is data