clear graph if $scope.chart is set to undefined