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/07/02 08:45:42 UTC

[GitHub] [echarts] zpinocchio opened a new issue #15280: Error: `setOption` should not be called during main process.

zpinocchio opened a new issue #15280:
URL: https://github.com/apache/echarts/issues/15280


   ### Version
   5.1.2
   
   ### Steps to reproduce
   setOption(`option with some error`), 
   Error: `setOption` should not be called during main process.
   
   when I fixed option , try setOption again, it still report above error 
   only then i dispose this chart instance and redraw it become normal
   
   but I have same element(create by zrender ) that not include in option,dispose and redraw will miss these element
   so how can I fixed above error and keep these element
   
   ### What is expected?
    I fixed above error and keep these element
   
   ### What is actually happening?
   miss these element
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. 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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] Quang-Dong commented on issue #15280: Error: `setOption` should not be called during main process.

Posted by GitBox <gi...@apache.org>.
Quang-Dong commented on issue #15280:
URL: https://github.com/apache/echarts/issues/15280#issuecomment-930068537


   I got this error, and here's the reason I found out
   
   ### Option
   ` option: {
         series: [
             data: [
                 {
                   value: 0,
                   detail: {
                     color: 'white',
                   },
                 },
               ],
         ]
   }`
   
   ### setOption
   `myChart.setOption({
           series: [
             {
               data: [
                 {
                   value,
                   detail: {
                     color: 'white',
                   },
                 },
               ],
             },
           ],
         })`


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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 #15280: Error: `setOption` should not be called during main process.

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


   @zpinocchio Please provide a minimum reproducible demo for the issue either with https://codepen.io/Ovilia/pen/dyYWXWM , https://www.makeapie.com/editor.html or https://codesandbox.io/s/mystifying-bash-2uthz.
   
   *A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] Quang-Dong edited a comment on issue #15280: Error: `setOption` should not be called during main process.

Posted by GitBox <gi...@apache.org>.
Quang-Dong edited a comment on issue #15280:
URL: https://github.com/apache/echarts/issues/15280#issuecomment-930068537


   I got this error, and here's the reason I found out:
   
   **The point is that you have to access the correct path of the series' child objects**
   _Example: _
   ### Option
   ` option: {
         series: [
             data: [
                 {
                   value: 0,
                   detail: {
                     color: 'white',
                   },
                 },
               ],
         ]
   }`
   
   ### setOption
   `myChart.setOption({
           series: [
             {
               data: [
                 {
                   value,
                   detail: {
                     color: 'white',
                   },
                 },
               ],
             },
           ],
         })`


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] sususususususs commented on issue #15280: Error: `setOption` should not be called during main process.

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


   我最近也出现了这个错误,v5.0.2 setTimeout,reset方法等都试过了,没用,在radar图中出现的错误,其他类型的图都都没出现,有什么解决方法么


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] yuhongcheng2003 commented on issue #15280: Error: `setOption` should not be called during main process.

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


   I'm also seeing this error which seems to be some kind timing issue. I have setTimeout wrapped around it, but occasionally I still see that error. I have not dived into echart code base, but I assume the "main process" is not single threaded?  Or if there is some kind error preventing the main process from complete? Is there an api to reset the "flag" if an error occure?


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] pissang commented on issue #15280: Error: `setOption` should not be called during main process.

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


   Are you using HMR?


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] chengkai2022 commented on issue #15280: Error: `setOption` should not be called during main process.

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


   从4.0升级到5.0后我在雷达图,3d坐标系中遇到同样的问题


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] yuhongcheng2003 edited a comment on issue #15280: Error: `setOption` should not be called during main process.

Posted by GitBox <gi...@apache.org>.
yuhongcheng2003 edited a comment on issue #15280:
URL: https://github.com/apache/echarts/issues/15280#issuecomment-885004019


   I'm also seeing this error which seems to be some kind timing issue. I have setTimeout wrapped around it, but occasionally I still see that error. I have not dived into echart code base, but I assume the "main process" is not single threaded?  Or if there is some kind error preventing the main process from complete? Is there an api to reset the "flag" if an error occurred?
   
   I have created a sample of if the original setOption failed, then following setOption won't work either.


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] Quang-Dong commented on issue #15280: Error: `setOption` should not be called during main process.

