feat: support bar chart

This commit is contained in:
vicanso 2022-02-01 11:19:31 +08:00
parent 3a9897f9ad
commit 6ae7e1d1b3
5 changed files with 112 additions and 8 deletions

View file

@ -26,6 +26,11 @@ import (
"github.com/wcharczuk/go-chart/v2"
)
type YAxisOption struct {
Min *float64
Max *float64
}
const YAxisWidth = 40
func drawYAxis(p *Draw, opt *ChartOption, xAxisHeight int, padding chart.Box) (*Range, error) {