Revert "Improvements to how the X Axis is rendered"

This commit is contained in:
Tree Xie 2023-12-27 18:20:55 +08:00 committed by GitHub
parent 0ddb9e4ef1
commit 8bcb584aba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 20 additions and 38 deletions

View file

@ -176,6 +176,7 @@ func (a *axisPainter) Render() (Box, error) {
unit := opt.Unit
if unit <= 0 {
unit = ceilFloatToInt(float64(dataCount) / float64(fitTextCount))
unit = chart.MaxInt(unit, opt.SplitNumber)
// 偶数