diff --git a/axis.go b/axis.go
index 17e8e9f..ebc6782 100644
--- a/axis.go
+++ b/axis.go
@@ -154,7 +154,8 @@ func (a *axisPainter) Render() (Box, error) {
textMaxWidth, textMaxHeight := top.MeasureTextMaxWidthHeight(data)
- textFillWidth := float64(textMaxWidth) * 1.3
+ // 增加30px来计算文本展示区域
+ textFillWidth := float64(textMaxWidth + 20)
textCount := ceilFloatToInt(float64(top.Width()) / textFillWidth)
unit := ceilFloatToInt(float64(dataCount) / float64(chart.MaxInt(textCount, opt.SplitNumber)))
// 偶数
diff --git a/bar_chart_test.go b/bar_chart_test.go
index 138b3ca..f1bd688 100644
--- a/bar_chart_test.go
+++ b/bar_chart_test.go
@@ -102,7 +102,7 @@ func TestBarChart(t *testing.T) {
}
return p.Bytes()
},
- result: "",
+ result: "",
},
}
diff --git a/chart_option_test.go b/chart_option_test.go
index 5e53e46..1238422 100644
--- a/chart_option_test.go
+++ b/chart_option_test.go
@@ -277,7 +277,7 @@ func TestBarRender(t *testing.T) {
assert.Nil(err)
data, err := p.Bytes()
assert.Nil(err)
- assert.Equal("", string(data))
+ assert.Equal("", string(data))
}
func TestHorizontalBarRender(t *testing.T) {
diff --git a/echarts_test.go b/echarts_test.go
index 4d50d9e..8deda2d 100644
--- a/echarts_test.go
+++ b/echarts_test.go
@@ -578,5 +578,5 @@ func TestRenderEChartsToSVG(t *testing.T) {
]
}`)
assert.Nil(err)
- assert.Equal("", string(data))
+ assert.Equal("", string(data))
}