move ajax request inside of function to create highchart for div1