Refactoring of graph
Fixed resize issue of graphs