only draw graph when having data