`setOption` should not be called during main process.

See original GitHub issue

Help / 帮助

Replace the [ ] with [x] to check an option. / 将 [ ] 替换为 [x] 以选择对应选项。

The type of this issue / Issue 类型

setOption should not be called during main process. This just started happening after I updated

  • Feature request / 新特性需求

  • Bug report / Bug 报告

  • I’ve checked it’s not a problem of ECharts itself. / 我已检查过,这个问题非 ECharts 本身的问题。

Details / 详情

The same code I was using last week is now giving this error. I copied https://codesandbox.io/s/vue-echarts-toolboxreset-bug-sx231 and the only changes to get this error is listed below.

<v-chart autoresize :option="chartOptions" /> was changed to <v-chart ref="objChart" autoresize :option="chartOptions" @dataZoom=eventZoomData /> also added to methods so the event has a function to call eventZoomData(data){ console.log(data) }

Vue version / Vue 版本

  • Vue 3
  • Vue 2

How are you importing Vue-ECharts? / 你是如何引入 Vue-ECharts 的?

  • Importing vue-echarts with a bundler environment / 在 webpack 等打包工具环境下引入 vue-echarts
  • Using the global variable by including <script> tags / 通过 <script> 标签引入全局变量

The version of Vue-ECharts you are using / Vue-ECharts 的版本

eg. 6.0.0-beta.5

Reproduction link / 复现链接

https://codesandbox.io/s/ref-setoption-bug-k329z?file=/pages/index.vue:3629-3679

For bug reports, please provide the steps to reproduce and if possible a minimal demo of the problem. Please paste the link to your CodeSandbox demo below: (Vue 3 template / Vue 2 template)

对于 Bug 报告,请在下面提供复现的步骤,最好是最小化的能够重现问题的 demo。请在下方贴入在 CodeSandbox 上 demo 的链接:(Vue 3 模板 / Vue 2 模板

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
helmut-jacobcommented, May 4, 2021

I’m seeing the same issue with 6.0.0-rc.5, downgrading to 6.0.0-rc.4 fixed it.

Hence, I guess something slipped in between rc4 and rc5.

2reactions
Justineocommented, May 8, 2021

@helmut-jacob It’s actually a different error but may share the same root cause (can’t confirm yet).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: `setOption` should not be called during main process ...
Version 5.1.2 Steps to reproduce setOption(option with some error), Error: setOption should not be called during main process. when I fixed ...
Read more >
echarts.js:3066 Uncaught Error: `setOption` should not be ...
... Error: `setOption` should not be called during main process ... 使用 echarts. dispose销毁实例,之后再调用init,setOption 就没什么问题了 ...
Read more >
Uncaught Error: `setOption` should not be called during main ...
这个错误,代码肯定是没有问题的,因为第一遍默认加载的时候是正常显示,只是重新渲染的时候出现了问题。 这个报错,是为了限制setOption 调用时机,意思 ...
Read more >
javascript - How to fix the 'setOption' does not exist on type ...
A div does not have properties like resize() and setOption() . Those only make sense once you have a chart instance.
Read more >
ECharts报错: Uncaught Error: `setOption` should not be called ...
ECharts报错: Uncaught Error: `setOption` should not be called during main process ... 这个错误,代码肯定是没有问题的,因为第一遍默认加载的时候是 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found