refactor: enhance legend render function

This commit is contained in:
vicanso 2022-02-01 09:48:47 +08:00
parent 9dbea37f55
commit 910e2dc422
3 changed files with 19 additions and 3 deletions

View file

@ -81,6 +81,7 @@ func (o *ChartOption) FillDefault(t *Theme) {
Bottom: 5,
}
}
o.Legend.Theme = t
if o.Legend.Style.FontSize == 0 {
o.Legend.Style.FontSize = 8
}