Skip to content
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

生产环境:TypeError: Cannot read property 'hide' of undefined #10866

Closed
qunlee opened this issue Jul 15, 2019 · 2 comments
Closed

生产环境:TypeError: Cannot read property 'hide' of undefined #10866

qunlee opened this issue Jul 15, 2019 · 2 comments
Labels
not-related This is not related directly to ECharts. third-party

Comments

@qunlee
Copy link

qunlee commented Jul 15, 2019

Version

4.2.1

Steps to reproduce

import ReactEcharts from 'echarts-for-react' 当包含此组件的页面返回时,会报错”TypeError: Cannot read property 'hide' of undefined“,但是并没有使用hide 相关的函数,查找不到错误点。

const trendoption = {
width: '100%',
height: '50%',
color: '#00AEFF',
grid: {
// top: '50%',
left: '-3%',
right: '0%',
bottom: '20%',
containLabel: true,
},
xAxis: [
{
type: 'category',
axisLine: {
show: false,
},
axisTick: {
show: false,
},
data: [m11, m22, m33],
},
],
yAxis: [
{
type: 'value',
show: false,
},
],
tooltip : {
trigger: 'axis',
axisPointer : {
type : 'shadow'
}
},
series: [
{
label: {
normal: {
show: true,
position: 'top',
},
},
name: ['Count'],
type: 'bar',
width: '100%',
symbolSize: 20,
data: [m1, m2, m3],
},
],
}

const option = {
tooltip: { show: false, trigger: 'item' },
color: '#00AEFF',
radar: {
name: {
textStyle: {
color: '#999',
borderRadius: 3,
padding: [5, 3],
},
},
indicator: [
{ name: 'T', max: 100 },
{ name: 'Q', max: 100 },
{ name: 'R', max: 100 },
{ name: 'D', max: 100 },
{ name: 'C', max: 100 },
],
},
grid: {
x: 50, y: 50, x2: 50, y2: 50,
},
series: [{
type: 'radar',
splitLine: { lineStyle: { type: 'dashed' } },
label: {
normal: {
show: true,
position: 'top',
},
},
splitArea: { show: false },
lineStyle: { color: '#00AEFF' },
data: [
{
name: title,
value: data,
},
],
}],
}

What is expected?

希望当跳转页面时,Charts并不会报错‘hide’

What is actually happening?

实际上报错了。TypeError: Cannot read property 'hide' of undefined


完整错误信息:因开发环境无问题,仅发布后存在问题,所以,
TypeError: Cannot read property 'hide' of undefined
at i.hide (13.c184e8dc89b3653fe40d.js:1)
at n.dispose (13.c184e8dc89b3653fe40d.js:1)
at 13.c184e8dc89b3653fe40d.js:1
at Array.forEach ()
at f (13.c184e8dc89b3653fe40d.js:1)
at r.Ve.dispose (13.c184e8dc89b3653fe40d.js:1)
at Object.D [as dispose] (13.c184e8dc89b3653fe40d.js:1)
at t.n.dispose (13.c184e8dc89b3653fe40d.js:1)
at t.value (13.c184e8dc89b3653fe40d.js:1)
at Dg (react-dom.production.min.js:119)
Bg @ react-dom.production.min.js:117
c.callback @ react-dom.production.min.js:126
Ag @ react-dom.production.min.js:116
zg @ react-dom.production.min.js:116
qi @ react-dom.production.min.js:131
ui @ react-dom.production.min.js:133
(anonymous) @ react-dom.production.min.js:158
unstable_runWithPriority @ react.production.min.js:27
Vc @ react-dom.production.min.js:158
Sc @ react-dom.production.min.js:158
Z @ react-dom.production.min.js:156
ah @ react-dom.production.min.js:159
xf @ react-dom.production.min.js:40
react-dom.production.min.js:157 Uncaught TypeError: Cannot read property 'hide' of undefined
at i.hide (13.c184e8dc89b3653fe40d.js:1)
at n.dispose (13.c184e8dc89b3653fe40d.js:1)
at 13.c184e8dc89b3653fe40d.js:1
at Array.forEach ()
at f (13.c184e8dc89b3653fe40d.js:1)
at r.Ve.dispose (13.c184e8dc89b3653fe40d.js:1)
at Object.D [as dispose] (13.c184e8dc89b3653fe40d.js:1)
at t.n.dispose (13.c184e8dc89b3653fe40d.js:1)
at t.value (13.c184e8dc89b3653fe40d.js:1)
at Dg (react-dom.production.min.js:119)

@echarts-bot
Copy link

echarts-bot bot commented Jul 15, 2019

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 you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

Have a nice day! 🍵

@echarts-bot echarts-bot bot added bug pending We are not sure about whether this is a bug/new feature. waiting-for-help labels Jul 15, 2019
@Ovilia
Copy link
Contributor

Ovilia commented Jul 17, 2019

请到 echarts-for-react 项目提问,比较大的可能性是这个插件的问题(或者使用方式的问题)

@Ovilia Ovilia added third-party not-related This is not related directly to ECharts. and removed bug pending We are not sure about whether this is a bug/new feature. waiting-for-help labels Jul 17, 2019
@Ovilia Ovilia closed this as completed Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-related This is not related directly to ECharts. third-party
Projects
None yet
Development

No branches or pull requests

2 participants