echarts icon indicating copy to clipboard operation
echarts copied to clipboard

Canvas redraw in iOS 11

Open regrex opened this issue 9 years ago • 9 comments

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. img_0061 img_0060

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 [其他信息]

regrex avatar Nov 10 '17 07:11 regrex

How can you know the content disappears when canvas is invisible?

Ovilia avatar Nov 13 '17 02:11 Ovilia

Same problem, when you scroll up after you scroll down, It will from disappear become appear or not reappear at all (blank).

cijianzy avatar Nov 21 '17 04:11 cijianzy

相同的问题 在ios 11 上当画布滑动到不可见区域后 图表会消失 除了监听图标是否在页面可见区域内重新渲染图标 还有什么更好的办法吗 ?????????

zl19921218 avatar Nov 23 '17 14:11 zl19921218

我也遇到同样的问题了,救命啊(╥╯^╰╥)

CYvonne avatar Nov 30 '17 02:11 CYvonne

我也遇到了 楼主那样的问题,待解决。

liuzhibin123 avatar Nov 30 '17 03:11 liuzhibin123

最后怎么解决的

mlxiao93 avatar Mar 19 '18 11:03 mlxiao93

用WKWebView,而不是UIWebView,可以解决iOS11上这类问题,包括fixed元素滚动的时候消失的问题。或者等到iOS 11.3(用beta版试过,怀疑iOS11.3的webview用了WKWebView,或者做了升级)

regrex avatar Mar 28 '18 08:03 regrex

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!..

ouhuiju avatar Apr 16 '18 08:04 ouhuiju

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.

stale[bot] avatar Apr 17 '20 01:04 stale[bot]