I'm using the mxGraph library to render some diagrams, can someone help me to position the edge labels at the bottom instead of the middle?
Thanks in advance!
I'm using the mxGraph library to render some diagrams, can someone help me to position the edge labels at the bottom instead of the middle?
Thanks in advance!
In a stylesheet for relevant edges do
<add as="verticalAlign" value="top" />
<add as="verticalLabelPosition" value="bottom" />
Or do it inline when inserting an edge
graph.insertEdge(..., 'defaultEdge;verticalAlign=top;verticalLabelPosition=bottom');
"defaultEdge" is there to keep the rest of default styles, not override them completely.
This positions label bounds on the bottom of an edge, and positions labels at the top of their bounds.