antvis/G6



The issue has been closed
导出图片时,图表放大接着执行graph.setTextWaterMarker、 graph.downloadFullImage,会报错 #4689
yinglcs posted onGitHub
问题描述
重现链接
重现步骤
我尝试先把执行graph.fitView()在导出操作之前,则可避免报错
预期行为
正常导出,不需要执行fitView
平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox]
- G6 版本: [4.5.1 ... ]
屏幕截图或视频(可选)
//graph.fitView();
graph.set('pixelRatio', 6);
graph.setTextWaterMarker([waterText], {
width: 80,
height: 80,
text: {
x: 0,
y: 35,
lineHeight: 20,
rotate: 20,
fontSize: 12
}
});
graph.downloadFullImage(cardTitle.value, 'image/jpeg', {
backgroundColor: '#fff',
padding: [30, 15, 15, 15]
});