Posted by GitBox <gi...@apache.org>.
Quang-Dong commented on issue #15280:
URL: https://github.com/apache/echarts/issues/15280#issuecomment-930068537


   I got this error, and here's the reason I found out
   
   ### Option
   ` option: {
         series: [
             data: [
                 {
                   value: 0,
                   detail: {
                     color: 'white',
                   },
                 },
               ],
         ]
   }`
   
   ### setOption
   `myChart.setOption({
           series: [
             {
               data: [
                 {
                   value,
                   detail: {
                     color: 'white',
                   },
                 },
               ],
             },
           ],
         })`


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] KaygNas commented on issue #15280: Error: `setOption` should not be called during main process.

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


   I have the simliar problem and found there was the error in the formatter that cause it, i was tring to read property of undefined which might throw error in echart and casuse this problem.


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] dean714714 commented on issue #15280: Error: `setOption` should not be called during main process.

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


   vue组件上加个v-once,一个实例就可以了


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] yuhongcheng2003 edited a comment on issue #15280: Error: `setOption` should not be called during main process.

Posted by GitBox <gi...@apache.org>.
yuhongcheng2003 edited a comment on issue #15280:
URL: https://github.com/apache/echarts/issues/15280#issuecomment-885004019


   I'm also seeing this error which seems to be some kind timing issue. I have setTimeout wrapped around it, but occasionally I still see that error. I have not dived into echart code base, but I assume the "main process" is not single threaded?  Or if there is some kind error preventing the main process from complete? Is there an api to reset the "flag" if an error occurred?
   
   I have created a sample of if the original setOption failed, then following setOption won't work either.
   
   Example: https://codepen.io/yuhongcheng2003/pen/XWReyda


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] KaygNas commented on issue #15280: Error: `setOption` should not be called during main process.

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


   I have the simliar problem and found there was the error in the formatter that cause it, i was tring to read property of undefined which might throw error in echart and casuse this problem.


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] Quang-Dong edited a comment on issue #15280: Error: `setOption` should not be called during main process.

Posted by GitBox <gi...@apache.org>.
Quang-Dong edited a comment on issue #15280:
URL: https://github.com/apache/echarts/issues/15280#issuecomment-930068537


   I got this error, and here's the reason I found out:
   
   **The point is that you have to access the correct path of the series' child objects**
   
   ### Option
   ` option: {
         series: [
             data: [
                 {
                   value: 0,
                   detail: {
                     color: 'white',
                   },
                 },
               ],
         ]
   }`
   
   ### setOption
   `myChart.setOption({
           series: [
             {
               data: [
                 {
                   value,
                   detail: {
                     color: 'white',
                   },
                 },
               ],
             },
           ],
         })`


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] pissang commented on issue #15280: Error: `setOption` should not be called during main process.

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


   Are you using HMR?


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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 #15280: Error: `setOption` should not be called during main process.

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


   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 it contains **a minimum reproducible demo** and necessary **images** to illustrate. Otherwise, our committers will ask you to do so.
   
   *A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.
   
   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 question.
   
   If you are interested in the project, you may also subscribe our [mailing 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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] yuhongcheng2003 edited a comment on issue #15280: Error: `setOption` should not be called during main process.

Posted by GitBox <gi...@apache.org>.
yuhongcheng2003 edited a comment on issue #15280:
URL: https://github.com/apache/echarts/issues/15280#issuecomment-885004019


   I'm also seeing this error which seems to be some kind timing issue. I have setTimeout wrapped around it, but occasionally I still see that error. I have not dived into echart code base, but I assume the "main process" is not single threaded?  Or if there is some kind error preventing the main process from complete? Is there an api to reset the "flag" if an error occurred?


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] Quang-Dong edited a comment on issue #15280: Error: `setOption` should not be called during main process.

Posted by GitBox <gi...@apache.org>.
Quang-Dong edited a comment on issue #15280:
URL: https://github.com/apache/echarts/issues/15280#issuecomment-930068537


   I got this error, and here's the reason I found out:
   
   **The point is that you have to access the correct path of the series' child objects**
   
   ### Option
   ` option: {
         series: [
             data: [
                 {
                   value: 0,
                   detail: {
                     color: 'white',
                   },
                 },
               ],
         ]
   }`
   
   ### setOption
   `myChart.setOption({
           series: [
             {
               data: [
                 {
                   value: your_data,
                   detail: {
                     color: 'white',
                   },
                 },
               ],
             },
           ],
         })`


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] Quang-Dong edited a comment on issue #15280: Error: `setOption` should not be called during main process.

Posted by GitBox <gi...@apache.org>.
Quang-Dong edited a comment on issue #15280:
URL: https://github.com/apache/echarts/issues/15280#issuecomment-930068537






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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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