echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] svg渲染模式下载的svg图片背景色是黑色的

Open zhouYji opened this issue 3 years ago • 3 comments

Version

4.8.0

Link to Minimal Reproduction

No response

Steps to Reproduce

const option = { ...boxOption, title: [{ left: 'center' }], toolbox:{ feature: { saveAsImage: {} } }, xAxis: { ...boxOption.xAxis, data: newData.groupName, axisLabel: { // formatter: '{value}', rotate: -40, interval: 0, }, }, series: [ { name: 'boxplot', type: 'boxplot', data: data.boxData, tooltip: { formatter: function (param) { return [ 'Experiment ' + param.name + ': ', 'upper: ' + param.value[5], 'Q3: ' + param.value[4], 'median: ' + param.value[3], 'Q1: ' + param.value[2], 'lower: ' + param.value[1] ].join('
'); } } }, // { // name: 'outlier', // type: 'scatter', // data: data.outliers // } ] }; myChart.setOption(option);

Current Behavior

通过svg渲染后下载svg图片,使用AI软件打开,背景色变成了黑色,为异常状态。

Expected Behavior

通过svg渲染后下载svg图片,使用AI软件打开,背景色正常

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

zhouYji avatar Feb 16 '22 07:02 zhouYji

@zhouYji It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED

TITLE

[Bug] The background color of svg images downloaded in svg rendering mode is black

echarts-bot[bot] avatar Feb 16 '22 07:02 echarts-bot[bot]

是黑色还是透明?如果想要有背景色,可以指定下 backgroundColor。试了下最新版本没有问题,4.8 可以考虑手动设置一下背景色。

plainheart avatar Feb 16 '22 08:02 plainheart

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

github-actions[bot] avatar Feb 18 '24 21:02 github-actions[bot]

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

github-actions[bot] avatar Feb 25 '24 21:02 github-actions[bot]