首页 > 其他 > 详细

关于 echarts X轴坐标名称过长显示问题

时间:2019-10-29 15:11:08      阅读:654      评论:0      收藏:0      [点我收藏+]

xAxis: { //x轴参数配置
type: ‘category‘,
data: [],
axisTick: {
alignWithLabel: true,
},
axisLine: {
lineStyle: {
color: ‘#9c9c9c‘,
},
},
axisLabel: {
// 坐标轴刻度标签的相关设置。
show: true,
interval: 0,
formatter: function (value) { //关键代码
var res = value
if (res.length > 7) {
res = res.substring(0, 6) + ‘..‘
}
return res
},
},
},

本文灵感来源:https://blog.csdn.net/qq_42477147/article/details/99726811

关于 echarts X轴坐标名称过长显示问题

原文:https://www.cnblogs.com/xiaonanxun/p/11758378.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!