繁体   English   中英

Infovis JIT库

[英]Infovis JIT library

我正在使用“ JavaScript Infovis”工具包,“ SpaceTree控件”适合数据可视化的需求。

我正在使用“ jQuery”调用“ Ajax”将数据动态加载到树中。 那棵树装得很好。 但是,当我单击任何节点时,都会收到以下错误消息:

画布未定义

我从我的aspx页面调用此Javascript库:

$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
}

任何线索..

谢谢,卡尔提克

这是在https://github.com/philogb/jit/issues/34中报告的。 他们还提供了似乎可行的答案。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM