GraphShape
GraphShape copied to clipboard
Customizable labels on the edges
I need a graph where I can write different information on the edges. How would it be better to go?
A similar solution would be good as AttachableEdgeLabelControl for GraphX.
Thank you in advance for all your help!
Hello @gplesz,
And sorry for the delay.
If you need some data attached to the edge then I would say it depends on the nature of data you need to attach. Of course if data are more related to your model then it means that data can be attached to the graph data structure itself. For that you may consider using a graph which edges use something like TaggedEdge<TVertex, TData>
. TData
will be the payload of the data you need to attach to your edges.
Of course TaggedEdge
is a generic implementation for which the additional data is named Tag
(can be meaningless in your scenario, it's up to you). BTW you can create your own class/struct that inherits Edge
one (or totally defined your own) that will fit your needs.
Then you will be free to use that additional data in some WPF or any GUI application with a dedicated WPF behavior stuff like that.
I hope it will help you!
Hello @KeRNeLith,
Thank you so much for your reply! I didn't know it until now, thanks for the tip, I'll look at taggedEdge type and then I'll see.