Skip to content

Commit

Permalink
Improvements to graph visualization
Browse files Browse the repository at this point in the history
  • Loading branch information
nulinspiratie committed Dec 18, 2024
1 parent 89c30ee commit 0cb6ffd
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
30 changes: 30 additions & 0 deletions frontend/package-lock.json

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

2 changes: 2 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@emotion/styled": "^11.11.0",
"@mui/material": "^5.15.14",
"@types/cytoscape": "^3.21.7",
"@types/cytoscape-klay": "^3.1.4",
"@types/jsonpath": "^0.2.4",
"@types/node": "^20.12.7",
"@types/react": "^18.2.67",
Expand Down Expand Up @@ -76,6 +77,7 @@
"css-hot-loader": "1.4.4",
"css-loader": "^6.10.0",
"cytoscape": "^3.30.2",
"cytoscape-klay": "^3.1.4",
"dotenv-webpack": "^8.0.1",
"file-loader": "^6.2.0",
"flexlayout-react": "0.7.15",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { CytoscapeLayout } from "./config/Cytoscape";

import styles from "./CytoscapeGraph.module.scss";
import { useGraphContext } from "../../context/GraphContext";
import klay from "cytoscape-klay";

cytoscape.use(klay);
cytoscape.warnings(false);

interface IProps {
Expand Down Expand Up @@ -43,7 +45,7 @@ export default function CytoscapeGraph({ elements, onNodeClick }: IProps) {
{
selector: "edge",
style: {
width: 3,
width: 5,
"line-color": "#cbc4c4",
"target-arrow-color": "#cbc4c4",
"target-arrow-shape": "triangle",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
export const CytoscapeLayout = {
name: "grid",
name: "cose",
fit: true,
padding: 30,
spacingFactor: 1.5,
animate: true,
klay: {
direction: "RIGHT",
},
};

0 comments on commit 0cb6ffd

Please sign in to comment.