option = {
tooltip : {
trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
},
formatter:function(v){return Math.abs(v[0].data)}
},
legend: {
data:['直接访问']
},
xAxis : [
{
type : 'value',
axisLabel:{
formatter:function(v){ return Math.abs(v)}
}
}
],
yAxis : [
{
type : 'category',
position:'right',
data : ['周一','周二','周三','周四','周五','周六','周日']
}
],
series : [
{
name:'直接访问',
type:'bar',
stack: '总量',
itemStyle : { normal: {label : {show: true, position: 'left',formatter:function(v){return Math.abs(v.data)}}}},
data:[-320,- 302, -301, -334, -390,- 330, -320]
},
]
tooltip : {
trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
},
formatter:function(v){return Math.abs(v[0].data)}
},
legend: {
data:['直接访问']
},
xAxis : [
{
type : 'value',
axisLabel:{
formatter:function(v){ return Math.abs(v)}
}
}
],
yAxis : [
{
type : 'category',
position:'right',
data : ['周一','周二','周三','周四','周五','周六','周日']
}
],
series : [
{
name:'直接访问',
type:'bar',
stack: '总量',
itemStyle : { normal: {label : {show: true, position: 'left',formatter:function(v){return Math.abs(v.data)}}}},
data:[-320,- 302, -301, -334, -390,- 330, -320]
},
]
};