You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2019/07/15 09:16:08 UTC
[GitHub] [incubator-echarts] qunlee opened a new issue #10866: 生产环境:TypeError: Cannot read property 'hide' of undefined
qunlee opened a new issue #10866: 生产环境:TypeError: Cannot read property 'hide' of undefined
URL: https://github.com/apache/incubator-echarts/issues/10866
### 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,
},
],
}],
}
<ReactEcharts option={trendoption} />
<ReactEcharts option={option} />
### 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)
<!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org