From 99d13fa169c2722d1a443b1b72409518306cd02a Mon Sep 17 00:00:00 2001 From: Johannes Bier Date: Tue, 12 Apr 2022 23:30:04 +0200 Subject: [PATCH 1/6] Update vis-network to latest --- pyvis/templates/template.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyvis/templates/template.html b/pyvis/templates/template.html index 9d8b0e7..3198a6b 100644 --- a/pyvis/templates/template.html +++ b/pyvis/templates/template.html @@ -1,7 +1,7 @@ - - + +

{{heading}}

From 4329022e495e71d4f9c78a5789513b299a98ce66 Mon Sep 17 00:00:00 2001 From: Johannes Bier Date: Tue, 12 Apr 2022 23:44:21 +0200 Subject: [PATCH 2/6] Fix https://github.com/WestHealth/pyvis/issues/128 --- pyvis/templates/template.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pyvis/templates/template.html b/pyvis/templates/template.html index 3198a6b..0e1bdb0 100644 --- a/pyvis/templates/template.html +++ b/pyvis/templates/template.html @@ -155,17 +155,17 @@

{{heading}}

{% if use_DOT %} var DOTstring = "{{dot_lang|safe}}"; - var parsedData = vis.network.convertDot(DOTstring); - - data = { - nodes: parsedData.nodes, - edges: parsedData.edges - } - - var options = parsedData.options; - options.nodes = { - shape: "dot" - } + data = vis.network.dotparser.DOTToGraph(DOTstring); + + var options = data.options; + options = Object.assign(options, { + nodes: { + shape: "dot" + }, + }); + {% if options %} + options = Object.assign(options, {{options|safe}}) + {% endif %} {% else %} From 0a093d30f7141250f86f012b064eda29101d9b12 Mon Sep 17 00:00:00 2001 From: Johannes Bier Date: Wed, 13 Apr 2022 00:00:48 +0200 Subject: [PATCH 3/6] Remove junk --- pyvis/network.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pyvis/network.py b/pyvis/network.py index 1d7f139..d50c3f4 100644 --- a/pyvis/network.py +++ b/pyvis/network.py @@ -1,9 +1,3 @@ -import sys -sys.path.append('/home/unpingco/.wingpro8/remote-8.1.2.1') -import wingdbstub -wingdbstub.Ensure() - - from .node import Node from .edge import Edge from .options import Options, Configure From ab0f9a28938702559f2d70d2a5c22d9f33e1ce33 Mon Sep 17 00:00:00 2001 From: Johannes Bier Date: Wed, 13 Apr 2022 00:48:45 +0200 Subject: [PATCH 4/6] Use default edges of visjs --- pyvis/options.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyvis/options.py b/pyvis/options.py index 7829140..0ba1526 100644 --- a/pyvis/options.py +++ b/pyvis/options.py @@ -55,8 +55,8 @@ def __repr__(self): return str(self.__dict__) def __init__(self): - self.enabled = False - self.type = "continuous" + self.enabled = True + self.type = "dynamic" class Color(object): """ From c31b826d3322c0ea45c1afd8e47e8254a8803efe Mon Sep 17 00:00:00 2001 From: Johannes Bier Date: Wed, 13 Apr 2022 00:52:02 +0200 Subject: [PATCH 5/6] Fix notebook and add dot file example --- notebooks/dot.html | 112 ++++++++++++++++++++++++++++++++ notebooks/example.html | 137 +++------------------------------------- notebooks/example.ipynb | 58 ++++++++++++++--- notebooks/test.dot | 9 +++ 4 files changed, 181 insertions(+), 135 deletions(-) create mode 100644 notebooks/dot.html create mode 100644 notebooks/test.dot diff --git a/notebooks/dot.html b/notebooks/dot.html new file mode 100644 index 0000000..6fd6d79 --- /dev/null +++ b/notebooks/dot.html @@ -0,0 +1,112 @@ + + + + +
+

+
+ + + + + + + + +
+ + + + + \ No newline at end of file diff --git a/notebooks/example.html b/notebooks/example.html index 5c1a211..689d070 100644 --- a/notebooks/example.html +++ b/notebooks/example.html @@ -1,7 +1,7 @@ - - + +

@@ -12,92 +12,17 @@

@@ -107,17 +32,6 @@

-
-
-
0%
-
-
-
-
-
- - -