Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f5222a0
commit a1b547a
Showing
6 changed files
with
39 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
/* eslint-disable no-undef */ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import Graphin, { Utils } from '@antv/graphin'; | ||
import '@antv/graphin/dist/index.css'; // 引入Graphin CSS | ||
|
||
const data = Utils.mock(100).random(0.3).graphin(); | ||
const data = Utils.mock(100) | ||
.random(0.3) | ||
.graphin(); | ||
|
||
const App = () => ( | ||
<Graphin data={data} layout={{ name: 'force' }} /> | ||
); | ||
const App = () => <Graphin data={data} layout={{ name: 'force' }} />; | ||
|
||
ReactDOM.render(<App />, document.getElementById('container')); |
14 changes: 5 additions & 9 deletions
14
packages/graphin-site/examples/layout/demo/ForceWithCentripetal.jsx
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,13 @@ | ||
/* eslint-disable no-undef */ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import Graphin, { Utils } from '@antv/graphin'; | ||
import '@antv/graphin/dist/index.css'; // 引入Graphin CSS | ||
|
||
const data = Utils.mock(50) | ||
.random(0.3) | ||
.graphin(); | ||
|
||
const App = () => <Graphin data={data} layout={{ name: 'grid' }} />; | ||
|
||
ReactDOM.render(<App />, document.getElementById('container')); |
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