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

Network.show_buttons() and network.set_options() behave unexpectedly when ran on the same network. #290

Open
YouGuessedMyName opened this issue Jun 24, 2024 · 1 comment

Comments

@YouGuessedMyName
Copy link

To reproduce, run (not in a notebook).

from pyvis.network import Network
import networkx as nx

g = Network()

g.from_nx(nx.florentine_families_graph())
g.show_buttons(filter_=['nodes'])
g.set_options("""
var options = {
    "nodes": {
        "color": {
            "background": "rgba(252,39,99,1)"
        }
    }
}""")

html = g.generate_html("example2.html")
with open("example2.html", mode='w', encoding='utf-8') as fp:
        fp.write(html)

Expected behavior: The Florence family graph, with interactive node sliders/color pickers.
Actual behavior: An empty graph with no interactive node sliders/color pickers.

@YouGuessedMyName YouGuessedMyName changed the title Network.show_buttons() and network.show_options() behave unexpectedly when ran on the same network. Network.show_buttons() and network.set_options() behave unexpectedly when ran on the same network. Jun 24, 2024
@linusheck
Copy link

This might be the same issue as #81

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