apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.2k stars 19.61k forks source link

[Bug] The graph moves automatically. #17865

Open belousovjr opened 1 year ago

belousovjr commented 1 year ago

Version

5.4.0

Link to Minimal Reproduction

https://codepen.io/belousowork/pen/gOKwGKE

Steps to Reproduce

  1. Create a series-graph chart (next.js + echarts-for-react).
  2. Add a click event handler that changes the content of data (for example, hiding a node).
  3. Zoom the graph as much as possible and click on a node.

Current Behavior

The graph automatically shifts in an inexplicable direction.

Expected Behavior

The scale and position of the graph remain unchanged after updating the data.

Environment

- OS: Ubuntu 22.04.1 
- Browser: Google Chrome Version 107.0.5304.68 (64-bit)
- Framework: next.js + echarts-for-react + echarts

Any additional comments?

No response

echarts-bot[bot] commented 1 year ago

@belousovjr Please provide a demo for the issue either with Official Editor, CodePen, CodeSandbox or JSFiddle.

belousovjr commented 1 year ago

@Ovilia

Here is the reproduction.

It is enough to zoom the chart to the maximum and click on any node to change the color.

As a result, the contents of the chart move randomly.

https://codepen.io/belousowork/pen/gOKwGKE

Ovilia commented 1 year ago

@belousovjr I didn't see anything move randomly or anything strange. Do you mind making a video of screenshot?

belousovjr commented 1 year ago

@Ovilia

https://user-images.githubusercontent.com/43438753/200311250-cea412f4-334d-42c4-8b02-75c59ba9fd48.mp4