Harmful and wrong approach... The chart needs normal refresh for its proper execution... Instead, with help of Staticvar you can execute a section of your code once - How to run certain piece of code only once. Still hard to comment anything without seeing the code!