creating graph on webpage