option = {
color: ['#3398DB'],
tooltip : {
trigger: 'axis',
axisPointer : { // 座標軸指示器,座標軸觸發有效
type : 'shadow' // 默認爲直線,可選爲:'line' | 'shadow'
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis : [
{
type : 'category',
data : ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
axisTick: {
alignWithLabel: true
}
}
],
yAxis : [
{
type : 'value'
}
],
series : [
{
name:'直接訪問',
type:'bar',
markLine: {
symbol: ['none', 'none'],//去掉箭頭
itemStyle: {
normal: {
lineStyle: {
width: 1.5,
type: 'dashed',
color:'#666666'
},
label: {
color:'#666666',
show: true,
position:'end'
}
}
},
data: [{
type: 'max'
},]
},
barWidth: '60%',
data:[10, 52, 200, 334, 390, 330, 220]
}
]
};
參考資料:https://www.echartsjs.com/zh/option.html#series-bar.markLine