docs: add document for echarts option

This commit is contained in:
vicanso 2021-12-25 12:13:32 +08:00
parent 3406bd75a1
commit 805184b74d
8 changed files with 236 additions and 57 deletions

View file

@ -397,3 +397,25 @@ func TestParseECharsOptions(t *testing.T) {
},
}, options)
}
func BenchmarkEChartsRender(b *testing.B) {
for i := 0; i < b.N; i++ {
_, err := RenderEChartsToPNG(`{
"title": {
"text": "Line"
},
"xAxis": {
"type": "category",
"data": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
},
"series": [
{
"data": [150, 230, 224, 218, 135, 147, 260]
}
]
}`)
if err != nil {
panic(err)
}
}
}