js:
$(document).ready(function(){
//折线 DEMO
//$("#1").insertBrokenLine({target : $("#0"), options:{arrows:'single'}});
$("#1").insertBrokenLine({target : $("#2"), options:{arrows:'single'}});
//$("#1").insertBrokenLine({target : $("#3"), options:{arrows:'double', attr:{color:'red'}},isSuperstratum : true});
//$("#1").insertBrokenLine({target : $("#4"), options:{arrows:'single', reverse: true,attr:{color:'red'}}, isSuperstratum : true});
//$("#1").insertBrokenLine({target : $("#5")});
//直线 demo
//$("#1").insertEdge({target : $("#0")});
//$("#1").insertEdge({target : $("#0"), options:{arrows:'single'}});
$("#1").insertEdge({target : $("#0"), options:{arrows:'double'}});
});
html:
<div id="container" style="width:640px; height:400px; position:relative;background-color:rgb(255,255,255);overflow: auto;">
<div id="0" style="width:100px;height:50px;border:1px solid red;position: absolute;top:0px;left:100px;">0</div>
<div id="1" style="width:100px;height:50px;border:1px solid red;position: absolute;top:80px;left:200px;">1</div>
<div id="2" style="width:100px;height:50px;border:1px solid red;position: absolute;top:200px;left:0px;">2</div>
<div id="3" style="width:100px;height:50px;border:1px solid red;position: absolute;top:200px;left:400px;">3</div>
<div id="4" style="width:100px;height:50px;border:1px solid red;position: absolute;top:400px;left:800px;">4</div>
<div id="5" style="width:100px;height:50px;border:1px solid red;position: absolute;top:400px;left:1000px;">4</div>
</div>