DotNetGraph 1.0.0

There is a newer version of this package available.
See the version list below for details.
Install-Package DotNetGraph -Version 1.0.0
dotnet add package DotNetGraph --version 1.0.0
<PackageReference Include="DotNetGraph" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotNetGraph --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DotNetGraph, 1.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install DotNetGraph as a Cake Addin
#addin nuget:?package=DotNetGraph&version=1.0.0

// Install DotNetGraph as a Cake Tool
#tool nuget:?package=DotNetGraph&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

DotNetGraph

Create DOT diagram using C# / .Net (http://bit.ly/2kJGlGB)

DotNetGraph Documentation

Create a graph (DotGraph)

var graph = new DotGraph("MyGraph");

var directedGraph = new DotGraph("MyDirectedGraph", true);

Create and add a node (DotNode)

var myNode = new DotNode("MyNode") {
    // Set all available properties
    Shape = DotNodeShape.Ellipse,
    Label = "My node !",
    FillColor = DotColor.Lightgrey,
    FontColor = DotColor.Black,
    Style = DotNodeStyle.Default,
    Height = 0.5f
};

// Add the node to the graph
graph.Add(myNode);

Create and add an arrow (DotArrow)

// Create an arrow with node names
var myArrow = new DotArrow("myNode1", "myNode2");

// Create an arrow with node objects
var myArrow = new DotArrow(myNode1, myNode2) {
    // Set all available properties
    ArrowHeadShape = DotArrowShape.Normal;
};

// Add the arrow to the graph
graph.Add(myArrow);

Compile to DOT format

// Indented version
var dot = graph.Compile();

// Minified version
var dot = graph.Compile(true);

// Save it to a file
File.WriteAllText("myFile.dot", dot);
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on DotNetGraph:

Package Downloads
DependencyTracker.DotWriter

Package Description

BBCStateMachine.GraphCompiler

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.7.0 39 1/16/2022
2.6.0 15,469 7/7/2020
2.5.0 319 6/6/2020
2.4.0 627 5/11/2020
2.3.0 605 4/27/2020
2.1.0 259 4/26/2020
2.0.2 312 3/31/2020
2.0.1 320 2/9/2020
2.0.0 344 12/23/2019
1.0.3 285 12/11/2019
1.0.2 971 3/22/2019
1.0.1 1,949 10/10/2017
1.0.0 1,031 10/9/2017

First upload