g6/demos/plugin-circle.html
2018-07-12 21:38:24 +08:00

32 lines
787 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>插件-布局-圆形</title>
</head>
<body>
<div id="mountNode"></div>
<script src="../build/g6.js"></script>
<script src="../build/plugin.util.randomData.js"></script>
<script src="../build/plugin.layout.circle.js"></script>
<script>
const Util = G6.Util;
const data = Util.createCyclicData(30);
const graph = new G6.Graph({
container: 'mountNode',
fitView: 'cc',
height: window.innerHeight,
plugins: [new G6.Plugins['layout.circle']()]
});
graph.node({
size: 16
});
graph.read(data);
</script>
</body>
</html>