refactor: auto count the split number for x axis

This commit is contained in:
vicanso 2022-02-06 09:55:27 +08:00
parent 3219ce521b
commit c01f4001f1
6 changed files with 134 additions and 58 deletions

View file

@ -38,7 +38,7 @@ func drawYAxis(p *Draw, opt *ChartOption, xAxisHeight int, padding chart.Box) (*
theme := NewTheme(opt.Theme)
yRange := opt.getYRange(0)
data := NewAxisDataListFromStringList(yRange.Values())
style := AxisStyle{
style := AxisOption{
Position: PositionLeft,
BoundaryGap: FalseFlag(),
FontColor: theme.GetAxisStrokeColor(),