read data from server and plot graph