Open lolivia opened 5 years ago
Please provide a full example at jsfiddle or http://gallery.echartsjs.com/editor.html .
I tried to add animationDuration: 5000
to slow down the animation and hover on pie before the animation completed and cannot reproduce it.
不好意思 ,我们的场景比较复杂,不太好描述,如果单纯的写options,也确实不会出现这种问题,我想问下,因为我看到代码出错的地方是 var data = this.getData(dataType);这里为undefined,不知道是不是我姿势用的不对, 一般什么情况下 这里会undefined呢
I cannot tell from the provided information.
Please debug by yourself with ECharts repo node build/build.js
.
same for me
@Pavel-Ropakov Can you provide your option?
same for me
Getting this also, not sure what the problem is.
same for me
same for me
same for me
e.target.dataType 为undefined
Same thing happening for me too. I have debugged it to this function. Task appears to be null here. And this function is returning undefined.
Series.js
getData: function (dataType) {
var task = getCurrentTask(this);
if (task) {
var data = task.context.data;
return dataType == null ? data : data.getLinkedData(dataType);
} else {
// When series is not alive (that may happen when click toolbox
// restore or setOption with not merge mode), series data may
// be still need to judge animation or something when graphic
// elements want to know whether fade out.
return inner(this).data;
}
}
I'm seeing the same on echarts 4.1.0
and 4.3.0
and echarts-for-react 2.0.14
, echarts-for-react 2.0.15-beta.0
, specifically using a Pie Chart. Can this issue be re-opened?
I was passing every dynamic config toecharts-for-react
component as a prop. Config consited of 1...3 number of series. Exception was raised when the new config doesn't consist of a series present previously and moving mouse over that series.
Stop the event handling when chart is updating.
Show an overlay over chart when it is updating.
chartInstance.showLoading()
when change has started. (I did it as soon as the API call for next data is triggered)chartInstance.hideLoading()
when chartInstance.on('finished')
event.chartInstance.setOption does the update with silent (no-event-listening) mode.
https://www.echartsjs.com/en/api.html#echartsInstance.setOption
chartInstance.setOptions(...)
instead of passing new config as prop to the component.Hope this is of use to you guys.
Anyone could provide a demo for this issue?
same for me
I use ReactEcharts
and had similar problem with 'scatter' and 'bar' series. Likely because events are being dispatched while the chart is re-rendering. After setting silent: false
to the series, the error was eliminated. But this disabled tooltip
too.
This works for me: use a React shouldComponentUpdate
method to prevent Echarts from re-rendering.
I have the same error and the error disappeared when i deleted lazyUpdate from options
I use echarts-for-react v2.0.16
set : silent: true , maybe it work
setOption
setOption(option: Opt, notMerge?: boolean, lazyUpdate?: boolean): void; I passed "notMerge" into "true", this problem occurred, changed to "false", the problem was solved
Yes,man. I solved the problem with the same way
setOption(option: Opt, notMerge?: boolean, lazyUpdate?: boolean): void; I passed "notMerge" into "true", this problem occurred, changed to "false", the problem was solved
+1 , i change state in select event which may cause render. caught the same error. and the select action not work. solved by change "notMerge" to "false".
setOption(option: Opt, notMerge?: boolean, lazyUpdate?: boolean): void; I passed "notMerge" into "true", this problem occurred, changed to "false", the problem was solved
I set 'false' but it still doesn't work well. when hover and switch data still reports an error
but If data is frequently changed, change "notMerge" into "false" is reasonable?
I have received your email, thank you!If there is anything important, I will reply to you as soon as I see it...
One-line summary [问题简述]
饼图未完全渲染,即饼图动态变化时,鼠标hover到饼图的扇区,报错Cannot read property 'getRawIndex' of undefined, 但不影响渲染以及后续使用
Version & Environment [版本及环境]
Expected behaviour [期望结果]
不输出该错误
ECharts option [ECharts配置项]
比较特殊的是 我的数据是远程获取,并且数据比较大,当整个饼图渲染完,并没有变化的时候,鼠标hover上去不会有什么错误,但是当数据还在加载的时候,饼图还在变化,这个时候鼠标hover上去会报错。 错误如下
Other comments [其他信息]
dataFormat.js?6c1b:40 Uncaught TypeError: Cannot read property 'getRawIndex' of undefined at ExtendedClass.getDataParams (dataFormat.js?6c1b:40) at Function.superCall (clazz.js?04d6:107) at ExtendedClass.getDataParams (PieSeries.js?fef3:78) at ECharts.eval (echarts.js?21c7:1386) at Handler.trigger (Eventful.js?aa3b:158) at Handler.dispatchToElement (Handler.js?963e:218) at Handler.mouseout (Handler.js?963e:135) at HandlerDomProxy.trigger (Eventful.js?aa3b:158) at HandlerDomProxy.mouseout (HandlerProxy.js?7bcf:107) at HTMLDivElement.eval (HandlerProxy.js?7bcf:245) getDataParams @ dataFormat.js?6c1b:40 superCall @ clazz.js?04d6:107 getDataParams @ PieSeries.js?fef3:78 (anonymous) @ echarts.js?21c7:1386 trigger @ Eventful.js?aa3b:158 dispatchToElement @ Handler.js?963e:218 mouseout @ Handler.js?963e:135 trigger @ Eventful.js?aa3b:158 mouseout @ HandlerProxy.js?7bcf:107 (anonymous) @ HandlerProxy.js?7bcf:245