refactor: adjust theme of chart

This commit is contained in:
vicanso 2022-02-01 10:08:59 +08:00
parent 910e2dc422
commit 3a9897f9ad
5 changed files with 79 additions and 44 deletions

View file

@ -28,7 +28,8 @@ import (
const YAxisWidth = 40
func drawYAxis(p *Draw, opt *ChartOption, theme *Theme, xAxisHeight int, padding chart.Box) (*Range, error) {
func drawYAxis(p *Draw, opt *ChartOption, xAxisHeight int, padding chart.Box) (*Range, error) {
theme := NewTheme(opt.Theme)
yRange := opt.getYRange(0)
data := NewAxisDataListFromStringList(yRange.Values())
style := AxisStyle{