yAxis: [
{
splitLine: {
show: false
},
axisLine: {
//y轴
show: false
},
type: "category",
axisTick: {
show: false
},
inverse: true,
data: Xdata,
// 让文字显示在图形上方
axisLabel: {
show: true,
inside: true,
splitNumber: 50,
boundaryGap: [20, 20],
textStyle: {
color: "black",
verticalAlign: "bottom",
fontSize: "14",
fontStyle: "oblique",
align: "left",
padding: [200, 0, 10, 0]
},
formatter: function(name) {
// 解决图列文字过长的问题
if (!name) return "";
if (name.length > 24) {
name = name.slice(0, 24) + "...";
}
return name;
}
}
}
],
echarts图列文字过长问题解决
最新推荐文章于 2024-04-10 15:07:51 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)