How to use curvilinear style in mxGraph

In a recent release of mxGraph, curves are added as a style for the edges. I expected this to be a routing style, but it doesn't seem to be that way. Can someone show me a small example of a graph with curved edges?

+4
source share
2 answers

This is actually a rib shape style:

style = graph.getStylesheet().getDefaultEdgeStyle(); style[mxConstants.STYLE_CURVED] = '1'; 

Sets the default value for all edges.

Style styles are actually positioning edge control points between source and target. The curve does not route (this is the positioning of the points), it is just a stylization through these points, so this is not the edge style.

+6
source

In the current version, you can use something like:

  mxGraph graph = new mxGraph(); Map<String, Object> style = graph.getStylesheet().getDefaultEdgeStyle(); style.put(mxConstants.STYLE_ROUNDED, true); style.put(mxConstants.STYLE_EDGE, mxConstants.EDGESTYLE_ENTITY_RELATION); 
+2
source

All Articles