New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Error: `setOption` should not be called during main process. #6281

Closed
jeffmobiles opened this Issue Jul 26, 2017 · 6 comments

Comments

Projects
None yet
3 participants
@jeffmobiles

jeffmobiles commented Jul 26, 2017

One-line summary [问题简述]

同时新建N个chart实例, 然后数据都是获取后台的数据,
使用SetTimeout() 也会报错...

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 3.6.2
  • Browser version [浏览器类型和版本]: chrome 57.0.2987.133 (64-bit)
  • OS Version [操作系统类型和版本]: window 7 (64-bit)

Expected behaviour [期望结果]

如果一个页面同时创建N个实例,获取结果都是异步的,然后根据结果封装option.
再更新chart实例的时候不会报错.

ECharts option [ECharts配置项]

option = {

}

Other comments [其他信息]

@jeffmobiles

This comment has been minimized.

Show comment
Hide comment
@jeffmobiles

jeffmobiles Jul 26, 2017

有时发生上述异常,有时又不会出现异常。

同时会一起报这个异常。
Uncaught TypeError: Cannot read property 'getComponent' of undefined

jeffmobiles commented Jul 26, 2017

有时发生上述异常,有时又不会出现异常。

同时会一起报这个异常。
Uncaught TypeError: Cannot read property 'getComponent' of undefined

@jeffmobiles

This comment has been minimized.

Show comment
Hide comment
@jeffmobiles

jeffmobiles Jul 26, 2017

当正在新健chart实例,更新option的时候,同时 鼠标移动到另外一个chart上面触发axisTrigger()的时候就会报这中错误。 1:a chart instance set option() ,2: mouse move b chart ,axisTrigger. 两个同时进行的时候。

jeffmobiles commented Jul 26, 2017

当正在新健chart实例,更新option的时候,同时 鼠标移动到另外一个chart上面触发axisTrigger()的时候就会报这中错误。 1:a chart instance set option() ,2: mouse move b chart ,axisTrigger. 两个同时进行的时候。

@jeffmobiles

This comment has been minimized.

Show comment
Hide comment
@jeffmobiles

jeffmobiles Jul 26, 2017

鼠标移动的图表 是用connect 关联起来的。。。

jeffmobiles commented Jul 26, 2017

鼠标移动的图表 是用connect 关联起来的。。。

@100pah

This comment has been minimized.

Show comment
Hide comment
@100pah

100pah Jul 26, 2017

Member

我们尝试改善下这个问题。
改善之前的解决方式,是保证每个 chart 都进行过 setOption 后再调用 connect。

Member

100pah commented Jul 26, 2017

我们尝试改善下这个问题。
改善之前的解决方式,是保证每个 chart 都进行过 setOption 后再调用 connect。

@100pah 100pah added the enhancement label Jul 26, 2017

@100pah 100pah closed this in c55d4e0 Jul 26, 2017

@jeffmobiles

This comment has been minimized.

Show comment
Hide comment
@jeffmobiles

jeffmobiles Jul 26, 2017

@100pah thanks. it run . 运行成功...

jeffmobiles commented Jul 26, 2017

@100pah thanks. it run . 运行成功...

@zzh3319

This comment has been minimized.

Show comment
Hide comment
@zzh3319

zzh3319 Oct 15, 2017

改善之前的解决方式,是保证每个 chart 都进行过 setOption 后再调用 connect。???connect是干嘛的?

到底解决了没?

zzh3319 commented Oct 15, 2017

改善之前的解决方式,是保证每个 chart 都进行过 setOption 后再调用 connect。???connect是干嘛的?

到底解决了没?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment