mxGraph:如何将边标签定位在底部 [英] mxGraph: How to position edge labels a the bottom

查看:442
本文介绍了mxGraph:如何将边标签定位在底部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用mxGraph库来渲染一些图表,有人可以帮我将边缘标签放在底部而不是中间吗?



提前谢谢在



$ $ $ $ p > < add as =verticalAlignvalue =top/>
< add as =verticalLabelPositionvalue =bottom/>

或插入边缘时内联

  graph.insertEdge(...,'defaultEdge; verticalAlign = top; verticalLabelPosition = bottom'); 

defaultEdge用于保留其余的默认样式,而不是完全覆盖它们。



这会在边缘的底部定位标签边界,并将标签置于其边界的顶部。


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.

这篇关于mxGraph:如何将边标签定位在底部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