danielbinder / LogiVis

A teaching aid for concepts and algorithms in logic
MIT License
2 stars 0 forks source link

Set output type of graph to svg #43

Open danielbinder opened 8 months ago

danielbinder commented 8 months ago

We want to enable the downloading of graphs, this can be simply done by setting the output type of graphviz to SVG. While you're at it, please also correct the graph size (500x250 iirc) This may destroy some information (e.g. state names on hover), so add the state names to the graph nodes themselves, even when they have a label e.g. name: label

danielbinder commented 7 months ago

Maybe this can be done by replacing the graphviz-react dependency with d3-graphviz. It depends on it anyways, but the former does not seem to be maintained actively. Both seem to be usable in the same way - see: d3-graphviz README

d3.graphviz("#graph").renderDot('digraph {a -> b}');