Add Unit to XAxis as a publicly visible parameter
In some cases the XAxis may have a single long title. This can result in very few increments being shown. In order to be more flexible for those cases this allows the XAxis Tick frequency to be able to be directly controlled.
This commit is contained in:
parent
c810369730
commit
a158191faf
2 changed files with 4 additions and 2 deletions
1
axis.go
1
axis.go
|
|
@ -176,7 +176,6 @@ func (a *axisPainter) Render() (Box, error) {
|
|||
|
||||
unit := opt.Unit
|
||||
if unit <= 0 {
|
||||
|
||||
unit = ceilFloatToInt(float64(dataCount) / float64(fitTextCount))
|
||||
unit = chart.MaxInt(unit, opt.SplitNumber)
|
||||
// 偶数
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue