Harish Iyer
Harish Iyer

Reputation: 23

How do i give curvature to edges in cytoscape.js?

I think there is a curvature attribute given to the edges. or should it be given in cytoscape.stylesheet

Upvotes: 2

Views: 4970

Answers (1)

maxkfranz
maxkfranz

Reputation: 12242

You use the stylesheet. Relevant properties: http://js.cytoscape.org/#style/edge-line

Specific properties of interest include the control point properties:

  • curve-style: bezier for bundled (spaced) curved edges; curve-style: unbundled-bezier for complete manual control
  • control-point-step-size : for bundled bezier spacing
  • control-point-distance : manual spacing
  • control-point-weight : to pull the control point more towards the source or target

Upvotes: 2

Related Questions