最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

reactjs - vis js network manipulation options on react - Stack Overflow

programmeradmin3浏览0评论

I am currently trying to implement vis.js Network in my React application.

I have an issue with the manipulation toolbar:

As shown in the top left corner of the image below, I have two buttons: one for adding a node and another for adding an edge. However, I couldn't find any way in the documentation to customize these buttons. Does anyone know if it's possible?

as you can see in the top left corner, i have 2 button, one to add a node and another to add an edge, i didn't find anywhere in the documentation a way to customize them , so if you have any idea it would be great ,

dditionally, when I click the "Add Edge" button, a text appears. How can I change or customize this text?

here are my option for manipulation :

      const options = {
    interaction: { hover: true },
    manipulation: { enabled: true, addEdge: true ,  addNode: true},
    nodes: {
      borderWidth: 4,
      size: 30,
      color: {
        border: "#222222",
        background: "#666666",
      },
      font: { color: "#c51717" },
    },
    edges: {
      color: "lightgray",
    },
  }
  const network = new Network(container, data, options);

Any help would be greatly appreciated! Thanks in advance.

I am currently trying to implement vis.js Network in my React application.

I have an issue with the manipulation toolbar:

As shown in the top left corner of the image below, I have two buttons: one for adding a node and another for adding an edge. However, I couldn't find any way in the documentation to customize these buttons. Does anyone know if it's possible?

as you can see in the top left corner, i have 2 button, one to add a node and another to add an edge, i didn't find anywhere in the documentation a way to customize them , so if you have any idea it would be great ,

dditionally, when I click the "Add Edge" button, a text appears. How can I change or customize this text?

here are my option for manipulation :

      const options = {
    interaction: { hover: true },
    manipulation: { enabled: true, addEdge: true ,  addNode: true},
    nodes: {
      borderWidth: 4,
      size: 30,
      color: {
        border: "#222222",
        background: "#666666",
      },
      font: { color: "#c51717" },
    },
    edges: {
      color: "lightgray",
    },
  }
  const network = new Network(container, data, options);

Any help would be greatly appreciated! Thanks in advance.

Share Improve this question asked Feb 14 at 17:34 gabriel delsetgabriel delset 131 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

alright i find out i didn't use the right library , my bad, i used "vis-network/standalone" and i need to use :react-vis-network-graph"

发布评论

评论列表(0)

  1. 暂无评论