Search code examples
cytoscape.jsgraph-visualization

how to control size of arrow end points?


I'm drawing a graph with edges of varying widths. I need arrows to show the direction in these complex directional graphs. But is there a way to have the arrows be similar (or maximum) size and not purely based on the edge width?

With very fat (and short) edges, the huge arrows overwhelm the lines, see first two nodes below.

demo https://js.cytoscape.org/demos/edge-arrows/

and looked at options here but can't see anything https://js.cytoscape.org/#style/edge-arrow

to


Solution

  • You can use arrow-scale option for that purpose. You can set a different scale value for each edge depending on its width or maybe you can change arrow scale value for only problematic arrows.