magjac / d3-graphviz

Graphviz DOT rendering and animated transitions using D3
BSD 3-Clause "New" or "Revised" License
1.67k stars 103 forks source link

An edge being drawn looks awkward for non-normal edges #307

Open magjac opened 5 months ago

magjac commented 5 months ago

The implementation assumes an edge with dir=forward, arrowhead=normal (explicit or implicit as for directed graphs) and arrowtail=none. If this is not the case, the edge shown during drawing with drawEdge and updateDrawnEdge might look awkward.

Once inserted with insertDrawnEdge the edge will have the specified attributes and look as specified.

Example

DOT source

digraph {
    a
    b
}

JavaScript attributes

attributes = {
  dir: 'both',
  arrowhead: 'dot',
  arrowtail: 'diamond',
}

Graph during drawing the edge

Untitled Graph 12