代碼
option = {
xAxis: [
{
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun','Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
axisTick: {
length:20
},
},
{
type: 'category',
data: [
{
value: 'First week',
textStyle: {
fontSize: 18,
lineHeight: 70
}
},{
value: 'Second weeks',
textStyle: {
fontSize: 18,
lineHeight: 70
}
}
],
position : 'bottom',
axisTick: {
length:50
},
splitArea: {
show: true,
areaStyle: {
color: ['rgba(255,255,255,0.5)','rgba(200,200,200,0.5)']
}
}
},
],
yAxis: {
type: 'value'
},
series: [{
data: [820, 932, 901, 934, 1290, 1330, 1320, 820, 932, 901, 934, 1290, 1330, 1320],
type: 'line'
}]
};
結果