4.0版本在angular中多标题报错
配置项如下
option = {
title: [{
gridIndex: 0,
text: '在线构建',
subtext: '总计 ',
x: '25%',
textAlign: 'center'
},{
gridIndex: 0,
text: '在线构建',
subtext: '总计 ',
x: '50%',
textAlign: 'center'
}],
tooltip: {},
xAxis: [
{ type: 'category', gridIndex: 0, data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] },
{ type: 'category', gridIndex: 1, data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] }
],
yAxis: [
{ gridIndex: 0 },
{ gridIndex: 1 }
],
grid: [{
top: 50,
width: '100%',
bottom: '45%',
left: 10,
containLabel: true
}, {
top: '55%',
width: '100%',
bottom: 0,
left: 10,
containLabel: true
}],
series: [
{
name: '直接访问',
type: 'bar',
xAxisIndex: 0,
yAxisIndex: 0,
data: [86.5, 92.1, 85.7, 83.1]
},
{
name: '间接访问',
type: 'bar',
xAxisIndex: 1,
yAxisIndex: 1,
data: [86.5, 92.1, 85.7, 83.1]
}
]
};