antvis/G6

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

yinglcs posted onGitHub

问题描述

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


给个在线复现 demo 看看?

posted by Yanyan-Wang almost 2 years ago

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

posted by yeyusama over 1 year ago

This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help.

这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

posted by github-actions[bot] 10 months ago

Fund this Issue

$0.00
Funded

Pull requests