option = {
legend: [{
data:['left1','left2'],
selected: {
'left1': true,
'left2': false,
},
orient: 'vertical',
left:30,
bottom: '85%',
},{
data:['right1','right2'],
selected: {
'right1': false,
'right2': false,
},
orient: 'vertical',
right:30,
bottom: '85%'
}],
//===================//
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
//===================//
yAxis: [{
type: 'value',
name:'Left',
},{
type:'value',
name:'Right',
}],
//===================//
series: [{
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line',
name:'left1'
},
{
data: [280, 450, 654, 865, 1003, 1254, 1298],
type: 'line',
name:'left2'
},
{ data: [50, 80, 25, 34, 56, 76, 87],
type: 'line',
name:'right1',
yAxisIndex:1,
},
{ data: [43, 54, 35, 39, 46, 58, 72],
type: 'line',
name:'right2',
yAxisIndex:1,
}]
};
Legend/Series visibility should toggle when Legend item is clicked.
Version
4.2.1-rc1
Steps to reproduce
What is expected?
Legend/Series visibility should toggle when Legend item is clicked.
What is actually happening?
Requires double click to first toggle Legend/Series visibility