Skip to content

SaveAsImage add chart watermark #10618

@MINDoSOFT

Description

@MINDoSOFT

What problem does this feature solve?

I need to add some customization on the chart (e.g. watermark), that needs to happen only when the chart's saveAsImage toolbox button is clicked.

What does the proposed API look like?

I believe this can be fixed with 2 different ways.

One way is to add a backgroundImage option is saveAsImage chart option.

https://ecomfe.github.io/echarts-doc/public/en/option.html#toolbox.feature.saveAsImage

this backgroundImage will be added as background to the chart only in the exported image
produced when the chart's saveAsImage toolbox button is clicked.

The other way I can think of is to add two events on the chart called saveAsImageBefore/After (like restore event exists)

https://ecomfe.github.io/echarts-doc/public/en/api.html#events.restore

saveAsImageBefore will have some code to draw the watermark, and saveAsImageAfter will hide the watermark.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enThis issue is in Englishsupport

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions