标签:echarts
$(‘.line’).echarts({
tooltip : {
trigger: ‘item‘,
formatter:‘漏洞数量<br/> {a}漏洞 {b}:{c}个‘//悬浮框显示
},
type: ‘bar‘,
data: data,
//柱形图距离远近
barWidth:40,
barGap:’10%’,
labels: [‘高危’,’中危’,’低危’],//图标曲线代表
xAxis: [
{
type: ‘category’
}
],
yAxis: [
{
type: ‘value,
name: ”,
axisLabel: {
formatter: ”
}
}
],
grid:{//宽高
x:30,
x2:50
},
markLine: [[{//添加自定义线
tooltip : {
formatter:‘漏洞数量<br/>{b}:{c}‘
},
name: ‘平均值‘,
value: avg_val,
x: 30,
yAxis: avg_val
}, {
xAxis: 100000,
yAxis: avg_val
}]]
});
标签:echarts
原文地址:http://blog.csdn.net/merlin_feng/article/details/46295141