为什么dataset用这种格式堆叠有问题,数据最大是30,然后y轴按道理是30,怎么是60,是不是哪里出错了,望各位大神帮我看一下,万分感谢
配置项如下
option = {
title: {
text: '折线图堆叠'
},
tooltip: {
trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
dataset:{
dimensions: ['product', '2015', '2016'],
source:
[
{product: '邮件营销', '2015': 0, '2016': 30},
{product: '联盟广告', '2015': 10, '2016': 20},
{product: '视频广告', '2015': 25, '2016': 5},
{product: '直接访问', '2015': 5, '2016': 25},
{product: '搜索引擎', '2015': 5, '2016': 25}
]
},
legend: {
},
grid: {
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
},
yAxis: {
type: 'value'
},
series: [{
type: 'bar',
stack: '总量',
label: {
normal: {
show: true,
position: 'insideRight'
}
},
},
{
type: 'bar',
stack: '总量',
label: {
normal: {
show: true,
position: 'inside'
}
},
},
]
};