Comments (3)
The current official website provides incorrect examples, so please do not refer to the sample code provided there. We will prioritize updating the documentation and examples as soon as possible within this week. Thank you for your understanding and patience.
After the beta.28 version, G6 underwent a significant change. You can now use it in the following way:
import { Graph } from '@antv/g6';
const graph = new Graph({
container: 'container',
width: 400,
height: 400,
data: {
nodes: [{ id: 'node-1' }, { id: 'node-2' }],
edges: [{ source: 'node-1', target: 'node-2' }],
},
behaviors: ['zoom-canvas', 'drag-canvas', 'drag-element'],
layout: {
type: 'grid',
},
});
graph.render();
from g6.
Here is an online demo of CodeSandbox that you can refer to.
from g6.
Thank you for the example, will wait for the documentation update
from g6.
Related Issues (20)
- cursor 状态不会自动变化 HOT 1
- dagre布局下的combo,如何设置固定宽度,高度由内容自动撑开,或者有api实现节点换行吗
- V5.0.9 自定义节点展开 收缩有问题 HOT 2
- 【V5】树布局中,节点高度不固定的情况下,getHeight按节点实际高度设置,会出现节点布局重叠问题
- 树布局中如何在getWidth中获取节点的宽高
- [V5] hover-activate behavior makes expand/collapse combo breaking HOT 1
- [V5]拖动Custom React Node后,连线错乱 HOT 1
- 【V5】5.0.10 click-select behavior 双击节点后 选择失效 HOT 4
- combocombined布局,innerlayout使用concentric,布局错位;不设置fixSize也有问题 HOT 3
- 【V5】5.0.10 节点内置状态 inactive 切换后 badge 未还原 HOT 2
- 自定义节点,节点上下之间的间距设定为相等的固定值,无效果 HOT 3
- combo 重叠,设置preventOverlap无效 HOT 10
- 我创建的力导向图,自定义的节点间的连线,起止位置不是从节点周边开始,而是从节点周围的方形位置起止 HOT 2
- Graphin V3 how to register custom node
- v4.8.10 如何部分更新自定义的Node的文字shape HOT 1
- V5.0 版本有minimap插件的平替吗
- V5.0 版本有minimap插件的平替吗 HOT 2
- 请问这个antv g6 5.0 最低兼容到什么浏览器版本,可以有办法兼容低浏览器版本吗? HOT 1
- 是否能实现右键按下拖拽 HOT 2
- force2”布局,500节点及以上,自定义布局,给节点加上图片这些,加载贼慢,有时候超过十分钟都加载不出来,经常导致浏览器崩溃,有什么好解决的办法吗 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from g6.