hi i’m working on a project which needs to draw a segmented link.
and each segment has different color and pattern. and they needs to behave like a single link. so i don’t want to add any intermediate nodes to have multiple separate links.
do you guys have any ideas?
walter
April 16, 2020, 1:40am
2
If you have a reasonable limit on the maximum number of colors that a link can have, then:
I am evaluating whether I can use GoJS for my application.
I need to draw links like in the picture below.
I can see how to realize the appearance with extra nodes/links, but it would be great if this can be done using a link Geometry customization - because then there will be a 1-to-1 map between the semantics of my application and the GoJS diagram.
Is this possible in GoJS?
thanks,
A.
[06]
This example is now obsolete. Here is a MultiColoredLink class that implements support for a variable number of colors, new for v2.1.24:
Multi-color Links
The Link template in that sample will work with up to 5 colors, but you can change the template to have as many or as few colors as you need.
thank you walter, it’s working.