feat: support font setting for charts

This commit is contained in:
vicanso 2021-12-28 23:37:15 +08:00
parent 297cbabcec
commit 2772798122
3 changed files with 49 additions and 2 deletions

View file

@ -28,8 +28,21 @@ import (
"github.com/stretchr/testify/assert"
"github.com/wcharczuk/go-chart/v2"
"github.com/wcharczuk/go-chart/v2/roboto"
)
func TestFont(t *testing.T) {
assert := assert.New(t)
fontFamily := "roboto"
err := InstallFont(fontFamily, roboto.Roboto)
assert.Nil(err)
font, err := GetFont(fontFamily)
assert.Nil(err)
assert.NotNil(font)
}
func TestChartsOptions(t *testing.T) {
assert := assert.New(t)