代码之家  ›  专栏  ›  技术社区  ›  RV.

如何从VIS获取所有节点ID。js网络

  •  2
  • RV.  · 技术社区  · 7 年前

    我想检索已渲染vis的所有节点的ID。js网络。 我该怎么做?

    // I want to do something similar to this.
    nodeIdArray:String[]= this.network.getAllNodeIds()
    

    任何关于这一点的指示都将不胜感激。

    1 回复  |  直到 7 年前
        1
  •  4
  •   RV.    7 年前

    找到了此问题的解决方案:

    this.nodes = new DataSet(data.nodes)//Get the nodes
    this.nodes.getIds() //This gives the string array of the node Id's