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
2 changes: 1 addition & 1 deletion examples/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.ipynb_checkpoints
__marimo__
out/*

__pycache__
2 changes: 1 addition & 1 deletion js-applet/src/graph-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function GraphWidget() {
const [height] = useModelState<WidgetData["height"]>("height");
const [width] = useModelState<WidgetData["width"]>("width");
const [theme] = useModelState<WidgetData["theme"]>("theme");
const [gesture, setGesture] = useState<Gesture>("box");
const [gesture, setGesture] = useState<Gesture>("single");
const { layout, nvlOptions, zoom, pan, layoutOptions, showLayoutButton } =
options ?? {};
const setLayout = (layout: Layout) => {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -82239,7 +82239,7 @@ function Ydr(o) {
}
}
function Xdr() {
const [o] = Y0("nodes"), [r] = Y0("relationships"), [e, t] = Y0("options"), [n] = Y0("height"), [a] = Y0("width"), [i] = Y0("theme"), [c, l] = kr.useState("box"), { layout: d, nvlOptions: s, zoom: u, pan: g, layoutOptions: b, showLayoutButton: f } = e ?? {}, v = (I) => {
const [o] = Y0("nodes"), [r] = Y0("relationships"), [e, t] = Y0("options"), [n] = Y0("height"), [a] = Y0("width"), [i] = Y0("theme"), [c, l] = kr.useState("single"), { layout: d, nvlOptions: s, zoom: u, pan: g, layoutOptions: b, showLayoutButton: f } = e ?? {}, v = (I) => {
t({ ...e, layout: I });
}, p = kr.useRef(null), m = Wdr(i ?? "auto"), [y, k] = kr.useState(null);
kr.useEffect(() => {
Expand Down
3 changes: 3 additions & 0 deletions python-wrapper/src/neo4j_viz/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ def from_graph_data(
theme=theme,
)

def __str__(self) -> str:
return f"GraphWidget(nodes={len(self.nodes)}, relationships={len(self.relationships)}, options={self.options}, theme={self.theme}, width={self.width}, height={self.height})"

def add_data(
self, nodes: Node | list[Node] | None = None, relationships: Relationship | list[Relationship] | None = None
) -> None:
Expand Down
Loading