refactor: support more echarts options

This commit is contained in:
vicanso 2021-12-18 11:22:53 +08:00
parent 23e2eca0c6
commit c0170bf250
5 changed files with 176 additions and 43 deletions

View file

@ -46,7 +46,9 @@ type (
Style chart.Style
}
Legend struct {
Data []string
Data []string
Align string
Padding chart.Box
}
Options struct {
Width int
@ -177,6 +179,8 @@ func New(opt Options) (Graph, error) {
Theme: opt.Theme,
TextPosition: LegendTextPositionRight,
IconDraw: DefaultLegendIconDraw,
Align: opt.Legend.Align,
Padding: opt.Legend.Padding,
}),
}
}