在init外部调用javascript infovis sunburst rotate函数
我想从画布外的菜单模拟sunburst节点的单击,以便旋转单击的节点直到其水平,这就是在画布上单击节点时发生的情况 职能:在init外部调用javascript infovis sunburst rotate函数,javascript,infovis,Javascript,Infovis,我想从画布外的菜单模拟sunburst节点的单击,以便旋转单击的节点直到其水平,这就是在画布上单击节点时发生的情况 职能: sb.rotate(node, method, opt) 看 其中node是JSON数组中“ID”的值,method是“animate”或“replot”,opt是配置对象 这是我执行时遇到的错误类型 sb.rotate("mynode", 'animate', "opt"); TypeError:node.getPos不是函数。(在 'node.getPos(opt.
sb.rotate(node, method, opt)
看
其中node是JSON数组中“ID”的值,method是“animate”或“replot”,opt是配置对象
这是我执行时遇到的错误类型
sb.rotate("mynode", 'animate', "opt");
TypeError:node.getPos不是函数。(在
'node.getPos(opt.property | |'current'),'node.getPos'未定义)
有什么建议可以让它发挥作用吗
在jsbin中,您必须使用
sb.rotate(sb.graph.getNode("Source/Core/Core.js"), animate? 'animate' :
'replot',
{
duration: 1000,
transition: $jit.Trans.Quart.easeInOut
});
请注意sb.graph.getNode(“Source/Core/Core.js”)
看 您还忘记在jsbin中发出click。使用
button.click();
(为此) 请为您遇到的问题添加一个功能完整的示例。阅读请在时间允许的情况下尽快前往jsbin+50无需着急。很乐意帮忙。:)