Rings which are generated by their units: a graph theoretical approach