[英]Add an edge label with Cytoscape.js
如何使用Cytoscape.js在边缘添加标签?
Map the label
style property to a data field: 将
label
样式属性映射到数据字段:
eg in the stylesheet on init 例如在init上的样式表中
...
{
selector: 'edge',
style: {
'label': 'data(label)' // maps to data.label
}
}
...
http://cytoscape.github.com/cytoscape.js/#style/properties http://cytoscape.github.com/cytoscape.js/#style/properties
Older versions use content:
in place of label:
. 旧版本使用
content:
代替label:
。 Newer versions of 2.x allow label
and also content
for backwards compatibility. 较新版本的2.x允许
label
和content
以实现向后兼容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.