fix: fix the font option of axis

This commit is contained in:
vicanso 2022-05-01 11:26:53 +08:00
parent cad8296e28
commit cf2eb91690
2 changed files with 6 additions and 2 deletions

View file

@ -96,7 +96,9 @@ func drawYAxis(p *Draw, opt *ChartOption, axisIndex, xAxisHeight int, padding ch
if err != nil {
return nil, err
}
dYAxis.Font = opt.Font
if opt.Font != nil {
dYAxis.Font = opt.Font
}
NewAxis(dYAxis, data, style).Render()
yRange.Size = dYAxis.Box.Height()
return &yRange, nil