refactor: adjust text render of axis
This commit is contained in:
parent
eef3a2f97b
commit
0a3ac7096a
2 changed files with 9 additions and 2 deletions
|
|
@ -653,8 +653,9 @@ func (p *Painter) MultiText(opt MultiTextOption) *Painter {
|
|||
} else {
|
||||
values = autoDivide(width, count)
|
||||
}
|
||||
showIndex := opt.Unit / 2
|
||||
for index, text := range opt.TextList {
|
||||
if opt.Unit != 0 && index%opt.Unit != 0 {
|
||||
if opt.Unit != 0 && index%opt.Unit != showIndex {
|
||||
continue
|
||||
}
|
||||
box := p.MeasureText(text)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue