-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V5 Quick start demo example doesn't work #5705
Comments
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(); |
Here is an online demo of CodeSandbox that you can refer to. |
Thank you for the example, will wait for the documentation update |
Describe the bug
Result of rendering HTML file from demo example doesn't render graph
Your Example Website or App
https://g6-next.antv.antgroup.com/en/manual/tutorial/quick-start
Steps to Reproduce the Bug or Issue
There is error "Graph is not defined
Ok.
5.Replace "new Graph" on "new G6.Graph"
6. Reopen HTML file in browser
No errors, but no result
Expected behavior
As a user, I expect a rendered page with a graph
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: