X6 icon indicating copy to clipboard operation
X6 copied to clipboard

exportJPEG导出的图片没有背景图呢

Open bighhhh opened this issue 1 year ago • 5 comments

Describe the bug

exportJPEG导出的图片没有背景图,背景图绘制的代码是: 1、graph.background.draw({ image: backgroundImg, repeat: 'repeat-y', size: 'cover' }); 2、graph.drawBackground({ image: backgroundImg, repeat: 'repeat-y', size: 'cover' }); 以上两种方法绘制的背景图都无法被导出,画布上背景图显示是正常的

Your Example Website or App

Steps to Reproduce the Bug or Issue

1、graph.background.draw({ image: backgroundImg, repeat: 'repeat-y', size: 'cover' }); 2、this.graph.toJPEG((dataUri) => { // 下载 DataUri.downloadDataUri(dataUri, 'chart.png'); }); 3、图片正常导出,但是内容不含背景图,为空白背景

Expected behavior

导出的图片中含有背景图

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox] "@antv/x6-plugin-export": "^2.1.6"

Additional context

No response

bighhhh avatar Feb 21 '24 09:02 bighhhh

微信截图_20240221175025 chart (7)

bighhhh avatar Feb 21 '24 09:02 bighhhh

导出都有一个配置项,里面可以设置导出背景

flxy1028 avatar Apr 01 '24 03:04 flxy1028

导出都有一个配置项,里面可以设置导出背景

QQ截图20240410134819 只有导出背景色啊,导出背景图是哪个配置呢

bighhhh avatar Apr 10 '24 05:04 bighhhh

导出都有一个配置项,里面可以设置导出背景

这个里边也没看见哪个是导出背景图 QQ截图20240410140300

bighhhh avatar Apr 10 '24 06:04 bighhhh

https://www.yuque.com/sxd_panda/antv/x6 请看这个文档

zlecheng avatar May 15 '24 08:05 zlecheng