Updated poll graph to avoid setInterval call.