ajax graph refresh working