Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
6cc2c71
Bump nbsphinx from 0.9.7 to 0.9.8 in /python-wrapper
dependabot[bot] Feb 2, 2026
4583b1c
Bump ruff from 0.14.13 to 0.14.14 in /python-wrapper
dependabot[bot] Feb 2, 2026
75ca736
Bump nbconvert from 7.16.6 to 7.17.0 in /python-wrapper
dependabot[bot] Feb 20, 2026
21e7f3d
Bump nbconvert from 7.16.6 to 7.17.0 in /python-wrapper
dependabot[bot] Feb 20, 2026
517ad94
Update project version
FlorentinD Feb 20, 2026
affa729
Default to light theme if bg is transparent
FlorentinD Feb 20, 2026
25099c0
Use lts version in gha
FlorentinD Feb 20, 2026
af390bc
Merge pull request #270 from neo4j/dependabot/pip/python-wrapper/nbco…
FlorentinD Feb 20, 2026
9449618
Merge pull request #269 from neo4j/dependabot/pip/python-wrapper/nbsp…
FlorentinD Feb 20, 2026
aed2e77
Merge pull request #271 from neo4j/dependabot/pip/python-wrapper/ruff…
FlorentinD Feb 20, 2026
97f5fce
Merge pull request #276 from neo4j/dependabot/uv/python-wrapper/nbcon…
FlorentinD Feb 20, 2026
1a29b63
Check for vscode theme class
FlorentinD Feb 23, 2026
8a1ab9e
Update nvl entrypoint
FlorentinD Feb 23, 2026
c5503e3
Merge pull request #278 from neo4j/gds-156-issues-displaying-in-dark-…
FlorentinD Feb 23, 2026
f7ed5b0
Bump ruff from 0.14.14 to 0.15.2 in /python-wrapper
dependabot[bot] Feb 23, 2026
705a816
Bump ipykernel from 7.1.0 to 7.2.0 in /python-wrapper
dependabot[bot] Feb 23, 2026
056ba90
Bump pytest from 8.4.2 to 9.0.2 in /python-wrapper
dependabot[bot] Feb 23, 2026
a02efb2
Bump streamlit from 1.53.0 to 1.54.0 in /python-wrapper
dependabot[bot] Feb 23, 2026
eeb7e26
Allow adding and removing data from the widget
FlorentinD Feb 27, 2026
d0ec689
Handle none case
FlorentinD Feb 27, 2026
0b831d4
Merge pull request #289 from neo4j/update-widget-data-util
FlorentinD Feb 27, 2026
7dbadd6
Add more buttons for interactive changes
FlorentinD Feb 27, 2026
fc27f73
Fix tests
FlorentinD Feb 27, 2026
86d6d75
Format code
FlorentinD Feb 27, 2026
9d643e5
Merge pull request #284 from neo4j/dependabot/pip/python-wrapper/stre…
FlorentinD Feb 27, 2026
8a2c3b4
Merge pull request #282 from neo4j/dependabot/pip/python-wrapper/pyte…
FlorentinD Feb 27, 2026
b835f1b
Merge pull request #281 from neo4j/dependabot/pip/python-wrapper/ipyk…
FlorentinD Feb 27, 2026
a721d01
Merge pull request #279 from neo4j/dependabot/pip/python-wrapper/ruff…
FlorentinD Feb 27, 2026
68f4fad
Merge pull request #287 from neo4j/add-more-buttons
FlorentinD Feb 27, 2026
e5af9d7
Use Node and Rel type in GraphWidget
FlorentinD Mar 5, 2026
995f571
Fix style + update js dependencies
FlorentinD Mar 5, 2026
c96ca60
Merge pull request #294 from neo4j/use-typed-tratilet-in-widget
FlorentinD Mar 5, 2026
0f62da9
Setup marimo example
FlorentinD Feb 27, 2026
0935bb1
Format code
FlorentinD Feb 27, 2026
848994f
Try out rendering to file from marimo
FlorentinD Feb 27, 2026
6474738
Add explicit topRightIsland
FlorentinD Feb 27, 2026
277034a
Update js deps
FlorentinD Mar 6, 2026
4e72a64
Update marimo
FlorentinD Mar 6, 2026
caded8e
Update notebook
FlorentinD Mar 6, 2026
bfe964c
improve ndl graph-vis in shadow dom
Mar 9, 2026
42d1659
Update yarn lock
FlorentinD Mar 9, 2026
8fad3e1
Derive VG theme from marimo metadata
FlorentinD Mar 10, 2026
88d029a
Update yarn lock
FlorentinD Mar 10, 2026
7581b03
Merge pull request #288 from neo4j/gds-157-neo4j-viz-buttons-not-show…
FlorentinD Mar 10, 2026
5c66b8b
Comment theme issue for Marimo
FlorentinD Mar 10, 2026
c1f46f1
Remove Marimo as a required dependency
FlorentinD Mar 11, 2026
3b36151
Update gds example
FlorentinD Mar 13, 2026
faecf07
Fix marimo theme detection
FlorentinD Mar 13, 2026
66d0cb0
Merge pull request #307 from neo4j/update-examples
FlorentinD Mar 13, 2026
539c48f
Change default selection back to single
FlorentinD Mar 13, 2026
803262e
Remove committed pycache file
FlorentinD Mar 13, 2026
a0cdaee
Merge pull request #308 from neo4j/change-default-selection
FlorentinD Mar 13, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/nvl-entrypoint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "24.x"
node-version: "lts/*"
- name: Setup
run: yarn
- name: Build
Expand Down
23 changes: 12 additions & 11 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
# Changes in 1.2.0
# Changes in 1.3.0

