Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: add Concentric demo * chore: remove unused config * chore: fix cr
- Loading branch information
Showing
8 changed files
with
8,177 additions
and
35 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Graph } from '@/src'; | ||
import data from '@@/dataset/gene.json'; | ||
import type { STDTestCase } from '../types'; | ||
|
||
export const layoutConcentric: STDTestCase = async (context) => { | ||
const graph = new Graph({ | ||
...context, | ||
autoFit: 'center', | ||
data, | ||
behaviors: ['zoom-canvas', 'drag-canvas', 'drag-node'], | ||
layout: { | ||
type: 'concentric', | ||
maxLevelDiff: 0.5, | ||
preventOverlap: true, | ||
}, | ||
node: { | ||
style: { | ||
size: 5, | ||
stroke: '#5B8FF9', | ||
fill: '#C6E5FF', | ||
lineWidth: 1, | ||
}, | ||
}, | ||
edge: { | ||
style: { | ||
stroke: '#E2E2E2', | ||
}, | ||
}, | ||
animation: false, | ||
}); | ||
|
||
await graph.render(); | ||
|
||
return graph; | ||
}; |
Oops, something went wrong.