feat: support setting bar width for bar chart, #24

This commit is contained in:
vicanso 2022-09-28 20:29:22 +08:00
parent 1f5b9d513e
commit 0a80e7056f
3 changed files with 14 additions and 5 deletions

View file

@ -354,9 +354,10 @@ func Render(opt ChartOption, opts ...OptionFunc) (*Painter, error) {
if len(barSeriesList) != 0 {
handler.Add(func() error {
_, err := NewBarChart(p, BarChartOption{
Theme: opt.theme,
Font: opt.font,
XAxis: opt.XAxis,
Theme: opt.theme,
Font: opt.font,
XAxis: opt.XAxis,
BarWidth: opt.BarWidth,
}).render(renderResult, barSeriesList)
return err
})