G6 icon indicating copy to clipboard operation
G6 copied to clipboard

导出图片时,图表放大接着执行graph.setTextWaterMarker、 graph.downloadFullImage,会报错

Open yinglcs opened this issue 1 year ago • 2 comments

问题描述

image image

重现链接

https://codesandbox.io/s/new

重现步骤

我尝试先把执行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]
});

补充说明(可选)

image

yinglcs avatar Jun 30 '23 01:06 yinglcs

给个在线复现 demo 看看?

Yanyan-Wang avatar Jul 04 '23 14:07 Yanyan-Wang

是否已解决 请问解决办法是什么

yeyusama avatar Nov 13 '23 02:11 yeyusama