By graph here I mean something resembling these images:
Its not .NET, but an often referenced toolkit for rendering graphs is AT&T Graphviz. I've only used the free-standing applications myself, but the source code is available under something resembling an open source license.
Graphviz is used by the popular code documentation tool doxygen to automatically draw various diagrams for its generated documentation.