antvis/G2

5.1.15: theme 'dark' applies black background color #6164

sspilleman posted onGitHub

Problem Description: theme 'dark' applies black background color. I think a lot of projects offering a dark mode use a different background color (than black).

Maybe you want to consider using 'transparent' by default instead? If i'm not mistaken, I think the 'light' theme already uses transparent by default. Also see workaround below. I had to use 'none' to get rid of it... Using 'transparent' instead of 'none' feels more natural?

Workaround:

chart.options({
    theme: {
        type: 'dark',
        view: {
            viewFill: 'none' <------------
        }
    },
});

@pearmini +1

posted by hustcc about 1 year ago

please comment and close if you don't think this is an issue....

posted by sspilleman about 1 year ago

Can help us with a pr, and set the viewFill = transparent when dark mode.

posted by hustcc about 1 year ago

Thanks @hustcc but this also required changing the documentation etc, and my chinese isn't great ;-)

posted by sspilleman about 1 year ago

Fund this Issue

$0.00
Funded

Pull requests