feat: support bar margin
This commit is contained in:
parent
32e6dd52d0
commit
e7dc4189d5
4 changed files with 20 additions and 4 deletions
10
charts.go
10
charts.go
|
|
@ -375,10 +375,11 @@ 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,
|
||||
BarWidth: opt.BarWidth,
|
||||
Theme: opt.theme,
|
||||
Font: opt.font,
|
||||
XAxis: opt.XAxis,
|
||||
BarWidth: opt.BarWidth,
|
||||
BarMargin: opt.BarMargin,
|
||||
}).render(renderResult, barSeriesList)
|
||||
return err
|
||||
})
|
||||
|
|
@ -391,6 +392,7 @@ func Render(opt ChartOption, opts ...OptionFunc) (*Painter, error) {
|
|||
Theme: opt.theme,
|
||||
Font: opt.font,
|
||||
BarHeight: opt.BarHeight,
|
||||
BarMargin: opt.BarMargin,
|
||||
YAxisOptions: opt.YAxisOptions,
|
||||
}).render(renderResult, horizontalBarSeriesList)
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue