Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't show the info from the nodes inserted by API insertNodes #40

Open
yubinCloud opened this issue Dec 3, 2020 · 5 comments
Open

Comments

@yubinCloud
Copy link

yubinCloud commented Dec 3, 2020

I use example1.html as base. When I insert nodes by api app.insertNodes throught javascript code, It show the node only but can't show the info when I click the node. What can I do to show it once I click the nodes?
For example, Can I use some api to call eventHandler when click the node as if the second argument of app.loadGson()?

@DanielLee1012
Copy link

DanielLee1012 commented Apr 27, 2021

I also have this problem,you can try to add listener by network .
image

@Sallylearning
Copy link

Sallylearning commented Jun 20, 2021

how to api app.insertNodes ?
like:

var node = {
                     "label": "Alice",
                     "value": 2,
                     "id": 1,
                     "categories": ["person"],
                     "info": ""
                        }
 app.insertNodes(node);

which didn't work
or

app.insertNodes({
                            id: node.id,
                            label: node.label,
                            value: node.value,
                            categories: node.categories,
                        });

which didn't work neither

@HC-teemo
Copy link
Collaborator

how to api app.insertNodes ?
like:

var node = {
                     "label": "Alice",
                     "value": 2,
                     "id": 1,
                     "categories": ["person"],
                     "info": ""
                        }
 app.insertNodes(node);

which didn't work
or

app.insertNodes({
                            id: node.id,
                            label: node.label,
                            value: node.value,
                            categories: node.categories,
                        });

which didn't work neither

the parameter of app.insertNodes() is a list of node.
it can be seen from the function name nodes 😄

@Sallylearning
Copy link

Sallylearning commented Jul 12, 2021

the parameter of app.insertNodes() is a list of node.

I use app.insertNodes([{ id: 'apple', label: 'name', categories: 'fruit' }]);
It didn't show in the network, and how can I add edge into it?

it can be seen from the function name nodes 😄

where can I see the function node?

@HC-teemo
Copy link
Collaborator

the parameter of app.insertNodes() is a list of node.

I use app.insertNodes([{ id: 'apple', label: 'name', categories: 'fruit' }]);
It didn't show in the network, and how can I add edge into it?

it can be seen from the function name nodes 😄

where can I see the function node?

hello, this function is available in my browser. as shown in the figure.
image

you can add edge by app.insertEdges() . you can see it in the figure too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants