Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
194 changes: 194 additions & 0 deletions docs/extra/getting-started.ipynb

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions docs/source/api-reference/graph.rst

This file was deleted.

2 changes: 2 additions & 0 deletions docs/source/api-reference/node.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.. autoclass:: neo4j_viz.Node
:members:
Comment on lines +1 to +2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could also try to use automodule to get all the classes automatically

2 changes: 2 additions & 0 deletions docs/source/api-reference/relationship.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.. autoclass:: neo4j_viz.Relationship
:members:
2 changes: 2 additions & 0 deletions docs/source/api-reference/visualization-graph.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.. autoclass:: neo4j_viz.VisualizationGraph
:members:
3 changes: 3 additions & 0 deletions docs/source/getting-started.nblink
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "../extra/getting-started.ipynb"
}
2 changes: 0 additions & 2 deletions docs/source/getting-started.rst

This file was deleted.

5 changes: 2 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
Graph Visualization for Python by Neo4j documentation
=====================================================

This is the documentation for the `neo4j_viz` Python library by Neo4j for creating interactive graph visualizations.
This is the documentation for the `neo4j-viz` Python library by Neo4j for creating interactive graph visualizations.


.. toctree::
:glob:
:maxdepth: 1
:caption: Contents:

installation.rst
getting-started.rst
getting-started.nblink
api-reference/index.rst
tutorials/index.rst
6 changes: 6 additions & 0 deletions docs/source/themes/sphinx_neo4j/static/css/neo4j.css
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ div.code-block-caption:hover > a.headerlink {
padding: 0.25rem 0;
}

/* links */
.doc span {
margin: 0;
padding: 0;
}

/* lists */

body.sphinx .doc ul li{
Expand Down
2 changes: 1 addition & 1 deletion docs/source/tutorials/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Tutorials
=====================================================

This chapter contains Jupyter notebook tutorials for the `neo4j_viz` package.
This chapter contains Jupyter notebook tutorials for the `neo4j-viz` package.


.. toctree::
Expand Down
27 changes: 27 additions & 0 deletions python-wrapper/src/neo4j_viz/visualization_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,33 @@ def render(
allow_dynamic_min_zoom: bool = True,
max_allowed_nodes: int = 10_000,
) -> HTML:
"""
Render the graph.

Parameters
----------
layout:
The `Layout` to use.
renderer:
The `Renderer` to use.
width:
The width of the rendered graph.
height:
The height of the rendered graph.
pan_position:
The initial pan position.
initial_zoom:
The initial zoom level.
min_zoom:
The minimum zoom level.
max_zoom:
The maximum zoom level.
allow_dynamic_min_zoom:
Whether to allow dynamic minimum zoom level.
max_allowed_nodes:
The maximum allowed number of nodes to render.
"""

num_nodes = len(self.nodes)
if num_nodes > max_allowed_nodes:
raise ValueError(
Expand Down
Loading