首页 > 其他 > 详细

Echarts条形图顶端设置显示数据【转】

时间:2020-07-04 11:12:45      阅读:73      评论:0      收藏:0      [点我收藏+]

代码

series : [
 {
	 name:‘金额‘,
	 type:‘bar‘,
	 barWidth: ‘60%‘,
	 data:[10, 52, 200, 334, 390],	        	          
     barWidth : 30,
	 itemStyle:{
	     normal:{
	     color:function(params) {
	 // build a color map as your need.
	 var colorList = [	        	                              
   ‘#C1232B‘,‘#B5C334‘,‘#FCCE10‘,‘#E87C25‘,‘#27727B‘,	        	                               
   ‘#FE8463‘,‘#9BCA63‘,‘#FAD860‘,‘#F3A43B‘,‘#60C0DD‘,	        	                               
   ‘#D7504B‘,‘#C6E579‘,‘#F4E001‘,‘#F0805A‘,‘#26C0C0‘
	      ];
	  return colorList[params.dataIndex]
	     },
         label: {
    		show: true, //开启显示
    		position: ‘top‘, //在上方显示
    		textStyle: { //数值样式
    		    color: ‘black‘,
    			fontSize: 16,
    			fontWeight: 600
    			}
    		}
	     }
     }
 
  }
]

效果图
技术分享图片

原文链接:https://blog.csdn.net/xm393392625/article/details/82114955

Echarts条形图顶端设置显示数据【转】

原文:https://www.cnblogs.com/KillBugMe/p/13234205.html

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