improve graph rendering