Skip to content

Commit

Permalink
cytoscape
Browse files Browse the repository at this point in the history
  • Loading branch information
ia7ck committed Oct 2, 2024
1 parent 21d25ef commit ea3a150
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 1 deletion.
19 changes: 19 additions & 0 deletions app/graph/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"use client";

import CytoscapeComponent from "react-cytoscapejs";

export default function Graph() {
const elements = [
{ data: { id: "one", label: "Node 1" }, position: { x: 100, y: 100 } },
{ data: { id: "two", label: "Node 2" }, position: { x: 200, y: 200 } },
{
data: { source: "one", target: "two", label: "Edge from Node1 to Node2" },
},
];
return (
<CytoscapeComponent
elements={elements}
style={{ width: "600px", height: "600px" }}
/>
);
}
61 changes: 60 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
"@heroicons/react": "^2.1.1",
"@radix-ui/react-slider": "^1.1.2",
"clsx": "^2.1.0",
"cytoscape": "^3.30.2",
"next": "^14.1.1",
"react": "^18",
"react-cytoscapejs": "^2.0.0",
"react-dom": "^18",
"zod": "^3.22.4"
},
Expand All @@ -23,6 +25,7 @@
"@tailwindcss/forms": "^0.5.7",
"@types/node": "^22",
"@types/react": "^18",
"@types/react-cytoscapejs": "^1.2.5",
"@types/react-dom": "^18",
"autoprefixer": "^10.0.1",
"postcss": "^8",
Expand Down

0 comments on commit ea3a150

Please sign in to comment.