echarts在柱状图上显示数值
var option ={tooltip: {},xAxis: {type:'value'},grid: {left: "3%",right: "1%",bottom: "-1%",width: "300px",height: "300px",containLabel: true},yAxis: {type:'categor
·
var option ={
tooltip: {},
xAxis: {
type:'value'
},
grid: {
left: "3%",
right: "1%",
bottom: "-1%",
width: "300px",
height: "300px",
containLabel: true
},
yAxis: {
type:'category',
data:this.yardList.map(function(item){
return item[1]
})
},
series: [
{
// name: "购买总人数",
type: "bar",
barWidth: "15px",
barGap:"10%",
// barCategoryGap是不同类目间的距离
barCategoryGap: "1%",
data:this.yardList.map(function(item){
return item[2]
}),
itemStyle: {
color: "#9ACFBD"
},
// 实现数字展示在柱状图
label: {
show: true,
position: 'inside',
color:'black'
},
}
]
}
更多推荐



所有评论(0)