Canvas redraw in iOS 11
Canvas redraw in iOS 11 [问题简述]
We use canvas to draw a radar map, but, in iOS 11, When first show in the webview, the page looks fine, but, when it scrolls down and the canvas in it becomes invisible in the viewport, the content in the canvas disappears for a moment, then reappear.

Version & Environment [版本及环境]
- ECharts version [ECharts 版本]: 3.8.0
- Browser version [浏览器类型和版本]: Webview
- OS Version [操作系统类型和版本]: iOS 11
Expected behaviour [期望结果]
not disappear
ECharts option [ECharts配置项]
option = {
backgroundColor: '#fff',
radar:{
indicator:indicator,
splitNumber:1,
silent: true,
nameGap:5,
name: {
textStyle: {
color: '#333',
fontSize: '12px'
}
},
splitLine: {
lineStyle: {
color: ['#999']
}
},
axisLine: {
lineStyle: {
type: 'dotted',
color: ['#999']
}
}
},
series:[{
type: 'radar',
symbol: 'none',
itemStyle: {
normal: {
color: '#F5A623'
}
},
areaStyle: {
normal: {
color: 'rgba(255,225,0,0.60)'
}
},
animationDelay:1000,
animationDuration: 3000,
data: [{
value: valuePercent
}]
}]
}
Other comments [其他信息]
How can you know the content disappears when canvas is invisible?
Same problem, when you scroll up after you scroll down, It will from disappear become appear or not reappear at all (blank).
相同的问题 在ios 11 上当画布滑动到不可见区域后 图表会消失 除了监听图标是否在页面可见区域内重新渲染图标 还有什么更好的办法吗 ?????????
我也遇到同样的问题了,救命啊(╥╯^╰╥)
我也遇到了 楼主那样的问题,待解决。
最后怎么解决的
用WKWebView,而不是UIWebView,可以解决iOS11上这类问题,包括fixed元素滚动的时候消失的问题。或者等到iOS 11.3(用beta版试过,怀疑iOS11.3的webview用了WKWebView,或者做了升级)
meet the same problem. I use the WKWebView in my project, when we load the url included canvas and scroll, the canvas will disappear sometime, but check the DOM it always on!..
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.