layout
layout copied to clipboard
G6使用ForceAtlas2Layout布局时center参数不生效

const options:ForceAtlas2LayoutOptions = { center: [600, 400], kr: 10, kg: 1, preventOverlap: true, type:'forceAtlas2' } const layout= new ForceAtlas2Layout(options)
layout.init({
nodes: data.nodes,
edges: data.edges,
})
layout.execute()
graph.data(data)
graph.render()