去掉堆叠属性,柱子就合在了一起,怎么像普通的柱状图,并列显示
配置项如下
option = {
title: {
text: '3D堆叠柱状图',
x: 'center'
},
calculable : true,
xAxis3D: {
type: 'category',
axisTick: {show: false},
data: ['2007年', '2008年'],
name:''
},
yAxis3D: {
type: 'category',
data: ['']
},
zAxis3D: {
type: 'value'
},
grid3D: {
boxWidth: 200,
boxDepth: 40,
axisPointer: {
show: false
},
light: {
main: {
intensity: 1.2
},
ambient: {
intensity: 0.3
}
},
viewControl: {
alpha: 10, //控制场景平移旋转
beta: 10,
distance:300,
minAlpha: 10,
maxAlpha: 10,
minBeta: 10,
maxBeta: 200,
damping:0.8,
rotateMouseButton:'left'
}
},
series: [
{
type: 'bar3D',
barSize: 15,
data: [
[0, 0, 1],
[1, 0, 3]
],
shading: 'lambert',
stack:'stack',
emphasis: {
label: {
show: false
}
}
}, {
type: 'bar3D',
barSize: 15,
data: [
[0, 0, 5],
[1, 0, 4]
],
stack:'stack',
shading: 'lambert',
emphasis: {
label: {
show: false
}
}
}]
};