2013-12-11 105 views
0

我想添加圖形可視化到我的PHP頁面,併爲此編寫了代碼,但我不知道它爲什麼沒有顯示任何內容。任何人都可以幫我解決我的問題嗎?圖形可視化ArborJS

在此先感謝

<html> 
<head> 

<script language="javascript" type="text/javascript" src="arbor_files/jquery.js">  </script> 
<script language="javascript" type="text/javascript" src="arbor_files/arbor.js"></script> 
<script language="javascript" type="text/javascript" src="arbor_files/arbor-tween.js"></script> 
<script language="javascript" type="text/javascript" src="arbor_files/graphics.js"></script> 
<script language="javascript" type="text/javascript" src="arbor_files/renderer.js"></script> 

</head> 
<body> 

<canvas id="viewport" width="800" height="600"></canvas> 
<script language="javascript" type="text/javascript"> 
var sys = arbor.ParticleSystem(1000, 400,1); 
sys.parameters({gravity:true}); 
sys.renderer = Renderer("#viewport") ; 
var animals = sys.addNode('Animals',{'color':'red','shape':'dot','label':'Animals'}); 

var dog = sys.addNode('dog',{'color':'green','shape':'dot','label':'dog'}); 
var cat = sys.addNode('cat',{'color':'blue','shape':'dot','label':'cat'}); 

sys.addEdge(animals, dog); 
sys.addEdge(animals, cat); 

</script> 

</body> 
</html> 

回答

0

我在移植你的代碼,它加載的罰款。

Animals Graph

你可以檢查你保存的js文件的位置?