This repository has been archived by the owner on Oct 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* get the graph dev mode running again * remove Text console log again * .gitignore packages/graph/testData * update graph TODOs * graph dev mode will start without test data * fix linting errors * update forceClampToRadius * better circle area calculations * type forceClampToRadius * split HierarchicalGraphRenderer constructor into initializeForces and initializeSelection * refactor {method}CallAllChildren into callChildrenRecursively('method') * GraphHandler useForces * Update gt.redeye file. * Update timeline and mult-command tests for failures. --------- Co-authored-by: James Bradford <[email protected]> Co-authored-by: Courtney Carpenter <[email protected]>
- Loading branch information
1 parent
751d9d5
commit 98e64a2
Showing
12 changed files
with
231 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
import { json } from 'd3'; | ||
import { RedEyeGraph, getServers } from './src/index.ts'; | ||
|
||
export const testGraph = (svgElementId) => { | ||
const randomGraphData = getServers(75, 5); | ||
json('./testData/data1.json').then((rawGraphData) => { | ||
window.graph = new RedEyeGraph({ | ||
// onSelectionChange: (node) => console.log(node?.id), | ||
// onPreviewChange: (node) => console.log(node), | ||
// graphData: randomGraphData, | ||
graphData: { | ||
...rawGraphData.graph, | ||
parents: Object.keys(rawGraphData.hosts).map((hostId) => ({ | ||
name: rawGraphData.hosts[hostId].hostName, | ||
id: hostId, | ||
})), | ||
}, | ||
element: document.getElementById('app'), | ||
}); | ||
window.addEventListener('resize', () => window.graph.resize()); | ||
const getGraphData = async () => { | ||
try { | ||
return await json('./testData/large.json'); | ||
} catch { | ||
return getServers(75, 5); | ||
} | ||
}; | ||
|
||
export const testGraph = async (svgElementId) => { | ||
const graphData = await getGraphData(); | ||
window.graph = new RedEyeGraph({ | ||
graphData, | ||
element: document.getElementById(svgElementId), | ||
}); | ||
window.addEventListener('resize', () => window.graph.resize()); | ||
console.log(window.graph); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.