在 div 位置渲染细胞景观图
Rendering cytoscape graph in div position
我想将 cytoscape 图渲染到 div 位置。在文档中,我刚刚找到了如何将其呈现为 dom。
具体 div 怎么样?
您可以将其渲染到任何 DOM 元素,包括 DIV:
var cy = cytoscape({
container: document.getElementById('your-div-id-here'),
...your parameters here...
});
// or (but then getting the cy reference is more difficult)
$('#your-div-id-here').cytoscape({
...your parameters here...
});
这是工作示例:fiddle
我想将 cytoscape 图渲染到 div 位置。在文档中,我刚刚找到了如何将其呈现为 dom。
具体 div 怎么样?
您可以将其渲染到任何 DOM 元素,包括 DIV:
var cy = cytoscape({
container: document.getElementById('your-div-id-here'),
...your parameters here...
});
// or (but then getting the cy reference is more difficult)
$('#your-div-id-here').cytoscape({
...your parameters here...
});
这是工作示例:fiddle