[Echarts] Solve the problem that the Y-axis content is too long and truncated, resulting in incomplete display

Configuration item manual: https://echarts.apache.org/zh/option.html#title

1. Let the content be fully displayed

  • Configuration grid:
grid: {
    
    
	left: 110,
    containLabel: true,
},

Insert image description here

Insert image description here

2. Let the content go beyond omission

yAxis: {
    
    
    axisLabel: {
    
    
        width: 66, 				// 文本显示宽度
        overflow: 'truncate', 	// 超出的部分截断
        ellipsis: '...', 		// 截断的部分用...代替
    }
},

Insert image description here
Insert image description here

Guess you like

Origin blog.csdn.net/qq_45677671/article/details/135215467
Recommended