Echarts X軸に配置された垂直表示テキスト、ディスプレイ又はディスプレイに傾斜省略

縦表示:

let option = {
	xAxis:{
		//文字样式
		axisLabel: {
             show: true,                               
             textStyle: {
                color: '#595C61'
             },
             formatter:function(value){
				return value.split("").join("\n");
			 }
        }
	}
}

ここに画像を挿入説明

ディスプレイを傾け:

let option = {
	xAxis:{
		//文字样式
		axisLabel: {
             show: true,                               
             textStyle: {
                color: '#595C61'
             },
             rotate:45
        }
	}
}

ここに画像を挿入説明

省略表示:

let option = {
	xAxis:{
		//文字样式
		axisLabel: {
             show: true,                               
             textStyle: {
                color: '#595C61'
             },
             formatter:function(value){
				 if(value.length > 6){
                        return `${value.slice(0,4)}...`;
                 }
                 return value;
			 }
        }
	}
}

ここに画像を挿入説明

公開された258元の記事 ウォン称賛21 ビュー50000 +

おすすめ

転載: blog.csdn.net/wsln_123456/article/details/104471691