现在图中是以0为分界线,我想写成以5为分界线
因为客户需求数字是0-10而不是-5 - 5 这个怎么改
配置项如下
app.title = '正负条形图';
option = {
tooltip : {
trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis : [
{
type : 'value',
min:-5,
max:5,
// min:0,
// max:10,
interval:100
}
],
yAxis : [
{
type : 'category',
axisTick : {show: false},
data : ['乐群','聪慧','稳定','恃强','兴奋','有恒','敢为','敏感','怀疑','幻想','世故','忧虑','实验','独立','自律','紧张','适应与焦虑性','内向与外向型','感情用事与安详机警性','懦弱与果断性']
}
],
series : [
{
name:'数据',
type:'bar',
label: {
normal: {
show: true,
position: 'inside'
}
},
// data:[1,2,4,5,6,6,7,9,10,5,2,3,2,7,8,9,3,4,7,6]
data:[-4,-3,-1,0,1,1,2,4,5,0,-3,-2,-3,2,3,4,-2,-3,2,1]
}
]
};