柱状图值为负数且坐标不从0开始会出现该问题,柱子应该往下才对,echart2.0没问题
配置项如下
option = {
title : {
text: '某地区蒸发量和降水量',
subtext: '纯属虚构'
},
tooltip : {
trigger: 'axis'
},
legend: {
data:['蒸发量','降水量']
},
toolbox: {
show : true,
feature : {
mark : {show: true},
dataView : {show: true, readOnly: false},
magicType : {show: true, type: ['line', 'bar']},
restore : {show: true},
saveAsImage : {show: true}
}
},
xAxis : [
{
type : 'category',
data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
}
],
yAxis : [
{
type : 'value',
scale:true
}
],
series : [
{
name:'蒸发量',
type:'bar',
data:[
{
"cityId": 791,
"value": "-",
"centerId": 79112487,
"countyId": 9102
},
{
"cityId": 791,
"value": "-",
"centerId": 79112490,
"countyId": 9102
},
{
"cityId": 791,
"value": -100,
"centerId": 79105878,
"countyId": 9102
},
{
"cityId": 791,
"value": -156.73,
"centerId": 79107195,
"countyId": 9102
},
{
"cityId": 791,
"value": -158.26,
"centerId": 79105874,
"countyId": 9102
},
{
"cityId": 791,
"value": -160,
"centerId": 79107194,
"countyId": 9102
},
{
"cityId": 791,
"value": -161.28,
"centerId": 79106490,
"countyId": 9102
},
{
"cityId": 791,
"value": -165.26,
"centerId": 79105877,
"countyId": 9102
},
{
"cityId": 791,
"value": -66,
"centerId": 79105883,
"countyId": 9102
},
{
"cityId": 791,
"value": -68.46,
"centerId": 79105882,
"countyId": 9102
}
]
}
]
};