Tweaks allow abstracting over general modifications to graph
layouts. There are several built in:
tweakSize - This tweak scales the graph so that its final size is
a specified constant size.
tweakFlip - This tweak allows flipping the graph in various ways,
so you could make a layout bottom up, or horizontal.
tweakGrid - Tweaks grid layout link points to make
pleasing links easier to render.
tweakShape - Given the current NodeSize, sets the final
control points of each link so that they end on the edge of the given
shape. For simple layouts, this should prevent needing to render links
behind nodes. In complex cases, it allows consistently rendering arrows or
other link terminal icons at the edge of a shape.
You can also implement your own tweak. There's not a reason to give an
example, as tweaks are pretty unbounded. As input you get a laidout graph,
and the dimensions of that layout. Modify the graph arbitrarily, and return
the new dimensions after tweaking the layout.
a function to tweak a graph layout
Tweaks allow abstracting over general modifications to graph layouts. There are several built in:
You can also implement your own tweak. There's not a reason to give an example, as tweaks are pretty unbounded. As input you get a laidout graph, and the dimensions of that layout. Modify the graph arbitrarily, and return the new dimensions after tweaking the layout.