refactor: adjust theme of chart

This commit is contained in:
vicanso 2022-02-01 10:08:59 +08:00
parent 910e2dc422
commit 3a9897f9ad
5 changed files with 79 additions and 44 deletions

View file

@ -31,6 +31,12 @@ type Theme struct {
mode string
}
func NewTheme(mode string) *Theme {
return &Theme{
mode: mode,
}
}
func (t *Theme) IsDark() bool {
return t.mode == ThemeDark
}