Handling of excess y-axis data in Echart

Effect:

 

type:'value',
 axisLabel:{/自定义刻度格式,大于10000的时候,显示格式为value/10000+万/
	formatter:function(value){
		var txt=[];
		if(value>=10000){
			txt.push(value/10000+'万');
		}else{
			txt.push(value);
		};
		return txt;
	}
},
 axisPointer:{
    show:false,/x轴,y轴中滑块的显示和隐藏/
	label:{
	     color:'#993d3d',
		 backgroundColor:'white',
		 formatter:'{value}元'
	}
}

Guess you like

Origin blog.csdn.net/ljy_1024/article/details/124189079