//topology图 的 key 一定 至少要包含有id ,label , link var data = [ [ "id" , "label" , "link" ], [ "lol" , "英雄联盟" , [ "dmhz" , "jfjh" , "hbss" ]], [ 'dmhz' , "德玛皇子" , [ "ms" , "gl" ] ], [ 'jfjh' , "亚索" , [ "wqds" , "js" , "zzzw" ] ], [ 'hbss' , "艾希" , [ "mgn" , "jj" ] ], [ 'ms' , "盲僧" , [ ] ], [ 'wqds' , "武器大师" , [ ] ], [ 'zzzw' , "潘神" , [ ] ], [ 'js' , "剑圣" , [ ] ], [ 'jj' , "剑姬" , [ ] ], [ 'mgn' , "莫甘娜" , [ ] ], [ 'gl' , "盖伦" , [ ] ] ]; var options = { type : "tree" } Chartx.topo("canvasTest" , data , options).then(function( tree ){ tree.on("nodeMouseover" , function(){ console.log( "nodeMouseover" ); }); tree.on("nodeMouseout" , function(){ console.log( "nodeMouseOut" ); }); tree.on("nodeClick" , function(e){ console.log( "nodeClick" ); }); })
topology图(tree)
联系人:@释剑