Skip to content

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

@YouGuessedMyName

Description

@YouGuessedMyName

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions