obtaining the data of the graph