feat: support customize title

This commit is contained in:
vicanso 2022-01-01 20:11:51 +08:00
parent 06c326bdc3
commit 25e9984ad8
8 changed files with 167 additions and 7 deletions

View file

@ -398,6 +398,18 @@ func TestParseECharsOptions(t *testing.T) {
}, options)
}
func TestUnmarshalJSON(t *testing.T) {
assert := assert.New(t)
var lp Position
err := lp.UnmarshalJSON([]byte("123"))
assert.Nil(err)
assert.Equal("123", string(lp))
err = lp.UnmarshalJSON([]byte(`"234"`))
assert.Nil(err)
assert.Equal("234", string(lp))
}
func BenchmarkEChartsRenderPNG(b *testing.B) {
for i := 0; i < b.N; i++ {
_, err := RenderEChartsToPNG(`{