test: add test for x axis
This commit is contained in:
parent
cc6a1832fe
commit
e07cb90607
3 changed files with 106 additions and 5 deletions
4
axis.go
4
axis.go
|
|
@ -31,6 +31,8 @@ import (
|
|||
)
|
||||
|
||||
type AxisOption struct {
|
||||
// The boundary gap on both sides of a coordinate axis.
|
||||
// Nil or *true means the center part of two axis ticks
|
||||
BoundaryGap *bool
|
||||
// The flag for show axis, set this to *false will hide axis
|
||||
Show *bool
|
||||
|
|
@ -379,7 +381,7 @@ func (a *axis) axisMeasureTextMaxWidthHeight() (int, int) {
|
|||
return measureTextMaxWidthHeight(data.TextList(), r)
|
||||
}
|
||||
|
||||
// measureAxis return the measurement of axis.
|
||||
// measureAxis returns the measurement of axis.
|
||||
// If the position is left or right, it will be textMaxWidth + labelMargin + tickLength.
|
||||
// If the position is top or bottom, it will be textMaxHeight + labelMargin + tickLength.
|
||||
func (a *axis) measureAxis() int {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue