我的特例之一是只有一个节点且没有边的图。
data = {"nodes":[{"id":"1.5bc716135c87e","label":"Only one node"}],"edges":[]};
var network = new vis.Network(container, data, options);
但是我得到了
jquery.js:3827 Uncaught TypeError: Cannot read property 'hasChildNodes' of null
at Canvas._create (vis.js:52844)
at new Network (vis.js:42565)
at HTMLDocument.<anonymous> (1:441)
at mightThrow (jquery.js:3534)
at process (jquery.js:3602)
应该可以创建这样的图形,否则我会丢失一些东西吗?