fixed bug when no data given to graph