## Breaking changes

- Removed the `show_hover_tooltip` parameter from `render()`. The visualization now shows a detail side panel for selected nodes and relationships, replacing the previous hover tooltip.
- Nodes are colored by default by their caption. Use `VG.color_nodes(field="caption", colors=[neo4j_viz.colors.NEO4J_COLORS_DISCRETE[0]])` to apply the previous coloring.


## New features

- Nodes are now automatically colored by their caption (label) in the JavaScript visualization. This works out of the box without needing to call `color_nodes()`, and applies regardless of how the graph was created. Explicit colors set via `color_nodes()` or directly on nodes take precedence. There is no longer a limit on the number of unique labels for auto-coloring.
- New `Zoom to fit` button in the visualization.
- New `render_widget()` method on `VisualizationGraph` returns a `GraphWidget` (anywidget) for interactive two-way data sync in Jupyter environments (JupyterLab, Notebook 7, VS Code, Colab).
- Add convenience method `add_data` and `remove_data` to `GraphWidget`.
- Added a selection button to the toolbar.
- Added a layout button to the toolbar if `VG.render_widget` is used.
- Support the new circular layout.

## Bug fixes

- Fixed a bug with the theme detection inn VSCode.

## Improvements

- Migrated JavaScript visualization from `@neo4j-nvl/base` to `@neo4j-ndl/react-graph` React component.
- Migrated build system from Webpack to Vite.
- Added anywidget integration as the primary rendering path for Jupyter environments.
- Allow setting the theme manually in `VG.render(theme="light")` and `VG.render_widget(theme="dark")`.
- Use typed nodes and relationship traitlets in GraphWidget, i.e., list of Node and Relationship instead of dictionaries.
- `render` now allows to pass `layout` as a string as well. Previously expected to be a typed `neo4j_viz.Layout`.
- Fixed rendering in Marimo notebooks


## Other changes
3 changes: 2 additions & 1 deletion examples/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.ipynb_checkpoints

