You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/02/29 12:21:03 UTC

[GitHub] [incubator-echarts] diklios5768 opened a new issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] Caitingwei commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱

Posted by GitBox <gi...@apache.org>.
Caitingwei commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱
URL: https://github.com/apache/incubator-echarts/issues/12211#issuecomment-608181541
 
 
   在option中开启animation就不会出现布局错乱,不开启动画偶尔会导致布局错乱

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] diklios5768 commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱

Posted by GitBox <gi...@apache.org>.
diklios5768 commented on issue #12211:
URL: https://github.com/apache/echarts/issues/12211#issuecomment-796512551


   > animationDurationUpdate: 0
   > 
   > 就可以解决这个问题了
   
   是可以解决,但是这要是需要用到动画就不行了,没解决根本问题


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] diklios5768 commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱

Posted by GitBox <gi...@apache.org>.
diklios5768 commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱
URL: https://github.com/apache/incubator-echarts/issues/12211#issuecomment-599182240
 
 
   这个问题还有办法解决吗

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] gluo1130 commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱

Posted by GitBox <gi...@apache.org>.
gluo1130 commented on issue #12211:
URL: https://github.com/apache/echarts/issues/12211#issuecomment-764443488


   animationDurationUpdate: 0
   
   就可以解决这个问题了  


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] diklios5768 edited a comment on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱

Posted by GitBox <gi...@apache.org>.
diklios5768 edited a comment on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱
URL: https://github.com/apache/incubator-echarts/issues/12211#issuecomment-593832242
 
 
   @Ovilia 保存了一个[demo](https://jsfiddle.net/zbyxc6jw/),可以观察代码最后两行(有没有 true 都是一样的),运行两次(本来是更新节点数据的时候发现的),会出现节点不在线条指向地方的错误,缩放后正常,提供如下图片:
   
   <img width="627" alt="图片" src="https://user-images.githubusercontent.com/47837462/75757576-94f31b00-5d6d-11ea-95e7-494a4b377831.png">
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱
URL: https://github.com/apache/incubator-echarts/issues/12211#issuecomment-593773214
 
 
   @diklios5768 Please provide a demo for the issue either with https://jsfiddle.net/ovilia/n6xc4df3/ or https://gallery.echartsjs.com/editor.html.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] diklios5768 commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱

Posted by GitBox <gi...@apache.org>.
diklios5768 commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱
URL: https://github.com/apache/incubator-echarts/issues/12211#issuecomment-593832242
 
 
   保存了一个[demo](https://jsfiddle.net/zbyxc6jw/),可以观察代码最后两行,直接运行两次,会出现点不在线指向地方的错误,缩放后正常,提供如下图片:
   
   <img width="627" alt="图片" src="https://user-images.githubusercontent.com/47837462/75757576-94f31b00-5d6d-11ea-95e7-494a4b377831.png">
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱
URL: https://github.com/apache/incubator-echarts/issues/12211#issuecomment-592939761
 
 
   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical questions.
   
   If you are interested in the project, you may also subscribe our [mail list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] alex2wong commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱

Posted by GitBox <gi...@apache.org>.
alex2wong commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱
URL: https://github.com/apache/incubator-echarts/issues/12211#issuecomment-609515152
 
 
   在最新版中已經修復~ 4.7.0 Demo https://jsfiddle.net/z378hrtg/  @diklios5768 看看是否解決了你的需求,可以試試 setTimeout 改下數據

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] Ovilia commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱
URL: https://github.com/apache/incubator-echarts/issues/12211#issuecomment-593773304
 
 
   @diklios5768 代码跑不起来,请根据上面的地址保存一个可运行的 demo 吧

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] diklios5768 removed a comment on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱

Posted by GitBox <gi...@apache.org>.
diklios5768 removed a comment on issue #12211:
URL: https://github.com/apache/echarts/issues/12211#issuecomment-796512551


   > animationDurationUpdate: 0
   > 
   > 就可以解决这个问题了
   
   是可以解决,但是这要是需要用到动画就不行了,没解决根本问题


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] diklios5768 commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱

Posted by GitBox <gi...@apache.org>.
diklios5768 commented on issue #12211:
URL: https://github.com/apache/echarts/issues/12211#issuecomment-796514156


   > 在最新版中已經修復~ 4.7.0 Demo https://jsfiddle.net/z378hrtg/ @diklios5768 看看是否解決了你的需求,可以試試 setTimeout 改下數據
   
   似乎并没有修复
   ![image](https://user-images.githubusercontent.com/47837462/110748604-ebe1d900-827a-11eb-893e-114596b0ac67.png)
   ```javascript
   chart.setOption(init_painting);
   
   chart.setOption(init_painting);
   ```
   仅仅执行两次绘图还是一样偏移
   ![image](https://user-images.githubusercontent.com/47837462/110748714-16cc2d00-827b-11eb-98b8-523d2638d4eb.png)
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] gluo1130 commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱

Posted by GitBox <gi...@apache.org>.
gluo1130 commented on issue #12211:
URL: https://github.com/apache/echarts/issues/12211#issuecomment-764443488


   animationDurationUpdate: 0
   
   就可以解决这个问题了  


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] 100pah commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱

Posted by GitBox <gi...@apache.org>.
100pah commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱
URL: https://github.com/apache/incubator-echarts/issues/12211#issuecomment-594127075
 
 
   Need to check whether it is for the similar reason with #11895.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] diklios5768 commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱

Posted by GitBox <gi...@apache.org>.
diklios5768 commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱
URL: https://github.com/apache/incubator-echarts/issues/12211#issuecomment-594315793
 
 
   @100pah It seems different.I just use setOption twice.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] diklios5768 commented on issue #12211: graph 使用 force 布局,设置series-graph.force.layoutAnimation:false后,如果更新数据,会导致布局错乱

Posted by GitBox <gi...@apache.org>.
diklios5768 commented on issue #12211:
URL: https://github.com/apache/echarts/issues/12211#issuecomment-796515240


   > animationDurationUpdate: 0
   > 
   > 就可以解决这个问题了
   
   是的,这样似乎可以解决问题,但是按道理来说不应该需要这样设置就可以正常运行的


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org