On Fri, 2023-06-16 at 15:38 +0800, Ovilia wrote:
> Hi,
> 
> If you call chart.setOption when data updates, the view should always
> get
> updated because the position of the data is relative to each other,
> rather
> than being absolute. So I don't think this is possible.
> 
> Thanks
> 
> *Ovilia*

That's unfortunate and I think an oversight. When doing force-directed
layout the node positions should be drawn back to the centre of the
view port (or in the more general case, the centre of mass of the
original set of node positions). From looking at the code for force
layout, this doesn't happen. If that were fixed, then the requirement
for making a constraint would go away because it would not be possible
for a graph to wander off the view port and it would not be possible
for a user to drag the graph out either.

Dan


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@echarts.apache.org
For additional commands, e-mail: dev-h...@echarts.apache.org

Reply via email to