vicanso / go-charts

A charts library for Golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

x轴字符串过长能否保持全部显示

ChuanFF opened this issue · comments

image
image

当x轴字符串过长,x轴会只显示部分字符串。有没有方法让所有的x轴显示?比如字体缩小/字符串倾斜显示等

可通过设置TextRotation属性,如:

func(opt *charts.ChartOption) {
	opt.XAxis.TextRotation = -math.Pi / 3
},

最终通过 opt.XAxis.FontSize设置字体大小解决了