layout icon indicating copy to clipboard operation
layout copied to clipboard

G6使用ForceAtlas2Layout布局时center参数不生效

Open ZeroTo1024 opened this issue 3 years ago • 0 comments

1652752396(1)

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()

ZeroTo1024 avatar May 17 '22 01:05 ZeroTo1024