Multiply-purposed links


#1
We wish to have a single link represent multiple links, but are not sure we have considered all options in GoDiagram which would best help us do this. Visualize a graph node representing a function call, with links representing branches on return values. Links could represent default, success, failure, timeout, or some arbitrary value. A GoLabeledLink with user-editable midlabel work well when return values and branch targets are one-to-one. However there are situations where two or more values must branch to the same node. The options we see are: Force user to draw two or more links between the same two nodes. This is less than ideal, particularly since we're using iconic nodes with a single port. Write a new labeled link or text class with a custom label editor. We are not sure how to go about this within the Go context. When a label is to assume more than one label value, add additional values via the properties grid, and show an ellipsis on the graph following the first label, with all values viewable on hover as the tooltip. Have we covered all the bases? Are there additional facilities in GoDiagram which might be used to solve this problem? Suggestions will be sincerely appreciated.

#2

I don’t see what’s “less than ideal” about using multiple links. See the StateCharter sample for an example where the user can draw multiple links from one single-port node to another one.
But having multiple designations of a single link is certainly a reasonable way to go. Do you have a small, fixed set of choices from which the user must choose? Or can they create as many as they like? Would you want to implement a multiline label, showing all the choices applicable to the link, and then have an editor for the label that has check boxes for each choice?
It’s better not to show important information in tooltips, because that makes it harder for people to understand without using the mouse, and because it prints less understandibly. I’m assuming that knowing the meaning/label text for each link is indeed important for comprehension.