feat: support vertical orient legend

This commit is contained in:
vicanso 2022-02-04 18:34:31 +08:00
parent c5e2ae67cb
commit 3219ce521b
4 changed files with 248 additions and 30 deletions

View file

@ -108,10 +108,13 @@ func (o *ChartOption) FillDefault(theme string) {
o.Title.SubtextStyle.Font = o.Font
}
o.Legend.Theme = t
o.Legend.Theme = theme
if o.Legend.Style.FontSize == 0 {
o.Legend.Style.FontSize = 10
}
if o.Legend.Left == "" {
o.Legend.Left = PositionCenter
}
if o.Legend.Style.Font == nil {
o.Legend.Style.Font = o.Font
}