antvis/G2

v5 beta 5: How to set the backgroundColor to transparent #4519

sspilleman posted onGitHub

Hi,

How can I set the Canvas to transparent? I'm using the dark theme, but currently it defaults to black, and I'm using a different color.

I already tried this:

chart.theme({ type: "dark",backgroundColor:"transparent" });

Thank you!


Hi,

How can I set the Canvas to transparent? I'm using the dark theme, but currently it defaults to black, and I'm using a different color.

I already tried this:

chart.theme({ type: "dark",backgroundColor:"transparent" });

Thank you!

Try as follow, we'll provide English documentations later. Example

chart.theme({ type: 'dark', viewFill: 'transparent' });
posted by visiky over 2 years ago

Works great! Thanks a lot!

posted by sspilleman over 2 years ago

Fund this Issue

$0.00
Funded

Pull requests