loader to wait for the dashboard ajax, calculating max values to re-arrange the axis values