react-digraph icon indicating copy to clipboard operation
react-digraph copied to clipboard

Graphviz format suppot

Open pirate opened this issue 6 years ago • 2 comments

It would be great to add support for the Graphviz graph specification format:

Example: http://viz-js.com/

digraph G {

	subgraph cluster_0 {
		style=filled;
		color=lightgrey;
		node [style=filled,color=white];
		a0 -> a1 -> a2 -> a3;
		label = "process #1";
	}

	subgraph cluster_1 {
		node [style=filled];
		b0 -> b1 -> b2 -> b3;
		label = "process #3";
		color=blue
	}
	start -> a0;
	start -> b0;
	a1 -> b3;
	b2 -> a3;
	a3 -> a0;
	a3 -> end;
	b3 -> end;

	start [shape=Mdiamond];
	end [shape=Msquare];
}

It would likely require building a translation layer to the JSON format used by this project, or it could use an existing library. If infeasible / out-of-scope, feel free to close this.

pirate avatar Jun 25 '19 23:06 pirate

Please feel free to create a transformer that others can use under src/utilities/transformers. There are a couple examples in that folder.

ajbogh avatar Apr 16 '20 09:04 ajbogh

I would like to give it a try. It is something I might do either way for a project using this Library, so It would be good to share it with others. Any objections?

EfstathiadisD avatar Jun 24 '20 07:06 EfstathiadisD