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/04/17 16:10:01 UTC

[GitHub] [incubator-echarts] BUERGER123 commented on issue #12449: Echart 折现更新卡顿

BUERGER123 commented on issue #12449: Echart 折现更新卡顿
URL: https://github.com/apache/incubator-echarts/issues/12449#issuecomment-615332472
 
 
   你好,我代码结构大概是这样:export default Vue.extend({
   &nbsp; &nbsp; &nbsp; &nbsp; data(){return{}},
   
   
   &nbsp; &nbsp; &nbsp; &nbsp; methods:{
   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;functionA(){&nbsp; data = update_data() }
   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;................
   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;functionN(){}
   
   
   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;build_chart(){
   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;let mychart = this.$echarts.init()
   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;option = {.........}
   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mychart.option(option)
   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;setInterval(function () {
   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;myChart.setOption({
   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;series: [{data: data}]});
   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}, 1000);
   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
   &nbsp; &nbsp; &nbsp; &nbsp;},
   
   
   &nbsp; &nbsp; &nbsp; &nbsp;mounted(){
   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;build_chart();
   &nbsp; &nbsp; &nbsp; &nbsp;},
   })
   麻烦帮我看下哪里需要修改
   
   
   
   
   
   
   ------------------&nbsp;原始邮件&nbsp;------------------
   发件人: "Yi Shen"<notifications@github.com&gt;; 
   发送时间: 2020年4月16日(星期四) 下午4:28
   收件人: "apache/incubator-echarts"<incubator-echarts@noreply.github.com&gt;; 
   抄送: "Avengers"<1198476521@qq.com&gt;; "Mention"<mention@noreply.github.com&gt;; 
   主题: Re: [apache/incubator-echarts] Echart 折现更新卡顿 (#12449)
   
   
   
   
   
    
   @BUERGER123 建议先用这个代码写个最简单的例子排查下是不是 echarts 的问题
    
   vue 和 echarts 结合使用的时候需要注意不要把 echarts 实例或者配置项挂到 vue 下面,vue 会深度遍历监听所有属性,数据量一下就卡了
    
   —
   You are receiving this because you were mentioned.
   Reply to this email directly, view it on GitHub, or unsubscribe.

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