-
Notifications
You must be signed in to change notification settings - Fork 183
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
I tried using the set_options
method as boludo00 demonstrated. This works fine.
However when I read the edges and nodes from a DOT file the options I set afterwards with set_options
have no effect.
What you can do to replicate this:
import pyvis
graph = pyvis.network.Network()
graph.from_DOT("./example_dotfile.dot")
graph.set_options("""
var options = {
"physics": {
"enabled": false,
"stabilization": 10,
"barnesHut": {
"springLength": 200
}
}
}
""")
graph.show("test.html")
Here is an example DOT file for testing:
digraph {
a [label=12];
b [label=7];
c [label=3];
a -> b[label="solid edge"];
a -> b [label="dashed edge"];
a -> c [label="dashed edge"];
a -> c [label="dotted edge"];
}
Adding the following to the generated js will work though.
options.physics = {
enabled: false,
stabilization: 10,
barnesHut: {
springLength: 200
}
}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request