echarts
echarts copied to clipboard
echarts xAxis 设置min=0不起作用
echarts3 设置xAxis type="value" 并设置min=0,但是在没有数据的时候,还是会显示负坐标轴,0坐标显示在了中间。而官网上的例子就没有这样的问题,把option配置放入demo的编辑框里生成的图表也没有这样的问题。麻烦请分析一下是什么原因?
提供option配置如下:
option= {
tooltip : {
trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
legend: {
data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎','百度','谷歌','必应','其他']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis : [
{
type : 'value'
}
],
yAxis : [
{
type : 'category',
data : ['周一','周二','周三','周四','周五','周六','周日']
}
],
series : [
{
name:'直接访问',
type:'bar',
data:[0, 0, 0, 0, 0, 0, 0]
}
]
};
同样遇到这个问题,有人能解答下吗?官网上的例子是没有问题的
新版本没这个问题