__marimo__
out/*
__pycache__
5,985 changes: 615 additions & 5,370 deletions examples/gds-example.ipynb

Large diffs are not rendered by default.

727 changes: 344 additions & 383 deletions examples/getting-started.ipynb

Large diffs are not rendered by default.

118 changes: 118 additions & 0 deletions examples/marimo-example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# type: ignore

import marimo

__generated_with = "0.20.4"
app = marimo.App(width="full", app_title="Neo4jVizExample")


@app.cell
def _():
import marimo as mo

return (mo,)


@app.cell(hide_code=True)
def _(mo):
mo.md(r"""
# Neo4j Graph Visualization with Marimo

This example demonstrates how to use `neo4j-viz` to visualize graphs in Marimo notebooks.
We'll create a simple graph representing a social network with people and their relationships.
""")
return


@app.cell
def _():
from neo4j_viz import Node, Relationship, VisualizationGraph

return Node, Relationship, VisualizationGraph


@app.cell(hide_code=True)
def _(mo):
mo.md(r"""
## Create Nodes and Relationships
""")
return


@app.cell
def _(Node, Relationship):
# Create nodes representing people
nodes = [
Node(id=0, size=10, caption="Person", properties={"age": 25}),
Node(id=1, size=10, caption="Product", properties={"price": 100}),
Node(id=2, size=20, caption="Product", properties={"price": 200}),
Node(id=3, size=10, caption="Person", properties={"age": 30}),
Node(id=4, size=10, caption="Product"),
]
relationships = [
Relationship(source=0, target=1, caption="BUYS"),
Relationship(source=0, target=2, caption="BUYS"),
Relationship(source=3, target=2, caption="BUYS"),
]
return nodes, relationships


@app.cell(hide_code=True)
def _(mo):
mo.md(r"""
## Visualize the Graph as a Widget
""")
return


@app.cell
def _(VisualizationGraph, nodes, relationships):
# Create and render the visualization
VG = VisualizationGraph(nodes=nodes, relationships=relationships)
# Note, we need to pass the theme explicitly in Marimo.
widget = VG.render_widget(renderer="canvas")
widget
return VG, widget


@app.cell
def _(widget):
print(widget.theme)
print(widget.options)
return


@app.cell
def _(Node, Relationship, widget):
# Run this cell multiple times - each run adds a new node to the widget above
import random

new_id = len(widget.nodes)
target_id = random.choice([n.id for n in widget.nodes])

new_node = Node(id=new_id, size=10, caption="Person")
new_rel = Relationship(source=new_id, target=target_id, caption="KNOWS")

widget.add_data(nodes=[new_node], relationships=[new_rel])
return


@app.cell(hide_code=True)
def _(mo):
mo.md(r"""
## Standalone Visualization the Graph
""")
return


@app.cell
def _(VG):
# Save the visualization to a file
with open("out/marimo_output.html", "w") as f:
print(f"{f}")
f.write(VG.render(renderer="canvas").data)
return


if __name__ == "__main__":
app.run()
12 changes: 6 additions & 6 deletions js-applet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
},
"dependencies": {
"@anywidget/react": "^0.2.0",
"@neo4j-ndl/base": "^4.7.1",
"@neo4j-ndl/react": "^4.7.3",
"@neo4j-ndl/react-graph": "^1.2.8",
"@neo4j-nvl/base": "^1.0.0",
"@neo4j-nvl/interaction-handlers": "^1.0.0",
"@neo4j-nvl/react": "^1.0.0",
"@neo4j-ndl/base": "4.9.7",
"@neo4j-ndl/react": "4.9.17",
"@neo4j-ndl/react-graph": "1.2.35",
"@neo4j-nvl/base": "^1.1.0",
"@neo4j-nvl/interaction-handlers": "^1.1.0",
"@neo4j-nvl/react": "^1.1.0",
"@tanstack/react-table": "^8.20.5",
"react": "^19.2.4",
"react-dom": "^19.2.4"
Expand Down
Loading
Loading