angularmxgraph

Having a edge without arrow in mxGraph


I'm in angular using mxGrpah library. I'm trynig to have two cells connected with an edge but i don't want an arrow either at the end or the start of the edge.

I've tried to make a style that makes the arrow size 0 with :

style[mxConstants.DEFAULT_MARKERSIZE] = 0;
style[mxConstants.ARROW_SIZE] = 0

i've also tried to set the SHAPE as a line :

style[mxConstants.STYLE_SHAPE] = mxConstants.SHAPE_LINE;

But nothing seems to be doing what i want which is a simple straigth line.

If you have any idea, i would love to hear it.

Thanks in advance !


Solution

  • You should use endArrow and startArrow styles

    style[mxConstants.STYLE_ENDARROW] = mxConstants.NONE;
    style[mxConstants.STYLE_STARTARROW] = mxConstants.NONE;