refactor: adjust chart render function

This commit is contained in:
vicanso 2022-02-02 08:02:32 +08:00
parent 6ae7e1d1b3
commit 5ccc497ad3
3 changed files with 49 additions and 15 deletions

View file

@ -26,11 +26,7 @@ import (
"github.com/wcharczuk/go-chart/v2"
)
func BarChartRender(opt ChartOption) (*Draw, error) {
result, err := chartBasicRender(&opt)
if err != nil {
return nil, err
}
func barChartRender(opt ChartOption, result *basicRenderResult) (*Draw, error) {
d := result.d
bd, err := NewDraw(DrawOption{