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

组件收到新option属性更新时,若鼠标触发了 tooltips 会抛出异常 #68

Closed
reallyimeric opened this Issue Jun 2, 2017 · 16 comments

Comments

3 participants
@reallyimeric

reallyimeric commented Jun 2, 2017

Uncaught TypeError: Cannot read property 'axesInfo' of null
    at axisTrigger (http://localhost:3000/static/js/bundle.js:267598:41)
    at Object.action (http://localhost:3000/static/js/bundle.js:267533:29)
    at ECharts.<anonymous> (http://localhost:3000/static/js/bundle.js:215282:36)
    at Array.forEach (native)
    at each (http://localhost:3000/static/js/bundle.js:217378:18)
    at ECharts.doDispatchAction (http://localhost:3000/static/js/bundle.js:215280:10)
    at ECharts.echartsProto.dispatchAction (http://localhost:3000/static/js/bundle.js:215233:27)
    at ExtensionAPI.dispatchAction (http://localhost:3000/static/js/bundle.js:217495:26)
    at dispatchAction (http://localhost:3000/static/js/bundle.js:268268:22)
    at Object.handler (http://localhost:3000/static/js/bundle.js:268132:26)
@hustcc

This comment has been minimized.

Owner

hustcc commented Jun 2, 2017

确实是 组件收到新option属性更新时,若鼠标触发了 tooltips 会抛出异常 这样必现吗?

这个问题,我们在开发中经常莫名其妙遇到,原来是这么触发出来的啊,不过这个是 setOption 过程中,echarts 抛出的错误,不过也不会影响页面流程。

@reallyimeric

This comment has been minimized.

reallyimeric commented Jun 2, 2017

我在 /lib/echarts-for-react.jscomponentDidUpdate 最后加了一句 log,看到异常输出在那句 log 之后。

@reallyimeric

This comment has been minimized.

reallyimeric commented Jun 2, 2017

如果鼠标动得飞快的话就很可能可以看见,我也不确定是不是必现...

@hustcc

This comment has been minimized.

Owner

hustcc commented Jun 2, 2017

那应该就是 echats 的小 bug 了,但是问题不大。可以忽略的~

@reallyimeric

This comment has been minimized.

reallyimeric commented Jun 2, 2017

不过这个是 setOption 过程中,echarts 抛出的错误

我试了下直接使用 echarts,重复调用 echarts 的 setOption 时没能触发出这个异常。也许还是和 React 有关系吧?

echart 版本 3.5.4。

@reallyimeric

This comment has been minimized.

reallyimeric commented Jun 2, 2017

嗯,的确问题不大。

@hustcc

This comment has been minimized.

Owner

hustcc commented Jun 2, 2017

嗯,这个不会影响开发和线上功能的,放心使用。

这个 issue 关闭了!

@hustcc hustcc closed this Jun 2, 2017

@zhaozhiming

This comment has been minimized.

zhaozhiming commented Jul 4, 2017

我也出现这个问题,导致页面直接报错,请reopen这个问题,谢谢

@zhaozhiming

This comment has been minimized.

zhaozhiming commented Jul 4, 2017

@hustcc 是echarts的问题吗?是的话是否考虑升级echarts的版本?

@zhaozhiming

This comment has been minimized.

zhaozhiming commented Jul 4, 2017

我自己封装的echarts react组件不会有这个问题,应该跟echarts没关系

@hustcc

This comment has been minimized.

Owner

hustcc commented Jul 4, 2017

echarts 的问题,这个我是确定的。

你封装的 echarts 组件不会遇到这个问题,是因为还没有找到触发这个问题的必然条件。我在项目中也会偶尔出现这个问题,但是却找不到必然复现的方式。

http://git.hust.cc/echarts-for-react/ 你们可以在这个 demo 网站中触发一下试试看。

@zhaozhiming

This comment has been minimized.

zhaozhiming commented Jul 4, 2017

不知道为什么我在我的工程里面随便动一下就报那个错,但是用Online环境又没有问题:

https://codesandbox.io/s/1rlXVB29V

@zhaozhiming

This comment has been minimized.

zhaozhiming commented Jul 4, 2017

而且我发现只有Bar图才会这样,其他pie,line,map都没有问题

@hustcc

This comment has been minimized.

Owner

hustcc commented Jul 4, 2017

所以很可能是 option 配置上有些地方不合法,触发了 echarts 的异常。

@zhaozhiming

This comment has been minimized.

zhaozhiming commented Jul 4, 2017

option跟online环境是一样的,还是会报错,不知道是什么原因,给echarts提issue了。

@zhaozhiming

This comment has been minimized.

zhaozhiming commented Jul 4, 2017

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