Open kitee0325 opened 10 months ago
agree, graph is different, center:[0,0]
is not at the upper left corner, as the pie. Results from graph experiments:
layout: 'force'
is by default at the centerlayout: 'none'
the first node data will determine the overall position of the graph. When first node data is {name:'Node 1', x:0, y:0}
and center:['50%','50%'],
- graph will be roughly in the center (if all other nodes have x>0, y>0)
Version
5.4.3
Link to Minimal Reproduction
https://echarts.apache.org/examples/zh/editor.html?c=graph-simple&code=PYBwLglsB2AEC8sDeAoWtJgDYFMBcya6GOAHmAQOQBCAhgM4QDGsA4gE60gAWlRAvgBoiYYMCyQQBJEKK1oEALa1IMACIBXTqugBVEABMV-WAEYArAAZLw9PKUqo0AKIMI0AOb6jYE5QCOGu6QTACS0ADyGmCUtrD0OOwQOPQEANpE6KjExGAAniB-Hpw8sZnEWLR5wNFU0DA4ZTno9HmKAEbiAMoQAF4mVnE57MC0igRg7Bo4QxW07ThY0uU59NzAAO4TUzgrsLLNsDgGHjhdbZ1LsGmUTBDsTLixsJS07CMblAC6s-jHp-cOt0-iY0gAWQRmSw_Pb_HAAGXmi2Wh3QADMYGAev0CAAmSx7A7NJg4aC-djpGywaG_WA-WjpPZZJnEaBjPwAOWABhwZiaqPQpAIAGZrLScnkRdYWUTDtkBbA2YpOdzebj-QKhbAABxilnoSWwUUEgWy5rygVKlU8o0a1Fa8yDfWwQ2maWm8WEBWK9lULk2sF2w4Op3ew1WE2o_h7GGHAD0cdgWHcAGtUtdY81k9A04yBRbUfQag8TDZnWA3qcKGZPS0LsCcddzJD8ZmBZUFlcCwK1ptttNnWbDtmzvlcCjvbANhADGBuARm870EwtAA3UkpdOWAB0uMHMs93eaRa0JL9qtg6trGErOGrlH9vNMQazSK7S_i6y2GB2g-vI66McTCPQ4V3YddoE3Agdz3b1ow9FkQOIE8S3PG1n2vCt2CrNDeWFPgEPzZ0ULPF5H0vF8ciwnCyIvfCD0Q4ji1Ih8Lyvctb3vcjAwYojvRI60n0o3JONw2AeNNGNaQAoCJ0OUBaDufJoO3ABOT1p1nedL09MCIKg6lCXKeDYC-FB-AAbiAA
Steps to Reproduce
I set the attribute center : [0,0] on both the pie chart and the graph chart base official demo, and here are their links pie chart graph chart
The pie chart position looks as expected,but graph chart position looks strange, it moves to Bottom right of the canvas. You can comment and uncomment the
center
config repeatedly to see its movement.Current Behavior
graph chart move out of canvas
Expected Behavior
The graph chart moves to the top left of the canvas, consistent with the behavior of the pie chart
Environment
Any additional comments?
No response