柱状图堆叠
leftOption = {
title : {
text: 'xxxxx',
padding: [18,0,0,12]
},
tooltip : {
trigger: 'axis',
axisPointer: {
type: 'none'
}
},
legend: {
data:['xxx','xxx','yyy','yyy'],
textStyle: {
color: '#000'
},
align: 'right',
right: 10,
top: 18
},
grid: {
left: '2%',
right: '2%',
bottom: '2%',
top: '15%',
containLabel: true
},
calculable : true,
xAxis : [
{
type : 'category',
data : [],
axisLine:{lineStyle:{color:'#000'}},
axisLabel: {
show: true,
interval:0,rotate:40,
textStyle: {
color: '#000'
}
}
}
],
yAxis : [
{
type : 'value',
axisLine:{lineStyle:{color:'#000'}},
axisLabel: {
show: true,
textStyle: {
color: '#000'
}
}
}
],
series : [
{
name:'xxx',
type:'bar',
data:[],
stack: 'xx',
itemStyle:{
normal:{
color:'#5FD3A7'
}
},
},
{
name:'xxx',
type:'bar',
data:[],
stack: 'xx',
itemStyle:{
normal:{
color:'#F7C700'
}
},
},
{
name:'yyy',
type:'bar',
data:[],
stack: 'yy',
itemStyle:{
normal:{
color:'#64BD52'
}
},
},
{
name:'yyy',
type:'bar',
data:[],
stack: 'yy',
itemStyle:{
normal:{
color:'#FFAA00'
}
},
}
]
}
柱状图折线图
$baseInfo.option = {
title:{
text:"",
left: "10",
top: "10",
textStyle:{
fontSize: 30
}
},
tooltip : {
trigger : 'axis',
axisPointer : {
type : 'line',
crossStyle : {
color : '#000'
}
}
},
color : [ '#8B4513', '#9400D3', '#FFD700' ],
textStyle : {
color : '#000000',
},
grid: {
top:"15%",
left: "5%",
right:"5%"
},
legend : {
top:15,
textStyle : {
color : '#000000'
},
data : [ '', '', '', '', '', '' ]
},
xAxis : [ {
type : 'category',
data : [ '1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月' ],
axisPointer : {
type : 'shadow'
},
axisLine : {
lineStyle : {
color : '#000000'
}
},
} ],
yAxis : [ {
type : 'value',
name : '正常数',
min : 0,
axisLine : {
lineStyle : {
color : '#000000'
}
},
splitLine : {
show : false
},
axisLabel : {
formatter : '{value}'
}
}, {
type : 'value',
name : '正常率',
min : 0,
max : 100,
interval : 10,
axisLine : {
lineStyle : {
color : '#000000'
}
},
splitLine : {
show : false
},
axisLabel : {
formatter : '{value} %'
}
} ],
series : [ {
name : '',
type : 'bar'
}, {
name : '',
type : 'bar'
}, {
name : '',
type : 'bar'
}, {
name : '',
type : 'line',
yAxisIndex : 1
}, {
name : '',
type : 'line',
yAxisIndex : 1
}, {
name : '',
type : 'line',
yAxisIndex : 1
} ]
};