Skip to content

Commit

Permalink
feat: complete radial layout
Browse files Browse the repository at this point in the history
  • Loading branch information
pomelo-nwu committed Mar 24, 2020
1 parent 98ffdae commit 4abf323
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions packages/graphin-site/examples/layout/base/demo/Radial.jsx
Expand Up @@ -4,10 +4,26 @@ import ReactDOM from 'react-dom';
import Graphin, { Utils } from '@antv/graphin';
import '@antv/graphin/dist/index.css'; // 引入Graphin CSS

const data = Utils.mock(10)
.circle()
const data = Utils.mock(20)
.random()
.graphin();

const App = () => <Graphin data={data} layout={{ name: 'radial' }} />;
const App = () => (
<Graphin
data={data}
layout={{
name: 'radial',
options: {
unitRadius: 100,
preventOverlap: true,
nodeSize: 40,
maxPreventOverlapIteration: 1000,
nodeSpacing: () => {
return 30;
},
},
}}
/>
);

ReactDOM.render(<App />, document.getElementById('container'));

0 comments on commit 4abf323

Please sign in to comment.