File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ The ``render`` method
23
23
24
24
Once you have a ``VisualizationGraph `` object, you can render it using the ``render `` method.
25
25
This will return a HTML object that will be displayed in an environment that supports HTML rendering, such as
26
- Jupyter notebooks or streamlit.
26
+ Jupyter notebooks or streamlit application .
27
27
28
28
All parameter of the ``render `` method are optional, and the full list of parameters of them is listed in the API
29
29
reference: :meth: `neo4j_viz.VisualizationGraph.render `.
@@ -50,7 +50,23 @@ But you can disable this by passing ``show_hover_tooltip=False``.
50
50
51
51
52
52
Examples
53
- --------
53
+ ~~~~~~~~
54
54
55
55
Please refer to the :doc: `Getting started section <./getting-started >` and the :doc: `tutorials <./tutorials/index >` for
56
56
examples of ``render `` method usage.
57
+
58
+
59
+ Exporting to HTML
60
+ ~~~~~~~~~~~~~~~~~
61
+
62
+ The object returned by the ``render `` method is a ``IPython.display.HTML `` object.
63
+ In addition to being displayed in a Jupyter notebook or streamlit application, it can also be saved as an HTML file.
64
+ This could be useful if you want to share the visualization with others or embed it in a web page.
65
+
66
+ To save the HTML data to a file, you can use the ``data `` attribute of the HTML object:
67
+
68
+ .. code-block :: python
69
+
70
+ html = VG .render(... )
71
+ with open (" my_graph.html" , " w" ) as f:
72
+ f.write(html.data)
You can’t perform that action at this time.
0 commit comments