moved $window.onresize from rootscope to GraphCtrl