I need to make a diagram in which some connections are a different color, according to connection data. For example, I may have this as connections datasource:
[
{from: 1, to: 2, type: 1},
{from: 1, to: 3, type: 2},
{from: 2, to: 4, type: 1}
]
The resulting diagram should have connections with one stroke color (black) for the connections from 1 to 2 and 2 to 4, and a different stroke color (red) for the connections from 1 to 3 (as it is a different type).
I tried looking for something similar to `shapeDefaults.visual`, but it appears `connectionDefaults` only has this option for the content (text of the connection?), and not the stroke.
Is there a way to customize the stroke color (and preferably also dash) according to the connection data?
Thanks.