feat: support get and set default font

This commit is contained in:
vicanso 2022-11-12 20:01:36 +08:00
parent 2ed86a81d0
commit de4250f60b
6 changed files with 24 additions and 10 deletions

View file

@ -24,7 +24,6 @@ package charts
import (
"github.com/golang/freetype/truetype"
"github.com/wcharczuk/go-chart/v2"
)
// NewMarkLine returns a series mark line
@ -75,7 +74,7 @@ func (m *markLinePainter) Render() (Box, error) {
}
font := opt.Font
if font == nil {
font, _ = chart.GetDefaultFont()
font, _ = GetDefaultFont()
}
summary := s.Summary()
for _, markLine := range s.MarkLine.Data {