jquery
  • javascript
  • infovis
  • 2011-07-25 7 views 1 likes 
    1

    私は "JavaScript Infovis"ツールキットを使用しています。 "SpaceTreeコントロール"は、データ視覚化の必要性に合わせて です。Infovis JITライブラリ

    "jQuery"を使用して、 "Ajax"を呼び出してデータをツリーに動的に読み込みます。 木がうまくロードされています。

    $j(document).ready(function() {    
        var aURL = 'CompanyHierarchyList.ashx?CompanyID=<%=CompanyID %>'; 
        $j.ajax({ 
         url: aURL, 
         cache: false, 
         dataType: 'json', 
         success: function(json) { 
          LoadTree(json); 
         } 
        }); 
    }); 
    
    
    var st = new $jit.ST({ 
        //id of viz container element 
        injectInto: 'infovis', 
        //set duration for the animation 
        duration: 200, 
        //set animation transition type 
        transition: $jit.Trans.Quart.easeInOut, 
        //set distance between node and its children 
        levelDistance: 50, 
        //set Orientation 
        orientation: 'top', 
    
        //..... 
        //set the other properties of node 
        //....... 
    
        st.loadJSON(json); 
        //compute node positions and layout 
        st.compute(); 
        //optional: make a translation of the tree 
        st.geom.translate(new $jit.Complex(-200, 0), "current"); 
        //emulate a click on the root node. 
        st.onClick(st.root); 
        //end 
    } 
    

    キャンバスは未定義

    私はaspxページからこのJavaScriptライブラリを呼び出しています:しかし、ときに私私は、次のエラーメッセージが表示されますノードのいずれかをクリックしてください任意の手掛かり..

    おかげで、 カルティク

    答えて

    1

    これはhttps://github.com/philogb/jit/issues/34で報告されています。 彼らはまた、うまくいくと思われる答えを提供しました。

    関連する問題