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

No display of node labels if node is numeric #272

Open
biscotty666 opened this issue Feb 16, 2024 · 1 comment
Open

No display of node labels if node is numeric #272

biscotty666 opened this issue Feb 16, 2024 · 1 comment

Comments

@biscotty666
Copy link

biscotty666 commented Feb 16, 2024

The documentation says that you can do this:

net.add_node(0)
net.add_node(1)
net.add_edge(0, 1)

And the 0 and 1 will display next to the node. For me, this does not happen. It does happen if I use strings for the names of the nodes, ie.

net.add_node("0")
net.add_node("1")
net.add_edge("0", "1")

Not a big deal, really. Just not like the docs.

pyvis 0.3.2 +

IPython          : 8.20.0
ipykernel        : 6.28.0
ipywidgets       : 8.0.4
jupyter_client   : 8.6.0
jupyter_core     : 5.5.0
jupyter_server   : 2.10.0
jupyterlab       : 4.0.11
nbclient         : 0.8.0
nbconvert        : 7.10.0
nbformat         : 5.9.2
notebook         : 7.0.6
qtconsole        : 5.5.0
traitlets        : 5.7.1
@norweeg
Copy link

norweeg commented Apr 3, 2024

I'll add that colors and titles also do not work if your node ID is numeric

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

2 participants