jmwright
jmwright

Reputation: 131

Edge Style For Tree

I would like to have edges that are straight with right angles, similar to the family tree layout mentioned here: Styling edges in Cytoscape.js for a Family Tree

I've also attached an image showing what I would like to achieve.

In the link above they mention hyperedges, and changing the curve-style to "segments". I've done that, but there are only 2 segments and they do not form a right angle. There are some attributes that can be set for the segments, but I have not figured out how to make them work. Any help would be appreciated. enter image description here

Upvotes: 0

Views: 625

Answers (1)

maxkfranz
maxkfranz

Reputation: 12242

You have to calculate the points where the lines should be bent and set the segment style properties appropriately.

If you want an alternative way of specifying bent edges, you could investigate zigzag edges: https://github.com/cytoscape/cytoscape.js/issues/882

Upvotes: 1

Related Questions