echarts 图表插件小的技巧:
yAxis: {
type: 'value',
min: 0,
minInterval: 1, //最小刻度值间隔为1,避免小数
axisLabel: {
formatter: function () {
return "";//不显示坐标值
}
}
}
yAxis:{
type: 'value',
axisLabel: {
show: true,
interval: 'auto',
formatter: '{value} %' //显示百分比
},
show: true
}
series:{
//柱状图上方显示数值
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: 'black',
fontSize: 16
}
}
}
}
}