ajax adding works, but not the graph updating, weird