也就是从这个效果:
变成这种效果:
代码是从这样的:
let edges = new vis.DataSet([
{
from: 1,
to: 2,
label: '<b>①用户提交表单</b>'
},
{
from: 2,
to: 3,
label: '<b>②验证并提交数据</b>'
},
{
from: 3,
to: 4,
smooth: {type: 'curvedCW', roundness: 0.5},
label: '<b>③分析数据调用模块</b>'
},
{
from: 4,
to: 3,
label: '<b>④结果以Base64返回</b>'
},
{
from: 3,
to: 2,
label: '<b>⑤结果以Json形式返回</b>'
},
{
from: 2,
to: 1,
label: '<b>⑥头像返回给用户</b>'
}
]);
改成这样的:
let edges = new vis.DataSet([
{
from: 1,
to: 2,
smooth: {type: 'curvedCW', roundness: 0.5},
label: '<b>①用户提交表单</b>'
},
{
from: 2,
to: 3,
smooth: {type: 'curvedCW', roundness: 0.5},
label: '<b>②验证并提交数据</b>'
},
{
from: 3,
to: 4,
smooth: {type: 'curvedCW', roundness: 0.5},
label: '<b>③分析数据调用模块</b>'
},
{
from: 4,
to: 3,
smooth: {type: 'curvedCW', roundness: 0.5},
label: '<b>④结果以Base64返回</b>'
},
{
from: 3,
to: 2,
smooth: {type: 'curvedCW', roundness: 0.5},
label: '<b>⑤结果以Json形式返回</b>'
},
{
from: 2,
to: 1,
smooth: {type: 'curvedCW', roundness: 0.5},
label: '<b>⑥头像返回给用户</b>'
}
]);
其实就是添加好roundness和curvedCW即可。
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://it1995.blog.csdn.net/article/details/125290117
内容来源于网络,如有侵权,请联系作者删除!