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 2021/03/17 01:53:15 UTC

[GitHub] [echarts] zhoufanglu opened a new issue #14493: 关于echarts中registerMap地图的时候,切换地图数据加上动画效果问题

zhoufanglu opened a new issue #14493:
URL: https://github.com/apache/echarts/issues/14493


   ### Version
   4.9.0
   
   ### Reproduction link
   >我想要的动画效果如下
   [https://www.makeapie.com/editor.html?c=xByLjqtaLz](https://www.makeapie.com/editor.html?c=xByLjqtaLz)
   
   ### Steps to reproduce
   我从官方demo中拷贝了这串代码,大概知道是动画的事件
   ```js
   zoomAnimation() {
         var count = null;
         var zoom = per=>{
           if(!count) count = per;
           count = count   per;
           console.log('----')
           console.log(222, per,count)
           this.charts.setOption({
             geo: {
               zoom: count
             }
           });
           if(count < 1) window.requestAnimationFrame(function(){
             zoom(0.2);
           });
         };
         window.requestAnimationFrame(function(){
           zoom(0.2);
         });
       },
   ```
   我是这么使用的
   在vue中
   ```js
   this.charts.setOption(option) //图表对象创建后 ,我调用了这个事件
   this.zoomAnimation() //动画效果没生效
   ```
   
   ### What is expected?
   希望地图动画效果能出现
   这是您们官方的一个[demo](https://www.makeapie.com/editor.html?c=xByLjqtaLz) 
   
   ### 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



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


[GitHub] [echarts] plainheart commented on issue #14493: 关于echarts中registerMap地图的时候,切换地图数据加上动画效果问题

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


   这个例子似乎太复杂了,在 #14550 例子的基础上加上了地图动画切换,仅供参考。
   https://www.makeapie.com/editor.html?c=xmveYphRJD&v=3


-- 
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] zhoufanglu commented on issue #14493: 关于echarts中registerMap地图的时候,切换地图数据加上动画效果问题

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


   > 另一种动画效果:https://www.makeapie.com/editor.html?c=xmveYphRJD&v=4
   
   我在定时器前面`  myCharts.setOption(option)` 后地图就不显示了,
   ```js
   option = {
     geo: {
      map: 'china',
      show: true //这里我设置false,地图就不显示,设置了true,每个区域块都显示名字了,我这里不需要显示名字
    }
   }
   ```
   
   请问您在哪里塞入的option


-- 
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] echarts-bot[bot] commented on issue #14493: 关于echarts中registerMap地图的时候,切换地图数据加上动画效果问题

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #14493:
URL: https://github.com/apache/echarts/issues/14493#issuecomment-800732515






----------------------------------------------------------------
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] zhoufanglu closed issue #14493: 关于echarts中registerMap地图的时候,切换地图数据加上动画效果问题

Posted by GitBox <gi...@apache.org>.
zhoufanglu closed issue #14493:
URL: https://github.com/apache/echarts/issues/14493


   


-- 
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] zhoufanglu removed a comment on issue #14493: 关于echarts中registerMap地图的时候,切换地图数据加上动画效果问题

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


   > 另一种动画效果:https://www.makeapie.com/editor.html?c=xmveYphRJD&v=4
   
   谢谢您的回答,我看了下,我想问下你的代码里什么时候执行了这句 `myCharts.setOption(option)`,
   我把他放在定时器前面执行,地图就出不来了
   


-- 
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] plainheart commented on issue #14493: 关于echarts中registerMap地图的时候,切换地图数据加上动画效果问题

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


   gallery 编辑器会自动获取到声明的 option 变量 自动调用 setOption。所以就没写在代码里。
   这个例子只显示浦东地区的 label: https://www.makeapie.com/editor.html?c=xmveYphRJD&v=5


-- 
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] zhoufanglu commented on issue #14493: 关于echarts中registerMap地图的时候,切换地图数据加上动画效果问题

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


   ![Qjb8HsLRIc](https://user-images.githubusercontent.com/24451091/111561125-ec282a00-87ce-11eb-9aa9-ee74df7f58cf.gif)
   大佬们我做了大概这样的一个例子
   每次切换我都重新`charts.setOption(option)`了
   但是我想要个切换的动画效果,请问怎么实现呢?
   我看官网demo有个`zoomAnimation`,但是在我的vue项目中好像不生效


----------------------------------------------------------------
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] plainheart commented on issue #14493: 关于echarts中registerMap地图的时候,切换地图数据加上动画效果问题

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


   另一种动画效果:https://www.makeapie.com/editor.html?c=xmveYphRJD&v=4


-- 
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] zhoufanglu commented on issue #14493: 关于echarts中registerMap地图的时候,切换地图数据加上动画效果问题

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


   > 另一种动画效果:https://www.makeapie.com/editor.html?c=xmveYphRJD&v=4
   
   谢谢您的回答,我看了下,我想问下你的代码里什么时候执行了这句 `myCharts.setOption(option)`,
   我把他放在定时器前面执行,地图就出不来了
   


-- 
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