feat: support font setting for charts
This commit is contained in:
parent
297cbabcec
commit
2772798122
3 changed files with 49 additions and 2 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue