diklios5768 opened a new issue #12211: graph 使用 force 
布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱
URL: https://github.com/apache/incubator-echarts/issues/12211
 
 
   ### Version
   4.6.0
   
   ### Steps to reproduce
   使用如下设置:
   ```javascript
   tooltip: {
           show: true,
           showContent: true,
           trigger: 'item',
           triggerOn: 'mousemove',
           alwaysShowContent: false,
           showDelay: 100,
           hideDelay: 2000,
           enterable: false,
           position: 'right',
           confine: false,
           transitionDuration: 0.2,
       },
       legend: {
           show: true,
           type: "scroll",
           animation: true
       },
       series: [{
           type: 'graph',
           name: '',
           layout: 'circular',
           // animation: false,
           legendHoverLink: true,
           hoverAnimation: true,
           coordinateSystem: null,
           xAxisIndex: 0,
           yAxisIndex: 0,
           force: {
               repulsion: 10,
               gravity: 0.1,
               edgeLength: 500,
               layoutAnimation: false
           },
           roam: true,
           nodeScaleRatio: 0.6,
           draggable: true,
           focusNodeAdjacency: true,
           symbol: 'circle',
           edgeSymbol: ['none', 'arrow'],
           edgeSymbolSize: 5,
           itemStyle: {
               color: '#6D9AA2',
               borderType: 'solid',
               borderColor: '#fff',
               borderWidth: 1,
               opacity: 1,
               shadowBlur: 10,
               shadowColor: 'rgba(0, 0, 0, 0.3)',
               emphasis: {
                   color: "#334553"
               }
           },
           lineStyle: {
               normal: {
                   width: '1',
                   type: 'solid',
                   curveness: 0.3,
                   opacity: 0.2
               },
               emphasis: {
                   width: 10
               }
           },
           label: {
               normal: {
                   show: true,
                   position: 'inside',
                   textStyle: {
                       color: 'rgba(164,100,34,0.6)',
                       fontStyle: 'normal',
                       fontWeight: 'bolder',
                       fontFamily: 'sans-serif',
                       fontSize: 15,
                   }
               },
               emphasis: {}
           },
           edgeLabel: {
               normal: {
                   show: false
               },
           },
           data:[{}],
           links:[{}]
   ```
   data和 links 比较长,难以上传代码,故给一张图片
   ![force 
bug](https://user-images.githubusercontent.com/47837462/75607336-f7130c80-5b30-11ea-879d-ec4d9b0147e7.png)
   当使用鼠标缩放后,就恢复正常了。
   
   ### What is expected?
   希望能够有好的解决办法,这个问题已经存在很久了,之前有一个人提出了问题但是没上传代码问题被自动关闭了。其他社区也看到有人提出问题,但是没有找到解决办法。
   
   ### What is actually happening?
   实际上就是重新绘制图的时候好像截了动画过程中的一帧,但是如果打开动画,慢慢看他加载完毕,最后结果就是正常的。
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to