test: add test for axis
This commit is contained in:
parent
635e440e85
commit
d3c6649cd9
12 changed files with 145 additions and 40 deletions
7
axis.go
7
axis.go
|
|
@ -81,7 +81,10 @@ func (a *axisPainter) Render() (Box, error) {
|
|||
opt := a.opt
|
||||
top := a.p
|
||||
theme := opt.Theme
|
||||
if opt.Show != nil && !*opt.Show {
|
||||
if theme == nil {
|
||||
theme = top.theme
|
||||
}
|
||||
if isFalse(opt.Show) {
|
||||
return BoxZero, nil
|
||||
}
|
||||
|
||||
|
|
@ -121,7 +124,7 @@ func (a *axisPainter) Render() (Box, error) {
|
|||
tickCount := dataCount
|
||||
|
||||
boundaryGap := true
|
||||
if opt.BoundaryGap != nil && !*opt.BoundaryGap {
|
||||
if isFalse(opt.BoundaryGap) {
|
||||
boundaryGap = false
|
||||
}
|
||||
isVertical := opt.Position == PositionLeft ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue