I want to display a loader till my chart is displayed.I have implemented the following code but it doesn\'t work.The loader should display as soon as "compare" but