fix: fix font setting for title, #15

This commit is contained in:
vicanso 2022-07-27 20:27:49 +08:00
parent 1713bc283f
commit e095223705
4 changed files with 44 additions and 4 deletions

View file

@ -259,6 +259,9 @@ func (o *ChartOption) fillDefault() {
if o.font == nil {
o.font, _ = chart.GetDefaultFont()
} else {
// 如果指定了字体,则设置主题的字体
t.SetFont(o.font)
}
if o.BackgroundColor.IsZero() {
o.BackgroundColor = t.GetBackgroundColor()