csdot 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package csdot --version 1.0.1
NuGet\Install-Package csdot -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="csdot" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add csdot --version 1.0.1
#r "nuget: csdot, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install csdot as a Cake Addin
#addin nuget:?package=csdot&version=1.0.1

// Install csdot as a Cake Tool
#tool nuget:?package=csdot&version=1.0.1

csdot

Nuget

GitHub release (latest by date)

GitHub Workflow Status GitHub issues GitHub stars GitHub license GitHub contributors Nuget

A c# library to process Dot language used by Graphviz.

Currently it can generate DOT and dump as a file

Development occurs at GitHub, where you can report issues.

Usage:

Just import the library for your respective framework and start working!

To create a Graph:

Graph graph = new Graph("id");          // where id is the graph-ID string.

To create a node:

Node node = new Node("id");		// where id is the node-id

Each graph element has Attribute property which has all the attribute objects set. For instance Graph only has center attribute.

So to set the attribute

graph.Attribute.center.Value = true;

This will set the property and will generate the graph with this attribute.

Similarly to set node property:

node.Attribute.color.Value = Color.X11.darkviolet;

A few inbuilt classes are defined where the developer can check the available list of properties and set accordingly. Like Color in namespace namespace csdot.Attributes.DataTypes can be used.

To add an element to a graph:

graph.AddElement(node)

To create an edge, we need to add a transition. A Transition is an element of edge.

To create an edge:


Node a = new Node("a");
Node b = new Node("b");
Node c = new Node("c");

Edge edge = new Edge();

List<Transition> transition = new List<Transition>()
{
	new Transition(a, EdgeOp.directed),
	new Transition(b, EdgeOp.undirected),
	new Transition(c, EdgeOp.unspecified)
};
edge.Transition = transition;

To add it to graph:

graph.AddElement(edge)

To save to a file, you need to create a DotDocument object and call SaveToFile()

public void SaveToFile(Graph i_graph, string i_fileLocation)

Currently we do not support the following attributes:

  • bb
  • bgcolor
  • charset
  • class
  • clusterrank
  • comment
  • dir
  • diredgeconstraints
  • esep
  • fillcolor
  • fixedsize
  • head_lp
  • headport
  • layer
  • layers
  • layerselect
  • lp
  • margin
  • maxiter
  • normalize
  • orientation
  • overlap
  • pack
  • pad
  • page
  • pagedir
  • pos
  • quadtree
  • rank
  • rankdir
  • ranksep
  • ratio
  • rects
  • root
  • scale
  • sep
  • size
  • smoothing
  • splines
  • start
  • style
  • tail_lp
  • tailport
  • vertices
  • viewport
  • xlp

These will be added in the upcoming versions and well as LoadDiagraph feature.

License:

Distributed under MIT license.

Contacts:

Harsh (harshsikhwal7@gmail.com) Vibaswan (vroychowdhury@gmail.com)

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6.1

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.1 13,379 5/7/2021
2.0.0 381 4/25/2021
1.0.3 403 3/13/2021
1.0.2 298 3/9/2021
1.0.1 325 3/4/2021
1.0.0 329 3/1/2021