2017-03-18 5 views
0

라인 (23) 및 시그마/플러그인/sigma.neo4j.cypher/sigma.neo4j.cypher.js 24 읽기 :Sigma.js의 sigma.utils.xhr() 메소드는 어디에 있습니까?

sigma.neo4j.send = function(neo4j, endpoint, method, data, callback) { 
    var xhr = sigma.utils.xhr(), 

그러나, 시그마/SRC/유틸/sigma.utils.js가에 대한 참조를 포함하지 그 방법. 나는 최신 시그마 저장소의 클론을 사용하고있다. 어떻게이 neo4j 플러그인을 사용하여 오류 방지 않습니다

TypeError: sigma.utils.xhr is not a function 

를 '내'코드가 기본 예제입니다

sigma.neo4j.cypher(
     { url: 'xxx', user: 'demo-app', password: 'xxx' }, 
     'MATCH (n) OPTIONAL MATCH (n)-[r]->(m) RETURN n,r,m LIMIT 100', 
     { container: 'graph-container' } , 
     function(s) { 
      console.log('Number of nodes :'+ s.graph.nodes().length); 
      console.log('Number of edges :'+ s.graph.edges().length); 
     } 
); 

이 포함되어 있습니다 : 당신의 도움에 대한

<script src="sigma/src/sigma.core.js"></script> 
<script src="sigma/src/utils/sigma.utils.js"></script> 
<script src="sigma/plugins/sigma.neo4j.cypher/sigma.neo4j.cypher.js"> 

많은 감사 .

답변

0

npm install을 사용하여 모든 종속성을 설치하지 않은 것으로 보입니다. 난 그냥 복제 및 시그마를 설치하고 sigma.js/examples/load-neo4j-cypher-query.html 시도하고 잘 작동합니다.

희망이 도움이되었습니다.