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 2018/07/09 12:49:52 UTC
[GitHub] erezcarmel opened a new issue #8670: Content disappear on dataZoom
change
erezcarmel opened a new issue #8670: Content disappear on dataZoom change
URL: https://github.com/apache/incubator-echarts/issues/8670
### One-line summary
When zooming in using the dataZoom bar, chart content disappear, and when dragging the zoom bar a console error message appear:
Uncaught TypeError: Cannot read property '0' of undefined
### Version & Environment [版本及环境]
+ ECharts version: 4.0.4
+ Browser version: Chrome 67.0.3396.99
+ OS Version: OSX
### Expected behaviour
Content will adjust by the dataZoom bar
### ECharts option
```javascript
option = {
"backgroundColor": "transparent",
"tooltip": {
"trigger": "item",
"enterable": true,
"backgroundColor": "#fff",
"axisPointer": {
"lineStyle": {
"color": "#000"
}
},
"textStyle": {
"color": "#000",
"fontSize": 12
},
"extraCssText": "box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.5)"
},
"legend": {
"icon": "circle",
"itemWidth": 7,
"itemHeight": 7,
"itemGap": 10,
"top": 10,
"data": ["America", "Europe", "Asia"],
"textStyle": {
"verticalAlign": "middle",
"fontSize": 10,
"color": "#000"
}
},
"grid": {
"show": false,
"left": 20,
"right": 10,
"bottom": 40,
"top": 60
},
"xAxis": [{
"type": "category",
"boundaryGap": false,
"axisTick": {
"show": false
},
"axisLine": {
"lineStyle": {
"color": "#000"
}
},
"axisLabel": {
"width": 50,
"textStyle": {
"fontSize": 10
}
},
"data": ["Jul 02 2018", "Jul 03 2018", "Jul 04 2018", "Jul 05 2018", "Jul 06 2018", "Jul 07 2018", "Jul 08 2018", "Jul 09 2018"]
}],
"yAxis": [{
"type": "value",
"axisTick": {
"show": false
},
"axisLine": {
"lineStyle": {
"color": "#000"
}
},
"axisLabel": {
"margin": 10,
"width": 60,
"textStyle": {
"fontSize": 10
}
},
"splitLine": {
"show": true,
"lineStyle": {
"type": "dotted"
}
}
}],
"series": [{
"name": "America",
"type": "line",
"smooth": true,
"lineStyle": {
"normal": {
"width": 1,
"opacity": 1
}
},
"areaStyle": {
"normal": {
"color": "#E7C653",
"opacity": 0.5
}
},
"itemStyle": {
"normal": {
"color": "#E7C653"
}
},
"data": [{
"value": 1,
"name": "America",
"id": "america"
}, {
"value": 5,
"name": "America",
"id": "america"
}, {
"value": 2,
"name": "America",
"id": "america"
}, {
"value": 4,
"name": "America",
"id": "america"
}, {
"value": 1,
"name": "America",
"id": "america"
}, {
"value": 0,
"name": "America",
"id": "america"
}, {
"value": 6,
"name": "America",
"id": "america"
}, {
"value": 0,
"name": "America",
"id": "america"
}]
}, {
"name": "Europe",
"type": "line",
"smooth": true,
"lineStyle": {
"normal": {
"width": 1,
"opacity": 1
}
},
"areaStyle": {
"normal": {
"color": "#E6E6BF",
"opacity": 0.5
}
},
"itemStyle": {
"normal": {
"color": "#E6E6BF"
}
},
"data": [{
"value": 1,
"name": "Europe",
"id": "europe"
}, {
"value": 4,
"name": "Europe",
"id": "europe"
}, {
"value": 2,
"name": "Europe",
"id": "europe"
}, {
"value": 2,
"name": "Europe",
"id": "europe"
}, {
"value": 6,
"name": "Europe",
"id": "europe"
}, {
"value": 0,
"name": "Europe",
"id": "europe"
}, {
"value": 5,
"name": "Europe",
"id": "europe"
}, {
"value": 0,
"name": "Europe",
"id": "europe"
}]
}, {
"name": "Asia",
"type": "line",
"smooth": true,
"lineStyle": {
"normal": {
"width": 1,
"opacity": 1
}
},
"areaStyle": {
"normal": {
"color": "#D3D3C9",
"opacity": 0.5
}
},
"itemStyle": {
"normal": {
"color": "#D3D3C9"
}
},
"data": [{
"value": 4,
"name": "Asia",
"id": "asia"
}, {
"value": 3,
"name": "Asia",
"id": "asia"
}, {
"value": 0,
"name": "Asia",
"id": "asia"
}, {
"value": 2,
"name": "Asia",
"id": "asia"
}, {
"value": 3,
"name": "Asia",
"id": "asia"
}, {
"value": 0,
"name": "Asia",
"id": "asia"
}, {
"value": 4,
"name": "Asia",
"id": "asia"
}, {
"value": 6,
"name": "Asia",
"id": "asia"
}]
}],
"dataZoom": [{
"type": "slider",
"showDetail": false,
"show": true,
"height": 10,
"xAxisIndex": [0],
"bottom": 0,
"start": 0,
"end": 100,
"handleIcon": "M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z",
"handleSize": "100%",
"handleStyle": {
"color": "#000"
},
"textStyle": {
"color": "#fff"
},
"borderColor": "transparent"
}]
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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