Improved chart refresh performance by minimizing the number of refreshes